From b30f771aebeaafe9c7edd4ed884240f2940b44a1 Mon Sep 17 00:00:00 2001 From: qyh15 Date: Tue, 27 Oct 2026 17:04:10 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BB=A5=E5=B7=B2=E5=AE=89=E8=A3=85=20?= =?UTF-8?q?0.4.2=20=E7=89=88=E6=9C=AC=E6=BA=90=E7=A0=81=E9=87=8D=E5=BB=BA?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=A0=91=EF=BC=88=E9=A1=B6=E9=83=A8=E4=BC=9A?= =?UTF-8?q?=E8=AF=9D=E6=A0=87=E7=AD=BE=E6=9D=A1=20/=20=E5=BF=AB=E5=88=87?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=20/=20=E5=88=86=E6=94=AF=E8=A7=86=E5=9B=BE?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 仓库 HEAD(942babe, package 版本仍是 0.1.0) 只有侧栏分组浏览器,缺少用户 实际运行的 0.4.2 构建中的会话标签条等模块。本次以 profiles/desktop 中已安装的 @dsh-xhl/workspace-groups@0.4.2 的 lib/client.js.map(内联 sourcesContent)为准重建完整 client 源码树, 并补齐宿主侧 host-tabs.ts 与 /workspace-groups/tabs 路由。 重建结果与安装构建逐字节对齐: - 宿主产物 lib/index.js 与安装版 diff 行数 0 - 客户端产物 lib/client.js 仅 1 行差异(CSS 虚拟模块内联的绝对路径) - lib/types 下 27 个 .d.ts 与安装版完全一致 相对仓库 HEAD 新增:SessionTabs / QuickPanel / FlowerBranch / open-folder / subagent-lineage / store-hook / tab-* 模块,tsdown 平台外置模块补充 @deepseek-ai/dsh-client-store,package 版本对齐 0.4.2。 --- cordis.patch.yml | 8 +- lib/client.js | 2225 +++++++++++++-- lib/client.js.map | 2 +- lib/index.js | 224 +- lib/types/client/FlowerBranch.d.ts | 23 + lib/types/client/GroupsBrowser.d.ts | 2 +- lib/types/client/QuickPanel.d.ts | 38 + lib/types/client/SessionTabs.d.ts | 7 + lib/types/client/branch.d.ts | 140 + lib/types/client/contract.d.ts | 95 +- lib/types/client/index.d.ts | 63 +- lib/types/client/locales.d.ts | 2 +- lib/types/client/open-folder.d.ts | 34 + lib/types/client/quick.d.ts | 74 + lib/types/client/rows.d.ts | 21 +- lib/types/client/store-hook.d.ts | 7 + lib/types/client/stores.d.ts | 2 +- lib/types/client/subagent-lineage.d.ts | 27 + lib/types/client/tab-persist.d.ts | 41 + lib/types/client/tab-seat.d.ts | 56 + lib/types/client/tab-store.d.ts | 79 + lib/types/client/tabs.d.ts | 227 ++ lib/types/client/tree.d.ts | 32 +- lib/types/core/types.d.ts | 2 +- lib/types/host-tabs.d.ts | 54 + lib/types/index.d.ts | 2 +- package.json | 75 +- pnpm-lock.yaml | 3424 ++++++++++-------------- src/client/FlowerBranch.tsx | 264 ++ src/client/GroupsBrowser.tsx | 268 +- src/client/QuickPanel.tsx | 353 +++ src/client/SessionTabs.tsx | 191 ++ src/client/branch.ts | 340 +++ src/client/contract.ts | 180 +- src/client/index.ts | 210 +- src/client/locales.ts | 51 + src/client/open-folder.ts | 79 + src/client/quick.ts | 186 ++ src/client/rows.tsx | 112 +- src/client/store-hook.ts | 86 + src/client/stores.ts | 2 +- src/client/styles.css | 967 +++++-- src/client/subagent-lineage.ts | 50 + src/client/tab-persist.ts | 84 + src/client/tab-seat.ts | 180 ++ src/client/tab-store.ts | 101 + src/client/tabs.ts | 339 +++ src/client/tree.ts | 107 +- src/core/types.ts | 2 +- src/host-config.ts | 2 +- src/host-manual.ts | 2 +- src/host-tabs.ts | 148 + src/index.ts | 102 +- tsdown.config.ts | 9 +- 54 files changed, 8724 insertions(+), 2677 deletions(-) create mode 100644 lib/types/client/FlowerBranch.d.ts create mode 100644 lib/types/client/QuickPanel.d.ts create mode 100644 lib/types/client/SessionTabs.d.ts create mode 100644 lib/types/client/branch.d.ts create mode 100644 lib/types/client/open-folder.d.ts create mode 100644 lib/types/client/quick.d.ts create mode 100644 lib/types/client/store-hook.d.ts create mode 100644 lib/types/client/subagent-lineage.d.ts create mode 100644 lib/types/client/tab-persist.d.ts create mode 100644 lib/types/client/tab-seat.d.ts create mode 100644 lib/types/client/tab-store.d.ts create mode 100644 lib/types/client/tabs.d.ts create mode 100644 lib/types/host-tabs.d.ts create mode 100644 src/client/FlowerBranch.tsx create mode 100644 src/client/QuickPanel.tsx create mode 100644 src/client/SessionTabs.tsx create mode 100644 src/client/branch.ts create mode 100644 src/client/open-folder.ts create mode 100644 src/client/quick.ts create mode 100644 src/client/store-hook.ts create mode 100644 src/client/subagent-lineage.ts create mode 100644 src/client/tab-persist.ts create mode 100644 src/client/tab-seat.ts create mode 100644 src/client/tab-store.ts create mode 100644 src/client/tabs.ts create mode 100644 src/host-tabs.ts diff --git a/cordis.patch.yml b/cordis.patch.yml index ececa46..df8998b 100644 --- a/cordis.patch.yml +++ b/cordis.patch.yml @@ -1,12 +1,12 @@ -# dsh-workspace-groups bundle patch +# @dsh-xhl/workspace-groups bundle patch # # This file is the `dsh.bundle.patch` layer of the package: when the plugin is # installed through the official CLI — # -# dsh plugin --profile add dsh-workspace-groups +# dsh plugin --profile add @dsh-xhl/workspace-groups # # — the command reconciles `dsh.profile.bundles` against installed packages -# and, seeing this declaration, appends `dsh-workspace-groups` to the bundle +# and, seeing this declaration, appends `@dsh-xhl/workspace-groups` to the bundle # stack. The profile boot then merges THIS patch (a single `insert` of the # plugin row) exactly like a manual cordis.patch.yml mount line. # @@ -14,5 +14,5 @@ # host Loader resolves as a package, and a `config` the host half consumes. - insert: - id: workspace-groups - name: 'dsh-workspace-groups' + name: '@dsh-xhl/workspace-groups' config: {} diff --git a/lib/client.js b/lib/client.js index 3094177..69d2556 100644 --- a/lib/client.js +++ b/lib/client.js @@ -1,13 +1,14 @@ window.__ModuleLoader__.load({ - id: "dsh-workspace-groups", + id: "@dsh-xhl/workspace-groups", factory: (require) => { var module = { exports: {} }; var exports = module.exports; Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); - let _deepseek_ai_dsh_client_runtime_client = require("@deepseek-ai/dsh-client-runtime/client"); + let _deepseek_ai_dsh_client_store = require("@deepseek-ai/dsh-client-store"); let react = require("react"); let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives"); let react_jsx_runtime = require("react/jsx-runtime"); + let react_dom = require("react-dom"); //#region src/client/store-core.ts /** Collapse writes `false` (key retained); expand writes `true`. */ function setCategoryExpandedImpl(state, key, expanded) { @@ -41,7 +42,7 @@ window.__ModuleLoader__.load({ * @returns the store handle (spec + type + identity + factory in one). */ function createGroupsViewStore() { - return (0, _deepseek_ai_dsh_client_runtime_client.defineStore)({ + return (0, _deepseek_ai_dsh_client_store.defineStore)({ init: () => ({ categoryExpansion: {}, workspaceExpansion: {} @@ -55,6 +56,401 @@ window.__ModuleLoader__.load({ }); } //#endregion + //#region src/client/tabs.ts + /** + * Add a session to the strip, or leave an existing entry exactly where it is. + * + * Arrival order is the strip's only order, so re-opening a session that already + * has a tab is a NO-OP: the tab keeps its position and its arrival key. Moving + * it to the front here would fight the whole point of stable positions — a user + * clicking through sessions would watch the strip reshuffle on every click. + * + * @param tabs - current strip (oldest first). + * @param sessionId - arriving session. + * @param nextOrder - monotonic arrival counter to spend when appending. + * @returns the strip, unchanged (same array) when the session already has a tab. + */ + function appendTab(tabs, sessionId, nextOrder) { + if (tabs.find((tab) => tab.sessionId === sessionId) !== void 0) return tabs; + return [...tabs, { + sessionId, + order: nextOrder + }]; + } + /** + * Remove one session's tab. An absent session leaves the strip untouched. + * @param tabs - current strip. + * @param sessionId - session whose tab closes. + * @returns a new strip. + */ + function removeTab(tabs, sessionId) { + return tabs.filter((tab) => tab.sessionId !== sessionId); + } + /** + * Order the strip for display: strictly by arrival, regardless of which tab is + * active. + * + * Position is a property of the TAB, not of the selection. Switching to a tab + * must not move it — an earlier version pulled the active tab to the front, + * which made every click reshuffle the strip and slid the chip out from under + * the pointer that had just clicked it. + * + * `activeId` is therefore accepted only to document that "active" deliberately + * does NOT participate in ordering; it is unused. The returned array is a copy + * so callers cannot mutate the store's state through it. + * + * @param tabs - strip in arrival order. + * @param activeId - the open session, if it has a tab (intentionally unused). + * @returns a new array in arrival order. + */ + function orderedTabs(tabs, activeId) { + return [...tabs]; + } + /** + * Whether the open session must surface a tab. + * + * A tab means "this conversation is in play right now", not "I once opened + * this". Browsing history is what the sidebar is for; opening an old + * conversation to read it should not litter the strip, which is the whole point + * of the strip being a working set rather than a second session list. + * + * A session therefore earns a tab only once a conversation has actually STARTED + * in it and is still engaged, which is any of: + * - **running** — the agent is producing output (including subagents); + * - **waiting on you** — an approval / plan review / question is pending; + * - **unseen completion** — it finished while you were elsewhere, so the tab is + * the thing that tells you to come back. + * + * A still-blank draft gets NO tab: the tab appears the moment the first message + * is sent (which is when the controller flips `blank` on `turn/start`). Once the + * turn ends and you have read the result, the session is settled history and + * does not earn a tab — so clicking through finished conversations leaves the + * strip alone. Tabs already opened stay open: this gate only decides whether a + * NEW tab appears, never whether an existing one closes. + * + * `blank` (from `sessionListMetadata`) is exactly "no turn has started": the + * controller flips it to false on `turn/start`. It is the right signal for + * "has this conversation begun", and the wrong one ALONE — a conversation + * finished a week ago is also non-blank, which is why the earlier `!blank` rule + * surfaced every old conversation the user clicked. + * + * @param mode - feature switch ('auto' applies the engagement rule). + * @param summary - the session's catalog row (absent while the catalog has not + * caught up with a just-created session). + * @param status - the session's unified UI status (absent → no live signal). + * @returns true when a tab belongs in the strip. + */ + function shouldOpenTab(mode, summary, status) { + if (mode === "manual") return false; + if (summary === void 0) return false; + if (summary.blank) return false; + if (summary.running) return true; + if (status?.running === true) return true; + if (status?.pendingInteraction !== void 0) return true; + if (status?.completionUnread === true) return true; + return false; + } + /** + * Derive one tab's indicators from the catalog row and the unified UI status. + * @param summary - the tab session's catalog row (absent → inert indicators). + * @param status - the tab session's unified UI status (absent → idle). + * @returns the indicator quadruple. + */ + function tabIndicator(summary, status) { + const pending = status?.pendingInteraction !== void 0; + const running = status?.running === true || summary?.running === true; + const unread = status?.completionUnread === true; + const blank = summary?.blank !== false; + return { + attention: pending, + running, + unread, + settled: !pending && !running && !unread && summary !== void 0 && !blank + }; + } + /** + * Index sessions by the project that owns them. + * + * Membership comes from the workspace registry (`sessionIds`), which is the same + * authority the sidebar tree uses — a tab and its sidebar row therefore agree on + * the project without a second derivation. + * + * Built once per render pass rather than scanned per tab: a strip of N tabs over + * M projects is O(N×M) with a naive `find` per tab. + * + * @param workspaces - workspace views from the controller snapshot. + * @returns a session id → project map; sessions in no workspace are absent. + */ + function projectIndex(workspaces) { + const index = /* @__PURE__ */ new Map(); + for (const workspace of workspaces) { + const label = projectLabel(workspace); + const project = { + workspaceId: workspace.workspaceId, + label, + path: workspace.path + }; + for (const sessionId of workspace.sessionIds) if (!index.has(sessionId)) index.set(sessionId, project); + } + return index; + } + /** + * Display label for a project: its title, else the directory basename. + * @param workspace - workspace view. + * @returns a non-empty label, falling back to the raw path. + */ + function projectLabel(workspace) { + const title = workspace.title.trim(); + if (title !== "") return title; + const parts = workspace.path.split(/[\\/]/).filter((part) => part !== ""); + return parts[parts.length - 1] ?? workspace.path; + } + /** + * Store transform: add the open session, or leave its existing tab in place. + * + * Live here rather than in `tab-store.ts` so unit tests can exercise the real + * semantics without importing `@deepseek-ai/dsh-client-store` (which pulls + * `zustand` into the test process). The store module binds these into its + * actions table. + * + * The no-op guard matters: this runs on EVERY catalog change for the open + * session, so an unguarded write would wake the strip and spend arrival keys on + * every projection tick. + * + * @param state - store draft, mutated in place. + * @param sessionId - the session that just became open. + */ + function touchTabImpl(state, sessionId) { + const next = appendTab(state.tabs, sessionId, state.order + 1); + if (next === state.tabs) return; + state.order += 1; + state.tabs = next; + } + /** + * Store transform: close one tab. Closing a session that has no tab is not a + * state change, so it writes nothing. + * @param state - store draft, mutated in place. + * @param sessionId - the tab to close. + */ + function closeTabImpl(state, sessionId) { + const next = removeTab(state.tabs, sessionId); + if (next.length === state.tabs.length) return; + state.tabs = next; + } + /** + * Store transform: adopt tabs loaded from the host, MERGING with whatever is + * already in the strip. + * + * Async by nature (the host read is a `fetch`), so it can land after the browser + * has already opened a tab for the current session. Merging — rather than + * "ignore the read if the strip is non-empty" — is what makes a restart safe: + * the tab opened during startup survives AND the stored tabs still come back. + * (Bailing on a non-empty strip would silently drop every stored tab whenever + * the startup tab won the race, which is the common case for a session that is + * running or unread.) + * + * The arrival counter is lifted above every restored key so a tab opened later + * cannot reuse one; a reused key makes React move a chip's DOM node instead of + * reconciling it. + * + * @param state - store draft, mutated in place. + * @param tabs - tabs read from the host, oldest first. + */ + function restoreTabsImpl(state, tabs) { + if (tabs.length === 0) return; + const present = new Set(state.tabs.map((tab) => tab.sessionId)); + const additions = []; + let order = state.order; + for (const tab of tabs) { + if (present.has(tab.sessionId)) continue; + present.add(tab.sessionId); + order += 1; + additions.push({ + sessionId: tab.sessionId, + order + }); + } + if (additions.length > 0) state.tabs = [...state.tabs, ...additions]; + state.order = order; + } + //#endregion + //#region src/client/tab-store.ts + /** + * The session-tab store: the `defineStore` binding and nothing else. + * + * The action TRANSFORMS live in `tabs.ts` (pure, runtime-free), so unit tests + * exercise the real semantics without pulling in the store engine — this module + * is the only place that needs `@deepseek-ai/dsh-client-store`, and importing it + * from a test would drag `zustand` into the test process. + * + * One handle, one scope: the tab store is seated by the `sidebar.workspaces` + * entry alone. The tab strip is a CHILD of that entry (rendered through a DOM + * portal into the conversation column), not a second slot registration, so the + * handle is never mounted under a second, differently-scoped slot — which the + * registry rejects outright ("one handle, one scope"). + * + * Placement is navigation, not data: the strip derives its active chip from the + * open session, and arrival order is the strip's only order, so nothing here + * mirrors selection. + */ + /** + * Create the session-tab store handle. + * + * The strip starts EMPTY and is hydrated by the caller through the `restore` + * action: persistence lives on the host behind a `fetch`, which cannot run + * during `init()`. Browser storage is deliberately not used — the origin + * includes the port, and every launch picks a new one, so `localStorage` and + * `sessionStorage` both start empty on the next start. + * + * @returns the store handle (spec + type + identity + factory in one). + */ + function createSessionTabsStore() { + return (0, _deepseek_ai_dsh_client_store.defineStore)({ + init: () => ({ + tabs: [], + order: 0 + }), + actions: { + touch: touchTabImpl, + close: closeTabImpl, + restore: restoreTabsImpl + } + }); + } + //#endregion + //#region src/client/tab-persist.ts + /** + * Client side of the session-tab persistence, talking to + * `GET|PUT /workspace-groups/tabs` on the host. + * + * Why not browser storage: **the origin includes the PORT**, and every `dsh web` + * / `dsh test` / desktop launch picks a different one. `localStorage` and + * `sessionStorage` are both scoped to the origin, so they start empty on the + * next launch — a tab list kept there survives a reload only when the port + * happens to match. The host's JSON sidecar has no such problem, which is why + * the strip is stored there and read back verbatim. + * + * There is deliberately no per-browser-session marker. A marker has to live in + * browser storage, which the port invalidates, so every restart looked like a + * fresh session and silently discarded the user's tabs — the exact failure this + * module exists to prevent. + * + * Every call is best-effort: a failed read means "no tabs" and a failed write is + * swallowed, because the strip is a convenience and must never break the app. + */ + /** Host route holding the strip. */ + const TABS_ROUTE = "/workspace-groups/tabs"; + /** + * Fetch the stored strip. + * @param fetchImpl - fetch implementation (injectable for tests). + * @returns the tabs, oldest first; empty on any failure. + */ + async function loadTabs(fetchImpl = fetch) { + try { + const response = await fetchImpl(TABS_ROUTE, { + method: "GET", + cache: "no-store" + }); + if (!response.ok) return []; + const body = await response.json(); + if (typeof body !== "object" || body === null) return []; + const list = body.tabs; + if (!Array.isArray(list)) return []; + const tabs = []; + for (const entry of list) { + if (typeof entry !== "object" || entry === null) continue; + const row = entry; + if (typeof row.sessionId !== "string" || row.sessionId === "") continue; + if (typeof row.order !== "number" || !Number.isFinite(row.order)) continue; + tabs.push({ + sessionId: row.sessionId, + order: row.order + }); + } + return tabs; + } catch { + return []; + } + } + /** + * Store the strip. Failures are swallowed. + * @param state - the client's current strip and its arrival counter. + * @param fetchImpl - fetch implementation (injectable for tests). + */ + async function saveTabs(state, fetchImpl = fetch) { + try { + await fetchImpl(TABS_ROUTE, { + method: "PUT", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ + order: state.order, + tabs: state.tabs + }), + cache: "no-store", + keepalive: true + }); + } catch {} + } + //#endregion + //#region src/client/store-hook.ts + /** + * A framework-shaped selector hook over a store instance. + * + * The renderer builds this hook for slot seats (`bindSnapshotSelector` in + * ui-renderer, wrapping React's `useSyncExternalStoreWithSelector`), but the tab + * strip is NOT a slot occupant: it renders through a DOM seat as a child of this + * plugin's own `sidebar.workspaces` occupant, so it receives its store face as a + * plain prop and needs the equivalent binding here. + * + * The implementation mirrors React's `useSyncExternalStoreWithSelector` without + * depending on the `use-sync-external-store` package (it is not resolvable from + * this plugin). The two behaviours that matter: + * + * - identity-stable subscribe/getSnapshot closures, so the strip never + * resubscribes across renders; + * - a memoized selection: the selector re-runs only when the state reference + * changes, and an equal result (by `eq`, defaulting to `Object.is`) returns + * the PREVIOUS reference, so a selector allocating a fresh array or object + * does not spin the render loop. + * + * The hook must be called unconditionally (Rules of Hooks). + */ + /** + * Build a selector hook bound to one store instance. + * @param instance - the live store instance (snapshot source). + * @returns a `SnapshotSelectorHook`-compatible hook over that instance. + */ + function createStoreHook(instance) { + const subscribe = (onChange) => instance.subscribe(onChange); + const getState = () => instance.getSnapshot(); + return function useSelector(selector, eq) { + const memory = (0, react.useRef)(null); + const getSelection = (0, react.useCallback)(() => { + const state = getState(); + const previous = memory.current; + if (previous !== null && previous.hasValue && Object.is(previous.state, state)) return previous.value; + const value = selector(state); + if (previous !== null && previous.hasValue) { + if (eq !== void 0 ? eq(previous.value, value) : Object.is(previous.value, value)) { + memory.current = { + state, + value: previous.value, + hasValue: true + }; + return previous.value; + } + } + memory.current = { + state, + value, + hasValue: true + }; + return value; + }, [selector, eq]); + return (0, react.useSyncExternalStore)(subscribe, getSelection, getSelection); + }; + } + //#endregion //#region src/core/types.ts /** * Legacy label of the fallback bucket. The top-level (ungrouped) concept @@ -216,13 +612,57 @@ window.__ModuleLoader__.load({ return rest; } //#endregion + //#region src/client/subagent-lineage.ts + /** + * Index uninterrupted subagent descendants under each ancestor. + * @param summaries - Session summaries keyed by id. + * @returns descendant totals keyed by possible parent id. + */ + function indexSubagentDescendants(summaries) { + const indexed = /* @__PURE__ */ new Map(); + for (const descendant of Object.values(summaries)) { + if (descendant.origin !== "subagent") continue; + const seen = /* @__PURE__ */ new Set(); + let current = descendant; + while (current?.origin === "subagent" && current.parentId !== void 0 && !seen.has(current.id)) { + seen.add(current.id); + const aggregate = indexed.get(current.parentId); + if (aggregate === void 0) indexed.set(current.parentId, { + count: 1, + runningCount: descendant.running ? 1 : 0 + }); + else { + aggregate.count += 1; + if (descendant.running) aggregate.runningCount += 1; + } + current = summaries[current.parentId]; + } + } + return indexed; + } + //#endregion //#region src/client/tree.ts /** - * Derives the three-level workspace-groups tree: 分类文件夹 → 项目文件夹 → - * 会话行. Pure derivation — all inputs are snapshots; the renderer never - * scans. Session visibility rules mirror the official ui-workspace tree - * (blank rows only when current, archived excluded, subagent rows excluded). + * The Session the Conversation is currently showing. + * + * 0.1.6 removed `SessionListState.current`: selection is expressed as the + * Session retained through the `mainView` reference source (the ui-workspace + * navigation holds exactly one). Same read the official browser performs. + * @param list - sessions list snapshot. + * @returns the retained Session id, or undefined while no Session is selected. */ + function currentSessionId(list) { + return Object.values(list.byId).find((session) => (session.retainedBy?.mainView ?? 0) > 0)?.id; + } + /** Keep navigation presentation independent from domain-owned interaction objects. */ + function visiblePendingKind(kind) { + switch (kind) { + case "approval": + case "plan-review": + case "question": return kind; + default: return; + } + } /** Key of the uncategorized bucket (matches the config fallback label). */ const UNCATEGORIZED_KEY = UNCATEGORIZED_LABEL; /** Directory display label: basename of the path (both separators accepted). */ @@ -239,26 +679,28 @@ window.__ModuleLoader__.load({ function sessionTitle(session) { return session.blank ? "New Session" : session.displayTitle; } - function sessionNode(s, descendants) { + function sessionNode(s, descendants, statuses) { + const status = typeof statuses?.get === "function" ? statuses.get(s.id) : statuses[s.id]; + const pending = visiblePendingKind(status?.pendingInteraction?.kind); return { id: s.id, title: sessionTitle(s), blank: s.blank, - running: s.running, + running: status?.running ?? s.running, runningSubagentCount: descendants.get(s.id)?.runningCount ?? 0, - completed: s.completed === true, + completed: status?.completionUnread === true, updatedAt: s.updatedAt, - ...s.pendingInteraction === void 0 ? {} : { pendingInteraction: s.pendingInteraction } + ...pending === void 0 ? {} : { pendingInteraction: pending } }; } /** Visible sessions of one workspace in its stored account order. */ - function workspaceSessions(list, workspace, archived, descendants) { + function workspaceSessions(list, workspace, archived, descendants, statuses, current) { const nodes = []; for (const id of workspace.sessionIds) { const summary = list.byId[id]; if (summary === void 0) continue; - if (!sessionVisible(summary, list.current, archived)) continue; - nodes.push(sessionNode(summary, descendants)); + if (!sessionVisible(summary, current, archived)) continue; + nodes.push(sessionNode(summary, descendants, statuses)); } return nodes; } @@ -271,15 +713,18 @@ window.__ModuleLoader__.load({ * @param view - local expansion arrays. * @param manual - runtime overlay (manual groups + overrides). A workspace's * manual override wins over rule classification; removing it reverts to rules. + * @param statuses - unified UI status by Session (drives the running / warning + * / unread-completion row indicators); defaults to none (tests). * @returns category sections in render order (rule categories first, then * manual-only ones, uncategorized last). Manual groups render even while * empty; empty rule buckets stay hidden. */ - function deriveGroups(list, workspaces, archivedSessionIds, config, view, manual) { + function deriveGroups(list, workspaces, archivedSessionIds, config, view, manual, statuses = /* @__PURE__ */ new Map()) { const archived = new Set(archivedSessionIds); const expandedCategories = new Set(view.expandedCategories); const expandedWorkspaces = new Set(view.expandedWorkspaces); - const descendants = (0, _deepseek_ai_dsh_client_runtime_client.indexSubagentDescendants)(list.byId); + const descendants = indexSubagentDescendants(list.byId); + const current = currentSessionId(list); const byCategory = /* @__PURE__ */ new Map(); for (const { key } of effectiveCategories(config, manual)) byCategory.set(key, []); for (const workspace of workspaces) { @@ -289,7 +734,7 @@ window.__ModuleLoader__.load({ byCategory.get(key).push(workspace); } const manualCategories = new Set(manual.categories); - const currentWorkspaceId = list.current === void 0 ? void 0 : workspaces.find((w) => w.sessionIds.includes(list.current))?.workspaceId; + const currentWorkspaceId = current === void 0 ? void 0 : workspaces.find((w) => w.sessionIds.includes(current))?.workspaceId; const nodes = []; for (const key of effectiveCategories(config, manual).map((e) => e.key)) { const bucket = byCategory.get(key) ?? []; @@ -301,7 +746,7 @@ window.__ModuleLoader__.load({ for (const workspaceId of ordered) { const workspace = bucket.find((w) => w.workspaceId === workspaceId); if (workspace === void 0) continue; - const sessions = workspaceSessions(list, workspace, archived, descendants); + const sessions = workspaceSessions(list, workspace, archived, descendants, statuses, current); const wsExpanded = expandedWorkspaces.has(workspace.workspaceId); const wsContainsCurrent = workspace.workspaceId === currentWorkspaceId; if (wsContainsCurrent) containsCurrent = true; @@ -333,18 +778,19 @@ window.__ModuleLoader__.load({ * folder), in manual top-level order (`workspaceOrder[TOP_LEVEL_ORDER_KEY]`), * falling back to host registration order. */ - function deriveTopLevel(list, workspaces, archivedSessionIds, config, view, manual) { + function deriveTopLevel(list, workspaces, archivedSessionIds, config, view, manual, statuses = /* @__PURE__ */ new Map()) { const archived = new Set(archivedSessionIds); const expandedWorkspaces = new Set(view.expandedWorkspaces); - const descendants = (0, _deepseek_ai_dsh_client_runtime_client.indexSubagentDescendants)(list.byId); - const currentWorkspaceId = list.current === void 0 ? void 0 : workspaces.find((w) => w.sessionIds.includes(list.current))?.workspaceId; + const descendants = indexSubagentDescendants(list.byId); + const current = currentSessionId(list); + const currentWorkspaceId = current === void 0 ? void 0 : workspaces.find((w) => w.sessionIds.includes(current))?.workspaceId; const topLevelIds = workspaces.filter((w) => resolveCategory(config, manual, w.workspaceId, w.path, w.title) === void 0).map((w) => w.workspaceId); const ordered = orderedWorkspaceIds(manual, TOP_LEVEL_ORDER_KEY, topLevelIds); const nodes = []; for (const workspaceId of ordered) { const workspace = workspaces.find((w) => w.workspaceId === workspaceId); if (workspace === void 0) continue; - const sessions = workspaceSessions(list, workspace, archived, descendants); + const sessions = workspaceSessions(list, workspace, archived, descendants, statuses, current); const wsExpanded = expandedWorkspaces.has(workspaceId); nodes.push({ workspaceId: workspace.workspaceId, @@ -377,14 +823,15 @@ window.__ModuleLoader__.load({ hasMore: false }; const archived = new Set(archivedSessionIds); - (0, _deepseek_ai_dsh_client_runtime_client.indexSubagentDescendants)(list.byId); + indexSubagentDescendants(list.byId); + const current = currentSessionId(list); const workspaceBySession = /* @__PURE__ */ new Map(); for (const workspace of workspaces) for (const sessionId of workspace.sessionIds) if (!workspaceBySession.has(sessionId)) workspaceBySession.set(sessionId, workspace); const labelOf = (summary) => workspaceBySession.get(summary.id)?.title ?? workspaceLabel(summary.cwd); const local = []; for (const id of list.ids) { const summary = list.byId[id]; - if (summary === void 0 || summary.blank || !sessionVisible(summary, list.current, archived)) continue; + if (summary === void 0 || summary.blank || !sessionVisible(summary, current, archived)) continue; if (sessionTitle(summary).toLowerCase().includes(q) || labelOf(summary).toLowerCase().includes(q)) local.push(summary); } local.sort(byRecency); @@ -398,7 +845,7 @@ window.__ModuleLoader__.load({ for (const summary of local) include(summary); for (const item of content.items) { const summary = list.byId[item.sessionId]; - if (summary !== void 0 && !summary.blank && sessionVisible(summary, list.current, archived)) include(summary); + if (summary !== void 0 && !summary.blank && sessionVisible(summary, current, archived)) include(summary); } const snippets = /* @__PURE__ */ new Map(); for (const item of content.items) if (item.snippet !== void 0) snippets.set(item.sessionId, item.snippet); @@ -426,12 +873,15 @@ window.__ModuleLoader__.load({ * @param archivedSessionIds - registry-global archive set. * @param manual - runtime overlay (manual groups + overrides). * @param snippetsBySession - optional content-match snippets keyed by session id. + * @param statuses - unified UI status by Session (drives the running / warning + * / unread-completion row indicators); defaults to none (tests). * @returns group folders in render order plus top-level matched workspaces, * pruned to matched branches only. */ - function deriveSearchGroups(list, workspaces, config, matchedIds, archivedSessionIds, manual, snippetsBySession) { + function deriveSearchGroups(list, workspaces, config, matchedIds, archivedSessionIds, manual, snippetsBySession, statuses = /* @__PURE__ */ new Map()) { const archived = new Set(archivedSessionIds); - const descendants = (0, _deepseek_ai_dsh_client_runtime_client.indexSubagentDescendants)(list.byId); + const descendants = indexSubagentDescendants(list.byId); + const current = currentSessionId(list); const byCategory = /* @__PURE__ */ new Map(); for (const key of effectiveCategories(config, manual).map((e) => e.key)) byCategory.set(key, []); const topLevel = []; @@ -440,8 +890,8 @@ window.__ModuleLoader__.load({ for (const id of workspace.sessionIds) { const summary = list.byId[id]; if (summary === void 0 || !matchedIds.has(id)) continue; - if (!sessionVisible(summary, list.current, archived)) continue; - const node = sessionNode(summary, descendants); + if (!sessionVisible(summary, current, archived)) continue; + const node = sessionNode(summary, descendants, statuses); const snippet = snippetsBySession?.get(id); nodes.push({ ...node, @@ -549,6 +999,8 @@ window.__ModuleLoader__.load({ "aria-expanded": node.expanded, "aria-label": t("section.workspaces"), "data-wg-category": node.key, + "data-wg-branch-row": "", + "data-wg-branch-group": "", draggable: onDragStartCategory !== void 0, onClick: onToggle, onDragStart: onDragStartCategory, @@ -558,12 +1010,12 @@ window.__ModuleLoader__.load({ children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: `wgChevron${node.expanded ? " wgChevronOpen" : ""}`, - children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconTriangleRightFill14, {}) + children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconTriangleRightFillMedium, {}) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: "wgCategoryIcon", "data-wg-row-icon": "group", - children: node.expanded ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconFolderOpen16, {}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconFolderClose16, {}) + children: node.expanded ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconFolderOpenMedium, {}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconFolderCloseMedium, {}) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: "wgCategoryLabel", @@ -583,11 +1035,11 @@ window.__ModuleLoader__.load({ items: [{ id: "rename", label: t("group.rename"), - icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconEditOutline16, {}) + icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconEditOutlineRegular, {}) }, { id: "delete", label: t("group.delete"), - icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconTrashOutline16, {}), + icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconTrashOutlineRegular, {}), danger: true }], onSelect: (id) => { @@ -606,7 +1058,7 @@ window.__ModuleLoader__.load({ e.stopPropagation(); setMenuOpen((v) => !v); }, - children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconEllipsisOutline16, {}) + children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconEllipsisOutlineRegular, {}) }) }) }) @@ -614,23 +1066,28 @@ window.__ModuleLoader__.load({ }); } /** One workspace folder row inside a category: draggable source + drop target. */ - function WorkspaceRow({ node, t, onToggle, onNewSession, onRename, onDelete, canMoveOut = false, onMoveOut, flat = false, dropActive = false, insertLine, onRowDragOver, onRowDragLeave, onRowDrop, onDragStartExtra }) { + function WorkspaceRow({ node, t, onToggle, onNewSession, onRename, onDelete, canMoveOut = false, onMoveOut, onOpenInFolder, flat = false, dropActive = false, insertLine, onRowDragOver, onRowDragLeave, onRowDrop, onDragStartExtra }) { const [menuOpen, setMenuOpen] = (0, react.useState)(false); const menuItems = [ + ...onOpenInFolder !== void 0 ? [{ + id: "openInFolder", + label: t("workspace.openInFolder"), + icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconFolderOpenOutlineRegular, { size: 16 }) + }] : [], ...canMoveOut && onMoveOut !== void 0 ? [{ id: "moveOut", label: t("workspace.moveOutOfGroup"), - icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconFolderOpenOutline16, { size: 16 }) + icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconRightUpOutlineRegular, { size: 16 }) }] : [], { id: "rename", label: t("workspace.rename"), - icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconEditOutline16, {}) + icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconEditOutlineRegular, {}) }, { id: "delete", label: t("workspace.delete"), - icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconTrashOutline16, {}), + icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconTrashOutlineRegular, {}), danger: true } ]; @@ -644,6 +1101,8 @@ window.__ModuleLoader__.load({ role: "treeitem", "aria-expanded": node.expanded, "data-wsid": node.workspaceId, + "data-wg-branch-row": "", + "data-wg-branch-group": "", draggable: true, onClick: onToggle, onDragStart, @@ -653,12 +1112,12 @@ window.__ModuleLoader__.load({ children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: `wgChevron${node.expanded ? " wgChevronOpen" : ""}`, - children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconTriangleRightFill14, {}) + children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconTriangleRightFillMedium, {}) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: "wgCategoryIcon", "data-wg-row-icon": "project", - children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconProjectAddOutline16, {}) + children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconProjectAddOutlineRegular, {}) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: "wgProjectLabel", @@ -675,6 +1134,7 @@ window.__ModuleLoader__.load({ items: menuItems, onSelect: (id) => { setMenuOpen(false); + if (id === "openInFolder") onOpenInFolder?.(); if (id === "moveOut") onMoveOut?.(); if (id === "rename") onRename(); if (id === "delete") onDelete(); @@ -690,7 +1150,7 @@ window.__ModuleLoader__.load({ e.stopPropagation(); setMenuOpen((v) => !v); }, - children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconEllipsisOutline16, {}) + children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconEllipsisOutlineRegular, {}) }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", @@ -701,44 +1161,62 @@ window.__ModuleLoader__.load({ e.stopPropagation(); onNewSession(); }, - children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconPlusOutline16, {}) + children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconPlusOutlineRegular, {}) })] }) ] }); } + /** + * Children container for one folder's rows. + * + * Keeps the tree's `role="group"` semantics and gives the rows a single + * positioned ancestor. It used to draw a per-folder guide rail; that is now the + * flower branch's job (one continuous stem for the whole tree, see + * `FlowerBranch.tsx`), so this is structure only. + */ + function TreeChildren({ children }) { + return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { + className: "wgTreeChildren", + role: "group", + children + }); + } /** One session leaf row. */ function SessionRow({ node, currentId, now, t, onOpen, onRename, onFork, onArchive }) { const selected = node.id === currentId; const [menuOpen, setMenuOpen] = (0, react.useState)(false); + const showStatus = !selected; const menuItems = [ { id: "rename", label: t("session.rename"), - icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconEditOutline16, {}) + icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconEditOutlineRegular, {}) }, { id: "fork", label: t("session.fork"), - icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconBranchOutline16, {}) + icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconBranchOutlineRegular, {}) }, { id: "archive", label: t("session.archive"), - icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconArchiveOutline20, { size: 16 }) + icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconArchiveOutlineRegular, { size: 16 }) } ]; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: `wgSessionRow${selected ? " wgSelected" : ""}${node.matched === true ? " wgMatched" : ""}`, role: "treeitem", "aria-selected": selected, + "data-wg-branch-row": "", + ...selected ? { "data-wg-branch-active": "" } : {}, onClick: () => { onOpen(node.id); }, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: "wgStatusSlot", - children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state: sessionDotState(node) }) + children: showStatus && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state: sessionDotState(node) }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: "wgSessionTitle", @@ -777,7 +1255,7 @@ window.__ModuleLoader__.load({ e.stopPropagation(); setMenuOpen((v) => !v); }, - children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconEllipsisOutline16, {}) + children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconEllipsisOutlineRegular, {}) }) }) }) @@ -785,8 +1263,1186 @@ window.__ModuleLoader__.load({ }); } //#endregion - //#region \0dsh-workspace-groups-inline-css:/Users/zcol/Project/DSH-工作区分组/src/client/styles.css.mjs - var styles_css_default = ".wgRoot{box-sizing:border-box;flex-direction:column;flex:1;width:100%;min-height:0;display:flex;overflow:hidden}.wgSectionHeader{flex:none;align-items:center;gap:4px;height:36px;padding:0 12px;display:flex}.wgSectionLabel{text-overflow:ellipsis;white-space:nowrap;min-width:0;max-width:45%;color:var(--dsw-fg-1,inherit);flex:none;font-size:12px;font-weight:600;overflow:hidden}.wgIconButton{width:26px;height:26px;color:var(--dsw-fg-2,inherit);cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;padding:0;display:inline-flex}.wgIconButton:hover{background:var(--dsw-bg-hover,#7f7f7f1f);color:var(--dsw-fg-1,inherit)}.wgIconButton:disabled{opacity:.5;cursor:default}.wgSearch{flex:1;align-items:center;min-width:0;max-width:28px;margin-left:auto;transition:max-width .18s;display:flex}.wgSearchExpanded{max-width:100%}.wgSearchInput{min-width:0;color:var(--dsw-fg-1,inherit);background:0 0;border:none;outline:none;flex:1;padding:0;font-size:12px}.wgTreeBody{flex:1;min-height:0;padding:0 8px 8px;overflow-y:auto}.wgList{flex-direction:column;gap:1px;display:flex}.wgEmpty{text-align:center;color:var(--dsw-fg-3,#7f7f7fcc);padding:16px 8px;font-size:12px}.wgCategoryRow{cursor:pointer;user-select:none;border-radius:6px;align-items:center;gap:4px;height:28px;padding:0 4px;display:flex;position:relative}.wgCategoryRow:hover{background:var(--dsw-bg-hover,#7f7f7f1f)}.wgCategoryRow:hover .wgRowActions,.wgCategoryRow:focus-within .wgRowActions{opacity:1}.wgDropTarget{background:var(--dsw-bg-selected,#4a90d92e);outline:1px dashed var(--dsw-accent,#4a90d9);outline-offset:-1px}.wgInsertBefore:before,.wgInsertAfter:after{content:\"\";background:var(--dsw-accent,#4a90d9);height:2px;box-shadow:0 0 0 1px color-mix(in srgb, var(--dsw-accent,#4a90d9) 25%, transparent);pointer-events:none;z-index:6;border-radius:1px;position:absolute;left:2px;right:2px}.wgInsertBefore:before{top:-1px}.wgInsertAfter:after{bottom:-1px}.wgChevron{width:14px;height:14px;color:var(--dsw-fg-3,#7f7f7fcc);flex:none;justify-content:center;align-items:center;transition:transform .12s;display:inline-flex}.wgChevronOpen{transform:rotate(90deg)}.wgCategoryIcon{color:var(--dsw-fg-2,inherit);flex:none;justify-content:center;align-items:center;display:inline-flex}.wgCategoryLabel{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--dsw-fg-1,inherit);flex:1;font-size:12px;font-weight:600;overflow:hidden}.wgCategoryCount{color:var(--dsw-fg-3,#7f7f7fcc);flex:none;font-size:11px}.wgProjectRow{cursor:pointer;user-select:none;border-radius:6px;align-items:center;gap:4px;height:28px;padding:0 4px 0 20px;display:flex;position:relative}.wgProjectFlat{padding-left:4px}.wgTopLevelArea{margin-top:2px;padding-bottom:10px}.wgTopLevelEmpty{border-radius:4px;height:14px;position:relative}.wgTopLevelEmptyLine{background:var(--dsw-accent,#4a90d9);height:2px;box-shadow:0 0 0 1px color-mix(in srgb, var(--dsw-accent,#4a90d9) 25%, transparent);pointer-events:none;border-radius:1px;position:absolute;top:50%;left:2px;right:2px}.wgTopLevelEmptyActive{background:var(--dsw-bg-selected,#4a90d92e)}.wgProjectRow:hover{background:var(--dsw-bg-hover,#7f7f7f1f)}.wgProjectActive{color:var(--dsw-accent,#4a90d9)}.wgProjectLabel{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--dsw-fg-1,inherit);flex:1;font-size:12px;overflow:hidden}.wgRowActions{opacity:0;flex:none;align-items:center;gap:2px;display:inline-flex}.wgProjectRow:hover .wgRowActions,.wgProjectRow:focus-within .wgRowActions{opacity:1}.wgSessionRow{cursor:pointer;user-select:none;border-radius:6px;align-items:center;gap:6px;height:30px;padding:0 4px 0 40px;display:flex}.wgSessionRow:hover{background:var(--dsw-bg-hover,#7f7f7f1f)}.wgSessionRow:hover .wgRowActions,.wgSessionRow:focus-within .wgRowActions{opacity:1}.wgSelected{background:var(--dsw-bg-selected,#4a90d92e)}.wgStatusSlot{flex:none;justify-content:center;align-items:center;width:14px;height:14px;display:inline-flex}.wgSessionTitle{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--dsw-fg-1,inherit);flex:1;font-size:12px;overflow:hidden}.wgSessionTime{color:var(--dsw-fg-3,#7f7f7fcc);flex:none;font-size:11px}.wgVisuallyHidden{clip:rect(0 0 0 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.wgMatched{background:var(--dsw-bg-selected,#4a90d92e)}.wgSessionSnippet{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--dsw-fg-3,#7f7f7fcc);flex:1;font-size:11px;overflow:hidden}.wgSearchStatus{color:var(--dsw-fg-3,#7f7f7fcc);text-align:center;padding:8px;font-size:11px}.wgManualError{color:var(--dsw-fg-1,inherit);text-align:left;word-break:break-word}.wgRail{flex-direction:column;align-items:center;gap:12px;padding:8px 0 0;display:flex;overflow:hidden}.wgRail .wgSectionHeader{flex-direction:column;align-self:center;align-items:center;gap:12px;width:36px;height:auto;padding:0}.wgRail .wgIconButton{border-radius:50%;width:36px;height:36px}.wgRail .wgTreeBody{display:none}.wgAddError{color:var(--dsw-fg-1,inherit);white-space:pre-wrap;word-break:break-word;max-height:200px;font-size:12px;overflow-y:auto}.wgRenameInput{border:1px solid var(--dsw-border,#7f7f7f4d);background:var(--dsw-bg-1,transparent);width:100%;color:var(--dsw-fg-1,inherit);border-radius:6px;outline:none;padding:6px 8px;font-size:13px}.wgRenameInput:focus{border-color:var(--dsw-accent,#4a90d9)}"; + //#region src/client/open-folder.ts + /** + * Transport for the official open-in-app host routes served by + * `@deepseek-ai/dsh-host-open-in-app`. The project row offers "open this + * project's folder" by asking that host half for the applications it verified + * as installed, then POSTing the launcher it already resolved — this plugin + * never probes or spawns a launcher itself, and a host without the capability + * (no resolved application, e.g. an SSH launch) simply yields no menu entry. + */ + /** GET route serving the probed application ids (host-owned constant). */ + const OPEN_IN_APP_APPS_ROUTE = "/open-in-app/apps"; + /** POST route launching one resolved application on one absolute directory. */ + const OPEN_IN_APP_OPEN_ROUTE = "/open-in-app/open"; + /** + * Catalog ids that open a directory in the platform file manager, most + * specific first (the official catalog names one per platform: `explorer` on + * Windows, `finder` on macOS, `filemanager` on Linux). + */ + const FOLDER_APP_IDS = [ + "explorer", + "finder", + "filemanager" + ]; + /** + * The installed file-manager id for this host, or undefined when the host + * resolved none (the row then offers no "open in folder" entry). + * @param apps - installed catalog ids from the apps route. + * @returns the preferred available id. + */ + function folderAppId(apps) { + for (const id of FOLDER_APP_IDS) if (apps.includes(id)) return id; + } + /** + * Resolve the browser's Host base with the connection carrier's null-origin + * fallback (same rule the official button uses): a sandboxed document reports + * the literal origin "null", which cannot address the host. + * @returns the absolute base URL of the current Host. + */ + function hostBase() { + const origin = globalThis.location?.origin; + return origin !== void 0 && origin !== "null" ? origin : "http://dsh.internal"; + } + /** + * Read the host's installed-application ids. A host without the capability + * (or one that refuses) reads as an empty list rather than an error, so the + * caller can treat "no apps" and "no route" identically. + * @param signal - aborts the read when the browser half unmounts. + * @returns installed catalog ids, in host menu order. + */ + async function fetchOpenInApps(signal) { + const response = await fetch(new URL(OPEN_IN_APP_APPS_ROUTE, hostBase()), { + headers: { accept: "application/json" }, + cache: "no-store", + ...signal === void 0 ? {} : { signal } + }); + if (!response.ok) throw new Error(`open-in-app apps request failed: ${response.status}`); + const apps = (await response.json()).apps; + return Array.isArray(apps) ? apps.filter((id) => typeof id === "string") : []; + } + /** + * Launch one installed application on one absolute directory. + * @param appId - catalog id from the apps route. + * @param path - the project's absolute directory. + * @returns after the host acknowledged the launch; rejects on any refusal. + */ + async function openPathInApp(appId, path) { + const response = await fetch(new URL(OPEN_IN_APP_OPEN_ROUTE, hostBase()), { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ + app: appId, + path + }) + }); + if (!response.ok) throw new Error(`open-in-app launch failed: ${response.status}`); + } + //#endregion + //#region src/client/quick.ts + /** A session row eligible for quick switching: running, top-level, real. */ + function quickEligible(summary) { + return summary.running === true && summary.origin !== "subagent" && !summary.blank; + } + /** + * Running quick-switchable sessions across the whole list, newest first. + * @param list - sessions list snapshot. + * @param archived - registry-global archive set (archived rows never surface). + * @returns running summaries in recency order (id as deterministic tiebreak). + */ + function runningSessions(list, archived) { + const out = []; + for (const id of list.ids) { + if (archived.has(id)) continue; + const summary = list.byId[id]; + if (summary !== void 0 && quickEligible(summary)) out.push(summary); + } + out.sort((a, b) => b.updatedAt !== a.updatedAt ? b.updatedAt - a.updatedAt : a.id < b.id ? -1 : 1); + return out; + } + /** + * Every quick-switchable session across the whole list — the sessions tab's + * data: running rows pinned on top, everything else under them, both groups + * newest first. Visibility mirrors the tree (subagent rows never; archived + * never; a blank row only while it is the open session). + * @param list - sessions list snapshot. + * @param archived - registry-global archive set (archived rows never surface). + * @param current - the selected session (`mainView` retention; keeps its blank row visible). + * @returns summaries with running first, then recency (id as deterministic tiebreak). + */ + function allSessions(list, archived, current) { + const out = []; + for (const id of list.ids) { + if (archived.has(id)) continue; + const summary = list.byId[id]; + if (summary === void 0) continue; + if (summary.origin === "subagent") continue; + if (summary.blank && summary.id !== current) continue; + out.push(summary); + } + out.sort((a, b) => { + if (a.running !== b.running) return a.running ? -1 : 1; + return b.updatedAt !== a.updatedAt ? b.updatedAt - a.updatedAt : a.id < b.id ? -1 : 1; + }); + return out; + } + /** + * Session search for the quick panel: display-title or owning-workspace-title + * substring match (trimmed, case-insensitive). Filters only — the incoming + * running-first/recency order is preserved verbatim, so "running on top" + * survives any query. + * @param sessions - allSessions() output (running pinned on top, then recency). + * @param query - raw query. + * @param workspaceTitleOf - owning workspace title resolver (sub-line source). + * @param limit - hard render cap. + * @returns matching sessions in the given order. + */ + function filterSessions(sessions, query, workspaceTitleOf, limit = 200) { + const q = query.trim().toLowerCase(); + if (q === "") return sessions.slice(0, limit); + const out = []; + for (const session of sessions) { + const workspace = workspaceTitleOf(session)?.toLowerCase() ?? ""; + if (session.displayTitle.toLowerCase().includes(q) || workspace.includes(q)) out.push(session); + } + return out.slice(0, limit); + } + /** + * Most recently updated running session inside one workspace. + * @param list - sessions list snapshot. + * @param workspace - target workspace (its session account order is irrelevant; + * recency picks the row). + * @returns the session id, or undefined when nothing in the workspace runs. + */ + function latestRunningInWorkspace(list, workspace) { + let best; + let bestTime = Number.NEGATIVE_INFINITY; + for (const id of workspace.sessionIds) { + const summary = list.byId[id]; + if (summary === void 0 || !quickEligible(summary)) continue; + if (summary.updatedAt > bestTime) { + best = summary.id; + bestTime = summary.updatedAt; + } + } + return best; + } + /** + * Running-session count per workspace id (badge on the workspace tab rows). + * @param running - runningSessions() output. + * @param workspaces - real workspaces in stable Host order. + * @returns counts keyed by workspace id; absent key = none running. + */ + function runningCountByWorkspace(running, workspaces) { + const counts = /* @__PURE__ */ new Map(); + if (running.length === 0) return counts; + const runningIds = new Set(running.map((s) => s.id)); + for (const workspace of workspaces) { + let count = 0; + for (const sessionId of workspace.sessionIds) if (runningIds.has(sessionId)) count += 1; + if (count > 0) counts.set(workspace.workspaceId, count); + } + return counts; + } + /** + * The workspace that owns the currently open session. + * @param workspaces - real workspaces in stable Host order. + * @param currentSessionId - the selected session (`mainView` retention); may be undefined + * (no session open, cleared selection) or an id no listed workspace holds + * (e.g. an addressed subagent session). + * @returns the workspace id, or undefined when there is no active workspace. + */ + function activeWorkspaceId(workspaces, currentSessionId) { + if (currentSessionId === void 0) return void 0; + return workspaces.find((w) => w.sessionIds.includes(currentSessionId))?.workspaceId; + } + /** + * Workspace search for the quick panel: title prefix → title substring → + * category label substring → path substring; ties keep host order via a + * stable title compare inside one rank. + * @param workspaces - real workspaces in stable Host order. + * @param query - raw query (trimmed, case-insensitive). + * @param categoryLabelOf - category label resolver (grouped workspaces only). + * @param limit - hard render cap. + * @returns ranked matches; an empty query returns host order. + */ + function filterWorkspaces(workspaces, query, categoryLabelOf, limit = 50) { + const q = query.trim().toLowerCase(); + if (q === "") return workspaces.slice(0, limit); + const scored = []; + for (const workspace of workspaces) { + const title = workspace.title.toLowerCase(); + const path = workspace.path.toLowerCase(); + const category = (categoryLabelOf?.(workspace) ?? "").toLowerCase(); + let score; + if (title.startsWith(q)) score = 0; + else if (title.includes(q)) score = 1; + else if (category !== "" && category.includes(q)) score = 2; + else if (path.includes(q)) score = 3; + if (score !== void 0) scored.push({ + workspace, + score + }); + } + scored.sort((a, b) => a.score !== b.score ? a.score - b.score : a.workspace.title.localeCompare(b.workspace.title)); + return scored.slice(0, limit).map((entry) => entry.workspace); + } + //#endregion + //#region src/client/QuickPanel.tsx + /** + * Ctrl+R quick switch panel: two tabs over the framework's global hooks. + * + * - Workspaces tab: search real Workspaces, select one, then either start a + * New Session in it or jump straight to its most recently updated running + * session (the button reads the none-running state and disables). + * - Sessions tab: every top-level session across workspaces — running ones + * pinned on top, everything else under them, both groups newest first; one + * click (or Enter) opens it. The shared search input filters by session or + * workspace title and never re-sorts, so the running-first order survives. + * + * Current-row marker: the open workspace (workspaces tab) and the open + * session (sessions tab) render `.wgQuickRowCurrent`; with no current + * session — or one no listed workspace holds — nothing is marked. + * + * Mount discipline: the parent conditionally mounts this component, so every + * open starts from a fresh query/selection (quick-switcher semantics). The + * overlay portals to document.body (sidebar ancestors clip `fixed`), sizes + * itself like a launcher (top-anchored, 640px) instead of the host Modal's + * 380px dialog, and handles Escape / mask click by itself. Pure data shaping + * lives in quick.ts; this file only binds hooks + actions. + */ + /** Basename of a host path (both separators; shortens the workspace row sub-line). */ + function pathBasename(path) { + const trimmed = path.replace(/[/\\]+$/, ""); + const base = trimmed.split(/[/\\]/).pop(); + return base !== void 0 && base !== "" ? base : trimmed; + } + /** + * Render the quick switch panel (portaled overlay). + * @param props - hooks snapshots + injected verbs. + * @returns the panel element tree. + */ + function QuickPanel({ onClose, list, workspaces, archivedSessionIds, categoryByWorkspace, current: currentSessionId, startSession, openSession, now, t }) { + const [tab, setTab] = (0, react.useState)("workspaces"); + const [query, setQuery] = (0, react.useState)(""); + const [selectedId, setSelectedId] = (0, react.useState)(null); + const [activeIndex, setActiveIndex] = (0, react.useState)(0); + const inputRef = (0, react.useRef)(null); + const activeRowRef = (0, react.useRef)(null); + const archived = (0, react.useMemo)(() => new Set(archivedSessionIds), [archivedSessionIds]); + const running = (0, react.useMemo)(() => runningSessions(list, archived), [list, archived]); + const runCounts = (0, react.useMemo)(() => runningCountByWorkspace(running, workspaces), [running, workspaces]); + const filtered = (0, react.useMemo)(() => filterWorkspaces(workspaces, query, (ws) => categoryByWorkspace.get(ws.workspaceId)), [ + workspaces, + query, + categoryByWorkspace + ]); + const currentWorkspaceId = (0, react.useMemo)(() => activeWorkspaceId(workspaces, currentSessionId), [workspaces, currentSessionId]); + const sessions = (0, react.useMemo)(() => allSessions(list, archived, currentSessionId), [ + list, + archived, + currentSessionId + ]); + const workspaceTitleBySession = (0, react.useMemo)(() => { + const map = /* @__PURE__ */ new Map(); + for (const workspace of workspaces) for (const sessionId of workspace.sessionIds) if (!map.has(sessionId)) map.set(sessionId, workspace.title); + return map; + }, [workspaces]); + const filteredSessions = (0, react.useMemo)(() => filterSessions(sessions, query, (s) => workspaceTitleBySession.get(s.id)), [ + sessions, + query, + workspaceTitleBySession + ]); + const selected = selectedId === null ? void 0 : workspaces.find((w) => w.workspaceId === selectedId); + const selectedRunningId = selected === void 0 ? void 0 : latestRunningInWorkspace(list, selected); + (0, react.useEffect)(() => { + inputRef.current?.focus(); + }, [tab]); + (0, react.useEffect)(() => { + activeRowRef.current?.scrollIntoView({ block: "nearest" }); + }, [activeIndex]); + /** Select the workspace and close (New Session verb). */ + const launchNewSession = (workspace) => { + startSession(workspace.workspaceId); + onClose(); + }; + /** Open a session row and close (sessions tab click or Enter). */ + const launchSession = (sessionId) => { + openSession(sessionId); + onClose(); + }; + /** Switch tabs; the query carries over, the per-tab selection resets. */ + const switchTab = (next) => { + setTab(next); + setSelectedId(null); + setActiveIndex(0); + }; + /** Search-input keyboard: arrows move the active row; Enter confirms it. */ + const onSearchKeyDown = (e) => { + if (e.key === "ArrowDown") { + e.preventDefault(); + const max = (tab === "workspaces" ? filtered.length : filteredSessions.length) - 1; + setActiveIndex((i) => Math.min(i + 1, Math.max(max, 0))); + } else if (e.key === "ArrowUp") { + e.preventDefault(); + setActiveIndex((i) => Math.max(i - 1, 0)); + } else if (e.key === "Enter") { + e.preventDefault(); + if (tab === "workspaces") { + if (selected === void 0) { + const target = filtered[activeIndex]; + if (target !== void 0) setSelectedId(target.workspaceId); + } else launchNewSession(selected); + } else { + const target = filteredSessions[activeIndex]; + if (target !== void 0) launchSession(target.id); + } + } + }; + /** Escape closes (capture so row buttons and the input can't swallow it). */ + const onCardKeyDown = (e) => { + if (e.key === "Escape") { + e.preventDefault(); + e.stopPropagation(); + onClose(); + } + }; + /** Mask click closes; clicks inside the card never reach the mask. */ + const onOverlayMouseDown = (e) => { + if (e.target === e.currentTarget) onClose(); + }; + const selectWorkspace = (id) => { + setSelectedId(id); + inputRef.current?.focus(); + }; + return (0, react_dom.createPortal)(/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { + className: "wgQuickOverlay", + onMouseDown: onOverlayMouseDown, + children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { + className: "wgQuickCard", + role: "dialog", + "aria-modal": "true", + "aria-label": t("quick.title"), + onKeyDown: onCardKeyDown, + children: [ + /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { + className: "wgQuickHeader", + children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { + className: "wgQuickTitle", + children: t("quick.title") + }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { + className: "wgQuickTabs", + role: "tablist", + "aria-label": t("quick.title"), + children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { + type: "button", + role: "tab", + "aria-selected": tab === "workspaces", + className: `wgQuickTab${tab === "workspaces" ? " wgQuickTabActive" : ""}`, + onClick: () => { + switchTab("workspaces"); + }, + children: t("quick.tab.workspaces") + }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { + type: "button", + role: "tab", + "aria-selected": tab === "sessions", + className: `wgQuickTab${tab === "sessions" ? " wgQuickTabActive" : ""}`, + onClick: () => { + switchTab("sessions"); + }, + children: [t("quick.tab.sessions"), running.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { + className: "wgQuickTabCount", + children: running.length + })] + })] + })] + }), + /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { + className: "wgQuickSearchWrap", + children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { + ref: inputRef, + className: "wgQuickSearch", + value: query, + placeholder: tab === "workspaces" ? t("quick.search.placeholder") : t("quick.search.sessions"), + "aria-label": tab === "workspaces" ? t("quick.search.placeholder") : t("quick.search.sessions"), + onChange: (e) => { + setQuery(e.target.value); + setSelectedId(null); + setActiveIndex(0); + }, + onKeyDown: onSearchKeyDown + }) + }), + tab === "workspaces" ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { + className: "wgQuickList", + role: "listbox", + "aria-label": t("quick.tab.workspaces"), + children: [filtered.map((workspace, i) => { + const id = workspace.workspaceId; + const count = runCounts.get(id) ?? 0; + const category = categoryByWorkspace.get(id); + const isCurrent = id === currentWorkspaceId; + return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { + ref: i === activeIndex ? activeRowRef : void 0, + type: "button", + role: "option", + "aria-selected": selectedId === id, + "aria-current": isCurrent || void 0, + className: `wgQuickRow${i === activeIndex ? " wgQuickRowActive" : ""}${selectedId === id ? " wgQuickRowSelected" : ""}${isCurrent ? " wgQuickRowCurrent" : ""}`, + onMouseEnter: () => { + setActiveIndex(i); + }, + onClick: () => { + selectWorkspace(id); + }, + children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { + className: "wgQuickRowMain", + children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { + className: "wgQuickRowTitle", + children: workspace.title + }), count > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { + className: "wgQuickRunBadge", + children: ["● ", count] + })] + }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { + className: "wgQuickRowSub", + children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { + className: "wgQuickRowPath", + children: category !== void 0 ? `${category} · ${pathBasename(workspace.path)}` : pathBasename(workspace.path) + }) + })] + }, id); + }), filtered.length === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { + className: "wgQuickEmpty", + children: t("quick.empty.workspaces") + })] + }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { + className: "wgQuickFooter", + children: [ + /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { + className: "wgQuickSelected", + children: selected === void 0 ? t("quick.select.hint") : selected.title + }), + /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { + variant: "outline", + disabled: selected === void 0 || selectedRunningId === void 0, + onClick: () => { + if (selectedRunningId !== void 0) launchSession(selectedRunningId); + }, + children: selectedRunningId !== void 0 ? t("quick.action.running") : t("quick.action.noneRunning") + }), + /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { + variant: "primary", + disabled: selected === void 0, + onClick: () => { + if (selected !== void 0) launchNewSession(selected); + }, + children: t("quick.action.newSession") + }) + ] + })] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { + className: "wgQuickList", + role: "listbox", + "aria-label": t("quick.tab.sessions"), + children: [filteredSessions.map((session, i) => { + const workspaceTitle = workspaceTitleBySession.get(session.id) ?? ""; + const isCurrent = session.id === currentSessionId; + return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { + ref: i === activeIndex ? activeRowRef : void 0, + type: "button", + role: "option", + "aria-selected": i === activeIndex, + "aria-current": isCurrent || void 0, + className: `wgQuickRow${i === activeIndex ? " wgQuickRowActive" : ""}${isCurrent ? " wgQuickRowCurrent" : ""}`, + onMouseEnter: () => { + setActiveIndex(i); + }, + onClick: () => { + launchSession(session.id); + }, + children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { + className: "wgQuickRowMain", + children: [ + /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state: session.running ? "ongoing" : "done" }), + /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { + className: "wgQuickRowTitle", + children: session.blank ? t("newSession") : session.displayTitle + }), + /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { + className: "wgQuickTime", + children: relativeTimeLabel(session.updatedAt, now) + }) + ] + }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { + className: "wgQuickRowSub", + children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { + className: "wgQuickRowPath", + children: workspaceTitle + }) + })] + }, session.id); + }), filteredSessions.length === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { + className: "wgQuickEmpty", + children: t("quick.empty.sessions") + })] + }), + /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { + className: "wgQuickHint", + children: t("quick.hint") + }) + ] + }) + }), document.body); + } + //#endregion + //#region src/client/tab-seat.ts + /** + * DOM seat for the session tab strip. + * + * Why this exists instead of a slot: the strip belongs at the very top of the + * conversation column — `pI_x6G_centerCol` (ui-layout's AppFrame `.centerCol`, + * a hashed CSS-Modules class). That column declares NO child slots: its only + * child is the `main` slot's occupant (`renderSlot('main', …)`, the + * Conversation or a global panel), so there is nowhere to register. The + * shipped slot in that neighbourhood — `conversation.composer.dock` — is the + * band UNDER the composer card, a different place entirely. + * + * So the strip gets a real DOM seat: this module finds the column, prepends a + * `
` to it, and hands that element to a React portal. The element is + * OURS, never React's: it is inserted outside the column's child list that + * React reconciles, and it is re-inserted if React (or a theme/titlebar + * re-render) ever drops it. + * + * Two hazards this module is built around: + * + * 1. `centerCol` is a hashed class name (`pI_x6G_centerCol`) that changes when + * the package is rebuilt. Matching is therefore done on the *structural* + * contract — a grid-item column that holds the `main` panel — plus a + * `[class*="_centerCol"]` probe, never on the exact hash. + * 2. The column mounts after the client plugin's `apply()` runs. Discovery is + * therefore a MutationObserver on `document.body` plus a `requestAnimationFrame` + * retry, and both are torn down when the owning effect disposes. + */ + /** Persistent marker for the injected container (survives React re-renders). */ + const SEAT_ATTRIBUTE = "data-wg-tab-seat"; + /** Sentinel attribute on the container so discovery can skip our own node. */ + const SEAT_SELECTOR = `[${SEAT_ATTRIBUTE}]`; + /** + * Match the conversation column by its hashed CSS-Modules class. + * + * The hash prefix (`pI_x6G_`) is build-dependent, so the probe matches the + * `_centerCol` suffix that the Modules transform always preserves. A plain + * `class*="centerCol"` scan would risk matching unrelated utility classes, so + * the leading underscore is required. + * @param root - subtree to scan (normally `document`). + * @returns the column element, or null while it has not mounted. + */ + function findCenterColumn(root) { + const existing = root.querySelector(SEAT_SELECTOR); + if (existing?.isConnected === true) return existing.parentElement; + const column = root.querySelector("[class*=\"_centerCol\"]"); + if (column !== null) return column; + return null; + } + /** + * Ensure a seat exists as the FIRST child of the conversation column, creating + * it if needed, and keep it there for as long as the returned handle is live. + * + * The seat element is created once and reused: a portal that re-mounts into a + * fresh node on every shell re-render would drop the tab strip's React state + * and visible focus. If React removes the node (it owns the column's child + * list, and our node is not part of it), the observer re-inserts the SAME + * element, so the portal's subtree moves with it. + * + * @param onReady - called with the host element each time it becomes attached + * (once immediately when the column already exists). Used to seed React + * state; may fire more than once if the column is remounted. + * @returns the seat handle. `host` is null until the column appears, so the + * caller renders nothing meanwhile and starts rendering when `onReady` + * fires. Never null: a missing column must degrade to "no strip", not to a + * thrown error that would take the whole client plugin down. + */ + function mountTabSeat(onReady) { + let host = null; + let column = null; + let observer = null; + let raf = 0; + let attempts = 0; + let disposed = false; + const MAX_ATTEMPTS = 300; + /** + * Put the seat at the head of the column, creating it on first success. + * Idempotent: a seat already first is left untouched, so repeated calls from + * the observer cause no DOM churn (and therefore no observer feedback loop — + * our insertion schedules one more callback, which then takes this early + * return instead of re-inserting). + */ + const place = (target) => { + if (disposed) return; + if (host === null) { + host = document.createElement("div"); + host.setAttribute(SEAT_ATTRIBUTE, ""); + } + if (target.firstChild === host) return; + target.insertBefore(host, target.firstChild); + }; + /** Locate the column and, on success, seat the host and notify the caller. */ + const tryMount = () => { + if (disposed) return true; + if (column !== null && column.isConnected) { + place(column); + return true; + } + const found = findCenterColumn(document); + if (found === null) return false; + const changed = found !== column; + column = found; + place(found); + if (changed) onReady(host); + return true; + }; + const tick = () => { + if (disposed) return; + raf = 0; + if (tryMount()) return; + attempts += 1; + if (attempts >= MAX_ATTEMPTS) return; + raf = requestAnimationFrame(tick); + }; + observer = new MutationObserver(() => { + if (disposed) return; + if (tryMount()) return; + if (raf === 0 && attempts < MAX_ATTEMPTS) raf = requestAnimationFrame(tick); + }); + observer.observe(document.body, { + childList: true, + subtree: true + }); + if (!tryMount() && raf === 0) raf = requestAnimationFrame(tick); + return { + get host() { + return host; + }, + dispose: () => { + disposed = true; + if (raf !== 0) cancelAnimationFrame(raf); + raf = 0; + observer?.disconnect(); + observer = null; + host?.remove(); + host = null; + column = null; + } + }; + } + //#endregion + //#region src/client/SessionTabs.tsx + /** + * The session tab strip: one chip per opened conversation, rendered into the + * DOM seat at the head of the conversation column (see `tab-seat.ts` for why + * this is a DOM injection rather than a slot). + * + * A tab is a *view* of the open session, not a second navigation model: + * clicking a chip navigates through `ctx.uiWorkspace.openSession`, which is the + * one path that retains a target session; the owning component derives the + * strip from the open session plus the tab store. + * + * The active chip is derived, never stored: it is the chip whose session is the + * open one, so clicking a background chip immediately shows that chip active. + */ + /** Dot state for one tab (the sidebar's session rows share this vocabulary). */ + function dotState(indicator) { + if (indicator.attention) return "warning"; + if (indicator.running) return "ongoing"; + return "done"; + } + /** + * Render the session tab strip into the conversation column's head seat. + * @param props - tab store, catalog/status hooks, navigation, locale. + * @returns the portal (or null until the column has mounted). + */ + function SessionTabs({ useTabs, actions, useSessions, useSessionStatus, useWorkspaces, activate, rename, t }) { + const tabs = useTabs((s) => s.tabs); + const list = useSessions((s) => s); + const statuses = useSessionStatus((s) => s); + const currentId = useSessions((s) => currentSessionId(s)); + const workspaces = useWorkspaces((s) => s.items); + const projects = (0, react.useMemo)(() => projectIndex(workspaces), [workspaces]); + const [seat, setSeat] = (0, react.useState)(null); + const scrollRef = (0, react.useRef)(null); + (0, react.useEffect)(() => { + const mounted = mountTabSeat(setSeat); + if (mounted.host !== null) setSeat(mounted.host); + return () => { + mounted.dispose(); + setSeat(null); + }; + }, []); + const display = (0, react.useMemo)(() => orderedTabs(tabs, currentId), [tabs, currentId]); + (0, react.useEffect)(() => { + const el = scrollRef.current; + if (el === null || currentId === void 0) return; + el.querySelector(`[data-tab-session="${CSS.escape(currentId)}"]`)?.scrollIntoView({ + block: "nearest", + inline: "nearest" + }); + }, [currentId, display.length]); + if (seat === null || display.length === 0) return null; + return (0, react_dom.createPortal)(/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { + className: "wgTabs", + role: "tablist", + "aria-label": t("tabs.aria"), + children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { + className: "wgTabsScroll", + ref: scrollRef, + onWheel: (event) => { + const el = event.currentTarget; + if (el.scrollWidth <= el.clientWidth) return; + const delta = Math.abs(event.deltaY) > Math.abs(event.deltaX) ? event.deltaY : event.deltaX; + if (delta === 0) return; + const atStart = el.scrollLeft <= 0 && delta < 0; + const atEnd = el.scrollLeft + el.clientWidth >= el.scrollWidth - 1 && delta > 0; + if (atStart || atEnd) return; + el.scrollLeft += delta; + event.preventDefault(); + }, + children: display.map((tab) => { + const summary = list.byId[tab.sessionId]; + const label = summary === void 0 ? tab.sessionId : summary.blank ? t("newSession") : summary.displayTitle; + const active = tab.sessionId === currentId; + const indicator = tabIndicator(summary, statuses.get(tab.sessionId)); + const project = projects.get(tab.sessionId); + const tip = project === void 0 ? label : `${project.label} · ${label}\n${project.path}`; + return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { + className: `wgTab${active ? " wgTabActive" : ""}`, + "data-tab-session": tab.sessionId, + ...project !== void 0 ? { "data-tab-project": project.workspaceId } : {}, + children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { + type: "button", + role: "tab", + "aria-selected": active, + className: "wgTabMain", + title: tip, + onClick: () => { + activate(tab.sessionId); + }, + onDoubleClick: () => { + rename(tab.sessionId, label); + }, + children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { + className: "wgTabStatus", + "data-tab-state": indicator.attention ? "attention" : indicator.running ? "running" : indicator.unread ? "unread" : indicator.settled ? "settled" : "idle", + children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state: dotState(indicator) }) + }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { + className: "wgTabText", + children: [project !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { + className: "wgTabProject", + title: project.path, + children: project.label + }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { + className: "wgTabLabel", + children: label + })] + })] + }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, { + label: t("tabs.close"), + side: "top", + delayMs: 600, + children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { + type: "button", + className: "wgTabClose", + "aria-label": `${t("tabs.close")} ${label}`, + onClick: (event) => { + event.stopPropagation(); + actions.close(tab.sessionId); + }, + children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCloseFillMedium, {}) + }) + })] + }, tab.order); + }) + }) + }), seat); + } + //#endregion + //#region src/client/branch.ts + /** + * Plan the route: one segment per row after the first, plus the dot positions. + * + * Kept separate from the string assembly so the length walk and the SVG `d` + * always describe the same geometry — measuring one path against another is how + * a grown/ghost pair drifts out of sync. + * + * The stem lands on each row's OWN anchor (x) and centre (y), so uneven row + * heights and the tree's per-row indents both stay exact. A group row's anchor + * is pushed out by `BULGE_OFFSET`, which is what creates the kink. + * + * @param rows - visible rows in render order, carrying measured anchors. + * @returns the per-row segments and dot x positions. + */ + function plan(rows) { + const segments = []; + const first = rows[0]; + const dotX = [first.x]; + let x = first.x; + for (let i = 1; i < rows.length; i += 1) { + const row = rows[i]; + const startY = rows[i - 1].y; + const endY = row.y; + const midY = startY + (endY - startY) / 2; + const target = row.x; + if (target === x) segments.push({ + d: `L ${x} ${endY}`, + length: Math.abs(endY - startY), + from: { + x, + y: startY + }, + to: { + x, + y: endY + } + }); + else { + segments.push({ + d: `C ${x} ${midY}, ${target} ${midY}, ${target} ${endY}`, + length: Math.hypot(target - x, endY - midY), + from: { + x, + y: startY + }, + to: { + x: target, + y: endY + }, + controlX: x + }); + x = target; + } + dotX.push(x); + } + return { + segments, + dotX + }; + } + /** + * Shorten a move so it stops `clearance` short of its end point. + * + * Used only on the LAST move of the grown run, which is what hides the stroke + * behind the bloom. A straight move is trimmed along its axis; a curved move is + * trimmed by moving its end and its control point together, which shortens the + * curve while keeping its vertical tangents (so the kink's shape is preserved + * rather than being flattened into a line). + * + * Returns the move unchanged when it is too short to trim (the stem would + * invert), so a cramped layout degrades to "line meets flower" rather than + * producing a backwards path. + * + * @param segment - the move to shorten. + * @param clearance - distance to stop short of the end. + * @returns the shortened move. + */ + function trimEnd(segment, clearance) { + const { from, to } = segment; + const span = Math.hypot(to.x - from.x, to.y - from.y); + if (span <= clearance) return segment; + if (segment.controlX === void 0) { + const ratio = (span - clearance) / span; + const endX = from.x + (to.x - from.x) * ratio; + const endY = from.y + (to.y - from.y) * ratio; + return { + ...segment, + d: `L ${endX} ${endY}`, + to: { + x: endX, + y: endY + }, + length: span - clearance + }; + } + const endY = to.y - clearance; + const controlY = from.y + (to.y - from.y) / 2 - clearance; + const endX = to.x; + return { + ...segment, + d: `C ${segment.controlX} ${controlY}, ${endX} ${controlY}, ${endX} ${endY}`, + to: { + x: endX, + y: endY + }, + length: Math.max(0, segment.length - clearance) + }; + } + /** + * Build the branch for a list of rows. + * + * @param rows - visible rows in render order, each carrying its MEASURED centre. + * @returns the branch geometry; empty strings when there are no rows. + */ + function buildBranch(rows) { + const first = rows[0]; + if (first === void 0) return { + ghostPath: "", + grownPath: "", + ghostLength: 0, + grownLength: 0, + dots: [], + flower: null, + height: 0 + }; + const { segments, dotX } = plan(rows); + const head = `M ${first.x} ${first.y}`; + const dots = rows.map((row, index) => ({ + key: row.key, + cx: dotX[index] ?? row.x, + cy: row.y, + active: row.active + })); + const activeIndex = rows.findIndex((row) => row.active); + const hasActive = activeIndex >= 0; + const grownTo = hasActive ? activeIndex : 0; + const flowerAt = dots[grownTo]; + const flower = hasActive && flowerAt !== void 0 ? { + key: flowerAt.key, + cx: flowerAt.cx, + cy: flowerAt.cy + } : null; + const join = (list) => list.length === 0 ? head : [head, ...list.map((s) => s.d)].join(" "); + const grownSegments = segments.slice(0, grownTo); + const lastGrown = grownSegments[grownSegments.length - 1]; + const grownStroke = lastGrown === void 0 ? grownSegments : [...grownSegments.slice(0, -1), trimEnd(lastGrown, 7)]; + const lengthOf = (count) => segments.slice(0, count).reduce((sum, s) => sum + s.length, 0); + const last = rows[rows.length - 1]; + const tail = rows.length > 1 ? Math.abs(last.y - rows[rows.length - 2].y) / 2 : 0; + return { + ghostPath: join(segments), + grownPath: join(grownStroke), + ghostLength: lengthOf(segments.length), + grownLength: Math.max(0, lengthOf(grownTo) - (lastGrown === void 0 ? 0 : 7)), + dots, + flower, + height: last.y + tail + }; + } + //#endregion + //#region src/client/FlowerBranch.tsx + /** + * The flower branch: an SVG overlay that draws one continuous curly stem down + * the sidebar tree, growing to the row you are currently on. + * + * Ported from the RewampUI *Flower Sidebar* reference. The mechanism, verified + * against that page's live DOM: + * + * - TWO paths share one `d` prefix: a **ghost** (dashed, faded) drawing the + * whole route, and a **grown** solid stroke drawn only as far as the active + * row. The grown one is what makes the branch look like it grew to you. + * - A **dot per row**, sitting exactly on the curve. + * - A **flower at the endpoint**: the stem grows into a bloom on the row you + * are on, which is where the grown stroke stops. The bloom TURNS while that + * session is working and rests when it is idle. + * - The whole SVG is `pointer-events: none` and `overflow: visible`, so it is + * pure decoration over the real rows and never intercepts a click. + * + * Measurement, not layout: the rows are rendered by the tree itself (they carry + * drag handlers, menus and hover state), so this component reads each row's + * vertical centre from the DOM and feeds plain numbers to `buildBranch`. That + * keeps the geometry unit-tested (`branch.ts`) while the SVG stays a dumb + * renderer of it. + * + * Re-measured on: row count changes (expand/collapse, new session), the active + * row changing, and container resize. A `ResizeObserver` on the scroll body + * covers the last one without a window listener. + * + * The bloom's spin is NOT re-measured here: it arrives as the `spinning` prop + * and is applied as a class, so a status flip never re-runs the DOM measurement + * above (the tree is the expensive part, not the class swap). + */ + /** + * Attribute the tree puts on every row the branch should connect. */ + const BRANCH_ROW_ATTRIBUTE = "data-wg-branch-row"; + /** + * Attribute marking the row the stem should grow to. + * + * Only the DEEPEST row gets this (the session). Its ancestors — the project and + * the category that contain it — deliberately do NOT, because a session belongs + * to both and marking all three would make "which row is active?" ambiguous. + * When several rows do carry it, the deepest (last in document order) wins. + */ + const BRANCH_ACTIVE_ATTRIBUTE = "data-wg-branch-active"; + /** + * The bloom's petal outline, in the 1024-unit box the artwork was drawn in. + * + * This is the user's own flower glyph verbatim: an eight-petal bloom around a + * ringed center. Kept as a path (not a component) because it is a constant. + */ + const FLOWER_PATH = "M375.3728 841.8432c92.96-12.5184 203.8784-71.264 299.5456-166.9248 22.6112-22.6112 43.1616-46.08 61.5232-69.952C712.7616 786.3936 621.2608 921.6 512 921.6c-51.1488 0-98.4-29.632-136.6272-79.7568z m-87.808-422.8096C311.2384 237.6064 402.7328 102.4 512 102.4c51.1488 0 98.4 29.632 136.6272 79.7568-92.96 12.5184-203.8784 71.264-299.5456 166.9248a719.1232 719.1232 0 0 0-61.5232 69.952z m-129.536 139.5648c57.3248 74.2464 163.6608 140.9344 294.336 175.9488a719.1232 719.1232 0 0 0 91.3472 18.304c-168.9664 70.208-331.808 58.5728-386.432-36.0512-25.5744-44.288-23.5456-100.032 0.7552-158.2016z m322.2592-287.4496c168.9664-70.208 331.808-58.5728 386.432 36.0512 25.5744 44.288 23.5456 100.032-0.7552 158.2016-57.3184-74.2464-163.648-140.9344-294.336-175.9488a719.1232 719.1232 0 0 0-91.3408-18.304zM294.656 228.7552c-35.6352 86.7648-40.224 212.1984-5.2032 342.8736a719.1232 719.1232 0 0 0 29.8176 88.256C173.9904 548.6592 102.6432 401.824 157.2736 307.2c25.5744-44.288 74.8608-70.4 137.3824-78.4448z m410.0736 135.36c145.28 111.2256 216.6272 258.0608 161.9968 352.6848-25.5744 44.288-74.8608 70.4-137.3824 78.4448 35.6352-86.7648 40.224-212.1984 5.2032-342.8736a719.1232 719.1232 0 0 0-29.8176-88.256zM512 678.4c-88.3648 0-160-71.6352-160-160s71.6352-160 160-160 160 71.6352 160 160-71.6352 160-160 160z m0-83.2c42.4128 0 76.8-34.3872 76.8-76.8s-34.3872-76.8-76.8-76.8-76.8 34.3872-76.8 76.8 34.3872 76.8 76.8 76.8z"; + /** Petal colour: the accent the glyph was drawn in. */ + const FLOWER_PETAL = "#fa541c"; + /** + * Rendered size of the bloom, as a scale factor over the authored 1024 box. + * + * 17 / 1024 ≈ 0.0166 puts the flower at ~17px: clear of neighbouring rows (rows + * are 28px tall) while still reading as a flower rather than a dot at the end of + * the stem. + */ + const FLOWER_SCALE = 17 / 1024; + /** + * The bloom at the branch's endpoint. + * + * Anchoring is done entirely by these transforms, in this order: + * + * 1. `translate(cx cy)` — put the origin on the stem's tip (the endpoint of + * the grown stroke). + * 2. `scale(FLOWER_SCALE)` — shrink the 1024-unit artwork about that origin. + * 3. `translate(-512 -512)` — bring the glyph's own centre (512, 512) onto the + * origin, so the flower is centred on the tip. + * + * The spin is applied by `wgFlowerArt` in CSS as a `rotate()` composed AFTER + * that recentring (`translate(-512 -512) rotate(...)`), so the bloom turns about + * its own centre and the recentring never drifts as it rotates. + * + * Note what is deliberately NOT used here: a percentage `translate(-50%, -50%)` + * or `transform-box: fill-box` + percentage `transform-origin`. Measured on the + * live page, the percentage form resolved against the SVG VIEWPORT rather than + * the path's box, translating by (-24, -409.5) instead of (-373, -409.6) and + * parking the bloom well right of the stem. Explicit user units remove the + * question: 512 is the measured centre, not an inferred one. + * + * The flower rests while the session is idle and turns while it works: one + * animation, paused rather than removed, so a state flip resumes the turn + * instead of snapping the petals back to 0deg. + * + * @param props - endpoint coordinates and whether the session is working. + * @returns the bloom group. + */ + function Flower({ cx, cy, spinning }) { + return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("g", { + className: spinning ? "wgFlower wgFlowerSpinning" : "wgFlower", + transform: `translate(${cx} ${cy}) scale(${FLOWER_SCALE}) translate(-512 -512)`, + children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { + className: "wgFlowerArt", + d: FLOWER_PATH, + fill: FLOWER_PETAL + }) + }); + } + /** + * Render the branch for the rows currently inside `scope`. + * @param props - the element to measure, and whether the open session is working. + * @returns the SVG overlay, or null until at least one row is measured. + */ + function FlowerBranch({ scope, spinning }) { + const [rows, setRows] = (0, react.useState)([]); + const measureKey = (0, react.useRef)(""); + const [branch, setBranch] = (0, react.useState)(null); + (0, react.useEffect)(() => { + if (scope === null) { + setRows([]); + setBranch(null); + return; + } + const measure = () => { + const nodes = Array.from(scope.querySelectorAll(`[${BRANCH_ROW_ATTRIBUTE}]`)); + if (nodes[0] === void 0) { + if (measureKey.current !== "") { + measureKey.current = ""; + setRows([]); + setBranch(null); + } + return; + } + const activeIndex = nodes.reduce((found, node, index) => node.hasAttribute("data-wg-branch-active") ? index : found, -1); + const kinds = nodes.map((n) => n.hasAttribute("data-wg-branch-group") ? "group" : "item").join(""); + const key = `${nodes.length}|${activeIndex}|${kinds}|${Math.round(scope.clientWidth)}`; + if (key === measureKey.current) return; + measureKey.current = key; + const measured = nodes.map((node, index) => ({ + key: `${index}`, + y: center(node), + x: anchorX(node), + kind: node.hasAttribute("data-wg-branch-group") ? "group" : "item", + active: index === activeIndex + })); + setRows(measured); + setBranch(buildBranch(measured)); + }; + /** Vertical centre of a node, relative to the scope box. */ + function center(node) { + const r = node.getBoundingClientRect(); + const s = scope.getBoundingClientRect(); + return r.top - s.top + r.height / 2; + } + /** + * Horizontal anchor of a row, relative to the scope box. + * + * A row with a chevron anchors to that triangle's CENTRE: it is the marker + * the user already reads as "this row opens", so the stem hangs off it + * instead of floating beside it. A chevron-less row (a session) has no + * marker, so it anchors to where its own content starts — the status dot's + * centre, which is the first thing in the row. + */ + function anchorX(node) { + const s = scope.getBoundingClientRect(); + const box = (node.querySelector(".wgChevron") ?? node.querySelector("[class*=\"wgStatusSlot\"]") ?? node.querySelector("[class*=\"wgCategoryIcon\"]") ?? node.querySelector("[class*=\"wgRowIcon\"]") ?? node).getBoundingClientRect(); + return box.left - s.left + box.width / 2; + } + measure(); + const observer = new MutationObserver(measure); + observer.observe(scope, { + childList: true, + subtree: true, + attributes: true, + attributeFilter: [BRANCH_ACTIVE_ATTRIBUTE] + }); + const resizer = new ResizeObserver(measure); + resizer.observe(scope); + return () => { + observer.disconnect(); + resizer.disconnect(); + }; + }, [scope]); + const dots = (0, react.useMemo)(() => branch?.dots ?? [], [branch]); + const flowerKey = branch?.flower?.key; + if (branch === null || rows.length === 0) return null; + return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", { + className: "wgBranch", + width: 48, + height: Math.max(1, Math.ceil(branch.height)), + viewBox: `0 0 48 ${Math.max(1, Math.ceil(branch.height))}`, + "aria-hidden": "true", + focusable: "false", + children: [ + /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { + className: "wgBranchGhost", + d: branch.ghostPath + }), + /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { + className: "wgBranchGrown", + d: branch.grownPath + }), + dots.map((dot) => { + if (dot.key === flowerKey) return null; + return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", { + className: dot.active ? "wgBranchDot wgBranchDotActive" : "wgBranchDot", + cx: dot.cx, + cy: dot.cy, + r: dot.active ? 3.2 : 2 + }, dot.key); + }), + branch.flower !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Flower, { + cx: branch.flower.cx, + cy: branch.flower.cy, + spinning + }) + ] + }); + } + //#endregion + //#region \0dsh-workspace-groups-inline-css:C:\Users\qyh15\Documents\dsh-workspaces-goups-new\dsh-workspace-groups\src\client\styles.css.mjs + var styles_css_default = ".wgRoot{box-sizing:border-box;flex-direction:column;flex:1;width:100%;min-height:0;display:flex;overflow:hidden}.wgSectionHeader{flex:none;align-items:center;gap:4px;height:36px;padding:0 12px;display:flex}.wgSectionLabel{text-overflow:ellipsis;white-space:nowrap;min-width:0;max-width:45%;color:var(--dsw-fg-1,inherit);flex:none;font-size:12px;font-weight:600;overflow:hidden}.wgIconButton{width:26px;height:26px;color:var(--dsw-fg-2,inherit);cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;padding:0;display:inline-flex}.wgIconButton:hover{background:var(--dsw-bg-hover,#7f7f7f1f);color:var(--dsw-fg-1,inherit)}.wgIconButton:disabled{opacity:.5;cursor:default}.wgSearch{flex:1;align-items:center;min-width:0;max-width:28px;margin-left:auto;transition:max-width .18s;display:flex}.wgSearchExpanded{max-width:100%}.wgSearchInput{min-width:0;color:var(--dsw-fg-1,inherit);background:0 0;border:none;outline:none;flex:1;padding:0;font-size:12px}.wgTreeBody{flex:1;min-height:0;padding:0 8px 8px;overflow-y:auto}.wgList{flex-direction:column;gap:1px;display:flex}.wgEmpty{text-align:center;color:var(--dsw-fg-3,#7f7f7fcc);padding:16px 8px;font-size:12px}.wgCategoryRow{cursor:pointer;user-select:none;border-radius:6px;align-items:center;gap:4px;height:28px;padding:0 4px;display:flex;position:relative}.wgCategoryRow:hover{background:var(--dsw-bg-hover,#7f7f7f1f)}.wgCategoryRow:hover .wgRowActions,.wgCategoryRow:focus-within .wgRowActions{opacity:1}.wgDropTarget{background:var(--dsw-bg-selected,#4a90d92e);outline:1px dashed var(--dsw-accent,#4a90d9);outline-offset:-1px}.wgInsertBefore:before,.wgInsertAfter:after{content:\"\";background:var(--dsw-accent,#4a90d9);height:2px;box-shadow:0 0 0 1px color-mix(in srgb, var(--dsw-accent,#4a90d9) 25%, transparent);pointer-events:none;z-index:6;border-radius:1px;position:absolute;left:2px;right:2px}.wgInsertBefore:before{top:-1px}.wgInsertAfter:after{bottom:-1px}.wgChevron{width:14px;height:14px;color:var(--dsw-fg-3,#7f7f7fcc);flex:none;justify-content:center;align-items:center;transition:transform .12s;display:inline-flex}.wgChevronOpen{transform:rotate(90deg)}.wgCategoryIcon{color:var(--dsw-fg-2,inherit);flex:none;justify-content:center;align-items:center;display:inline-flex}.wgCategoryLabel{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--dsw-fg-1,inherit);flex:1;font-size:12px;font-weight:600;overflow:hidden}.wgCategoryCount{color:var(--dsw-fg-3,#7f7f7fcc);flex:none;font-size:11px}.wgProjectRow{cursor:pointer;user-select:none;border-radius:6px;align-items:center;gap:4px;height:28px;padding:0 4px 0 20px;display:flex;position:relative}.wgProjectFlat{padding-left:4px}.wgTopLevelArea{margin-top:2px;padding-bottom:10px}.wgTopLevelEmpty{border-radius:4px;height:14px;position:relative}.wgTopLevelEmptyLine{background:var(--dsw-accent,#4a90d9);height:2px;box-shadow:0 0 0 1px color-mix(in srgb, var(--dsw-accent,#4a90d9) 25%, transparent);pointer-events:none;border-radius:1px;position:absolute;top:50%;left:2px;right:2px}.wgTopLevelEmptyActive{background:var(--dsw-bg-selected,#4a90d92e)}.wgProjectRow:hover{background:var(--dsw-bg-hover,#7f7f7f1f)}.wgProjectActive .wgProjectLabel{font-weight:700}.wgProjectLabel{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--dsw-alias-label-primary,var(--dsw-fg-1,inherit));font-size:12px;font-weight:600;font-family:var(--dsw-font-mono,ui-monospace, SFMono-Regular, Menlo, monospace);flex:1;overflow:hidden}.wgRowActions{opacity:0;flex:none;align-items:center;gap:2px;display:inline-flex}.wgProjectRow:hover .wgRowActions,.wgProjectRow:focus-within .wgRowActions{opacity:1}.wgTreeWrap{position:relative}.wgBranch{z-index:2;pointer-events:none;position:absolute;top:0;left:0;overflow:visible}.wgTreeWrap>.wgList{z-index:1;position:relative}.wgBranchGhost{fill:none;stroke:var(--dsw-alias-border-l2,#7f7f7f47);stroke-width:1.5px;stroke-dasharray:2 3;vector-effect:non-scaling-stroke}.wgBranchGrown{fill:none;stroke:var(--dsw-alias-label-primary,currentColor);stroke-width:2px;stroke-linecap:round;vector-effect:non-scaling-stroke;transition:stroke .16s}.wgBranchDot{fill:var(--dsw-alias-border-l2,#7f7f7f80);transition:r .16s,fill .16s}.wgBranchDotActive{fill:var(--dsw-alias-label-primary,currentColor)}.wgFlowerArt{transform-box:fill-box;transform-origin:50%;animation:4s linear infinite paused wg-flower-spin}.wgFlowerSpinning .wgFlowerArt{animation-play-state:running}@keyframes wg-flower-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.wgBranchGrown,.wgBranchDot{transition:none}.wgFlowerArt{animation:none}}.wgTreeChildren{position:relative}.wgSessionRow{cursor:pointer;user-select:none;border-radius:6px;align-items:center;gap:6px;height:28px;padding:0 4px 0 40px;display:flex}.wgSessionRow:hover{background:var(--dsw-bg-hover,#7f7f7f1f)}.wgSessionRow:hover .wgRowActions,.wgSessionRow:focus-within .wgRowActions{opacity:1}.wgSelected{background:var(--dsw-bg-selected,#4a90d92e)}.wgStatusSlot{flex:none;justify-content:center;align-items:center;width:14px;height:14px;display:inline-flex}.wgSessionTitle{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--dsw-alias-label-secondary,var(--dsw-fg-2,inherit));flex:1;font-size:12px;overflow:hidden}.wgSelected .wgSessionTitle{color:var(--dsw-alias-label-primary,var(--dsw-fg-1,inherit));font-weight:500}.wgSessionTime{color:var(--dsw-fg-3,#7f7f7fcc);flex:none;font-size:11px}.wgVisuallyHidden{clip:rect(0 0 0 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.wgMatched{background:var(--dsw-bg-selected,#4a90d92e)}.wgSessionSnippet{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--dsw-fg-3,#7f7f7fcc);flex:1;font-size:11px;overflow:hidden}.wgSearchStatus{color:var(--dsw-fg-3,#7f7f7fcc);text-align:center;padding:8px;font-size:11px}.wgManualError{color:var(--dsw-fg-1,inherit);text-align:left;word-break:break-word}.wgRail{flex-direction:column;align-items:center;gap:12px;padding:8px 0 0;display:flex;overflow:hidden}.wgRail .wgSectionHeader{flex-direction:column;align-self:center;align-items:center;gap:12px;width:36px;height:auto;padding:0}.wgRail .wgIconButton{border-radius:50%;width:36px;height:36px}.wgRail .wgTreeBody{display:none}.wgAddError{color:var(--dsw-fg-1,inherit);white-space:pre-wrap;word-break:break-word;max-height:200px;font-size:12px;overflow-y:auto}.wgRenameInput{border:1px solid var(--dsw-border,#7f7f7f4d);background:var(--dsw-bg-1,transparent);width:100%;color:var(--dsw-fg-1,inherit);border-radius:6px;outline:none;padding:6px 8px;font-size:13px}.wgRenameInput:focus{border-color:var(--dsw-accent,#4a90d9)}.wgQuickOverlay{z-index:1100;background:var(--dsw-alias-bg-mask-1,#00000052);backdrop-filter:var(--dsw-mask-blur,blur(2px));justify-content:center;align-items:flex-start;padding:10vh 24px 24px;display:flex;position:fixed;inset:0}.wgQuickCard{border:1px solid var(--dsw-border,#7f7f7f33);background:var(--dsw-alias-bg-layer-2,var(--dsw-bg-1,#fff));width:min(640px,100%);max-height:min(560px,90vh - 48px);box-shadow:var(--dsw-elevation-prominent,0 16px 48px #00000040);box-sizing:border-box;border-radius:12px;flex-direction:column;gap:10px;padding:14px;display:flex;overflow:hidden}.wgQuickHeader{flex:none;justify-content:space-between;align-items:center;gap:12px;display:flex}.wgQuickTitle{color:var(--dsw-alias-label-primary,var(--dsw-fg-1,inherit));font-size:13px;font-weight:600}.wgQuickTabs{gap:2px;display:flex}.wgQuickTab{color:var(--dsw-alias-label-secondary,var(--dsw-fg-2,inherit));cursor:pointer;background:0 0;border:none;border-radius:6px;align-items:center;gap:6px;padding:4px 12px;font-family:inherit;font-size:12px;display:inline-flex}.wgQuickTab:hover{background:var(--dsw-alias-interactive-bg-hover,var(--dsw-bg-hover,#7f7f7f1f))}.wgQuickTabActive{background:var(--dsw-alias-interactive-bg-hover,var(--dsw-bg-selected,#4a90d92e));color:var(--dsw-alias-label-primary,var(--dsw-fg-1,inherit));font-weight:600}.wgQuickTabCount{background:var(--dsw-accent,#4a90d9);color:#fff;text-align:center;border-radius:8px;min-width:16px;height:16px;padding:0 4px;font-size:10px;font-weight:600;line-height:16px}.wgQuickSearchWrap{flex:none}.wgQuickSearch{border:1px solid var(--dsw-border,#7f7f7f4d);background:var(--dsw-bg-1,transparent);width:100%;height:34px;color:var(--dsw-alias-label-primary,var(--dsw-fg-1,inherit));box-sizing:border-box;border-radius:8px;outline:none;padding:0 10px;font-family:inherit;font-size:13px}.wgQuickSearch:focus{border-color:var(--dsw-accent,#4a90d9)}.wgQuickList{flex-direction:column;flex:auto;gap:2px;min-height:64px;padding-right:2px;display:flex;overflow-y:auto}.wgQuickRow{cursor:pointer;text-align:left;box-sizing:border-box;background:0 0;border:none;border-radius:8px;flex-direction:column;flex:none;gap:2px;width:100%;padding:7px 10px;font-family:inherit;display:flex}.wgQuickRow:hover,.wgQuickRowActive{background:var(--dsw-alias-interactive-bg-hover,var(--dsw-bg-hover,#7f7f7f1f))}.wgQuickRowSelected,.wgQuickRowCurrent{background:var(--dsw-bg-selected,#4a90d92e)}.wgQuickRowMain{align-items:center;gap:8px;width:100%;min-width:0;display:flex}.wgQuickRowTitle{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--dsw-alias-label-primary,var(--dsw-fg-1,inherit));flex:1;font-size:13px;font-weight:500;overflow:hidden}.wgQuickRunBadge{color:var(--dsw-accent,#4a90d9);flex:none;font-size:11px}.wgQuickTime{color:var(--dsw-alias-label-secondary,var(--dsw-fg-3,#7f7f7fcc));flex:none;font-size:11px}.wgQuickRowSub{min-width:0;display:flex}.wgQuickRowPath{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--dsw-alias-label-secondary,var(--dsw-fg-3,#7f7f7fcc));flex:1;font-size:11px;overflow:hidden}.wgQuickEmpty{text-align:center;color:var(--dsw-alias-label-secondary,var(--dsw-fg-3,#7f7f7fcc));padding:24px 8px;font-size:12px}.wgQuickFooter{flex:none;align-items:center;gap:8px;padding-top:2px;display:flex}.wgQuickSelected{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--dsw-alias-label-secondary,var(--dsw-fg-3,#7f7f7fcc));flex:1;font-size:12px;overflow:hidden}.wgQuickHint{text-align:center;color:var(--dsw-alias-label-secondary,var(--dsw-fg-3,#7f7f7fcc));flex:none;font-size:11px}.wgTabs{box-sizing:border-box;border-bottom:1px solid var(--dsw-alias-border-l2,#7f7f7f33);background:0 0;flex:none;align-items:stretch;gap:4px;min-width:0;height:56px;padding:8px 10px;display:flex}.wgTabsScroll{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;box-sizing:border-box;flex:auto;align-items:stretch;gap:6px;min-width:0;padding:1px 0;display:flex;overflow:auto hidden}.wgTabsScroll::-webkit-scrollbar{width:0;height:0;display:none}.wgTab{min-width:0;max-width:240px;box-shadow:inset 0 0 0 1px var(--dsw-alias-border-l2,#7f7f7f2e);color:var(--dsw-alias-label-secondary,var(--dsw-fg-2,inherit));border-radius:8px;flex:none;align-items:center;padding:0 6px 0 10px;transition:background .12s,box-shadow .12s;display:inline-flex}.wgTabText{flex-direction:column;flex:auto;justify-content:center;align-items:flex-start;gap:3px;min-width:0;height:100%;display:flex}.wgTabProject{text-overflow:ellipsis;white-space:nowrap;min-width:0;max-width:100%;font-family:var(--dsw-font-mono,ui-monospace, SFMono-Regular, Menlo, monospace);letter-spacing:.02em;color:var(--dsw-alias-label-secondary,var(--dsw-fg-3,inherit));opacity:.85;flex:none;font-size:10px;line-height:13px;overflow:hidden}.wgTab:hover{background:var(--dsw-alias-interactive-bg-hover,var(--dsw-bg-hover,#7f7f7f1f))}.wgTabActive{background:var(--dsw-alias-interactive-bg-hover,var(--dsw-bg-hover,#7f7f7f1f));box-shadow:inset 0 0 0 1px var(--dsw-alias-label-secondary,#7f7f7f73);color:var(--dsw-alias-label-primary,var(--dsw-fg-1,inherit))}.wgTabActive .wgTabProject{opacity:1}.wgTabMain{box-sizing:border-box;min-width:0;height:100%;color:inherit;cursor:pointer;background:0 0;border:none;flex:auto;align-items:center;gap:8px;padding:6px 0;font-family:inherit;font-size:12px;display:inline-flex}.wgTabStatus{flex:none;justify-content:center;align-items:center;width:12px;height:12px;display:inline-flex}.wgTabStatus[data-tab-state=idle]{opacity:.45}.wgTabLabel{text-overflow:ellipsis;white-space:nowrap;min-width:0;max-width:100%;color:var(--dsw-alias-label-primary,var(--dsw-fg-1,inherit));flex:none;font-size:12px;line-height:16px;overflow:hidden}.wgTabText>.wgTabLabel:only-child{align-self:center}.wgTabClose{width:20px;height:20px;color:inherit;cursor:pointer;opacity:0;background:0 0;border:none;border-radius:5px;flex:none;justify-content:center;align-items:center;margin-left:2px;padding:0;transition:opacity .12s,background .12s;display:inline-flex}.wgTab:hover .wgTabClose,.wgTab:focus-within .wgTabClose,.wgTabActive .wgTabClose{opacity:1}.wgTabClose:hover{background:var(--dsw-alias-interactive-bg-hover-solid,#7f7f7f33)}"; //#endregion //#region src/client/GroupsBrowser.tsx /** @@ -868,7 +2524,7 @@ window.__ModuleLoader__.load({ * @param props - composed slot props (shell owner share + store + injected actions). * @returns the region element tree. */ - function GroupsBrowser({ wide, expandSidebar, useSessions, useWorkspaces, useStore, actions, startSession, open, renameSession, forkSession, renameWorkspace, deleteWorkspace, insertWorkspaceBefore, archiveSession, insertSessionBefore, createWorkspace, pickDirectory, searchSessions, searchResultLimit, t }) { + function GroupsBrowser({ wide, expandSidebar, useSessions, useWorkspaces, useSessionStatus, useStore, actions, startSession, open, renameSession, forkSession, renameWorkspace, deleteWorkspace, insertWorkspaceBefore, archiveSession, insertSessionBefore, createWorkspace, pickDirectory, searchSessions, searchResultLimit, openTab, useTabs, tabActions, t }) { (0, react.useEffect)(() => { const style = document.createElement("style"); style.setAttribute("data-plugin", "dsh-workspace-groups"); @@ -878,6 +2534,18 @@ window.__ModuleLoader__.load({ style.remove(); }; }, []); + const [quickOpen, setQuickOpen] = (0, react.useState)(false); + (0, react.useEffect)(() => { + const onKeyDown = (e) => { + if (e.ctrlKey && !e.altKey && !e.metaKey && !e.shiftKey && (e.key === "r" || e.key === "R")) { + e.preventDefault(); + e.stopPropagation(); + setQuickOpen((v) => !v); + } + }; + window.addEventListener("keydown", onKeyDown, true); + return () => window.removeEventListener("keydown", onKeyDown, true); + }, []); const [config, setConfig] = (0, react.useState)({ categories: [] }); const [manual, setManual] = (0, react.useState)(EMPTY_MANUAL); const [configError, setConfigError] = (0, react.useState)(null); @@ -901,8 +2569,10 @@ window.__ModuleLoader__.load({ const categoryExpansion = useStore((s) => s.categoryExpansion); const workspaceExpansion = useStore((s) => s.workspaceExpansion); const list = useSessions((s) => s); - const current = list.current; + const statuses = useSessionStatus((s) => s); + const current = currentSessionId(list); const currentWorkspaceKey = current === void 0 ? void 0 : workspaces.find((w) => w.sessionIds.includes(current))?.workspaceId; + const currentRunning = current !== void 0 && ((statuses.get(current)?.running ?? false) || (list.byId[current]?.running ?? false)); (0, react.useEffect)(() => { if (current === void 0 || currentWorkspaceKey === void 0) return; const category = categoriesForCurrent(config, workspaces, current, manual); @@ -928,6 +2598,15 @@ window.__ModuleLoader__.load({ workspacePhase, workspaces ]); + (0, react.useEffect)(() => { + if (current === void 0) return; + openTab(current, statuses.get(current)); + }, [ + current, + list, + statuses, + openTab + ]); const [query, setQuery] = (0, react.useState)(""); const [searchExpanded, setSearchExpanded] = (0, react.useState)(false); const normalizedQuery = sanitizeSearchQuery(query).trim(); @@ -939,6 +2618,7 @@ window.__ModuleLoader__.load({ }); const searchInput = (0, react.useRef)(null); const searchRoot = (0, react.useRef)(null); + const branchScope = (0, react.useRef)(null); (0, react.useEffect)(() => { if (normalizedQuery === "") { setRemoteSearch({ @@ -1003,27 +2683,34 @@ window.__ModuleLoader__.load({ const groups = (0, react.useMemo)(() => deriveGroups(list, workspaces, archivedSessionIds, config, { expandedCategories, expandedWorkspaces - }, manual), [ + }, manual, statuses), [ list, workspaces, archivedSessionIds, config, manual, + statuses, expandedCategories, expandedWorkspaces ]); const topLevel = (0, react.useMemo)(() => deriveTopLevel(list, workspaces, archivedSessionIds, config, { expandedCategories, expandedWorkspaces - }, manual), [ + }, manual, statuses), [ list, workspaces, archivedSessionIds, config, manual, + statuses, expandedCategories, expandedWorkspaces ]); + const categoryByWorkspace = (0, react.useMemo)(() => { + const map = /* @__PURE__ */ new Map(); + for (const category of groups) for (const workspace of category.workspaces) map.set(workspace.workspaceId, category.label); + return map; + }, [groups]); const topLevelDropActive = dragging === "workspace" && topLevel.length === 0; const topLevelRef = { kind: "topLevel", @@ -1109,11 +2796,37 @@ window.__ModuleLoader__.load({ setSessionRenameDraft(currentTitle); setSessionRenameError(null); }; + const activateTab = (sessionId) => { + open(sessionId); + }; const onSessionArchive = (sessionId) => { archiveSession(sessionId).catch((reason) => { console.warn("session archive rejected:", reason); }); }; + const [folderApp, setFolderApp] = (0, react.useState)(void 0); + const [folderError, setFolderError] = (0, react.useState)(null); + (0, react.useEffect)(() => { + const controller = new AbortController(); + fetchOpenInApps(controller.signal).then((apps) => { + if (controller.signal.aborted) return; + setFolderApp(folderAppId(apps)); + }).catch(() => {}); + return () => { + controller.abort(); + }; + }, []); + const openInFolder = folderApp === void 0 ? void 0 : (workspaceId) => { + const workspace = workspaces.find((w) => w.workspaceId === workspaceId); + if (workspace === void 0) return; + openPathInApp(folderApp, workspace.path).catch((reason) => { + const detail = reason instanceof Error ? reason.message : String(reason); + setFolderError({ + id: Date.now(), + text: `${t("workspace.openInFolderError")}: ${detail}` + }); + }); + }; const [groupDialog, setGroupDialog] = (0, react.useState)(null); const [groupDraft, setGroupDraft] = (0, react.useState)(""); const [groupError, setGroupError] = (0, react.useState)(null); @@ -1399,6 +3112,16 @@ window.__ModuleLoader__.load({ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: `wgRoot${wide ? "" : " wgRail"}`, children: [ + /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SessionTabs, { + useSessions, + useSessionStatus, + useWorkspaces, + useTabs, + actions: tabActions, + activate: activateTab, + rename: onSessionRename, + t + }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: "wgSectionHeader", children: [ @@ -1417,7 +3140,7 @@ window.__ModuleLoader__.load({ onClick: () => { setSearchExpanded(true); }, - children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconSearchOutline16, { size: searchExpanded ? 11 : 14 }) + children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconSearchOutlineRegular, { size: searchExpanded ? 11 : 14 }) }), searchExpanded && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { ref: searchInput, @@ -1445,7 +3168,7 @@ window.__ModuleLoader__.load({ setQuery(""); setSearchExpanded(false); }, - children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCloseFill14, {}) + children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCloseFillMedium, {}) }) ] }), @@ -1462,7 +3185,7 @@ window.__ModuleLoader__.load({ setGroupError(null); setGroupDialog({ mode: "create" }); }, - children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconFolderOpenOutline16, { size: wide ? 16 : 18 }) + children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconFolderOpenOutlineRegular, { size: wide ? 16 : 18 }) }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, { @@ -1475,7 +3198,7 @@ window.__ModuleLoader__.load({ "aria-label": t("workspace.add"), disabled: adding, onClick: addWorkspace, - children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconProjectAddOutline16, { size: wide ? 16 : 18 }) + children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconProjectAddOutlineRegular, { size: wide ? 16 : 18 }) }) }) ] @@ -1492,7 +3215,7 @@ window.__ModuleLoader__.load({ setSearchExpanded(true); expandSidebar(); }, - children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconSearchOutline16, { size: 18 }) + children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconSearchOutlineRegular, { size: 18 }) }) }) }), @@ -1518,6 +3241,7 @@ window.__ModuleLoader__.load({ workspaces, config, archivedSessionIds, + statuses, query: normalizedQuery, remote: remoteSearch, resultLimit: searchResultLimit, @@ -1527,109 +3251,118 @@ window.__ModuleLoader__.load({ manual, t }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { - className: "wgList", - role: "tree", - "aria-label": t("section.workspaces"), - children: [ - groups.length === 0 && topLevel.length === 0 && !topLevelDropActive && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { - className: "wgEmpty", - children: workspacePhase === "ready" ? t("empty.noWorkspaces") : t("empty.none") - }), - groups.map((category) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CategorySection, { - category, - current, - now, - t, - dragIndicator, - onDragOverRow, - onDragLeaveRow, - onDropRow, - onDragStartCategory: onDragStartCategory(category.key), - onDragStartWorkspace, - onToggleCategory: () => { - actions.setCategoryExpanded(category.key, !category.expanded); - }, - onToggleWorkspace: (key) => { - actions.setWorkspaceExpanded(key, !workspaceExpansion[key]); - }, - onNewSession: startSession, - onOpen: open, - onRenameRequest: (workspaceId, title) => { - setRenameTarget({ - workspaceId, - currentTitle: title - }); - setRenameDraft(title); - setRenameError(null); - }, - onDeleteRequest: (workspaceId, title) => { - setDeleteTarget({ - workspaceId, - title - }); - setDeleteError(null); - }, - onSessionRename, - onSessionArchive, - onFork: forkSession, - onGroupRename: () => { - setGroupDraft(category.key); - setGroupError(null); - setGroupDialog({ - mode: "rename", - from: category.key - }); - }, - onGroupDelete: () => { - setGroupDeleteTarget(category.key); - setGroupDeleteError(null); - }, - onMoveOut: (workspaceId) => { - moveWorkspaceTo(workspaceId, UNCATEGORIZED_KEY); - }, - canMoveOut: (workspaceId) => { - const workspace = workspaces.find((w) => w.workspaceId === workspaceId); - return workspace !== void 0 && resolveCategory(config, manual, workspace.workspaceId, workspace.path, workspace.title) !== void 0; - } - }, category.key)), - (topLevel.length > 0 || topLevelDropActive) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TopLevelSection, { - topLevel, - current, - now, - t, - dragging: dragging === "workspace", - dragIndicator, - topLevelRef, - onDragOverRow, - onDragOverTopLevelArea, - onDragLeaveRow, - onDropRow, - onDragStartWorkspace, - onToggleWorkspace: (key) => { - actions.setWorkspaceExpanded(key, !workspaceExpansion[key]); - }, - onNewSession: startSession, - onOpen: open, - onRenameRequest: (workspaceId, title) => { - setRenameTarget({ - workspaceId, - currentTitle: title - }); - setRenameDraft(title); - setRenameError(null); - }, - onDeleteRequest: (workspaceId, title) => { - setDeleteTarget({ - workspaceId, - title - }); - setDeleteError(null); - }, - onSessionRename, - onSessionArchive, - onFork: forkSession - }) - ] + className: "wgTreeWrap", + ref: branchScope, + children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(FlowerBranch, { + scope: branchScope.current, + spinning: currentRunning + }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { + className: "wgList", + role: "tree", + "aria-label": t("section.workspaces"), + children: [ + groups.length === 0 && topLevel.length === 0 && !topLevelDropActive && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { + className: "wgEmpty", + children: workspacePhase === "ready" ? t("empty.noWorkspaces") : t("empty.none") + }), + groups.map((category) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CategorySection, { + category, + current, + now, + t, + dragIndicator, + onDragOverRow, + onDragLeaveRow, + onDropRow, + onDragStartCategory: onDragStartCategory(category.key), + onDragStartWorkspace, + onToggleCategory: () => { + actions.setCategoryExpanded(category.key, !category.expanded); + }, + onToggleWorkspace: (key) => { + actions.setWorkspaceExpanded(key, !workspaceExpansion[key]); + }, + onNewSession: startSession, + onOpen: open, + onRenameRequest: (workspaceId, title) => { + setRenameTarget({ + workspaceId, + currentTitle: title + }); + setRenameDraft(title); + setRenameError(null); + }, + onDeleteRequest: (workspaceId, title) => { + setDeleteTarget({ + workspaceId, + title + }); + setDeleteError(null); + }, + onSessionRename, + onSessionArchive, + onFork: forkSession, + onGroupRename: () => { + setGroupDraft(category.key); + setGroupError(null); + setGroupDialog({ + mode: "rename", + from: category.key + }); + }, + onGroupDelete: () => { + setGroupDeleteTarget(category.key); + setGroupDeleteError(null); + }, + onMoveOut: (workspaceId) => { + moveWorkspaceTo(workspaceId, UNCATEGORIZED_KEY); + }, + onOpenInFolder: openInFolder, + canMoveOut: (workspaceId) => { + const workspace = workspaces.find((w) => w.workspaceId === workspaceId); + return workspace !== void 0 && resolveCategory(config, manual, workspace.workspaceId, workspace.path, workspace.title) !== void 0; + } + }, category.key)), + (topLevel.length > 0 || topLevelDropActive) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TopLevelSection, { + topLevel, + current, + now, + t, + dragging: dragging === "workspace", + dragIndicator, + topLevelRef, + onDragOverRow, + onDragOverTopLevelArea, + onDragLeaveRow, + onDropRow, + onDragStartWorkspace, + onToggleWorkspace: (key) => { + actions.setWorkspaceExpanded(key, !workspaceExpansion[key]); + }, + onNewSession: startSession, + onOpen: open, + onRenameRequest: (workspaceId, title) => { + setRenameTarget({ + workspaceId, + currentTitle: title + }); + setRenameDraft(title); + setRenameError(null); + }, + onDeleteRequest: (workspaceId, title) => { + setDeleteTarget({ + workspaceId, + title + }); + setDeleteError(null); + }, + onSessionRename, + onSessionArchive, + onFork: forkSession, + onOpenInFolder: openInFolder + }) + ] + })] }) ] }), @@ -1830,6 +3563,27 @@ window.__ModuleLoader__.load({ role: "alert", children: addError }) + }), + folderError !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Toast, { + text: folderError.text, + icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconWarningOutlineRegular, { size: 16 }), + onDone: () => { + setFolderError(null); + } + }, folderError.id), + quickOpen && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(QuickPanel, { + onClose: () => { + setQuickOpen(false); + }, + list, + workspaces, + archivedSessionIds, + categoryByWorkspace, + current, + startSession, + openSession: open, + now, + t }) ] }); @@ -1841,7 +3595,7 @@ window.__ModuleLoader__.load({ return resolveCategory(config, manual, workspace.workspaceId, workspace.path, workspace.title); } /** One category section: header row + expanded workspace folders. */ - function CategorySection({ category, current, now, t, dragIndicator, onDragOverRow, onDragLeaveRow, onDropRow, onDragStartCategory, onDragStartWorkspace, onToggleCategory, onToggleWorkspace, onNewSession, onOpen, onRenameRequest, onDeleteRequest, onSessionRename, onSessionArchive, onFork, onGroupRename, onGroupDelete, onMoveOut, canMoveOut }) { + function CategorySection({ category, current, now, t, dragIndicator, onDragOverRow, onDragLeaveRow, onDropRow, onDragStartCategory, onDragStartWorkspace, onToggleCategory, onToggleWorkspace, onNewSession, onOpen, onRenameRequest, onDeleteRequest, onSessionRename, onSessionArchive, onFork, onGroupRename, onGroupDelete, onMoveOut, canMoveOut, onOpenInFolder }) { const categoryLine = dragIndicator?.mode === "line" && dragIndicator.row.kind === "category" && dragIndicator.row.key === category.key ? dragIndicator.before ? "before" : "after" : void 0; const categoryInto = dragIndicator?.mode === "into" && dragIndicator.categoryKey === category.key; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { @@ -1887,6 +3641,9 @@ window.__ModuleLoader__.load({ onMoveOut: () => { onMoveOut(workspace.workspaceId); }, + ...onOpenInFolder !== void 0 ? { onOpenInFolder: () => { + onOpenInFolder(workspace.workspaceId); + } } : {}, dropActive: false, ...dragIndicator?.mode === "line" && dragIndicator.row.kind === "workspace" && dragIndicator.row.key === workspace.workspaceId ? { insertLine: dragIndicator.before ? "before" : "after" } : {}, onRowDragOver: onDragOverRow({ @@ -1899,7 +3656,7 @@ window.__ModuleLoader__.load({ key: workspace.workspaceId }), onDragStartExtra: onDragStartWorkspace(workspace.workspaceId) - }), workspace.expanded && workspace.sessions.map((session) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SessionRow, { + }), workspace.expanded && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TreeChildren, { children: workspace.sessions.map((session) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SessionRow, { node: session, currentId: current, now, @@ -1908,7 +3665,7 @@ window.__ModuleLoader__.load({ onRename: onSessionRename, onFork, onArchive: onSessionArchive - }, session.id))] + }, session.id)) })] }, workspace.workspaceId)) })] }); @@ -1922,7 +3679,7 @@ window.__ModuleLoader__.load({ * last row); * - an empty top level shows a standalone line under the last group folder. */ - function TopLevelSection({ topLevel, current, now, t, dragging, dragIndicator, topLevelRef, onDragOverRow, onDragOverTopLevelArea, onDragLeaveRow, onDropRow, onDragStartWorkspace, onToggleWorkspace, onNewSession, onOpen, onRenameRequest, onDeleteRequest, onSessionRename, onSessionArchive, onFork }) { + function TopLevelSection({ topLevel, current, now, t, dragging, dragIndicator, topLevelRef, onDragOverRow, onDragOverTopLevelArea, onDragLeaveRow, onDropRow, onDragStartWorkspace, onToggleWorkspace, onNewSession, onOpen, onRenameRequest, onDeleteRequest, onSessionRename, onSessionArchive, onFork, onOpenInFolder }) { const emptyLineActive = dragIndicator?.mode === "line" && dragIndicator.row.kind === "topLevel" && dragIndicator.row.key === topLevelRef.key; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { role: "group", @@ -1956,6 +3713,9 @@ window.__ModuleLoader__.load({ onDelete: () => { onDeleteRequest(workspace.workspaceId, workspace.label); }, + ...onOpenInFolder !== void 0 ? { onOpenInFolder: () => { + onOpenInFolder(workspace.workspaceId); + } } : {}, ...dragIndicator?.mode === "line" && dragIndicator.row.kind === "topLevel" && dragIndicator.row.key === workspace.workspaceId ? { insertLine: dragIndicator.before ? "before" : "after" } : {}, onRowDragOver: onDragOverRow({ kind: "topLevel", @@ -1967,7 +3727,7 @@ window.__ModuleLoader__.load({ key: workspace.workspaceId }), onDragStartExtra: onDragStartWorkspace(workspace.workspaceId) - }), workspace.expanded && workspace.sessions.map((session) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SessionRow, { + }), workspace.expanded && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TreeChildren, { children: workspace.sessions.map((session) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SessionRow, { node: session, currentId: current, now, @@ -1976,7 +3736,7 @@ window.__ModuleLoader__.load({ onRename: onSessionRename, onFork, onArchive: onSessionArchive - }, session.id))] + }, session.id)) })] }, workspace.workspaceId))] }); } @@ -1985,7 +3745,7 @@ window.__ModuleLoader__.load({ * 分类文件夹 → 项目文件夹 → 命中会话行. Reuses the same row components as * the idle tree, so search keeps the same folder hierarchy the user is used to. */ - function SearchBody({ list, workspaces, config, archivedSessionIds, query, remote, resultLimit, current, now, open, manual, t }) { + function SearchBody({ list, workspaces, config, archivedSessionIds, statuses, query, remote, resultLimit, current, now, open, manual, t }) { const currentRemote = remote.query === query ? remote : { query, status: "loading", @@ -2001,13 +3761,14 @@ window.__ModuleLoader__.load({ currentRemote, resultLimit ]); - const searchTree = (0, react.useMemo)(() => deriveSearchGroups(list, workspaces, config, matches.matchedIds, archivedSessionIds, manual, matches.snippetsBySession), [ + const searchTree = (0, react.useMemo)(() => deriveSearchGroups(list, workspaces, config, matches.matchedIds, archivedSessionIds, manual, matches.snippetsBySession, statuses), [ list, workspaces, config, matches, archivedSessionIds, - manual + manual, + statuses ]); const groups = searchTree.categories; const searchTopLevel = searchTree.topLevel; @@ -2126,6 +3887,8 @@ window.__ModuleLoader__.load({ "workspace.renameConfirm": "重命名", "workspace.renameCancel": "取消", "workspace.moveOutOfGroup": "移出分组", + "workspace.openInFolder": "在文件夹中打开", + "workspace.openInFolderError": "打开文件夹失败", "group.create": "新建分组", "group.createTitle": "新建分组", "group.createPlaceholder": "分组名称", @@ -2161,7 +3924,22 @@ window.__ModuleLoader__.load({ configUnavailable: "分组配置不可用", collapse: "折叠", expandMore: "展开全部", - newSession: "新建会话" + newSession: "新建会话", + "quick.title": "快速切换", + "quick.tab.workspaces": "工作区", + "quick.tab.sessions": "全部会话", + "quick.search.placeholder": "搜索工作区…", + "quick.search.sessions": "搜索会话…", + "quick.empty.workspaces": "没有匹配的工作区", + "quick.action.newSession": "新建会话", + "quick.action.running": "切到运行中的会话", + "quick.action.noneRunning": "没有正在运行的会话", + "quick.empty.sessions": "还没有会话", + "quick.select.hint": "在上方选择一个工作区", + "quick.hint": "Ctrl+R 开关 · Enter 打开/新建 · Esc 关闭", + "tabs.aria": "已打开的会话", + "tabs.close": "关闭标签", + "tabs.archive": "归档" }; /** English dictionary. */ const en = { @@ -2191,6 +3969,8 @@ window.__ModuleLoader__.load({ "workspace.renameConfirm": "Rename", "workspace.renameCancel": "Cancel", "workspace.moveOutOfGroup": "Move out of group", + "workspace.openInFolder": "Open in folder", + "workspace.openInFolderError": "Could not open the folder", "group.create": "New group", "group.createTitle": "New group", "group.createPlaceholder": "Group name", @@ -2226,19 +4006,43 @@ window.__ModuleLoader__.load({ configUnavailable: "Grouping config unavailable", collapse: "Collapse", expandMore: "Show all", - newSession: "New Session" + newSession: "New Session", + "quick.title": "Quick switch", + "quick.tab.workspaces": "Workspaces", + "quick.tab.sessions": "All sessions", + "quick.search.placeholder": "Search workspaces…", + "quick.search.sessions": "Search sessions…", + "quick.empty.workspaces": "No matching workspaces", + "quick.action.newSession": "New Session", + "quick.action.running": "Switch to running session", + "quick.action.noneRunning": "No running session", + "quick.empty.sessions": "No sessions yet", + "quick.select.hint": "Pick a workspace above", + "quick.hint": "Ctrl+R toggle · Enter open/new · Esc close", + "tabs.aria": "Open sessions", + "tabs.close": "Close tab", + "tabs.archive": "Archive" }; //#endregion //#region src/client/index.ts /** Dictionary namespace owned by this plugin. */ const NS = "workspaceGroups"; - /** Required services (cordis fiber inject). */ + /** + * Tab visibility policy. `auto` is the behaviour the feature was asked for — + * opening a session that has no tab yet adds one at the front of the strip; + * `manual` leaves the strip to callers that drive `openTab` themselves. + */ + const TAB_OPEN_MODE = "auto"; + /** + * Required services (cordis fiber inject; 0.1.6 service roster). `uiWorkspace` + * is the shipped navigation face this entry delegates selection to. + */ const inject = [ "slots", "sessions", "workspaces", - "locale", - "connection" + "uiWorkspace", + "locale" ]; /** * Register the grouped browser once the sidebar slot declaration is on the @@ -2250,7 +4054,38 @@ window.__ModuleLoader__.load({ ctx.effect(() => ctx.locale.register(NS, { zh, en - }), "dsh-workspace-groups: dictionaries"); + }), "@dsh-xhl/workspace-groups: dictionaries"); + const tabInstance = createSessionTabsStore().create(); + const tabWrites = tabInstance.actions; + let hydrated = false; + ctx.effect(() => { + const stop = tabInstance.subscribe(() => { + if (!hydrated) return; + saveTabs({ + order: tabInstance.getSnapshot().order, + tabs: tabInstance.getSnapshot().tabs + }); + }); + return () => { + stop(); + }; + }, "@dsh-xhl/workspace-groups: tab persistence"); + ctx.effect(() => { + let cancelled = false; + loadTabs().then((tabs) => { + if (cancelled) return; + if (tabs.length > 0) tabWrites.restore(tabs.map((tab) => ({ + sessionId: tab.sessionId, + order: tab.order + }))); + hydrated = true; + }).catch(() => { + if (!cancelled) hydrated = true; + }); + return () => { + cancelled = true; + }; + }, "@dsh-xhl/workspace-groups: tab restore"); const searchSessions = async (query, signal) => { const result = await ctx.sessions.search(query, signal); if (!result.ok) throw new Error(result.error.message); @@ -2258,27 +4093,32 @@ window.__ModuleLoader__.load({ }; const browserInjected = () => ({ startSession: (workspaceId) => { - ctx.workspaces.startSession(workspaceId); + ctx.uiWorkspace.startSession(workspaceId); }, open: (sessionId) => { - ctx.sessions.open(sessionId); + ctx.uiWorkspace.openSession(sessionId); }, + forkSession: (sessionId) => { + ctx.uiWorkspace.forkSession(sessionId).catch((reason) => { + console.warn("fork session failed:", reason); + }); + }, + archiveSession: async (sessionId) => { + await ctx.uiWorkspace.archiveSession(sessionId); + }, + pickDirectory: () => ctx.uiWorkspace.pickDirectory(), searchSessions, searchResultLimit: ctx.sessions.searchResultLimit, + hooks: { directoryFlow: { + getSnapshot: () => true, + subscribe: () => () => {} + } }, renameSession: async (sessionId, title) => { const session = ctx.sessions.binding(sessionId)?.session; if (session === void 0) throw new Error(`unknown session "${sessionId}"`); const result = await session.rename(title); if (!result.ok) throw new Error(result.error.message); }, - forkSession: (sessionId) => { - ctx.sessions.fork({ - sessionId, - increaseTitle: true - }).then((childId) => { - ctx.sessions.open(childId); - }).catch(() => {}); - }, renameWorkspace: async (workspaceId, title) => { await ctx.workspaces.rename(workspaceId, title); }, @@ -2288,15 +4128,16 @@ window.__ModuleLoader__.load({ insertWorkspaceBefore: async (workspaceId, beforeWorkspaceId) => { await ctx.workspaces.insertBefore(workspaceId, beforeWorkspaceId); }, - archiveSession: async (sessionId) => { - await ctx.workspaces.archiveSession(sessionId); - }, insertSessionBefore: async (workspaceId, sessionId, beforeSessionId) => { await ctx.workspaces.insertSessionBefore(workspaceId, sessionId, beforeSessionId); }, createWorkspace: (input) => ctx.workspaces.create(input), - pickDirectory: () => ctx.workspaces.pickDirectory(), - hooks: { hostDescription: ctx.get("connection").hostDescription } + openTab: (sessionId, status) => { + const summary = ctx.sessions.list.getSnapshot().byId[sessionId]; + if (shouldOpenTab(TAB_OPEN_MODE, summary, status)) tabWrites.touch(sessionId); + }, + useTabs: createStoreHook(tabInstance), + tabActions: tabWrites }); ctx.slots.inject("sidebar.workspaces", () => ctx.slots.register({ name: "sidebar.workspaces", @@ -2304,7 +4145,7 @@ window.__ModuleLoader__.load({ store: createGroupsViewStore(), inject: browserInjected, locale: NS, - registrant: "dsh-workspace-groups" + registrant: "@dsh-xhl/workspace-groups" }, GroupsBrowser)); } //#endregion diff --git a/lib/client.js.map b/lib/client.js.map index 240ac58..88c3d28 100644 --- a/lib/client.js.map +++ b/lib/client.js.map @@ -1 +1 @@ -{"version":3,"file":"client.js","names":["defineStore","indexSubagentDescendants","useState","IconTriangleRightFill14","IconFolderOpen16","IconFolderClose16","Menu","IconEditOutline16","IconTrashOutline16","IconEllipsisOutline16","IconFolderOpenOutline16","IconProjectAddOutline16","IconPlusOutline16","IconBranchOutline16","IconArchiveOutline20","StateDot","css","useState","useRef","useMemo","IconSearchOutline16","IconCloseFill14","Tooltip","IconFolderOpenOutline16","IconProjectAddOutline16","Modal","Button"],"sources":["../src/client/store-core.ts","../src/client/stores.ts","../src/core/types.ts","../src/core/matcher.ts","../src/client/tree.ts","../src/client/rows.tsx","../src/client/GroupsBrowser.tsx","../src/client/locales.ts","../src/client/index.ts"],"sourcesContent":["/**\n * Pure expansion-state transforms for the workspace-groups store. Kept free\n * of any runtime import so both the store (which binds them via defineStore)\n * and unit tests (which exercise them directly) share one implementation.\n *\n * Expansion semantics follow the official ui-workspace store: collapse\n * WRITES `false` (never deletes the key). The browser's auto-expand guard\n * uses `Object.hasOwn` — a present `false` means \"user deliberately\n * collapsed this\" and must NOT be re-expanded; only a fully absent key means\n * \"never touched\" and may auto-expand. (Earlier versions deleted the key on\n * collapse, which made the current category/workspace impossible to fold.)\n */\n\n/** Workspace-groups browser viewing state persisted across surface remounts and reloads. */\nexport interface GroupsViewState {\n /** Category folder expansion keyed by category label (absent = never touched). */\n categoryExpansion: Record\n /** Workspace folder expansion keyed by workspace id (absent = never touched). */\n workspaceExpansion: Record\n}\n\n/** Collapse writes `false` (key retained); expand writes `true`. */\nexport function setCategoryExpandedImpl(state: GroupsViewState, key: string, expanded: boolean): void {\n state.categoryExpansion[key] = expanded\n}\n\n/** Collapse writes `false` (key retained); expand writes `true`. */\nexport function setWorkspaceExpandedImpl(state: GroupsViewState, key: string, expanded: boolean): void {\n state.workspaceExpansion[key] = expanded\n}\n\n/** Drop expansion keys that no longer exist (renames/deletes/config edits). */\nexport function retainKeysImpl(\n state: GroupsViewState,\n categoryKeys: readonly string[],\n workspaceKeys: readonly string[],\n): void {\n state.categoryExpansion = Object.fromEntries(\n Object.entries(state.categoryExpansion).filter(([key]) => categoryKeys.includes(key)),\n )\n state.workspaceExpansion = Object.fromEntries(\n Object.entries(state.workspaceExpansion).filter(([key]) => workspaceKeys.includes(key)),\n )\n}\n","/**\n * The workspace-groups viewing store: category / workspace folder expansion,\n * persisted across reloads under an independent key (the official\n * ui-workspace store keeps its own `dsh.workspace.view.v5` — we never touch\n * it). Module level exports the factory only (a module-level handle would pin\n * the store identity across plugin reloads); register() receives the factory\n * and the browser derives its PropsStore share from the return type.\n *\n * The action implementations live in `store-core.ts` (pure, runtime-free) so\n * unit tests exercise the real semantics without a browser module loader;\n * this file only binds them through defineStore.\n */\nimport { defineStore, type EngineStoreHandle } from '@deepseek-ai/dsh-client-runtime/client'\nimport {\n retainKeysImpl,\n setCategoryExpandedImpl,\n setWorkspaceExpandedImpl,\n type GroupsViewState,\n} from './store-core.ts'\n\n/** Annotation twin of the actions literal below (structural type, satisfies `ActionsDecl`). */\ntype GroupsViewActions = {\n setCategoryExpanded: typeof setCategoryExpandedImpl\n setWorkspaceExpanded: typeof setWorkspaceExpandedImpl\n retainKeys: typeof retainKeysImpl\n}\n\n/**\n * Create the workspace-groups viewing store handle.\n * @returns the store handle (spec + type + identity + factory in one).\n */\nexport function createGroupsViewStore(): EngineStoreHandle {\n return defineStore({\n init: () => ({ categoryExpansion: {}, workspaceExpansion: {} }),\n persist: 'dsh.workspace.groups.view.v1',\n actions: {\n setCategoryExpanded: setCategoryExpandedImpl,\n setWorkspaceExpanded: setWorkspaceExpandedImpl,\n retainKeys: retainKeysImpl,\n },\n })\n}\n\nexport type { GroupsViewState } from './store-core.ts'\n","/**\n * Shared config types for dsh-workspace-groups. Pure types (zero runtime\n * deps) so both halves — the node half (sidecar YAML reading) and the\n * browser half (tree derivation) — compile against the same contract.\n */\n\n/** One classification rule: any rule that matches places the workspace in the category. */\nexport interface GroupRule {\n /** Absolute path prefix match (normalized, case-sensitive). */\n pathPrefix?: string\n /** Case-insensitive substring match against the workspace display title. */\n nameContains?: string\n /** Case-insensitive substring match against the workspace directory basename. */\n basenameContains?: string\n /** Exact absolute path match (normalized). */\n pathExact?: string\n}\n\n/** One category folder in the sidebar tree. */\nexport interface GroupCategory {\n /** Display label of the category folder. */\n name: string\n /** Rules; a workspace is classified here when ANY rule matches. */\n rules: GroupRule[]\n}\n\n/** The full sidecar configuration (mirrors workspace-groups.yaml). */\nexport interface GroupsConfig {\n /** Category folders, in render order. First match wins. */\n categories: GroupCategory[]\n /**\n * Runtime grouping overlay (manual groups + per-workspace overrides).\n * Optional: the YAML file itself never carries it — the host GET route\n * merges it from `workspace-groups.manual.json`, and the browser PUT route\n * replaces it whole.\n */\n manual?: ManualGroups\n}\n\n/**\n * Runtime-managed grouping overlay: groups created in the sidebar UI plus\n * per-workspace category overrides and user-controlled ordering. Owned by the\n * plugin (JSON sidecar, `$DSH_HOME/workspace-groups.manual.json`), never\n * written back into the operator YAML.\n *\n * All new fields are optional for backward compatibility (files written by\n * older plugin versions keep working); rendering falls back to sensible\n * defaults when they are absent.\n */\nexport interface ManualGroups {\n /**\n * Manually created category folder names. These have no rules — they render\n * even while empty (a new group appears before anything is dragged into\n * it) and hold only workspaces assigned to them.\n */\n categories: string[]\n /**\n * Per-workspace category override, keyed by workspace id. Value is a\n * category display name (rule or manual), or `null` to force the workspace\n * into the uncategorized bucket even when a rule would match. An absent\n * key means \"classify by rules\".\n */\n assignments: Record\n /**\n * Display order of all category keys (rule display names + manual names).\n * The uncategorized bucket is never listed — it always renders last.\n * Absent = rule categories first (YAML order), manual groups appended in\n * creation order.\n */\n categoryOrder?: string[]\n /**\n * Per-category ordered workspace ids (user drag-reorder within a group).\n * Keyed by category display name; absent key = host registration order.\n */\n workspaceOrder?: Record\n /**\n * Rule category rename overrides: original YAML rule category name →\n * display name (UI rename of a rule group). Rules still classify by the\n * original name; only the rendered label/keys change.\n */\n renamed?: Record\n /**\n * Rule category original names hidden by a UI delete. Hidden rules are\n * inert: workspaces matching them become top-level (ungrouped).\n */\n hidden?: string[]\n}\n\n/**\n * Legacy label of the fallback bucket. The top-level (ungrouped) concept\n * replaced the rendered \"未分类\" bucket: workspaces in no group render as\n * top-level rows beside the group folders. The constant survives for data\n * compatibility (reserved name, assignment null marker).\n */\nexport const UNCATEGORIZED_LABEL = '未分类'\n\n/**\n * Reserved key under `workspaceOrder` holding the manual order of TOP-LEVEL\n * (ungrouped) project rows. Distinct from any real group display name (a group\n * may not be named this), so it can never collide; the top-level list's order\n * is preserved exactly like a group's, and top-level rows can be reordered by\n * dragging.\n */\nexport const TOP_LEVEL_ORDER_KEY = '__topLevel__'\n\n/** Normalize a path for prefix matching: trailing slashes stripped. */\nexport function normalizePath(path: string): string {\n return path.replace(/[/\\\\]+$/, '')\n}\n","/**\n * Pure classification + ordering logic: decides which category a workspace\n * belongs to and how categories/workspaces are ordered. Shared by the host\n * half (validation) and the client half (tree derivation), so the semantics\n * can never drift between the config surface and the rendered tree.\n *\n * Category identity: a category's STABLE origin is its YAML rule category\n * name (or a manual-group name). Its DISPLAY key is what the tree renders and\n * what assignments reference — for rule categories that is the rename\n * override when present. Hidden rule categories are inert: workspaces that\n * would match them become top-level (ungrouped).\n */\nimport {\n normalizePath,\n UNCATEGORIZED_LABEL,\n type GroupCategory,\n type GroupRule,\n type GroupsConfig,\n type ManualGroups,\n} from './types.ts'\n\n/** One rule match against a workspace's path and title. */\nfunction ruleMatches(rule: GroupRule, path: string, title: string): boolean {\n const normalized = normalizePath(path)\n if (rule.pathPrefix !== undefined && normalized.startsWith(normalizePath(rule.pathPrefix))) return true\n if (rule.pathExact !== undefined && normalized === normalizePath(rule.pathExact)) return true\n if (rule.nameContains !== undefined && title.toLowerCase().includes(rule.nameContains.toLowerCase())) return true\n if (rule.basenameContains !== undefined) {\n const base = path.replace(/[/\\\\]+$/, '').split(/[/\\\\]/).pop() ?? ''\n if (base.toLowerCase().includes(rule.basenameContains.toLowerCase())) return true\n }\n return false\n}\n\n/** Classify a workspace by rules only; hidden categories are inert. */\nexport function classify(categories: readonly GroupCategory[], path: string, title: string): GroupCategory | undefined {\n for (const category of categories) {\n if (category.rules.some(rule => ruleMatches(rule, path, title))) return category\n }\n return undefined\n}\n\n/** Display name of a rule category: the rename override when present. */\nexport function ruleDisplayName(manual: ManualGroups | undefined, originalName: string): string {\n return manual?.renamed?.[originalName] ?? originalName\n}\n\n/** Whether a rule category has been hidden by a UI delete. */\nexport function isHiddenRule(manual: ManualGroups | undefined, originalName: string): boolean {\n return manual?.hidden?.includes(originalName) ?? false\n}\n\n/** Rule category display names, in YAML render order (hidden ones excluded). */\nexport function ruleDisplayNames(categories: readonly GroupCategory[], manual: ManualGroups | undefined): string[] {\n const names: string[] = []\n for (const category of categories) {\n if (isHiddenRule(manual, category.name)) continue\n names.push(ruleDisplayName(manual, category.name))\n }\n return names\n}\n\n/** Original YAML rule name whose display name equals `key` (undefined when none). */\nexport function originalRuleNameForDisplay(\n categories: readonly GroupCategory[],\n manual: ManualGroups | undefined,\n key: string,\n): string | undefined {\n return categories.find(c => ruleDisplayName(manual, c.name) === key)?.name\n}\n\n/**\n * Effective category entries in display order: rule categories (YAML order,\n * hidden skipped, renamed applied) first, then manual-only groups in\n * creation order — unless `manual.categoryOrder` overrides the sequence.\n * Top-level (ungrouped) workspaces are never included; they render as\n * separate top-level rows after the group folders.\n */\nexport interface EffectiveCategory {\n /** Display key (what the tree renders and assignments reference). */\n key: string\n /** Origin: a YAML rule category or a manual group. */\n source: 'rule' | 'manual'\n}\n\nexport function effectiveCategories(\n config: GroupsConfig,\n manual: ManualGroups | undefined,\n): EffectiveCategory[] {\n const entries: EffectiveCategory[] = []\n const seen = new Set()\n for (const category of config.categories) {\n if (isHiddenRule(manual, category.name)) continue\n const key = ruleDisplayName(manual, category.name)\n if (seen.has(key)) continue\n seen.add(key)\n entries.push({ key, source: 'rule' })\n }\n for (const name of manual?.categories ?? []) {\n if (seen.has(name)) continue\n seen.add(name)\n entries.push({ key: name, source: 'manual' })\n }\n const order = manual?.categoryOrder\n if (order === undefined || order.length === 0) return entries\n // Stable sort by position in categoryOrder; entries absent from the order\n // keep their relative default position after all ordered ones.\n const position = new Map(order.map((key, index) => [key, index]))\n return [...entries].sort((a, b) => {\n const pa = position.get(a.key)\n const pb = position.get(b.key)\n if (pa !== undefined && pb !== undefined) return pa - pb\n if (pa !== undefined) return -1\n if (pb !== undefined) return 1\n return 0\n })\n}\n\n/** Display keys of all effective categories (top-level workspaces excluded). */\nexport function displayCategoryKeys(config: GroupsConfig, manual: ManualGroups | undefined): string[] {\n return effectiveCategories(config, manual).map(e => e.key)\n}\n\n/**\n * Resolve the category key a workspace renders under, or `undefined` when it\n * is top-level (ungrouped). Precedence: manual override (`null` = forced\n * top-level) → rule classification (hidden rules inert) → top-level.\n */\nexport function resolveCategory(\n config: GroupsConfig,\n manual: ManualGroups | undefined,\n workspaceId: string,\n path: string,\n title: string,\n): string | undefined {\n const override = manual?.assignments[workspaceId]\n if (override !== undefined) return override ?? undefined // null forces top-level\n const matched = classify(config.categories, path, title)\n if (matched === undefined) return undefined\n if (isHiddenRule(manual, matched.name)) return undefined\n return ruleDisplayName(manual, matched.name)\n}\n\n/** Whether a category key is a manual-only group (manageable via list). */\nexport function isManualOnlyCategory(\n config: GroupsConfig,\n manual: ManualGroups | undefined,\n key: string,\n): boolean {\n return (manual?.categories.includes(key) ?? false) && !ruleDisplayNames(config.categories, manual).includes(key)\n}\n\n/**\n * Names that may not be used for a new/renamed group: the legacy reserved\n * label plus every current display key.\n */\nexport function takenCategoryNames(config: GroupsConfig, manual: ManualGroups | undefined): Set {\n const taken = new Set(displayCategoryKeys(config, manual))\n taken.add(UNCATEGORIZED_LABEL)\n return taken\n}\n\n/**\n * Order a bucket of workspace ids: the stored per-category order first\n * (filtered to actual members), then any remaining members in `fallback`\n * (host) order. Deterministic; the renderer never re-sorts on its own.\n */\nexport function orderedWorkspaceIds(\n manual: ManualGroups | undefined,\n categoryKey: string,\n members: readonly string[],\n): string[] {\n const stored = manual?.workspaceOrder?.[categoryKey]\n if (stored === undefined || stored.length === 0) return [...members]\n const memberSet = new Set(members)\n const ordered: string[] = []\n const seen = new Set()\n for (const id of stored) {\n if (!memberSet.has(id) || seen.has(id)) continue\n seen.add(id)\n ordered.push(id)\n }\n for (const id of members) {\n if (seen.has(id)) continue\n ordered.push(id)\n }\n return ordered\n}\n\n/** Move `id` before `beforeId` (undefined = append) within an ordered list. */\nexport function moveBefore(list: readonly string[], id: string, beforeId: string | undefined): string[] {\n const rest = list.filter(x => x !== id)\n if (beforeId === undefined) return [...rest, id]\n const index = rest.indexOf(beforeId)\n if (index === -1) return [...rest, id]\n rest.splice(index, 0, id)\n return rest\n}\n\n/** Move `id` after `afterId` (undefined = append) within an ordered list. */\nexport function moveAfter(list: readonly string[], id: string, afterId: string | undefined): string[] {\n const rest = list.filter(x => x !== id)\n if (afterId === undefined) return [...rest, id]\n const index = rest.indexOf(afterId)\n if (index === -1) return [...rest, id]\n rest.splice(index + 1, 0, id)\n return rest\n}\n","/**\n * Derives the three-level workspace-groups tree: 分类文件夹 → 项目文件夹 →\n * 会话行. Pure derivation — all inputs are snapshots; the renderer never\n * scans. Session visibility rules mirror the official ui-workspace tree\n * (blank rows only when current, archived excluded, subagent rows excluded).\n */\nimport {\n indexSubagentDescendants,\n type PendingInteractionStatus,\n type SessionId,\n type SessionListState,\n type SessionSearchResultItem,\n type SessionSummary,\n type SubagentDescendantSummary,\n type WorkspaceId,\n type WorkspaceView,\n} from '@deepseek-ai/dsh-client-runtime/client'\nimport { effectiveCategories, orderedWorkspaceIds, resolveCategory } from '../core/matcher.ts'\nimport { TOP_LEVEL_ORDER_KEY, UNCATEGORIZED_LABEL, type GroupsConfig, type ManualGroups } from '../core/types.ts'\n\n/** One top-level session row inside a workspace folder. */\nexport interface SessionNode {\n id: SessionId\n /** Stored display title; blank rows show the localized New Session label. */\n title: string\n /** The provisional blank session (renderer shows the localized New Session title). */\n blank: boolean\n pendingInteraction?: PendingInteractionStatus\n running: boolean\n /** Running descendants connected through uninterrupted subagent-origin lineage. */\n runningSubagentCount: number\n /** Finished running while not selected and not yet opened (the green \"done\" reminder dot). */\n completed: boolean\n updatedAt: number\n /** Search-hit marker (rendered with a highlighted tint in search mode). */\n matched?: boolean\n /** Content-match snippet from the Host search (search mode only). */\n snippet?: string\n}\n\n/** One workspace folder row inside a category folder. */\nexport interface WorkspaceGroupNode {\n workspaceId: WorkspaceId\n /** Canonical host directory path. */\n path: string\n /** Display title. */\n label: string\n /** Workspace creation time (epoch ms). */\n createdAt: number\n /** Total visible sessions in the folder. */\n sessionCount: number\n expanded: boolean\n /** The folder contains the selected session (active folder tint). */\n containsCurrent: boolean\n /** Visible session rows (empty while the folder is folded). */\n sessions: readonly SessionNode[]\n}\n\n/** One category folder at the top of the tree. */\nexport interface CategoryNode {\n /** Stable category key: the configured label, or the uncategorized bucket. */\n key: string\n /** Display label. */\n label: string\n expanded: boolean\n /** The category contains the selected session (active folder tint). */\n containsCurrent: boolean\n /** Workspace folders in host order. */\n workspaces: readonly WorkspaceGroupNode[]\n}\n\n/** Viewing state consumed by the derivation. */\nexport interface GroupsTreeView {\n expandedCategories: readonly string[]\n expandedWorkspaces: readonly string[]\n}\n\n/** Key of the uncategorized bucket (matches the config fallback label). */\nexport const UNCATEGORIZED_KEY = UNCATEGORIZED_LABEL\n\n/** Directory display label: basename of the path (both separators accepted). */\nexport function workspaceLabel(cwd: string | undefined): string {\n if (cwd === undefined || cwd === '') return UNCATEGORIZED_LABEL\n const base = cwd.replace(/[/\\\\]+$/, '').split(/[/\\\\]/).pop()\n return base !== undefined && base !== '' ? base : cwd\n}\n\n/** Ordinary sessions are visible; blank only when current; archived/subagent never. */\nfunction sessionVisible(session: SessionSummary, current: SessionId | undefined, archived: ReadonlySet): boolean {\n return session.origin !== 'subagent'\n && !archived.has(session.id)\n && (!session.blank || session.id === current)\n}\n\n/** Blank rows display the localized New Session label (never enters search). */\nfunction sessionTitle(session: SessionSummary): string {\n return session.blank ? 'New Session' : session.displayTitle\n}\n\nfunction sessionNode(\n s: SessionSummary,\n descendants: ReadonlyMap,\n): SessionNode {\n return {\n id: s.id,\n title: sessionTitle(s),\n blank: s.blank,\n running: s.running,\n runningSubagentCount: descendants.get(s.id)?.runningCount ?? 0,\n completed: s.completed === true,\n updatedAt: s.updatedAt,\n ...(s.pendingInteraction === undefined ? {} : { pendingInteraction: s.pendingInteraction }),\n }\n}\n\n/** Visible sessions of one workspace in its stored account order. */\nfunction workspaceSessions(\n list: SessionListState,\n workspace: WorkspaceView,\n archived: ReadonlySet,\n descendants: ReadonlyMap,\n): SessionNode[] {\n const nodes: SessionNode[] = []\n for (const id of workspace.sessionIds) {\n const summary = list.byId[id]\n if (summary === undefined) continue // account may lead the list pull; appears when the summary lands\n if (!sessionVisible(summary, list.current, archived)) continue\n nodes.push(sessionNode(summary, descendants))\n }\n return nodes\n}\n\n/**\n * Derive the three-level tree.\n * @param list - sessions list snapshot (`current` feeds containsCurrent).\n * @param workspaces - real workspaces in stable Host order.\n * @param archivedSessionIds - registry-global archive set.\n * @param config - sidecar grouping config (rule categories).\n * @param view - local expansion arrays.\n * @param manual - runtime overlay (manual groups + overrides). A workspace's\n * manual override wins over rule classification; removing it reverts to rules.\n * @returns category sections in render order (rule categories first, then\n * manual-only ones, uncategorized last). Manual groups render even while\n * empty; empty rule buckets stay hidden.\n */\nexport function deriveGroups(\n list: SessionListState,\n workspaces: readonly WorkspaceView[],\n archivedSessionIds: readonly SessionId[],\n config: GroupsConfig,\n view: GroupsTreeView,\n manual: ManualGroups,\n): CategoryNode[] {\n const archived = new Set(archivedSessionIds)\n const expandedCategories = new Set(view.expandedCategories)\n const expandedWorkspaces = new Set(view.expandedWorkspaces)\n const descendants = indexSubagentDescendants(list.byId)\n\n // Bucket workspaces by display key. Seed with every effective category so\n // manual groups render while empty. Top-level (ungrouped) workspaces are\n // handled by deriveTopLevel and never land here.\n const byCategory = new Map()\n for (const { key } of effectiveCategories(config, manual)) {\n byCategory.set(key, [])\n }\n for (const workspace of workspaces) {\n const key = resolveCategory(config, manual, workspace.workspaceId, workspace.path, workspace.title)\n if (key === undefined) continue // top-level — rendered by deriveTopLevel\n if (!byCategory.has(key)) byCategory.set(key, [])\n byCategory.get(key)!.push(workspace)\n }\n\n const manualCategories = new Set(manual.categories)\n const currentWorkspaceId = list.current === undefined\n ? undefined\n : workspaces.find(w => w.sessionIds.includes(list.current as SessionId))?.workspaceId\n\n const nodes: CategoryNode[] = []\n // Effective categories in display order (categoryOrder applied).\n for (const key of effectiveCategories(config, manual).map(e => e.key)) {\n const bucket = byCategory.get(key) ?? []\n // Manual groups stay visible while empty; everything else hides when empty.\n if (bucket.length === 0 && !manualCategories.has(key)) continue\n const expanded = expandedCategories.has(key)\n const ordered = orderedWorkspaceIds(manual, key, bucket.map(w => w.workspaceId as string))\n const workspaceNodes: WorkspaceGroupNode[] = []\n let containsCurrent = false\n for (const workspaceId of ordered) {\n const workspace = bucket.find(w => w.workspaceId === workspaceId)\n if (workspace === undefined) continue\n const sessions = workspaceSessions(list, workspace, archived, descendants)\n const wsExpanded = expandedWorkspaces.has(workspace.workspaceId as string)\n const wsContainsCurrent = workspace.workspaceId === currentWorkspaceId\n if (wsContainsCurrent) containsCurrent = true\n workspaceNodes.push({\n workspaceId: workspace.workspaceId,\n path: workspace.path,\n label: workspace.title,\n createdAt: Date.parse(workspace.createdAt),\n sessionCount: sessions.length,\n expanded: wsExpanded,\n containsCurrent: wsContainsCurrent,\n sessions: wsExpanded ? sessions : [],\n })\n }\n nodes.push({\n key,\n label: key,\n expanded,\n containsCurrent,\n workspaces: workspaceNodes,\n })\n }\n return nodes\n}\n\n/**\n * Top-level (ungrouped) workspace rows: workspaces resolving to no category\n * (no manual override and no matching rule, or a forced `null` override).\n * Rendered after the group folders as plain project rows (not inside any\n * folder), in manual top-level order (`workspaceOrder[TOP_LEVEL_ORDER_KEY]`),\n * falling back to host registration order.\n */\nexport function deriveTopLevel(\n list: SessionListState,\n workspaces: readonly WorkspaceView[],\n archivedSessionIds: readonly SessionId[],\n config: GroupsConfig,\n view: GroupsTreeView,\n manual: ManualGroups,\n): WorkspaceGroupNode[] {\n const archived = new Set(archivedSessionIds)\n const expandedWorkspaces = new Set(view.expandedWorkspaces)\n const descendants = indexSubagentDescendants(list.byId)\n const currentWorkspaceId = list.current === undefined\n ? undefined\n : workspaces.find(w => w.sessionIds.includes(list.current as SessionId))?.workspaceId\n\n const topLevelIds = workspaces\n .filter(w => resolveCategory(config, manual, w.workspaceId, w.path, w.title) === undefined)\n .map(w => w.workspaceId as string)\n const ordered = orderedWorkspaceIds(manual, TOP_LEVEL_ORDER_KEY, topLevelIds)\n\n const nodes: WorkspaceGroupNode[] = []\n for (const workspaceId of ordered) {\n const workspace = workspaces.find(w => w.workspaceId === workspaceId)\n if (workspace === undefined) continue\n const sessions = workspaceSessions(list, workspace, archived, descendants)\n const wsExpanded = expandedWorkspaces.has(workspaceId)\n nodes.push({\n workspaceId: workspace.workspaceId,\n path: workspace.path,\n label: workspace.title,\n createdAt: Date.parse(workspace.createdAt),\n sessionCount: sessions.length,\n expanded: wsExpanded,\n containsCurrent: workspace.workspaceId === currentWorkspaceId,\n sessions: wsExpanded ? sessions : [],\n })\n }\n return nodes\n}\n\n/** Recency comparator: newest first, id as the deterministic tiebreak. */\nfunction byRecency(a: SessionSummary, b: SessionSummary): number {\n if (b.updatedAt !== a.updatedAt) return b.updatedAt - a.updatedAt\n return a.id < b.id ? -1 : 1\n}\n\n/** Bounded set of matched sessions plus content snippets (feeds the search tree). */\nexport interface SearchMatchSet {\n /** Session ids that matched (local metadata hits + Host content hits). */\n matchedIds: ReadonlySet\n /** Content-match snippets keyed by session id (Host search only). */\n snippetsBySession: ReadonlyMap\n hasMore: boolean\n}\n\n/**\n * Compute the matched-session set: immediate title/Workspace substring matches\n * from the local list, merged with ranked Host content matches. The consumer\n * (SearchBody) derives the pruned three-level tree from these ids.\n */\nexport function deriveSearchMatches(\n list: SessionListState,\n workspaces: readonly WorkspaceView[],\n config: GroupsConfig,\n query: string,\n archivedSessionIds: readonly SessionId[],\n content: { items: readonly SessionSearchResultItem[]; hasMore: boolean },\n limit: number,\n): SearchMatchSet {\n const q = query.trim().toLowerCase()\n if (q === '') return { matchedIds: new Set(), snippetsBySession: new Map(), hasMore: false }\n const archived = new Set(archivedSessionIds)\n const descendants = indexSubagentDescendants(list.byId)\n\n const workspaceBySession = new Map()\n for (const workspace of workspaces) {\n for (const sessionId of workspace.sessionIds) {\n if (!workspaceBySession.has(sessionId)) workspaceBySession.set(sessionId, workspace)\n }\n }\n const labelOf = (summary: SessionSummary): string =>\n workspaceBySession.get(summary.id)?.title ?? workspaceLabel(summary.cwd)\n\n const local: SessionSummary[] = []\n for (const id of list.ids) {\n const summary = list.byId[id]\n if (summary === undefined || summary.blank || !sessionVisible(summary, list.current, archived)) continue\n if (\n sessionTitle(summary).toLowerCase().includes(q)\n || labelOf(summary).toLowerCase().includes(q)\n ) {\n local.push(summary)\n }\n }\n local.sort(byRecency)\n\n const ordered: SessionSummary[] = []\n const included = new Set()\n const include = (summary: SessionSummary): void => {\n if (included.has(summary.id)) return\n included.add(summary.id)\n ordered.push(summary)\n }\n for (const summary of local) include(summary)\n for (const item of content.items) {\n const summary = list.byId[item.sessionId]\n if (summary !== undefined && !summary.blank && sessionVisible(summary, list.current, archived)) include(summary)\n }\n\n const snippets = new Map()\n for (const item of content.items) {\n if (item.snippet !== undefined) snippets.set(item.sessionId, item.snippet)\n }\n\n return {\n matchedIds: ordered.slice(0, limit).reduce((set, summary) => { set.add(summary.id); return set }, new Set()),\n snippetsBySession: snippets,\n hasMore: content.hasMore || ordered.length > limit,\n }\n}\n\n/** Search tree: group folders plus top-level (ungrouped) matched workspaces. */\nexport interface SearchTree {\n /** Group folders containing matched sessions, in display order. */\n categories: CategoryNode[]\n /** Top-level (ungrouped) workspaces holding matched sessions. */\n topLevel: WorkspaceGroupNode[]\n}\n\n/**\n * Build a three-level search tree containing ONLY the branches that hold a\n * matched session: 分类文件夹 → 项目文件夹 → 命中会话行. Every matched\n * session carries `matched: true` so rows render with the search-hit tint.\n * Classification uses the same precedence as the idle tree (manual override →\n * rules), so search shows the same grouping the user sees. Matched top-level\n * workspaces are returned separately (rendered as plain rows).\n *\n * @param list - sessions list snapshot.\n * @param workspaces - real workspaces in stable Host order.\n * @param config - sidecar grouping config.\n * @param matchedIds - set of session ids that matched the query.\n * @param archivedSessionIds - registry-global archive set.\n * @param manual - runtime overlay (manual groups + overrides).\n * @param snippetsBySession - optional content-match snippets keyed by session id.\n * @returns group folders in render order plus top-level matched workspaces,\n * pruned to matched branches only.\n */\nexport function deriveSearchGroups(\n list: SessionListState,\n workspaces: readonly WorkspaceView[],\n config: GroupsConfig,\n matchedIds: ReadonlySet,\n archivedSessionIds: readonly SessionId[],\n manual: ManualGroups,\n snippetsBySession?: ReadonlyMap,\n): SearchTree {\n const archived = new Set(archivedSessionIds)\n const descendants = indexSubagentDescendants(list.byId)\n\n const byCategory = new Map()\n for (const key of effectiveCategories(config, manual).map(e => e.key)) byCategory.set(key, [])\n\n const topLevel: WorkspaceGroupNode[] = []\n for (const workspace of workspaces) {\n // Only sessions that matched the query and are visible in this folder.\n const nodes: SessionNode[] = []\n for (const id of workspace.sessionIds) {\n const summary = list.byId[id]\n if (summary === undefined || !matchedIds.has(id)) continue\n if (!sessionVisible(summary, list.current, archived)) continue\n const node = sessionNode(summary, descendants)\n const snippet = snippetsBySession?.get(id)\n nodes.push({\n ...node,\n matched: true,\n ...(snippet === undefined ? {} : { snippet }),\n })\n }\n if (nodes.length === 0) continue\n\n const node: WorkspaceGroupNode = {\n workspaceId: workspace.workspaceId,\n path: workspace.path,\n label: workspace.title,\n createdAt: Date.parse(workspace.createdAt),\n sessionCount: nodes.length,\n expanded: true,\n containsCurrent: false,\n sessions: nodes,\n }\n const key = resolveCategory(config, manual, workspace.workspaceId, workspace.path, workspace.title)\n if (key === undefined) {\n topLevel.push(node)\n continue\n }\n if (!byCategory.has(key)) byCategory.set(key, [])\n byCategory.get(key)!.push(node)\n }\n\n const categories: CategoryNode[] = []\n // Same display order as the idle tree.\n for (const key of effectiveCategories(config, manual).map(e => e.key)) {\n const workspaceNodes = byCategory.get(key)\n if (workspaceNodes === undefined || workspaceNodes.length === 0) continue\n categories.push({\n key,\n label: key,\n expanded: true,\n containsCurrent: false,\n workspaces: workspaceNodes,\n })\n }\n return { categories, topLevel }\n}\n","/**\n * Row components for the workspace-groups tree. Kept dependency-light: they\n * consume only React, primitives (StateDot/Menu/icons), and the shared CSS\n * string. Each row owns its hover actions menu; dialogs live in the browser\n * root so they survive row unmounts during collapse.\n *\n * Drag & drop: workspace rows are draggable sources; category rows (and\n * workspace rows, standing for their containing category) are drop targets.\n * The payload is a custom dataTransfer type so only in-plugin drags land.\n */\nimport { useState, type DragEvent } from 'react'\nimport {\n IconArchiveOutline20,\n IconBranchOutline16,\n IconEditOutline16,\n IconEllipsisOutline16,\n IconFolderClose16,\n IconFolderOpen16,\n IconFolderOpenOutline16,\n IconPlusOutline16,\n IconProjectAddOutline16,\n IconTriangleRightFill14,\n IconTrashOutline16,\n Menu,\n StateDot,\n type StateDotState,\n} from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots'\nimport type { WorkspaceGroupsKey } from './locales.ts'\nimport type { CategoryNode, SessionNode, WorkspaceGroupNode } from './tree.ts'\n\ntype T = TranslateNS<'workspaceGroups'>\n\n/** dataTransfer type carrying the dragged workspace id (in-plugin drags only). */\nexport const DND_WORKSPACE_TYPE = 'application/x-dsh-workspace-groups'\n/** dataTransfer type carrying the dragged category key (group reorder). */\nexport const DND_CATEGORY_TYPE = 'application/x-dsh-workspace-groups-category'\n\n/** Whether a drag carries any of the plugin's payloads (drop targets accept both). */\nexport function hasPluginDragType(types: DOMStringList | readonly string[]): boolean {\n const list = Array.from(types as Iterable)\n return list.includes(DND_WORKSPACE_TYPE) || list.includes(DND_CATEGORY_TYPE)\n}\n\n/** Pending interaction status → primitives StateDot state. */\nfunction pendingState(status: SessionNode['pendingInteraction']): StateDotState | undefined {\n switch (status) {\n case 'approval':\n case 'plan-review':\n case 'question':\n return 'warning'\n default:\n return undefined\n }\n}\n\n/** Primary status dot state for a session row. */\nexport function sessionDotState(node: Pick): StateDotState {\n if (pendingState(node.pendingInteraction) !== undefined) return 'warning'\n if (node.running || node.runningSubagentCount > 0) return 'ongoing'\n return node.completed ? 'done' : 'done'\n}\n\n/** Compact relative time (\"now\"/\"5min\"/\"3h\"/\"2d\"/\"4mo\"/\"1y\"). */\nexport function relativeTimeLabel(updatedAt: number, now: number): string {\n const diff = Math.max(0, now - updatedAt)\n const MIN = 60_000\n const HOUR = 3_600_000\n const DAY = 86_400_000\n if (diff < MIN) return 'now'\n if (diff < HOUR) return `${Math.floor(diff / MIN)}min`\n if (diff < DAY) return `${Math.floor(diff / HOUR)}h`\n if (diff < 30 * DAY) return `${Math.floor(diff / DAY)}d`\n if (diff < 365 * DAY) return `${Math.floor(diff / (30 * DAY))}mo`\n return `${Math.floor(diff / (365 * DAY))}y`\n}\n\n/** Drop-target props shared by category and workspace rows (all optional). */\nexport interface RowDropProps {\n /** Row is under the dragged workspace — show the drop highlight. */\n dropActive?: boolean\n /** Insertion indicator: a line above (before) or below (after) this row. */\n insertLine?: 'before' | 'after'\n /** Accept a drag over this row (must preventDefault to allow the drop). */\n onRowDragOver?: (event: DragEvent) => void\n /** Clear the highlight when the pointer leaves the row. */\n onRowDragLeave?: (event: DragEvent) => void\n /** Drop a workspace onto this row. */\n onRowDrop?: (event: DragEvent) => void\n}\n\n/**\n * One category folder row: toggle, rename/delete menu (every group — rule\n * groups via overlay renames/hides), draggable source for group reorder and\n * drop target for both workspace moves and group reorders.\n */\nexport function CategoryRow({ node, t, onToggle, onRename, onDelete, dropActive = false, insertLine, onRowDragOver, onRowDragLeave, onRowDrop, onDragStartCategory }: {\n node: CategoryNode\n t: T\n onToggle: () => void\n /** Rename/delete actions; the hover menu renders only when both provided. */\n onRename?: () => void\n onDelete?: () => void\n /** Group reorder source; the row becomes draggable only when provided. */\n onDragStartCategory?: (event: DragEvent) => void\n} & RowDropProps) {\n const [menuOpen, setMenuOpen] = useState(false)\n const count = node.workspaces.length\n const manageable = onRename !== undefined && onDelete !== undefined\n return (\n \n \n \n \n \n {node.expanded ? : }\n \n {node.label}\n {count}\n {manageable && (\n \n { setMenuOpen(false) }}\n items={[\n { id: 'rename', label: t('group.rename'), icon: },\n { id: 'delete', label: t('group.delete'), icon: , danger: true },\n ]}\n onSelect={(id) => {\n setMenuOpen(false)\n if (id === 'rename') onRename()\n if (id === 'delete') onDelete()\n }}\n portal\n closeOnPointerLeave\n anchor={(\n { e.stopPropagation(); setMenuOpen(v => !v) }}\n >\n \n \n )}\n />\n \n )}\n
\n )\n}\n\n/** One workspace folder row inside a category: draggable source + drop target. */\nexport function WorkspaceRow({ node, t, onToggle, onNewSession, onRename, onDelete, canMoveOut = false, onMoveOut, flat = false, dropActive = false, insertLine, onRowDragOver, onRowDragLeave, onRowDrop, onDragStartExtra }: {\n node: WorkspaceGroupNode\n t: T\n onToggle: () => void\n onNewSession: () => void\n onRename: () => void\n onDelete: () => void\n /** Project currently sits inside a group — offer \"move out of group\". */\n canMoveOut?: boolean\n onMoveOut?: () => void\n /** Render as a top-level row (no folder indentation). */\n flat?: boolean\n /** Extra dragstart hook (e.g. collapse all expanded projects while dragging). */\n onDragStartExtra?: () => void\n} & RowDropProps) {\n const [menuOpen, setMenuOpen] = useState(false)\n const menuItems = [\n ...(canMoveOut && onMoveOut !== undefined\n ? [{ id: 'moveOut', label: t('workspace.moveOutOfGroup'), icon: }]\n : []),\n { id: 'rename', label: t('workspace.rename'), icon: },\n { id: 'delete', label: t('workspace.delete'), icon: , danger: true },\n ]\n const onDragStart = (event: DragEvent): void => {\n event.dataTransfer.setData(DND_WORKSPACE_TYPE, node.workspaceId)\n event.dataTransfer.effectAllowed = 'move'\n onDragStartExtra?.()\n }\n return (\n \n \n \n \n \n {/* Project rows use the project glyph (same as the official workspace\n browser) so groups (folder glyph) and projects stay distinguishable. */}\n \n \n {node.label}\n \n { setMenuOpen(false) }}\n items={menuItems}\n onSelect={(id) => {\n setMenuOpen(false)\n if (id === 'moveOut') onMoveOut?.()\n if (id === 'rename') onRename()\n if (id === 'delete') onDelete()\n }}\n portal\n closeOnPointerLeave\n anchor={(\n { e.stopPropagation(); setMenuOpen(v => !v) }}\n >\n \n \n )}\n />\n { e.stopPropagation(); onNewSession() }}\n >\n \n \n \n \n )\n}\n\n/** One session leaf row. */\nexport function SessionRow({ node, currentId, now, t, onOpen, onRename, onFork, onArchive }: {\n node: SessionNode\n currentId: string | undefined\n now: number\n t: T\n onOpen: (id: SessionNode['id']) => void\n onRename: (id: SessionNode['id'], currentTitle: string) => void\n onFork: (id: SessionNode['id']) => void\n onArchive: (id: SessionNode['id']) => void\n}) {\n const selected = node.id === currentId\n const [menuOpen, setMenuOpen] = useState(false)\n const showStatus = true\n const menuItems = [\n { id: 'rename', label: t('session.rename'), icon: },\n { id: 'fork', label: t('session.fork'), icon: },\n { id: 'archive', label: t('session.archive'), icon: },\n ]\n return (\n { onOpen(node.id) }}\n >\n \n {showStatus && }\n \n {node.title}\n {!node.blank && {relativeTimeLabel(node.updatedAt, now)}}\n {node.snippet !== undefined && (\n {node.snippet}\n )}\n {!node.blank && (\n \n { setMenuOpen(false) }}\n items={menuItems}\n onSelect={(id) => {\n setMenuOpen(false)\n if (id === 'rename') onRename(node.id, node.title)\n if (id === 'fork') onFork(node.id)\n if (id === 'archive') onArchive(node.id)\n }}\n portal\n closeOnPointerLeave\n anchor={(\n { e.stopPropagation(); setMenuOpen(v => !v) }}\n >\n \n \n )}\n />\n \n )}\n \n )\n}\n\nexport type { T }\n","/**\n * The workspace-groups browsing region filling the sidebar shell's\n * `sidebar.workspaces` hole: section header (title + right-aligned search +\n * new-group + add workspace), the three-level tree (category → workspace →\n * session), group management dialogs, and the workspace/session dialogs. Wide\n * state renders the full browser; rail state renders the two region icons\n * (search / add workspace) as 36px controls on the shell's shared rail entry\n * path, each requesting expansion through the owner share.\n *\n * Data: workspaces/sessions via the framework global hooks; grouping config\n * via the host half's `/workspace-groups/config` route (refetched on mount).\n * Runtime group management (create/rename/delete any group, drag workspaces\n * between groups and into position, drag groups into position) persists\n * through `PUT /workspace-groups/manual`; the sidecar YAML is never rewritten\n * (rule-group rename/delete ride the overlay `renamed`/`hidden` maps).\n */\nimport { useEffect, useMemo, useRef, useState, type DragEvent } from 'react'\nimport {\n Button,\n IconCloseFill14,\n IconFolderOpenOutline16,\n IconProjectAddOutline16,\n IconSearchOutline16,\n Modal,\n Tooltip,\n} from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { SessionId, SessionListState, SessionSearchResultItem, WorkspaceId, WorkspaceView } from '@deepseek-ai/dsh-client-runtime/client'\nimport {\n displayCategoryKeys,\n moveAfter,\n moveBefore,\n originalRuleNameForDisplay,\n resolveCategory,\n takenCategoryNames,\n} from '../core/matcher.ts'\nimport { TOP_LEVEL_ORDER_KEY, UNCATEGORIZED_LABEL, type GroupsConfig, type ManualGroups } from '../core/types.ts'\nimport type { GroupsBrowserProps } from './contract.ts'\nimport { deriveGroups, deriveSearchGroups, deriveSearchMatches, deriveTopLevel, UNCATEGORIZED_KEY, type CategoryNode, type WorkspaceGroupNode } from './tree.ts'\nimport { CategoryRow, DND_CATEGORY_TYPE, DND_WORKSPACE_TYPE, hasPluginDragType, SessionRow, WorkspaceRow } from './rows.tsx'\nimport css from './styles.css?inline'\n\nconst SEARCH_DEBOUNCE_MS = 250\nconst SEARCH_QUERY_MAX_CODE_UNITS = 500\n\n/** Overlay with every optional field materialized (plain-object edits, no undefined spreads). */\ntype NormalizedManual = Required\n\nconst EMPTY_MANUAL: NormalizedManual = {\n categories: [], assignments: {}, categoryOrder: [], workspaceOrder: {}, renamed: {}, hidden: [],\n}\n\n/** Materialize optional overlay fields so every update is a plain object edit. */\nfunction normalizeManual(manual: ManualGroups): NormalizedManual {\n return {\n categories: manual.categories,\n assignments: manual.assignments,\n categoryOrder: manual.categoryOrder ?? [],\n workspaceOrder: manual.workspaceOrder ?? {},\n renamed: manual.renamed ?? {},\n hidden: manual.hidden ?? [],\n }\n}\n\nfunction sanitizeSearchQuery(value: string): string {\n const withoutNul = value.replaceAll('\\0', '')\n if (withoutNul.length <= SEARCH_QUERY_MAX_CODE_UNITS) return withoutNul\n return withoutNul.slice(0, SEARCH_QUERY_MAX_CODE_UNITS)\n}\n\n/** Immutable membership toggle for the local expand-all array. */\nfunction toggled(list: readonly string[], key: string): string[] {\n return list.includes(key) ? list.filter(k => k !== key) : [...list, key]\n}\n\ninterface RemoteSearchState {\n query: string\n status: 'idle' | 'loading' | 'ready' | 'error'\n items: readonly SessionSearchResultItem[]\n hasMore: boolean\n}\n\n/** Light runtime guard for the manual overlay attached to the config fetch. */\nfunction isManualGroups(value: unknown): value is ManualGroups {\n if (typeof value !== 'object' || value === null) return false\n const candidate = value as { categories?: unknown; assignments?: unknown }\n return Array.isArray(candidate.categories) && typeof candidate.assignments === 'object' && candidate.assignments !== null\n}\n\n/** Minimal fetch of the grouping config + runtime overlay (no-cache revalidation). */\nasync function fetchGroupsConfig(): Promise<{ config: GroupsConfig; manual: NormalizedManual }> {\n const response = await fetch('/workspace-groups/config', { cache: 'no-cache' })\n if (!response.ok) throw new Error(`config request failed: ${response.status}`)\n const body = (await response.json()) as GroupsConfig\n const config: GroupsConfig = Array.isArray(body.categories) ? body : { categories: [] }\n return { config, manual: isManualGroups(body.manual) ? normalizeManual(body.manual) : EMPTY_MANUAL }\n}\n\n/** Persist the whole runtime overlay (idempotent; the host validates + writes). */\nasync function saveManualOverlay(manual: ManualGroups): Promise {\n const response = await fetch('/workspace-groups/manual', {\n method: 'PUT',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(manual),\n })\n if (!response.ok) {\n let message = `manual save failed: ${response.status}`\n try {\n const text = await response.text()\n if (text !== '') message = text\n } catch { /* keep the fallback message */ }\n throw new Error(message)\n }\n}\n\n/** One group-management dialog state: create, or rename an existing group. */\ntype GroupDialogState = { mode: 'create' } | { mode: 'rename'; from: string } | null\n\n/** Row reference used by drop targets: which kind of row, which key. */\nexport type DropRowRef = { kind: 'category' | 'workspace' | 'topLevel'; key: string }\n\n/**\n * Which level's rows fold while a drag is in progress: dragging a project\n * folds every project row (grouped AND top-level), dragging a group folds\n * every group row. The other level keeps its expansion untouched.\n */\nexport type DragLevel = 'workspace' | 'category' | null\n\n/**\n * Current drop indicator. A `line` renders a 2px insertion line above/below a\n * row (project reorder inside a group, or group reorder); an `into` renders\n * the whole-row highlight used when dropping a project into a group. Drop\n * handlers re-derive before/after from the drop event itself, so the\n * indicator is purely visual and can never go stale.\n */\nexport type DragIndicator =\n | { mode: 'line'; row: DropRowRef; before: boolean }\n | { mode: 'into'; categoryKey: string }\n | null\n\n/**\n * Render the browsing region.\n * @param props - composed slot props (shell owner share + store + injected actions).\n * @returns the region element tree.\n */\nexport function GroupsBrowser({\n wide,\n expandSidebar,\n useSessions,\n useWorkspaces,\n useStore,\n actions,\n startSession,\n open,\n renameSession,\n forkSession,\n renameWorkspace,\n deleteWorkspace,\n insertWorkspaceBefore,\n archiveSession,\n insertSessionBefore,\n createWorkspace,\n pickDirectory,\n searchSessions,\n searchResultLimit,\n t,\n}: GroupsBrowserProps) {\n // Inject the stylesheet once per fiber; dispose removes it (HMR safe).\n useEffect(() => {\n const style = document.createElement('style')\n style.setAttribute('data-plugin', 'dsh-workspace-groups')\n style.textContent = css\n document.head.append(style)\n return () => { style.remove() }\n }, [])\n\n // Grouping config from the host route + the runtime manual overlay.\n const [config, setConfig] = useState({ categories: [] })\n const [manual, setManual] = useState(EMPTY_MANUAL)\n const [configError, setConfigError] = useState(null)\n const reloadConfig = () => {\n setConfigError(null)\n fetchGroupsConfig().then(({ config: nextConfig, manual: nextManual }) => {\n setConfig(nextConfig)\n setManual(nextManual)\n }).catch((reason: unknown) => {\n setConfigError(reason instanceof Error ? reason.message : String(reason))\n })\n }\n useEffect(() => { reloadConfig() }, [])\n\n // Transient save errors for drag/menu group operations (dialog errors are local).\n const [manualError, setManualError] = useState(null)\n const [manualSaving, setManualSaving] = useState(false)\n\n const workspaces = useWorkspaces(state => state.items)\n const workspacePhase = useWorkspaces(state => state.phase)\n const archivedSessionIds = useWorkspaces(state => state.archivedSessionIds)\n const categoryExpansion = useStore(s => s.categoryExpansion)\n const workspaceExpansion = useStore(s => s.workspaceExpansion)\n\n const list = useSessions(s => s)\n const current = list.current\n const currentWorkspaceKey = current === undefined\n ? undefined\n : (workspaces.find(w => w.sessionIds.includes(current as SessionId))?.workspaceId as string | undefined)\n\n // Auto-expand the category + workspace containing the current session, but\n // ONLY when the user has never touched that key (`Object.hasOwn`): a\n // present `false` is a deliberate collapse and must stay folded. Without\n // this guard the effect re-expands the just-collapsed current category on\n // every store change (the reported \"cannot collapse\" bug).\n useEffect(() => {\n if (current === undefined || currentWorkspaceKey === undefined) return\n const category = categoriesForCurrent(config, workspaces, current, manual)\n if (category !== undefined && !Object.hasOwn(categoryExpansion, category)) {\n actions.setCategoryExpanded(category, true)\n }\n if (!Object.hasOwn(workspaceExpansion, currentWorkspaceKey)) {\n actions.setWorkspaceExpanded(currentWorkspaceKey, true)\n }\n }, [current, currentWorkspaceKey, config, workspaces, manual, categoryExpansion, workspaceExpansion, actions])\n\n // Drop expansion keys that no longer exist (group edits / workspace deletion).\n useEffect(() => {\n if (workspacePhase !== 'ready') return\n actions.retainKeys(\n displayCategoryKeys(config, manual),\n workspaces.map(w => w.workspaceId as string),\n )\n }, [actions, config, manual, workspacePhase, workspaces])\n\n const [query, setQuery] = useState('')\n const [searchExpanded, setSearchExpanded] = useState(false)\n const normalizedQuery = sanitizeSearchQuery(query).trim()\n const [remoteSearch, setRemoteSearch] = useState({\n query: '', status: 'idle', items: [], hasMore: false,\n })\n const searchInput = useRef(null)\n const searchRoot = useRef(null)\n\n // Search debounce + abort, same posture as the official browser.\n useEffect(() => {\n if (normalizedQuery === '') {\n setRemoteSearch({ query: '', status: 'idle', items: [], hasMore: false })\n return\n }\n const controller = new AbortController()\n setRemoteSearch({ query: normalizedQuery, status: 'loading', items: [], hasMore: false })\n const timer = window.setTimeout(() => {\n searchSessions(normalizedQuery, controller.signal).then((result) => {\n if (controller.signal.aborted) return\n setRemoteSearch({ query: normalizedQuery, status: 'ready', items: result.items, hasMore: result.hasMore })\n }).catch(() => {\n if (controller.signal.aborted) return\n setRemoteSearch({ query: normalizedQuery, status: 'error', items: [], hasMore: false })\n })\n }, SEARCH_DEBOUNCE_MS)\n return () => {\n window.clearTimeout(timer)\n controller.abort()\n }\n }, [normalizedQuery, searchSessions])\n\n // Outside-click dismissal of the search box.\n useEffect(() => {\n if (!wide || !searchExpanded) return\n const onClick = (event: MouseEvent): void => {\n if (!(event.target instanceof Node) || searchRoot.current?.contains(event.target) === true) return\n searchInput.current?.blur()\n if (normalizedQuery !== '') return\n setSearchExpanded(false)\n }\n document.addEventListener('click', onClick)\n return () => { document.removeEventListener('click', onClick) }\n }, [normalizedQuery, wide, searchExpanded])\n\n const expandedCategories = useMemo(\n () => Object.entries(categoryExpansion).filter(([, v]) => v).map(([k]) => k),\n [categoryExpansion],\n )\n const expandedWorkspaces = useMemo(\n () => Object.entries(workspaceExpansion).filter(([, v]) => v).map(([k]) => k),\n [workspaceExpansion],\n )\n // Which level is being dragged: drives the top-level drop target (project\n // drags only) and which level's rows fold.\n const [dragging, setDragging] = useState(null)\n const groups = useMemo(\n () => deriveGroups(list, workspaces, archivedSessionIds, config, {\n expandedCategories,\n expandedWorkspaces,\n }, manual),\n [list, workspaces, archivedSessionIds, config, manual, expandedCategories, expandedWorkspaces],\n )\n // Top-level (ungrouped) workspace rows, rendered after the group folders.\n const topLevel = useMemo(\n () => deriveTopLevel(list, workspaces, archivedSessionIds, config, {\n expandedCategories,\n expandedWorkspaces,\n }, manual),\n [list, workspaces, archivedSessionIds, config, manual, expandedCategories, expandedWorkspaces],\n )\n // While dragging a project, an empty top-level area must still show a landing\n // line — otherwise a project can never be dragged OUT of a group when every\n // project is currently grouped.\n const topLevelDropActive = dragging === 'workspace' && topLevel.length === 0\n // The top-level area is the move-out landing spot: rows reorder with an\n // insertion line (before/after), and the blank space below the last row\n // appends to the end of the list. No whole-area highlight box.\n const topLevelRef: DropRowRef = { kind: 'topLevel', key: UNCATEGORIZED_KEY }\n\n // Add workspace flow: self-contained (no directory-flow hole dependency).\n const [adding, setAdding] = useState(false)\n const [addError, setAddError] = useState(null)\n const [addErrorOpen, setAddErrorOpen] = useState(false)\n const addWorkspace = async (): Promise => {\n if (adding) return\n setAdding(true)\n setAddError(null)\n setAddErrorOpen(false)\n try {\n const path = await pickDirectory()\n if (path === null) return // cancelled\n const workspace = await createWorkspace({ path })\n startSession(workspace.workspaceId)\n } catch (reason) {\n const message = reason instanceof Error ? reason.message : String(reason)\n setAddError(message)\n setAddErrorOpen(true)\n } finally {\n setAdding(false)\n }\n }\n\n // Workspace rename dialog.\n const [renameTarget, setRenameTarget] = useState<{ workspaceId: WorkspaceId; currentTitle: string } | null>(null)\n const [renameDraft, setRenameDraft] = useState('')\n const [renaming, setRenaming] = useState(false)\n const [renameError, setRenameError] = useState(null)\n const renameTrimmed = renameDraft.trim()\n const renameDuplicate = renameTarget !== null && renameTrimmed !== '' && renameTrimmed !== renameTarget.currentTitle\n && workspaces.some(w => w.title === renameTrimmed)\n const renameBlocked = renaming || renameTrimmed === '' || renameTarget === null\n || renameTrimmed === renameTarget.currentTitle || renameDuplicate\n const confirmRename = () => {\n if (renameBlocked || renameTarget === null) return\n setRenaming(true)\n setRenameError(null)\n renameWorkspace(renameTarget.workspaceId, renameTrimmed).then(() => {\n setRenaming(false)\n setRenameTarget(null)\n }).catch((reason: unknown) => {\n setRenaming(false)\n setRenameError(reason instanceof Error ? reason.message : String(reason))\n })\n }\n\n // Workspace delete dialog.\n const [deleteTarget, setDeleteTarget] = useState<{ workspaceId: WorkspaceId; title: string } | null>(null)\n const [deleting, setDeleting] = useState(false)\n const [deleteError, setDeleteError] = useState(null)\n const confirmDelete = () => {\n if (deleting || deleteTarget === null) return\n setDeleting(true)\n setDeleteError(null)\n deleteWorkspace(deleteTarget.workspaceId).then(() => {\n setDeleting(false)\n setDeleteTarget(null)\n }).catch((reason: unknown) => {\n setDeleting(false)\n setDeleteError(reason instanceof Error ? reason.message : String(reason))\n })\n }\n\n // Session rename dialog.\n const [sessionRenameTarget, setSessionRenameTarget] = useState<{ sessionId: SessionId; currentTitle: string } | null>(null)\n const [sessionRenameDraft, setSessionRenameDraft] = useState('')\n const [sessionRenaming, setSessionRenaming] = useState(false)\n const [sessionRenameError, setSessionRenameError] = useState(null)\n const sessionRenameTrimmed = sessionRenameDraft.trim()\n const sessionRenameBlocked = sessionRenaming || sessionRenameTrimmed === '' || sessionRenameTarget === null\n const confirmSessionRename = () => {\n if (sessionRenameBlocked || sessionRenameTarget === null) return\n setSessionRenaming(true)\n setSessionRenameError(null)\n renameSession(sessionRenameTarget.sessionId, sessionRenameTrimmed).then(() => {\n setSessionRenaming(false)\n setSessionRenameTarget(null)\n }).catch((reason: unknown) => {\n setSessionRenaming(false)\n setSessionRenameError(reason instanceof Error ? reason.message : String(reason))\n })\n }\n const onSessionRename = (sessionId: SessionId, currentTitle: string) => {\n setSessionRenameTarget({ sessionId, currentTitle })\n setSessionRenameDraft(currentTitle)\n setSessionRenameError(null)\n }\n\n const onSessionArchive = (sessionId: SessionId) => {\n archiveSession(sessionId).catch((reason: unknown) => {\n console.warn('session archive rejected:', reason)\n })\n }\n\n // ---- Runtime group management ----------------------------------------------\n\n const [groupDialog, setGroupDialog] = useState(null)\n const [groupDraft, setGroupDraft] = useState('')\n const [groupError, setGroupError] = useState(null)\n const [groupBusy, setGroupBusy] = useState(false)\n const [groupDeleteTarget, setGroupDeleteTarget] = useState(null)\n const [groupDeleting, setGroupDeleting] = useState(false)\n const [groupDeleteError, setGroupDeleteError] = useState(null)\n\n const takenNames = useMemo(() => takenCategoryNames(config, manual), [config, manual])\n\n const groupTrimmed = groupDraft.trim()\n const groupNameIssue = groupDialog !== null && groupTrimmed !== ''\n ? (groupTrimmed === UNCATEGORIZED_LABEL\n ? t('group.nameReserved')\n : (groupDialog.mode === 'rename' && groupTrimmed === groupDialog.from)\n ? null\n : takenNames.has(groupTrimmed) ? t('group.nameDuplicate') : null)\n : null\n const groupBlocked = groupBusy || groupTrimmed === '' || groupNameIssue !== null\n || (groupDialog !== null && groupDialog.mode === 'rename' && groupTrimmed === groupDialog.from)\n\n const confirmGroupDialog = () => {\n if (groupBlocked || groupDialog === null) return\n const name = groupTrimmed\n const from = groupDialog.mode === 'rename' ? groupDialog.from : undefined\n const renaming = groupDialog.mode === 'rename' && from !== name\n\n let next: NormalizedManual\n if (groupDialog.mode === 'create') {\n next = { ...manual, categories: [...manual.categories, name] }\n } else {\n // Rename: rule groups ride the `renamed` map, manual groups the list;\n // every reference (assignments / workspaceOrder / categoryOrder) follows.\n const originalRule = from !== undefined ? originalRuleNameForDisplay(config.categories, manual, from) : undefined\n next = {\n ...manual,\n ...(originalRule !== undefined\n ? { renamed: { ...manual.renamed, [originalRule]: name } }\n : { categories: manual.categories.map(c => c === from ? name : c) }),\n assignments: Object.fromEntries(\n Object.entries(manual.assignments).map(([id, category]): [string, string | null] => [id, category === from ? name : category]),\n ),\n workspaceOrder: Object.fromEntries(\n Object.entries(manual.workspaceOrder).map(([key, ids]): [string, string[]] => [key === from ? name : key, ids]),\n ),\n categoryOrder: manual.categoryOrder.map(key => key === from ? name : key),\n }\n }\n\n setGroupBusy(true)\n setGroupError(null)\n saveManualOverlay(next).then(() => {\n setManual(next)\n setManualError(null)\n setGroupBusy(false)\n setGroupDialog(null)\n setGroupDraft('')\n // Keep the renamed group open (its old expansion key is dropped by retainKeys).\n if (renaming) actions.setCategoryExpanded(name, true)\n }).catch((reason: unknown) => {\n setGroupBusy(false)\n setGroupError(reason instanceof Error ? reason.message : String(reason))\n })\n }\n\n const confirmGroupDelete = () => {\n if (groupDeleting || groupDeleteTarget === null) return\n const name = groupDeleteTarget\n const originalRule = originalRuleNameForDisplay(config.categories, manual, name)\n\n // Every project currently in the group goes to 未分类 (forced, not rule-\n // reclassified), regardless of how it landed there.\n const assignments = { ...manual.assignments }\n for (const workspace of workspaces) {\n if (resolveCategory(config, manual, workspace.workspaceId, workspace.path, workspace.title) === name) {\n assignments[workspace.workspaceId] = null\n }\n }\n const workspaceOrder = Object.fromEntries(\n Object.entries(manual.workspaceOrder).filter(([key]) => key !== name),\n )\n const next: NormalizedManual = {\n ...manual,\n assignments,\n workspaceOrder,\n categoryOrder: manual.categoryOrder.filter(key => key !== name),\n ...(originalRule !== undefined\n ? {\n renamed: Object.fromEntries(Object.entries(manual.renamed).filter(([key]) => key !== originalRule)),\n hidden: [...manual.hidden, originalRule],\n }\n : { categories: manual.categories.filter(c => c !== name) }),\n }\n\n setGroupDeleting(true)\n setGroupDeleteError(null)\n saveManualOverlay(next).then(() => {\n setManual(next)\n setManualError(null)\n setGroupDeleting(false)\n setGroupDeleteTarget(null)\n }).catch((reason: unknown) => {\n setGroupDeleting(false)\n setGroupDeleteError(reason instanceof Error ? reason.message : String(reason))\n })\n }\n\n // ---- Drag & drop (move/reorder workspaces, reorder groups) ------------------\n\n const [dragIndicator, setDragIndicator] = useState(null)\n\n // Expansion state taken at dragstart; dragend restores it so the folding\n // caused by a drag is always undone afterwards (\"结束后恢复\").\n const expansionSnapshot = useRef<{ categories: Record; workspaces: Record } | null>(null)\n // Live expansion state for the dragend restore (the document-level listener\n // is registered once, so it must read current values through a ref).\n const liveExpansionRef = useRef({ categoryExpansion, workspaceExpansion, actions })\n liveExpansionRef.current = { categoryExpansion, workspaceExpansion, actions }\n\n // Cancel any stale indicator when a drag ends outside a row (or is aborted),\n // and restore the expansion snapshot taken at dragstart.\n useEffect(() => {\n const clear = () => {\n setDragIndicator(null)\n setDragging(null)\n const snapshot = expansionSnapshot.current\n if (snapshot === null) return\n expansionSnapshot.current = null\n const { categoryExpansion: currentCategories, workspaceExpansion: currentWorkspaces, actions: currentActions } = liveExpansionRef.current\n for (const [key, value] of Object.entries(snapshot.categories)) {\n if (currentCategories[key] !== value) currentActions.setCategoryExpanded(key, value)\n }\n for (const [key, value] of Object.entries(snapshot.workspaces)) {\n if (currentWorkspaces[key] !== value) currentActions.setWorkspaceExpanded(key, value)\n }\n }\n document.addEventListener('dragend', clear)\n return () => { document.removeEventListener('dragend', clear) }\n }, [])\n\n /** Move a workspace into a category (or reorder inside it when `beforeWorkspaceId`/`afterWorkspaceId`). */\n const moveWorkspaceTo = async (workspaceId: string, categoryKey: string, beforeWorkspaceId?: string, afterWorkspaceId?: string): Promise => {\n if (manualSaving) return\n const workspace = workspaces.find(w => w.workspaceId === workspaceId)\n if (workspace === undefined) return\n setManualSaving(true)\n try {\n let next: NormalizedManual\n if (categoryKey === UNCATEGORIZED_KEY) {\n // Move to the TOP LEVEL: force ungrouped (null) and drop from every\n // group's order list, while recording the position inside the ordered\n // top-level list (`workspaceOrder[TOP_LEVEL_ORDER_KEY]`).\n const assignments = { ...manual.assignments, [workspaceId]: null }\n const workspaceOrder: Record = {}\n for (const [key, ids] of Object.entries(manual.workspaceOrder)) {\n if (key === TOP_LEVEL_ORDER_KEY) continue\n workspaceOrder[key] = ids.filter(id => id !== workspaceId)\n }\n const topLevelIds = workspaces\n .filter(w => w.workspaceId !== workspaceId && resolveCategory(config, manual, w.workspaceId, w.path, w.title) === undefined)\n .map(w => w.workspaceId as string)\n workspaceOrder[TOP_LEVEL_ORDER_KEY] = afterWorkspaceId !== undefined\n ? moveAfter(topLevelIds, workspaceId, afterWorkspaceId)\n : moveBefore(topLevelIds, workspaceId, beforeWorkspaceId)\n next = { ...manual, assignments, workspaceOrder }\n } else {\n const currentKey = resolveCategory(config, manual, workspaceId, workspace.path, workspace.title)\n const movingAcross = currentKey !== categoryKey\n const assignments = movingAcross\n ? { ...manual.assignments, [workspaceId]: categoryKey }\n : manual.assignments\n const targetOrder = afterWorkspaceId !== undefined\n ? moveAfter(manual.workspaceOrder[categoryKey] ?? [], workspaceId, afterWorkspaceId)\n : moveBefore(manual.workspaceOrder[categoryKey] ?? [], workspaceId, beforeWorkspaceId)\n const workspaceOrder = { ...manual.workspaceOrder, [categoryKey]: targetOrder }\n if (movingAcross && currentKey !== undefined && workspaceOrder[currentKey] !== undefined) {\n workspaceOrder[currentKey] = workspaceOrder[currentKey]!.filter(id => id !== workspaceId)\n }\n next = { ...manual, assignments, workspaceOrder }\n }\n await saveManualOverlay(next)\n setManual(next)\n setManualError(null)\n if (categoryKey !== UNCATEGORIZED_KEY) actions.setCategoryExpanded(categoryKey, true)\n } catch (reason) {\n setManualError(reason instanceof Error ? reason.message : String(reason))\n } finally {\n setManualSaving(false)\n }\n }\n\n /** Reorder groups: move `draggedKey` before `beforeKey` or after `afterKey` (未分类 target = append). */\n const moveCategory = async (draggedKey: string, beforeKey?: string, afterKey?: string): Promise => {\n if (manualSaving || draggedKey === beforeKey || draggedKey === afterKey) return\n setManualSaving(true)\n try {\n const order = displayCategoryKeys(config, manual)\n const categoryOrder = afterKey !== undefined\n ? moveAfter(order, draggedKey, afterKey)\n : moveBefore(order, draggedKey, beforeKey)\n const next: NormalizedManual = { ...manual, categoryOrder }\n await saveManualOverlay(next)\n setManual(next)\n setManualError(null)\n } catch (reason) {\n setManualError(reason instanceof Error ? reason.message : String(reason))\n } finally {\n setManualSaving(false)\n }\n }\n\n /**\n * Drop on a row. The insertion point is re-derived from the drop event's\n * position (top half = before, bottom half = after), so it always matches\n * the indicator the user last saw — even when dragover and drop arrive in\n * the same tick.\n */\n const onDropRow = (categoryKey: string, row: DropRowRef) => (event: DragEvent): void => {\n event.preventDefault()\n // Keep the drop from bubbling to the enclosing top-level area (which is\n // also a move-out target): a row drop and the area-drop below it must not\n // both fire moveWorkspaceTo.\n event.stopPropagation()\n setDragIndicator(null)\n setDragging(null)\n const draggedCategory = event.dataTransfer.getData(DND_CATEGORY_TYPE)\n if (draggedCategory !== '') {\n // Group reorder: only category rows are targets (project rows fold\n // during group drags); before/after follows the drop position.\n const rect = (event.currentTarget as HTMLElement).getBoundingClientRect()\n const before = event.clientY < rect.top + rect.height / 2\n const beforeKey = row.kind === 'category' && before ? row.key : undefined\n const afterKey = row.kind === 'category' && !before ? row.key : undefined\n void moveCategory(draggedCategory, beforeKey, afterKey)\n return\n }\n const workspaceId = event.dataTransfer.getData(DND_WORKSPACE_TYPE) || event.dataTransfer.getData('text/plain')\n if (workspaceId === '') return\n if (row.kind === 'topLevel') {\n // Top-level row / top-level blank drop = move OUT of any group (forced\n // top-level, rules ignored) and set the position inside the ordered\n // top-level list. A row drop re-derives before/after from the drop\n // position; a bare area drop (key = UNCATEGORIZED_KEY) appends to the end.\n const rect = (event.currentTarget as HTMLElement).getBoundingClientRect()\n const before = event.clientY < rect.top + rect.height / 2\n const specificKey = row.key === UNCATEGORIZED_KEY ? undefined : row.key\n void moveWorkspaceTo(workspaceId, UNCATEGORIZED_KEY, before ? specificKey : undefined, !before ? specificKey : undefined)\n return\n }\n // Project move/reorder: a line on a project row = reorder before/after it;\n // dropping anywhere else in a category = move into the group (its end).\n const rect = (event.currentTarget as HTMLElement).getBoundingClientRect()\n const before = event.clientY < rect.top + rect.height / 2\n const beforeWsid = row.kind === 'workspace' && before ? row.key : undefined\n const afterWsid = row.kind === 'workspace' && !before ? row.key : undefined\n void moveWorkspaceTo(workspaceId, categoryKey, beforeWsid, afterWsid)\n }\n\n const onDragOverRow = (row: DropRowRef) => (event: DragEvent): void => {\n if (!hasPluginDragType(event.dataTransfer.types)) return\n const draggingCategory = Array.from(event.dataTransfer.types as Iterable).includes(DND_CATEGORY_TYPE)\n if (draggingCategory && row.kind !== 'category') return // group drags target category rows only\n event.preventDefault()\n // Keep a row's dragover from bubbling to the enclosing top-level area\n // (which would interpret it as the end-of-list landing).\n event.stopPropagation()\n event.dataTransfer.dropEffect = 'move'\n const rect = (event.currentTarget as HTMLElement).getBoundingClientRect()\n const before = event.clientY < rect.top + rect.height / 2\n if (draggingCategory || row.kind === 'workspace' || row.kind === 'topLevel') {\n // Group reorder (line on a category row), project reorder inside a\n // group (line on a project row), or top-level reorder (line on a\n // top-level project row).\n setDragIndicator(prev =>\n prev?.mode === 'line' && prev.row.kind === row.kind && prev.row.key === row.key && prev.before === before\n ? prev\n : { mode: 'line', row, before })\n } else {\n // Dropping a project INTO a group: whole-row highlight.\n setDragIndicator(prev =>\n prev?.mode === 'into' && prev.categoryKey === row.key ? prev : { mode: 'into', categoryKey: row.key })\n }\n }\n\n const onDragLeaveRow = (event: DragEvent): void => {\n if (event.currentTarget.contains(event.relatedTarget as Node | null)) return\n setDragIndicator(null)\n }\n\n /**\n * Drag over the TOP-LEVEL AREA's blank space (not on a row — rows stop\n * propagation). An insertion line shows the landing spot: empty top level →\n * a standalone line under the last group; non-empty → a line below the last\n * top-level row (end of the list).\n */\n const onDragOverTopLevelArea = (event: DragEvent): void => {\n if (!hasPluginDragType(event.dataTransfer.types)) return\n const draggingCategory = Array.from(event.dataTransfer.types as Iterable).includes(DND_CATEGORY_TYPE)\n if (draggingCategory) return // group drags never target the top-level area\n event.preventDefault()\n event.dataTransfer.dropEffect = 'move'\n const last = topLevel.length > 0 ? topLevel[topLevel.length - 1] : undefined\n if (last !== undefined) {\n setDragIndicator(prev =>\n prev?.mode === 'line' && prev.row.kind === 'topLevel' && prev.row.key === last.workspaceId && prev.before === false\n ? prev\n : { mode: 'line', row: { kind: 'topLevel', key: last.workspaceId }, before: false })\n } else {\n setDragIndicator(prev =>\n prev?.mode === 'line' && prev.row.kind === 'topLevel' && prev.row.key === topLevelRef.key && prev.before === false\n ? prev\n : { mode: 'line', row: topLevelRef, before: false })\n }\n }\n\n // While dragging a project, only PROJECT rows fold — every expanded\n // workspace collapses (inside groups AND top-level); group rows keep their\n // expansion so the user still sees where groups are. dragend restores the\n // snapshot taken here.\n const onDragStartWorkspace = (_workspaceId: string) => (): void => {\n setDragging('workspace')\n expansionSnapshot.current = {\n categories: { ...categoryExpansion },\n workspaces: { ...workspaceExpansion },\n }\n for (const key of Object.keys(workspaceExpansion)) {\n if (workspaceExpansion[key]) actions.setWorkspaceExpanded(key, false)\n }\n }\n\n // While dragging a group, only GROUP rows fold (their rows stay visible as\n // reorder targets); project rows keep their expansion. dragend restores the\n // snapshot taken here.\n const onDragStartCategory = (categoryKey: string) => (event: DragEvent): void => {\n event.dataTransfer.setData(DND_CATEGORY_TYPE, categoryKey)\n event.dataTransfer.effectAllowed = 'move'\n setDragging('category')\n expansionSnapshot.current = {\n categories: { ...categoryExpansion },\n workspaces: { ...workspaceExpansion },\n }\n for (const key of Object.keys(categoryExpansion)) {\n if (categoryExpansion[key]) actions.setCategoryExpanded(key, false)\n }\n }\n\n const now = Date.now()\n\n return (\n
\n
\n {wide && {t('section.workspaces')}}\n {wide && (\n
\n { setSearchExpanded(true) }}\n >\n \n \n {searchExpanded && (\n { setQuery(sanitizeSearchQuery(e.target.value)) }}\n onKeyDown={(e) => {\n if (e.key !== 'Escape') return\n setQuery('')\n setSearchExpanded(false)\n }}\n />\n )}\n {searchExpanded && (\n {\n e.stopPropagation()\n setQuery('')\n setSearchExpanded(false)\n }}\n >\n \n \n )}\n
\n )}\n \n {\n setGroupDraft('')\n setGroupError(null)\n setGroupDialog({ mode: 'create' })\n }}\n >\n \n \n \n \n \n \n \n \n
\n\n {!wide && (\n
\n \n { setSearchExpanded(true); expandSidebar() }}\n >\n \n \n \n
\n )}\n\n
\n {configError !== null && (\n
{t('configUnavailable')}
\n )}\n {manualError !== null && (\n
{t('manual.saveError')}: {manualError}
\n )}\n {wide && normalizedQuery !== '' ? (\n \n ) : (\n
\n {groups.length === 0 && topLevel.length === 0 && !topLevelDropActive && (\n
{workspacePhase === 'ready' ? t('empty.noWorkspaces') : t('empty.none')}
\n )}\n {groups.map((category) => (\n { actions.setCategoryExpanded(category.key, !category.expanded) }}\n onToggleWorkspace={(key) => { actions.setWorkspaceExpanded(key, !workspaceExpansion[key]) }}\n onNewSession={startSession}\n onOpen={open}\n onRenameRequest={(workspaceId, title) => {\n setRenameTarget({ workspaceId, currentTitle: title })\n setRenameDraft(title)\n setRenameError(null)\n }}\n onDeleteRequest={(workspaceId, title) => {\n setDeleteTarget({ workspaceId, title })\n setDeleteError(null)\n }}\n onSessionRename={onSessionRename}\n onSessionArchive={onSessionArchive}\n onFork={forkSession}\n onGroupRename={() => {\n setGroupDraft(category.key)\n setGroupError(null)\n setGroupDialog({ mode: 'rename', from: category.key })\n }}\n onGroupDelete={() => {\n setGroupDeleteTarget(category.key)\n setGroupDeleteError(null)\n }}\n onMoveOut={(workspaceId) => { void moveWorkspaceTo(workspaceId, UNCATEGORIZED_KEY) }}\n canMoveOut={(workspaceId) => {\n // The menu \"移出分组\" is offered for any project that\n // currently sits inside a group (rule-classified or manual) —\n // not just overridden ones. Top-level projects\n // (resolveCategory === undefined) don't need it.\n const workspace = workspaces.find(w => w.workspaceId === workspaceId)\n return workspace !== undefined\n && resolveCategory(config, manual, workspace.workspaceId, workspace.path, workspace.title) !== undefined\n }}\n />\n ))}\n {/* Top-level (ungrouped) workspaces, rendered after the group\n folders. While dragging a project the whole area is the\n move-out landing spot (a line shows the insert position;\n an empty top level shows a line under the last group). */}\n {(topLevel.length > 0 || topLevelDropActive) && (\n { actions.setWorkspaceExpanded(key, !workspaceExpansion[key]) }}\n onNewSession={startSession}\n onOpen={open}\n onRenameRequest={(workspaceId, title) => {\n setRenameTarget({ workspaceId, currentTitle: title })\n setRenameDraft(title)\n setRenameError(null)\n }}\n onDeleteRequest={(workspaceId, title) => {\n setDeleteTarget({ workspaceId, title })\n setDeleteError(null)\n }}\n onSessionRename={onSessionRename}\n onSessionArchive={onSessionArchive}\n onFork={forkSession}\n />\n )}\n
\n )}\n
\n\n {/* Group create / rename dialog */}\n { setGroupDialog(null) }}\n closeLabel={t('close')}\n title={groupDialog?.mode === 'rename' ? t('group.renameTitle') : t('group.createTitle')}\n footer={(\n <>\n \n \n \n )}\n >\n { setGroupDraft(e.target.value); setGroupError(null) }}\n onKeyDown={(e) => { if (e.key === 'Enter') confirmGroupDialog() }}\n />\n {groupNameIssue !== null &&
{groupNameIssue}
}\n {groupError !== null &&
{groupError}
}\n \n\n {/* Group delete dialog */}\n { setGroupDeleteTarget(null) }}\n closeLabel={t('close')}\n title={t('group.deleteTitle')}\n footer={(\n <>\n \n \n \n )}\n >\n
{t('group.deleteConfirm')}
\n {groupDeleteError !== null &&
{groupDeleteError}
}\n \n\n {/* Workspace rename dialog */}\n { setRenameTarget(null) }}\n closeLabel={t('close')}\n title={t('workspace.renameTitle')}\n footer={(\n <>\n \n \n \n )}\n >\n { setRenameDraft(e.target.value) }}\n onKeyDown={(e) => { if (e.key === \"Enter\") confirmRename() }}\n />\n {renameError !== null &&
{renameError}
}\n \n\n {/* Workspace delete dialog */}\n { setDeleteTarget(null) }}\n closeLabel={t('close')}\n title={t('workspace.deleteTitle')}\n footer={(\n <>\n \n \n \n )}\n >\n
{t('workspace.deleteConfirm')}
\n {deleteError !== null &&
{deleteError}
}\n \n\n {/* Session rename dialog */}\n { setSessionRenameTarget(null) }}\n closeLabel={t('close')}\n title={t('session.renameTitle')}\n footer={(\n <>\n \n \n \n )}\n >\n { setSessionRenameDraft(e.target.value) }}\n onKeyDown={(e) => { if (e.key === \"Enter\") confirmSessionRename() }}\n />\n {sessionRenameError !== null &&
{sessionRenameError}
}\n \n\n {/* Add workspace error dialog */}\n { setAddErrorOpen(false) }}\n closeLabel={t('close')}\n title={t('workspace.addErrorTitle')}\n footer={(\n <>\n \n \n \n )}\n >\n
{addError}
\n \n
\n )\n}\n\n/** Resolve the category label containing the current session (auto-expand helper). */\nfunction categoriesForCurrent(\n config: GroupsConfig,\n workspaces: readonly WorkspaceView[],\n current: SessionId,\n manual: ManualGroups,\n): string | undefined {\n const workspace = workspaces.find(w => w.sessionIds.includes(current))\n if (workspace === undefined) return undefined\n return resolveCategory(config, manual, workspace.workspaceId, workspace.path, workspace.title)\n}\n\n/** One category section: header row + expanded workspace folders. */\nfunction CategorySection({ category, current, now, t, dragIndicator, onDragOverRow, onDragLeaveRow, onDropRow, onDragStartCategory, onDragStartWorkspace, onToggleCategory, onToggleWorkspace, onNewSession, onOpen, onRenameRequest, onDeleteRequest, onSessionRename, onSessionArchive, onFork, onGroupRename, onGroupDelete, onMoveOut, canMoveOut }: {\n category: CategoryNode\n current: SessionId | undefined\n now: number\n t: GroupsBrowserProps['t']\n dragIndicator: DragIndicator\n onDragOverRow: (row: DropRowRef) => (event: DragEvent) => void\n onDragLeaveRow: (event: DragEvent) => void\n /** Drop factory: bind the target category and the row kind (before/after re-derived at drop time). */\n onDropRow: (categoryKey: string, row: DropRowRef) => (event: DragEvent) => void\n onDragStartCategory: (event: DragEvent) => void\n onDragStartWorkspace: (workspaceId: WorkspaceId) => () => void\n onToggleCategory: () => void\n onToggleWorkspace: (key: string) => void\n onNewSession: (workspaceId?: WorkspaceId) => void\n onOpen: (sessionId: SessionId) => void\n onRenameRequest: (workspaceId: WorkspaceId, currentTitle: string) => void\n onDeleteRequest: (workspaceId: WorkspaceId, title: string) => void\n onSessionRename: (sessionId: SessionId, currentTitle: string) => void\n onSessionArchive: (sessionId: SessionId) => void\n onFork: (sessionId: SessionId) => void\n onGroupRename: () => void\n onGroupDelete: () => void\n onMoveOut: (workspaceId: WorkspaceId) => void\n canMoveOut: (workspaceId: WorkspaceId) => boolean\n}) {\n const categoryLine = dragIndicator?.mode === 'line' && dragIndicator.row.kind === 'category' && dragIndicator.row.key === category.key\n ? (dragIndicator.before ? 'before' : 'after')\n : undefined\n const categoryInto = dragIndicator?.mode === 'into' && dragIndicator.categoryKey === category.key\n return (\n
\n \n {category.expanded && (\n
\n {category.workspaces.map((workspace) => (\n
\n { onToggleWorkspace(workspace.workspaceId as string) }}\n onNewSession={() => { onNewSession(workspace.workspaceId) }}\n onRename={() => { onRenameRequest(workspace.workspaceId, workspace.label) }}\n onDelete={() => { onDeleteRequest(workspace.workspaceId, workspace.label) }}\n canMoveOut={canMoveOut(workspace.workspaceId)}\n onMoveOut={() => { onMoveOut(workspace.workspaceId) }}\n dropActive={false}\n {...(dragIndicator?.mode === 'line' && dragIndicator.row.kind === 'workspace' && dragIndicator.row.key === workspace.workspaceId\n ? { insertLine: dragIndicator.before ? 'before' : 'after' }\n : {})}\n onRowDragOver={onDragOverRow({ kind: 'workspace', key: workspace.workspaceId })}\n onRowDragLeave={onDragLeaveRow}\n onRowDrop={onDropRow(category.key, { kind: 'workspace', key: workspace.workspaceId })}\n onDragStartExtra={onDragStartWorkspace(workspace.workspaceId)}\n />\n {workspace.expanded && workspace.sessions.map((session) => (\n \n ))}\n
\n ))}\n
\n )}\n
\n )\n}\n\n/**\n * Top-level (ungrouped) workspace rows rendered after the group folders. While\n * a project drag is in progress the WHOLE top-level area is the move-out\n * landing spot, shown with an insertion LINE (not a highlight box):\n * - a top-level row reorders before/after it (line above/below, like a group);\n * - the blank space below the last row appends to the end (line below the\n * last row);\n * - an empty top level shows a standalone line under the last group folder.\n */\nfunction TopLevelSection({ topLevel, current, now, t, dragging, dragIndicator, topLevelRef, onDragOverRow, onDragOverTopLevelArea, onDragLeaveRow, onDropRow, onDragStartWorkspace, onToggleWorkspace, onNewSession, onOpen, onRenameRequest, onDeleteRequest, onSessionRename, onSessionArchive, onFork }: {\n topLevel: readonly WorkspaceGroupNode[]\n current: SessionId | undefined\n now: number\n t: GroupsBrowserProps['t']\n /** A project drag is in progress (drives the empty-top-level landing line). */\n dragging: boolean\n dragIndicator: DragIndicator\n topLevelRef: DropRowRef\n onDragOverRow: (row: DropRowRef) => (event: DragEvent) => void\n onDragOverTopLevelArea: (event: DragEvent) => void\n onDragLeaveRow: (event: DragEvent) => void\n onDropRow: (categoryKey: string, row: DropRowRef) => (event: DragEvent) => void\n onDragStartWorkspace: (workspaceId: WorkspaceId) => () => void\n onToggleWorkspace: (key: string) => void\n onNewSession: (workspaceId?: WorkspaceId) => void\n onOpen: (sessionId: SessionId) => void\n onRenameRequest: (workspaceId: WorkspaceId, currentTitle: string) => void\n onDeleteRequest: (workspaceId: WorkspaceId, title: string) => void\n onSessionRename: (sessionId: SessionId, currentTitle: string) => void\n onSessionArchive: (sessionId: SessionId) => void\n onFork: (sessionId: SessionId) => void\n}) {\n const emptyLineActive = dragIndicator?.mode === 'line' && dragIndicator.row.kind === 'topLevel' && dragIndicator.row.key === topLevelRef.key\n return (\n \n {topLevel.length === 0 && dragging && (\n \n \n \n )}\n {topLevel.map((workspace) => (\n
\n { onToggleWorkspace(workspace.workspaceId as string) }}\n onNewSession={() => { onNewSession(workspace.workspaceId) }}\n onRename={() => { onRenameRequest(workspace.workspaceId, workspace.label) }}\n onDelete={() => { onDeleteRequest(workspace.workspaceId, workspace.label) }}\n {...(dragIndicator?.mode === 'line' && dragIndicator.row.kind === 'topLevel' && dragIndicator.row.key === workspace.workspaceId\n ? { insertLine: dragIndicator.before ? 'before' : 'after' }\n : {})}\n onRowDragOver={onDragOverRow({ kind: 'topLevel', key: workspace.workspaceId })}\n onRowDragLeave={onDragLeaveRow}\n onRowDrop={onDropRow(UNCATEGORIZED_KEY, { kind: 'topLevel', key: workspace.workspaceId })}\n onDragStartExtra={onDragStartWorkspace(workspace.workspaceId)}\n />\n {workspace.expanded && workspace.sessions.map((session) => (\n \n ))}\n
\n ))}\n \n )\n}\n\n/**\n * Search body rendered as a three-level tree pruned to matched branches:\n * 分类文件夹 → 项目文件夹 → 命中会话行. Reuses the same row components as\n * the idle tree, so search keeps the same folder hierarchy the user is used to.\n */\nfunction SearchBody({ list, workspaces, config, archivedSessionIds, query, remote, resultLimit, current, now, open, manual, t }: {\n list: SessionListState\n workspaces: readonly WorkspaceView[]\n config: GroupsConfig\n archivedSessionIds: readonly SessionId[]\n query: string\n remote: RemoteSearchState\n resultLimit: number\n current: SessionId | undefined\n now: number\n open: (sessionId: SessionId) => void\n manual: ManualGroups\n t: GroupsBrowserProps['t']\n}) {\n const currentRemote = remote.query === query ? remote : { query, status: 'loading' as const, items: [], hasMore: false }\n const matches = useMemo(\n () => deriveSearchMatches(list, workspaces, config, query, archivedSessionIds, currentRemote, resultLimit),\n [list, workspaces, config, query, archivedSessionIds, currentRemote, resultLimit],\n )\n const searchTree = useMemo(\n () => deriveSearchGroups(list, workspaces, config, matches.matchedIds, archivedSessionIds, manual, matches.snippetsBySession),\n [list, workspaces, config, matches, archivedSessionIds, manual],\n )\n const groups = searchTree.categories\n const searchTopLevel = searchTree.topLevel\n const pending = currentRemote.status === 'loading'\n const failed = currentRemote.status === 'error'\n return (\n
\n {groups.map((category) => (\n
\n {}} />\n
\n {category.workspaces.map((workspace) => (\n
\n {}}\n onNewSession={() => {}}\n onRename={() => {}}\n onDelete={() => {}}\n />\n
\n {workspace.sessions.map((session) => (\n {}}\n onFork={() => {}}\n onArchive={() => {}}\n />\n ))}\n
\n
\n ))}\n
\n
\n ))}\n {searchTopLevel.map((workspace) => (\n
\n {}}\n onNewSession={() => {}}\n onRename={() => {}}\n onDelete={() => {}}\n />\n
\n {workspace.sessions.map((session) => (\n {}}\n onFork={() => {}}\n onArchive={() => {}}\n />\n ))}\n
\n
\n ))}\n {pending &&
{t('search.pending')}
}\n {failed &&
{t('search.unavailable')}
}\n {!pending && groups.length === 0 && searchTopLevel.length === 0 && (\n
{t('search.noMatches')}
\n )}\n {matches.hasMore && (\n
{t('search.hasMore')}
\n )}\n
\n )\n}\n","/**\n * Locale dictionaries for the workspace-groups browser. The namespace is\n * `workspaceGroups` (independent from ui-workspace's `workspace` namespace).\n */\nimport type { LocaleDictOf } from '@deepseek-ai/dsh-client-ui-slots'\n\n/** Dictionary keys of the workspaceGroups namespace (single source of truth). */\nexport type WorkspaceGroupsKey =\n | 'section.workspaces'\n | 'section.sessions'\n | 'search'\n | 'search.placeholder'\n | 'search.clear'\n | 'search.noMatches'\n | 'search.unavailable'\n | 'search.pending'\n | 'search.hasMore'\n | 'search.results.aria'\n | 'workspace.add'\n | 'workspace.addBusy'\n | 'workspace.addError'\n | 'workspace.addErrorTitle'\n | 'workspace.rename'\n | 'workspace.delete'\n | 'workspace.deleteTitle'\n | 'workspace.deleteConfirm'\n | 'workspace.deleteCancel'\n | 'workspace.renaming'\n | 'workspace.deleting'\n | 'workspace.renameTitle'\n | 'workspace.renamePlaceholder'\n | 'workspace.renameConfirm'\n | 'workspace.renameCancel'\n | 'workspace.moveOutOfGroup'\n | 'group.create'\n | 'group.createTitle'\n | 'group.createPlaceholder'\n | 'group.createConfirm'\n | 'group.createCancel'\n | 'group.rename'\n | 'group.renameTitle'\n | 'group.renameConfirm'\n | 'group.delete'\n | 'group.deleteTitle'\n | 'group.deleteConfirm'\n | 'group.deleteCancel'\n | 'group.nameDuplicate'\n | 'group.nameReserved'\n | 'section.topLevel'\n | 'manual.saveError'\n | 'session.new'\n | 'session.rename'\n | 'session.archive'\n | 'session.fork'\n | 'session.renameTitle'\n | 'session.renamePlaceholder'\n | 'session.renameConfirm'\n | 'session.renameCancel'\n | 'session.renaming'\n | 'uncategorized'\n | 'empty.none'\n | 'empty.noWorkspaces'\n | 'close'\n | 'cancel'\n | 'confirm'\n | 'retry'\n | 'configUnavailable'\n | 'collapse'\n | 'expandMore'\n | 'newSession'\n\nexport type WorkspaceGroupsDict = LocaleDictOf<'workspaceGroups'>\n\n/** Simplified Chinese dictionary. */\nexport const zh: WorkspaceGroupsDict = {\n 'section.workspaces': '工作区',\n 'section.sessions': '会话',\n search: '搜索',\n 'search.placeholder': '搜索会话…',\n 'search.clear': '清除',\n 'search.noMatches': '没有匹配的会话',\n 'search.unavailable': '搜索不可用',\n 'search.pending': '搜索中…',\n 'search.hasMore': '结果过多,请细化关键词',\n 'search.results.aria': '搜索结果',\n 'workspace.add': '添加工作区',\n 'workspace.addBusy': '正在添加…',\n 'workspace.addError': '添加失败',\n 'workspace.addErrorTitle': '无法添加工作区',\n 'workspace.rename': '重命名',\n 'workspace.delete': '删除',\n 'workspace.deleteTitle': '删除工作区',\n 'workspace.deleteConfirm': '仅删除注册信息,目录与会话日志保留。确定删除?',\n 'workspace.deleteCancel': '取消删除',\n 'workspace.renaming': '重命名中…',\n 'workspace.deleting': '删除中…',\n 'workspace.renameTitle': '重命名工作区',\n 'workspace.renamePlaceholder': '工作区名称',\n 'workspace.renameConfirm': '重命名',\n 'workspace.renameCancel': '取消',\n 'workspace.moveOutOfGroup': '移出分组',\n 'group.create': '新建分组',\n 'group.createTitle': '新建分组',\n 'group.createPlaceholder': '分组名称',\n 'group.createConfirm': '创建',\n 'group.createCancel': '取消',\n 'group.rename': '重命名分组',\n 'group.renameTitle': '重命名分组',\n 'group.renameConfirm': '重命名',\n 'group.delete': '删除分组',\n 'group.deleteTitle': '删除分组',\n 'group.deleteConfirm': '删除后,该分组内的所有项目将移到顶层(不归组)。确定删除?',\n 'group.deleteCancel': '取消删除',\n 'group.nameDuplicate': '已存在同名分组',\n 'group.nameReserved': '该名称不可用',\n 'section.topLevel': '顶层项目',\n 'manual.saveError': '分组变更保存失败',\n 'session.new': '新建会话',\n 'session.rename': '重命名会话',\n 'session.archive': '归档',\n 'session.fork': '派生',\n 'session.renameTitle': '重命名会话',\n 'session.renamePlaceholder': '会话名称',\n 'session.renameConfirm': '重命名',\n 'session.renameCancel': '取消',\n 'session.renaming': '重命名中…',\n uncategorized: '未分类',\n 'empty.none': '暂无内容',\n 'empty.noWorkspaces': '还没有工作区',\n close: '关闭',\n cancel: '取消',\n confirm: '确定',\n retry: '重试',\n configUnavailable: '分组配置不可用',\n collapse: '折叠',\n expandMore: '展开全部',\n newSession: '新建会话',\n}\n\n/** English dictionary. */\nexport const en: WorkspaceGroupsDict = {\n 'section.workspaces': 'Workspaces',\n 'section.sessions': 'Sessions',\n search: 'Search',\n 'search.placeholder': 'Search sessions…',\n 'search.clear': 'Clear',\n 'search.noMatches': 'No matching sessions',\n 'search.unavailable': 'Search unavailable',\n 'search.pending': 'Searching…',\n 'search.hasMore': 'Too many results — refine the query',\n 'search.results.aria': 'Search results',\n 'workspace.add': 'Add workspace',\n 'workspace.addBusy': 'Adding…',\n 'workspace.addError': 'Add failed',\n 'workspace.addErrorTitle': 'Could not add workspace',\n 'workspace.rename': 'Rename',\n 'workspace.delete': 'Delete',\n 'workspace.deleteTitle': 'Delete workspace',\n 'workspace.deleteConfirm': 'Only the registration is removed; the directory and session logs stay. Delete?',\n 'workspace.deleteCancel': 'Cancel delete',\n 'workspace.renaming': 'Renaming…',\n 'workspace.deleting': 'Deleting…',\n 'workspace.renameTitle': 'Rename workspace',\n 'workspace.renamePlaceholder': 'Workspace name',\n 'workspace.renameConfirm': 'Rename',\n 'workspace.renameCancel': 'Cancel',\n 'workspace.moveOutOfGroup': 'Move out of group',\n 'group.create': 'New group',\n 'group.createTitle': 'New group',\n 'group.createPlaceholder': 'Group name',\n 'group.createConfirm': 'Create',\n 'group.createCancel': 'Cancel',\n 'group.rename': 'Rename group',\n 'group.renameTitle': 'Rename group',\n 'group.renameConfirm': 'Rename',\n 'group.delete': 'Delete group',\n 'group.deleteTitle': 'Delete group',\n 'group.deleteConfirm': 'Deleting removes this group; every project inside it moves to the top level (ungrouped). Delete?',\n 'group.deleteCancel': 'Cancel delete',\n 'group.nameDuplicate': 'A group with this name already exists',\n 'group.nameReserved': 'This name is not available',\n 'section.topLevel': 'Top-level projects',\n 'manual.saveError': 'Could not save group changes',\n 'session.new': 'New Session',\n 'session.rename': 'Rename session',\n 'session.archive': 'Archive',\n 'session.fork': 'Fork',\n 'session.renameTitle': 'Rename session',\n 'session.renamePlaceholder': 'Session name',\n 'session.renameConfirm': 'Rename',\n 'session.renameCancel': 'Cancel',\n 'session.renaming': 'Renaming…',\n uncategorized: 'Uncategorized',\n 'empty.none': 'Nothing here',\n 'empty.noWorkspaces': 'No workspaces yet',\n close: 'Close',\n cancel: 'Cancel',\n confirm: 'Confirm',\n retry: 'Retry',\n configUnavailable: 'Grouping config unavailable',\n collapse: 'Collapse',\n expandMore: 'Show all',\n newSession: 'New Session',\n}\n","/**\n * dsh-workspace-groups client half: registers the three-level grouped\n * workspace browser into the `sidebar.workspaces` slot, shadowing the\n * official ui-workspace browser.\n *\n * Shadowing mechanics (SlotCore semantics):\n * - `sidebar.workspaces` is a `single`/`root` slot. The official browser\n * registers at priority 0; this entry registers at priority -1, and the\n * single-cell shadow rule makes the LOWEST priority the winner — the\n * sidebar renders this browser instead of the official one.\n * - This entry deliberately declares NO child slots: the official entry\n * already declared `sidebar.workspaces.directoryFlow` (a second declaration\n * of an occupied child key throws). Add Workspace is therefore self-\n * contained — `ctx.workspaces.pickDirectory()` + `create()`, no hole.\n */\nimport type { ClientContext } from '@deepseek-ai/dsh-client-runtime/client'\nimport type { ConnectionHandle } from '@deepseek-ai/dsh-client-connection/client'\n// Type-only: pulls the locale plugin's Context merge (ctx.locale).\nimport type {} from '@deepseek-ai/dsh-client-locale/client'\nimport type { GroupsBrowserInjected } from './contract.ts'\nimport { createGroupsViewStore } from './stores.ts'\nimport { GroupsBrowser } from './GroupsBrowser.tsx'\nimport { en, zh, type WorkspaceGroupsKey } from './locales.ts'\n\ndeclare module '@deepseek-ai/dsh-client-ui-slots' {\n interface LocaleNamespaceMap {\n /** The workspace-groups browsing region copy. */\n workspaceGroups: WorkspaceGroupsKey\n }\n}\n\n/** Dictionary namespace owned by this plugin. */\nconst NS = 'workspaceGroups'\n\n/** Required services (cordis fiber inject). */\nexport const inject = ['slots', 'sessions', 'workspaces', 'locale', 'connection']\n\n/**\n * Register the grouped browser once the sidebar slot declaration is on the\n * ledger. Inject factory returns plain callbacks; data reads use the\n * framework's global hooks.\n * @param ctx - client root context.\n */\nexport function apply(ctx: ClientContext): void {\n ctx.effect(() => ctx.locale.register(NS, { zh, en }), 'dsh-workspace-groups: dictionaries')\n\n const searchSessions: GroupsBrowserInjected['searchSessions'] = async (query, signal) => {\n const result = await ctx.sessions.search(query, signal)\n if (!result.ok) throw new Error(result.error.message)\n return result.value\n }\n\n const browserInjected = (): GroupsBrowserInjected => ({\n startSession: (workspaceId) => { ctx.workspaces.startSession(workspaceId) },\n open: (sessionId) => { ctx.sessions.open(sessionId) },\n searchSessions,\n searchResultLimit: ctx.sessions.searchResultLimit,\n renameSession: async (sessionId, title) => {\n const session = ctx.sessions.binding(sessionId)?.session\n if (session === undefined) throw new Error(`unknown session \"${sessionId}\"`)\n const result = await session.rename(title)\n if (!result.ok) throw new Error(result.error.message)\n },\n forkSession: (sessionId) => {\n ctx.sessions.fork({ sessionId, increaseTitle: true })\n .then((childId) => { ctx.sessions.open(childId) })\n .catch(() => {})\n },\n renameWorkspace: async (workspaceId, title) => { await ctx.workspaces.rename(workspaceId, title) },\n deleteWorkspace: async (workspaceId) => { await ctx.workspaces.delete(workspaceId) },\n insertWorkspaceBefore: async (workspaceId, beforeWorkspaceId) => {\n await ctx.workspaces.insertBefore(workspaceId, beforeWorkspaceId)\n },\n archiveSession: async (sessionId) => { await ctx.workspaces.archiveSession(sessionId) },\n insertSessionBefore: async (workspaceId, sessionId, beforeSessionId) => {\n await ctx.workspaces.insertSessionBefore(workspaceId, sessionId, beforeSessionId)\n },\n createWorkspace: input => ctx.workspaces.create(input),\n pickDirectory: () => ctx.workspaces.pickDirectory(),\n hooks: {\n hostDescription: (ctx.get('connection') as ConnectionHandle).hostDescription,\n },\n })\n\n // priority: -1 — lower than the official browser's default 0, so the\n // single-slot shadow rule elects this entry. No children declaration: the\n // official entry already owns `sidebar.workspaces.directoryFlow`.\n ctx.slots.inject('sidebar.workspaces', () => ctx.slots.register(\n {\n name: 'sidebar.workspaces',\n priority: -1,\n store: createGroupsViewStore(),\n inject: browserInjected,\n locale: NS,\n registrant: 'dsh-workspace-groups',\n },\n GroupsBrowser,\n ))\n}\n"],"mappings":";;;;;;;;;;;;EAsBA,SAAgB,wBAAwB,OAAwB,KAAa,UAAyB;GACpG,MAAM,kBAAkB,OAAO;EACjC;;EAGA,SAAgB,yBAAyB,OAAwB,KAAa,UAAyB;GACrG,MAAM,mBAAmB,OAAO;EAClC;;EAGA,SAAgB,eACd,OACA,cACA,eACM;GACN,MAAM,oBAAoB,OAAO,YAC/B,OAAO,QAAQ,MAAM,iBAAiB,CAAC,CAAC,QAAQ,CAAC,SAAS,aAAa,SAAS,GAAG,CAAC,CACtF;GACA,MAAM,qBAAqB,OAAO,YAChC,OAAO,QAAQ,MAAM,kBAAkB,CAAC,CAAC,QAAQ,CAAC,SAAS,cAAc,SAAS,GAAG,CAAC,CACxF;EACF;;;;;;;;;;;;;;;;;;;ECZA,SAAgB,wBAA+E;GAC7F,QAAA,GAAOA,uCAAAA,YAAAA,CAAY;IACjB,aAAa;KAAE,mBAAmB,CAAC;KAAG,oBAAoB,CAAC;IAAE;IAC7D,SAAS;IACT,SAAS;KACP,qBAAqB;KACrB,sBAAsB;KACtB,YAAY;IACd;GACF,CAAC;EACH;;;;;;;;;ECqDA,MAAa,sBAAsB;;;;;;;;EASnC,MAAa,sBAAsB;;EAGnC,SAAgB,cAAc,MAAsB;GAClD,OAAO,KAAK,QAAQ,WAAW,EAAE;EACnC;;;;;;;;;;;;;;;;ECtFA,SAAS,YAAY,MAAiB,MAAc,OAAwB;GAC1E,MAAM,aAAa,cAAc,IAAI;GACrC,IAAI,KAAK,eAAe,KAAA,KAAa,WAAW,W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WAAW,oBAAoB,aAAa,WAAW,eAAe;IAClF;IACA,kBAAiB,UAAS,IAAI,WAAW,OAAO,KAAK;IACrD,qBAAqB,IAAI,WAAW,cAAc;IAClD,OAAO,EACL,iBAAkB,IAAI,IAAI,YAAY,CAAC,CAAsB,gBAC/D;GACF;GAKA,IAAI,MAAM,OAAO,4BAA4B,IAAI,MAAM,SACrD;IACE,MAAM;IACN,UAAU;IACV,OAAO,sBAAsB;IAC7B,QAAQ;IACR,QAAQ;IACR,YAAY;GACd,GACA,aACF,CAAC;EACH"} \ No newline at end of file +{"version":3,"file":"client.js","names":["defineStore","defineStore","useRef","useCallback","useSyncExternalStore","useState","IconTriangleRightFillMedium","IconFolderOpenMedium","IconFolderCloseMedium","Menu","IconEditOutlineRegular","IconTrashOutlineRegular","IconEllipsisOutlineRegular","IconFolderOpenOutlineRegular","IconRightUpOutlineRegular","IconProjectAddOutlineRegular","IconPlusOutlineRegular","IconBranchOutlineRegular","IconArchiveOutlineRegular","StateDot","useState","useRef","useMemo","createPortal","Button","StateDot","useMemo","useState","useRef","createPortal","StateDot","Tooltip","IconCloseFillMedium","useState","useRef","useMemo","css","useState","useRef","useMemo","IconSearchOutlineRegular","IconCloseFillMedium","Tooltip","IconFolderOpenOutlineRegular","IconProjectAddOutlineRegular","Modal","Button","Toast","IconWarningOutlineRegular"],"sources":["../src/client/store-core.ts","../src/client/stores.ts","../src/client/tabs.ts","../src/client/tab-store.ts","../src/client/tab-persist.ts","../src/client/store-hook.ts","../src/core/types.ts","../src/core/matcher.ts","../src/client/subagent-lineage.ts","../src/client/tree.ts","../src/client/rows.tsx","../src/client/open-folder.ts","../src/client/quick.ts","../src/client/QuickPanel.tsx","../src/client/tab-seat.ts","../src/client/SessionTabs.tsx","../src/client/branch.ts","../src/client/FlowerBranch.tsx","../src/client/GroupsBrowser.tsx","../src/client/locales.ts","../src/client/index.ts"],"sourcesContent":["/**\r\n * Pure expansion-state transforms for the workspace-groups store. Kept free\r\n * of any runtime import so both the store (which binds them via defineStore)\r\n * and unit tests (which exercise them directly) share one implementation.\r\n *\r\n * Expansion semantics follow the official ui-workspace store: collapse\r\n * WRITES `false` (never deletes the key). The browser's auto-expand guard\r\n * uses `Object.hasOwn` — a present `false` means \"user deliberately\r\n * collapsed this\" and must NOT be re-expanded; only a fully absent key means\r\n * \"never touched\" and may auto-expand. (Earlier versions deleted the key on\r\n * collapse, which made the current category/workspace impossible to fold.)\r\n */\r\n\r\n/** Workspace-groups browser viewing state persisted across surface remounts and reloads. */\r\nexport interface GroupsViewState {\r\n /** Category folder expansion keyed by category label (absent = never touched). */\r\n categoryExpansion: Record\r\n /** Workspace folder expansion keyed by workspace id (absent = never touched). */\r\n workspaceExpansion: Record\r\n}\r\n\r\n/** Collapse writes `false` (key retained); expand writes `true`. */\r\nexport function setCategoryExpandedImpl(state: GroupsViewState, key: string, expanded: boolean): void {\r\n state.categoryExpansion[key] = expanded\r\n}\r\n\r\n/** Collapse writes `false` (key retained); expand writes `true`. */\r\nexport function setWorkspaceExpandedImpl(state: GroupsViewState, key: string, expanded: boolean): void {\r\n state.workspaceExpansion[key] = expanded\r\n}\r\n\r\n/** Drop expansion keys that no longer exist (renames/deletes/config edits). */\r\nexport function retainKeysImpl(\r\n state: GroupsViewState,\r\n categoryKeys: readonly string[],\r\n workspaceKeys: readonly string[],\r\n): void {\r\n state.categoryExpansion = Object.fromEntries(\r\n Object.entries(state.categoryExpansion).filter(([key]) => categoryKeys.includes(key)),\r\n )\r\n state.workspaceExpansion = Object.fromEntries(\r\n Object.entries(state.workspaceExpansion).filter(([key]) => workspaceKeys.includes(key)),\r\n )\r\n}\r\n","/**\r\n * The workspace-groups viewing store: category / workspace folder expansion,\r\n * persisted across reloads under an independent key (the official\r\n * ui-workspace store keeps its own `dsh.workspace.view.v5` — we never touch\r\n * it). Module level exports the factory only (a module-level handle would pin\r\n * the store identity across plugin reloads); register() receives the factory\r\n * and the browser derives its PropsStore share from the return type.\r\n *\r\n * The action implementations live in `store-core.ts` (pure, runtime-free) so\r\n * unit tests exercise the real semantics without a browser module loader;\r\n * this file only binds them through defineStore.\r\n */\r\nimport { defineStore, type EngineStoreHandle } from '@deepseek-ai/dsh-client-store'\r\nimport {\r\n retainKeysImpl,\r\n setCategoryExpandedImpl,\r\n setWorkspaceExpandedImpl,\r\n type GroupsViewState,\r\n} from './store-core.ts'\r\n\r\n/** Annotation twin of the actions literal below (structural type, satisfies `ActionsDecl`). */\r\ntype GroupsViewActions = {\r\n setCategoryExpanded: typeof setCategoryExpandedImpl\r\n setWorkspaceExpanded: typeof setWorkspaceExpandedImpl\r\n retainKeys: typeof retainKeysImpl\r\n}\r\n\r\n/**\r\n * Create the workspace-groups viewing store handle.\r\n * @returns the store handle (spec + type + identity + factory in one).\r\n */\r\nexport function createGroupsViewStore(): EngineStoreHandle {\r\n return defineStore({\r\n init: () => ({ categoryExpansion: {}, workspaceExpansion: {} }),\r\n persist: 'dsh.workspace.groups.view.v1',\r\n actions: {\r\n setCategoryExpanded: setCategoryExpandedImpl,\r\n setWorkspaceExpanded: setWorkspaceExpandedImpl,\r\n retainKeys: retainKeysImpl,\r\n },\r\n })\r\n}\r\n\r\nexport type { GroupsViewState } from './store-core.ts'\r\n","/**\r\n * Pure session-tab state: the ordered strip of sessions the user has opened,\r\n * the active one, and each tab's derived presentation.\r\n *\r\n * Position model: a tab's place in the strip is decided ONCE, when it is first\r\n * opened, and never changes afterwards. Switching to a tab, or re-opening a\r\n * session that already has one, leaves the strip exactly as it was — so clicking\r\n * a chip never moves the chip out from under the pointer. Only two events change\r\n * the order: a session opening for the FIRST time (append) and a tab closing\r\n * (remove).\r\n *\r\n * Runtime-free on purpose (same discipline as `store-core.ts` / `quick.ts`):\r\n * the component owns the ref + React state, this module owns every rule, and\r\n * unit tests exercise the real semantics without a browser module loader.\r\n *\r\n * Retention note: a tab outlives whatever it points at. The strip is a list of\r\n * things the USER opened, so nothing here consults the session catalog — a tab\r\n * whose session is gone stays visible until the user closes it, and no\r\n * background sweep ever trims the strip.\r\n */\r\nimport type { SessionId } from '@deepseek-ai/dsh-session/types'\r\nimport type { SessionSummary } from '@deepseek-ai/dsh-api-session-controller/client'\r\nimport type { SessionStatus } from '@deepseek-ai/dsh-client-ui-session/client'\r\n\r\n/** One open tab: a session id plus its arrival key (React list identity). */\r\nexport interface SessionTab {\r\n /** The session the tab shows. */\r\n readonly sessionId: SessionId\r\n /**\r\n * Monotonic arrival key. It doubles as the React `key`, so it must stay\r\n * attached to the session for the tab's whole life — a reused key would make\r\n * React move an existing chip's DOM node instead of reconciling it in place.\r\n */\r\n readonly order: number\r\n}\r\n\r\n/** Feature switch: whether opening a session also surfaces a tab. */\r\nexport type TabOpenMode = 'auto' | 'manual'\r\n\r\n/** Per-tab indicator derived from the catalog summary and the live UI status. */\r\nexport interface SessionTabIndicator {\r\n /** A domain request is waiting for the user (approval / plan review / question). */\r\n readonly attention: boolean\r\n /** The agent is producing output, or a descendant subagent is. */\r\n readonly running: boolean\r\n /** The turn finished while the tab was in the background and was never looked at. */\r\n readonly unread: boolean\r\n /** Idle tab whose session already has a title (a settled conversation). */\r\n readonly settled: boolean\r\n}\r\n\r\n/**\r\n * Add a session to the strip, or leave an existing entry exactly where it is.\r\n *\r\n * Arrival order is the strip's only order, so re-opening a session that already\r\n * has a tab is a NO-OP: the tab keeps its position and its arrival key. Moving\r\n * it to the front here would fight the whole point of stable positions — a user\r\n * clicking through sessions would watch the strip reshuffle on every click.\r\n *\r\n * @param tabs - current strip (oldest first).\r\n * @param sessionId - arriving session.\r\n * @param nextOrder - monotonic arrival counter to spend when appending.\r\n * @returns the strip, unchanged (same array) when the session already has a tab.\r\n */\r\nexport function appendTab(tabs: readonly SessionTab[], sessionId: SessionId, nextOrder: number): SessionTab[] {\r\n const existing = tabs.find(tab => tab.sessionId === sessionId)\r\n if (existing !== undefined) return tabs as SessionTab[]\r\n return [...tabs, { sessionId, order: nextOrder }]\r\n}\r\n\r\n/**\r\n * Remove one session's tab. An absent session leaves the strip untouched.\r\n * @param tabs - current strip.\r\n * @param sessionId - session whose tab closes.\r\n * @returns a new strip.\r\n */\r\nexport function removeTab(tabs: readonly SessionTab[], sessionId: SessionId): SessionTab[] {\r\n return tabs.filter(tab => tab.sessionId !== sessionId)\r\n}\r\n\r\n/**\r\n * Order the strip for display: strictly by arrival, regardless of which tab is\r\n * active.\r\n *\r\n * Position is a property of the TAB, not of the selection. Switching to a tab\r\n * must not move it — an earlier version pulled the active tab to the front,\r\n * which made every click reshuffle the strip and slid the chip out from under\r\n * the pointer that had just clicked it.\r\n *\r\n * `activeId` is therefore accepted only to document that \"active\" deliberately\r\n * does NOT participate in ordering; it is unused. The returned array is a copy\r\n * so callers cannot mutate the store's state through it.\r\n *\r\n * @param tabs - strip in arrival order.\r\n * @param activeId - the open session, if it has a tab (intentionally unused).\r\n * @returns a new array in arrival order.\r\n */\r\nexport function orderedTabs(tabs: readonly SessionTab[], activeId: SessionId | undefined): SessionTab[] {\r\n void activeId\r\n return [...tabs]\r\n}\r\n\r\n/**\r\n * Whether the open session must surface a tab.\r\n *\r\n * A tab means \"this conversation is in play right now\", not \"I once opened\r\n * this\". Browsing history is what the sidebar is for; opening an old\r\n * conversation to read it should not litter the strip, which is the whole point\r\n * of the strip being a working set rather than a second session list.\r\n *\r\n * A session therefore earns a tab only once a conversation has actually STARTED\r\n * in it and is still engaged, which is any of:\r\n * - **running** — the agent is producing output (including subagents);\r\n * - **waiting on you** — an approval / plan review / question is pending;\r\n * - **unseen completion** — it finished while you were elsewhere, so the tab is\r\n * the thing that tells you to come back.\r\n *\r\n * A still-blank draft gets NO tab: the tab appears the moment the first message\r\n * is sent (which is when the controller flips `blank` on `turn/start`). Once the\r\n * turn ends and you have read the result, the session is settled history and\r\n * does not earn a tab — so clicking through finished conversations leaves the\r\n * strip alone. Tabs already opened stay open: this gate only decides whether a\r\n * NEW tab appears, never whether an existing one closes.\r\n *\r\n * `blank` (from `sessionListMetadata`) is exactly \"no turn has started\": the\r\n * controller flips it to false on `turn/start`. It is the right signal for\r\n * \"has this conversation begun\", and the wrong one ALONE — a conversation\r\n * finished a week ago is also non-blank, which is why the earlier `!blank` rule\r\n * surfaced every old conversation the user clicked.\r\n *\r\n * @param mode - feature switch ('auto' applies the engagement rule).\r\n * @param summary - the session's catalog row (absent while the catalog has not\r\n * caught up with a just-created session).\r\n * @param status - the session's unified UI status (absent → no live signal).\r\n * @returns true when a tab belongs in the strip.\r\n */\r\nexport function shouldOpenTab(\r\n mode: TabOpenMode,\r\n summary: SessionSummary | undefined,\r\n status: SessionStatus | undefined,\r\n): boolean {\r\n if (mode === 'manual') return false\r\n if (summary === undefined) return false\r\n // No turn yet: a scratch draft is not a conversation, so it holds no tab. The\r\n // first message flips `blank`, and the tab appears then.\r\n if (summary.blank) return false\r\n // A conversation has begun. Keep the tab only while it is still in play.\r\n if (summary.running) return true\r\n if (status?.running === true) return true\r\n if (status?.pendingInteraction !== undefined) return true\r\n if (status?.completionUnread === true) return true\r\n // Begun, but quiet and read: settled history, not a working tab.\r\n return false\r\n}\r\n\r\n/**\r\n * Derive one tab's indicators from the catalog row and the unified UI status.\r\n * @param summary - the tab session's catalog row (absent → inert indicators).\r\n * @param status - the tab session's unified UI status (absent → idle).\r\n * @returns the indicator quadruple.\r\n */\r\nexport function tabIndicator(\r\n summary: SessionSummary | undefined,\r\n status: SessionStatus | undefined,\r\n): SessionTabIndicator {\r\n const pending = status?.pendingInteraction !== undefined\r\n const running = status?.running === true || summary?.running === true\r\n const unread = status?.completionUnread === true\r\n const blank = summary?.blank !== false\r\n return {\r\n attention: pending,\r\n running,\r\n unread,\r\n settled: !pending && !running && !unread && summary !== undefined && !blank,\r\n }\r\n}\r\n\r\n/**\r\n * Where one session lives: the project (workspace) that accounts for it.\r\n *\r\n * Tabs carry this because a strip of bare session titles is ambiguous once\r\n * several projects are open — two checkouts both named \"api\", or a session\r\n * titled after a file, give no hint which project it belongs to.\r\n */\r\nexport interface TabProject {\r\n /** Stable workspace id. */\r\n readonly workspaceId: string\r\n /** Display label: the workspace title, falling back to its directory name. */\r\n readonly label: string\r\n /** Canonical directory path, for the tooltip. */\r\n readonly path: string\r\n}\r\n\r\n/**\r\n * Index sessions by the project that owns them.\r\n *\r\n * Membership comes from the workspace registry (`sessionIds`), which is the same\r\n * authority the sidebar tree uses — a tab and its sidebar row therefore agree on\r\n * the project without a second derivation.\r\n *\r\n * Built once per render pass rather than scanned per tab: a strip of N tabs over\r\n * M projects is O(N×M) with a naive `find` per tab.\r\n *\r\n * @param workspaces - workspace views from the controller snapshot.\r\n * @returns a session id → project map; sessions in no workspace are absent.\r\n */\r\nexport function projectIndex(\r\n workspaces: readonly WorkspaceViewLike[],\r\n): ReadonlyMap {\r\n const index = new Map()\r\n for (const workspace of workspaces) {\r\n const label = projectLabel(workspace)\r\n const project: TabProject = {\r\n workspaceId: workspace.workspaceId,\r\n label,\r\n path: workspace.path,\r\n }\r\n for (const sessionId of workspace.sessionIds) {\r\n // First writer wins: a session wrongly listed by two workspaces keeps the\r\n // first, so the tab never flickers between labels across renders.\r\n if (!index.has(sessionId)) index.set(sessionId, project)\r\n }\r\n }\r\n return index\r\n}\r\n\r\n/** Minimal workspace shape this module needs (keeps it importable in tests). */\r\nexport interface WorkspaceViewLike {\r\n readonly workspaceId: string\r\n readonly path: string\r\n readonly title: string\r\n readonly sessionIds: readonly SessionId[]\r\n}\r\n\r\n/**\r\n * Display label for a project: its title, else the directory basename.\r\n * @param workspace - workspace view.\r\n * @returns a non-empty label, falling back to the raw path.\r\n */\r\nexport function projectLabel(workspace: Pick): string {\r\n const title = workspace.title.trim()\r\n if (title !== '') return title\r\n // Both separators: the host path may be Windows or POSIX.\r\n const parts = workspace.path.split(/[\\\\/]/).filter(part => part !== '')\r\n return parts[parts.length - 1] ?? workspace.path\r\n}\r\n\r\n/**\r\n * Whether two strips are the same sequence of sessions (arrival keys ignored).\r\n * @param left - previous strip.\r\n * @param right - next strip.\r\n * @returns true when no entry was added, removed, or reordered.\r\n */\r\nexport function sameTabs(left: readonly SessionTab[], right: readonly SessionTab[]): boolean {\r\n return left.length === right.length\r\n && left.every((tab, index) => right[index]?.sessionId === tab.sessionId)\r\n}\r\n\r\n/** Session-tab strip state (the shape the store persists). */\r\nexport interface SessionTabsState {\r\n /** Open tabs in arrival order — the strip's one and only order. */\r\n tabs: SessionTab[]\r\n /** Monotonic arrival counter; each FIRST-time session spends one. */\r\n order: number\r\n}\r\n\r\n/**\r\n * Store transform: add the open session, or leave its existing tab in place.\r\n *\r\n * Live here rather than in `tab-store.ts` so unit tests can exercise the real\r\n * semantics without importing `@deepseek-ai/dsh-client-store` (which pulls\r\n * `zustand` into the test process). The store module binds these into its\r\n * actions table.\r\n *\r\n * The no-op guard matters: this runs on EVERY catalog change for the open\r\n * session, so an unguarded write would wake the strip and spend arrival keys on\r\n * every projection tick.\r\n *\r\n * @param state - store draft, mutated in place.\r\n * @param sessionId - the session that just became open.\r\n */\r\nexport function touchTabImpl(state: SessionTabsState, sessionId: SessionId): void {\r\n const next = appendTab(state.tabs, sessionId, state.order + 1)\r\n // Same array => the session already had a tab; nothing changed, so nothing is\r\n // written and no subscriber wakes.\r\n if (next === state.tabs) return\r\n state.order += 1\r\n state.tabs = next\r\n}\r\n\r\n/**\r\n * Store transform: close one tab. Closing a session that has no tab is not a\r\n * state change, so it writes nothing.\r\n * @param state - store draft, mutated in place.\r\n * @param sessionId - the tab to close.\r\n */\r\nexport function closeTabImpl(state: SessionTabsState, sessionId: SessionId): void {\r\n const next = removeTab(state.tabs, sessionId)\r\n if (next.length === state.tabs.length) return\r\n state.tabs = next\r\n}\r\n\r\n/**\r\n * Store transform: adopt tabs loaded from the host, MERGING with whatever is\r\n * already in the strip.\r\n *\r\n * Async by nature (the host read is a `fetch`), so it can land after the browser\r\n * has already opened a tab for the current session. Merging — rather than\r\n * \"ignore the read if the strip is non-empty\" — is what makes a restart safe:\r\n * the tab opened during startup survives AND the stored tabs still come back.\r\n * (Bailing on a non-empty strip would silently drop every stored tab whenever\r\n * the startup tab won the race, which is the common case for a session that is\r\n * running or unread.)\r\n *\r\n * The arrival counter is lifted above every restored key so a tab opened later\r\n * cannot reuse one; a reused key makes React move a chip's DOM node instead of\r\n * reconciling it.\r\n *\r\n * @param state - store draft, mutated in place.\r\n * @param tabs - tabs read from the host, oldest first.\r\n */\r\nexport function restoreTabsImpl(state: SessionTabsState, tabs: readonly SessionTab[]): void {\r\n if (tabs.length === 0) return\r\n const present = new Set(state.tabs.map(tab => tab.sessionId))\r\n const additions: SessionTab[] = []\r\n let order = state.order\r\n for (const tab of tabs) {\r\n // Never duplicate: a session already in the strip keeps its existing entry\r\n // and position.\r\n if (present.has(tab.sessionId)) continue\r\n present.add(tab.sessionId)\r\n // Re-key onto a fresh, monotonically increasing counter so a restored key\r\n // can never collide with one already spent.\r\n order += 1\r\n additions.push({ sessionId: tab.sessionId, order })\r\n }\r\n if (additions.length > 0) state.tabs = [...state.tabs, ...additions]\r\n state.order = order\r\n}\r\n","/**\r\n * The session-tab store: the `defineStore` binding and nothing else.\r\n *\r\n * The action TRANSFORMS live in `tabs.ts` (pure, runtime-free), so unit tests\r\n * exercise the real semantics without pulling in the store engine — this module\r\n * is the only place that needs `@deepseek-ai/dsh-client-store`, and importing it\r\n * from a test would drag `zustand` into the test process.\r\n *\r\n * One handle, one scope: the tab store is seated by the `sidebar.workspaces`\r\n * entry alone. The tab strip is a CHILD of that entry (rendered through a DOM\r\n * portal into the conversation column), not a second slot registration, so the\r\n * handle is never mounted under a second, differently-scoped slot — which the\r\n * registry rejects outright (\"one handle, one scope\").\r\n *\r\n * Placement is navigation, not data: the strip derives its active chip from the\r\n * open session, and arrival order is the strip's only order, so nothing here\r\n * mirrors selection.\r\n */\r\nimport { defineStore, type EngineStoreHandle, type StoreHandle } from '@deepseek-ai/dsh-client-store'\r\nimport type { SessionId } from '@deepseek-ai/dsh-session/types'\r\nimport {\r\n closeTabImpl,\r\n restoreTabsImpl,\r\n touchTabImpl,\r\n type SessionTab,\r\n type SessionTabsState,\r\n} from './tabs.ts'\r\n\r\nexport type { SessionTabsState }\r\n\r\n/**\r\n * Session-tab strip actions (bound by the framework, handed to the browser).\r\n *\r\n * There is deliberately NO \"drop tabs whose session vanished\" action. An open\r\n * tab is closed by the USER and by nothing else — a program that trims the strip\r\n * on its own eventually eats tabs the user wanted, and the whole point of the\r\n * strip is that it holds what you opened.\r\n *\r\n * This is also why the store needs no catalog at all: it never consults one.\r\n */\r\nexport interface SessionTabsActions {\r\n /** Add the open session, or leave its existing tab untouched in place. */\r\n touch: (sessionId: SessionId) => void\r\n /** Close one tab; navigation is untouchable from here (the caller decides). */\r\n close: (sessionId: SessionId) => void\r\n /**\r\n * Replace the strip with tabs loaded from the host.\r\n *\r\n * The host read is a `fetch`, so it cannot happen inside `init()`. This action\r\n * is how the async result lands, and it is a no-op once the user has already\r\n * opened a tab — a slow response must never discard what they just did.\r\n */\r\n restore: (tabs: readonly SessionTab[]) => void\r\n}\r\n\r\n/** Annotation twin of the actions literal below (structural `ActionsDecl`). */\r\ntype SessionTabsActionsDecl = {\r\n touch: typeof touchTabImpl\r\n close: typeof closeTabImpl\r\n restore: typeof restoreTabsImpl\r\n}\r\n\r\n/**\r\n * The tab store's registered handle: identity + spec + the instance factory the\r\n * framework resolves per entry x scope. It deliberately does NOT claim the live\r\n * instance's faces (`getSnapshot` / `actions`) — `defineStore`'s concrete return\r\n * is structurally narrower, and this alias has to stay a type that value can be\r\n * assigned to.\r\n */\r\nexport type SessionTabsStoreHandle = StoreHandle\r\n\r\n/**\r\n * The live tab store value: the handle's `create()` product, which carries the\r\n * baked write set and the snapshot source. Named here so the registrations and\r\n * the strip's props can share one type without importing the store engine.\r\n */\r\nexport type SessionTabsInstance = ReturnType['create']>\r\n\r\n/**\r\n * Create the session-tab store handle.\r\n *\r\n * The strip starts EMPTY and is hydrated by the caller through the `restore`\r\n * action: persistence lives on the host behind a `fetch`, which cannot run\r\n * during `init()`. Browser storage is deliberately not used — the origin\r\n * includes the port, and every launch picks a new one, so `localStorage` and\r\n * `sessionStorage` both start empty on the next start.\r\n *\r\n * @returns the store handle (spec + type + identity + factory in one).\r\n */\r\nexport function createSessionTabsStore(): EngineStoreHandle {\r\n return defineStore({\r\n init: (): SessionTabsState => ({ tabs: [], order: 0 }),\r\n actions: {\r\n touch: touchTabImpl,\r\n close: closeTabImpl,\r\n restore: restoreTabsImpl,\r\n },\r\n })\r\n}\r\n\r\nexport type { SessionTab }","/**\r\n * Client side of the session-tab persistence, talking to\r\n * `GET|PUT /workspace-groups/tabs` on the host.\r\n *\r\n * Why not browser storage: **the origin includes the PORT**, and every `dsh web`\r\n * / `dsh test` / desktop launch picks a different one. `localStorage` and\r\n * `sessionStorage` are both scoped to the origin, so they start empty on the\r\n * next launch — a tab list kept there survives a reload only when the port\r\n * happens to match. The host's JSON sidecar has no such problem, which is why\r\n * the strip is stored there and read back verbatim.\r\n *\r\n * There is deliberately no per-browser-session marker. A marker has to live in\r\n * browser storage, which the port invalidates, so every restart looked like a\r\n * fresh session and silently discarded the user's tabs — the exact failure this\r\n * module exists to prevent.\r\n *\r\n * Every call is best-effort: a failed read means \"no tabs\" and a failed write is\r\n * swallowed, because the strip is a convenience and must never break the app.\r\n */\r\n\r\n/** Host route holding the strip. */\r\nexport const TABS_ROUTE = '/workspace-groups/tabs'\r\n\r\n/** One tab as it crosses the wire. */\r\nexport interface WireTab {\r\n readonly sessionId: string\r\n readonly order: number\r\n}\r\n\r\n/**\r\n * Fetch the stored strip.\r\n * @param fetchImpl - fetch implementation (injectable for tests).\r\n * @returns the tabs, oldest first; empty on any failure.\r\n */\r\nexport async function loadTabs(fetchImpl: typeof fetch = fetch): Promise {\r\n try {\r\n const response = await fetchImpl(TABS_ROUTE, {\r\n method: 'GET',\r\n // Per-session state; a cached response would restore stale tabs.\r\n cache: 'no-store',\r\n })\r\n if (!response.ok) return []\r\n const body: unknown = await response.json()\r\n if (typeof body !== 'object' || body === null) return []\r\n const list = (body as { tabs?: unknown }).tabs\r\n if (!Array.isArray(list)) return []\r\n const tabs: WireTab[] = []\r\n for (const entry of list) {\r\n if (typeof entry !== 'object' || entry === null) continue\r\n const row = entry as Record\r\n if (typeof row.sessionId !== 'string' || row.sessionId === '') continue\r\n if (typeof row.order !== 'number' || !Number.isFinite(row.order)) continue\r\n tabs.push({ sessionId: row.sessionId, order: row.order })\r\n }\r\n return tabs\r\n } catch {\r\n return []\r\n }\r\n}\r\n\r\n/**\r\n * Store the strip. Failures are swallowed.\r\n * @param state - the client's current strip and its arrival counter.\r\n * @param fetchImpl - fetch implementation (injectable for tests).\r\n */\r\nexport async function saveTabs(\r\n state: { order: number; tabs: readonly WireTab[] },\r\n fetchImpl: typeof fetch = fetch,\r\n): Promise {\r\n try {\r\n await fetchImpl(TABS_ROUTE, {\r\n method: 'PUT',\r\n headers: { 'Content-Type': 'application/json' },\r\n body: JSON.stringify({ order: state.order, tabs: state.tabs }),\r\n cache: 'no-store',\r\n // Survive a navigation that happens while the request is in flight; the\r\n // write is idempotent so a re-send is harmless.\r\n keepalive: true,\r\n })\r\n } catch {\r\n // Offline or the host is restarting: the next change writes the full state\r\n // again, so nothing is lost beyond this tick.\r\n }\r\n}\r\n","/**\r\n * A framework-shaped selector hook over a store instance.\r\n *\r\n * The renderer builds this hook for slot seats (`bindSnapshotSelector` in\r\n * ui-renderer, wrapping React's `useSyncExternalStoreWithSelector`), but the tab\r\n * strip is NOT a slot occupant: it renders through a DOM seat as a child of this\r\n * plugin's own `sidebar.workspaces` occupant, so it receives its store face as a\r\n * plain prop and needs the equivalent binding here.\r\n *\r\n * The implementation mirrors React's `useSyncExternalStoreWithSelector` without\r\n * depending on the `use-sync-external-store` package (it is not resolvable from\r\n * this plugin). The two behaviours that matter:\r\n *\r\n * - identity-stable subscribe/getSnapshot closures, so the strip never\r\n * resubscribes across renders;\r\n * - a memoized selection: the selector re-runs only when the state reference\r\n * changes, and an equal result (by `eq`, defaulting to `Object.is`) returns\r\n * the PREVIOUS reference, so a selector allocating a fresh array or object\r\n * does not spin the render loop.\r\n *\r\n * The hook must be called unconditionally (Rules of Hooks).\r\n */\r\nimport { useCallback, useRef, useSyncExternalStore } from 'react'\r\nimport type { ActionsDecl, StoreInstance } from '@deepseek-ai/dsh-client-store'\r\n\r\n/** One memory cell: the state it was derived from, and the value it produced. */\r\ninterface Selection {\r\n state: T\r\n value: S\r\n /** Whether `value` was produced by the selector (vs. carried over as equal). */\r\n hasValue: boolean\r\n}\r\n\r\n/**\r\n * Build a selector hook bound to one store instance.\r\n * @param instance - the live store instance (snapshot source).\r\n * @returns a `SnapshotSelectorHook`-compatible hook over that instance.\r\n */\r\nexport function createStoreHook>(\r\n instance: StoreInstance,\r\n): (selector: (state: T) => S, eq?: (a: S, b: S) => boolean) => S {\r\n // Captured once: stable closures keep uSES from resubscribing every render.\r\n const subscribe = (onChange: () => void): (() => void) => instance.subscribe(onChange)\r\n const getState = (): T => instance.getSnapshot()\r\n\r\n return function useSelector(\r\n selector: (state: T) => S,\r\n eq?: (a: S, b: S) => boolean,\r\n ): S {\r\n // Seeded eagerly so the first render selects without an extra pass.\r\n const memory = useRef | null>(null)\r\n\r\n // Re-select the value for the current state. Called by uSES on every\r\n // notification AND on every render; the memory makes it cheap and\r\n // reference-stable.\r\n const getSelection = useCallback((): S => {\r\n const state = getState()\r\n const previous = memory.current\r\n\r\n // Same state object => the previous value is still valid. This is the\r\n // path that lets an allocating selector stay reference-stable.\r\n if (previous !== null && previous.hasValue && Object.is(previous.state, state)) {\r\n return previous.value\r\n }\r\n\r\n const value = selector(state)\r\n\r\n // New state, but an equal value: carry the old reference forward so uSES\r\n // sees no change and skips the re-render.\r\n if (previous !== null && previous.hasValue) {\r\n const equal = eq !== undefined ? eq(previous.value, value) : Object.is(previous.value, value)\r\n if (equal) {\r\n memory.current = { state, value: previous.value, hasValue: true }\r\n return previous.value\r\n }\r\n }\r\n\r\n memory.current = { state, value, hasValue: true }\r\n return value\r\n }, [selector, eq])\r\n\r\n // The third argument is the server snapshot; the client plugin never\r\n // server-renders, so the same getter is correct for both.\r\n return useSyncExternalStore(subscribe, getSelection, getSelection)\r\n }\r\n}\r\n","/**\r\n * Shared config types for @dsh-xhl/workspace-groups. Pure types (zero runtime\r\n * deps) so both halves — the node half (sidecar YAML reading) and the\r\n * browser half (tree derivation) — compile against the same contract.\r\n */\r\n\r\n/** One classification rule: any rule that matches places the workspace in the category. */\r\nexport interface GroupRule {\r\n /** Absolute path prefix match (normalized, case-sensitive). */\r\n pathPrefix?: string\r\n /** Case-insensitive substring match against the workspace display title. */\r\n nameContains?: string\r\n /** Case-insensitive substring match against the workspace directory basename. */\r\n basenameContains?: string\r\n /** Exact absolute path match (normalized). */\r\n pathExact?: string\r\n}\r\n\r\n/** One category folder in the sidebar tree. */\r\nexport interface GroupCategory {\r\n /** Display label of the category folder. */\r\n name: string\r\n /** Rules; a workspace is classified here when ANY rule matches. */\r\n rules: GroupRule[]\r\n}\r\n\r\n/** The full sidecar configuration (mirrors workspace-groups.yaml). */\r\nexport interface GroupsConfig {\r\n /** Category folders, in render order. First match wins. */\r\n categories: GroupCategory[]\r\n /**\r\n * Runtime grouping overlay (manual groups + per-workspace overrides).\r\n * Optional: the YAML file itself never carries it — the host GET route\r\n * merges it from `workspace-groups.manual.json`, and the browser PUT route\r\n * replaces it whole.\r\n */\r\n manual?: ManualGroups\r\n}\r\n\r\n/**\r\n * Runtime-managed grouping overlay: groups created in the sidebar UI plus\r\n * per-workspace category overrides and user-controlled ordering. Owned by the\r\n * plugin (JSON sidecar, `$DSH_HOME/workspace-groups.manual.json`), never\r\n * written back into the operator YAML.\r\n *\r\n * All new fields are optional for backward compatibility (files written by\r\n * older plugin versions keep working); rendering falls back to sensible\r\n * defaults when they are absent.\r\n */\r\nexport interface ManualGroups {\r\n /**\r\n * Manually created category folder names. These have no rules — they render\r\n * even while empty (a new group appears before anything is dragged into\r\n * it) and hold only workspaces assigned to them.\r\n */\r\n categories: string[]\r\n /**\r\n * Per-workspace category override, keyed by workspace id. Value is a\r\n * category display name (rule or manual), or `null` to force the workspace\r\n * into the uncategorized bucket even when a rule would match. An absent\r\n * key means \"classify by rules\".\r\n */\r\n assignments: Record\r\n /**\r\n * Display order of all category keys (rule display names + manual names).\r\n * The uncategorized bucket is never listed — it always renders last.\r\n * Absent = rule categories first (YAML order), manual groups appended in\r\n * creation order.\r\n */\r\n categoryOrder?: string[]\r\n /**\r\n * Per-category ordered workspace ids (user drag-reorder within a group).\r\n * Keyed by category display name; absent key = host registration order.\r\n */\r\n workspaceOrder?: Record\r\n /**\r\n * Rule category rename overrides: original YAML rule category name →\r\n * display name (UI rename of a rule group). Rules still classify by the\r\n * original name; only the rendered label/keys change.\r\n */\r\n renamed?: Record\r\n /**\r\n * Rule category original names hidden by a UI delete. Hidden rules are\r\n * inert: workspaces matching them become top-level (ungrouped).\r\n */\r\n hidden?: string[]\r\n}\r\n\r\n/**\r\n * Legacy label of the fallback bucket. The top-level (ungrouped) concept\r\n * replaced the rendered \"未分类\" bucket: workspaces in no group render as\r\n * top-level rows beside the group folders. The constant survives for data\r\n * compatibility (reserved name, assignment null marker).\r\n */\r\nexport const UNCATEGORIZED_LABEL = '未分类'\r\n\r\n/**\r\n * Reserved key under `workspaceOrder` holding the manual order of TOP-LEVEL\r\n * (ungrouped) project rows. Distinct from any real group display name (a group\r\n * may not be named this), so it can never collide; the top-level list's order\r\n * is preserved exactly like a group's, and top-level rows can be reordered by\r\n * dragging.\r\n */\r\nexport const TOP_LEVEL_ORDER_KEY = '__topLevel__'\r\n\r\n/** Normalize a path for prefix matching: trailing slashes stripped. */\r\nexport function normalizePath(path: string): string {\r\n return path.replace(/[/\\\\]+$/, '')\r\n}\r\n","/**\r\n * Pure classification + ordering logic: decides which category a workspace\r\n * belongs to and how categories/workspaces are ordered. Shared by the host\r\n * half (validation) and the client half (tree derivation), so the semantics\r\n * can never drift between the config surface and the rendered tree.\r\n *\r\n * Category identity: a category's STABLE origin is its YAML rule category\r\n * name (or a manual-group name). Its DISPLAY key is what the tree renders and\r\n * what assignments reference — for rule categories that is the rename\r\n * override when present. Hidden rule categories are inert: workspaces that\r\n * would match them become top-level (ungrouped).\r\n */\r\nimport {\r\n normalizePath,\r\n UNCATEGORIZED_LABEL,\r\n type GroupCategory,\r\n type GroupRule,\r\n type GroupsConfig,\r\n type ManualGroups,\r\n} from './types.ts'\r\n\r\n/** One rule match against a workspace's path and title. */\r\nfunction ruleMatches(rule: GroupRule, path: string, title: string): boolean {\r\n const normalized = normalizePath(path)\r\n if (rule.pathPrefix !== undefined && normalized.startsWith(normalizePath(rule.pathPrefix))) return true\r\n if (rule.pathExact !== undefined && normalized === normalizePath(rule.pathExact)) return true\r\n if (rule.nameContains !== undefined && title.toLowerCase().includes(rule.nameContains.toLowerCase())) return true\r\n if (rule.basenameContains !== undefined) {\r\n const base = path.replace(/[/\\\\]+$/, '').split(/[/\\\\]/).pop() ?? ''\r\n if (base.toLowerCase().includes(rule.basenameContains.toLowerCase())) return true\r\n }\r\n return false\r\n}\r\n\r\n/** Classify a workspace by rules only; hidden categories are inert. */\r\nexport function classify(categories: readonly GroupCategory[], path: string, title: string): GroupCategory | undefined {\r\n for (const category of categories) {\r\n if (category.rules.some(rule => ruleMatches(rule, path, title))) return category\r\n }\r\n return undefined\r\n}\r\n\r\n/** Display name of a rule category: the rename override when present. */\r\nexport function ruleDisplayName(manual: ManualGroups | undefined, originalName: string): string {\r\n return manual?.renamed?.[originalName] ?? originalName\r\n}\r\n\r\n/** Whether a rule category has been hidden by a UI delete. */\r\nexport function isHiddenRule(manual: ManualGroups | undefined, originalName: string): boolean {\r\n return manual?.hidden?.includes(originalName) ?? false\r\n}\r\n\r\n/** Rule category display names, in YAML render order (hidden ones excluded). */\r\nexport function ruleDisplayNames(categories: readonly GroupCategory[], manual: ManualGroups | undefined): string[] {\r\n const names: string[] = []\r\n for (const category of categories) {\r\n if (isHiddenRule(manual, category.name)) continue\r\n names.push(ruleDisplayName(manual, category.name))\r\n }\r\n return names\r\n}\r\n\r\n/** Original YAML rule name whose display name equals `key` (undefined when none). */\r\nexport function originalRuleNameForDisplay(\r\n categories: readonly GroupCategory[],\r\n manual: ManualGroups | undefined,\r\n key: string,\r\n): string | undefined {\r\n return categories.find(c => ruleDisplayName(manual, c.name) === key)?.name\r\n}\r\n\r\n/**\r\n * Effective category entries in display order: rule categories (YAML order,\r\n * hidden skipped, renamed applied) first, then manual-only groups in\r\n * creation order — unless `manual.categoryOrder` overrides the sequence.\r\n * Top-level (ungrouped) workspaces are never included; they render as\r\n * separate top-level rows after the group folders.\r\n */\r\nexport interface EffectiveCategory {\r\n /** Display key (what the tree renders and assignments reference). */\r\n key: string\r\n /** Origin: a YAML rule category or a manual group. */\r\n source: 'rule' | 'manual'\r\n}\r\n\r\nexport function effectiveCategories(\r\n config: GroupsConfig,\r\n manual: ManualGroups | undefined,\r\n): EffectiveCategory[] {\r\n const entries: EffectiveCategory[] = []\r\n const seen = new Set()\r\n for (const category of config.categories) {\r\n if (isHiddenRule(manual, category.name)) continue\r\n const key = ruleDisplayName(manual, category.name)\r\n if (seen.has(key)) continue\r\n seen.add(key)\r\n entries.push({ key, source: 'rule' })\r\n }\r\n for (const name of manual?.categories ?? []) {\r\n if (seen.has(name)) continue\r\n seen.add(name)\r\n entries.push({ key: name, source: 'manual' })\r\n }\r\n const order = manual?.categoryOrder\r\n if (order === undefined || order.length === 0) return entries\r\n // Stable sort by position in categoryOrder; entries absent from the order\r\n // keep their relative default position after all ordered ones.\r\n const position = new Map(order.map((key, index) => [key, index]))\r\n return [...entries].sort((a, b) => {\r\n const pa = position.get(a.key)\r\n const pb = position.get(b.key)\r\n if (pa !== undefined && pb !== undefined) return pa - pb\r\n if (pa !== undefined) return -1\r\n if (pb !== undefined) return 1\r\n return 0\r\n })\r\n}\r\n\r\n/** Display keys of all effective categories (top-level workspaces excluded). */\r\nexport function displayCategoryKeys(config: GroupsConfig, manual: ManualGroups | undefined): string[] {\r\n return effectiveCategories(config, manual).map(e => e.key)\r\n}\r\n\r\n/**\r\n * Resolve the category key a workspace renders under, or `undefined` when it\r\n * is top-level (ungrouped). Precedence: manual override (`null` = forced\r\n * top-level) → rule classification (hidden rules inert) → top-level.\r\n */\r\nexport function resolveCategory(\r\n config: GroupsConfig,\r\n manual: ManualGroups | undefined,\r\n workspaceId: string,\r\n path: string,\r\n title: string,\r\n): string | undefined {\r\n const override = manual?.assignments[workspaceId]\r\n if (override !== undefined) return override ?? undefined // null forces top-level\r\n const matched = classify(config.categories, path, title)\r\n if (matched === undefined) return undefined\r\n if (isHiddenRule(manual, matched.name)) return undefined\r\n return ruleDisplayName(manual, matched.name)\r\n}\r\n\r\n/** Whether a category key is a manual-only group (manageable via list). */\r\nexport function isManualOnlyCategory(\r\n config: GroupsConfig,\r\n manual: ManualGroups | undefined,\r\n key: string,\r\n): boolean {\r\n return (manual?.categories.includes(key) ?? false) && !ruleDisplayNames(config.categories, manual).includes(key)\r\n}\r\n\r\n/**\r\n * Names that may not be used for a new/renamed group: the legacy reserved\r\n * label plus every current display key.\r\n */\r\nexport function takenCategoryNames(config: GroupsConfig, manual: ManualGroups | undefined): Set {\r\n const taken = new Set(displayCategoryKeys(config, manual))\r\n taken.add(UNCATEGORIZED_LABEL)\r\n return taken\r\n}\r\n\r\n/**\r\n * Order a bucket of workspace ids: the stored per-category order first\r\n * (filtered to actual members), then any remaining members in `fallback`\r\n * (host) order. Deterministic; the renderer never re-sorts on its own.\r\n */\r\nexport function orderedWorkspaceIds(\r\n manual: ManualGroups | undefined,\r\n categoryKey: string,\r\n members: readonly string[],\r\n): string[] {\r\n const stored = manual?.workspaceOrder?.[categoryKey]\r\n if (stored === undefined || stored.length === 0) return [...members]\r\n const memberSet = new Set(members)\r\n const ordered: string[] = []\r\n const seen = new Set()\r\n for (const id of stored) {\r\n if (!memberSet.has(id) || seen.has(id)) continue\r\n seen.add(id)\r\n ordered.push(id)\r\n }\r\n for (const id of members) {\r\n if (seen.has(id)) continue\r\n ordered.push(id)\r\n }\r\n return ordered\r\n}\r\n\r\n/** Move `id` before `beforeId` (undefined = append) within an ordered list. */\r\nexport function moveBefore(list: readonly string[], id: string, beforeId: string | undefined): string[] {\r\n const rest = list.filter(x => x !== id)\r\n if (beforeId === undefined) return [...rest, id]\r\n const index = rest.indexOf(beforeId)\r\n if (index === -1) return [...rest, id]\r\n rest.splice(index, 0, id)\r\n return rest\r\n}\r\n\r\n/** Move `id` after `afterId` (undefined = append) within an ordered list. */\r\nexport function moveAfter(list: readonly string[], id: string, afterId: string | undefined): string[] {\r\n const rest = list.filter(x => x !== id)\r\n if (afterId === undefined) return [...rest, id]\r\n const index = rest.indexOf(afterId)\r\n if (index === -1) return [...rest, id]\r\n rest.splice(index + 1, 0, id)\r\n return rest\r\n}\r\n","/**\r\n * Plugin-owned projection of descendant counts from Session summaries.\r\n *\r\n * 0.1.2 移除了 `@deepseek-ai/dsh-client-runtime/client`(平台模块表不再提供\r\n * `indexSubagentDescendants`),官方 ui-workspace 改为各自持有本地副本\r\n * (packages/client/ui-workspace/src/client/subagent-lineage.ts,MIT)。这里\r\n * 保持同一实现,使运行中的子代理会话数在树行上继续可见。\r\n */\r\nimport type { SessionId } from '@deepseek-ai/dsh-session/types'\r\n\r\ninterface LineageEntry {\r\n readonly id: SessionId\r\n readonly parentId?: SessionId\r\n readonly origin?: 'subagent'\r\n readonly running: boolean\r\n}\r\n\r\n/** Descendant counts for one possible parent Session. */\r\nexport interface SubagentDescendantSummary {\r\n readonly count: number\r\n readonly runningCount: number\r\n}\r\n\r\n/**\r\n * Index uninterrupted subagent descendants under each ancestor.\r\n * @param summaries - Session summaries keyed by id.\r\n * @returns descendant totals keyed by possible parent id.\r\n */\r\nexport function indexSubagentDescendants(\r\n summaries: Readonly>,\r\n): ReadonlyMap {\r\n const indexed = new Map()\r\n for (const descendant of Object.values(summaries)) {\r\n if (descendant.origin !== 'subagent') continue\r\n const seen = new Set()\r\n let current: LineageEntry | undefined = descendant\r\n while (current?.origin === 'subagent' && current.parentId !== undefined && !seen.has(current.id)) {\r\n seen.add(current.id)\r\n const aggregate = indexed.get(current.parentId)\r\n if (aggregate === undefined) {\r\n indexed.set(current.parentId, { count: 1, runningCount: descendant.running ? 1 : 0 })\r\n } else {\r\n aggregate.count += 1\r\n if (descendant.running) aggregate.runningCount += 1\r\n }\r\n current = summaries[current.parentId]\r\n }\r\n }\r\n return indexed\r\n}\r\n","/**\r\n * Derives the three-level workspace-groups tree: 分类文件夹 → 项目文件夹 →\r\n * 会话行. Pure derivation — all inputs are snapshots; the renderer never\r\n * scans. Session visibility rules mirror the official ui-workspace tree\r\n * (blank rows only when current, archived excluded, subagent rows excluded).\r\n */\r\nimport type {\r\n SessionListState,\r\n SessionSearchResultItem,\r\n SessionSummary,\r\n} from '@deepseek-ai/dsh-api-session-controller/client'\r\nimport type { WorkspaceId, WorkspaceView } from '@deepseek-ai/dsh-api-workspace-controller/client'\r\n// Type-only: the unified UI status snapshot. 0.1.6 把 running / pendingInteraction /\r\n// 未读完成提示收敛为 ui-session 的 SessionStatusSnapshot;SessionSummary.completed\r\n// 与 SessionListState.current 同时移除,当前会话改由 `mainView` 保留位推导。\r\nimport type { SessionStatus, SessionStatusSnapshot } from '@deepseek-ai/dsh-client-ui-session/client'\r\nimport type { SessionId } from '@deepseek-ai/dsh-session/types'\r\nimport { indexSubagentDescendants, type SubagentDescendantSummary } from './subagent-lineage.ts'\r\nimport { effectiveCategories, orderedWorkspaceIds, resolveCategory } from '../core/matcher.ts'\r\nimport { TOP_LEVEL_ORDER_KEY, UNCATEGORIZED_LABEL, type GroupsConfig, type ManualGroups } from '../core/types.ts'\r\n\r\n/** Pending interaction kinds with dedicated Workspace-row presentation. */\r\nexport type SessionPendingInteractionStatus = 'approval' | 'plan-review' | 'question'\r\n\r\n/** Current unified UI status by Session (ui-session snapshot). */\r\ntype SessionStatuses = SessionStatusSnapshot\r\n\r\n/**\r\n * The Session the Conversation is currently showing.\r\n *\r\n * 0.1.6 removed `SessionListState.current`: selection is expressed as the\r\n * Session retained through the `mainView` reference source (the ui-workspace\r\n * navigation holds exactly one). Same read the official browser performs.\r\n * @param list - sessions list snapshot.\r\n * @returns the retained Session id, or undefined while no Session is selected.\r\n */\r\nexport function currentSessionId(list: SessionListState): SessionId | undefined {\r\n return Object.values(list.byId).find(session => (session.retainedBy?.mainView ?? 0) > 0)?.id\r\n}\r\n\r\n/** Keep navigation presentation independent from domain-owned interaction objects. */\r\nfunction visiblePendingKind(kind: string | undefined): SessionPendingInteractionStatus | undefined {\r\n switch (kind) {\r\n case 'approval':\r\n case 'plan-review':\r\n case 'question':\r\n return kind\r\n default:\r\n return undefined\r\n }\r\n}\r\n\r\n/** One top-level session row inside a workspace folder. */\r\nexport interface SessionNode {\r\n id: SessionId\r\n /** Stored display title; blank rows show the localized New Session label. */\r\n title: string\r\n /** The provisional blank session (renderer shows the localized New Session title). */\r\n blank: boolean\r\n pendingInteraction?: SessionPendingInteractionStatus\r\n running: boolean\r\n /** Running descendants connected through uninterrupted subagent-origin lineage. */\r\n runningSubagentCount: number\r\n /** Finished running while not selected and not yet opened (the green \"done\" reminder dot). */\r\n completed: boolean\r\n updatedAt: number\r\n /** Search-hit marker (rendered with a highlighted tint in search mode). */\r\n matched?: boolean\r\n /** Content-match snippet from the Host search (search mode only). */\r\n snippet?: string\r\n}\r\n\r\n/** One workspace folder row inside a category folder. */\r\nexport interface WorkspaceGroupNode {\r\n workspaceId: WorkspaceId\r\n /** Canonical host directory path. */\r\n path: string\r\n /** Display title. */\r\n label: string\r\n /** Workspace creation time (epoch ms). */\r\n createdAt: number\r\n /** Total visible sessions in the folder. */\r\n sessionCount: number\r\n expanded: boolean\r\n /** The folder contains the selected session (active folder tint). */\r\n containsCurrent: boolean\r\n /** Visible session rows (empty while the folder is folded). */\r\n sessions: readonly SessionNode[]\r\n}\r\n\r\n/** One category folder at the top of the tree. */\r\nexport interface CategoryNode {\r\n /** Stable category key: the configured label, or the uncategorized bucket. */\r\n key: string\r\n /** Display label. */\r\n label: string\r\n expanded: boolean\r\n /** The category contains the selected session (active folder tint). */\r\n containsCurrent: boolean\r\n /** Workspace folders in host order. */\r\n workspaces: readonly WorkspaceGroupNode[]\r\n}\r\n\r\n/** Viewing state consumed by the derivation. */\r\nexport interface GroupsTreeView {\r\n expandedCategories: readonly string[]\r\n expandedWorkspaces: readonly string[]\r\n}\r\n\r\n/** Key of the uncategorized bucket (matches the config fallback label). */\r\nexport const UNCATEGORIZED_KEY = UNCATEGORIZED_LABEL\r\n\r\n/** Directory display label: basename of the path (both separators accepted). */\r\nexport function workspaceLabel(cwd: string | undefined): string {\r\n if (cwd === undefined || cwd === '') return UNCATEGORIZED_LABEL\r\n const base = cwd.replace(/[/\\\\]+$/, '').split(/[/\\\\]/).pop()\r\n return base !== undefined && base !== '' ? base : cwd\r\n}\r\n\r\n/** Ordinary sessions are visible; blank only when current; archived/subagent never. */\r\nfunction sessionVisible(session: SessionSummary, current: SessionId | undefined, archived: ReadonlySet): boolean {\r\n return session.origin !== 'subagent'\r\n && !archived.has(session.id)\r\n && (!session.blank || session.id === current)\r\n}\r\n\r\n/** Blank rows display the localized New Session label (never enters search). */\r\nfunction sessionTitle(session: SessionSummary): string {\r\n return session.blank ? 'New Session' : session.displayTitle\r\n}\r\n\r\nfunction sessionNode(\r\n s: SessionSummary,\r\n descendants: ReadonlyMap,\r\n statuses: SessionStatuses,\r\n): SessionNode {\r\n // `SessionStatusSnapshot` is typed as ReadonlyMap, but the framework binds a\r\n // plain record at runtime (client.js: `statuses[sessionId]`). Read both shapes\r\n // so a hook backed by an object never throws \"statuses.get is not a function\".\r\n const status = typeof (statuses as { get?: unknown } | undefined)?.get === 'function'\r\n ? statuses.get(s.id)\r\n : (statuses as unknown as Record)[s.id]\r\n const pending = visiblePendingKind(status?.pendingInteraction?.kind)\r\n return {\r\n id: s.id,\r\n title: sessionTitle(s),\r\n blank: s.blank,\r\n running: status?.running ?? s.running,\r\n runningSubagentCount: descendants.get(s.id)?.runningCount ?? 0,\r\n completed: status?.completionUnread === true,\r\n updatedAt: s.updatedAt,\r\n ...(pending === undefined ? {} : { pendingInteraction: pending }),\r\n }\r\n}\r\n\r\n/** Visible sessions of one workspace in its stored account order. */\r\nfunction workspaceSessions(\r\n list: SessionListState,\r\n workspace: WorkspaceView,\r\n archived: ReadonlySet,\r\n descendants: ReadonlyMap,\r\n statuses: SessionStatuses,\r\n current: SessionId | undefined,\r\n): SessionNode[] {\r\n const nodes: SessionNode[] = []\r\n for (const id of workspace.sessionIds) {\r\n const summary = list.byId[id]\r\n if (summary === undefined) continue // account may lead the list pull; appears when the summary lands\r\n if (!sessionVisible(summary, current, archived)) continue\r\n nodes.push(sessionNode(summary, descendants, statuses))\r\n }\r\n return nodes\r\n}\r\n\r\n/**\r\n * Derive the three-level tree.\r\n * @param list - sessions list snapshot (`current` feeds containsCurrent).\r\n * @param workspaces - real workspaces in stable Host order.\r\n * @param archivedSessionIds - registry-global archive set.\r\n * @param config - sidecar grouping config (rule categories).\r\n * @param view - local expansion arrays.\r\n * @param manual - runtime overlay (manual groups + overrides). A workspace's\r\n * manual override wins over rule classification; removing it reverts to rules.\r\n * @param statuses - unified UI status by Session (drives the running / warning\r\n * / unread-completion row indicators); defaults to none (tests).\r\n * @returns category sections in render order (rule categories first, then\r\n * manual-only ones, uncategorized last). Manual groups render even while\r\n * empty; empty rule buckets stay hidden.\r\n */\r\nexport function deriveGroups(\r\n list: SessionListState,\r\n workspaces: readonly WorkspaceView[],\r\n archivedSessionIds: readonly SessionId[],\r\n config: GroupsConfig,\r\n view: GroupsTreeView,\r\n manual: ManualGroups,\r\n statuses: SessionStatuses = new Map(),\r\n): CategoryNode[] {\r\n const archived = new Set(archivedSessionIds)\r\n const expandedCategories = new Set(view.expandedCategories)\r\n const expandedWorkspaces = new Set(view.expandedWorkspaces)\r\n const descendants = indexSubagentDescendants(list.byId)\r\n const current = currentSessionId(list)\r\n\r\n // Bucket workspaces by display key. Seed with every effective category so\r\n // manual groups render while empty. Top-level (ungrouped) workspaces are\r\n // handled by deriveTopLevel and never land here.\r\n const byCategory = new Map()\r\n for (const { key } of effectiveCategories(config, manual)) {\r\n byCategory.set(key, [])\r\n }\r\n for (const workspace of workspaces) {\r\n const key = resolveCategory(config, manual, workspace.workspaceId, workspace.path, workspace.title)\r\n if (key === undefined) continue // top-level — rendered by deriveTopLevel\r\n if (!byCategory.has(key)) byCategory.set(key, [])\r\n byCategory.get(key)!.push(workspace)\r\n }\r\n\r\n const manualCategories = new Set(manual.categories)\r\n const currentWorkspaceId = current === undefined\r\n ? undefined\r\n : workspaces.find(w => w.sessionIds.includes(current))?.workspaceId\r\n\r\n const nodes: CategoryNode[] = []\r\n // Effective categories in display order (categoryOrder applied).\r\n for (const key of effectiveCategories(config, manual).map(e => e.key)) {\r\n const bucket = byCategory.get(key) ?? []\r\n // Manual groups stay visible while empty; everything else hides when empty.\r\n if (bucket.length === 0 && !manualCategories.has(key)) continue\r\n const expanded = expandedCategories.has(key)\r\n const ordered = orderedWorkspaceIds(manual, key, bucket.map(w => w.workspaceId as string))\r\n const workspaceNodes: WorkspaceGroupNode[] = []\r\n let containsCurrent = false\r\n for (const workspaceId of ordered) {\r\n const workspace = bucket.find(w => w.workspaceId === workspaceId)\r\n if (workspace === undefined) continue\r\n const sessions = workspaceSessions(list, workspace, archived, descendants, statuses, current)\r\n const wsExpanded = expandedWorkspaces.has(workspace.workspaceId as string)\r\n const wsContainsCurrent = workspace.workspaceId === currentWorkspaceId\r\n if (wsContainsCurrent) containsCurrent = true\r\n workspaceNodes.push({\r\n workspaceId: workspace.workspaceId,\r\n path: workspace.path,\r\n label: workspace.title,\r\n createdAt: Date.parse(workspace.createdAt),\r\n sessionCount: sessions.length,\r\n expanded: wsExpanded,\r\n containsCurrent: wsContainsCurrent,\r\n sessions: wsExpanded ? sessions : [],\r\n })\r\n }\r\n nodes.push({\r\n key,\r\n label: key,\r\n expanded,\r\n containsCurrent,\r\n workspaces: workspaceNodes,\r\n })\r\n }\r\n return nodes\r\n}\r\n\r\n/**\r\n * Top-level (ungrouped) workspace rows: workspaces resolving to no category\r\n * (no manual override and no matching rule, or a forced `null` override).\r\n * Rendered after the group folders as plain project rows (not inside any\r\n * folder), in manual top-level order (`workspaceOrder[TOP_LEVEL_ORDER_KEY]`),\r\n * falling back to host registration order.\r\n */\r\nexport function deriveTopLevel(\r\n list: SessionListState,\r\n workspaces: readonly WorkspaceView[],\r\n archivedSessionIds: readonly SessionId[],\r\n config: GroupsConfig,\r\n view: GroupsTreeView,\r\n manual: ManualGroups,\r\n statuses: SessionStatuses = new Map(),\r\n): WorkspaceGroupNode[] {\r\n const archived = new Set(archivedSessionIds)\r\n const expandedWorkspaces = new Set(view.expandedWorkspaces)\r\n const descendants = indexSubagentDescendants(list.byId)\r\n const current = currentSessionId(list)\r\n const currentWorkspaceId = current === undefined\r\n ? undefined\r\n : workspaces.find(w => w.sessionIds.includes(current))?.workspaceId\r\n\r\n const topLevelIds = workspaces\r\n .filter(w => resolveCategory(config, manual, w.workspaceId, w.path, w.title) === undefined)\r\n .map(w => w.workspaceId as string)\r\n const ordered = orderedWorkspaceIds(manual, TOP_LEVEL_ORDER_KEY, topLevelIds)\r\n\r\n const nodes: WorkspaceGroupNode[] = []\r\n for (const workspaceId of ordered) {\r\n const workspace = workspaces.find(w => w.workspaceId === workspaceId)\r\n if (workspace === undefined) continue\r\n const sessions = workspaceSessions(list, workspace, archived, descendants, statuses, current)\r\n const wsExpanded = expandedWorkspaces.has(workspaceId)\r\n nodes.push({\r\n workspaceId: workspace.workspaceId,\r\n path: workspace.path,\r\n label: workspace.title,\r\n createdAt: Date.parse(workspace.createdAt),\r\n sessionCount: sessions.length,\r\n expanded: wsExpanded,\r\n containsCurrent: workspace.workspaceId === currentWorkspaceId,\r\n sessions: wsExpanded ? sessions : [],\r\n })\r\n }\r\n return nodes\r\n}\r\n\r\n/** Recency comparator: newest first, id as the deterministic tiebreak. */\r\nfunction byRecency(a: SessionSummary, b: SessionSummary): number {\r\n if (b.updatedAt !== a.updatedAt) return b.updatedAt - a.updatedAt\r\n return a.id < b.id ? -1 : 1\r\n}\r\n\r\n/** Bounded set of matched sessions plus content snippets (feeds the search tree). */\r\nexport interface SearchMatchSet {\r\n /** Session ids that matched (local metadata hits + Host content hits). */\r\n matchedIds: ReadonlySet\r\n /** Content-match snippets keyed by session id (Host search only). */\r\n snippetsBySession: ReadonlyMap\r\n hasMore: boolean\r\n}\r\n\r\n/**\r\n * Compute the matched-session set: immediate title/Workspace substring matches\r\n * from the local list, merged with ranked Host content matches. The consumer\r\n * (SearchBody) derives the pruned three-level tree from these ids.\r\n */\r\nexport function deriveSearchMatches(\r\n list: SessionListState,\r\n workspaces: readonly WorkspaceView[],\r\n config: GroupsConfig,\r\n query: string,\r\n archivedSessionIds: readonly SessionId[],\r\n content: { items: readonly SessionSearchResultItem[]; hasMore: boolean },\r\n limit: number,\r\n): SearchMatchSet {\r\n const q = query.trim().toLowerCase()\r\n if (q === '') return { matchedIds: new Set(), snippetsBySession: new Map(), hasMore: false }\r\n const archived = new Set(archivedSessionIds)\r\n const descendants = indexSubagentDescendants(list.byId)\r\n const current = currentSessionId(list)\r\n\r\n const workspaceBySession = new Map()\r\n for (const workspace of workspaces) {\r\n for (const sessionId of workspace.sessionIds) {\r\n if (!workspaceBySession.has(sessionId)) workspaceBySession.set(sessionId, workspace)\r\n }\r\n }\r\n const labelOf = (summary: SessionSummary): string =>\r\n workspaceBySession.get(summary.id)?.title ?? workspaceLabel(summary.cwd)\r\n\r\n const local: SessionSummary[] = []\r\n for (const id of list.ids) {\r\n const summary = list.byId[id]\r\n if (summary === undefined || summary.blank || !sessionVisible(summary, current, archived)) continue\r\n if (\r\n sessionTitle(summary).toLowerCase().includes(q)\r\n || labelOf(summary).toLowerCase().includes(q)\r\n ) {\r\n local.push(summary)\r\n }\r\n }\r\n local.sort(byRecency)\r\n\r\n const ordered: SessionSummary[] = []\r\n const included = new Set()\r\n const include = (summary: SessionSummary): void => {\r\n if (included.has(summary.id)) return\r\n included.add(summary.id)\r\n ordered.push(summary)\r\n }\r\n for (const summary of local) include(summary)\r\n for (const item of content.items) {\r\n const summary = list.byId[item.sessionId]\r\n if (summary !== undefined && !summary.blank && sessionVisible(summary, current, archived)) include(summary)\r\n }\r\n\r\n const snippets = new Map()\r\n for (const item of content.items) {\r\n if (item.snippet !== undefined) snippets.set(item.sessionId, item.snippet)\r\n }\r\n\r\n return {\r\n matchedIds: ordered.slice(0, limit).reduce((set, summary) => { set.add(summary.id); return set }, new Set()),\r\n snippetsBySession: snippets,\r\n hasMore: content.hasMore || ordered.length > limit,\r\n }\r\n}\r\n\r\n/** Search tree: group folders plus top-level (ungrouped) matched workspaces. */\r\nexport interface SearchTree {\r\n /** Group folders containing matched sessions, in display order. */\r\n categories: CategoryNode[]\r\n /** Top-level (ungrouped) workspaces holding matched sessions. */\r\n topLevel: WorkspaceGroupNode[]\r\n}\r\n\r\n/**\r\n * Build a three-level search tree containing ONLY the branches that hold a\r\n * matched session: 分类文件夹 → 项目文件夹 → 命中会话行. Every matched\r\n * session carries `matched: true` so rows render with the search-hit tint.\r\n * Classification uses the same precedence as the idle tree (manual override →\r\n * rules), so search shows the same grouping the user sees. Matched top-level\r\n * workspaces are returned separately (rendered as plain rows).\r\n *\r\n * @param list - sessions list snapshot.\r\n * @param workspaces - real workspaces in stable Host order.\r\n * @param config - sidecar grouping config.\r\n * @param matchedIds - set of session ids that matched the query.\r\n * @param archivedSessionIds - registry-global archive set.\r\n * @param manual - runtime overlay (manual groups + overrides).\r\n * @param snippetsBySession - optional content-match snippets keyed by session id.\r\n * @param statuses - unified UI status by Session (drives the running / warning\r\n * / unread-completion row indicators); defaults to none (tests).\r\n * @returns group folders in render order plus top-level matched workspaces,\r\n * pruned to matched branches only.\r\n */\r\nexport function deriveSearchGroups(\r\n list: SessionListState,\r\n workspaces: readonly WorkspaceView[],\r\n config: GroupsConfig,\r\n matchedIds: ReadonlySet,\r\n archivedSessionIds: readonly SessionId[],\r\n manual: ManualGroups,\r\n snippetsBySession?: ReadonlyMap,\r\n statuses: SessionStatuses = new Map(),\r\n): SearchTree {\r\n const archived = new Set(archivedSessionIds)\r\n const descendants = indexSubagentDescendants(list.byId)\r\n const current = currentSessionId(list)\r\n\r\n const byCategory = new Map()\r\n for (const key of effectiveCategories(config, manual).map(e => e.key)) byCategory.set(key, [])\r\n\r\n const topLevel: WorkspaceGroupNode[] = []\r\n for (const workspace of workspaces) {\r\n // Only sessions that matched the query and are visible in this folder.\r\n const nodes: SessionNode[] = []\r\n for (const id of workspace.sessionIds) {\r\n const summary = list.byId[id]\r\n if (summary === undefined || !matchedIds.has(id)) continue\r\n if (!sessionVisible(summary, current, archived)) continue\r\n const node = sessionNode(summary, descendants, statuses)\r\n const snippet = snippetsBySession?.get(id)\r\n nodes.push({\r\n ...node,\r\n matched: true,\r\n ...(snippet === undefined ? {} : { snippet }),\r\n })\r\n }\r\n if (nodes.length === 0) continue\r\n\r\n const node: WorkspaceGroupNode = {\r\n workspaceId: workspace.workspaceId,\r\n path: workspace.path,\r\n label: workspace.title,\r\n createdAt: Date.parse(workspace.createdAt),\r\n sessionCount: nodes.length,\r\n expanded: true,\r\n containsCurrent: false,\r\n sessions: nodes,\r\n }\r\n const key = resolveCategory(config, manual, workspace.workspaceId, workspace.path, workspace.title)\r\n if (key === undefined) {\r\n topLevel.push(node)\r\n continue\r\n }\r\n if (!byCategory.has(key)) byCategory.set(key, [])\r\n byCategory.get(key)!.push(node)\r\n }\r\n\r\n const categories: CategoryNode[] = []\r\n // Same display order as the idle tree.\r\n for (const key of effectiveCategories(config, manual).map(e => e.key)) {\r\n const workspaceNodes = byCategory.get(key)\r\n if (workspaceNodes === undefined || workspaceNodes.length === 0) continue\r\n categories.push({\r\n key,\r\n label: key,\r\n expanded: true,\r\n containsCurrent: false,\r\n workspaces: workspaceNodes,\r\n })\r\n }\r\n return { categories, topLevel }\r\n}\r\n","/**\r\n * Row components for the workspace-groups tree. Kept dependency-light: they\r\n * consume only React, primitives (StateDot/Menu/icons), and the shared CSS\r\n * string. Each row owns its hover actions menu; dialogs live in the browser\r\n * root so they survive row unmounts during collapse.\r\n *\r\n * Drag & drop: workspace rows are draggable sources; category rows (and\r\n * workspace rows, standing for their containing category) are drop targets.\r\n * The payload is a custom dataTransfer type so only in-plugin drags land.\r\n */\r\nimport { useState, type DragEvent, type ReactNode } from 'react'\r\nimport {\r\n IconArchiveOutlineRegular,\r\n IconBranchOutlineRegular,\r\n IconEditOutlineRegular,\r\n IconEllipsisOutlineRegular,\r\n IconFolderCloseMedium,\r\n IconFolderOpenMedium,\r\n IconFolderOpenOutlineRegular,\r\n IconPlusOutlineRegular,\r\n IconProjectAddOutlineRegular,\r\n IconRightUpOutlineRegular,\r\n IconTriangleRightFillMedium,\r\n IconTrashOutlineRegular,\r\n Menu,\r\n StateDot,\r\n type StateDotState,\r\n} from '@deepseek-ai/dsh-client-ui-primitives'\r\nimport type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots'\r\nimport type { WorkspaceGroupsKey } from './locales.ts'\r\nimport type { CategoryNode, SessionNode, WorkspaceGroupNode } from './tree.ts'\r\n\r\ntype T = TranslateNS<'workspaceGroups'>\r\n\r\n/** dataTransfer type carrying the dragged workspace id (in-plugin drags only). */\r\nexport const DND_WORKSPACE_TYPE = 'application/x-dsh-workspace-groups'\r\n/** dataTransfer type carrying the dragged category key (group reorder). */\r\nexport const DND_CATEGORY_TYPE = 'application/x-dsh-workspace-groups-category'\r\n\r\n/** Whether a drag carries any of the plugin's payloads (drop targets accept both). */\r\nexport function hasPluginDragType(types: DOMStringList | readonly string[]): boolean {\r\n const list = Array.from(types as Iterable)\r\n return list.includes(DND_WORKSPACE_TYPE) || list.includes(DND_CATEGORY_TYPE)\r\n}\r\n\r\n/** Pending interaction status → primitives StateDot state. */\r\nfunction pendingState(status: SessionNode['pendingInteraction']): StateDotState | undefined {\r\n switch (status) {\r\n case 'approval':\r\n case 'plan-review':\r\n case 'question':\r\n return 'warning'\r\n default:\r\n return undefined\r\n }\r\n}\r\n\r\n/** Primary status dot state for a session row. */\r\nexport function sessionDotState(node: Pick): StateDotState {\r\n if (pendingState(node.pendingInteraction) !== undefined) return 'warning'\r\n if (node.running || node.runningSubagentCount > 0) return 'ongoing'\r\n return node.completed ? 'done' : 'done'\r\n}\r\n\r\n/** Compact relative time (\"now\"/\"5min\"/\"3h\"/\"2d\"/\"4mo\"/\"1y\"). */\r\nexport function relativeTimeLabel(updatedAt: number, now: number): string {\r\n const diff = Math.max(0, now - updatedAt)\r\n const MIN = 60_000\r\n const HOUR = 3_600_000\r\n const DAY = 86_400_000\r\n if (diff < MIN) return 'now'\r\n if (diff < HOUR) return `${Math.floor(diff / MIN)}min`\r\n if (diff < DAY) return `${Math.floor(diff / HOUR)}h`\r\n if (diff < 30 * DAY) return `${Math.floor(diff / DAY)}d`\r\n if (diff < 365 * DAY) return `${Math.floor(diff / (30 * DAY))}mo`\r\n return `${Math.floor(diff / (365 * DAY))}y`\r\n}\r\n\r\n/** Drop-target props shared by category and workspace rows (all optional). */\r\nexport interface RowDropProps {\r\n /** Row is under the dragged workspace — show the drop highlight. */\r\n dropActive?: boolean\r\n /** Insertion indicator: a line above (before) or below (after) this row. */\r\n insertLine?: 'before' | 'after'\r\n /** Accept a drag over this row (must preventDefault to allow the drop). */\r\n onRowDragOver?: (event: DragEvent) => void\r\n /** Clear the highlight when the pointer leaves the row. */\r\n onRowDragLeave?: (event: DragEvent) => void\r\n /** Drop a workspace onto this row. */\r\n onRowDrop?: (event: DragEvent) => void\r\n}\r\n\r\n/**\r\n * One category folder row: toggle, rename/delete menu (every group — rule\r\n * groups via overlay renames/hides), draggable source for group reorder and\r\n * drop target for both workspace moves and group reorders.\r\n */\r\nexport function CategoryRow({ node, t, onToggle, onRename, onDelete, dropActive = false, insertLine, onRowDragOver, onRowDragLeave, onRowDrop, onDragStartCategory }: {\r\n node: CategoryNode\r\n t: T\r\n onToggle: () => void\r\n /** Rename/delete actions; the hover menu renders only when both provided. */\r\n onRename?: () => void\r\n onDelete?: () => void\r\n /** Group reorder source; the row becomes draggable only when provided. */\r\n onDragStartCategory?: (event: DragEvent) => void\r\n} & RowDropProps) {\r\n const [menuOpen, setMenuOpen] = useState(false)\r\n const count = node.workspaces.length\r\n const manageable = onRename !== undefined && onDelete !== undefined\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {node.expanded ? : }\r\n \r\n {node.label}\r\n {count}\r\n {manageable && (\r\n \r\n { setMenuOpen(false) }}\r\n items={[\r\n { id: 'rename', label: t('group.rename'), icon: },\r\n { id: 'delete', label: t('group.delete'), icon: , danger: true },\r\n ]}\r\n onSelect={(id) => {\r\n setMenuOpen(false)\r\n if (id === 'rename') onRename()\r\n if (id === 'delete') onDelete()\r\n }}\r\n portal\r\n closeOnPointerLeave\r\n anchor={(\r\n { e.stopPropagation(); setMenuOpen(v => !v) }}\r\n >\r\n \r\n \r\n )}\r\n />\r\n \r\n )}\r\n \r\n )\r\n}\r\n\r\n/** One workspace folder row inside a category: draggable source + drop target. */\r\nexport function WorkspaceRow({ node, t, onToggle, onNewSession, onRename, onDelete, canMoveOut = false, onMoveOut, onOpenInFolder, flat = false, dropActive = false, insertLine, onRowDragOver, onRowDragLeave, onRowDrop, onDragStartExtra }: {\r\n node: WorkspaceGroupNode\r\n t: T\r\n onToggle: () => void\r\n onNewSession: () => void\r\n onRename: () => void\r\n onDelete: () => void\r\n /** Project currently sits inside a group — offer \"move out of group\". */\r\n canMoveOut?: boolean\r\n onMoveOut?: () => void\r\n /**\r\n * Open the project directory in the host's file manager. Omitted when the\r\n * host resolved no folder application (no capability, or a remote launch),\r\n * which keeps the entry out of the menu entirely.\r\n */\r\n onOpenInFolder?: () => void\r\n /** Render as a top-level row (no folder indentation). */\r\n flat?: boolean\r\n /** Extra dragstart hook (e.g. collapse all expanded projects while dragging). */\r\n onDragStartExtra?: () => void\r\n} & RowDropProps) {\r\n const [menuOpen, setMenuOpen] = useState(false)\r\n const menuItems = [\r\n ...(onOpenInFolder !== undefined\r\n ? [{ id: 'openInFolder', label: t('workspace.openInFolder'), icon: }]\r\n : []),\r\n ...(canMoveOut && onMoveOut !== undefined\r\n ? [{ id: 'moveOut', label: t('workspace.moveOutOfGroup'), icon: }]\r\n : []),\r\n { id: 'rename', label: t('workspace.rename'), icon: },\r\n { id: 'delete', label: t('workspace.delete'), icon: , danger: true },\r\n ]\r\n const onDragStart = (event: DragEvent): void => {\r\n event.dataTransfer.setData(DND_WORKSPACE_TYPE, node.workspaceId)\r\n event.dataTransfer.effectAllowed = 'move'\r\n onDragStartExtra?.()\r\n }\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {/* Project rows use the project glyph (same as the official workspace\r\n browser) so groups (folder glyph) and projects stay distinguishable. */}\r\n \r\n \r\n {node.label}\r\n \r\n { setMenuOpen(false) }}\r\n items={menuItems}\r\n onSelect={(id) => {\r\n setMenuOpen(false)\r\n if (id === 'openInFolder') onOpenInFolder?.()\r\n if (id === 'moveOut') onMoveOut?.()\r\n if (id === 'rename') onRename()\r\n if (id === 'delete') onDelete()\r\n }}\r\n portal\r\n closeOnPointerLeave\r\n anchor={(\r\n { e.stopPropagation(); setMenuOpen(v => !v) }}\r\n >\r\n \r\n \r\n )}\r\n />\r\n { e.stopPropagation(); onNewSession() }}\r\n >\r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\n/**\r\n * Children container for one folder's rows.\r\n *\r\n * Keeps the tree's `role=\"group\"` semantics and gives the rows a single\r\n * positioned ancestor. It used to draw a per-folder guide rail; that is now the\r\n * flower branch's job (one continuous stem for the whole tree, see\r\n * `FlowerBranch.tsx`), so this is structure only.\r\n */\r\nexport function TreeChildren({ children }: { children: ReactNode }) {\r\n return (\r\n
\r\n {children}\r\n
\r\n )\r\n}\r\n\r\n/** One session leaf row. */\r\nexport function SessionRow({ node, currentId, now, t, onOpen, onRename, onFork, onArchive }: {\r\n node: SessionNode\r\n currentId: string | undefined\r\n now: number\r\n t: T\r\n onOpen: (id: SessionNode['id']) => void\r\n onRename: (id: SessionNode['id'], currentTitle: string) => void\r\n onFork: (id: SessionNode['id']) => void\r\n onArchive: (id: SessionNode['id']) => void\r\n}) {\r\n const selected = node.id === currentId\r\n const [menuOpen, setMenuOpen] = useState(false)\r\n // The ACTIVE session hands its status slot to the flower: the branch anchors\r\n // on this cell (`anchorX` targets `.wgStatusSlot`), so the bloom and the dot\r\n // occupy the same 14px square. Drawing both puts the dot's green \"ongoing\"\r\n // ring (or the loading spinner) on top of the petals, which is what made the\r\n // flower look broken. The flower already carries this row's state — it turns\r\n // exactly while the session runs — so the dot is redundant here anyway.\r\n const showStatus = !selected\r\n const menuItems = [\r\n { id: 'rename', label: t('session.rename'), icon: },\r\n { id: 'fork', label: t('session.fork'), icon: },\r\n { id: 'archive', label: t('session.archive'), icon: },\r\n ]\r\n return (\r\n { onOpen(node.id) }}\r\n >\r\n \r\n {showStatus && }\r\n \r\n {node.title}\r\n {!node.blank && {relativeTimeLabel(node.updatedAt, now)}}\r\n {node.snippet !== undefined && (\r\n {node.snippet}\r\n )}\r\n {!node.blank && (\r\n \r\n { setMenuOpen(false) }}\r\n items={menuItems}\r\n onSelect={(id) => {\r\n setMenuOpen(false)\r\n if (id === 'rename') onRename(node.id, node.title)\r\n if (id === 'fork') onFork(node.id)\r\n if (id === 'archive') onArchive(node.id)\r\n }}\r\n portal\r\n closeOnPointerLeave\r\n anchor={(\r\n { e.stopPropagation(); setMenuOpen(v => !v) }}\r\n >\r\n \r\n \r\n )}\r\n />\r\n \r\n )}\r\n \r\n )\r\n}\r\n\r\nexport type { T }\r\n","/**\r\n * Transport for the official open-in-app host routes served by\r\n * `@deepseek-ai/dsh-host-open-in-app`. The project row offers \"open this\r\n * project's folder\" by asking that host half for the applications it verified\r\n * as installed, then POSTing the launcher it already resolved — this plugin\r\n * never probes or spawns a launcher itself, and a host without the capability\r\n * (no resolved application, e.g. an SSH launch) simply yields no menu entry.\r\n */\r\n\r\n/** GET route serving the probed application ids (host-owned constant). */\r\nexport const OPEN_IN_APP_APPS_ROUTE = '/open-in-app/apps'\r\n\r\n/** POST route launching one resolved application on one absolute directory. */\r\nexport const OPEN_IN_APP_OPEN_ROUTE = '/open-in-app/open'\r\n\r\n/**\r\n * Catalog ids that open a directory in the platform file manager, most\r\n * specific first (the official catalog names one per platform: `explorer` on\r\n * Windows, `finder` on macOS, `filemanager` on Linux).\r\n */\r\nconst FOLDER_APP_IDS = ['explorer', 'finder', 'filemanager'] as const\r\n\r\n/**\r\n * The installed file-manager id for this host, or undefined when the host\r\n * resolved none (the row then offers no \"open in folder\" entry).\r\n * @param apps - installed catalog ids from the apps route.\r\n * @returns the preferred available id.\r\n */\r\nexport function folderAppId(apps: readonly string[]): string | undefined {\r\n for (const id of FOLDER_APP_IDS) {\r\n if (apps.includes(id)) return id\r\n }\r\n return undefined\r\n}\r\n\r\n/**\r\n * Resolve the browser's Host base with the connection carrier's null-origin\r\n * fallback (same rule the official button uses): a sandboxed document reports\r\n * the literal origin \"null\", which cannot address the host.\r\n * @returns the absolute base URL of the current Host.\r\n */\r\nfunction hostBase(): string {\r\n const origin = globalThis.location?.origin\r\n return origin !== undefined && origin !== 'null' ? origin : 'http://dsh.internal'\r\n}\r\n\r\n/**\r\n * Read the host's installed-application ids. A host without the capability\r\n * (or one that refuses) reads as an empty list rather than an error, so the\r\n * caller can treat \"no apps\" and \"no route\" identically.\r\n * @param signal - aborts the read when the browser half unmounts.\r\n * @returns installed catalog ids, in host menu order.\r\n */\r\nexport async function fetchOpenInApps(signal?: AbortSignal): Promise {\r\n const response = await fetch(new URL(OPEN_IN_APP_APPS_ROUTE, hostBase()), {\r\n headers: { accept: 'application/json' },\r\n cache: 'no-store',\r\n ...(signal === undefined ? {} : { signal }),\r\n })\r\n if (!response.ok) throw new Error(`open-in-app apps request failed: ${response.status}`)\r\n const payload: unknown = await response.json()\r\n const apps = (payload as { apps?: unknown }).apps\r\n return Array.isArray(apps) ? apps.filter((id): id is string => typeof id === 'string') : []\r\n}\r\n\r\n/**\r\n * Launch one installed application on one absolute directory.\r\n * @param appId - catalog id from the apps route.\r\n * @param path - the project's absolute directory.\r\n * @returns after the host acknowledged the launch; rejects on any refusal.\r\n */\r\nexport async function openPathInApp(appId: string, path: string): Promise {\r\n const response = await fetch(new URL(OPEN_IN_APP_OPEN_ROUTE, hostBase()), {\r\n method: 'POST',\r\n headers: { 'Content-Type': 'application/json' },\r\n body: JSON.stringify({ app: appId, path }),\r\n })\r\n if (!response.ok) throw new Error(`open-in-app launch failed: ${response.status}`)\r\n}\r\n","/**\r\n * Pure data shaping for the Ctrl+R quick switch panel. Runtime-free (same\r\n * discipline as store-core.ts): unit tests exercise the real semantics\r\n * without a browser module loader; the panel only binds them to the\r\n * framework's global hooks.\r\n */\r\nimport type { SessionId } from '@deepseek-ai/dsh-session/types'\r\nimport type { SessionListState, SessionSummary } from '@deepseek-ai/dsh-api-session-controller/client'\r\nimport type { WorkspaceView } from '@deepseek-ai/dsh-api-workspace-controller/client'\r\n\r\n/** A session row eligible for quick switching: running, top-level, real. */\r\nfunction quickEligible(summary: SessionSummary): boolean {\r\n return summary.running === true && summary.origin !== 'subagent' && !summary.blank\r\n}\r\n\r\n/**\r\n * Running quick-switchable sessions across the whole list, newest first.\r\n * @param list - sessions list snapshot.\r\n * @param archived - registry-global archive set (archived rows never surface).\r\n * @returns running summaries in recency order (id as deterministic tiebreak).\r\n */\r\nexport function runningSessions(list: SessionListState, archived: ReadonlySet): SessionSummary[] {\r\n const out: SessionSummary[] = []\r\n for (const id of list.ids) {\r\n if (archived.has(id)) continue\r\n const summary = list.byId[id]\r\n if (summary !== undefined && quickEligible(summary)) out.push(summary)\r\n }\r\n out.sort((a, b) => (b.updatedAt !== a.updatedAt ? b.updatedAt - a.updatedAt : (a.id < b.id ? -1 : 1)))\r\n return out\r\n}\r\n\r\n/**\r\n * Every quick-switchable session across the whole list — the sessions tab's\r\n * data: running rows pinned on top, everything else under them, both groups\r\n * newest first. Visibility mirrors the tree (subagent rows never; archived\r\n * never; a blank row only while it is the open session).\r\n * @param list - sessions list snapshot.\r\n * @param archived - registry-global archive set (archived rows never surface).\r\n * @param current - the selected session (`mainView` retention; keeps its blank row visible).\r\n * @returns summaries with running first, then recency (id as deterministic tiebreak).\r\n */\r\nexport function allSessions(\r\n list: SessionListState,\r\n archived: ReadonlySet,\r\n current: SessionId | undefined,\r\n): SessionSummary[] {\r\n const out: SessionSummary[] = []\r\n for (const id of list.ids) {\r\n if (archived.has(id)) continue\r\n const summary = list.byId[id]\r\n if (summary === undefined) continue\r\n if (summary.origin === 'subagent') continue\r\n if (summary.blank && summary.id !== current) continue\r\n out.push(summary)\r\n }\r\n out.sort((a, b) => {\r\n if (a.running !== b.running) return a.running ? -1 : 1\r\n return b.updatedAt !== a.updatedAt ? b.updatedAt - a.updatedAt : (a.id < b.id ? -1 : 1)\r\n })\r\n return out\r\n}\r\n\r\n/**\r\n * Session search for the quick panel: display-title or owning-workspace-title\r\n * substring match (trimmed, case-insensitive). Filters only — the incoming\r\n * running-first/recency order is preserved verbatim, so \"running on top\"\r\n * survives any query.\r\n * @param sessions - allSessions() output (running pinned on top, then recency).\r\n * @param query - raw query.\r\n * @param workspaceTitleOf - owning workspace title resolver (sub-line source).\r\n * @param limit - hard render cap.\r\n * @returns matching sessions in the given order.\r\n */\r\nexport function filterSessions(\r\n sessions: readonly SessionSummary[],\r\n query: string,\r\n workspaceTitleOf: (session: SessionSummary) => string | undefined,\r\n limit = 200,\r\n): SessionSummary[] {\r\n const q = query.trim().toLowerCase()\r\n if (q === '') return sessions.slice(0, limit)\r\n const out: SessionSummary[] = []\r\n for (const session of sessions) {\r\n const workspace = workspaceTitleOf(session)?.toLowerCase() ?? ''\r\n if (session.displayTitle.toLowerCase().includes(q) || workspace.includes(q)) out.push(session)\r\n }\r\n return out.slice(0, limit)\r\n}\r\n\r\n/**\r\n * Most recently updated running session inside one workspace.\r\n * @param list - sessions list snapshot.\r\n * @param workspace - target workspace (its session account order is irrelevant;\r\n * recency picks the row).\r\n * @returns the session id, or undefined when nothing in the workspace runs.\r\n */\r\nexport function latestRunningInWorkspace(list: SessionListState, workspace: WorkspaceView): SessionId | undefined {\r\n let best: SessionId | undefined\r\n let bestTime = Number.NEGATIVE_INFINITY\r\n for (const id of workspace.sessionIds) {\r\n const summary = list.byId[id]\r\n if (summary === undefined || !quickEligible(summary)) continue\r\n if (summary.updatedAt > bestTime) {\r\n best = summary.id\r\n bestTime = summary.updatedAt\r\n }\r\n }\r\n return best\r\n}\r\n\r\n/**\r\n * Running-session count per workspace id (badge on the workspace tab rows).\r\n * @param running - runningSessions() output.\r\n * @param workspaces - real workspaces in stable Host order.\r\n * @returns counts keyed by workspace id; absent key = none running.\r\n */\r\nexport function runningCountByWorkspace(\r\n running: readonly SessionSummary[],\r\n workspaces: readonly WorkspaceView[],\r\n): Map {\r\n const counts = new Map()\r\n if (running.length === 0) return counts\r\n const runningIds = new Set(running.map(s => s.id))\r\n for (const workspace of workspaces) {\r\n let count = 0\r\n for (const sessionId of workspace.sessionIds) {\r\n if (runningIds.has(sessionId)) count += 1\r\n }\r\n if (count > 0) counts.set(workspace.workspaceId as string, count)\r\n }\r\n return counts\r\n}\r\n\r\n/**\r\n * The workspace that owns the currently open session.\r\n * @param workspaces - real workspaces in stable Host order.\r\n * @param currentSessionId - the selected session (`mainView` retention); may be undefined\r\n * (no session open, cleared selection) or an id no listed workspace holds\r\n * (e.g. an addressed subagent session).\r\n * @returns the workspace id, or undefined when there is no active workspace.\r\n */\r\nexport function activeWorkspaceId(\r\n workspaces: readonly WorkspaceView[],\r\n currentSessionId: SessionId | undefined,\r\n): string | undefined {\r\n if (currentSessionId === undefined) return undefined\r\n const workspace = workspaces.find(w => w.sessionIds.includes(currentSessionId))\r\n return workspace?.workspaceId as string | undefined\r\n}\r\n\r\n/**\r\n * Workspace search for the quick panel: title prefix → title substring →\r\n * category label substring → path substring; ties keep host order via a\r\n * stable title compare inside one rank.\r\n * @param workspaces - real workspaces in stable Host order.\r\n * @param query - raw query (trimmed, case-insensitive).\r\n * @param categoryLabelOf - category label resolver (grouped workspaces only).\r\n * @param limit - hard render cap.\r\n * @returns ranked matches; an empty query returns host order.\r\n */\r\nexport function filterWorkspaces(\r\n workspaces: readonly WorkspaceView[],\r\n query: string,\r\n categoryLabelOf?: (workspace: WorkspaceView) => string | undefined,\r\n limit = 50,\r\n): WorkspaceView[] {\r\n const q = query.trim().toLowerCase()\r\n if (q === '') return workspaces.slice(0, limit)\r\n const scored: { workspace: WorkspaceView; score: number }[] = []\r\n for (const workspace of workspaces) {\r\n const title = workspace.title.toLowerCase()\r\n const path = workspace.path.toLowerCase()\r\n const category = (categoryLabelOf?.(workspace) ?? '').toLowerCase()\r\n let score: number | undefined\r\n if (title.startsWith(q)) score = 0\r\n else if (title.includes(q)) score = 1\r\n else if (category !== '' && category.includes(q)) score = 2\r\n else if (path.includes(q)) score = 3\r\n if (score !== undefined) scored.push({ workspace, score })\r\n }\r\n scored.sort((a, b) => (a.score !== b.score\r\n ? a.score - b.score\r\n : a.workspace.title.localeCompare(b.workspace.title)))\r\n return scored.slice(0, limit).map(entry => entry.workspace)\r\n}\r\n","/**\r\n * Ctrl+R quick switch panel: two tabs over the framework's global hooks.\r\n *\r\n * - Workspaces tab: search real Workspaces, select one, then either start a\r\n * New Session in it or jump straight to its most recently updated running\r\n * session (the button reads the none-running state and disables).\r\n * - Sessions tab: every top-level session across workspaces — running ones\r\n * pinned on top, everything else under them, both groups newest first; one\r\n * click (or Enter) opens it. The shared search input filters by session or\r\n * workspace title and never re-sorts, so the running-first order survives.\r\n *\r\n * Current-row marker: the open workspace (workspaces tab) and the open\r\n * session (sessions tab) render `.wgQuickRowCurrent`; with no current\r\n * session — or one no listed workspace holds — nothing is marked.\r\n *\r\n * Mount discipline: the parent conditionally mounts this component, so every\r\n * open starts from a fresh query/selection (quick-switcher semantics). The\r\n * overlay portals to document.body (sidebar ancestors clip `fixed`), sizes\r\n * itself like a launcher (top-anchored, 640px) instead of the host Modal's\r\n * 380px dialog, and handles Escape / mask click by itself. Pure data shaping\r\n * lives in quick.ts; this file only binds hooks + actions.\r\n */\r\nimport { useEffect, useMemo, useRef, useState, type KeyboardEvent, type MouseEvent } from 'react'\r\nimport { createPortal } from 'react-dom'\r\nimport { Button, StateDot } from '@deepseek-ai/dsh-client-ui-primitives'\r\nimport type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots'\r\nimport type { SessionListState } from '@deepseek-ai/dsh-api-session-controller/client'\r\nimport type { WorkspaceId, WorkspaceView } from '@deepseek-ai/dsh-api-workspace-controller/client'\r\nimport type { SessionId } from '@deepseek-ai/dsh-session/types'\r\nimport { activeWorkspaceId, allSessions, filterSessions, filterWorkspaces, latestRunningInWorkspace, runningCountByWorkspace, runningSessions } from './quick.ts'\r\nimport { relativeTimeLabel } from './rows.tsx'\r\n\r\n/** Which surface of the quick panel is active. */\r\nexport type QuickTab = 'workspaces' | 'sessions'\r\n\r\n/** The locale seat's translate function (same shape GroupsBrowser receives). */\r\ntype Translate = PropsLocale<'workspaceGroups'>['t']\r\n\r\n/** Quick panel props: hooks snapshots + the two injected verbs + shared CSS context. */\r\nexport type QuickPanelProps = {\r\n /** Close request (Escape, mask click, action completed, or parent Ctrl+R toggle). */\r\n onClose: () => void\r\n /** Sessions list snapshot (drives running detection). */\r\n list: SessionListState\r\n /** Real workspaces in stable Host order. */\r\n workspaces: readonly WorkspaceView[]\r\n /** Registry-global archive set. */\r\n archivedSessionIds: readonly SessionId[]\r\n /** Category label per grouped workspace id (badge column; top-level absent). */\r\n categoryByWorkspace: ReadonlyMap\r\n /** The Session the Conversation currently shows (mainView retention), if any. */\r\n current: SessionId | undefined\r\n /** Start a New Session in a workspace (injected share verb). */\r\n startSession: (workspaceId?: WorkspaceId) => void\r\n /** Open a real Session (injected share verb). */\r\n openSession: (sessionId: SessionId) => void\r\n /** Render clock for relative times (parent refreshes per render). */\r\n now: number\r\n /** Dictionary accessor (workspaceGroups namespace). */\r\n t: Translate\r\n}\r\n\r\n/** Basename of a host path (both separators; shortens the workspace row sub-line). */\r\nfunction pathBasename(path: string): string {\r\n const trimmed = path.replace(/[/\\\\]+$/, '')\r\n const base = trimmed.split(/[/\\\\]/).pop()\r\n return base !== undefined && base !== '' ? base : trimmed\r\n}\r\n\r\n/**\r\n * Render the quick switch panel (portaled overlay).\r\n * @param props - hooks snapshots + injected verbs.\r\n * @returns the panel element tree.\r\n */\r\nexport function QuickPanel({\r\n onClose,\r\n list,\r\n workspaces,\r\n archivedSessionIds,\r\n categoryByWorkspace,\r\n current: currentSessionId,\r\n startSession,\r\n openSession,\r\n now,\r\n t,\r\n}: QuickPanelProps) {\r\n const [tab, setTab] = useState('workspaces')\r\n const [query, setQuery] = useState('')\r\n const [selectedId, setSelectedId] = useState(null)\r\n const [activeIndex, setActiveIndex] = useState(0)\r\n const inputRef = useRef(null)\r\n const activeRowRef = useRef(null)\r\n\r\n const archived = useMemo(() => new Set(archivedSessionIds), [archivedSessionIds])\r\n const running = useMemo(() => runningSessions(list, archived), [list, archived])\r\n const runCounts = useMemo(() => runningCountByWorkspace(running, workspaces), [running, workspaces])\r\n const filtered = useMemo(\r\n () => filterWorkspaces(workspaces, query, ws => categoryByWorkspace.get(ws.workspaceId as string)),\r\n [workspaces, query, categoryByWorkspace],\r\n )\r\n\r\n // Where the user is right now: the open session and its owning workspace.\r\n // Both may be absent (no mainView retention, or a session no listed\r\n // workspace holds) — the current-row marker simply never renders then.\r\n const currentWorkspaceId = useMemo(\r\n () => activeWorkspaceId(workspaces, currentSessionId),\r\n [workspaces, currentSessionId],\r\n )\r\n\r\n // Sessions tab data: every top-level session, running pinned on top then\r\n // recency, filtered by the shared search query (filter never re-sorts).\r\n const sessions = useMemo(\r\n () => allSessions(list, archived, currentSessionId),\r\n [list, archived, currentSessionId],\r\n )\r\n // Owning workspace title per session id (row sub-line + search field);\r\n // first workspace wins — a session lives in exactly one.\r\n const workspaceTitleBySession = useMemo(() => {\r\n const map = new Map()\r\n for (const workspace of workspaces) {\r\n for (const sessionId of workspace.sessionIds) {\r\n if (!map.has(sessionId)) map.set(sessionId, workspace.title)\r\n }\r\n }\r\n return map\r\n }, [workspaces])\r\n const filteredSessions = useMemo(\r\n () => filterSessions(sessions, query, s => workspaceTitleBySession.get(s.id)),\r\n [sessions, query, workspaceTitleBySession],\r\n )\r\n\r\n const selected = selectedId === null\r\n ? undefined\r\n : workspaces.find(w => (w.workspaceId as string) === selectedId)\r\n const selectedRunningId = selected === undefined ? undefined : latestRunningInWorkspace(list, selected)\r\n\r\n // Focus the search input whenever a tab becomes reachable (both tabs own it).\r\n useEffect(() => {\r\n inputRef.current?.focus()\r\n }, [tab])\r\n\r\n // Keep the keyboard-active row visible while arrowing through the list.\r\n useEffect(() => {\r\n activeRowRef.current?.scrollIntoView({ block: 'nearest' })\r\n }, [activeIndex])\r\n\r\n /** Select the workspace and close (New Session verb). */\r\n const launchNewSession = (workspace: WorkspaceView): void => {\r\n startSession(workspace.workspaceId)\r\n onClose()\r\n }\r\n\r\n /** Open a session row and close (sessions tab click or Enter). */\r\n const launchSession = (sessionId: SessionId): void => {\r\n openSession(sessionId)\r\n onClose()\r\n }\r\n\r\n /** Switch tabs; the query carries over, the per-tab selection resets. */\r\n const switchTab = (next: QuickTab): void => {\r\n setTab(next)\r\n setSelectedId(null)\r\n setActiveIndex(0)\r\n }\r\n\r\n /** Search-input keyboard: arrows move the active row; Enter confirms it. */\r\n const onSearchKeyDown = (e: KeyboardEvent): void => {\r\n if (e.key === 'ArrowDown') {\r\n e.preventDefault()\r\n const max = (tab === 'workspaces' ? filtered.length : filteredSessions.length) - 1\r\n setActiveIndex(i => Math.min(i + 1, Math.max(max, 0)))\r\n } else if (e.key === 'ArrowUp') {\r\n e.preventDefault()\r\n setActiveIndex(i => Math.max(i - 1, 0))\r\n } else if (e.key === 'Enter') {\r\n e.preventDefault()\r\n if (tab === 'workspaces') {\r\n if (selected === undefined) {\r\n const target = filtered[activeIndex]\r\n if (target !== undefined) setSelectedId(target.workspaceId as string)\r\n } else {\r\n launchNewSession(selected)\r\n }\r\n } else {\r\n const target = filteredSessions[activeIndex]\r\n if (target !== undefined) launchSession(target.id)\r\n }\r\n }\r\n }\r\n\r\n /** Escape closes (capture so row buttons and the input can't swallow it). */\r\n const onCardKeyDown = (e: KeyboardEvent): void => {\r\n if (e.key === 'Escape') {\r\n e.preventDefault()\r\n e.stopPropagation()\r\n onClose()\r\n }\r\n }\r\n\r\n /** Mask click closes; clicks inside the card never reach the mask. */\r\n const onOverlayMouseDown = (e: MouseEvent): void => {\r\n if (e.target === e.currentTarget) onClose()\r\n }\r\n\r\n const selectWorkspace = (id: string): void => {\r\n setSelectedId(id)\r\n inputRef.current?.focus()\r\n }\r\n\r\n return createPortal(\r\n
\r\n \r\n
\r\n {t('quick.title')}\r\n
\r\n { switchTab('workspaces') }}\r\n >\r\n {t('quick.tab.workspaces')}\r\n \r\n { switchTab('sessions') }}\r\n >\r\n {t('quick.tab.sessions')}\r\n {running.length > 0 && {running.length}}\r\n \r\n
\r\n
\r\n\r\n {/* Shared search: workspaces on one tab, sessions on the other. */}\r\n
\r\n {\r\n setQuery(e.target.value)\r\n setSelectedId(null)\r\n setActiveIndex(0)\r\n }}\r\n onKeyDown={onSearchKeyDown}\r\n />\r\n
\r\n {tab === 'workspaces' ? (\r\n <>\r\n
\r\n {filtered.map((workspace, i) => {\r\n const id = workspace.workspaceId as string\r\n const count = runCounts.get(id) ?? 0\r\n const category = categoryByWorkspace.get(id)\r\n const isCurrent = id === currentWorkspaceId\r\n return (\r\n { setActiveIndex(i) }}\r\n onClick={() => { selectWorkspace(id) }}\r\n >\r\n \r\n {workspace.title}\r\n {count > 0 && ● {count}}\r\n \r\n \r\n \r\n {category !== undefined ? `${category} · ${pathBasename(workspace.path)}` : pathBasename(workspace.path)}\r\n \r\n \r\n \r\n )\r\n })}\r\n {filtered.length === 0 &&
{t('quick.empty.workspaces')}
}\r\n
\r\n
\r\n \r\n {selected === undefined ? t('quick.select.hint') : selected.title}\r\n \r\n { if (selectedRunningId !== undefined) launchSession(selectedRunningId) }}\r\n >\r\n {selectedRunningId !== undefined ? t('quick.action.running') : t('quick.action.noneRunning')}\r\n \r\n { if (selected !== undefined) launchNewSession(selected) }}\r\n >\r\n {t('quick.action.newSession')}\r\n \r\n
\r\n \r\n ) : (\r\n
\r\n {filteredSessions.map((session, i) => {\r\n const workspaceTitle = workspaceTitleBySession.get(session.id) ?? ''\r\n const isCurrent = session.id === currentSessionId\r\n return (\r\n { setActiveIndex(i) }}\r\n onClick={() => { launchSession(session.id) }}\r\n >\r\n \r\n \r\n {session.blank ? t('newSession') : session.displayTitle}\r\n {relativeTimeLabel(session.updatedAt, now)}\r\n \r\n \r\n {workspaceTitle}\r\n \r\n \r\n )\r\n })}\r\n {filteredSessions.length === 0 &&
{t('quick.empty.sessions')}
}\r\n
\r\n )}\r\n\r\n
{t('quick.hint')}
\r\n
\r\n ,\r\n document.body,\r\n )\r\n}\r\n","/**\r\n * DOM seat for the session tab strip.\r\n *\r\n * Why this exists instead of a slot: the strip belongs at the very top of the\r\n * conversation column — `pI_x6G_centerCol` (ui-layout's AppFrame `.centerCol`,\r\n * a hashed CSS-Modules class). That column declares NO child slots: its only\r\n * child is the `main` slot's occupant (`renderSlot('main', …)`, the\r\n * Conversation or a global panel), so there is nowhere to register. The\r\n * shipped slot in that neighbourhood — `conversation.composer.dock` — is the\r\n * band UNDER the composer card, a different place entirely.\r\n *\r\n * So the strip gets a real DOM seat: this module finds the column, prepends a\r\n * `
` to it, and hands that element to a React portal. The element is\r\n * OURS, never React's: it is inserted outside the column's child list that\r\n * React reconciles, and it is re-inserted if React (or a theme/titlebar\r\n * re-render) ever drops it.\r\n *\r\n * Two hazards this module is built around:\r\n *\r\n * 1. `centerCol` is a hashed class name (`pI_x6G_centerCol`) that changes when\r\n * the package is rebuilt. Matching is therefore done on the *structural*\r\n * contract — a grid-item column that holds the `main` panel — plus a\r\n * `[class*=\"_centerCol\"]` probe, never on the exact hash.\r\n * 2. The column mounts after the client plugin's `apply()` runs. Discovery is\r\n * therefore a MutationObserver on `document.body` plus a `requestAnimationFrame`\r\n * retry, and both are torn down when the owning effect disposes.\r\n */\r\n\r\n/** Persistent marker for the injected container (survives React re-renders). */\r\nconst SEAT_ATTRIBUTE = 'data-wg-tab-seat'\r\n\r\n/** Sentinel attribute on the container so discovery can skip our own node. */\r\nconst SEAT_SELECTOR = `[${SEAT_ATTRIBUTE}]`\r\n\r\n/**\r\n * Match the conversation column by its hashed CSS-Modules class.\r\n *\r\n * The hash prefix (`pI_x6G_`) is build-dependent, so the probe matches the\r\n * `_centerCol` suffix that the Modules transform always preserves. A plain\r\n * `class*=\"centerCol\"` scan would risk matching unrelated utility classes, so\r\n * the leading underscore is required.\r\n * @param root - subtree to scan (normally `document`).\r\n * @returns the column element, or null while it has not mounted.\r\n */\r\nfunction findCenterColumn(root: ParentNode): HTMLElement | null {\r\n // Fast path: the seat is already in place and still attached, which is the\r\n // steady state on every re-render (portal into an existing element).\r\n const existing = root.querySelector(SEAT_SELECTOR)\r\n if (existing?.isConnected === true) return existing.parentElement\r\n\r\n // Structural probe: the column is the direct child of the app frame grid\r\n // that contains the `main` panel. Querying the class suffix first keeps this\r\n // to one selector evaluation in the common case.\r\n const column = root.querySelector('[class*=\"_centerCol\"]')\r\n if (column !== null) return column\r\n\r\n // Nothing matched: either the shell has not mounted yet, or the Modules hash\r\n // convention changed. Returning null keeps the caller in its wait loop\r\n // instead of guessing at a wrong node (which would visually corrupt the\r\n // shell). The strip simply appears once the frame is up.\r\n return null\r\n}\r\n\r\n/** A mounted seat: the host element plus the disposer that removes it. */\r\nexport interface TabSeat {\r\n /**\r\n * The element the React portal renders into — null until the conversation\r\n * column mounts. The portal is simply not rendered while this is null.\r\n */\r\n readonly host: HTMLElement | null\r\n /** Remove the seat and stop watching for the column. */\r\n dispose: () => void\r\n}\r\n\r\n/**\r\n * Ensure a seat exists as the FIRST child of the conversation column, creating\r\n * it if needed, and keep it there for as long as the returned handle is live.\r\n *\r\n * The seat element is created once and reused: a portal that re-mounts into a\r\n * fresh node on every shell re-render would drop the tab strip's React state\r\n * and visible focus. If React removes the node (it owns the column's child\r\n * list, and our node is not part of it), the observer re-inserts the SAME\r\n * element, so the portal's subtree moves with it.\r\n *\r\n * @param onReady - called with the host element each time it becomes attached\r\n * (once immediately when the column already exists). Used to seed React\r\n * state; may fire more than once if the column is remounted.\r\n * @returns the seat handle. `host` is null until the column appears, so the\r\n * caller renders nothing meanwhile and starts rendering when `onReady`\r\n * fires. Never null: a missing column must degrade to \"no strip\", not to a\r\n * thrown error that would take the whole client plugin down.\r\n */\r\nexport function mountTabSeat(onReady: (host: HTMLElement) => void): TabSeat {\r\n let host: HTMLElement | null = null\r\n let column: HTMLElement | null = null\r\n let observer: MutationObserver | null = null\r\n let raf = 0\r\n let attempts = 0\r\n let disposed = false\r\n\r\n // Bounded retry: ~5s at 60fps. The shell mounts well inside this; the bound\r\n // exists so a missing column degrades to \"no strip\" instead of a permanent\r\n // frame loop.\r\n const MAX_ATTEMPTS = 300\r\n\r\n /**\r\n * Put the seat at the head of the column, creating it on first success.\r\n * Idempotent: a seat already first is left untouched, so repeated calls from\r\n * the observer cause no DOM churn (and therefore no observer feedback loop —\r\n * our insertion schedules one more callback, which then takes this early\r\n * return instead of re-inserting).\r\n */\r\n const place = (target: HTMLElement): void => {\r\n if (disposed) return\r\n if (host === null) {\r\n host = document.createElement('div')\r\n host.setAttribute(SEAT_ATTRIBUTE, '')\r\n }\r\n if (target.firstChild === host) return\r\n target.insertBefore(host, target.firstChild)\r\n }\r\n\r\n /** Locate the column and, on success, seat the host and notify the caller. */\r\n const tryMount = (): boolean => {\r\n if (disposed) return true\r\n // Steady state: the column we already found is still attached.\r\n if (column !== null && column.isConnected) {\r\n place(column)\r\n return true\r\n }\r\n const found = findCenterColumn(document)\r\n if (found === null) return false\r\n // A different column than last time (shell remount): re-seat AND re-notify,\r\n // because the caller may hold a stale host element from the old tree.\r\n const changed = found !== column\r\n column = found\r\n place(found)\r\n if (changed) onReady(host as HTMLElement)\r\n return true\r\n }\r\n\r\n const tick = (): void => {\r\n if (disposed) return\r\n raf = 0\r\n if (tryMount()) return\r\n attempts += 1\r\n if (attempts >= MAX_ATTEMPTS) return\r\n raf = requestAnimationFrame(tick)\r\n }\r\n\r\n // The observer covers both \"column mounts later\" and \"React dropped our\r\n // node\": either way the child list changes and we re-seat. `requestAnimationFrame`\r\n // alone would miss a removal that happens after the retry budget is spent.\r\n observer = new MutationObserver(() => {\r\n if (disposed) return\r\n if (tryMount()) return\r\n if (raf === 0 && attempts < MAX_ATTEMPTS) raf = requestAnimationFrame(tick)\r\n })\r\n observer.observe(document.body, { childList: true, subtree: true })\r\n\r\n if (!tryMount() && raf === 0) raf = requestAnimationFrame(tick)\r\n\r\n return {\r\n get host(): HTMLElement | null {\r\n // Null until the column mounts; the caller's `onReady` fires at the same\r\n // moment this becomes non-null, so the two never disagree.\r\n return host\r\n },\r\n dispose: () => {\r\n disposed = true\r\n if (raf !== 0) cancelAnimationFrame(raf)\r\n raf = 0\r\n observer?.disconnect()\r\n observer = null\r\n host?.remove()\r\n host = null\r\n column = null\r\n },\r\n } as TabSeat\r\n}\r\n","/**\r\n * The session tab strip: one chip per opened conversation, rendered into the\r\n * DOM seat at the head of the conversation column (see `tab-seat.ts` for why\r\n * this is a DOM injection rather than a slot).\r\n *\r\n * A tab is a *view* of the open session, not a second navigation model:\r\n * clicking a chip navigates through `ctx.uiWorkspace.openSession`, which is the\r\n * one path that retains a target session; the owning component derives the\r\n * strip from the open session plus the tab store.\r\n *\r\n * The active chip is derived, never stored: it is the chip whose session is the\r\n * open one, so clicking a background chip immediately shows that chip active.\r\n */\r\nimport { useEffect, useMemo, useRef, useState } from 'react'\r\nimport { createPortal } from 'react-dom'\r\nimport { IconCloseFillMedium, StateDot, Tooltip, type StateDotState } from '@deepseek-ai/dsh-client-ui-primitives'\r\nimport type { SessionsTabsProps } from './contract.ts'\r\nimport { mountTabSeat } from './tab-seat.ts'\r\nimport { orderedTabs, projectIndex, tabIndicator, type SessionTab, type SessionTabIndicator } from './tabs.ts'\r\nimport { currentSessionId } from './tree.ts'\r\n\r\n/** Dot state for one tab (the sidebar's session rows share this vocabulary). */\r\nfunction dotState(indicator: SessionTabIndicator): StateDotState {\r\n if (indicator.attention) return 'warning'\r\n if (indicator.running) return 'ongoing'\r\n return 'done'\r\n}\r\n\r\n/**\r\n * Render the session tab strip into the conversation column's head seat.\r\n * @param props - tab store, catalog/status hooks, navigation, locale.\r\n * @returns the portal (or null until the column has mounted).\r\n */\r\nexport function SessionTabs({\r\n useTabs,\r\n actions,\r\n useSessions,\r\n useSessionStatus,\r\n useWorkspaces,\r\n activate,\r\n rename,\r\n t,\r\n}: SessionsTabsProps) {\r\n const tabs = useTabs(s => s.tabs)\r\n const list = useSessions(s => s)\r\n const statuses = useSessionStatus(s => s)\r\n const currentId = useSessions(s => currentSessionId(s))\r\n const workspaces = useWorkspaces(s => s.items)\r\n\r\n // Session → owning project, in one pass over the workspace registry. This is\r\n // what lets each chip name its project; without it a strip of session titles\r\n // is ambiguous as soon as two projects are open.\r\n const projects = useMemo(() => projectIndex(workspaces), [workspaces])\r\n\r\n // The seat is a DOM node outside React's tree, so it cannot arrive through\r\n // props; it is discovered once per mount and held in state to trigger the\r\n // portal's first render when the column appears.\r\n const [seat, setSeat] = useState(null)\r\n // The scrolling row, for wheel redirection and keep-active-in-view.\r\n const scrollRef = useRef(null)\r\n\r\n useEffect(() => {\r\n const mounted = mountTabSeat(setSeat)\r\n // The column may already exist, in which case onReady fired synchronously\r\n // during mountTabSeat and setSeat is already queued; adopt it here too so\r\n // the very first paint has a host instead of waiting a frame.\r\n if (mounted.host !== null) setSeat(mounted.host)\r\n return () => {\r\n mounted.dispose()\r\n // The portal must stop targeting a removed node before the next mount.\r\n setSeat(null)\r\n }\r\n }, [])\r\n\r\n // The strip renders exactly the tabs the store holds. There is deliberately NO\r\n // filtering against the session catalog and no \"close tabs whose session\r\n // vanished\" sweep: a tab is removed when the USER closes it, and by nothing\r\n // else. Trimming automatically also misfires — the catalog is briefly empty on\r\n // every load, which deleted restored tabs before the sessions arrived.\r\n //\r\n // Arrival order is the only order: the active tab is marked, never moved.\r\n const display = useMemo(() => orderedTabs(tabs, currentId), [tabs, currentId])\r\n\r\n // With the row scrollable, the active chip can sit outside the viewport —\r\n // e.g. after clicking a session in the sidebar that has a tab far to the\r\n // right. Bring it into view on selection change. `block: 'nearest'` keeps\r\n // this a horizontal-only scroll, and `inline: 'nearest'` avoids nudging the\r\n // row when the chip is already fully visible.\r\n useEffect(() => {\r\n const el = scrollRef.current\r\n if (el === null || currentId === undefined) return\r\n const chip = el.querySelector(`[data-tab-session=\"${CSS.escape(currentId)}\"]`)\r\n chip?.scrollIntoView({ block: 'nearest', inline: 'nearest' })\r\n }, [currentId, display.length])\r\n\r\n if (seat === null || display.length === 0) return null\r\n\r\n return createPortal(\r\n
\r\n {\r\n // A plain wheel reports only `deltaY`, and the overflow here is\r\n // horizontal, so without this the wheel would do nothing over the\r\n // strip (or scroll the transcript behind it). Redirect the dominant\r\n // delta to scrollLeft, and only swallow the event once there is\r\n // somewhere left to scroll — otherwise a wheel at either end keeps\r\n // propagating and the page still scrolls normally.\r\n const el = event.currentTarget\r\n if (el.scrollWidth <= el.clientWidth) return\r\n const delta = Math.abs(event.deltaY) > Math.abs(event.deltaX) ? event.deltaY : event.deltaX\r\n if (delta === 0) return\r\n const atStart = el.scrollLeft <= 0 && delta < 0\r\n const atEnd = el.scrollLeft + el.clientWidth >= el.scrollWidth - 1 && delta > 0\r\n if (atStart || atEnd) return\r\n el.scrollLeft += delta\r\n event.preventDefault()\r\n }}\r\n >\r\n {display.map((tab: SessionTab) => {\r\n const summary = list.byId[tab.sessionId]\r\n // A restored tab can render before its catalog row arrives. Show the\r\n // session id meanwhile rather than an empty chip — the tab is real, and\r\n // the title fills in as soon as the catalog catches up.\r\n const label = summary === undefined\r\n ? tab.sessionId\r\n : summary.blank ? t('newSession') : summary.displayTitle\r\n const active = tab.sessionId === currentId\r\n const indicator = tabIndicator(summary, statuses.get(tab.sessionId))\r\n // The project this session belongs to. Absent for a session that is in\r\n // no workspace (a bare session, or one just created before the\r\n // registry caught up) — the chip then shows the title alone rather\r\n // than a placeholder.\r\n const project = projects.get(tab.sessionId)\r\n // Title attribute carries the full pair plus the directory, so the\r\n // truncated chip text is recoverable on hover.\r\n const tip = project === undefined\r\n ? label\r\n : `${project.label} · ${label}\\n${project.path}`\r\n return (\r\n \r\n { activate(tab.sessionId) }}\r\n onDoubleClick={() => { rename(tab.sessionId, label) }}\r\n >\r\n \r\n \r\n \r\n {/* Two stacked lines, folder-style: the project (short, quiet)\r\n over the session title (long, primary). The project line is\r\n omitted for a session in no workspace, which lets the title\r\n use the full height rather than leaving a blank row. */}\r\n \r\n {project !== undefined && (\r\n {project.label}\r\n )}\r\n {label}\r\n \r\n \r\n \r\n {\r\n event.stopPropagation()\r\n actions.close(tab.sessionId)\r\n }}\r\n >\r\n \r\n \r\n \r\n
\r\n )\r\n })}\r\n
\r\n ,\r\n seat,\r\n )\r\n}\r\n","/**\r\n * The \"flower branch\" geometry for the sidebar tree.\r\n *\r\n * Reproduces the RewampUI *Flower Sidebar* mechanism: a single curly branch runs\r\n * down the left of the nav list, drawn as SVG so it can be *grown* — a faded\r\n * dashed ghost shows the whole route, and a solid stroke is drawn only as far as\r\n * the row you are on. Each row gets a dot sitting exactly on the curve, and the\r\n * active row's dot blooms.\r\n *\r\n * How it maps onto OUR tree (three levels: 分组 folder → 项目 folder → 会话 row):\r\n *\r\n * - The branch is **one continuous path** through every visible row, not one\r\n * rail per folder. That is what makes it read as a plant rather than as the\r\n * per-folder rail it replaces.\r\n * - The stem runs at `STEM_X`; at each **group boundary** it kinks outward to\r\n * `BULGE_X` and back — a half-pitch out plus a half-pitch back, which is\r\n * exactly the reference's 32px rhythm.\r\n * - Rows that are not group boundaries sit on a straight run, one row pitch\r\n * apart, each carrying a dot at its own y.\r\n *\r\n * Runtime-free on purpose (same discipline as `tabs.ts` / `store-core.ts`): the\r\n * component measures the DOM and hands plain numbers here, so the geometry is\r\n * unit-testable without a browser.\r\n */\r\n\r\n/** Horizontal position of the stem's straight runs. */\r\n/**\r\n * Default x for a row's anchor, in SVG coordinates.\r\n *\r\n * A fallback only: rows carry their OWN measured `x`, because the tree indents\r\n * with per-row padding rather than one shared origin. A folder's chevron and a\r\n * session's text sit at different x, and no single constant lands on both.\r\n */\r\nexport const STEM_X = 30\r\n\r\n/** Default vertical pitch between two rows. */\r\nexport const ROW_PITCH = 32\r\n\r\n/**\r\n * One row the branch must pass through.\r\n *\r\n * Both coordinates are MEASURED, not derived:\r\n * - `y` because the tree mixes row heights and inter-row gaps (deriving one\r\n * pitch from a single gap drifted the dots up to 15px off their rows);\r\n * - `x` because the tree indents per row via padding, so a folder's chevron and\r\n * a session's text are at different x.\r\n */\r\nexport interface BranchRow {\r\n /** Stable key, used to match a row to its dot. */\r\n readonly key: string\r\n /** Row centre y, in the SVG's coordinate space. */\r\n readonly y: number\r\n /**\r\n * Row anchor x, in the SVG's coordinate space.\r\n *\r\n * A folder row's anchor is its CHEVRON centre — the triangle the user already\r\n * reads as \"this row opens\" — so the stem visually hangs off the marker rather\r\n * than floating beside it. A session row's anchor is the indent its text sits\r\n * on.\r\n */\r\n readonly x: number\r\n /**\r\n * Row kind. A `'group'` row starts a new group and makes the stem kink;\r\n * an `'item'` row runs straight (or curves back in right after a group).\r\n */\r\n readonly kind: 'group' | 'item'\r\n /** Whether this is the row the user is currently on (the bloomed dot). */\r\n readonly active: boolean\r\n}\r\n\r\n/** A dot on the branch: one per row, positioned on the curve. */\r\nexport interface BranchDot {\r\n /** The row this dot belongs to. */\r\n readonly key: string\r\n readonly cx: number\r\n readonly cy: number\r\n readonly active: boolean\r\n}\r\n\r\n/**\r\n * The bloom that flowers at the branch's endpoint.\r\n *\r\n * The endpoint is where the GROWN stroke stops — the row the user is on — not\r\n * the last visible row: the stem is drawn to the active row, so that is where\r\n * the plant has visibly reached, whether the tree is folded above it or not.\r\n *\r\n * This is deliberately the ONE row an active marker names, so the flower can\r\n * never disagree with the stem about where the branch ends.\r\n */\r\nexport interface BranchFlower {\r\n /** Row whose endpoint carries the bloom (the active row's key). */\r\n readonly key: string\r\n /** Endpoint x: the last dot's centre, i.e. exactly where the grown path stops. */\r\n readonly cx: number\r\n /** Endpoint y, on the measured row centre. */\r\n readonly cy: number\r\n}\r\n\r\n/** The branch: one path for the ghost, its total length, and the dots. */\r\nexport interface Branch {\r\n /** Full route, drawn as the faded dashed ghost. */\r\n readonly ghostPath: string\r\n /** Path up to and including the active row (the \"grown\" part). */\r\n readonly grownPath: string\r\n /** Drawn length of the full route. */\r\n readonly ghostLength: number\r\n /** Drawn length of the grown part. */\r\n readonly grownLength: number\r\n /** Dots, in row order. */\r\n readonly dots: readonly BranchDot[]\r\n /**\r\n * Bloom at the grown path's endpoint, or NULL when no row carries the active\r\n * marker.\r\n *\r\n * Deliberately stricter than `grownPath`: the stem has to be *some* path even\r\n * when nothing is active (it collapses to the bare origin, drawing nothing),\r\n * but a bloom with no active row has nothing to be the flower OF. Falling back\r\n * to the first dot — the earlier rule — put the blossom on a folder row at the\r\n * top of the tree as soon as the open session's folder was collapsed, because\r\n * folding removes the only row carrying the marker. No active row means no\r\n * flower.\r\n */\r\n readonly flower: BranchFlower | null\r\n /** Total vertical extent, so the SVG box can be sized. */\r\n readonly height: number\r\n}\r\n\r\n/**\r\n * Internal: one move of the route, kept as STRUCTURE rather than only as a path\r\n * string. The endpoint trim below has to shorten the final move along its own\r\n * direction, which is only sound if the segment still knows where it goes.\r\n */\r\ninterface Segment {\r\n /** SVG path command for the full move. */\r\n readonly d: string\r\n /** Length the move contributes to the run. */\r\n readonly length: number\r\n /** Where the move starts. */\r\n readonly from: { readonly x: number; readonly y: number }\r\n /** Where the move ends. */\r\n readonly to: { readonly x: number; readonly y: number }\r\n /** Bulge x for a curved move (the curve is vertical-tangent at both ends). */\r\n readonly controlX?: number\r\n}\r\n\r\n/**\r\n * Plan the route: one segment per row after the first, plus the dot positions.\r\n *\r\n * Kept separate from the string assembly so the length walk and the SVG `d`\r\n * always describe the same geometry — measuring one path against another is how\r\n * a grown/ghost pair drifts out of sync.\r\n *\r\n * The stem lands on each row's OWN anchor (x) and centre (y), so uneven row\r\n * heights and the tree's per-row indents both stay exact. A group row's anchor\r\n * is pushed out by `BULGE_OFFSET`, which is what creates the kink.\r\n *\r\n * @param rows - visible rows in render order, carrying measured anchors.\r\n * @returns the per-row segments and dot x positions.\r\n */\r\nfunction plan(rows: readonly BranchRow[]): { segments: Segment[]; dotX: number[] } {\r\n const segments: Segment[] = []\r\n const first = rows[0] as BranchRow\r\n const dotX: number[] = [first.x]\r\n let x = first.x\r\n\r\n for (let i = 1; i < rows.length; i += 1) {\r\n const row = rows[i] as BranchRow\r\n const prev = rows[i - 1] as BranchRow\r\n const startY = prev.y\r\n const endY = row.y\r\n const midY = startY + (endY - startY) / 2\r\n\r\n // Every dot lands on its OWN anchor; the stem simply travels between them.\r\n // When two consecutive rows share an anchor (sessions under one project) the\r\n // travel is a straight run; when it changes (a folder's chevron sits left of\r\n // its children's dots) the stem swings out through an S-curve, which is what\r\n // reads as the branch stepping around the folder marker.\r\n const target = row.x\r\n\r\n if (target === x) {\r\n segments.push({\r\n d: `L ${x} ${endY}`,\r\n length: Math.abs(endY - startY),\r\n from: { x, y: startY },\r\n to: { x, y: endY },\r\n })\r\n } else {\r\n // Two halves so the tangent is vertical at both ends, matching the\r\n // reference's curve rhythm.\r\n segments.push({\r\n d: `C ${x} ${midY}, ${target} ${midY}, ${target} ${endY}`,\r\n length: Math.hypot(target - x, endY - midY),\r\n from: { x, y: startY },\r\n to: { x: target, y: endY },\r\n controlX: x,\r\n })\r\n x = target\r\n }\r\n dotX.push(x)\r\n }\r\n\r\n return { segments, dotX }\r\n}\r\n\r\n/**\r\n * How far short of the flower's centre the stem stops, in SVG user units.\r\n *\r\n * The bloom is drawn ON the endpoint, so a stem that runs all the way to the\r\n * centre is visible through the petal notches and reads as a line crossing the\r\n * flower. Stopping the stroke at (a little over) the bloom's radius keeps the\r\n * stem ending cleanly at the flower's edge, where it reads as a stalk holding\r\n * the bloom.\r\n *\r\n * 7 units ≈ the 6.2-unit flower radius plus a hair, so the stroke's round cap\r\n * tucks just under the outer petals without a visible gap.\r\n */\r\nexport const STEM_END_CLEARANCE = 7\r\n\r\n/**\r\n * Shorten a move so it stops `clearance` short of its end point.\r\n *\r\n * Used only on the LAST move of the grown run, which is what hides the stroke\r\n * behind the bloom. A straight move is trimmed along its axis; a curved move is\r\n * trimmed by moving its end and its control point together, which shortens the\r\n * curve while keeping its vertical tangents (so the kink's shape is preserved\r\n * rather than being flattened into a line).\r\n *\r\n * Returns the move unchanged when it is too short to trim (the stem would\r\n * invert), so a cramped layout degrades to \"line meets flower\" rather than\r\n * producing a backwards path.\r\n *\r\n * @param segment - the move to shorten.\r\n * @param clearance - distance to stop short of the end.\r\n * @returns the shortened move.\r\n */\r\nfunction trimEnd(segment: Segment, clearance: number): Segment {\r\n const { from, to } = segment\r\n const span = Math.hypot(to.x - from.x, to.y - from.y)\r\n if (span <= clearance) return segment\r\n\r\n if (segment.controlX === undefined) {\r\n // Straight: retreat along the axis by the clearance.\r\n const ratio = (span - clearance) / span\r\n const endX = from.x + (to.x - from.x) * ratio\r\n const endY = from.y + (to.y - from.y) * ratio\r\n return { ...segment, d: `L ${endX} ${endY}`, to: { x: endX, y: endY }, length: span - clearance }\r\n }\r\n\r\n // Curved: the move is two mirrored halves, so retreating the END by half the\r\n // clearance and the control point by the full one shortens it symmetrically\r\n // while keeping both tangents vertical.\r\n const endY = to.y - clearance\r\n const controlY = from.y + (to.y - from.y) / 2 - clearance\r\n const endX = to.x\r\n return {\r\n ...segment,\r\n d: `C ${segment.controlX} ${controlY}, ${endX} ${controlY}, ${endX} ${endY}`,\r\n to: { x: endX, y: endY },\r\n length: Math.max(0, segment.length - clearance),\r\n }\r\n}\r\n\r\n/**\r\n * Build the branch for a list of rows.\r\n *\r\n * @param rows - visible rows in render order, each carrying its MEASURED centre.\r\n * @returns the branch geometry; empty strings when there are no rows.\r\n */\r\nexport function buildBranch(rows: readonly BranchRow[]): Branch {\r\n const first = rows[0]\r\n if (first === undefined) {\r\n return { ghostPath: '', grownPath: '', ghostLength: 0, grownLength: 0, dots: [], flower: null, height: 0 }\r\n }\r\n\r\n const { segments, dotX } = plan(rows)\r\n const head = `M ${first.x} ${first.y}`\r\n\r\n const dots: BranchDot[] = rows.map((row, index) => ({\r\n key: row.key,\r\n cx: dotX[index] ?? row.x,\r\n cy: row.y,\r\n active: row.active,\r\n }))\r\n\r\n // The grown stroke stops AT the active row, so its path contains every\r\n // segment before that row and none after. An active first row grows nothing\r\n // beyond the origin, which is correct (the dot sits on the stem origin).\r\n //\r\n // `activeIndex < 0` is the NO-ACTIVE-ROW case: the open session's folder was\r\n // collapsed, or the catalog has not resolved yet. The stem then collapses to\r\n // the bare origin (drawing nothing), and — crucially — `hasActive` stays false\r\n // so no flower is produced. Conflating this with \"the first row is active\" is\r\n // what used to sprout the blossom on a top-level folder row.\r\n const activeIndex = rows.findIndex(row => row.active)\r\n const hasActive = activeIndex >= 0\r\n const grownTo = hasActive ? activeIndex : 0\r\n\r\n // The bloom sits on the endpoint of `grownPath`, which `join` puts at the\r\n // active row. It therefore uses the SAME index as the grown stroke, so the\r\n // flower and the stem can never disagree about where the branch ends — and it\r\n // exists ONLY when a row actually claimed the marker.\r\n const flowerAt = dots[grownTo] as BranchDot | undefined\r\n const flower: BranchFlower | null = hasActive && flowerAt !== undefined\r\n ? { key: flowerAt.key, cx: flowerAt.cx, cy: flowerAt.cy }\r\n : null\r\n\r\n const join = (list: readonly Segment[]): string =>\r\n list.length === 0 ? head : [head, ...list.map(s => s.d)].join(' ')\r\n\r\n // The grown run: every move before the active row, plus the move INTO it —\r\n // which is the one trimmed so the stroke stops at the bloom's edge instead of\r\n // crossing the flower. The GHOST keeps its full length: it is a faint dashed\r\n // route at 28% opacity, and shortening it too would leave the last row's\r\n // guide visibly detached from that row.\r\n const grownSegments = segments.slice(0, grownTo)\r\n const lastGrown = grownSegments[grownSegments.length - 1]\r\n const grownStroke = lastGrown === undefined\r\n ? grownSegments\r\n : [...grownSegments.slice(0, -1), trimEnd(lastGrown, STEM_END_CLEARANCE)]\r\n\r\n const lengthOf = (count: number): number =>\r\n segments.slice(0, count).reduce((sum, s) => sum + s.length, 0)\r\n\r\n const last = rows[rows.length - 1] as BranchRow\r\n // Half a row height of breathing room below the last dot, so the stem does not\r\n // stop dead on the final row.\r\n const tail = rows.length > 1 ? Math.abs(last.y - (rows[rows.length - 2] as BranchRow).y) / 2 : 0\r\n\r\n return {\r\n ghostPath: join(segments),\r\n grownPath: join(grownStroke),\r\n ghostLength: lengthOf(segments.length),\r\n // The grown length follows the TRIMMED run, so a consumer measuring the\r\n // stroke (a dash animation, say) stays consistent with what is drawn.\r\n grownLength: Math.max(0, lengthOf(grownTo) - (lastGrown === undefined ? 0 : STEM_END_CLEARANCE)),\r\n dots,\r\n flower,\r\n height: last.y + tail,\r\n }\r\n}\r\n","/**\r\n * The flower branch: an SVG overlay that draws one continuous curly stem down\r\n * the sidebar tree, growing to the row you are currently on.\r\n *\r\n * Ported from the RewampUI *Flower Sidebar* reference. The mechanism, verified\r\n * against that page's live DOM:\r\n *\r\n * - TWO paths share one `d` prefix: a **ghost** (dashed, faded) drawing the\r\n * whole route, and a **grown** solid stroke drawn only as far as the active\r\n * row. The grown one is what makes the branch look like it grew to you.\r\n * - A **dot per row**, sitting exactly on the curve.\r\n * - A **flower at the endpoint**: the stem grows into a bloom on the row you\r\n * are on, which is where the grown stroke stops. The bloom TURNS while that\r\n * session is working and rests when it is idle.\r\n * - The whole SVG is `pointer-events: none` and `overflow: visible`, so it is\r\n * pure decoration over the real rows and never intercepts a click.\r\n *\r\n * Measurement, not layout: the rows are rendered by the tree itself (they carry\r\n * drag handlers, menus and hover state), so this component reads each row's\r\n * vertical centre from the DOM and feeds plain numbers to `buildBranch`. That\r\n * keeps the geometry unit-tested (`branch.ts`) while the SVG stays a dumb\r\n * renderer of it.\r\n *\r\n * Re-measured on: row count changes (expand/collapse, new session), the active\r\n * row changing, and container resize. A `ResizeObserver` on the scroll body\r\n * covers the last one without a window listener.\r\n *\r\n * The bloom's spin is NOT re-measured here: it arrives as the `spinning` prop\r\n * and is applied as a class, so a status flip never re-runs the DOM measurement\r\n * above (the tree is the expensive part, not the class swap).\r\n */\r\nimport { useEffect, useMemo, useRef, useState } from 'react'\r\nimport { buildBranch, type Branch, type BranchRow } from './branch.ts'\r\n\r\n/**\r\n * Attribute the tree puts on every row the branch should connect. */\r\nexport const BRANCH_ROW_ATTRIBUTE = 'data-wg-branch-row'\r\n\r\n/**\r\n * Attribute marking the row the stem should grow to.\r\n *\r\n * Only the DEEPEST row gets this (the session). Its ancestors — the project and\r\n * the category that contain it — deliberately do NOT, because a session belongs\r\n * to both and marking all three would make \"which row is active?\" ambiguous.\r\n * When several rows do carry it, the deepest (last in document order) wins.\r\n */\r\nexport const BRANCH_ACTIVE_ATTRIBUTE = 'data-wg-branch-active'\r\n\r\n/** Row kind marker: a group boundary kinks the stem. */\r\nexport const BRANCH_GROUP_ATTRIBUTE = 'data-wg-branch-group'\r\n\r\n/**\r\n * The bloom's petal outline, in the 1024-unit box the artwork was drawn in.\r\n *\r\n * This is the user's own flower glyph verbatim: an eight-petal bloom around a\r\n * ringed center. Kept as a path (not a component) because it is a constant.\r\n */\r\nconst FLOWER_PATH = 'M375.3728 841.8432c92.96-12.5184 203.8784-71.264 299.5456-166.9248 22.6112-22.6112 43.1616-46.08 61.5232-69.952C712.7616 786.3936 621.2608 921.6 512 921.6c-51.1488 0-98.4-29.632-136.6272-79.7568z m-87.808-422.8096C311.2384 237.6064 402.7328 102.4 512 102.4c51.1488 0 98.4 29.632 136.6272 79.7568-92.96 12.5184-203.8784 71.264-299.5456 166.9248a719.1232 719.1232 0 0 0-61.5232 69.952z m-129.536 139.5648c57.3248 74.2464 163.6608 140.9344 294.336 175.9488a719.1232 719.1232 0 0 0 91.3472 18.304c-168.9664 70.208-331.808 58.5728-386.432-36.0512-25.5744-44.288-23.5456-100.032 0.7552-158.2016z m322.2592-287.4496c168.9664-70.208 331.808-58.5728 386.432 36.0512 25.5744 44.288 23.5456 100.032-0.7552 158.2016-57.3184-74.2464-163.648-140.9344-294.336-175.9488a719.1232 719.1232 0 0 0-91.3408-18.304zM294.656 228.7552c-35.6352 86.7648-40.224 212.1984-5.2032 342.8736a719.1232 719.1232 0 0 0 29.8176 88.256C173.9904 548.6592 102.6432 401.824 157.2736 307.2c25.5744-44.288 74.8608-70.4 137.3824-78.4448z m410.0736 135.36c145.28 111.2256 216.6272 258.0608 161.9968 352.6848-25.5744 44.288-74.8608 70.4-137.3824 78.4448 35.6352-86.7648 40.224-212.1984 5.2032-342.8736a719.1232 719.1232 0 0 0-29.8176-88.256zM512 678.4c-88.3648 0-160-71.6352-160-160s71.6352-160 160-160 160 71.6352 160 160-71.6352 160-160 160z m0-83.2c42.4128 0 76.8-34.3872 76.8-76.8s-34.3872-76.8-76.8-76.8-76.8 34.3872-76.8 76.8 34.3872 76.8 76.8 76.8z'\r\n\r\n/** Petal colour: the accent the glyph was drawn in. */\r\nconst FLOWER_PETAL = '#fa541c'\r\n\r\n/**\r\n * Rendered size of the bloom, as a scale factor over the authored 1024 box.\r\n *\r\n * 17 / 1024 ≈ 0.0166 puts the flower at ~17px: clear of neighbouring rows (rows\r\n * are 28px tall) while still reading as a flower rather than a dot at the end of\r\n * the stem.\r\n */\r\nconst FLOWER_SCALE = 17 / 1024\r\n\r\n/**\r\n * Centre of the artwork inside its own 1024-unit box, measured from the path.\r\n *\r\n * Both the recentring AND the rotation are expressed with this ONE pair of user\r\n * units, so neither depends on a percentage or on a reference box. Verified\r\n * against the live DOM: the path's own `getBBox()` centre is exactly (512, 512).\r\n */\r\nconst FLOWER_CENTRE = 512\r\n\r\n/**\r\n * The bloom at the branch's endpoint.\r\n *\r\n * Anchoring is done entirely by these transforms, in this order:\r\n *\r\n * 1. `translate(cx cy)` — put the origin on the stem's tip (the endpoint of\r\n * the grown stroke).\r\n * 2. `scale(FLOWER_SCALE)` — shrink the 1024-unit artwork about that origin.\r\n * 3. `translate(-512 -512)` — bring the glyph's own centre (512, 512) onto the\r\n * origin, so the flower is centred on the tip.\r\n *\r\n * The spin is applied by `wgFlowerArt` in CSS as a `rotate()` composed AFTER\r\n * that recentring (`translate(-512 -512) rotate(...)`), so the bloom turns about\r\n * its own centre and the recentring never drifts as it rotates.\r\n *\r\n * Note what is deliberately NOT used here: a percentage `translate(-50%, -50%)`\r\n * or `transform-box: fill-box` + percentage `transform-origin`. Measured on the\r\n * live page, the percentage form resolved against the SVG VIEWPORT rather than\r\n * the path's box, translating by (-24, -409.5) instead of (-373, -409.6) and\r\n * parking the bloom well right of the stem. Explicit user units remove the\r\n * question: 512 is the measured centre, not an inferred one.\r\n *\r\n * The flower rests while the session is idle and turns while it works: one\r\n * animation, paused rather than removed, so a state flip resumes the turn\r\n * instead of snapping the petals back to 0deg.\r\n *\r\n * @param props - endpoint coordinates and whether the session is working.\r\n * @returns the bloom group.\r\n */\r\nfunction Flower({ cx, cy, spinning }: { cx: number; cy: number; spinning: boolean }) {\r\n return (\r\n \r\n \r\n \r\n )\r\n}\r\n\r\n/**\r\n * Render the branch for the rows currently inside `scope`.\r\n * @param props - the element to measure, and whether the open session is working.\r\n * @returns the SVG overlay, or null until at least one row is measured.\r\n */\r\nexport function FlowerBranch({ scope, spinning }: { scope: HTMLElement | null; spinning: boolean }) {\r\n const [rows, setRows] = useState([])\r\n\r\n // A cheap change key: the caller cannot tell us when a row expanded, so we\r\n // watch the attribute count and the active row instead of diffing every node.\r\n const measureKey = useRef('')\r\n // The measured pixel pitch is per-list, not the module default: our rows are\r\n // 28/30px tall in places, and assuming 32 would drift the dots off the rows.\r\n const [branch, setBranch] = useState(null)\r\n\r\n useEffect(() => {\r\n if (scope === null) {\r\n setRows([])\r\n setBranch(null)\r\n return\r\n }\r\n\r\n const measure = (): void => {\r\n const nodes = Array.from(scope.querySelectorAll(`[${BRANCH_ROW_ATTRIBUTE}]`))\r\n const first = nodes[0]\r\n if (first === undefined) {\r\n if (measureKey.current !== '') {\r\n measureKey.current = ''\r\n setRows([])\r\n setBranch(null)\r\n }\r\n return\r\n }\r\n\r\n // Exactly one row carries the marker (the session); if a caller ever marks\r\n // several, the deepest wins so the stem still lands on a real leaf.\r\n const activeIndex = nodes.reduce(\r\n (found, node, index) => (node.hasAttribute(BRANCH_ACTIVE_ATTRIBUTE) ? index : found),\r\n -1,\r\n )\r\n const kinds = nodes.map(n => (n.hasAttribute(BRANCH_GROUP_ATTRIBUTE) ? 'group' : 'item')).join('')\r\n const key = `${nodes.length}|${activeIndex}|${kinds}|${Math.round(scope.clientWidth)}`\r\n if (key === measureKey.current) return\r\n measureKey.current = key\r\n\r\n // Each row carries its OWN measured anchor: y because the tree mixes row\r\n // heights, x because it indents per row via padding (a folder's chevron and\r\n // a session's text do not share an x).\r\n const measured: BranchRow[] = nodes.map((node, index) => ({\r\n key: `${index}`,\r\n y: center(node),\r\n x: anchorX(node),\r\n kind: node.hasAttribute(BRANCH_GROUP_ATTRIBUTE) ? 'group' : 'item',\r\n active: index === activeIndex,\r\n }))\r\n\r\n setRows(measured)\r\n setBranch(buildBranch(measured))\r\n }\r\n\r\n /** Vertical centre of a node, relative to the scope box. */\r\n function center(node: HTMLElement): number {\r\n const r = node.getBoundingClientRect()\r\n const s = (scope as HTMLElement).getBoundingClientRect()\r\n return r.top - s.top + r.height / 2\r\n }\r\n\r\n /**\r\n * Horizontal anchor of a row, relative to the scope box.\r\n *\r\n * A row with a chevron anchors to that triangle's CENTRE: it is the marker\r\n * the user already reads as \"this row opens\", so the stem hangs off it\r\n * instead of floating beside it. A chevron-less row (a session) has no\r\n * marker, so it anchors to where its own content starts — the status dot's\r\n * centre, which is the first thing in the row.\r\n */\r\n function anchorX(node: HTMLElement): number {\r\n const s = (scope as HTMLElement).getBoundingClientRect()\r\n const marker = node.querySelector('.wgChevron')\r\n ?? node.querySelector('[class*=\"wgStatusSlot\"]')\r\n ?? node.querySelector('[class*=\"wgCategoryIcon\"]')\r\n ?? node.querySelector('[class*=\"wgRowIcon\"]')\r\n const box = (marker ?? node).getBoundingClientRect()\r\n return box.left - s.left + box.width / 2\r\n }\r\n\r\n measure()\r\n\r\n // Row set changes (expand/collapse/new session) arrive as childList edits.\r\n const observer = new MutationObserver(measure)\r\n observer.observe(scope, { childList: true, subtree: true, attributes: true, attributeFilter: [BRANCH_ACTIVE_ATTRIBUTE] })\r\n\r\n // Width changes reflow row heights in the rail/wide layouts.\r\n const resizer = new ResizeObserver(measure)\r\n resizer.observe(scope)\r\n\r\n return () => {\r\n observer.disconnect()\r\n resizer.disconnect()\r\n }\r\n }, [scope])\r\n\r\n // Dots are rendered from the measured rows; keep the memo keyed on identity so\r\n // a re-render with the same branch does not rebuild the element list.\r\n const dots = useMemo(() => branch?.dots ?? [], [branch])\r\n // The endpoint dot gives way to the bloom.\r\n const flowerKey = branch?.flower?.key\r\n\r\n if (branch === null || rows.length === 0) return null\r\n\r\n return (\r\n \r\n \r\n \r\n {dots.map(dot => {\r\n // The bloom REPLACES the endpoint's dot rather than stacking on it: a\r\n // dot left underneath would show through the petals' notches and read\r\n // as a second, smaller flower.\r\n if (dot.key === flowerKey) return null\r\n return (\r\n \r\n )\r\n })}\r\n {branch.flower !== null && (\r\n \r\n )}\r\n \r\n )\r\n}\r\n","/**\r\n * The workspace-groups browsing region filling the sidebar shell's\r\n * `sidebar.workspaces` hole: section header (title + right-aligned search +\r\n * new-group + add workspace), the three-level tree (category → workspace →\r\n * session), group management dialogs, and the workspace/session dialogs. Wide\r\n * state renders the full browser; rail state renders the two region icons\r\n * (search / add workspace) as 36px controls on the shell's shared rail entry\r\n * path, each requesting expansion through the owner share.\r\n *\r\n * Data: workspaces/sessions via the framework global hooks; grouping config\r\n * via the host half's `/workspace-groups/config` route (refetched on mount).\r\n * Runtime group management (create/rename/delete any group, drag workspaces\r\n * between groups and into position, drag groups into position) persists\r\n * through `PUT /workspace-groups/manual`; the sidecar YAML is never rewritten\r\n * (rule-group rename/delete ride the overlay `renamed`/`hidden` maps).\r\n */\r\nimport { useEffect, useMemo, useRef, useState, type DragEvent } from 'react'\r\nimport {\r\n Button,\r\n IconCloseFillMedium,\r\n IconFolderOpenOutlineRegular,\r\n IconProjectAddOutlineRegular,\r\n IconSearchOutlineRegular,\r\n IconWarningOutlineRegular,\r\n Modal,\r\n Toast,\r\n Tooltip,\r\n} from '@deepseek-ai/dsh-client-ui-primitives'\r\nimport type { SessionId } from '@deepseek-ai/dsh-session/types'\r\nimport type { SessionListState, SessionSearchResultItem } from '@deepseek-ai/dsh-api-session-controller/client'\r\nimport type { WorkspaceId, WorkspaceView } from '@deepseek-ai/dsh-api-workspace-controller/client'\r\nimport type { SessionStatusSnapshot } from '@deepseek-ai/dsh-client-ui-session/client'\r\nimport {\r\n displayCategoryKeys,\r\n moveAfter,\r\n moveBefore,\r\n originalRuleNameForDisplay,\r\n resolveCategory,\r\n takenCategoryNames,\r\n} from '../core/matcher.ts'\r\nimport { TOP_LEVEL_ORDER_KEY, UNCATEGORIZED_LABEL, type GroupsConfig, type ManualGroups } from '../core/types.ts'\r\nimport type { GroupsBrowserProps } from './contract.ts'\r\nimport { deriveGroups, deriveSearchGroups, deriveSearchMatches, deriveTopLevel, currentSessionId, UNCATEGORIZED_KEY, type CategoryNode, type WorkspaceGroupNode } from './tree.ts'\r\nimport { CategoryRow, DND_CATEGORY_TYPE, DND_WORKSPACE_TYPE, hasPluginDragType, SessionRow, TreeChildren, WorkspaceRow } from './rows.tsx'\r\nimport { fetchOpenInApps, folderAppId, openPathInApp } from './open-folder.ts'\r\nimport { QuickPanel } from './QuickPanel.tsx'\r\nimport { SessionTabs } from './SessionTabs.tsx'\r\nimport { FlowerBranch } from './FlowerBranch.tsx'\r\nimport css from './styles.css?inline'\r\n\r\nconst SEARCH_DEBOUNCE_MS = 250\r\nconst SEARCH_QUERY_MAX_CODE_UNITS = 500\r\n\r\n/** Overlay with every optional field materialized (plain-object edits, no undefined spreads). */\r\ntype NormalizedManual = Required\r\n\r\nconst EMPTY_MANUAL: NormalizedManual = {\r\n categories: [], assignments: {}, categoryOrder: [], workspaceOrder: {}, renamed: {}, hidden: [],\r\n}\r\n\r\n/** Materialize optional overlay fields so every update is a plain object edit. */\r\nfunction normalizeManual(manual: ManualGroups): NormalizedManual {\r\n return {\r\n categories: manual.categories,\r\n assignments: manual.assignments,\r\n categoryOrder: manual.categoryOrder ?? [],\r\n workspaceOrder: manual.workspaceOrder ?? {},\r\n renamed: manual.renamed ?? {},\r\n hidden: manual.hidden ?? [],\r\n }\r\n}\r\n\r\nfunction sanitizeSearchQuery(value: string): string {\r\n const withoutNul = value.replaceAll('\\0', '')\r\n if (withoutNul.length <= SEARCH_QUERY_MAX_CODE_UNITS) return withoutNul\r\n return withoutNul.slice(0, SEARCH_QUERY_MAX_CODE_UNITS)\r\n}\r\n\r\n/** Immutable membership toggle for the local expand-all array. */\r\nfunction toggled(list: readonly string[], key: string): string[] {\r\n return list.includes(key) ? list.filter(k => k !== key) : [...list, key]\r\n}\r\n\r\ninterface RemoteSearchState {\r\n query: string\r\n status: 'idle' | 'loading' | 'ready' | 'error'\r\n items: readonly SessionSearchResultItem[]\r\n hasMore: boolean\r\n}\r\n\r\n/** Light runtime guard for the manual overlay attached to the config fetch. */\r\nfunction isManualGroups(value: unknown): value is ManualGroups {\r\n if (typeof value !== 'object' || value === null) return false\r\n const candidate = value as { categories?: unknown; assignments?: unknown }\r\n return Array.isArray(candidate.categories) && typeof candidate.assignments === 'object' && candidate.assignments !== null\r\n}\r\n\r\n/** Minimal fetch of the grouping config + runtime overlay (no-cache revalidation). */\r\nasync function fetchGroupsConfig(): Promise<{ config: GroupsConfig; manual: NormalizedManual }> {\r\n const response = await fetch('/workspace-groups/config', { cache: 'no-cache' })\r\n if (!response.ok) throw new Error(`config request failed: ${response.status}`)\r\n const body = (await response.json()) as GroupsConfig\r\n const config: GroupsConfig = Array.isArray(body.categories) ? body : { categories: [] }\r\n return { config, manual: isManualGroups(body.manual) ? normalizeManual(body.manual) : EMPTY_MANUAL }\r\n}\r\n\r\n/** Persist the whole runtime overlay (idempotent; the host validates + writes). */\r\nasync function saveManualOverlay(manual: ManualGroups): Promise {\r\n const response = await fetch('/workspace-groups/manual', {\r\n method: 'PUT',\r\n headers: { 'Content-Type': 'application/json' },\r\n body: JSON.stringify(manual),\r\n })\r\n if (!response.ok) {\r\n let message = `manual save failed: ${response.status}`\r\n try {\r\n const text = await response.text()\r\n if (text !== '') message = text\r\n } catch { /* keep the fallback message */ }\r\n throw new Error(message)\r\n }\r\n}\r\n\r\n/** One group-management dialog state: create, or rename an existing group. */\r\ntype GroupDialogState = { mode: 'create' } | { mode: 'rename'; from: string } | null\r\n\r\n/** Row reference used by drop targets: which kind of row, which key. */\r\nexport type DropRowRef = { kind: 'category' | 'workspace' | 'topLevel'; key: string }\r\n\r\n/**\r\n * Which level's rows fold while a drag is in progress: dragging a project\r\n * folds every project row (grouped AND top-level), dragging a group folds\r\n * every group row. The other level keeps its expansion untouched.\r\n */\r\nexport type DragLevel = 'workspace' | 'category' | null\r\n\r\n/**\r\n * Current drop indicator. A `line` renders a 2px insertion line above/below a\r\n * row (project reorder inside a group, or group reorder); an `into` renders\r\n * the whole-row highlight used when dropping a project into a group. Drop\r\n * handlers re-derive before/after from the drop event itself, so the\r\n * indicator is purely visual and can never go stale.\r\n */\r\nexport type DragIndicator =\r\n | { mode: 'line'; row: DropRowRef; before: boolean }\r\n | { mode: 'into'; categoryKey: string }\r\n | null\r\n\r\n/**\r\n * Render the browsing region.\r\n * @param props - composed slot props (shell owner share + store + injected actions).\r\n * @returns the region element tree.\r\n */\r\nexport function GroupsBrowser({\r\n wide,\r\n expandSidebar,\r\n useSessions,\r\n useWorkspaces,\r\n useSessionStatus,\r\n useStore,\r\n actions,\r\n startSession,\r\n open,\r\n renameSession,\r\n forkSession,\r\n renameWorkspace,\r\n deleteWorkspace,\r\n insertWorkspaceBefore,\r\n archiveSession,\r\n insertSessionBefore,\r\n createWorkspace,\r\n pickDirectory,\r\n searchSessions,\r\n searchResultLimit,\r\n openTab,\r\n useTabs,\r\n tabActions,\r\n t,\r\n}: GroupsBrowserProps) {\r\n // Inject the stylesheet once per fiber; dispose removes it (HMR safe).\r\n useEffect(() => {\r\n const style = document.createElement('style')\r\n style.setAttribute('data-plugin', 'dsh-workspace-groups')\r\n style.textContent = css\r\n document.head.append(style)\r\n return () => { style.remove() }\r\n }, [])\r\n\r\n // Ctrl+R toggles the quick switch panel. Capture phase + preventDefault:\r\n // beats the browser's page-reload default and any shell-level handler.\r\n const [quickOpen, setQuickOpen] = useState(false)\r\n useEffect(() => {\r\n const onKeyDown = (e: KeyboardEvent): void => {\r\n if (e.ctrlKey && !e.altKey && !e.metaKey && !e.shiftKey && (e.key === 'r' || e.key === 'R')) {\r\n e.preventDefault()\r\n e.stopPropagation()\r\n setQuickOpen(v => !v)\r\n }\r\n }\r\n window.addEventListener('keydown', onKeyDown, true)\r\n return () => window.removeEventListener('keydown', onKeyDown, true)\r\n }, [])\r\n\r\n // Grouping config from the host route + the runtime manual overlay.\r\n const [config, setConfig] = useState({ categories: [] })\r\n const [manual, setManual] = useState(EMPTY_MANUAL)\r\n const [configError, setConfigError] = useState(null)\r\n const reloadConfig = () => {\r\n setConfigError(null)\r\n fetchGroupsConfig().then(({ config: nextConfig, manual: nextManual }) => {\r\n setConfig(nextConfig)\r\n setManual(nextManual)\r\n }).catch((reason: unknown) => {\r\n setConfigError(reason instanceof Error ? reason.message : String(reason))\r\n })\r\n }\r\n useEffect(() => { reloadConfig() }, [])\r\n\r\n // Transient save errors for drag/menu group operations (dialog errors are local).\r\n const [manualError, setManualError] = useState(null)\r\n const [manualSaving, setManualSaving] = useState(false)\r\n\r\n const workspaces = useWorkspaces(state => state.items)\r\n const workspacePhase = useWorkspaces(state => state.phase)\r\n const archivedSessionIds = useWorkspaces(state => state.archivedSessionIds)\r\n const categoryExpansion = useStore(s => s.categoryExpansion)\r\n const workspaceExpansion = useStore(s => s.workspaceExpansion)\r\n\r\n const list = useSessions(s => s)\r\n const statuses = useSessionStatus(s => s)\r\n // 0.1.6: the selected Session is the one retained through `mainView`, not a\r\n // `list.current` field (the list snapshot carries catalog facts only).\r\n const current = currentSessionId(list)\r\n const currentWorkspaceKey = current === undefined\r\n ? undefined\r\n : (workspaces.find(w => w.sessionIds.includes(current as SessionId))?.workspaceId as string | undefined)\r\n\r\n // Whether the open session is WORKING right now, which is what makes the\r\n // flower at the branch's endpoint turn. Read from the unified status snapshot\r\n // (the catalog summary alone goes stale), folded together with the session's\r\n // own `running` so a subagent-only turn still counts.\r\n //\r\n // Derived as a boolean on purpose: the overlay re-measures through its own\r\n // MutationObserver, so handing it a live value would re-render the tree on\r\n // every status tick.\r\n const currentRunning = current !== undefined\r\n && ((statuses.get(current)?.running ?? false) || (list.byId[current]?.running ?? false))\r\n\r\n // Auto-expand the category + workspace containing the current session, but\r\n // ONLY when the user has never touched that key (`Object.hasOwn`): a\r\n // present `false` is a deliberate collapse and must stay folded. Without\r\n // this guard the effect re-expands the just-collapsed current category on\r\n // every store change (the reported \"cannot collapse\" bug).\r\n useEffect(() => {\r\n if (current === undefined || currentWorkspaceKey === undefined) return\r\n const category = categoriesForCurrent(config, workspaces, current, manual)\r\n if (category !== undefined && !Object.hasOwn(categoryExpansion, category)) {\r\n actions.setCategoryExpanded(category, true)\r\n }\r\n if (!Object.hasOwn(workspaceExpansion, currentWorkspaceKey)) {\r\n actions.setWorkspaceExpanded(currentWorkspaceKey, true)\r\n }\r\n }, [current, currentWorkspaceKey, config, workspaces, manual, categoryExpansion, workspaceExpansion, actions])\r\n\r\n // Drop expansion keys that no longer exist (group edits / workspace deletion).\r\n useEffect(() => {\r\n if (workspacePhase !== 'ready') return\r\n actions.retainKeys(\r\n displayCategoryKeys(config, manual),\r\n workspaces.map(w => w.workspaceId as string),\r\n )\r\n }, [actions, config, manual, workspacePhase, workspaces])\r\n\r\n // Session tabs: the strip lives in the conversation column, but its lifecycle\r\n // belongs here — the browser already derives the open session for its own tree,\r\n // so one effect covers every way a session can be opened (sidebar row,\r\n // workspace New Session, quick panel, conversation-header crumbs).\r\n //\r\n // `statuses` is a dependency on purpose: a session earns its tab when it\r\n // STARTS working, which is a status change, not a catalog change. Without it a\r\n // conversation that began while already open would never surface a tab.\r\n useEffect(() => {\r\n if (current === undefined) return\r\n openTab(current, statuses.get(current))\r\n }, [current, list, statuses, openTab])\r\n\r\n const [query, setQuery] = useState('')\r\n const [searchExpanded, setSearchExpanded] = useState(false)\r\n const normalizedQuery = sanitizeSearchQuery(query).trim()\r\n const [remoteSearch, setRemoteSearch] = useState({\r\n query: '', status: 'idle', items: [], hasMore: false,\r\n })\r\n const searchInput = useRef(null)\r\n const searchRoot = useRef(null)\r\n // Box the flower branch measures and paints into. Held as a ref (not state)\r\n // because the overlay re-measures on its own MutationObserver; a state update\r\n // here would re-render the whole tree on every layout tick.\r\n const branchScope = useRef(null)\r\n\r\n // Search debounce + abort, same posture as the official browser.\r\n useEffect(() => {\r\n if (normalizedQuery === '') {\r\n setRemoteSearch({ query: '', status: 'idle', items: [], hasMore: false })\r\n return\r\n }\r\n const controller = new AbortController()\r\n setRemoteSearch({ query: normalizedQuery, status: 'loading', items: [], hasMore: false })\r\n const timer = window.setTimeout(() => {\r\n searchSessions(normalizedQuery, controller.signal).then((result) => {\r\n if (controller.signal.aborted) return\r\n setRemoteSearch({ query: normalizedQuery, status: 'ready', items: result.items, hasMore: result.hasMore })\r\n }).catch(() => {\r\n if (controller.signal.aborted) return\r\n setRemoteSearch({ query: normalizedQuery, status: 'error', items: [], hasMore: false })\r\n })\r\n }, SEARCH_DEBOUNCE_MS)\r\n return () => {\r\n window.clearTimeout(timer)\r\n controller.abort()\r\n }\r\n }, [normalizedQuery, searchSessions])\r\n\r\n // Outside-click dismissal of the search box.\r\n useEffect(() => {\r\n if (!wide || !searchExpanded) return\r\n const onClick = (event: MouseEvent): void => {\r\n if (!(event.target instanceof Node) || searchRoot.current?.contains(event.target) === true) return\r\n searchInput.current?.blur()\r\n if (normalizedQuery !== '') return\r\n setSearchExpanded(false)\r\n }\r\n document.addEventListener('click', onClick)\r\n return () => { document.removeEventListener('click', onClick) }\r\n }, [normalizedQuery, wide, searchExpanded])\r\n\r\n const expandedCategories = useMemo(\r\n () => Object.entries(categoryExpansion).filter(([, v]) => v).map(([k]) => k),\r\n [categoryExpansion],\r\n )\r\n const expandedWorkspaces = useMemo(\r\n () => Object.entries(workspaceExpansion).filter(([, v]) => v).map(([k]) => k),\r\n [workspaceExpansion],\r\n )\r\n // Which level is being dragged: drives the top-level drop target (project\r\n // drags only) and which level's rows fold.\r\n const [dragging, setDragging] = useState(null)\r\n const groups = useMemo(\r\n () => deriveGroups(list, workspaces, archivedSessionIds, config, {\r\n expandedCategories,\r\n expandedWorkspaces,\r\n }, manual, statuses),\r\n [list, workspaces, archivedSessionIds, config, manual, statuses, expandedCategories, expandedWorkspaces],\r\n )\r\n // Top-level (ungrouped) workspace rows, rendered after the group folders.\r\n const topLevel = useMemo(\r\n () => deriveTopLevel(list, workspaces, archivedSessionIds, config, {\r\n expandedCategories,\r\n expandedWorkspaces,\r\n }, manual, statuses),\r\n [list, workspaces, archivedSessionIds, config, manual, statuses, expandedCategories, expandedWorkspaces],\r\n )\r\n // Quick panel (Ctrl+R): category label per grouped workspace id (the tree\r\n // derivation already resolved grouping; top-level workspaces stay absent).\r\n const categoryByWorkspace = useMemo(() => {\r\n const map = new Map()\r\n for (const category of groups) {\r\n for (const workspace of category.workspaces) map.set(workspace.workspaceId as string, category.label)\r\n }\r\n return map\r\n }, [groups])\r\n // While dragging a project, an empty top-level area must still show a landing\r\n // line — otherwise a project can never be dragged OUT of a group when every\r\n // project is currently grouped.\r\n const topLevelDropActive = dragging === 'workspace' && topLevel.length === 0\r\n // The top-level area is the move-out landing spot: rows reorder with an\r\n // insertion line (before/after), and the blank space below the last row\r\n // appends to the end of the list. No whole-area highlight box.\r\n const topLevelRef: DropRowRef = { kind: 'topLevel', key: UNCATEGORIZED_KEY }\r\n\r\n // Add workspace flow: self-contained (no directory-flow hole dependency).\r\n const [adding, setAdding] = useState(false)\r\n const [addError, setAddError] = useState(null)\r\n const [addErrorOpen, setAddErrorOpen] = useState(false)\r\n const addWorkspace = async (): Promise => {\r\n if (adding) return\r\n setAdding(true)\r\n setAddError(null)\r\n setAddErrorOpen(false)\r\n try {\r\n const path = await pickDirectory()\r\n if (path === null) return // cancelled\r\n const workspace = await createWorkspace({ path })\r\n startSession(workspace.workspaceId)\r\n } catch (reason) {\r\n const message = reason instanceof Error ? reason.message : String(reason)\r\n setAddError(message)\r\n setAddErrorOpen(true)\r\n } finally {\r\n setAdding(false)\r\n }\r\n }\r\n\r\n // Workspace rename dialog.\r\n const [renameTarget, setRenameTarget] = useState<{ workspaceId: WorkspaceId; currentTitle: string } | null>(null)\r\n const [renameDraft, setRenameDraft] = useState('')\r\n const [renaming, setRenaming] = useState(false)\r\n const [renameError, setRenameError] = useState(null)\r\n const renameTrimmed = renameDraft.trim()\r\n const renameDuplicate = renameTarget !== null && renameTrimmed !== '' && renameTrimmed !== renameTarget.currentTitle\r\n && workspaces.some(w => w.title === renameTrimmed)\r\n const renameBlocked = renaming || renameTrimmed === '' || renameTarget === null\r\n || renameTrimmed === renameTarget.currentTitle || renameDuplicate\r\n const confirmRename = () => {\r\n if (renameBlocked || renameTarget === null) return\r\n setRenaming(true)\r\n setRenameError(null)\r\n renameWorkspace(renameTarget.workspaceId, renameTrimmed).then(() => {\r\n setRenaming(false)\r\n setRenameTarget(null)\r\n }).catch((reason: unknown) => {\r\n setRenaming(false)\r\n setRenameError(reason instanceof Error ? reason.message : String(reason))\r\n })\r\n }\r\n\r\n // Workspace delete dialog.\r\n const [deleteTarget, setDeleteTarget] = useState<{ workspaceId: WorkspaceId; title: string } | null>(null)\r\n const [deleting, setDeleting] = useState(false)\r\n const [deleteError, setDeleteError] = useState(null)\r\n const confirmDelete = () => {\r\n if (deleting || deleteTarget === null) return\r\n setDeleting(true)\r\n setDeleteError(null)\r\n deleteWorkspace(deleteTarget.workspaceId).then(() => {\r\n setDeleting(false)\r\n setDeleteTarget(null)\r\n }).catch((reason: unknown) => {\r\n setDeleting(false)\r\n setDeleteError(reason instanceof Error ? reason.message : String(reason))\r\n })\r\n }\r\n\r\n // Session rename dialog.\r\n const [sessionRenameTarget, setSessionRenameTarget] = useState<{ sessionId: SessionId; currentTitle: string } | null>(null)\r\n const [sessionRenameDraft, setSessionRenameDraft] = useState('')\r\n const [sessionRenaming, setSessionRenaming] = useState(false)\r\n const [sessionRenameError, setSessionRenameError] = useState(null)\r\n const sessionRenameTrimmed = sessionRenameDraft.trim()\r\n const sessionRenameBlocked = sessionRenaming || sessionRenameTrimmed === '' || sessionRenameTarget === null\r\n const confirmSessionRename = () => {\r\n if (sessionRenameBlocked || sessionRenameTarget === null) return\r\n setSessionRenaming(true)\r\n setSessionRenameError(null)\r\n renameSession(sessionRenameTarget.sessionId, sessionRenameTrimmed).then(() => {\r\n setSessionRenaming(false)\r\n setSessionRenameTarget(null)\r\n }).catch((reason: unknown) => {\r\n setSessionRenaming(false)\r\n setSessionRenameError(reason instanceof Error ? reason.message : String(reason))\r\n })\r\n }\r\n const onSessionRename = (sessionId: SessionId, currentTitle: string) => {\r\n setSessionRenameTarget({ sessionId, currentTitle })\r\n setSessionRenameDraft(currentTitle)\r\n setSessionRenameError(null)\r\n }\r\n\r\n // The strip is a child of this component (rendered through a DOM portal), so\r\n // it shares this fiber's props directly: renames call the dialog owner here,\r\n // and activation goes through the same navigation verb the sidebar rows use.\r\n const activateTab = (sessionId: SessionId) => { open(sessionId) }\r\n\r\n const onSessionArchive = (sessionId: SessionId) => {\r\n archiveSession(sessionId).catch((reason: unknown) => {\r\n console.warn('session archive rejected:', reason)\r\n })\r\n }\r\n\r\n // \"Open in folder\": the host half of the official open-in-app plugin resolves\r\n // which applications it can launch; the project row then just posts the\r\n // project directory to that host's launch route. One availability read per\r\n // mount — a host without the capability (or a refused read) leaves\r\n // `folderApp` undefined, which drops the menu entry rather than failing.\r\n const [folderApp, setFolderApp] = useState(undefined)\r\n const [folderError, setFolderError] = useState<{ id: number; text: string } | null>(null)\r\n useEffect(() => {\r\n const controller = new AbortController()\r\n fetchOpenInApps(controller.signal).then((apps) => {\r\n if (controller.signal.aborted) return\r\n setFolderApp(folderAppId(apps))\r\n }).catch(() => { /* no capability: the row simply offers no folder entry */ })\r\n return () => { controller.abort() }\r\n }, [])\r\n\r\n const openInFolder = folderApp === undefined\r\n ? undefined\r\n : (workspaceId: WorkspaceId): void => {\r\n const workspace = workspaces.find(w => w.workspaceId === workspaceId)\r\n if (workspace === undefined) return\r\n openPathInApp(folderApp, workspace.path).catch((reason: unknown) => {\r\n const detail = reason instanceof Error ? reason.message : String(reason)\r\n setFolderError({ id: Date.now(), text: `${t('workspace.openInFolderError')}: ${detail}` })\r\n })\r\n }\r\n\r\n // ---- Runtime group management ----------------------------------------------\r\n\r\n const [groupDialog, setGroupDialog] = useState(null)\r\n const [groupDraft, setGroupDraft] = useState('')\r\n const [groupError, setGroupError] = useState(null)\r\n const [groupBusy, setGroupBusy] = useState(false)\r\n const [groupDeleteTarget, setGroupDeleteTarget] = useState(null)\r\n const [groupDeleting, setGroupDeleting] = useState(false)\r\n const [groupDeleteError, setGroupDeleteError] = useState(null)\r\n\r\n const takenNames = useMemo(() => takenCategoryNames(config, manual), [config, manual])\r\n\r\n const groupTrimmed = groupDraft.trim()\r\n const groupNameIssue = groupDialog !== null && groupTrimmed !== ''\r\n ? (groupTrimmed === UNCATEGORIZED_LABEL\r\n ? t('group.nameReserved')\r\n : (groupDialog.mode === 'rename' && groupTrimmed === groupDialog.from)\r\n ? null\r\n : takenNames.has(groupTrimmed) ? t('group.nameDuplicate') : null)\r\n : null\r\n const groupBlocked = groupBusy || groupTrimmed === '' || groupNameIssue !== null\r\n || (groupDialog !== null && groupDialog.mode === 'rename' && groupTrimmed === groupDialog.from)\r\n\r\n const confirmGroupDialog = () => {\r\n if (groupBlocked || groupDialog === null) return\r\n const name = groupTrimmed\r\n const from = groupDialog.mode === 'rename' ? groupDialog.from : undefined\r\n const renaming = groupDialog.mode === 'rename' && from !== name\r\n\r\n let next: NormalizedManual\r\n if (groupDialog.mode === 'create') {\r\n next = { ...manual, categories: [...manual.categories, name] }\r\n } else {\r\n // Rename: rule groups ride the `renamed` map, manual groups the list;\r\n // every reference (assignments / workspaceOrder / categoryOrder) follows.\r\n const originalRule = from !== undefined ? originalRuleNameForDisplay(config.categories, manual, from) : undefined\r\n next = {\r\n ...manual,\r\n ...(originalRule !== undefined\r\n ? { renamed: { ...manual.renamed, [originalRule]: name } }\r\n : { categories: manual.categories.map(c => c === from ? name : c) }),\r\n assignments: Object.fromEntries(\r\n Object.entries(manual.assignments).map(([id, category]): [string, string | null] => [id, category === from ? name : category]),\r\n ),\r\n workspaceOrder: Object.fromEntries(\r\n Object.entries(manual.workspaceOrder).map(([key, ids]): [string, string[]] => [key === from ? name : key, ids]),\r\n ),\r\n categoryOrder: manual.categoryOrder.map(key => key === from ? name : key),\r\n }\r\n }\r\n\r\n setGroupBusy(true)\r\n setGroupError(null)\r\n saveManualOverlay(next).then(() => {\r\n setManual(next)\r\n setManualError(null)\r\n setGroupBusy(false)\r\n setGroupDialog(null)\r\n setGroupDraft('')\r\n // Keep the renamed group open (its old expansion key is dropped by retainKeys).\r\n if (renaming) actions.setCategoryExpanded(name, true)\r\n }).catch((reason: unknown) => {\r\n setGroupBusy(false)\r\n setGroupError(reason instanceof Error ? reason.message : String(reason))\r\n })\r\n }\r\n\r\n const confirmGroupDelete = () => {\r\n if (groupDeleting || groupDeleteTarget === null) return\r\n const name = groupDeleteTarget\r\n const originalRule = originalRuleNameForDisplay(config.categories, manual, name)\r\n\r\n // Every project currently in the group goes to 未分类 (forced, not rule-\r\n // reclassified), regardless of how it landed there.\r\n const assignments = { ...manual.assignments }\r\n for (const workspace of workspaces) {\r\n if (resolveCategory(config, manual, workspace.workspaceId, workspace.path, workspace.title) === name) {\r\n assignments[workspace.workspaceId] = null\r\n }\r\n }\r\n const workspaceOrder = Object.fromEntries(\r\n Object.entries(manual.workspaceOrder).filter(([key]) => key !== name),\r\n )\r\n const next: NormalizedManual = {\r\n ...manual,\r\n assignments,\r\n workspaceOrder,\r\n categoryOrder: manual.categoryOrder.filter(key => key !== name),\r\n ...(originalRule !== undefined\r\n ? {\r\n renamed: Object.fromEntries(Object.entries(manual.renamed).filter(([key]) => key !== originalRule)),\r\n hidden: [...manual.hidden, originalRule],\r\n }\r\n : { categories: manual.categories.filter(c => c !== name) }),\r\n }\r\n\r\n setGroupDeleting(true)\r\n setGroupDeleteError(null)\r\n saveManualOverlay(next).then(() => {\r\n setManual(next)\r\n setManualError(null)\r\n setGroupDeleting(false)\r\n setGroupDeleteTarget(null)\r\n }).catch((reason: unknown) => {\r\n setGroupDeleting(false)\r\n setGroupDeleteError(reason instanceof Error ? reason.message : String(reason))\r\n })\r\n }\r\n\r\n // ---- Drag & drop (move/reorder workspaces, reorder groups) ------------------\r\n\r\n const [dragIndicator, setDragIndicator] = useState(null)\r\n\r\n // Expansion state taken at dragstart; dragend restores it so the folding\r\n // caused by a drag is always undone afterwards (\"结束后恢复\").\r\n const expansionSnapshot = useRef<{ categories: Record; workspaces: Record } | null>(null)\r\n // Live expansion state for the dragend restore (the document-level listener\r\n // is registered once, so it must read current values through a ref).\r\n const liveExpansionRef = useRef({ categoryExpansion, workspaceExpansion, actions })\r\n liveExpansionRef.current = { categoryExpansion, workspaceExpansion, actions }\r\n\r\n // Cancel any stale indicator when a drag ends outside a row (or is aborted),\r\n // and restore the expansion snapshot taken at dragstart.\r\n useEffect(() => {\r\n const clear = () => {\r\n setDragIndicator(null)\r\n setDragging(null)\r\n const snapshot = expansionSnapshot.current\r\n if (snapshot === null) return\r\n expansionSnapshot.current = null\r\n const { categoryExpansion: currentCategories, workspaceExpansion: currentWorkspaces, actions: currentActions } = liveExpansionRef.current\r\n for (const [key, value] of Object.entries(snapshot.categories)) {\r\n if (currentCategories[key] !== value) currentActions.setCategoryExpanded(key, value)\r\n }\r\n for (const [key, value] of Object.entries(snapshot.workspaces)) {\r\n if (currentWorkspaces[key] !== value) currentActions.setWorkspaceExpanded(key, value)\r\n }\r\n }\r\n document.addEventListener('dragend', clear)\r\n return () => { document.removeEventListener('dragend', clear) }\r\n }, [])\r\n\r\n /** Move a workspace into a category (or reorder inside it when `beforeWorkspaceId`/`afterWorkspaceId`). */\r\n const moveWorkspaceTo = async (workspaceId: string, categoryKey: string, beforeWorkspaceId?: string, afterWorkspaceId?: string): Promise => {\r\n if (manualSaving) return\r\n const workspace = workspaces.find(w => w.workspaceId === workspaceId)\r\n if (workspace === undefined) return\r\n setManualSaving(true)\r\n try {\r\n let next: NormalizedManual\r\n if (categoryKey === UNCATEGORIZED_KEY) {\r\n // Move to the TOP LEVEL: force ungrouped (null) and drop from every\r\n // group's order list, while recording the position inside the ordered\r\n // top-level list (`workspaceOrder[TOP_LEVEL_ORDER_KEY]`).\r\n const assignments = { ...manual.assignments, [workspaceId]: null }\r\n const workspaceOrder: Record = {}\r\n for (const [key, ids] of Object.entries(manual.workspaceOrder)) {\r\n if (key === TOP_LEVEL_ORDER_KEY) continue\r\n workspaceOrder[key] = ids.filter(id => id !== workspaceId)\r\n }\r\n const topLevelIds = workspaces\r\n .filter(w => w.workspaceId !== workspaceId && resolveCategory(config, manual, w.workspaceId, w.path, w.title) === undefined)\r\n .map(w => w.workspaceId as string)\r\n workspaceOrder[TOP_LEVEL_ORDER_KEY] = afterWorkspaceId !== undefined\r\n ? moveAfter(topLevelIds, workspaceId, afterWorkspaceId)\r\n : moveBefore(topLevelIds, workspaceId, beforeWorkspaceId)\r\n next = { ...manual, assignments, workspaceOrder }\r\n } else {\r\n const currentKey = resolveCategory(config, manual, workspaceId, workspace.path, workspace.title)\r\n const movingAcross = currentKey !== categoryKey\r\n const assignments = movingAcross\r\n ? { ...manual.assignments, [workspaceId]: categoryKey }\r\n : manual.assignments\r\n const targetOrder = afterWorkspaceId !== undefined\r\n ? moveAfter(manual.workspaceOrder[categoryKey] ?? [], workspaceId, afterWorkspaceId)\r\n : moveBefore(manual.workspaceOrder[categoryKey] ?? [], workspaceId, beforeWorkspaceId)\r\n const workspaceOrder = { ...manual.workspaceOrder, [categoryKey]: targetOrder }\r\n if (movingAcross && currentKey !== undefined && workspaceOrder[currentKey] !== undefined) {\r\n workspaceOrder[currentKey] = workspaceOrder[currentKey]!.filter(id => id !== workspaceId)\r\n }\r\n next = { ...manual, assignments, workspaceOrder }\r\n }\r\n await saveManualOverlay(next)\r\n setManual(next)\r\n setManualError(null)\r\n if (categoryKey !== UNCATEGORIZED_KEY) actions.setCategoryExpanded(categoryKey, true)\r\n } catch (reason) {\r\n setManualError(reason instanceof Error ? reason.message : String(reason))\r\n } finally {\r\n setManualSaving(false)\r\n }\r\n }\r\n\r\n /** Reorder groups: move `draggedKey` before `beforeKey` or after `afterKey` (未分类 target = append). */\r\n const moveCategory = async (draggedKey: string, beforeKey?: string, afterKey?: string): Promise => {\r\n if (manualSaving || draggedKey === beforeKey || draggedKey === afterKey) return\r\n setManualSaving(true)\r\n try {\r\n const order = displayCategoryKeys(config, manual)\r\n const categoryOrder = afterKey !== undefined\r\n ? moveAfter(order, draggedKey, afterKey)\r\n : moveBefore(order, draggedKey, beforeKey)\r\n const next: NormalizedManual = { ...manual, categoryOrder }\r\n await saveManualOverlay(next)\r\n setManual(next)\r\n setManualError(null)\r\n } catch (reason) {\r\n setManualError(reason instanceof Error ? reason.message : String(reason))\r\n } finally {\r\n setManualSaving(false)\r\n }\r\n }\r\n\r\n /**\r\n * Drop on a row. The insertion point is re-derived from the drop event's\r\n * position (top half = before, bottom half = after), so it always matches\r\n * the indicator the user last saw — even when dragover and drop arrive in\r\n * the same tick.\r\n */\r\n const onDropRow = (categoryKey: string, row: DropRowRef) => (event: DragEvent): void => {\r\n event.preventDefault()\r\n // Keep the drop from bubbling to the enclosing top-level area (which is\r\n // also a move-out target): a row drop and the area-drop below it must not\r\n // both fire moveWorkspaceTo.\r\n event.stopPropagation()\r\n setDragIndicator(null)\r\n setDragging(null)\r\n const draggedCategory = event.dataTransfer.getData(DND_CATEGORY_TYPE)\r\n if (draggedCategory !== '') {\r\n // Group reorder: only category rows are targets (project rows fold\r\n // during group drags); before/after follows the drop position.\r\n const rect = (event.currentTarget as HTMLElement).getBoundingClientRect()\r\n const before = event.clientY < rect.top + rect.height / 2\r\n const beforeKey = row.kind === 'category' && before ? row.key : undefined\r\n const afterKey = row.kind === 'category' && !before ? row.key : undefined\r\n void moveCategory(draggedCategory, beforeKey, afterKey)\r\n return\r\n }\r\n const workspaceId = event.dataTransfer.getData(DND_WORKSPACE_TYPE) || event.dataTransfer.getData('text/plain')\r\n if (workspaceId === '') return\r\n if (row.kind === 'topLevel') {\r\n // Top-level row / top-level blank drop = move OUT of any group (forced\r\n // top-level, rules ignored) and set the position inside the ordered\r\n // top-level list. A row drop re-derives before/after from the drop\r\n // position; a bare area drop (key = UNCATEGORIZED_KEY) appends to the end.\r\n const rect = (event.currentTarget as HTMLElement).getBoundingClientRect()\r\n const before = event.clientY < rect.top + rect.height / 2\r\n const specificKey = row.key === UNCATEGORIZED_KEY ? undefined : row.key\r\n void moveWorkspaceTo(workspaceId, UNCATEGORIZED_KEY, before ? specificKey : undefined, !before ? specificKey : undefined)\r\n return\r\n }\r\n // Project move/reorder: a line on a project row = reorder before/after it;\r\n // dropping anywhere else in a category = move into the group (its end).\r\n const rect = (event.currentTarget as HTMLElement).getBoundingClientRect()\r\n const before = event.clientY < rect.top + rect.height / 2\r\n const beforeWsid = row.kind === 'workspace' && before ? row.key : undefined\r\n const afterWsid = row.kind === 'workspace' && !before ? row.key : undefined\r\n void moveWorkspaceTo(workspaceId, categoryKey, beforeWsid, afterWsid)\r\n }\r\n\r\n const onDragOverRow = (row: DropRowRef) => (event: DragEvent): void => {\r\n if (!hasPluginDragType(event.dataTransfer.types)) return\r\n const draggingCategory = Array.from(event.dataTransfer.types as Iterable).includes(DND_CATEGORY_TYPE)\r\n if (draggingCategory && row.kind !== 'category') return // group drags target category rows only\r\n event.preventDefault()\r\n // Keep a row's dragover from bubbling to the enclosing top-level area\r\n // (which would interpret it as the end-of-list landing).\r\n event.stopPropagation()\r\n event.dataTransfer.dropEffect = 'move'\r\n const rect = (event.currentTarget as HTMLElement).getBoundingClientRect()\r\n const before = event.clientY < rect.top + rect.height / 2\r\n if (draggingCategory || row.kind === 'workspace' || row.kind === 'topLevel') {\r\n // Group reorder (line on a category row), project reorder inside a\r\n // group (line on a project row), or top-level reorder (line on a\r\n // top-level project row).\r\n setDragIndicator(prev =>\r\n prev?.mode === 'line' && prev.row.kind === row.kind && prev.row.key === row.key && prev.before === before\r\n ? prev\r\n : { mode: 'line', row, before })\r\n } else {\r\n // Dropping a project INTO a group: whole-row highlight.\r\n setDragIndicator(prev =>\r\n prev?.mode === 'into' && prev.categoryKey === row.key ? prev : { mode: 'into', categoryKey: row.key })\r\n }\r\n }\r\n\r\n const onDragLeaveRow = (event: DragEvent): void => {\r\n if (event.currentTarget.contains(event.relatedTarget as Node | null)) return\r\n setDragIndicator(null)\r\n }\r\n\r\n /**\r\n * Drag over the TOP-LEVEL AREA's blank space (not on a row — rows stop\r\n * propagation). An insertion line shows the landing spot: empty top level →\r\n * a standalone line under the last group; non-empty → a line below the last\r\n * top-level row (end of the list).\r\n */\r\n const onDragOverTopLevelArea = (event: DragEvent): void => {\r\n if (!hasPluginDragType(event.dataTransfer.types)) return\r\n const draggingCategory = Array.from(event.dataTransfer.types as Iterable).includes(DND_CATEGORY_TYPE)\r\n if (draggingCategory) return // group drags never target the top-level area\r\n event.preventDefault()\r\n event.dataTransfer.dropEffect = 'move'\r\n const last = topLevel.length > 0 ? topLevel[topLevel.length - 1] : undefined\r\n if (last !== undefined) {\r\n setDragIndicator(prev =>\r\n prev?.mode === 'line' && prev.row.kind === 'topLevel' && prev.row.key === last.workspaceId && prev.before === false\r\n ? prev\r\n : { mode: 'line', row: { kind: 'topLevel', key: last.workspaceId }, before: false })\r\n } else {\r\n setDragIndicator(prev =>\r\n prev?.mode === 'line' && prev.row.kind === 'topLevel' && prev.row.key === topLevelRef.key && prev.before === false\r\n ? prev\r\n : { mode: 'line', row: topLevelRef, before: false })\r\n }\r\n }\r\n\r\n // While dragging a project, only PROJECT rows fold — every expanded\r\n // workspace collapses (inside groups AND top-level); group rows keep their\r\n // expansion so the user still sees where groups are. dragend restores the\r\n // snapshot taken here.\r\n const onDragStartWorkspace = (_workspaceId: string) => (): void => {\r\n setDragging('workspace')\r\n expansionSnapshot.current = {\r\n categories: { ...categoryExpansion },\r\n workspaces: { ...workspaceExpansion },\r\n }\r\n for (const key of Object.keys(workspaceExpansion)) {\r\n if (workspaceExpansion[key]) actions.setWorkspaceExpanded(key, false)\r\n }\r\n }\r\n\r\n // While dragging a group, only GROUP rows fold (their rows stay visible as\r\n // reorder targets); project rows keep their expansion. dragend restores the\r\n // snapshot taken here.\r\n const onDragStartCategory = (categoryKey: string) => (event: DragEvent): void => {\r\n event.dataTransfer.setData(DND_CATEGORY_TYPE, categoryKey)\r\n event.dataTransfer.effectAllowed = 'move'\r\n setDragging('category')\r\n expansionSnapshot.current = {\r\n categories: { ...categoryExpansion },\r\n workspaces: { ...workspaceExpansion },\r\n }\r\n for (const key of Object.keys(categoryExpansion)) {\r\n if (categoryExpansion[key]) actions.setCategoryExpanded(key, false)\r\n }\r\n }\r\n\r\n const now = Date.now()\r\n\r\n return (\r\n
\r\n {/* The tab strip portals itself into the conversation column's head seat,\r\n so its position here is irrelevant to where it appears; rendering it\r\n from this component is what keeps it on this fiber (and therefore on\r\n this store's single scope) while still reaching the other column. */}\r\n \r\n
\r\n {wide && {t('section.workspaces')}}\r\n {wide && (\r\n
\r\n { setSearchExpanded(true) }}\r\n >\r\n \r\n \r\n {searchExpanded && (\r\n { setQuery(sanitizeSearchQuery(e.target.value)) }}\r\n onKeyDown={(e) => {\r\n if (e.key !== 'Escape') return\r\n setQuery('')\r\n setSearchExpanded(false)\r\n }}\r\n />\r\n )}\r\n {searchExpanded && (\r\n {\r\n e.stopPropagation()\r\n setQuery('')\r\n setSearchExpanded(false)\r\n }}\r\n >\r\n \r\n \r\n )}\r\n
\r\n )}\r\n \r\n {\r\n setGroupDraft('')\r\n setGroupError(null)\r\n setGroupDialog({ mode: 'create' })\r\n }}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n {!wide && (\r\n
\r\n \r\n { setSearchExpanded(true); expandSidebar() }}\r\n >\r\n \r\n \r\n \r\n
\r\n )}\r\n\r\n
\r\n {configError !== null && (\r\n
{t('configUnavailable')}
\r\n )}\r\n {manualError !== null && (\r\n
{t('manual.saveError')}: {manualError}
\r\n )}\r\n {wide && normalizedQuery !== '' ? (\r\n \r\n ) : (\r\n /* The branch overlay lives beside the tree, not inside it: it measures\r\n the rows and paints behind them, so it must share their box without\r\n becoming a row itself (which would break role=\"tree\" semantics and\r\n the index-based measurement). */\r\n
\r\n \r\n
\r\n {groups.length === 0 && topLevel.length === 0 && !topLevelDropActive && (\r\n
{workspacePhase === 'ready' ? t('empty.noWorkspaces') : t('empty.none')}
\r\n )}\r\n {groups.map((category) => (\r\n { actions.setCategoryExpanded(category.key, !category.expanded) }}\r\n onToggleWorkspace={(key) => { actions.setWorkspaceExpanded(key, !workspaceExpansion[key]) }}\r\n onNewSession={startSession}\r\n onOpen={open}\r\n onRenameRequest={(workspaceId, title) => {\r\n setRenameTarget({ workspaceId, currentTitle: title })\r\n setRenameDraft(title)\r\n setRenameError(null)\r\n }}\r\n onDeleteRequest={(workspaceId, title) => {\r\n setDeleteTarget({ workspaceId, title })\r\n setDeleteError(null)\r\n }}\r\n onSessionRename={onSessionRename}\r\n onSessionArchive={onSessionArchive}\r\n onFork={forkSession}\r\n onGroupRename={() => {\r\n setGroupDraft(category.key)\r\n setGroupError(null)\r\n setGroupDialog({ mode: 'rename', from: category.key })\r\n }}\r\n onGroupDelete={() => {\r\n setGroupDeleteTarget(category.key)\r\n setGroupDeleteError(null)\r\n }}\r\n onMoveOut={(workspaceId) => { void moveWorkspaceTo(workspaceId, UNCATEGORIZED_KEY) }}\r\n onOpenInFolder={openInFolder}\r\n canMoveOut={(workspaceId) => {\r\n // The menu \"移出分组\" is offered for any project that\r\n // currently sits inside a group (rule-classified or manual) —\r\n // not just overridden ones. Top-level projects\r\n // (resolveCategory === undefined) don't need it.\r\n const workspace = workspaces.find(w => w.workspaceId === workspaceId)\r\n return workspace !== undefined\r\n && resolveCategory(config, manual, workspace.workspaceId, workspace.path, workspace.title) !== undefined\r\n }}\r\n />\r\n ))}\r\n {/* Top-level (ungrouped) workspaces, rendered after the group\r\n folders. While dragging a project the whole area is the\r\n move-out landing spot (a line shows the insert position;\r\n an empty top level shows a line under the last group). */}\r\n {(topLevel.length > 0 || topLevelDropActive) && (\r\n { actions.setWorkspaceExpanded(key, !workspaceExpansion[key]) }}\r\n onNewSession={startSession}\r\n onOpen={open}\r\n onRenameRequest={(workspaceId, title) => {\r\n setRenameTarget({ workspaceId, currentTitle: title })\r\n setRenameDraft(title)\r\n setRenameError(null)\r\n }}\r\n onDeleteRequest={(workspaceId, title) => {\r\n setDeleteTarget({ workspaceId, title })\r\n setDeleteError(null)\r\n }}\r\n onSessionRename={onSessionRename}\r\n onSessionArchive={onSessionArchive}\r\n onFork={forkSession}\r\n onOpenInFolder={openInFolder}\r\n />\r\n )}\r\n
\r\n
\r\n )}\r\n
\r\n\r\n {/* Group create / rename dialog */}\r\n { setGroupDialog(null) }}\r\n closeLabel={t('close')}\r\n title={groupDialog?.mode === 'rename' ? t('group.renameTitle') : t('group.createTitle')}\r\n footer={(\r\n <>\r\n \r\n \r\n \r\n )}\r\n >\r\n { setGroupDraft(e.target.value); setGroupError(null) }}\r\n onKeyDown={(e) => { if (e.key === 'Enter') confirmGroupDialog() }}\r\n />\r\n {groupNameIssue !== null &&
{groupNameIssue}
}\r\n {groupError !== null &&
{groupError}
}\r\n \r\n\r\n {/* Group delete dialog */}\r\n { setGroupDeleteTarget(null) }}\r\n closeLabel={t('close')}\r\n title={t('group.deleteTitle')}\r\n footer={(\r\n <>\r\n \r\n \r\n \r\n )}\r\n >\r\n
{t('group.deleteConfirm')}
\r\n {groupDeleteError !== null &&
{groupDeleteError}
}\r\n \r\n\r\n {/* Workspace rename dialog */}\r\n { setRenameTarget(null) }}\r\n closeLabel={t('close')}\r\n title={t('workspace.renameTitle')}\r\n footer={(\r\n <>\r\n \r\n \r\n \r\n )}\r\n >\r\n { setRenameDraft(e.target.value) }}\r\n onKeyDown={(e) => { if (e.key === \"Enter\") confirmRename() }}\r\n />\r\n {renameError !== null &&
{renameError}
}\r\n \r\n\r\n {/* Workspace delete dialog */}\r\n { setDeleteTarget(null) }}\r\n closeLabel={t('close')}\r\n title={t('workspace.deleteTitle')}\r\n footer={(\r\n <>\r\n \r\n \r\n \r\n )}\r\n >\r\n
{t('workspace.deleteConfirm')}
\r\n {deleteError !== null &&
{deleteError}
}\r\n \r\n\r\n {/* Session rename dialog */}\r\n { setSessionRenameTarget(null) }}\r\n closeLabel={t('close')}\r\n title={t('session.renameTitle')}\r\n footer={(\r\n <>\r\n \r\n \r\n \r\n )}\r\n >\r\n { setSessionRenameDraft(e.target.value) }}\r\n onKeyDown={(e) => { if (e.key === \"Enter\") confirmSessionRename() }}\r\n />\r\n {sessionRenameError !== null &&
{sessionRenameError}
}\r\n \r\n\r\n {/* Add workspace error dialog */}\r\n { setAddErrorOpen(false) }}\r\n closeLabel={t('close')}\r\n title={t('workspace.addErrorTitle')}\r\n footer={(\r\n <>\r\n \r\n \r\n \r\n )}\r\n >\r\n
{addError}
\r\n \r\n\r\n {/* \"Open in folder\" failure: transient banner, keyed per attempt so a\r\n repeat failure restarts the cycle. */}\r\n {folderError !== null && (\r\n }\r\n onDone={() => { setFolderError(null) }}\r\n />\r\n )}\r\n\r\n {/* Ctrl+R quick switch panel (conditionally mounted: fresh query per open). */}\r\n {quickOpen && (\r\n { setQuickOpen(false) }}\r\n list={list}\r\n workspaces={workspaces}\r\n archivedSessionIds={archivedSessionIds}\r\n categoryByWorkspace={categoryByWorkspace}\r\n current={current}\r\n startSession={startSession}\r\n openSession={open}\r\n now={now}\r\n t={t}\r\n />\r\n )}\r\n
\r\n )\r\n}\r\n\r\n/** Resolve the category label containing the current session (auto-expand helper). */\r\nfunction categoriesForCurrent(\r\n config: GroupsConfig,\r\n workspaces: readonly WorkspaceView[],\r\n current: SessionId,\r\n manual: ManualGroups,\r\n): string | undefined {\r\n const workspace = workspaces.find(w => w.sessionIds.includes(current))\r\n if (workspace === undefined) return undefined\r\n return resolveCategory(config, manual, workspace.workspaceId, workspace.path, workspace.title)\r\n}\r\n\r\n/** One category section: header row + expanded workspace folders. */\r\nfunction CategorySection({ category, current, now, t, dragIndicator, onDragOverRow, onDragLeaveRow, onDropRow, onDragStartCategory, onDragStartWorkspace, onToggleCategory, onToggleWorkspace, onNewSession, onOpen, onRenameRequest, onDeleteRequest, onSessionRename, onSessionArchive, onFork, onGroupRename, onGroupDelete, onMoveOut, canMoveOut, onOpenInFolder }: {\r\n category: CategoryNode\r\n current: SessionId | undefined\r\n now: number\r\n t: GroupsBrowserProps['t']\r\n dragIndicator: DragIndicator\r\n onDragOverRow: (row: DropRowRef) => (event: DragEvent) => void\r\n onDragLeaveRow: (event: DragEvent) => void\r\n /** Drop factory: bind the target category and the row kind (before/after re-derived at drop time). */\r\n onDropRow: (categoryKey: string, row: DropRowRef) => (event: DragEvent) => void\r\n onDragStartCategory: (event: DragEvent) => void\r\n onDragStartWorkspace: (workspaceId: WorkspaceId) => () => void\r\n onToggleCategory: () => void\r\n onToggleWorkspace: (key: string) => void\r\n onNewSession: (workspaceId?: WorkspaceId) => void\r\n onOpen: (sessionId: SessionId) => void\r\n onRenameRequest: (workspaceId: WorkspaceId, currentTitle: string) => void\r\n onDeleteRequest: (workspaceId: WorkspaceId, title: string) => void\r\n onSessionRename: (sessionId: SessionId, currentTitle: string) => void\r\n onSessionArchive: (sessionId: SessionId) => void\r\n onFork: (sessionId: SessionId) => void\r\n onGroupRename: () => void\r\n onGroupDelete: () => void\r\n onMoveOut: (workspaceId: WorkspaceId) => void\r\n canMoveOut: (workspaceId: WorkspaceId) => boolean\r\n /** Absent when the host resolved no folder application. */\r\n onOpenInFolder?: ((workspaceId: WorkspaceId) => void) | undefined\r\n}) {\r\n const categoryLine = dragIndicator?.mode === 'line' && dragIndicator.row.kind === 'category' && dragIndicator.row.key === category.key\r\n ? (dragIndicator.before ? 'before' : 'after')\r\n : undefined\r\n const categoryInto = dragIndicator?.mode === 'into' && dragIndicator.categoryKey === category.key\r\n return (\r\n
\r\n \r\n {category.expanded && (\r\n
\r\n {category.workspaces.map((workspace) => (\r\n
\r\n { onToggleWorkspace(workspace.workspaceId as string) }}\r\n onNewSession={() => { onNewSession(workspace.workspaceId) }}\r\n onRename={() => { onRenameRequest(workspace.workspaceId, workspace.label) }}\r\n onDelete={() => { onDeleteRequest(workspace.workspaceId, workspace.label) }}\r\n canMoveOut={canMoveOut(workspace.workspaceId)}\r\n onMoveOut={() => { onMoveOut(workspace.workspaceId) }}\r\n {...(onOpenInFolder !== undefined\r\n ? { onOpenInFolder: () => { onOpenInFolder(workspace.workspaceId) } }\r\n : {})}\r\n dropActive={false}\r\n {...(dragIndicator?.mode === 'line' && dragIndicator.row.kind === 'workspace' && dragIndicator.row.key === workspace.workspaceId\r\n ? { insertLine: dragIndicator.before ? 'before' : 'after' }\r\n : {})}\r\n onRowDragOver={onDragOverRow({ kind: 'workspace', key: workspace.workspaceId })}\r\n onRowDragLeave={onDragLeaveRow}\r\n onRowDrop={onDropRow(category.key, { kind: 'workspace', key: workspace.workspaceId })}\r\n onDragStartExtra={onDragStartWorkspace(workspace.workspaceId)}\r\n />\r\n {workspace.expanded && (\r\n \r\n {workspace.sessions.map((session) => (\r\n \r\n ))}\r\n \r\n )}\r\n
\r\n ))}\r\n
\r\n )}\r\n
\r\n )\r\n}\r\n\r\n/**\r\n * Top-level (ungrouped) workspace rows rendered after the group folders. While\r\n * a project drag is in progress the WHOLE top-level area is the move-out\r\n * landing spot, shown with an insertion LINE (not a highlight box):\r\n * - a top-level row reorders before/after it (line above/below, like a group);\r\n * - the blank space below the last row appends to the end (line below the\r\n * last row);\r\n * - an empty top level shows a standalone line under the last group folder.\r\n */\r\nfunction TopLevelSection({ topLevel, current, now, t, dragging, dragIndicator, topLevelRef, onDragOverRow, onDragOverTopLevelArea, onDragLeaveRow, onDropRow, onDragStartWorkspace, onToggleWorkspace, onNewSession, onOpen, onRenameRequest, onDeleteRequest, onSessionRename, onSessionArchive, onFork, onOpenInFolder }: {\r\n topLevel: readonly WorkspaceGroupNode[]\r\n current: SessionId | undefined\r\n now: number\r\n t: GroupsBrowserProps['t']\r\n /** A project drag is in progress (drives the empty-top-level landing line). */\r\n dragging: boolean\r\n dragIndicator: DragIndicator\r\n topLevelRef: DropRowRef\r\n onDragOverRow: (row: DropRowRef) => (event: DragEvent) => void\r\n onDragOverTopLevelArea: (event: DragEvent) => void\r\n onDragLeaveRow: (event: DragEvent) => void\r\n onDropRow: (categoryKey: string, row: DropRowRef) => (event: DragEvent) => void\r\n onDragStartWorkspace: (workspaceId: WorkspaceId) => () => void\r\n onToggleWorkspace: (key: string) => void\r\n onNewSession: (workspaceId?: WorkspaceId) => void\r\n onOpen: (sessionId: SessionId) => void\r\n onRenameRequest: (workspaceId: WorkspaceId, currentTitle: string) => void\r\n onDeleteRequest: (workspaceId: WorkspaceId, title: string) => void\r\n onSessionRename: (sessionId: SessionId, currentTitle: string) => void\r\n onSessionArchive: (sessionId: SessionId) => void\r\n onFork: (sessionId: SessionId) => void\r\n /** Absent when the host resolved no folder application. */\r\n onOpenInFolder?: ((workspaceId: WorkspaceId) => void) | undefined\r\n}) {\r\n const emptyLineActive = dragIndicator?.mode === 'line' && dragIndicator.row.kind === 'topLevel' && dragIndicator.row.key === topLevelRef.key\r\n return (\r\n \r\n {topLevel.length === 0 && dragging && (\r\n \r\n \r\n \r\n )}\r\n {topLevel.map((workspace) => (\r\n
\r\n { onToggleWorkspace(workspace.workspaceId as string) }}\r\n onNewSession={() => { onNewSession(workspace.workspaceId) }}\r\n onRename={() => { onRenameRequest(workspace.workspaceId, workspace.label) }}\r\n onDelete={() => { onDeleteRequest(workspace.workspaceId, workspace.label) }}\r\n {...(onOpenInFolder !== undefined\r\n ? { onOpenInFolder: () => { onOpenInFolder(workspace.workspaceId) } }\r\n : {})}\r\n {...(dragIndicator?.mode === 'line' && dragIndicator.row.kind === 'topLevel' && dragIndicator.row.key === workspace.workspaceId\r\n ? { insertLine: dragIndicator.before ? 'before' : 'after' }\r\n : {})}\r\n onRowDragOver={onDragOverRow({ kind: 'topLevel', key: workspace.workspaceId })}\r\n onRowDragLeave={onDragLeaveRow}\r\n onRowDrop={onDropRow(UNCATEGORIZED_KEY, { kind: 'topLevel', key: workspace.workspaceId })}\r\n onDragStartExtra={onDragStartWorkspace(workspace.workspaceId)}\r\n />\r\n {workspace.expanded && (\r\n \r\n {workspace.sessions.map((session) => (\r\n \r\n ))}\r\n \r\n )}\r\n
\r\n ))}\r\n \r\n )\r\n}\r\n\r\n/**\r\n * Search body rendered as a three-level tree pruned to matched branches:\r\n * 分类文件夹 → 项目文件夹 → 命中会话行. Reuses the same row components as\r\n * the idle tree, so search keeps the same folder hierarchy the user is used to.\r\n */\r\nfunction SearchBody({ list, workspaces, config, archivedSessionIds, statuses, query, remote, resultLimit, current, now, open, manual, t }: {\r\n list: SessionListState\r\n workspaces: readonly WorkspaceView[]\r\n config: GroupsConfig\r\n archivedSessionIds: readonly SessionId[]\r\n statuses: SessionStatusSnapshot\r\n query: string\r\n remote: RemoteSearchState\r\n resultLimit: number\r\n current: SessionId | undefined\r\n now: number\r\n open: (sessionId: SessionId) => void\r\n manual: ManualGroups\r\n t: GroupsBrowserProps['t']\r\n}) {\r\n const currentRemote = remote.query === query ? remote : { query, status: 'loading' as const, items: [], hasMore: false }\r\n const matches = useMemo(\r\n () => deriveSearchMatches(list, workspaces, config, query, archivedSessionIds, currentRemote, resultLimit),\r\n [list, workspaces, config, query, archivedSessionIds, currentRemote, resultLimit],\r\n )\r\n const searchTree = useMemo(\r\n () => deriveSearchGroups(list, workspaces, config, matches.matchedIds, archivedSessionIds, manual, matches.snippetsBySession, statuses),\r\n [list, workspaces, config, matches, archivedSessionIds, manual, statuses],\r\n )\r\n const groups = searchTree.categories\r\n const searchTopLevel = searchTree.topLevel\r\n const pending = currentRemote.status === 'loading'\r\n const failed = currentRemote.status === 'error'\r\n return (\r\n
\r\n {groups.map((category) => (\r\n
\r\n {}} />\r\n
\r\n {category.workspaces.map((workspace) => (\r\n
\r\n {}}\r\n onNewSession={() => {}}\r\n onRename={() => {}}\r\n onDelete={() => {}}\r\n />\r\n
\r\n {workspace.sessions.map((session) => (\r\n {}}\r\n onFork={() => {}}\r\n onArchive={() => {}}\r\n />\r\n ))}\r\n
\r\n
\r\n ))}\r\n
\r\n
\r\n ))}\r\n {searchTopLevel.map((workspace) => (\r\n
\r\n {}}\r\n onNewSession={() => {}}\r\n onRename={() => {}}\r\n onDelete={() => {}}\r\n />\r\n
\r\n {workspace.sessions.map((session) => (\r\n {}}\r\n onFork={() => {}}\r\n onArchive={() => {}}\r\n />\r\n ))}\r\n
\r\n
\r\n ))}\r\n {pending &&
{t('search.pending')}
}\r\n {failed &&
{t('search.unavailable')}
}\r\n {!pending && groups.length === 0 && searchTopLevel.length === 0 && (\r\n
{t('search.noMatches')}
\r\n )}\r\n {matches.hasMore && (\r\n
{t('search.hasMore')}
\r\n )}\r\n
\r\n )\r\n}\r\n","/**\r\n * Locale dictionaries for the workspace-groups browser. The namespace is\r\n * `workspaceGroups` (independent from ui-workspace's `workspace` namespace).\r\n */\r\nimport type { LocaleDictOf } from '@deepseek-ai/dsh-client-ui-slots'\r\n\r\n/** Dictionary keys of the workspaceGroups namespace (single source of truth). */\r\nexport type WorkspaceGroupsKey =\r\n | 'section.workspaces'\r\n | 'section.sessions'\r\n | 'search'\r\n | 'search.placeholder'\r\n | 'search.clear'\r\n | 'search.noMatches'\r\n | 'search.unavailable'\r\n | 'search.pending'\r\n | 'search.hasMore'\r\n | 'search.results.aria'\r\n | 'workspace.add'\r\n | 'workspace.addBusy'\r\n | 'workspace.addError'\r\n | 'workspace.addErrorTitle'\r\n | 'workspace.rename'\r\n | 'workspace.delete'\r\n | 'workspace.deleteTitle'\r\n | 'workspace.deleteConfirm'\r\n | 'workspace.deleteCancel'\r\n | 'workspace.renaming'\r\n | 'workspace.deleting'\r\n | 'workspace.renameTitle'\r\n | 'workspace.renamePlaceholder'\r\n | 'workspace.renameConfirm'\r\n | 'workspace.renameCancel'\r\n | 'workspace.moveOutOfGroup'\r\n | 'workspace.openInFolder'\r\n | 'workspace.openInFolderError'\r\n | 'group.create'\r\n | 'group.createTitle'\r\n | 'group.createPlaceholder'\r\n | 'group.createConfirm'\r\n | 'group.createCancel'\r\n | 'group.rename'\r\n | 'group.renameTitle'\r\n | 'group.renameConfirm'\r\n | 'group.delete'\r\n | 'group.deleteTitle'\r\n | 'group.deleteConfirm'\r\n | 'group.deleteCancel'\r\n | 'group.nameDuplicate'\r\n | 'group.nameReserved'\r\n | 'section.topLevel'\r\n | 'manual.saveError'\r\n | 'session.new'\r\n | 'session.rename'\r\n | 'session.archive'\r\n | 'session.fork'\r\n | 'session.renameTitle'\r\n | 'session.renamePlaceholder'\r\n | 'session.renameConfirm'\r\n | 'session.renameCancel'\r\n | 'session.renaming'\r\n | 'uncategorized'\r\n | 'empty.none'\r\n | 'empty.noWorkspaces'\r\n | 'close'\r\n | 'cancel'\r\n | 'confirm'\r\n | 'retry'\r\n | 'configUnavailable'\r\n | 'collapse'\r\n | 'expandMore'\r\n | 'newSession'\r\n | 'quick.title'\r\n | 'quick.tab.workspaces'\r\n | 'quick.tab.sessions'\r\n | 'quick.search.placeholder'\r\n | 'quick.search.sessions'\r\n | 'quick.empty.workspaces'\r\n | 'quick.action.newSession'\r\n | 'quick.action.running'\r\n | 'quick.action.noneRunning'\r\n | 'quick.empty.sessions'\r\n | 'quick.select.hint'\r\n | 'quick.hint'\r\n | 'tabs.aria'\r\n | 'tabs.close'\r\n | 'tabs.archive'\r\n\r\nexport type WorkspaceGroupsDict = LocaleDictOf<'workspaceGroups'>\r\n\r\n/** Simplified Chinese dictionary. */\r\nexport const zh: WorkspaceGroupsDict = {\r\n 'section.workspaces': '工作区',\r\n 'section.sessions': '会话',\r\n search: '搜索',\r\n 'search.placeholder': '搜索会话…',\r\n 'search.clear': '清除',\r\n 'search.noMatches': '没有匹配的会话',\r\n 'search.unavailable': '搜索不可用',\r\n 'search.pending': '搜索中…',\r\n 'search.hasMore': '结果过多,请细化关键词',\r\n 'search.results.aria': '搜索结果',\r\n 'workspace.add': '添加工作区',\r\n 'workspace.addBusy': '正在添加…',\r\n 'workspace.addError': '添加失败',\r\n 'workspace.addErrorTitle': '无法添加工作区',\r\n 'workspace.rename': '重命名',\r\n 'workspace.delete': '删除',\r\n 'workspace.deleteTitle': '删除工作区',\r\n 'workspace.deleteConfirm': '仅删除注册信息,目录与会话日志保留。确定删除?',\r\n 'workspace.deleteCancel': '取消删除',\r\n 'workspace.renaming': '重命名中…',\r\n 'workspace.deleting': '删除中…',\r\n 'workspace.renameTitle': '重命名工作区',\r\n 'workspace.renamePlaceholder': '工作区名称',\r\n 'workspace.renameConfirm': '重命名',\r\n 'workspace.renameCancel': '取消',\r\n 'workspace.moveOutOfGroup': '移出分组',\r\n 'workspace.openInFolder': '在文件夹中打开',\r\n 'workspace.openInFolderError': '打开文件夹失败',\r\n 'group.create': '新建分组',\r\n 'group.createTitle': '新建分组',\r\n 'group.createPlaceholder': '分组名称',\r\n 'group.createConfirm': '创建',\r\n 'group.createCancel': '取消',\r\n 'group.rename': '重命名分组',\r\n 'group.renameTitle': '重命名分组',\r\n 'group.renameConfirm': '重命名',\r\n 'group.delete': '删除分组',\r\n 'group.deleteTitle': '删除分组',\r\n 'group.deleteConfirm': '删除后,该分组内的所有项目将移到顶层(不归组)。确定删除?',\r\n 'group.deleteCancel': '取消删除',\r\n 'group.nameDuplicate': '已存在同名分组',\r\n 'group.nameReserved': '该名称不可用',\r\n 'section.topLevel': '顶层项目',\r\n 'manual.saveError': '分组变更保存失败',\r\n 'session.new': '新建会话',\r\n 'session.rename': '重命名会话',\r\n 'session.archive': '归档',\r\n 'session.fork': '派生',\r\n 'session.renameTitle': '重命名会话',\r\n 'session.renamePlaceholder': '会话名称',\r\n 'session.renameConfirm': '重命名',\r\n 'session.renameCancel': '取消',\r\n 'session.renaming': '重命名中…',\r\n uncategorized: '未分类',\r\n 'empty.none': '暂无内容',\r\n 'empty.noWorkspaces': '还没有工作区',\r\n close: '关闭',\r\n cancel: '取消',\r\n confirm: '确定',\r\n retry: '重试',\r\n configUnavailable: '分组配置不可用',\r\n collapse: '折叠',\r\n expandMore: '展开全部',\r\n newSession: '新建会话',\r\n 'quick.title': '快速切换',\r\n 'quick.tab.workspaces': '工作区',\r\n 'quick.tab.sessions': '全部会话',\r\n 'quick.search.placeholder': '搜索工作区…',\r\n 'quick.search.sessions': '搜索会话…',\r\n 'quick.empty.workspaces': '没有匹配的工作区',\r\n 'quick.action.newSession': '新建会话',\r\n 'quick.action.running': '切到运行中的会话',\r\n 'quick.action.noneRunning': '没有正在运行的会话',\r\n 'quick.empty.sessions': '还没有会话',\r\n 'quick.select.hint': '在上方选择一个工作区',\r\n 'quick.hint': 'Ctrl+R 开关 · Enter 打开/新建 · Esc 关闭',\r\n 'tabs.aria': '已打开的会话',\r\n 'tabs.close': '关闭标签',\r\n 'tabs.archive': '归档',\r\n}\r\n\r\n/** English dictionary. */\r\nexport const en: WorkspaceGroupsDict = {\r\n 'section.workspaces': 'Workspaces',\r\n 'section.sessions': 'Sessions',\r\n search: 'Search',\r\n 'search.placeholder': 'Search sessions…',\r\n 'search.clear': 'Clear',\r\n 'search.noMatches': 'No matching sessions',\r\n 'search.unavailable': 'Search unavailable',\r\n 'search.pending': 'Searching…',\r\n 'search.hasMore': 'Too many results — refine the query',\r\n 'search.results.aria': 'Search results',\r\n 'workspace.add': 'Add workspace',\r\n 'workspace.addBusy': 'Adding…',\r\n 'workspace.addError': 'Add failed',\r\n 'workspace.addErrorTitle': 'Could not add workspace',\r\n 'workspace.rename': 'Rename',\r\n 'workspace.delete': 'Delete',\r\n 'workspace.deleteTitle': 'Delete workspace',\r\n 'workspace.deleteConfirm': 'Only the registration is removed; the directory and session logs stay. Delete?',\r\n 'workspace.deleteCancel': 'Cancel delete',\r\n 'workspace.renaming': 'Renaming…',\r\n 'workspace.deleting': 'Deleting…',\r\n 'workspace.renameTitle': 'Rename workspace',\r\n 'workspace.renamePlaceholder': 'Workspace name',\r\n 'workspace.renameConfirm': 'Rename',\r\n 'workspace.renameCancel': 'Cancel',\r\n 'workspace.moveOutOfGroup': 'Move out of group',\r\n 'workspace.openInFolder': 'Open in folder',\r\n 'workspace.openInFolderError': 'Could not open the folder',\r\n 'group.create': 'New group',\r\n 'group.createTitle': 'New group',\r\n 'group.createPlaceholder': 'Group name',\r\n 'group.createConfirm': 'Create',\r\n 'group.createCancel': 'Cancel',\r\n 'group.rename': 'Rename group',\r\n 'group.renameTitle': 'Rename group',\r\n 'group.renameConfirm': 'Rename',\r\n 'group.delete': 'Delete group',\r\n 'group.deleteTitle': 'Delete group',\r\n 'group.deleteConfirm': 'Deleting removes this group; every project inside it moves to the top level (ungrouped). Delete?',\r\n 'group.deleteCancel': 'Cancel delete',\r\n 'group.nameDuplicate': 'A group with this name already exists',\r\n 'group.nameReserved': 'This name is not available',\r\n 'section.topLevel': 'Top-level projects',\r\n 'manual.saveError': 'Could not save group changes',\r\n 'session.new': 'New Session',\r\n 'session.rename': 'Rename session',\r\n 'session.archive': 'Archive',\r\n 'session.fork': 'Fork',\r\n 'session.renameTitle': 'Rename session',\r\n 'session.renamePlaceholder': 'Session name',\r\n 'session.renameConfirm': 'Rename',\r\n 'session.renameCancel': 'Cancel',\r\n 'session.renaming': 'Renaming…',\r\n uncategorized: 'Uncategorized',\r\n 'empty.none': 'Nothing here',\r\n 'empty.noWorkspaces': 'No workspaces yet',\r\n close: 'Close',\r\n cancel: 'Cancel',\r\n confirm: 'Confirm',\r\n retry: 'Retry',\r\n configUnavailable: 'Grouping config unavailable',\r\n collapse: 'Collapse',\r\n expandMore: 'Show all',\r\n newSession: 'New Session',\r\n 'quick.title': 'Quick switch',\r\n 'quick.tab.workspaces': 'Workspaces',\r\n 'quick.tab.sessions': 'All sessions',\r\n 'quick.search.placeholder': 'Search workspaces…',\r\n 'quick.search.sessions': 'Search sessions…',\r\n 'quick.empty.workspaces': 'No matching workspaces',\r\n 'quick.action.newSession': 'New Session',\r\n 'quick.action.running': 'Switch to running session',\r\n 'quick.action.noneRunning': 'No running session',\r\n 'quick.empty.sessions': 'No sessions yet',\r\n 'quick.select.hint': 'Pick a workspace above',\r\n 'quick.hint': 'Ctrl+R toggle · Enter open/new · Esc close',\r\n 'tabs.aria': 'Open sessions',\r\n 'tabs.close': 'Close tab',\r\n 'tabs.archive': 'Archive',\r\n}\r\n","/**\r\n * @dsh-xhl/workspace-groups client half. ONE registration, plus a DOM-seated\r\n * view that hangs off it:\r\n *\r\n * The three-level grouped workspace browser into `sidebar.workspaces`,\r\n * shadowing the official ui-workspace browser.\r\n *\r\n * Shadowing mechanics (SlotCore semantics):\r\n * - `sidebar.workspaces` is a `single`/`root` slot. The official browser\r\n * registers at priority 0; this entry registers at priority -1, and the\r\n * single-cell shadow rule makes the LOWEST priority the winner — the\r\n * sidebar renders this browser instead of the official one.\r\n * - This entry deliberately declares NO child slots: the official entry\r\n * already declared `sidebar.workspaces.directoryFlow` (a second declaration\r\n * of an occupied child key throws). Add Workspace is therefore self-\r\n * contained — the shared navigation service + `workspaces.create()`, no\r\n * hole.\r\n *\r\n * The session tab strip is NOT a second registration. It renders into a DOM\r\n * seat at the head of the conversation column (`pI_x6G_centerCol`) because that\r\n * column declares no child slot — its only child is the `main` slot's occupant\r\n * — so there is nowhere to register. See `tab-seat.ts` for the injection and\r\n * `SessionTabs.tsx` for the portal.\r\n *\r\n * Two consequences of that choice, both deliberate:\r\n * - The strip is a CHILD of this entry's component, so it inherits this\r\n * fiber's frame; it needs no injected seam, no cross-entry callback set,\r\n * and the rename dialog stays owned by one place.\r\n * - The tab store is seated by exactly ONE entry. Registering one handle\r\n * under a second, differently-scoped slot throws inside the registry\r\n * (\"one handle, one scope\") and would abort this whole `apply()` — which\r\n * is precisely why the strip does not occupy a slot.\r\n *\r\n * 0.1.6 适配:导航(选中会话 / New Session / fork / archive / 目录选择)从\r\n * `ctx.sessions` 抽到 ui-workspace 提供的 `ctx.uiWorkspace` 服务\r\n * (`ISessions` 现在只有目录 / retain / search 能力,选中由 `mainView` 保留位\r\n * 表达)。本插件不再自建 connectWorkspace/recentWorkspace 语义,全部委托给该\r\n * 服务,只保留改名、删除、排序、搜索等数据动作。\r\n */\r\nimport type { Context } from '@deepseek-ai/cordis'\r\n// Type-only service merges: sessions/workspaces controllers, the ui-workspace\r\n// navigation service face (ctx.uiWorkspace), locale dictionary seat, the\r\n// SlotRegistry, and the sidebar SlotMap.\r\nimport type {} from '@deepseek-ai/dsh-api-session-controller/client'\r\nimport type {} from '@deepseek-ai/dsh-api-workspace-controller/client'\r\nimport type {} from '@deepseek-ai/dsh-client-locale/client'\r\nimport type {} from '@deepseek-ai/dsh-client-ui-renderer/client'\r\nimport type {} from '@deepseek-ai/dsh-client-ui-workspace/client'\r\nimport type { SnapshotSelectorHook } from '@deepseek-ai/dsh-client-ui-slots'\r\n// `useWorkspaces` is contributed by the ui-workspace browser domain (same\r\n// declaration as the official ui-workspace client half).\r\nimport type { WorkspaceSnapshot } from '@deepseek-ai/dsh-api-workspace-controller/client'\r\nimport type { SessionId } from '@deepseek-ai/dsh-session/types'\r\nimport type { GroupsBrowserInjected } from './contract.ts'\r\nimport { createGroupsViewStore } from './stores.ts'\r\nimport { createSessionTabsStore } from './tab-store.ts'\r\nimport { loadTabs, saveTabs } from './tab-persist.ts'\r\nimport { createStoreHook } from './store-hook.ts'\r\nimport { shouldOpenTab, type TabOpenMode } from './tabs.ts'\r\nimport { GroupsBrowser } from './GroupsBrowser.tsx'\r\nimport { en, zh, type WorkspaceGroupsKey } from './locales.ts'\r\n\r\ndeclare module '@deepseek-ai/dsh-client-ui-slots' {\r\n interface LocaleNamespaceMap {\r\n /** The workspace-groups browsing region copy. */\r\n workspaceGroups: WorkspaceGroupsKey\r\n }\r\n\r\n interface GlobalStandardProps {\r\n /** Selector hook over the pure Workspace Controller snapshot. */\r\n useWorkspaces: SnapshotSelectorHook\r\n }\r\n}\r\n\r\n/** Dictionary namespace owned by this plugin. */\r\nconst NS = 'workspaceGroups'\r\n\r\n/**\r\n * Tab visibility policy. `auto` is the behaviour the feature was asked for —\r\n * opening a session that has no tab yet adds one at the front of the strip;\r\n * `manual` leaves the strip to callers that drive `openTab` themselves.\r\n */\r\nconst TAB_OPEN_MODE: TabOpenMode = 'auto'\r\n\r\n/**\r\n * Required services (cordis fiber inject; 0.1.6 service roster). `uiWorkspace`\r\n * is the shipped navigation face this entry delegates selection to.\r\n */\r\nexport const inject = ['slots', 'sessions', 'workspaces', 'uiWorkspace', 'locale']\r\n\r\n/**\r\n * Register the grouped browser once the sidebar slot declaration is on the\r\n * ledger. Inject factory returns plain callbacks; data reads use the\r\n * framework's global hooks.\r\n * @param ctx - client root context.\r\n */\r\nexport function apply(ctx: Context): void {\r\n ctx.effect(() => ctx.locale.register(NS, { zh, en }), '@dsh-xhl/workspace-groups: dictionaries')\r\n\r\n // ONE store, ONE scope. The tab store is seated only by the\r\n // `sidebar.workspaces` entry below (scope root); the strip reads it as a\r\n // plain prop because it renders as a CHILD of that entry through a DOM\r\n // portal, not as a second slot occupant. Seating the same handle under a\r\n // session-scoped slot as well throws inside the registry\r\n // (one handle, one scope) and would abort this whole apply().\r\n const tabsStore = createSessionTabsStore()\r\n const tabInstance = tabsStore.create()\r\n const tabWrites = tabInstance.actions\r\n\r\n // Persist the strip on the HOST, not in browser storage: the origin includes\r\n // the port and every launch picks a new one, so localStorage/sessionStorage\r\n // both start empty next time.\r\n //\r\n // Writes are GATED until the initial restore has settled. The store starts\r\n // empty and the browser's own effects run before the host read resolves, so an\r\n // ungated subscriber would write that empty state over the stored tabs —\r\n // erasing exactly what it was supposed to restore. `hydrated` is the latch.\r\n let hydrated = false\r\n ctx.effect(() => {\r\n const stop = tabInstance.subscribe(() => {\r\n if (!hydrated) return\r\n void saveTabs({\r\n order: tabInstance.getSnapshot().order,\r\n tabs: tabInstance.getSnapshot().tabs,\r\n })\r\n })\r\n return () => { stop() }\r\n }, '@dsh-xhl/workspace-groups: tab persistence')\r\n\r\n // Hydrate once from the host, then open the write gate.\r\n //\r\n // `restore` is a no-op if the user already opened a tab while this was in\r\n // flight, so a slow response cannot discard live work. The settle deliberately\r\n // does NOT write: writing the strip here would erase the stored tabs whenever\r\n // the read came back empty for a transient reason (host still booting, a\r\n // dropped request). Only a real state CHANGE persists, via the subscriber.\r\n ctx.effect(() => {\r\n let cancelled = false\r\n void loadTabs().then((tabs) => {\r\n if (cancelled) return\r\n if (tabs.length > 0) {\r\n tabWrites.restore(tabs.map(tab => ({ sessionId: tab.sessionId as SessionId, order: tab.order })))\r\n }\r\n hydrated = true\r\n }).catch(() => {\r\n // The read failed; leave the gate open so the user's own actions persist,\r\n // but never write on the strength of a failed read.\r\n if (!cancelled) hydrated = true\r\n })\r\n return () => { cancelled = true }\r\n }, '@dsh-xhl/workspace-groups: tab restore')\r\n\r\n const searchSessions: GroupsBrowserInjected['searchSessions'] = async (query, signal) => {\r\n const result = await ctx.sessions.search(query, signal)\r\n if (!result.ok) throw new Error(result.error.message)\r\n return result.value\r\n }\r\n\r\n const browserInjected = (): GroupsBrowserInjected => ({\r\n // Navigation verbs belong to the shipped ui-workspace service: it owns the\r\n // retained `mainView` selection, supersession and pending-navigation\r\n // cancellation (0.1.6 moved them out of `ctx.sessions`).\r\n startSession: (workspaceId) => { ctx.uiWorkspace.startSession(workspaceId) },\r\n open: (sessionId) => { ctx.uiWorkspace.openSession(sessionId) },\r\n forkSession: (sessionId) => {\r\n ctx.uiWorkspace.forkSession(sessionId).catch((reason: unknown) => {\r\n console.warn('fork session failed:', reason)\r\n })\r\n },\r\n archiveSession: async (sessionId) => {\r\n await ctx.uiWorkspace.archiveSession(sessionId)\r\n // The tab is deliberately LEFT ALONE. Archiving hides the session from the\r\n // grouped surfaces, but a tab is something the user opened, and the rule\r\n // for this strip is that only they close one — an automatic close here\r\n // would silently drop work they were keeping an eye on. The chip keeps\r\n // rendering (falling back to the session id when the title no longer\r\n // resolves).\r\n },\r\n pickDirectory: () => ctx.uiWorkspace.pickDirectory(),\r\n searchSessions,\r\n searchResultLimit: ctx.sessions.searchResultLimit,\r\n // Directory-flow hole occupancy. The official ui-workspace browser gates\r\n // its \"Add workspace…\" affordance on the hole being occupied (the shipped\r\n // picker package's client half fills it); this browser drives the picker\r\n // itself through `pickDirectory`, so it must keep the hole occupied or the\r\n // official entry (still live at priority 0) would silently withdraw the\r\n // affordance.\r\n hooks: {\r\n directoryFlow: {\r\n getSnapshot: () => true,\r\n subscribe: () => () => {},\r\n },\r\n },\r\n // Data-only verbs stay on the controllers.\r\n renameSession: async (sessionId, title) => {\r\n const session = ctx.sessions.binding(sessionId)?.session\r\n if (session === undefined) throw new Error(`unknown session \"${sessionId}\"`)\r\n const result = await session.rename(title)\r\n if (!result.ok) throw new Error(result.error.message)\r\n },\r\n renameWorkspace: async (workspaceId, title) => { await ctx.workspaces.rename(workspaceId, title) },\r\n deleteWorkspace: async (workspaceId) => { await ctx.workspaces.delete(workspaceId) },\r\n insertWorkspaceBefore: async (workspaceId, beforeWorkspaceId) => {\r\n await ctx.workspaces.insertBefore(workspaceId, beforeWorkspaceId)\r\n },\r\n insertSessionBefore: async (workspaceId, sessionId, beforeSessionId) => {\r\n await ctx.workspaces.insertSessionBefore(workspaceId, sessionId, beforeSessionId)\r\n },\r\n createWorkspace: input => ctx.workspaces.create(input),\r\n // \"Show a tab for what I just opened\" — but only while it is actually in\r\n // play. The browser decides per session (see `shouldOpenTab`): a draft that\r\n // has not been talked to, and settled history, both stay out of the strip.\r\n // The status arrives from the caller because it is a live UI fact read\r\n // through a hook, which this (non-React) factory cannot reach.\r\n openTab: (sessionId, status) => {\r\n const summary = ctx.sessions.list.getSnapshot().byId[sessionId]\r\n if (shouldOpenTab(TAB_OPEN_MODE, summary, status)) tabWrites.touch(sessionId)\r\n },\r\n // The strip rides this entry's own store seat, so it needs both faces\r\n // explicitly: a selector hook over the one live instance, and the baked\r\n // writes. Both come from the same instance the browser writes through.\r\n useTabs: createStoreHook(tabInstance),\r\n tabActions: tabWrites,\r\n })\r\n\r\n // priority: -1 — lower than the official browser's default 0, so the\r\n // single-slot shadow rule elects this entry. No children declaration: the\r\n // official entry already owns `sidebar.workspaces.directoryFlow`.\r\n //\r\n // The official WorkspaceBrowser entry is NEVER disposed — shadowing only\r\n // changes which entry renders (activation just bumps the store's mount\r\n // count). Both entries live at the same cell, so if this one ever throws\r\n // during render the slot core retires it for the rest of its registration's\r\n // life and silently falls back to the official browser. Anything that can\r\n // throw belongs outside the hot path.\r\n ctx.slots.inject('sidebar.workspaces', () => ctx.slots.register(\r\n {\r\n name: 'sidebar.workspaces',\r\n priority: -1,\r\n store: createGroupsViewStore(),\r\n inject: browserInjected,\r\n locale: NS,\r\n registrant: '@dsh-xhl/workspace-groups',\r\n },\r\n GroupsBrowser,\r\n ))\r\n}\r\n"],"mappings":";;;;;;;;;;;;;EAsBA,SAAgB,wBAAwB,OAAwB,KAAa,UAAyB;GACpG,MAAM,kBAAkB,OAAO;EACjC;;EAGA,SAAgB,yBAAyB,OAAwB,KAAa,UAAyB;GACrG,MAAM,mBAAmB,OAAO;EAClC;;EAGA,SAAgB,eACd,OACA,cACA,eACM;GACN,MAAM,oBAAoB,OAAO,YAC/B,OAAO,QAAQ,MAAM,iBAAiB,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AC,EAAE;KACjD,IAAI,YAAY,KAAA,GAAW,MAAM,IAAI,MAAM,oBAAoB,UAAU,EAAE;KAC3E,MAAM,SAAS,MAAM,QAAQ,OAAO,KAAK;KACzC,IAAI,CAAC,OAAO,IAAI,MAAM,IAAI,MAAM,OAAO,MAAM,OAAO;IACtD;IACA,iBAAiB,OAAO,aAAa,UAAU;KAAE,MAAM,IAAI,WAAW,OAAO,aAAa,KAAK;IAAE;IACjG,iBAAiB,OAAO,gBAAgB;KAAE,MAAM,IAAI,WAAW,OAAO,WAAW;IAAE;IACnF,uBAAuB,OAAO,aAAa,sBAAsB;KAC/D,MAAM,IAAI,WAAW,aAAa,aAAa,iBAAiB;IAClE;IACA,qBAAqB,OAAO,aAAa,WAAW,oBAAoB;KACtE,MAAM,IAAI,WAAW,oBAAoB,aAAa,WAAW,eAAe;IAClF;IACA,kBAAiB,UAAS,IAAI,WAAW,OAAO,KAAK;IAMrD,UAAU,WAAW,WAAW;KAC9B,MAAM,UAAU,IAAI,SAAS,KAAK,YAAY,CAAC,CAAC,KAAK;KACrD,IAAI,cAAc,eAAe,SAAS,MAAM,GAAG,UAAU,MAAM,SAAS;IAC9E;IAIA,SAAS,gBAAgB,WAAW;IACpC,YAAY;GACd;GAYA,IAAI,MAAM,OAAO,4BAA4B,IAAI,MAAM,SACrD;IACE,MAAM;IACN,UAAU;IACV,OAAO,sBAAsB;IAC7B,QAAQ;IACR,QAAQ;IACR,YAAY;GACd,GACA,aACF,CAAC;EACH"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js index 2ac30d5..587f193 100644 --- a/lib/index.js +++ b/lib/index.js @@ -2462,7 +2462,7 @@ function ruleDisplayName(manual, originalName) { //#endregion //#region src/host-config.ts /** -* Sidecar config reading for dsh-workspace-groups. The classification rules +* Sidecar config reading for @dsh-xhl/workspace-groups. The classification rules * live in a user-editable YAML file (default `~/.dsh/workspace-groups.yaml`), * read and validated on the host, served to the browser half as JSON. The * core workspace.json and session storage are never touched. @@ -2533,7 +2533,7 @@ async function readGroupsConfig(path) { //#endregion //#region src/host-manual.ts /** -* Runtime grouping overlay for dsh-workspace-groups: manual groups created in +* Runtime grouping overlay for @dsh-xhl/workspace-groups: manual groups created in * the sidebar UI and per-workspace category overrides. Stored in a plugin- * owned JSON sidecar (`$DSH_HOME/workspace-groups.manual.json`), separate from * the operator YAML — the YAML stays the rule source, this file only records @@ -2702,9 +2702,135 @@ async function writeManualGroups(path, manual) { } } //#endregion +//#region src/host-tabs.ts +/** +* Host-side persistence for the session-tab strip. +* +* Why the host and not the browser: **browser storage is scoped to the origin, +* and the origin includes the PORT.** `dsh web` / `dsh test` / the desktop shell +* each pick a port, and a different port is a different origin, so BOTH +* `localStorage` and `sessionStorage` start empty on the next launch. A tab list +* kept there survives a reload only by luck (same port) and is lost on the next +* start. +* +* Host storage has no such problem: one JSON sidecar under `$DSH_HOME`, keyed by +* nothing but the plugin, so every port and every session reads the same file. +* That file IS the strip's memory — it is returned as-is, with no browser-session +* marker gating it. +* +* (An earlier version DID gate on a `sessionKey` kept in `sessionStorage`, to +* express "clear when the browser closes". That cannot work here: the marker is +* itself per-origin, so a port change erased it, the host saw an unfamiliar +* marker, and every restart silently discarded the user's tabs. Persistence the +* user can rely on beats a tidy-up nobody asked for.) +* +* Writes are atomic (temp file + fsync + rename), matching the manual overlay. +*/ +/** Default location: `$DSH_HOME/workspace-groups.tabs.json`. */ +function defaultTabsPath() { + const home = process.env.DSH_HOME !== void 0 && process.env.DSH_HOME !== "" ? process.env.DSH_HOME : resolve(homedir(), ".dsh"); + return resolve(home, "workspace-groups.tabs.json"); +} +/** +* Parse + shape-validate a tabs document. +* +* Tolerant on purpose: this file is a display cache, so a malformed one must +* read as "no tabs" rather than break the strip. Individual bad rows are dropped +* and the rest kept. Unknown fields (such as the `sessionKey` an older build +* wrote) are ignored, so an existing file keeps working across the change. +* +* @param raw - parsed JSON value. +* @returns the normalized document, or null when it is unusable. +*/ +function parseTabsDocument(raw) { + if (typeof raw !== "object" || raw === null || Array.isArray(raw)) return null; + const source = raw; + if (source.version !== 1) return null; + if (typeof source.order !== "number" || !Number.isFinite(source.order)) return null; + if (!Array.isArray(source.tabs)) return null; + const tabs = []; + const seen = /* @__PURE__ */ new Set(); + for (const entry of source.tabs) { + if (typeof entry !== "object" || entry === null) continue; + const row = entry; + if (typeof row.sessionId !== "string" || row.sessionId === "") continue; + if (typeof row.order !== "number" || !Number.isFinite(row.order)) continue; + if (seen.has(row.sessionId)) continue; + seen.add(row.sessionId); + tabs.push({ + sessionId: row.sessionId, + order: row.order + }); + } + return { + version: 1, + order: source.order, + tabs + }; +} +/** +* Read the tabs document. +* +* A missing file is not an error (first run). A corrupt one is reported as null +* so the caller starts empty, and the next write repairs the file. +* +* @param path - sidecar path. +* @returns the document, or null when absent/unusable. +*/ +async function readTabsDocument(path) { + let text; + try { + text = await readFile(path, "utf8"); + } catch (error) { + if (error.code === "ENOENT") return null; + throw error; + } + try { + return parseTabsDocument(JSON.parse(text)); + } catch { + return null; + } +} +/** +* Write the tabs document atomically. +* @param path - sidecar path. +* @param document - document to store. +*/ +async function writeTabsDocument(path, document) { + await mkdir(dirname(path), { recursive: true }); + const temp = `${path}.${process.pid}.${Date.now()}.tmp`; + const body = `${JSON.stringify(document, null, 2)}\n`; + const handle = await open(temp, "w"); + try { + await handle.writeFile(body, "utf8"); + await handle.sync(); + } finally { + await handle.close(); + } + try { + await rename(temp, path); + } catch (error) { + await unlink(temp).catch(() => {}); + throw error; + } +} +/** +* Build the document to persist. +* @param state - the client's current strip and its arrival counter. +* @returns the document to write. +*/ +function documentForTabs(state) { + const highest = state.tabs.reduce((max, tab) => Math.max(max, tab.order), 0); + return { + version: 1, + order: Math.max(state.order, highest), + tabs: [...state.tabs] + }; +} +//#endregion //#region src/index.ts /** Plugin identity for cordis.yml rows. */ -const name = "dsh-workspace-groups"; +const name = "@dsh-xhl/workspace-groups"; /** Services required before mounting: the webserver route. */ const inject = ["webServer"]; /** Cap on the PUT body: the overlay is tiny; anything bigger is a client bug. */ @@ -2717,6 +2843,41 @@ var HttpError = class extends Error { this.status = status; } }; +/** +* Shape-validate a PUT /tabs body. +* +* Returns null on a malformed payload rather than throwing, so the route can +* answer 400 without a try/catch around the parse. Individual bad tab rows are +* dropped (the strip is a display cache; one bad row must not reject a whole +* write), and duplicate session ids are collapsed to the first. +* +* @param raw - parsed request body. +* @returns the payload, or null when the envelope is unusable. +*/ +function parseTabsPayload(raw) { + if (typeof raw !== "object" || raw === null || Array.isArray(raw)) return null; + const source = raw; + if (typeof source.order !== "number" || !Number.isFinite(source.order)) return null; + if (!Array.isArray(source.tabs)) return null; + const tabs = []; + const seen = /* @__PURE__ */ new Set(); + for (const entry of source.tabs) { + if (typeof entry !== "object" || entry === null) continue; + const row = entry; + if (typeof row.sessionId !== "string" || row.sessionId === "") continue; + if (typeof row.order !== "number" || !Number.isFinite(row.order)) continue; + if (seen.has(row.sessionId)) continue; + seen.add(row.sessionId); + tabs.push({ + sessionId: row.sessionId, + order: row.order + }); + } + return { + order: source.order, + tabs + }; +} /** Write a plain-text error response with the given status. */ function writeError(res, status, message) { res.writeHead(status, { "Content-Type": "text/plain; charset=utf-8" }); @@ -2739,6 +2900,7 @@ async function readBody(req, limit) { function apply(ctx) { const configPath = defaultConfigPath(); const manualPath = defaultManualPath(); + const tabsPath = defaultTabsPath(); ctx.effect(() => ctx.webServer.register({ kind: "exact", path: "/workspace-groups/config", @@ -2766,7 +2928,59 @@ function apply(ctx) { }); res.end(req.method === "HEAD" ? void 0 : body); } - }), "dsh-workspace-groups: /workspace-groups/config route"); + }), "@dsh-xhl/workspace-groups: /workspace-groups/config route"); + ctx.effect(() => ctx.webServer.register({ + kind: "exact", + path: "/workspace-groups/tabs", + handler: async (req, res) => { + if (req.method === "GET" || req.method === "HEAD") { + let stored; + try { + stored = await readTabsDocument(tabsPath); + } catch (error) { + writeError(res, 500, `workspace-groups: failed to read tabs: ${error instanceof Error ? error.message : String(error)}`); + return; + } + const body = JSON.stringify({ tabs: stored?.tabs ?? [] }); + res.writeHead(200, { + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "no-store", + "Content-Length": Buffer.byteLength(body) + }); + res.end(req.method === "HEAD" ? void 0 : body); + return; + } + if (req.method !== "PUT") { + writeError(res, 405, "method not allowed"); + return; + } + let raw; + try { + raw = JSON.parse(await readBody(req, MAX_MANUAL_BODY_BYTES)); + } catch (error) { + writeError(res, error instanceof HttpError ? error.status : 400, `workspace-groups: ${error instanceof Error ? error.message : String(error)}`); + return; + } + const parsed = parseTabsPayload(raw); + if (parsed === null) { + writeError(res, 400, "workspace-groups: malformed tabs payload"); + return; + } + try { + await writeTabsDocument(tabsPath, documentForTabs(parsed)); + } catch (error) { + writeError(res, 500, `workspace-groups: failed to write tabs: ${error instanceof Error ? error.message : String(error)}`); + return; + } + const body = JSON.stringify({ ok: true }); + res.writeHead(200, { + "Content-Type": "application/json; charset=utf-8", + "Cache-Control": "no-store", + "Content-Length": Buffer.byteLength(body) + }); + res.end(body); + } + }), "@dsh-xhl/workspace-groups: /workspace-groups/tabs route"); ctx.effect(() => ctx.webServer.register({ kind: "exact", path: "/workspace-groups/manual", @@ -2805,7 +3019,7 @@ function apply(ctx) { }); res.end(body); } - }), "dsh-workspace-groups: /workspace-groups/manual route"); + }), "@dsh-xhl/workspace-groups: /workspace-groups/manual route"); } //#endregion export { apply, inject, name }; diff --git a/lib/types/client/FlowerBranch.d.ts b/lib/types/client/FlowerBranch.d.ts new file mode 100644 index 0000000..10cfb4b --- /dev/null +++ b/lib/types/client/FlowerBranch.d.ts @@ -0,0 +1,23 @@ +/** + * Attribute the tree puts on every row the branch should connect. */ +export declare const BRANCH_ROW_ATTRIBUTE = "data-wg-branch-row"; +/** + * Attribute marking the row the stem should grow to. + * + * Only the DEEPEST row gets this (the session). Its ancestors — the project and + * the category that contain it — deliberately do NOT, because a session belongs + * to both and marking all three would make "which row is active?" ambiguous. + * When several rows do carry it, the deepest (last in document order) wins. + */ +export declare const BRANCH_ACTIVE_ATTRIBUTE = "data-wg-branch-active"; +/** Row kind marker: a group boundary kinks the stem. */ +export declare const BRANCH_GROUP_ATTRIBUTE = "data-wg-branch-group"; +/** + * Render the branch for the rows currently inside `scope`. + * @param props - the element to measure, and whether the open session is working. + * @returns the SVG overlay, or null until at least one row is measured. + */ +export declare function FlowerBranch({ scope, spinning }: { + scope: HTMLElement | null; + spinning: boolean; +}): import("react").JSX.Element | null; diff --git a/lib/types/client/GroupsBrowser.d.ts b/lib/types/client/GroupsBrowser.d.ts index d8c2c21..6996987 100644 --- a/lib/types/client/GroupsBrowser.d.ts +++ b/lib/types/client/GroupsBrowser.d.ts @@ -30,4 +30,4 @@ export type DragIndicator = { * @param props - composed slot props (shell owner share + store + injected actions). * @returns the region element tree. */ -export declare function GroupsBrowser({ wide, expandSidebar, useSessions, useWorkspaces, useStore, actions, startSession, open, renameSession, forkSession, renameWorkspace, deleteWorkspace, insertWorkspaceBefore, archiveSession, insertSessionBefore, createWorkspace, pickDirectory, searchSessions, searchResultLimit, t, }: GroupsBrowserProps): import("react").JSX.Element; +export declare function GroupsBrowser({ wide, expandSidebar, useSessions, useWorkspaces, useSessionStatus, useStore, actions, startSession, open, renameSession, forkSession, renameWorkspace, deleteWorkspace, insertWorkspaceBefore, archiveSession, insertSessionBefore, createWorkspace, pickDirectory, searchSessions, searchResultLimit, openTab, useTabs, tabActions, t, }: GroupsBrowserProps): import("react").JSX.Element; diff --git a/lib/types/client/QuickPanel.d.ts b/lib/types/client/QuickPanel.d.ts new file mode 100644 index 0000000..e2842bc --- /dev/null +++ b/lib/types/client/QuickPanel.d.ts @@ -0,0 +1,38 @@ +import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots'; +import type { SessionListState } from '@deepseek-ai/dsh-api-session-controller/client'; +import type { WorkspaceId, WorkspaceView } from '@deepseek-ai/dsh-api-workspace-controller/client'; +import type { SessionId } from '@deepseek-ai/dsh-session/types'; +/** Which surface of the quick panel is active. */ +export type QuickTab = 'workspaces' | 'sessions'; +/** The locale seat's translate function (same shape GroupsBrowser receives). */ +type Translate = PropsLocale<'workspaceGroups'>['t']; +/** Quick panel props: hooks snapshots + the two injected verbs + shared CSS context. */ +export type QuickPanelProps = { + /** Close request (Escape, mask click, action completed, or parent Ctrl+R toggle). */ + onClose: () => void; + /** Sessions list snapshot (drives running detection). */ + list: SessionListState; + /** Real workspaces in stable Host order. */ + workspaces: readonly WorkspaceView[]; + /** Registry-global archive set. */ + archivedSessionIds: readonly SessionId[]; + /** Category label per grouped workspace id (badge column; top-level absent). */ + categoryByWorkspace: ReadonlyMap; + /** The Session the Conversation currently shows (mainView retention), if any. */ + current: SessionId | undefined; + /** Start a New Session in a workspace (injected share verb). */ + startSession: (workspaceId?: WorkspaceId) => void; + /** Open a real Session (injected share verb). */ + openSession: (sessionId: SessionId) => void; + /** Render clock for relative times (parent refreshes per render). */ + now: number; + /** Dictionary accessor (workspaceGroups namespace). */ + t: Translate; +}; +/** + * Render the quick switch panel (portaled overlay). + * @param props - hooks snapshots + injected verbs. + * @returns the panel element tree. + */ +export declare function QuickPanel({ onClose, list, workspaces, archivedSessionIds, categoryByWorkspace, current: currentSessionId, startSession, openSession, now, t, }: QuickPanelProps): import("react").ReactPortal; +export {}; diff --git a/lib/types/client/SessionTabs.d.ts b/lib/types/client/SessionTabs.d.ts new file mode 100644 index 0000000..8444cbd --- /dev/null +++ b/lib/types/client/SessionTabs.d.ts @@ -0,0 +1,7 @@ +import type { SessionsTabsProps } from './contract.ts'; +/** + * Render the session tab strip into the conversation column's head seat. + * @param props - tab store, catalog/status hooks, navigation, locale. + * @returns the portal (or null until the column has mounted). + */ +export declare function SessionTabs({ useTabs, actions, useSessions, useSessionStatus, useWorkspaces, activate, rename, t, }: SessionsTabsProps): import("react").ReactPortal | null; diff --git a/lib/types/client/branch.d.ts b/lib/types/client/branch.d.ts new file mode 100644 index 0000000..244bddd --- /dev/null +++ b/lib/types/client/branch.d.ts @@ -0,0 +1,140 @@ +/** + * The "flower branch" geometry for the sidebar tree. + * + * Reproduces the RewampUI *Flower Sidebar* mechanism: a single curly branch runs + * down the left of the nav list, drawn as SVG so it can be *grown* — a faded + * dashed ghost shows the whole route, and a solid stroke is drawn only as far as + * the row you are on. Each row gets a dot sitting exactly on the curve, and the + * active row's dot blooms. + * + * How it maps onto OUR tree (three levels: 分组 folder → 项目 folder → 会话 row): + * + * - The branch is **one continuous path** through every visible row, not one + * rail per folder. That is what makes it read as a plant rather than as the + * per-folder rail it replaces. + * - The stem runs at `STEM_X`; at each **group boundary** it kinks outward to + * `BULGE_X` and back — a half-pitch out plus a half-pitch back, which is + * exactly the reference's 32px rhythm. + * - Rows that are not group boundaries sit on a straight run, one row pitch + * apart, each carrying a dot at its own y. + * + * Runtime-free on purpose (same discipline as `tabs.ts` / `store-core.ts`): the + * component measures the DOM and hands plain numbers here, so the geometry is + * unit-testable without a browser. + */ +/** Horizontal position of the stem's straight runs. */ +/** + * Default x for a row's anchor, in SVG coordinates. + * + * A fallback only: rows carry their OWN measured `x`, because the tree indents + * with per-row padding rather than one shared origin. A folder's chevron and a + * session's text sit at different x, and no single constant lands on both. + */ +export declare const STEM_X = 30; +/** Default vertical pitch between two rows. */ +export declare const ROW_PITCH = 32; +/** + * One row the branch must pass through. + * + * Both coordinates are MEASURED, not derived: + * - `y` because the tree mixes row heights and inter-row gaps (deriving one + * pitch from a single gap drifted the dots up to 15px off their rows); + * - `x` because the tree indents per row via padding, so a folder's chevron and + * a session's text are at different x. + */ +export interface BranchRow { + /** Stable key, used to match a row to its dot. */ + readonly key: string; + /** Row centre y, in the SVG's coordinate space. */ + readonly y: number; + /** + * Row anchor x, in the SVG's coordinate space. + * + * A folder row's anchor is its CHEVRON centre — the triangle the user already + * reads as "this row opens" — so the stem visually hangs off the marker rather + * than floating beside it. A session row's anchor is the indent its text sits + * on. + */ + readonly x: number; + /** + * Row kind. A `'group'` row starts a new group and makes the stem kink; + * an `'item'` row runs straight (or curves back in right after a group). + */ + readonly kind: 'group' | 'item'; + /** Whether this is the row the user is currently on (the bloomed dot). */ + readonly active: boolean; +} +/** A dot on the branch: one per row, positioned on the curve. */ +export interface BranchDot { + /** The row this dot belongs to. */ + readonly key: string; + readonly cx: number; + readonly cy: number; + readonly active: boolean; +} +/** + * The bloom that flowers at the branch's endpoint. + * + * The endpoint is where the GROWN stroke stops — the row the user is on — not + * the last visible row: the stem is drawn to the active row, so that is where + * the plant has visibly reached, whether the tree is folded above it or not. + * + * This is deliberately the ONE row an active marker names, so the flower can + * never disagree with the stem about where the branch ends. + */ +export interface BranchFlower { + /** Row whose endpoint carries the bloom (the active row's key). */ + readonly key: string; + /** Endpoint x: the last dot's centre, i.e. exactly where the grown path stops. */ + readonly cx: number; + /** Endpoint y, on the measured row centre. */ + readonly cy: number; +} +/** The branch: one path for the ghost, its total length, and the dots. */ +export interface Branch { + /** Full route, drawn as the faded dashed ghost. */ + readonly ghostPath: string; + /** Path up to and including the active row (the "grown" part). */ + readonly grownPath: string; + /** Drawn length of the full route. */ + readonly ghostLength: number; + /** Drawn length of the grown part. */ + readonly grownLength: number; + /** Dots, in row order. */ + readonly dots: readonly BranchDot[]; + /** + * Bloom at the grown path's endpoint, or NULL when no row carries the active + * marker. + * + * Deliberately stricter than `grownPath`: the stem has to be *some* path even + * when nothing is active (it collapses to the bare origin, drawing nothing), + * but a bloom with no active row has nothing to be the flower OF. Falling back + * to the first dot — the earlier rule — put the blossom on a folder row at the + * top of the tree as soon as the open session's folder was collapsed, because + * folding removes the only row carrying the marker. No active row means no + * flower. + */ + readonly flower: BranchFlower | null; + /** Total vertical extent, so the SVG box can be sized. */ + readonly height: number; +} +/** + * How far short of the flower's centre the stem stops, in SVG user units. + * + * The bloom is drawn ON the endpoint, so a stem that runs all the way to the + * centre is visible through the petal notches and reads as a line crossing the + * flower. Stopping the stroke at (a little over) the bloom's radius keeps the + * stem ending cleanly at the flower's edge, where it reads as a stalk holding + * the bloom. + * + * 7 units ≈ the 6.2-unit flower radius plus a hair, so the stroke's round cap + * tucks just under the outer petals without a visible gap. + */ +export declare const STEM_END_CLEARANCE = 7; +/** + * Build the branch for a list of rows. + * + * @param rows - visible rows in render order, each carrying its MEASURED centre. + * @returns the branch geometry; empty strings when there are no rows. + */ +export declare function buildBranch(rows: readonly BranchRow[]): Branch; diff --git a/lib/types/client/contract.d.ts b/lib/types/client/contract.d.ts index 3f6c9f4..7640121 100644 --- a/lib/types/client/contract.d.ts +++ b/lib/types/client/contract.d.ts @@ -1,15 +1,33 @@ /** * Registrant-private injected share for the workspace-groups browser entry. * Mirrors the official ui-workspace browser inject (same runtime calls), with - * two differences: no directory-flow hole dependency (Add Workspace is - * self-contained via `pickDirectory`), and no locale-keyed naming collision. + * two differences: the directory-flow hole is kept occupied (`hooks.directoryFlow`) + * because the official entry stays registered behind this one and gates its own + * "Add workspace…" affordance on that hole — Add Workspace itself is + * self-contained via `pickDirectory` — and no locale-keyed naming collision. */ -import type { PropsHooks, PropsLocale, PropsRuntime, PropsStore } from '@deepseek-ai/dsh-client-ui-slots'; -import type { HostDescriptionSource } from '@deepseek-ai/dsh-client-connection/client'; -import type { SessionId, SessionSearchResultItem, WorkspaceId, WorkspaceView } from '@deepseek-ai/dsh-client-runtime/client'; +import type { HostObservable, InjectFace, PropsLocale, PropsRuntime, PropsStore, SnapshotSelectorHook } from '@deepseek-ai/dsh-client-ui-slots'; +import type { SessionId } from '@deepseek-ai/dsh-session/types'; +import type { SessionListState, SessionSearchResultItem } from '@deepseek-ai/dsh-api-session-controller/client'; +import type { SessionStatus, SessionStatusSnapshot } from '@deepseek-ai/dsh-client-ui-session/client'; +import type { WorkspaceId, WorkspaceSnapshot, WorkspaceView } from '@deepseek-ai/dsh-api-workspace-controller/client'; import type { createGroupsViewStore } from './stores.ts'; +import type { SessionTabsInstance, SessionTabsState } from './tab-store.ts'; +/** Services/slots this registrant's props depend on (documentation alias). */ +export type WorkspaceGroupsStoreHandle = ReturnType; /** Injected share (arrives via the register inject factory). */ export type GroupsBrowserInjected = { + /** + * Reserved hooks compartment. `directoryFlow` reports the + * `sidebar.workspaces.directoryFlow` hole as occupied: the official + * ui-workspace entry stays registered behind this one and withdraws its + * "Add workspace…" affordance when the hole is empty, so this browser keeps + * it truthy (it drives the picker itself through `pickDirectory`). + */ + hooks: { + /** True while the sidebar browsing region's directory-flow hole is occupied. */ + directoryFlow: HostObservable; + }; /** Start a New Session in a Workspace (reuse-or-create its blank session and open it). */ startSession: (workspaceId?: WorkspaceId) => void; /** Open a real Session. */ @@ -41,11 +59,66 @@ export type GroupsBrowserInjected = { }) => Promise; /** Ask the local Host to open its native single-directory chooser (self-contained Add Workspace). */ pickDirectory: () => Promise; - /** Browser-private injected hooks (host description; bound by the slot renderer). */ - hooks: { - /** Current generation's Host description. */ - hostDescription: HostDescriptionSource; - }; + /** + * Surface the session-tab strip for a session that is in play (called with the + * session the browser itself just opened, and again whenever its status + * changes). Tab visibility rules live in `shouldOpenTab`; the status is passed + * in because "it started working" is a live-status fact the store layer cannot + * read on its own. + * @param sessionId - the session to consider. + * @param status - its unified UI status, when one is published. + */ + openTab: (sessionId: SessionId, status: SessionStatus | undefined) => void; + /** + * Selector hook over the shared tab store, bound by this plugin (the strip is + * not a slot occupant, so the framework does not bind it). Built from the one + * live instance the browser writes through. + */ + useTabs: (selector: (state: SessionTabsState) => S, eq?: (a: S, b: S) => boolean) => S; + /** The tab store's baked write set (the same one `apply` writes through). */ + tabActions: SessionTabsInstance['actions']; }; /** Full browser props: shell owner share + viewing store + injected actions + locale seat. */ -export type GroupsBrowserProps = PropsRuntime<'sidebar.workspaces'> & PropsStore> & Omit & PropsHooks & PropsLocale<'workspaceGroups'>; +export type GroupsBrowserProps = PropsRuntime<'sidebar.workspaces'> & PropsStore> & InjectFace & PropsLocale<'workspaceGroups'>; +/** + * The two framework global seats the strip reads, declared structurally because + * `GlobalStandardProps`'s own members arrive from merge declarations this repo + * cannot resolve (its packages ship no `src`, so the merged hook types are only + * visible to the compiling package). Both are the shipped global selector hooks + * with the same names and shapes, and both are seated on the + * `sidebar.workspaces` occupant that renders this strip. + */ +export interface SessionsTabsStandardProps { + /** Session list and current selection (framework global seat). */ + useSessions: SnapshotSelectorHook; + /** Unified per-session UI status (framework global seat). */ + useSessionStatus: SnapshotSelectorHook; + /** + * Workspace registry (framework global seat). The strip reads it to label each + * tab with the project that owns its session — the one fact a bare strip of + * session titles cannot convey. + */ + useWorkspaces: SnapshotSelectorHook; +} +/** + * Full tab-strip props. + * + * The strip is NOT a slot occupant: the conversation column declares no child + * slot, so it renders through a DOM seat (`tab-seat.ts`) and receives plain + * React props instead of framework shares. Only the two global selector hooks + * below are framework-provided, and they arrive because the strip is rendered + * as a CHILD of this plugin's own `sidebar.workspaces` occupant — which seats + * both of them in the standard kit. Everything else is passed explicitly by + * that parent, which is what removes the strip from the slot registry entirely + * and with it the cross-scope store conflict the slot version hit. + */ +export type SessionsTabsProps = SessionsTabsStandardProps & { + /** Selector hook over the shared tab store's snapshot. */ + useTabs: SnapshotSelectorHook; + /** The tab store's baked write set (the same set `apply` writes through). */ + actions: SessionTabsInstance['actions']; + /** Make a tab's session the open one (`ctx.uiWorkspace.openSession`). */ + activate: (sessionId: SessionId) => void; + /** Ask the browser to open its rename dialog for a tab session. */ + rename: (sessionId: SessionId, currentTitle: string) => void; +} & PropsLocale<'workspaceGroups'>; diff --git a/lib/types/client/index.d.ts b/lib/types/client/index.d.ts index 65a6112..c3162ae 100644 --- a/lib/types/client/index.d.ts +++ b/lib/types/client/index.d.ts @@ -1,27 +1,60 @@ /** - * dsh-workspace-groups client half: registers the three-level grouped - * workspace browser into the `sidebar.workspaces` slot, shadowing the - * official ui-workspace browser. + * @dsh-xhl/workspace-groups client half. ONE registration, plus a DOM-seated + * view that hangs off it: * - * Shadowing mechanics (SlotCore semantics): - * - `sidebar.workspaces` is a `single`/`root` slot. The official browser - * registers at priority 0; this entry registers at priority -1, and the - * single-cell shadow rule makes the LOWEST priority the winner — the - * sidebar renders this browser instead of the official one. - * - This entry deliberately declares NO child slots: the official entry - * already declared `sidebar.workspaces.directoryFlow` (a second declaration - * of an occupied child key throws). Add Workspace is therefore self- - * contained — `ctx.workspaces.pickDirectory()` + `create()`, no hole. + * The three-level grouped workspace browser into `sidebar.workspaces`, + * shadowing the official ui-workspace browser. + * + * Shadowing mechanics (SlotCore semantics): + * - `sidebar.workspaces` is a `single`/`root` slot. The official browser + * registers at priority 0; this entry registers at priority -1, and the + * single-cell shadow rule makes the LOWEST priority the winner — the + * sidebar renders this browser instead of the official one. + * - This entry deliberately declares NO child slots: the official entry + * already declared `sidebar.workspaces.directoryFlow` (a second declaration + * of an occupied child key throws). Add Workspace is therefore self- + * contained — the shared navigation service + `workspaces.create()`, no + * hole. + * + * The session tab strip is NOT a second registration. It renders into a DOM + * seat at the head of the conversation column (`pI_x6G_centerCol`) because that + * column declares no child slot — its only child is the `main` slot's occupant + * — so there is nowhere to register. See `tab-seat.ts` for the injection and + * `SessionTabs.tsx` for the portal. + * + * Two consequences of that choice, both deliberate: + * - The strip is a CHILD of this entry's component, so it inherits this + * fiber's frame; it needs no injected seam, no cross-entry callback set, + * and the rename dialog stays owned by one place. + * - The tab store is seated by exactly ONE entry. Registering one handle + * under a second, differently-scoped slot throws inside the registry + * ("one handle, one scope") and would abort this whole `apply()` — which + * is precisely why the strip does not occupy a slot. + * + * 0.1.6 适配:导航(选中会话 / New Session / fork / archive / 目录选择)从 + * `ctx.sessions` 抽到 ui-workspace 提供的 `ctx.uiWorkspace` 服务 + * (`ISessions` 现在只有目录 / retain / search 能力,选中由 `mainView` 保留位 + * 表达)。本插件不再自建 connectWorkspace/recentWorkspace 语义,全部委托给该 + * 服务,只保留改名、删除、排序、搜索等数据动作。 */ -import type { ClientContext } from '@deepseek-ai/dsh-client-runtime/client'; +import type { Context } from '@deepseek-ai/cordis'; +import type { SnapshotSelectorHook } from '@deepseek-ai/dsh-client-ui-slots'; +import type { WorkspaceSnapshot } from '@deepseek-ai/dsh-api-workspace-controller/client'; import { type WorkspaceGroupsKey } from './locales.ts'; declare module '@deepseek-ai/dsh-client-ui-slots' { interface LocaleNamespaceMap { /** The workspace-groups browsing region copy. */ workspaceGroups: WorkspaceGroupsKey; } + interface GlobalStandardProps { + /** Selector hook over the pure Workspace Controller snapshot. */ + useWorkspaces: SnapshotSelectorHook; + } } -/** Required services (cordis fiber inject). */ +/** + * Required services (cordis fiber inject; 0.1.6 service roster). `uiWorkspace` + * is the shipped navigation face this entry delegates selection to. + */ export declare const inject: string[]; /** * Register the grouped browser once the sidebar slot declaration is on the @@ -29,4 +62,4 @@ export declare const inject: string[]; * framework's global hooks. * @param ctx - client root context. */ -export declare function apply(ctx: ClientContext): void; +export declare function apply(ctx: Context): void; diff --git a/lib/types/client/locales.d.ts b/lib/types/client/locales.d.ts index fa7d363..2b5beb4 100644 --- a/lib/types/client/locales.d.ts +++ b/lib/types/client/locales.d.ts @@ -4,7 +4,7 @@ */ import type { LocaleDictOf } from '@deepseek-ai/dsh-client-ui-slots'; /** Dictionary keys of the workspaceGroups namespace (single source of truth). */ -export type WorkspaceGroupsKey = 'section.workspaces' | 'section.sessions' | 'search' | 'search.placeholder' | 'search.clear' | 'search.noMatches' | 'search.unavailable' | 'search.pending' | 'search.hasMore' | 'search.results.aria' | 'workspace.add' | 'workspace.addBusy' | 'workspace.addError' | 'workspace.addErrorTitle' | 'workspace.rename' | 'workspace.delete' | 'workspace.deleteTitle' | 'workspace.deleteConfirm' | 'workspace.deleteCancel' | 'workspace.renaming' | 'workspace.deleting' | 'workspace.renameTitle' | 'workspace.renamePlaceholder' | 'workspace.renameConfirm' | 'workspace.renameCancel' | 'workspace.moveOutOfGroup' | 'group.create' | 'group.createTitle' | 'group.createPlaceholder' | 'group.createConfirm' | 'group.createCancel' | 'group.rename' | 'group.renameTitle' | 'group.renameConfirm' | 'group.delete' | 'group.deleteTitle' | 'group.deleteConfirm' | 'group.deleteCancel' | 'group.nameDuplicate' | 'group.nameReserved' | 'section.topLevel' | 'manual.saveError' | 'session.new' | 'session.rename' | 'session.archive' | 'session.fork' | 'session.renameTitle' | 'session.renamePlaceholder' | 'session.renameConfirm' | 'session.renameCancel' | 'session.renaming' | 'uncategorized' | 'empty.none' | 'empty.noWorkspaces' | 'close' | 'cancel' | 'confirm' | 'retry' | 'configUnavailable' | 'collapse' | 'expandMore' | 'newSession'; +export type WorkspaceGroupsKey = 'section.workspaces' | 'section.sessions' | 'search' | 'search.placeholder' | 'search.clear' | 'search.noMatches' | 'search.unavailable' | 'search.pending' | 'search.hasMore' | 'search.results.aria' | 'workspace.add' | 'workspace.addBusy' | 'workspace.addError' | 'workspace.addErrorTitle' | 'workspace.rename' | 'workspace.delete' | 'workspace.deleteTitle' | 'workspace.deleteConfirm' | 'workspace.deleteCancel' | 'workspace.renaming' | 'workspace.deleting' | 'workspace.renameTitle' | 'workspace.renamePlaceholder' | 'workspace.renameConfirm' | 'workspace.renameCancel' | 'workspace.moveOutOfGroup' | 'workspace.openInFolder' | 'workspace.openInFolderError' | 'group.create' | 'group.createTitle' | 'group.createPlaceholder' | 'group.createConfirm' | 'group.createCancel' | 'group.rename' | 'group.renameTitle' | 'group.renameConfirm' | 'group.delete' | 'group.deleteTitle' | 'group.deleteConfirm' | 'group.deleteCancel' | 'group.nameDuplicate' | 'group.nameReserved' | 'section.topLevel' | 'manual.saveError' | 'session.new' | 'session.rename' | 'session.archive' | 'session.fork' | 'session.renameTitle' | 'session.renamePlaceholder' | 'session.renameConfirm' | 'session.renameCancel' | 'session.renaming' | 'uncategorized' | 'empty.none' | 'empty.noWorkspaces' | 'close' | 'cancel' | 'confirm' | 'retry' | 'configUnavailable' | 'collapse' | 'expandMore' | 'newSession' | 'quick.title' | 'quick.tab.workspaces' | 'quick.tab.sessions' | 'quick.search.placeholder' | 'quick.search.sessions' | 'quick.empty.workspaces' | 'quick.action.newSession' | 'quick.action.running' | 'quick.action.noneRunning' | 'quick.empty.sessions' | 'quick.select.hint' | 'quick.hint' | 'tabs.aria' | 'tabs.close' | 'tabs.archive'; export type WorkspaceGroupsDict = LocaleDictOf<'workspaceGroups'>; /** Simplified Chinese dictionary. */ export declare const zh: WorkspaceGroupsDict; diff --git a/lib/types/client/open-folder.d.ts b/lib/types/client/open-folder.d.ts new file mode 100644 index 0000000..a958be5 --- /dev/null +++ b/lib/types/client/open-folder.d.ts @@ -0,0 +1,34 @@ +/** + * Transport for the official open-in-app host routes served by + * `@deepseek-ai/dsh-host-open-in-app`. The project row offers "open this + * project's folder" by asking that host half for the applications it verified + * as installed, then POSTing the launcher it already resolved — this plugin + * never probes or spawns a launcher itself, and a host without the capability + * (no resolved application, e.g. an SSH launch) simply yields no menu entry. + */ +/** GET route serving the probed application ids (host-owned constant). */ +export declare const OPEN_IN_APP_APPS_ROUTE = "/open-in-app/apps"; +/** POST route launching one resolved application on one absolute directory. */ +export declare const OPEN_IN_APP_OPEN_ROUTE = "/open-in-app/open"; +/** + * The installed file-manager id for this host, or undefined when the host + * resolved none (the row then offers no "open in folder" entry). + * @param apps - installed catalog ids from the apps route. + * @returns the preferred available id. + */ +export declare function folderAppId(apps: readonly string[]): string | undefined; +/** + * Read the host's installed-application ids. A host without the capability + * (or one that refuses) reads as an empty list rather than an error, so the + * caller can treat "no apps" and "no route" identically. + * @param signal - aborts the read when the browser half unmounts. + * @returns installed catalog ids, in host menu order. + */ +export declare function fetchOpenInApps(signal?: AbortSignal): Promise; +/** + * Launch one installed application on one absolute directory. + * @param appId - catalog id from the apps route. + * @param path - the project's absolute directory. + * @returns after the host acknowledged the launch; rejects on any refusal. + */ +export declare function openPathInApp(appId: string, path: string): Promise; diff --git a/lib/types/client/quick.d.ts b/lib/types/client/quick.d.ts new file mode 100644 index 0000000..48abe82 --- /dev/null +++ b/lib/types/client/quick.d.ts @@ -0,0 +1,74 @@ +/** + * Pure data shaping for the Ctrl+R quick switch panel. Runtime-free (same + * discipline as store-core.ts): unit tests exercise the real semantics + * without a browser module loader; the panel only binds them to the + * framework's global hooks. + */ +import type { SessionId } from '@deepseek-ai/dsh-session/types'; +import type { SessionListState, SessionSummary } from '@deepseek-ai/dsh-api-session-controller/client'; +import type { WorkspaceView } from '@deepseek-ai/dsh-api-workspace-controller/client'; +/** + * Running quick-switchable sessions across the whole list, newest first. + * @param list - sessions list snapshot. + * @param archived - registry-global archive set (archived rows never surface). + * @returns running summaries in recency order (id as deterministic tiebreak). + */ +export declare function runningSessions(list: SessionListState, archived: ReadonlySet): SessionSummary[]; +/** + * Every quick-switchable session across the whole list — the sessions tab's + * data: running rows pinned on top, everything else under them, both groups + * newest first. Visibility mirrors the tree (subagent rows never; archived + * never; a blank row only while it is the open session). + * @param list - sessions list snapshot. + * @param archived - registry-global archive set (archived rows never surface). + * @param current - the selected session (`mainView` retention; keeps its blank row visible). + * @returns summaries with running first, then recency (id as deterministic tiebreak). + */ +export declare function allSessions(list: SessionListState, archived: ReadonlySet, current: SessionId | undefined): SessionSummary[]; +/** + * Session search for the quick panel: display-title or owning-workspace-title + * substring match (trimmed, case-insensitive). Filters only — the incoming + * running-first/recency order is preserved verbatim, so "running on top" + * survives any query. + * @param sessions - allSessions() output (running pinned on top, then recency). + * @param query - raw query. + * @param workspaceTitleOf - owning workspace title resolver (sub-line source). + * @param limit - hard render cap. + * @returns matching sessions in the given order. + */ +export declare function filterSessions(sessions: readonly SessionSummary[], query: string, workspaceTitleOf: (session: SessionSummary) => string | undefined, limit?: number): SessionSummary[]; +/** + * Most recently updated running session inside one workspace. + * @param list - sessions list snapshot. + * @param workspace - target workspace (its session account order is irrelevant; + * recency picks the row). + * @returns the session id, or undefined when nothing in the workspace runs. + */ +export declare function latestRunningInWorkspace(list: SessionListState, workspace: WorkspaceView): SessionId | undefined; +/** + * Running-session count per workspace id (badge on the workspace tab rows). + * @param running - runningSessions() output. + * @param workspaces - real workspaces in stable Host order. + * @returns counts keyed by workspace id; absent key = none running. + */ +export declare function runningCountByWorkspace(running: readonly SessionSummary[], workspaces: readonly WorkspaceView[]): Map; +/** + * The workspace that owns the currently open session. + * @param workspaces - real workspaces in stable Host order. + * @param currentSessionId - the selected session (`mainView` retention); may be undefined + * (no session open, cleared selection) or an id no listed workspace holds + * (e.g. an addressed subagent session). + * @returns the workspace id, or undefined when there is no active workspace. + */ +export declare function activeWorkspaceId(workspaces: readonly WorkspaceView[], currentSessionId: SessionId | undefined): string | undefined; +/** + * Workspace search for the quick panel: title prefix → title substring → + * category label substring → path substring; ties keep host order via a + * stable title compare inside one rank. + * @param workspaces - real workspaces in stable Host order. + * @param query - raw query (trimmed, case-insensitive). + * @param categoryLabelOf - category label resolver (grouped workspaces only). + * @param limit - hard render cap. + * @returns ranked matches; an empty query returns host order. + */ +export declare function filterWorkspaces(workspaces: readonly WorkspaceView[], query: string, categoryLabelOf?: (workspace: WorkspaceView) => string | undefined, limit?: number): WorkspaceView[]; diff --git a/lib/types/client/rows.d.ts b/lib/types/client/rows.d.ts index f481349..fa4a2cb 100644 --- a/lib/types/client/rows.d.ts +++ b/lib/types/client/rows.d.ts @@ -8,7 +8,7 @@ * workspace rows, standing for their containing category) are drop targets. * The payload is a custom dataTransfer type so only in-plugin drags land. */ -import { type DragEvent } from 'react'; +import { type DragEvent, type ReactNode } from 'react'; import { type StateDotState } from '@deepseek-ai/dsh-client-ui-primitives'; import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots'; import type { CategoryNode, SessionNode, WorkspaceGroupNode } from './tree.ts'; @@ -52,7 +52,7 @@ export declare function CategoryRow({ node, t, onToggle, onRename, onDelete, dro onDragStartCategory?: (event: DragEvent) => void; } & RowDropProps): import("react").JSX.Element; /** One workspace folder row inside a category: draggable source + drop target. */ -export declare function WorkspaceRow({ node, t, onToggle, onNewSession, onRename, onDelete, canMoveOut, onMoveOut, flat, dropActive, insertLine, onRowDragOver, onRowDragLeave, onRowDrop, onDragStartExtra }: { +export declare function WorkspaceRow({ node, t, onToggle, onNewSession, onRename, onDelete, canMoveOut, onMoveOut, onOpenInFolder, flat, dropActive, insertLine, onRowDragOver, onRowDragLeave, onRowDrop, onDragStartExtra }: { node: WorkspaceGroupNode; t: T; onToggle: () => void; @@ -62,11 +62,28 @@ export declare function WorkspaceRow({ node, t, onToggle, onNewSession, onRename /** Project currently sits inside a group — offer "move out of group". */ canMoveOut?: boolean; onMoveOut?: () => void; + /** + * Open the project directory in the host's file manager. Omitted when the + * host resolved no folder application (no capability, or a remote launch), + * which keeps the entry out of the menu entirely. + */ + onOpenInFolder?: () => void; /** Render as a top-level row (no folder indentation). */ flat?: boolean; /** Extra dragstart hook (e.g. collapse all expanded projects while dragging). */ onDragStartExtra?: () => void; } & RowDropProps): import("react").JSX.Element; +/** + * Children container for one folder's rows. + * + * Keeps the tree's `role="group"` semantics and gives the rows a single + * positioned ancestor. It used to draw a per-folder guide rail; that is now the + * flower branch's job (one continuous stem for the whole tree, see + * `FlowerBranch.tsx`), so this is structure only. + */ +export declare function TreeChildren({ children }: { + children: ReactNode; +}): import("react").JSX.Element; /** One session leaf row. */ export declare function SessionRow({ node, currentId, now, t, onOpen, onRename, onFork, onArchive }: { node: SessionNode; diff --git a/lib/types/client/store-hook.d.ts b/lib/types/client/store-hook.d.ts new file mode 100644 index 0000000..83c2e22 --- /dev/null +++ b/lib/types/client/store-hook.d.ts @@ -0,0 +1,7 @@ +import type { ActionsDecl, StoreInstance } from '@deepseek-ai/dsh-client-store'; +/** + * Build a selector hook bound to one store instance. + * @param instance - the live store instance (snapshot source). + * @returns a `SnapshotSelectorHook`-compatible hook over that instance. + */ +export declare function createStoreHook>(instance: StoreInstance): (selector: (state: T) => S, eq?: (a: S, b: S) => boolean) => S; diff --git a/lib/types/client/stores.d.ts b/lib/types/client/stores.d.ts index b6d4c92..7d1477e 100644 --- a/lib/types/client/stores.d.ts +++ b/lib/types/client/stores.d.ts @@ -10,7 +10,7 @@ * unit tests exercise the real semantics without a browser module loader; * this file only binds them through defineStore. */ -import { type EngineStoreHandle } from '@deepseek-ai/dsh-client-runtime/client'; +import { type EngineStoreHandle } from '@deepseek-ai/dsh-client-store'; import { retainKeysImpl, setCategoryExpandedImpl, setWorkspaceExpandedImpl, type GroupsViewState } from './store-core.ts'; /** Annotation twin of the actions literal below (structural type, satisfies `ActionsDecl`). */ type GroupsViewActions = { diff --git a/lib/types/client/subagent-lineage.d.ts b/lib/types/client/subagent-lineage.d.ts new file mode 100644 index 0000000..92dda3b --- /dev/null +++ b/lib/types/client/subagent-lineage.d.ts @@ -0,0 +1,27 @@ +/** + * Plugin-owned projection of descendant counts from Session summaries. + * + * 0.1.2 移除了 `@deepseek-ai/dsh-client-runtime/client`(平台模块表不再提供 + * `indexSubagentDescendants`),官方 ui-workspace 改为各自持有本地副本 + * (packages/client/ui-workspace/src/client/subagent-lineage.ts,MIT)。这里 + * 保持同一实现,使运行中的子代理会话数在树行上继续可见。 + */ +import type { SessionId } from '@deepseek-ai/dsh-session/types'; +interface LineageEntry { + readonly id: SessionId; + readonly parentId?: SessionId; + readonly origin?: 'subagent'; + readonly running: boolean; +} +/** Descendant counts for one possible parent Session. */ +export interface SubagentDescendantSummary { + readonly count: number; + readonly runningCount: number; +} +/** + * Index uninterrupted subagent descendants under each ancestor. + * @param summaries - Session summaries keyed by id. + * @returns descendant totals keyed by possible parent id. + */ +export declare function indexSubagentDescendants(summaries: Readonly>): ReadonlyMap; +export {}; diff --git a/lib/types/client/tab-persist.d.ts b/lib/types/client/tab-persist.d.ts new file mode 100644 index 0000000..7af703b --- /dev/null +++ b/lib/types/client/tab-persist.d.ts @@ -0,0 +1,41 @@ +/** + * Client side of the session-tab persistence, talking to + * `GET|PUT /workspace-groups/tabs` on the host. + * + * Why not browser storage: **the origin includes the PORT**, and every `dsh web` + * / `dsh test` / desktop launch picks a different one. `localStorage` and + * `sessionStorage` are both scoped to the origin, so they start empty on the + * next launch — a tab list kept there survives a reload only when the port + * happens to match. The host's JSON sidecar has no such problem, which is why + * the strip is stored there and read back verbatim. + * + * There is deliberately no per-browser-session marker. A marker has to live in + * browser storage, which the port invalidates, so every restart looked like a + * fresh session and silently discarded the user's tabs — the exact failure this + * module exists to prevent. + * + * Every call is best-effort: a failed read means "no tabs" and a failed write is + * swallowed, because the strip is a convenience and must never break the app. + */ +/** Host route holding the strip. */ +export declare const TABS_ROUTE = "/workspace-groups/tabs"; +/** One tab as it crosses the wire. */ +export interface WireTab { + readonly sessionId: string; + readonly order: number; +} +/** + * Fetch the stored strip. + * @param fetchImpl - fetch implementation (injectable for tests). + * @returns the tabs, oldest first; empty on any failure. + */ +export declare function loadTabs(fetchImpl?: typeof fetch): Promise; +/** + * Store the strip. Failures are swallowed. + * @param state - the client's current strip and its arrival counter. + * @param fetchImpl - fetch implementation (injectable for tests). + */ +export declare function saveTabs(state: { + order: number; + tabs: readonly WireTab[]; +}, fetchImpl?: typeof fetch): Promise; diff --git a/lib/types/client/tab-seat.d.ts b/lib/types/client/tab-seat.d.ts new file mode 100644 index 0000000..36bbfcd --- /dev/null +++ b/lib/types/client/tab-seat.d.ts @@ -0,0 +1,56 @@ +/** + * DOM seat for the session tab strip. + * + * Why this exists instead of a slot: the strip belongs at the very top of the + * conversation column — `pI_x6G_centerCol` (ui-layout's AppFrame `.centerCol`, + * a hashed CSS-Modules class). That column declares NO child slots: its only + * child is the `main` slot's occupant (`renderSlot('main', …)`, the + * Conversation or a global panel), so there is nowhere to register. The + * shipped slot in that neighbourhood — `conversation.composer.dock` — is the + * band UNDER the composer card, a different place entirely. + * + * So the strip gets a real DOM seat: this module finds the column, prepends a + * `
` to it, and hands that element to a React portal. The element is + * OURS, never React's: it is inserted outside the column's child list that + * React reconciles, and it is re-inserted if React (or a theme/titlebar + * re-render) ever drops it. + * + * Two hazards this module is built around: + * + * 1. `centerCol` is a hashed class name (`pI_x6G_centerCol`) that changes when + * the package is rebuilt. Matching is therefore done on the *structural* + * contract — a grid-item column that holds the `main` panel — plus a + * `[class*="_centerCol"]` probe, never on the exact hash. + * 2. The column mounts after the client plugin's `apply()` runs. Discovery is + * therefore a MutationObserver on `document.body` plus a `requestAnimationFrame` + * retry, and both are torn down when the owning effect disposes. + */ +/** A mounted seat: the host element plus the disposer that removes it. */ +export interface TabSeat { + /** + * The element the React portal renders into — null until the conversation + * column mounts. The portal is simply not rendered while this is null. + */ + readonly host: HTMLElement | null; + /** Remove the seat and stop watching for the column. */ + dispose: () => void; +} +/** + * Ensure a seat exists as the FIRST child of the conversation column, creating + * it if needed, and keep it there for as long as the returned handle is live. + * + * The seat element is created once and reused: a portal that re-mounts into a + * fresh node on every shell re-render would drop the tab strip's React state + * and visible focus. If React removes the node (it owns the column's child + * list, and our node is not part of it), the observer re-inserts the SAME + * element, so the portal's subtree moves with it. + * + * @param onReady - called with the host element each time it becomes attached + * (once immediately when the column already exists). Used to seed React + * state; may fire more than once if the column is remounted. + * @returns the seat handle. `host` is null until the column appears, so the + * caller renders nothing meanwhile and starts rendering when `onReady` + * fires. Never null: a missing column must degrade to "no strip", not to a + * thrown error that would take the whole client plugin down. + */ +export declare function mountTabSeat(onReady: (host: HTMLElement) => void): TabSeat; diff --git a/lib/types/client/tab-store.d.ts b/lib/types/client/tab-store.d.ts new file mode 100644 index 0000000..2ed5ca9 --- /dev/null +++ b/lib/types/client/tab-store.d.ts @@ -0,0 +1,79 @@ +/** + * The session-tab store: the `defineStore` binding and nothing else. + * + * The action TRANSFORMS live in `tabs.ts` (pure, runtime-free), so unit tests + * exercise the real semantics without pulling in the store engine — this module + * is the only place that needs `@deepseek-ai/dsh-client-store`, and importing it + * from a test would drag `zustand` into the test process. + * + * One handle, one scope: the tab store is seated by the `sidebar.workspaces` + * entry alone. The tab strip is a CHILD of that entry (rendered through a DOM + * portal into the conversation column), not a second slot registration, so the + * handle is never mounted under a second, differently-scoped slot — which the + * registry rejects outright ("one handle, one scope"). + * + * Placement is navigation, not data: the strip derives its active chip from the + * open session, and arrival order is the strip's only order, so nothing here + * mirrors selection. + */ +import { type EngineStoreHandle, type StoreHandle } from '@deepseek-ai/dsh-client-store'; +import type { SessionId } from '@deepseek-ai/dsh-session/types'; +import { closeTabImpl, restoreTabsImpl, touchTabImpl, type SessionTab, type SessionTabsState } from './tabs.ts'; +export type { SessionTabsState }; +/** + * Session-tab strip actions (bound by the framework, handed to the browser). + * + * There is deliberately NO "drop tabs whose session vanished" action. An open + * tab is closed by the USER and by nothing else — a program that trims the strip + * on its own eventually eats tabs the user wanted, and the whole point of the + * strip is that it holds what you opened. + * + * This is also why the store needs no catalog at all: it never consults one. + */ +export interface SessionTabsActions { + /** Add the open session, or leave its existing tab untouched in place. */ + touch: (sessionId: SessionId) => void; + /** Close one tab; navigation is untouchable from here (the caller decides). */ + close: (sessionId: SessionId) => void; + /** + * Replace the strip with tabs loaded from the host. + * + * The host read is a `fetch`, so it cannot happen inside `init()`. This action + * is how the async result lands, and it is a no-op once the user has already + * opened a tab — a slow response must never discard what they just did. + */ + restore: (tabs: readonly SessionTab[]) => void; +} +/** Annotation twin of the actions literal below (structural `ActionsDecl`). */ +type SessionTabsActionsDecl = { + touch: typeof touchTabImpl; + close: typeof closeTabImpl; + restore: typeof restoreTabsImpl; +}; +/** + * The tab store's registered handle: identity + spec + the instance factory the + * framework resolves per entry x scope. It deliberately does NOT claim the live + * instance's faces (`getSnapshot` / `actions`) — `defineStore`'s concrete return + * is structurally narrower, and this alias has to stay a type that value can be + * assigned to. + */ +export type SessionTabsStoreHandle = StoreHandle; +/** + * The live tab store value: the handle's `create()` product, which carries the + * baked write set and the snapshot source. Named here so the registrations and + * the strip's props can share one type without importing the store engine. + */ +export type SessionTabsInstance = ReturnType['create']>; +/** + * Create the session-tab store handle. + * + * The strip starts EMPTY and is hydrated by the caller through the `restore` + * action: persistence lives on the host behind a `fetch`, which cannot run + * during `init()`. Browser storage is deliberately not used — the origin + * includes the port, and every launch picks a new one, so `localStorage` and + * `sessionStorage` both start empty on the next start. + * + * @returns the store handle (spec + type + identity + factory in one). + */ +export declare function createSessionTabsStore(): EngineStoreHandle; +export type { SessionTab }; diff --git a/lib/types/client/tabs.d.ts b/lib/types/client/tabs.d.ts new file mode 100644 index 0000000..d6b95eb --- /dev/null +++ b/lib/types/client/tabs.d.ts @@ -0,0 +1,227 @@ +/** + * Pure session-tab state: the ordered strip of sessions the user has opened, + * the active one, and each tab's derived presentation. + * + * Position model: a tab's place in the strip is decided ONCE, when it is first + * opened, and never changes afterwards. Switching to a tab, or re-opening a + * session that already has one, leaves the strip exactly as it was — so clicking + * a chip never moves the chip out from under the pointer. Only two events change + * the order: a session opening for the FIRST time (append) and a tab closing + * (remove). + * + * Runtime-free on purpose (same discipline as `store-core.ts` / `quick.ts`): + * the component owns the ref + React state, this module owns every rule, and + * unit tests exercise the real semantics without a browser module loader. + * + * Retention note: a tab outlives whatever it points at. The strip is a list of + * things the USER opened, so nothing here consults the session catalog — a tab + * whose session is gone stays visible until the user closes it, and no + * background sweep ever trims the strip. + */ +import type { SessionId } from '@deepseek-ai/dsh-session/types'; +import type { SessionSummary } from '@deepseek-ai/dsh-api-session-controller/client'; +import type { SessionStatus } from '@deepseek-ai/dsh-client-ui-session/client'; +/** One open tab: a session id plus its arrival key (React list identity). */ +export interface SessionTab { + /** The session the tab shows. */ + readonly sessionId: SessionId; + /** + * Monotonic arrival key. It doubles as the React `key`, so it must stay + * attached to the session for the tab's whole life — a reused key would make + * React move an existing chip's DOM node instead of reconciling it in place. + */ + readonly order: number; +} +/** Feature switch: whether opening a session also surfaces a tab. */ +export type TabOpenMode = 'auto' | 'manual'; +/** Per-tab indicator derived from the catalog summary and the live UI status. */ +export interface SessionTabIndicator { + /** A domain request is waiting for the user (approval / plan review / question). */ + readonly attention: boolean; + /** The agent is producing output, or a descendant subagent is. */ + readonly running: boolean; + /** The turn finished while the tab was in the background and was never looked at. */ + readonly unread: boolean; + /** Idle tab whose session already has a title (a settled conversation). */ + readonly settled: boolean; +} +/** + * Add a session to the strip, or leave an existing entry exactly where it is. + * + * Arrival order is the strip's only order, so re-opening a session that already + * has a tab is a NO-OP: the tab keeps its position and its arrival key. Moving + * it to the front here would fight the whole point of stable positions — a user + * clicking through sessions would watch the strip reshuffle on every click. + * + * @param tabs - current strip (oldest first). + * @param sessionId - arriving session. + * @param nextOrder - monotonic arrival counter to spend when appending. + * @returns the strip, unchanged (same array) when the session already has a tab. + */ +export declare function appendTab(tabs: readonly SessionTab[], sessionId: SessionId, nextOrder: number): SessionTab[]; +/** + * Remove one session's tab. An absent session leaves the strip untouched. + * @param tabs - current strip. + * @param sessionId - session whose tab closes. + * @returns a new strip. + */ +export declare function removeTab(tabs: readonly SessionTab[], sessionId: SessionId): SessionTab[]; +/** + * Order the strip for display: strictly by arrival, regardless of which tab is + * active. + * + * Position is a property of the TAB, not of the selection. Switching to a tab + * must not move it — an earlier version pulled the active tab to the front, + * which made every click reshuffle the strip and slid the chip out from under + * the pointer that had just clicked it. + * + * `activeId` is therefore accepted only to document that "active" deliberately + * does NOT participate in ordering; it is unused. The returned array is a copy + * so callers cannot mutate the store's state through it. + * + * @param tabs - strip in arrival order. + * @param activeId - the open session, if it has a tab (intentionally unused). + * @returns a new array in arrival order. + */ +export declare function orderedTabs(tabs: readonly SessionTab[], activeId: SessionId | undefined): SessionTab[]; +/** + * Whether the open session must surface a tab. + * + * A tab means "this conversation is in play right now", not "I once opened + * this". Browsing history is what the sidebar is for; opening an old + * conversation to read it should not litter the strip, which is the whole point + * of the strip being a working set rather than a second session list. + * + * A session therefore earns a tab only once a conversation has actually STARTED + * in it and is still engaged, which is any of: + * - **running** — the agent is producing output (including subagents); + * - **waiting on you** — an approval / plan review / question is pending; + * - **unseen completion** — it finished while you were elsewhere, so the tab is + * the thing that tells you to come back. + * + * A still-blank draft gets NO tab: the tab appears the moment the first message + * is sent (which is when the controller flips `blank` on `turn/start`). Once the + * turn ends and you have read the result, the session is settled history and + * does not earn a tab — so clicking through finished conversations leaves the + * strip alone. Tabs already opened stay open: this gate only decides whether a + * NEW tab appears, never whether an existing one closes. + * + * `blank` (from `sessionListMetadata`) is exactly "no turn has started": the + * controller flips it to false on `turn/start`. It is the right signal for + * "has this conversation begun", and the wrong one ALONE — a conversation + * finished a week ago is also non-blank, which is why the earlier `!blank` rule + * surfaced every old conversation the user clicked. + * + * @param mode - feature switch ('auto' applies the engagement rule). + * @param summary - the session's catalog row (absent while the catalog has not + * caught up with a just-created session). + * @param status - the session's unified UI status (absent → no live signal). + * @returns true when a tab belongs in the strip. + */ +export declare function shouldOpenTab(mode: TabOpenMode, summary: SessionSummary | undefined, status: SessionStatus | undefined): boolean; +/** + * Derive one tab's indicators from the catalog row and the unified UI status. + * @param summary - the tab session's catalog row (absent → inert indicators). + * @param status - the tab session's unified UI status (absent → idle). + * @returns the indicator quadruple. + */ +export declare function tabIndicator(summary: SessionSummary | undefined, status: SessionStatus | undefined): SessionTabIndicator; +/** + * Where one session lives: the project (workspace) that accounts for it. + * + * Tabs carry this because a strip of bare session titles is ambiguous once + * several projects are open — two checkouts both named "api", or a session + * titled after a file, give no hint which project it belongs to. + */ +export interface TabProject { + /** Stable workspace id. */ + readonly workspaceId: string; + /** Display label: the workspace title, falling back to its directory name. */ + readonly label: string; + /** Canonical directory path, for the tooltip. */ + readonly path: string; +} +/** + * Index sessions by the project that owns them. + * + * Membership comes from the workspace registry (`sessionIds`), which is the same + * authority the sidebar tree uses — a tab and its sidebar row therefore agree on + * the project without a second derivation. + * + * Built once per render pass rather than scanned per tab: a strip of N tabs over + * M projects is O(N×M) with a naive `find` per tab. + * + * @param workspaces - workspace views from the controller snapshot. + * @returns a session id → project map; sessions in no workspace are absent. + */ +export declare function projectIndex(workspaces: readonly WorkspaceViewLike[]): ReadonlyMap; +/** Minimal workspace shape this module needs (keeps it importable in tests). */ +export interface WorkspaceViewLike { + readonly workspaceId: string; + readonly path: string; + readonly title: string; + readonly sessionIds: readonly SessionId[]; +} +/** + * Display label for a project: its title, else the directory basename. + * @param workspace - workspace view. + * @returns a non-empty label, falling back to the raw path. + */ +export declare function projectLabel(workspace: Pick): string; +/** + * Whether two strips are the same sequence of sessions (arrival keys ignored). + * @param left - previous strip. + * @param right - next strip. + * @returns true when no entry was added, removed, or reordered. + */ +export declare function sameTabs(left: readonly SessionTab[], right: readonly SessionTab[]): boolean; +/** Session-tab strip state (the shape the store persists). */ +export interface SessionTabsState { + /** Open tabs in arrival order — the strip's one and only order. */ + tabs: SessionTab[]; + /** Monotonic arrival counter; each FIRST-time session spends one. */ + order: number; +} +/** + * Store transform: add the open session, or leave its existing tab in place. + * + * Live here rather than in `tab-store.ts` so unit tests can exercise the real + * semantics without importing `@deepseek-ai/dsh-client-store` (which pulls + * `zustand` into the test process). The store module binds these into its + * actions table. + * + * The no-op guard matters: this runs on EVERY catalog change for the open + * session, so an unguarded write would wake the strip and spend arrival keys on + * every projection tick. + * + * @param state - store draft, mutated in place. + * @param sessionId - the session that just became open. + */ +export declare function touchTabImpl(state: SessionTabsState, sessionId: SessionId): void; +/** + * Store transform: close one tab. Closing a session that has no tab is not a + * state change, so it writes nothing. + * @param state - store draft, mutated in place. + * @param sessionId - the tab to close. + */ +export declare function closeTabImpl(state: SessionTabsState, sessionId: SessionId): void; +/** + * Store transform: adopt tabs loaded from the host, MERGING with whatever is + * already in the strip. + * + * Async by nature (the host read is a `fetch`), so it can land after the browser + * has already opened a tab for the current session. Merging — rather than + * "ignore the read if the strip is non-empty" — is what makes a restart safe: + * the tab opened during startup survives AND the stored tabs still come back. + * (Bailing on a non-empty strip would silently drop every stored tab whenever + * the startup tab won the race, which is the common case for a session that is + * running or unread.) + * + * The arrival counter is lifted above every restored key so a tab opened later + * cannot reuse one; a reused key makes React move a chip's DOM node instead of + * reconciling it. + * + * @param state - store draft, mutated in place. + * @param tabs - tabs read from the host, oldest first. + */ +export declare function restoreTabsImpl(state: SessionTabsState, tabs: readonly SessionTab[]): void; diff --git a/lib/types/client/tree.d.ts b/lib/types/client/tree.d.ts index 43acf8a..6640279 100644 --- a/lib/types/client/tree.d.ts +++ b/lib/types/client/tree.d.ts @@ -4,8 +4,25 @@ * scans. Session visibility rules mirror the official ui-workspace tree * (blank rows only when current, archived excluded, subagent rows excluded). */ -import { type PendingInteractionStatus, type SessionId, type SessionListState, type SessionSearchResultItem, type WorkspaceId, type WorkspaceView } from '@deepseek-ai/dsh-client-runtime/client'; +import type { SessionListState, SessionSearchResultItem } from '@deepseek-ai/dsh-api-session-controller/client'; +import type { WorkspaceId, WorkspaceView } from '@deepseek-ai/dsh-api-workspace-controller/client'; +import type { SessionStatusSnapshot } from '@deepseek-ai/dsh-client-ui-session/client'; +import type { SessionId } from '@deepseek-ai/dsh-session/types'; import { type GroupsConfig, type ManualGroups } from '../core/types.ts'; +/** Pending interaction kinds with dedicated Workspace-row presentation. */ +export type SessionPendingInteractionStatus = 'approval' | 'plan-review' | 'question'; +/** Current unified UI status by Session (ui-session snapshot). */ +type SessionStatuses = SessionStatusSnapshot; +/** + * The Session the Conversation is currently showing. + * + * 0.1.6 removed `SessionListState.current`: selection is expressed as the + * Session retained through the `mainView` reference source (the ui-workspace + * navigation holds exactly one). Same read the official browser performs. + * @param list - sessions list snapshot. + * @returns the retained Session id, or undefined while no Session is selected. + */ +export declare function currentSessionId(list: SessionListState): SessionId | undefined; /** One top-level session row inside a workspace folder. */ export interface SessionNode { id: SessionId; @@ -13,7 +30,7 @@ export interface SessionNode { title: string; /** The provisional blank session (renderer shows the localized New Session title). */ blank: boolean; - pendingInteraction?: PendingInteractionStatus; + pendingInteraction?: SessionPendingInteractionStatus; running: boolean; /** Running descendants connected through uninterrupted subagent-origin lineage. */ runningSubagentCount: number; @@ -72,11 +89,13 @@ export declare function workspaceLabel(cwd: string | undefined): string; * @param view - local expansion arrays. * @param manual - runtime overlay (manual groups + overrides). A workspace's * manual override wins over rule classification; removing it reverts to rules. + * @param statuses - unified UI status by Session (drives the running / warning + * / unread-completion row indicators); defaults to none (tests). * @returns category sections in render order (rule categories first, then * manual-only ones, uncategorized last). Manual groups render even while * empty; empty rule buckets stay hidden. */ -export declare function deriveGroups(list: SessionListState, workspaces: readonly WorkspaceView[], archivedSessionIds: readonly SessionId[], config: GroupsConfig, view: GroupsTreeView, manual: ManualGroups): CategoryNode[]; +export declare function deriveGroups(list: SessionListState, workspaces: readonly WorkspaceView[], archivedSessionIds: readonly SessionId[], config: GroupsConfig, view: GroupsTreeView, manual: ManualGroups, statuses?: SessionStatuses): CategoryNode[]; /** * Top-level (ungrouped) workspace rows: workspaces resolving to no category * (no manual override and no matching rule, or a forced `null` override). @@ -84,7 +103,7 @@ export declare function deriveGroups(list: SessionListState, workspaces: readonl * folder), in manual top-level order (`workspaceOrder[TOP_LEVEL_ORDER_KEY]`), * falling back to host registration order. */ -export declare function deriveTopLevel(list: SessionListState, workspaces: readonly WorkspaceView[], archivedSessionIds: readonly SessionId[], config: GroupsConfig, view: GroupsTreeView, manual: ManualGroups): WorkspaceGroupNode[]; +export declare function deriveTopLevel(list: SessionListState, workspaces: readonly WorkspaceView[], archivedSessionIds: readonly SessionId[], config: GroupsConfig, view: GroupsTreeView, manual: ManualGroups, statuses?: SessionStatuses): WorkspaceGroupNode[]; /** Bounded set of matched sessions plus content snippets (feeds the search tree). */ export interface SearchMatchSet { /** Session ids that matched (local metadata hits + Host content hits). */ @@ -124,7 +143,10 @@ export interface SearchTree { * @param archivedSessionIds - registry-global archive set. * @param manual - runtime overlay (manual groups + overrides). * @param snippetsBySession - optional content-match snippets keyed by session id. + * @param statuses - unified UI status by Session (drives the running / warning + * / unread-completion row indicators); defaults to none (tests). * @returns group folders in render order plus top-level matched workspaces, * pruned to matched branches only. */ -export declare function deriveSearchGroups(list: SessionListState, workspaces: readonly WorkspaceView[], config: GroupsConfig, matchedIds: ReadonlySet, archivedSessionIds: readonly SessionId[], manual: ManualGroups, snippetsBySession?: ReadonlyMap): SearchTree; +export declare function deriveSearchGroups(list: SessionListState, workspaces: readonly WorkspaceView[], config: GroupsConfig, matchedIds: ReadonlySet, archivedSessionIds: readonly SessionId[], manual: ManualGroups, snippetsBySession?: ReadonlyMap, statuses?: SessionStatuses): SearchTree; +export {}; diff --git a/lib/types/core/types.d.ts b/lib/types/core/types.d.ts index 3473327..7f13469 100644 --- a/lib/types/core/types.d.ts +++ b/lib/types/core/types.d.ts @@ -1,5 +1,5 @@ /** - * Shared config types for dsh-workspace-groups. Pure types (zero runtime + * Shared config types for @dsh-xhl/workspace-groups. Pure types (zero runtime * deps) so both halves — the node half (sidecar YAML reading) and the * browser half (tree derivation) — compile against the same contract. */ diff --git a/lib/types/host-tabs.d.ts b/lib/types/host-tabs.d.ts new file mode 100644 index 0000000..e30cc6e --- /dev/null +++ b/lib/types/host-tabs.d.ts @@ -0,0 +1,54 @@ +/** One persisted tab. */ +export interface PersistedTab { + /** Session id the tab points at. */ + readonly sessionId: string; + /** Arrival key (React list identity). */ + readonly order: number; +} +/** The persisted document. */ +export interface TabsDocument { + /** Shape version; a mismatch discards the file rather than guessing. */ + readonly version: 1; + /** Arrival counter, kept ahead of every tab's own order. */ + readonly order: number; + readonly tabs: readonly PersistedTab[]; +} +/** Default location: `$DSH_HOME/workspace-groups.tabs.json`. */ +export declare function defaultTabsPath(): string; +/** + * Parse + shape-validate a tabs document. + * + * Tolerant on purpose: this file is a display cache, so a malformed one must + * read as "no tabs" rather than break the strip. Individual bad rows are dropped + * and the rest kept. Unknown fields (such as the `sessionKey` an older build + * wrote) are ignored, so an existing file keeps working across the change. + * + * @param raw - parsed JSON value. + * @returns the normalized document, or null when it is unusable. + */ +export declare function parseTabsDocument(raw: unknown): TabsDocument | null; +/** + * Read the tabs document. + * + * A missing file is not an error (first run). A corrupt one is reported as null + * so the caller starts empty, and the next write repairs the file. + * + * @param path - sidecar path. + * @returns the document, or null when absent/unusable. + */ +export declare function readTabsDocument(path: string): Promise; +/** + * Write the tabs document atomically. + * @param path - sidecar path. + * @param document - document to store. + */ +export declare function writeTabsDocument(path: string, document: TabsDocument): Promise; +/** + * Build the document to persist. + * @param state - the client's current strip and its arrival counter. + * @returns the document to write. + */ +export declare function documentForTabs(state: { + order: number; + tabs: readonly PersistedTab[]; +}): TabsDocument; diff --git a/lib/types/index.d.ts b/lib/types/index.d.ts index 2433efe..3e44da6 100644 --- a/lib/types/index.d.ts +++ b/lib/types/index.d.ts @@ -1,6 +1,6 @@ import type { GroupsContext } from './context-types.ts'; /** Plugin identity for cordis.yml rows. */ -export declare const name = "dsh-workspace-groups"; +export declare const name = "@dsh-xhl/workspace-groups"; /** Services required before mounting: the webserver route. */ export declare const inject: string[]; /** Plugin body: mount the config snapshot route and the overlay write route. */ diff --git a/package.json b/package.json index 72fa9c0..ca1d304 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "dsh-workspace-groups", - "version": "0.1.0", - "description": "Complete workspace grouping manager for the DSH web sidebar: 分类 → 项目 → 会话 three-level tree, manual group create/rename/delete, drag-and-drop grouping & ordering with insertion indicator, rule-based auto-classification, tree search. Sidecar YAML + runtime overlay, zero core-storage intrusion.", + "name": "@dsh-xhl/workspace-groups", + "version": "0.4.2", + "description": "Complete workspace grouping manager for the DSH web sidebar: 分类 → 项目 → 会话 three-level tree, manual group create/rename/delete, drag-and-drop grouping & ordering with insertion indicator, rule-based auto-classification, tree search, plus the session tab strip seated in the conversation column head. Sidecar YAML + runtime overlay, zero core-storage intrusion.", "keywords": [ "dsh", "deepseek-harness", @@ -15,6 +15,9 @@ ], "type": "module", "license": "MIT", + "publishConfig": { + "access": "public" + }, "repository": { "type": "git", "url": "https://github.com/z-col/dsh-workspace-groups" @@ -36,7 +39,10 @@ "files": [ "lib", "cordis.patch.yml", - "README.md" + "README.md", + "README_ZH.md", + "screenshot.png", + "workspace-groups.example.yaml" ], "engines": { "node": ">=20" @@ -48,14 +54,21 @@ "client": { "platform": "web", "inject": [ - "@deepseek-ai/dsh-client-runtime", + "@deepseek-ai/dsh-api-remotes", + "@deepseek-ai/dsh-api-session-controller", + "@deepseek-ai/dsh-api-workspace-controller", + "@deepseek-ai/dsh-client-connection", "@deepseek-ai/dsh-client-locale", - "@deepseek-ai/dsh-client-ui-slots" + "@deepseek-ai/dsh-client-ui-conversation", + "@deepseek-ai/dsh-client-ui-renderer", + "@deepseek-ai/dsh-client-ui-session", + "@deepseek-ai/dsh-client-ui-sidebar", + "@deepseek-ai/dsh-client-ui-workspace" ] } }, "scripts": { - "build": "rm -rf lib && pnpm build:types && tsdown", + "build": "node -e \"require('node:fs').rmSync('lib', { recursive: true, force: true })\" && pnpm build:types && tsdown", "build:types": "tsc -p tsconfig.build.json --noEmit false --declaration --emitDeclarationOnly --outDir lib/types", "watch": "tsdown --watch", "typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.client.json --noEmit", @@ -63,14 +76,19 @@ "test": "vitest run" }, "peerDependencies": { - "@deepseek-ai/cordis": "^4.0.1", - "@deepseek-ai/dsh-client-connection": "^0.1.1-rc.2", - "@deepseek-ai/dsh-client-locale": "^0.1.1-rc.2", - "@deepseek-ai/dsh-client-runtime": "^0.1.1-rc.2", - "@deepseek-ai/dsh-client-ui-primitives": "^0.1.1-rc.2", - "@deepseek-ai/dsh-client-ui-sidebar": "^0.1.1-rc.2", - "@deepseek-ai/dsh-client-ui-slots": "^0.1.1-rc.2", - "@deepseek-ai/dsh-host-webserver": "^0.1.1-rc.2", + "@deepseek-ai/cordis": "^4.0.2", + "@deepseek-ai/dsh-api-remotes": ">=0.1.7-rc.2 <0.3.0", + "@deepseek-ai/dsh-api-session-controller": ">=0.1.7-rc.2 <0.3.0", + "@deepseek-ai/dsh-api-workspace-controller": ">=0.1.7-rc.2 <0.3.0", + "@deepseek-ai/dsh-client-locale": ">=0.1.7-rc.2 <0.3.0", + "@deepseek-ai/dsh-client-store": ">=0.1.7-rc.2 <0.3.0", + "@deepseek-ai/dsh-client-ui-primitives": ">=0.1.7-rc.2 <0.3.0", + "@deepseek-ai/dsh-client-ui-session": ">=0.1.7-rc.2 <0.3.0", + "@deepseek-ai/dsh-client-ui-sidebar": ">=0.1.7-rc.2 <0.3.0", + "@deepseek-ai/dsh-client-ui-slots": ">=0.1.7-rc.2 <0.3.0", + "@deepseek-ai/dsh-client-ui-workspace": ">=0.1.7-rc.2 <0.3.0", + "@deepseek-ai/dsh-host-webserver": ">=0.1.7-rc.2 <0.3.0", + "@deepseek-ai/dsh-session": ">=0.1.7-rc.2 <0.3.0", "react": "^18.2.0", "react-dom": "^18.2.0" }, @@ -83,18 +101,26 @@ "js-yaml": "^4.1.0" }, "devDependencies": { - "@deepseek-ai/cordis": "^4.0.1", - "@deepseek-ai/dsh-client-connection": "^0.1.1-rc.2", - "@deepseek-ai/dsh-client-locale": "^0.1.1-rc.2", - "@deepseek-ai/dsh-client-runtime": "^0.1.1-rc.2", - "@deepseek-ai/dsh-client-ui-primitives": "^0.1.1-rc.2", - "@deepseek-ai/dsh-client-ui-sidebar": "^0.1.1-rc.2", - "@deepseek-ai/dsh-client-ui-slots": "^0.1.1-rc.2", - "@deepseek-ai/dsh-host-webserver": "^0.1.1-rc.2", + "@deepseek-ai/cordis": "^4.0.4", + "@deepseek-ai/dsh-api-remotes": "0.2.0-rc.1", + "@deepseek-ai/dsh-api-session-controller": "0.2.0-rc.1", + "@deepseek-ai/dsh-api-workspace-controller": "0.2.0-rc.1", + "@deepseek-ai/dsh-client-locale": "0.2.0-rc.1", + "@deepseek-ai/dsh-client-store": "0.2.0-rc.1", + "@deepseek-ai/dsh-client-ui-conversation": "0.2.0-rc.1", + "@deepseek-ai/dsh-client-ui-primitives": "0.2.0-rc.1", + "@deepseek-ai/dsh-client-ui-renderer": "0.2.0-rc.1", + "@deepseek-ai/dsh-client-ui-session": "0.2.0-rc.1", + "@deepseek-ai/dsh-client-ui-sidebar": "0.2.0-rc.1", + "@deepseek-ai/dsh-client-ui-slots": "0.2.0-rc.1", + "@deepseek-ai/dsh-client-ui-workspace": "0.2.0-rc.1", + "@deepseek-ai/dsh-host-webserver": "0.2.0-rc.1", + "@deepseek-ai/dsh-session": "0.2.0-rc.1", "@types/js-yaml": "^4.0.9", "@types/node": "^24.0.0", "@types/react": "~18.3.1", "@types/react-dom": "~18.3.0", + "immer": "^11.1.18", "js-yaml": "^4.1.0", "jsdom": "^30.0.1", "lightningcss": "^1.32.0", @@ -102,6 +128,7 @@ "react-dom": "^18.2.0", "tsdown": "^0.22.2", "typescript": "^5.6.0", - "vitest": "^4.1.8" + "vitest": "4.1.8", + "zustand": "^5.0.15" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d2e143e..3b818d9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,29 +13,50 @@ importers: version: 4.3.1 devDependencies: '@deepseek-ai/cordis': - specifier: ^4.0.1 - version: 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-client-connection': - specifier: ^0.1.1-rc.2 - version: 0.1.1-rc.2(9b40f28fccfb9ee3f86188afc9586c29) + specifier: ^4.0.4 + version: 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-api-remotes': + specifier: 0.2.0-rc.1 + version: 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))) + '@deepseek-ai/dsh-api-session-controller': + specifier: 0.2.0-rc.1 + version: 0.2.0-rc.1(a61a6d3d3854e846fb13450f23ec98d8) + '@deepseek-ai/dsh-api-workspace-controller': + specifier: 0.2.0-rc.1 + version: 0.2.0-rc.1(8ea96509e133f65c1732f88269631b18) '@deepseek-ai/dsh-client-locale': - specifier: ^0.1.1-rc.2 - version: 0.1.1-rc.2(048e7c438545728704e82d9acbc5c221) - '@deepseek-ai/dsh-client-runtime': - specifier: ^0.1.1-rc.2 - version: 0.1.1-rc.2(601e9129357dc48738583e18d75d19b2) + specifier: 0.2.0-rc.1 + version: 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-client-store': + specifier: 0.2.0-rc.1 + version: 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-client-ui-conversation': + specifier: 0.2.0-rc.1 + version: 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) '@deepseek-ai/dsh-client-ui-primitives': - specifier: ^0.1.1-rc.2 - version: 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) + specifier: 0.2.0-rc.1 + version: 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-client-ui-renderer': + specifier: 0.2.0-rc.1 + version: 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-client-ui-session': + specifier: 0.2.0-rc.1 + version: 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) '@deepseek-ai/dsh-client-ui-sidebar': - specifier: ^0.1.1-rc.2 - version: 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-client-locale@0.1.1-rc.2(048e7c438545728704e82d9acbc5c221))(@deepseek-ai/dsh-client-runtime@0.1.1-rc.2(601e9129357dc48738583e18d75d19b2))(@deepseek-ai/dsh-client-ui-layout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-client-runtime@0.1.1-rc.2(601e9129357dc48738583e18d75d19b2))(@deepseek-ai/dsh-client-ui-theme@0.1.1-rc.2(a6c39110759121c55549be9a5dac7bf7))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) + specifier: 0.2.0-rc.1 + version: 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) '@deepseek-ai/dsh-client-ui-slots': - specifier: ^0.1.1-rc.2 - version: 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) + specifier: 0.2.0-rc.1 + version: 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-client-ui-workspace': + specifier: 0.2.0-rc.1 + version: 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) '@deepseek-ai/dsh-host-webserver': - specifier: ^0.1.1-rc.2 - version: 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) + specifier: 0.2.0-rc.1 + version: 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-session': + specifier: 0.2.0-rc.1 + version: 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))) '@types/js-yaml': specifier: ^4.0.9 version: 4.0.9 @@ -48,6 +69,9 @@ importers: '@types/react-dom': specifier: ~18.3.0 version: 18.3.7(@types/react@18.3.31) + immer: + specifier: ^11.1.18 + version: 11.2.9 jsdom: specifier: ^30.0.1 version: 30.0.1 @@ -67,8 +91,11 @@ importers: specifier: ^5.6.0 version: 5.9.3 vitest: - specifier: ^4.1.8 - version: 4.1.11(@types/node@24.13.3)(jsdom@30.0.1)(vite@8.2.2(@types/node@24.13.3)) + specifier: 4.1.8 + version: 4.1.8(@types/node@24.13.3)(jsdom@30.0.1)(vite@8.2.2(@types/node@24.13.3)(yaml@2.9.1)) + zustand: + specifier: ^5.0.15 + version: 5.0.16(@types/react@18.3.31)(immer@11.2.9)(react@18.3.1)(use-sync-external-store@1.2.0(react@18.3.1)) packages: @@ -120,511 +147,518 @@ packages: resolution: {integrity: sha512-QxULHAm7cNu72w97JUNCBFODFaXpbDg+dP8b/oWFAZ2MTRppA3U00Y2L1HqaS4J6yBqxwa/Y3nMBaxVKbB/NsA==} engines: {node: '>=20.19.0'} - '@deepseek-ai/cordis-plugin-include@1.0.6': - resolution: {integrity: sha512-i1VXrZCbv6tk/iUgedCNjrxxArbWT3IvRZGB5sdqJ3ectnihivXXQbRZ8JJ73DSmAPvlMGmrbtjFAfm10yvXRg==} + '@deepseek-ai/cordis-plugin-group@1.0.5': + resolution: {integrity: sha512-PGYqImAydmAjmy5fl1Js6qDmk0Ivt1fipa3fOj1KyyRd0tZ9i61a2rhzHc7LaSeBb/spJ1LF4k3Pcppaq+w8fw==} peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/cordis-plugin-loader': ^1.0.2 + '@deepseek-ai/cordis': ~4.0.5 + '@deepseek-ai/cordis-plugin-loader': ~1.0.6 - '@deepseek-ai/cordis-plugin-loader@1.0.2': - resolution: {integrity: sha512-RIW9hoVyhYDWdCI9BsvtZccPde1ECLC4OAxupwowGTak78vwVTVdb3HezTSOK1Y1/Ax3Ru0LA1pYOB04CnTxIQ==} + '@deepseek-ai/cordis-plugin-include@1.0.10': + resolution: {integrity: sha512-Rdo6Uqf9WfDbfN3dsYkYj/EW+SGuWCSfthz1PoOtZYUr6qrRpqD7ND4Gj3nUYj8XhSGIo8E3xpsck6J5nM5BYQ==} peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - node-addon-require-builtin: ^0.1.4 + '@deepseek-ai/cordis': ~4.0.5 + '@deepseek-ai/cordis-plugin-loader': ~1.0.6 + + '@deepseek-ai/cordis-plugin-loader@1.0.6': + resolution: {integrity: sha512-fr011A782oEjkJXCY4pePt2qaPpkGvem7Rmst6Rhwgg6icgwI4eN9QBRb6S/q9XOYGVQUdvL0wXUWyNxO8WipA==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.5 + node-addon-require-builtin: ^0.1.9 peerDependenciesMeta: node-addon-require-builtin: optional: true - '@deepseek-ai/cordis@4.0.1': - resolution: {integrity: sha512-YBdskTU2Po1kru3GgcUWUbkTsPMA9LkSQDAY8rBkFJeajdgcQad3QPJZE26JyK99Xb6HaASvoXg2DSUTeN/0Nw==} + '@deepseek-ai/cordis@4.0.5': + resolution: {integrity: sha512-Sktq5axy0owk9PdnivBRNOJjHEVEibCt0+TDDZcv0+UH2KS1M910fX4kn5y45YFsrpZIi1mJf/1s5VzywMUnyg==} hasBin: true peerDependencies: - '@deepseek-ai/cordis-plugin-include': ^1.0.6 - '@deepseek-ai/cordis-plugin-loader': ^1.0.2 + '@deepseek-ai/cordis-plugin-include': ~1.0.10 + '@deepseek-ai/cordis-plugin-loader': ~1.0.6 peerDependenciesMeta: '@deepseek-ai/cordis-plugin-include': optional: true '@deepseek-ai/cordis-plugin-loader': optional: true - '@deepseek-ai/cosmokit@1.8.2': - resolution: {integrity: sha512-muBOKtSrUKU5m/xpq8ZXWL6hQ/jgd4PhU2PqH97bcxIiLEJfNwZOGQEx4t/aS/GgxRAR+ra9pMHPMtTHU4sqqA==} + '@deepseek-ai/cosmokit@1.8.6': + resolution: {integrity: sha512-ZSD/fN52L498LBIOYwjIOlaLv5veY6ZEwI2yzvZUKQtctn0QAPqu8tKdJ+OF5+Tv6NBq1U+wJWH+QI6OGy5EvQ==} - '@deepseek-ai/dsh-agent-default-model@0.1.1-rc.2': - resolution: {integrity: sha512-Pv+4p20Eol7Ds/n0OS0vjtChCWfFTJAMThxugXcEcLKEJ9WAtpI4mzWfLgjmeVXnwD2yvp6HlLKDrrQV9PIkww==} + '@deepseek-ai/dsh-agent-default-model@0.2.0-rc.1': + resolution: {integrity: sha512-blP7HPyC1PMyCYVU22fcGdFJX0YWflNGFaVn7D2lmgd7BuD5f0o+SibFLSFr0VGU6b32ZlSGC4TABoxxBn8Btw==} peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-agent': ^0.1.1-rc.2 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - '@deepseek-ai/dsh-llm': ^0.1.1-rc.2 - '@deepseek-ai/dsh-settings': ^0.1.1-rc.2 + '@deepseek-ai/cordis': ~4.0.4 + '@deepseek-ai/dsh-agent': 0.2.0-rc.1 + '@deepseek-ai/dsh-llm': 0.2.0-rc.1 - '@deepseek-ai/dsh-agent-presets@0.1.1-rc.2': - resolution: {integrity: sha512-88r3jkrbdwTgcP3MZLIUX458Ecu8JcLmZa7PtPszwf33yFoWlZvZmgjyn5ETHV55plNQ8gKMRm9a0RwzGGmzCw==} + '@deepseek-ai/dsh-agent-preset-registry@0.2.0-rc.1': + resolution: {integrity: sha512-66oQDnV4N0vaolLb+/YjfnDlK1+HeIORqCs0kAVsDeyFCKwyxvQhy6JJdAfm8S1nhQdC5Qo8u4IQ9UjYjhlncA==} peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/cordis-plugin-include': ^1.0.6 - '@deepseek-ai/cordis-plugin-loader': ^1.0.2 - '@deepseek-ai/dsh-agent': ^0.1.1-rc.2 - '@deepseek-ai/dsh-atomic-write': ^0.1.1-rc.2 - '@deepseek-ai/dsh-home-paths': ^0.1.1-rc.2 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - '@deepseek-ai/dsh-scope': ^0.1.1-rc.2 - '@deepseek-ai/dsh-session': ^0.1.1-rc.2 - '@deepseek-ai/dsh-settings': ^0.1.1-rc.2 - '@deepseek-ai/dsh-system-prompt': ^0.1.1-rc.2 + '@deepseek-ai/cordis': ~4.0.4 + '@deepseek-ai/cordis-plugin-include': ~1.0.9 + '@deepseek-ai/cordis-plugin-loader': ~1.0.5 + '@deepseek-ai/dsh-agent': 0.2.0-rc.1 + '@deepseek-ai/dsh-invariants': 0.2.0-rc.1 + '@deepseek-ai/dsh-scope': 0.2.0-rc.1 + '@deepseek-ai/dsh-session': 0.2.0-rc.1 + '@deepseek-ai/dsh-session-projection': 0.2.0-rc.1 + '@deepseek-ai/dsh-settings': 0.2.0-rc.1 + '@deepseek-ai/dsh-system-prompt': 0.2.0-rc.1 + '@deepseek-ai/dsh-tools': 0.2.0-rc.1 + '@deepseek-ai/dsh-typert-protocol': 0.2.0-rc.1 - '@deepseek-ai/dsh-agent@0.1.1-rc.2': - resolution: {integrity: sha512-cC7lnJe7JgPFcreNXxcxLMxQd78LnpVO9ZXROjZsGRQN1zGH6i/DduI892F1am85IfzzO+XTxMwwUHmfwamb0g==} + '@deepseek-ai/dsh-agent@0.2.0-rc.1': + resolution: {integrity: sha512-PQ4Qtu7QiI6j2n730p8RJ+u4l7ywwhVJ4NeIe/Tj86hBYYZNvNT8iMhViECn+GSepAk7GmM/1eb7e7hvmYhsKA==} peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - '@deepseek-ai/dsh-llm': ^0.1.1-rc.2 - '@deepseek-ai/dsh-scope': ^0.1.1-rc.2 - '@deepseek-ai/dsh-session': ^0.1.1-rc.2 - '@deepseek-ai/dsh-system-prompt': ^0.1.1-rc.2 - '@deepseek-ai/dsh-typert-protocol': ^0.1.1-rc.2 + '@deepseek-ai/cordis': ~4.0.4 + '@deepseek-ai/dsh-invariants': 0.2.0-rc.1 + '@deepseek-ai/dsh-llm': 0.2.0-rc.1 + '@deepseek-ai/dsh-scope': 0.2.0-rc.1 + '@deepseek-ai/dsh-session': 0.2.0-rc.1 + '@deepseek-ai/dsh-session-projection': 0.2.0-rc.1 + '@deepseek-ai/dsh-system-prompt': 0.2.0-rc.1 + '@deepseek-ai/dsh-typert-protocol': 0.2.0-rc.1 + '@deepseek-ai/dsh-util-values': 0.2.0-rc.1 + '@deepseek-ai/dsh-workspace': 0.2.0-rc.1 + peerDependenciesMeta: + '@deepseek-ai/dsh-workspace': + optional: true - '@deepseek-ai/dsh-api-gateway@0.1.1-rc.2': - resolution: {integrity: sha512-i/e/Ecg1QCjMePUFHBfjRQU3NbDV0IdORwQbQD6RpiirzyvAIm4vvZgmW/FfgkO2XYJHHIVjo3i1i0YaHPcQag==} + '@deepseek-ai/dsh-api-gateway@0.2.0-rc.1': + resolution: {integrity: sha512-HoBQyk/S5HtUJaQ3GDPWV2WvTq7BxVWlJoU4d/DYbpfzPdnb94ZUzY3fgi6g+xQqW2q80zq+k9tuJpVciypR1w==} peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-client-connection': ^0.1.1-rc.2 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - '@deepseek-ai/dsh-typert-registry': ^0.1.1-rc.2 + '@deepseek-ai/cordis': ~4.0.4 + '@deepseek-ai/dsh-client-connection': 0.2.0-rc.1 - '@deepseek-ai/dsh-api-remotes@0.1.1-rc.2': - resolution: {integrity: sha512-mtmMxA0TZwTjy46E2DF0kmsPCXVq6RBhrwEHWXBaRzc0DLjnYqmJODrZ0X+XwXOkwFZtDxWSv/uheiIsXf8now==} + '@deepseek-ai/dsh-api-remotes@0.2.0-rc.1': + resolution: {integrity: sha512-XJYSFJ6pR/12mneBwAvtgOcoBFu7qhVXYZ3M3B3qtZDnVN6i7iR5IAu90ZqqsMU1oqUgIfqfyFne4XRiii3GPg==} peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-agent': ^0.1.1-rc.2 - '@deepseek-ai/dsh-agent-presets': ^0.1.1-rc.2 - '@deepseek-ai/dsh-api-gateway': ^0.1.1-rc.2 - '@deepseek-ai/dsh-commands': ^0.1.1-rc.2 - '@deepseek-ai/dsh-cordis-host-runner': ^0.1.1-rc.2 - '@deepseek-ai/dsh-credentials': ^0.1.1-rc.2 - '@deepseek-ai/dsh-file-reference': ^0.1.1-rc.2 - '@deepseek-ai/dsh-goal': ^0.1.1-rc.2 - '@deepseek-ai/dsh-host-plugin-inventory': ^0.1.1-rc.2 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - '@deepseek-ai/dsh-llm': ^0.1.1-rc.2 - '@deepseek-ai/dsh-message-feedback': ^0.1.1-rc.2 - '@deepseek-ai/dsh-session': ^0.1.1-rc.2 - '@deepseek-ai/dsh-session-persistence': ^0.1.1-rc.2 - '@deepseek-ai/dsh-session-reference': ^0.1.1-rc.2 - '@deepseek-ai/dsh-settings': ^0.1.1-rc.2 - '@deepseek-ai/dsh-typert-registry': ^0.1.1-rc.2 + '@deepseek-ai/cordis': ~4.0.4 + '@deepseek-ai/dsh-scope': 0.2.0-rc.1 - '@deepseek-ai/dsh-atomic-write@0.1.1-rc.2': - resolution: {integrity: sha512-QqNSF0+Ddn6qWY480dlilwEy6FLv3JKEWx1UQgoNJrxD4y54SDRzqBQB9yDXWKOoOGyC+05TN6/Px10GNIzMWA==} + '@deepseek-ai/dsh-api-session-controller@0.2.0-rc.1': + resolution: {integrity: sha512-0oSU0vdUjQycdVPvqZeEGrnBvRiKySgLOqZ/FwDYh0FjcpD8/1SKAKhsNKq8IavjiYEXluFpT55dvOEfmicEkA==} peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - - '@deepseek-ai/dsh-attachment@0.1.1-rc.2': - resolution: {integrity: sha512-rCYAt8QsawP1yfDCU7XxNwYT/XWvyFsxYrkwhLLkdfW83QVD0CQHizSkTQE7RFX74nKUD1z3sTLfnLr7xneArw==} - peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-brand': ^0.1.1-rc.2 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - - '@deepseek-ai/dsh-brand@0.1.1-rc.2': - resolution: {integrity: sha512-8vXsAXoUdzKAgvd/E9DgyT6HKmR6ZM4rtJ3fs/XoJ6n2kBk4tWil8Lv+jxCMWJeMOnTJF55gu2+NWQ3ECFPtJw==} - peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - - '@deepseek-ai/dsh-client-connection@0.1.1-rc.2': - resolution: {integrity: sha512-YX2WLA/aZdDQsien4Zo7IHTEfYVJ+4QhRXbgA6BrRUM23NSP/+V3K00dQYyQVsF3ZwocE5uyvlZvbYeg1Iz4ug==} - peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-attachment': ^0.1.1-rc.2 - '@deepseek-ai/dsh-commands': ^0.1.1-rc.2 - '@deepseek-ai/dsh-host-apiproxy': ^0.1.1-rc.2 - '@deepseek-ai/dsh-host-webserver': ^0.1.1-rc.2 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - '@deepseek-ai/dsh-llm': ^0.1.1-rc.2 - '@deepseek-ai/dsh-session': ^0.1.1-rc.2 - '@deepseek-ai/dsh-tools': ^0.1.1-rc.2 - - '@deepseek-ai/dsh-client-locale@0.1.1-rc.2': - resolution: {integrity: sha512-AMoR4FwMPLmt6WlYd4m0PCoxXj4qqMhpElBQZSc3r3NyGCZIuleU8tCG1xphGtr/w9mA1Y0kUX7Ftdmf7yV4FQ==} - peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-api-remotes': ^0.1.1-rc.2 - '@deepseek-ai/dsh-client-connection': ^0.1.1-rc.2 - '@deepseek-ai/dsh-client-runtime': ^0.1.1-rc.2 - '@deepseek-ai/dsh-client-ui-settings': ^0.1.1-rc.2 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - '@deepseek-ai/dsh-settings': ^0.1.1-rc.2 - - '@deepseek-ai/dsh-client-runtime@0.1.1-rc.2': - resolution: {integrity: sha512-o1FH7Rlns0Xaxh4SBOWZ1wpa0ViGw6DXWNm5NFpsBTGYD94RGdIrud3QxgrfzmQKLzu33gvS8JL/IjqbzWyYsg==} - peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-agent': ^0.1.1-rc.2 - '@deepseek-ai/dsh-api-remotes': ^0.1.1-rc.2 - '@deepseek-ai/dsh-attachment': ^0.1.1-rc.2 - '@deepseek-ai/dsh-client-connection': ^0.1.1-rc.2 - '@deepseek-ai/dsh-commands': ^0.1.1-rc.2 - '@deepseek-ai/dsh-host-apiproxy': ^0.1.1-rc.2 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - '@deepseek-ai/dsh-llm': ^0.1.1-rc.2 - '@deepseek-ai/dsh-llm-retry': ^0.1.1-rc.2 - '@deepseek-ai/dsh-session': ^0.1.1-rc.2 - '@deepseek-ai/dsh-session-projection': ^0.1.1-rc.2 - '@deepseek-ai/dsh-session-title': ^0.1.1-rc.2 - '@deepseek-ai/dsh-tools': ^0.1.1-rc.2 - '@deepseek-ai/dsh-typert-protocol': ^0.1.1-rc.2 - '@deepseek-ai/dsh-typert-registry': ^0.1.1-rc.2 - - '@deepseek-ai/dsh-client-ui-layout@0.1.1-rc.2': - resolution: {integrity: sha512-y7xSQyQYGuahLyJcSXpB+JbH1F5lGEc3L9K8cjLy5vd/L9N6gLFLWyeGdlGxxM4jxRt1+rAHDDZ/zl7b8GC5zQ==} - peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-client-runtime': ^0.1.1-rc.2 - '@deepseek-ai/dsh-client-ui-theme': ^0.1.1-rc.2 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - - '@deepseek-ai/dsh-client-ui-primitives@0.1.1-rc.2': - resolution: {integrity: sha512-vCWEha1yhY//26j/LppHC/xZrU6MOuw6lcI4bJr5L7ppbY8h7GAR24ozBr+4ESMtQ5OmsvqGnsa/Kj5ZjSLfEQ==} - peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - - '@deepseek-ai/dsh-client-ui-settings@0.1.1-rc.2': - resolution: {integrity: sha512-WqEQkyjW467leTJoA31BgqM+nALI3JnrvN1IXDhJuKd8E9nXhTLJcRgDrovEUkh2cjbHF8g8gQJ5Qafg9PzJiQ==} - peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-api-remotes': ^0.1.1-rc.2 - '@deepseek-ai/dsh-client-connection': ^0.1.1-rc.2 - '@deepseek-ai/dsh-client-runtime': ^0.1.1-rc.2 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - '@deepseek-ai/dsh-settings': ^0.1.1-rc.2 - - '@deepseek-ai/dsh-client-ui-sidebar@0.1.1-rc.2': - resolution: {integrity: sha512-UCilyaNPwMO54JYtpCW5leLL+ecwtoRd4sHNVNG94aPQAqZOrqH+hqrBBsuolDJ9d0cKG9K5Mtew0fPz/hByZA==} - peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-client-locale': ^0.1.1-rc.2 - '@deepseek-ai/dsh-client-runtime': ^0.1.1-rc.2 - '@deepseek-ai/dsh-client-ui-layout': ^0.1.1-rc.2 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - - '@deepseek-ai/dsh-client-ui-slots@0.1.1-rc.2': - resolution: {integrity: sha512-6uBi+Wq+dH1Q8RaJpbK66TjzPlkcSNDWvNZgQXw45RRQCi1gnm/gxFOyJcSQvgqk4pvm2/h/aIvaM/Pa5PRFCA==} - peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - - '@deepseek-ai/dsh-client-ui-theme@0.1.1-rc.2': - resolution: {integrity: sha512-gRKI92D+EZtOy7UBkRfNvyL4e/3HikZ7exQSfgGpLEJ278/aXMvStNbL5ZgWVC41+MSZsBUk3dZAfbXNjelz2g==} - peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-api-remotes': ^0.1.1-rc.2 - '@deepseek-ai/dsh-client-connection': ^0.1.1-rc.2 - '@deepseek-ai/dsh-client-locale': ^0.1.1-rc.2 - '@deepseek-ai/dsh-client-runtime': ^0.1.1-rc.2 - '@deepseek-ai/dsh-client-ui-settings': ^0.1.1-rc.2 - '@deepseek-ai/dsh-host-webserver': ^0.1.1-rc.2 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - '@deepseek-ai/dsh-settings': ^0.1.1-rc.2 - - '@deepseek-ai/dsh-code-runtime@0.1.1-rc.2': - resolution: {integrity: sha512-SgFresqH5UABzRQZ7tOfqzOLMHF7089VeH+mfcwNQH5peOavgEKrAGOYz/9RnISH0XmMrj/x177t8gfO8Uvo/w==} - peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - - '@deepseek-ai/dsh-commands@0.1.1-rc.2': - resolution: {integrity: sha512-BOIe4Sht9rmMv1a6b3GWjWBbeWr7PtHlAy41vgpaymvUUuzOapOIA648ZMGCI/crRIt72Umev2FHtSwCNSbYZg==} - peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-agent': ^0.1.1-rc.2 - '@deepseek-ai/dsh-attachment': ^0.1.1-rc.2 - '@deepseek-ai/dsh-brand': ^0.1.1-rc.2 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - '@deepseek-ai/dsh-llm': ^0.1.1-rc.2 - '@deepseek-ai/dsh-scope': ^0.1.1-rc.2 - '@deepseek-ai/dsh-session': ^0.1.1-rc.2 - '@deepseek-ai/dsh-typert-protocol': ^0.1.1-rc.2 - - '@deepseek-ai/dsh-compaction@0.1.1-rc.2': - resolution: {integrity: sha512-LV5GAIx7GO8DCRivnN2bmLmuucsYDG+ifG18BaXBqsVKdrzmaIu5o+CBxQAI2bX1N6mfBenLxmvCnROkyumLTg==} - peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-brand': ^0.1.1-rc.2 - '@deepseek-ai/dsh-commands': ^0.1.1-rc.2 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - '@deepseek-ai/dsh-llm': ^0.1.1-rc.2 - '@deepseek-ai/dsh-session': ^0.1.1-rc.2 - - '@deepseek-ai/dsh-cordis-host-runner@0.1.1-rc.2': - resolution: {integrity: sha512-+AQGegPy+gdtcjTTPxDDYwAFUn6BB1J/MFFbmpPr+WIqJoDyVsuCDe8Rr8mCJmxs12CmTZXXSOE03LW203W8fA==} - peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-agent': ^0.1.1-rc.2 - '@deepseek-ai/dsh-brand': ^0.1.1-rc.2 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - '@deepseek-ai/dsh-llm': ^0.1.1-rc.2 - '@deepseek-ai/dsh-scope': ^0.1.1-rc.2 - '@deepseek-ai/dsh-session': ^0.1.1-rc.2 - '@deepseek-ai/dsh-tools': ^0.1.1-rc.2 - '@deepseek-ai/dsh-typert-protocol': ^0.1.1-rc.2 - - '@deepseek-ai/dsh-credentials@0.1.1-rc.2': - resolution: {integrity: sha512-aeVBaH07rox7NuSNbSqbz8g0eNb2IIhNbrZngj/VxUsr/TR9TXOq7lm1CL6SBUDlstGw3vNWeXyhim/DmA5iSQ==} - peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-brand': ^0.1.1-rc.2 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - - '@deepseek-ai/dsh-file-reference@0.1.1-rc.2': - resolution: {integrity: sha512-8Pd4SNHhV6OlbwfV5K4qmFb709I0Z68qgaUQJ7zM4BTjClNe1/dktQnETtWPfqbPTx/2sNKXM1rz4WXuROrIfQ==} - peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-agent': ^0.1.1-rc.2 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - '@deepseek-ai/dsh-typert-protocol': ^0.1.1-rc.2 - - '@deepseek-ai/dsh-goal@0.1.1-rc.2': - resolution: {integrity: sha512-lSHTh4vfS6eRb9to/y+bjRf2+0QkNpY3tHJ29HMTewR9fJYZsEVVu4Hc+GPhPEjF7RpiD35/sKx+akijtDasyg==} - peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-agent': ^0.1.1-rc.2 - '@deepseek-ai/dsh-brand': ^0.1.1-rc.2 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - '@deepseek-ai/dsh-llm': ^0.1.1-rc.2 - '@deepseek-ai/dsh-scope': ^0.1.1-rc.2 - '@deepseek-ai/dsh-session': ^0.1.1-rc.2 - '@deepseek-ai/dsh-session-projection': ^0.1.1-rc.2 - '@deepseek-ai/dsh-typert-protocol': ^0.1.1-rc.2 - - '@deepseek-ai/dsh-home-paths@0.1.1-rc.2': - resolution: {integrity: sha512-lGsP7sbnu20AiRAb+gxYiKx9oa9r1D/8Fr6BwWHXpaPx6ZE4Qg0+ybh5SZVfGQ+XhLcQisu3nwWemEjtTJGiig==} - peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - - '@deepseek-ai/dsh-host-apiproxy@0.1.1-rc.2': - resolution: {integrity: sha512-dplRnGGXXsQYFQ1KMHymAM0iaxuE9Z153JHYcGEgOwXNkS3HA20gSi3yMt6fz+zi/cMHYXvY1JQhS54BTc761A==} - peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-agent-presets': ^0.1.1-rc.2 - '@deepseek-ai/dsh-cordis-host-runner': ^0.1.1-rc.2 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - - '@deepseek-ai/dsh-host-directory-picker@0.1.1-rc.2': - resolution: {integrity: sha512-m3puwS+bvJQ1eASdpEEwlQqKa9znhBSgtoSSI0GZN5VMynZVl7E31HMltENz3QC2Nd+C3bh7vNjrJFtumUDsLQ==} - peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - - '@deepseek-ai/dsh-host-plugin-inventory@0.1.1-rc.2': - resolution: {integrity: sha512-Hud9ezW0bexWfhX7C+c5rdUDX1xzbEGDzj1lGQyj/QxdrxHYHjGrJq3tLRyvN6K4FSmEdG2IBKdQGCOLVrIthA==} - peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/cordis-plugin-loader': ^1.0.2 - '@deepseek-ai/dsh-brand': ^0.1.1-rc.2 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - '@deepseek-ai/dsh-typert-protocol': ^0.1.1-rc.2 - - '@deepseek-ai/dsh-host-webserver@0.1.1-rc.2': - resolution: {integrity: sha512-t9MrjC65QHiiWhG9V8UZxgfE/aWYhJHHrIM0kbTvtXxg4tLGIKo/upHp7iiag65F3HTkVLrH/DUyPMi4v2ZA7g==} - peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - - '@deepseek-ai/dsh-invariants@0.1.1-rc.2': - resolution: {integrity: sha512-l+1Om/EDFyMjhgSuEx2WDLLA2fia/+ga9mBTCoT/MMslsnWaK5G0/lWwbwlTBSaJ6OfmYc3DuBgox8DbgIGHRQ==} - peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - - '@deepseek-ai/dsh-jobs@0.1.1-rc.2': - resolution: {integrity: sha512-SXvDJMvcUrGrlzIyE7j8/lI4Pj1nDe/UOR8C05Zagp+/0R8p46n6KylySvZdPAFENV5t8WX3Fw3eOaS4No0+wQ==} - peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-agent': ^0.1.1-rc.2 - '@deepseek-ai/dsh-brand': ^0.1.1-rc.2 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - '@deepseek-ai/dsh-session': ^0.1.1-rc.2 - - '@deepseek-ai/dsh-llm-retry@0.1.1-rc.2': - resolution: {integrity: sha512-a13Fpmn8HFy8LCjl6gljaNPxcVjO/R+/uMPDl0QLjwQcHWVyGW38ZA8jP5iRuFgdyNNXpyxLWuZXi/0VOH00tA==} - peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-agent': ^0.1.1-rc.2 - '@deepseek-ai/dsh-brand': ^0.1.1-rc.2 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - '@deepseek-ai/dsh-llm': ^0.1.1-rc.2 - '@deepseek-ai/dsh-session': ^0.1.1-rc.2 - '@deepseek-ai/dsh-timeout': ^0.1.1-rc.2 - - '@deepseek-ai/dsh-llm@0.1.1-rc.2': - resolution: {integrity: sha512-ASJfjIdZbIXvLwi3rGo+eZb/GxMVV/WO5/XVD3B96mT8EIzrlw3+nMR6/CvmJVzcycKQ2XN0wj7jD6TasPRySA==} - peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-attachment': ^0.1.1-rc.2 - '@deepseek-ai/dsh-brand': ^0.1.1-rc.2 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - '@deepseek-ai/dsh-timeout': ^0.1.1-rc.2 - - '@deepseek-ai/dsh-message-feedback@0.1.1-rc.2': - resolution: {integrity: sha512-GzxDiNvyUVs/bbbm+Hr3MfuU3wM8ErRF5z9XadnSGPYZvipZDAMrvrS5v6JgOUaZt6ApBpEMJ4xVgIel1VnGYQ==} - peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-brand': ^0.1.1-rc.2 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - '@deepseek-ai/dsh-llm': ^0.1.1-rc.2 - '@deepseek-ai/dsh-session': ^0.1.1-rc.2 - '@deepseek-ai/dsh-session-persistence': ^0.1.1-rc.2 - '@deepseek-ai/dsh-storage-domain': ^0.1.1-rc.2 - '@deepseek-ai/dsh-typert-protocol': ^0.1.1-rc.2 - - '@deepseek-ai/dsh-native-command@0.1.1-rc.2': - resolution: {integrity: sha512-GIknPrwU7vZOUQ2o/ES7Z0uUhUrZGp/yigKP+RXEu41VI9tcybiXQAA8CEdDFmNQ11R2wfYQhr3WO5vy35akWg==} - peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - - '@deepseek-ai/dsh-output-retention@0.1.1-rc.2': - resolution: {integrity: sha512-tCni+bTEp/FWokfz3fqn4p6SzHn6pkY6H3HkS9UY5PHrztUE1ESUQUp41kIVtwUhRmJU7yissqjxe6kLDB6t2Q==} - peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - - '@deepseek-ai/dsh-scope@0.1.1-rc.2': - resolution: {integrity: sha512-Xy3ejL6dwVSluZL7XOWy76ya4pCw1uHwxodDK4O9XiQUiUV4FBXnt0aNJUtMeAFN0c1YujxxCmRniMvuuNn1Nw==} - peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - - '@deepseek-ai/dsh-session-persistence@0.1.1-rc.2': - resolution: {integrity: sha512-dxdYxRfmK5jWtiFFabqRNb/jGGjkXyF2djI7O8IIKmDVjhQiv170zpvhbAhRUuqClEdseCtbQpLBrRm2blzt3g==} - peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-brand': ^0.1.1-rc.2 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - '@deepseek-ai/dsh-session': ^0.1.1-rc.2 - '@deepseek-ai/dsh-timeout': ^0.1.1-rc.2 - - '@deepseek-ai/dsh-session-projection-cache@0.1.1-rc.2': - resolution: {integrity: sha512-UvCRpIb+LoQI/nCLof17xc2P2KuZoucU3VuzfAukfsF3dYZAy5OP7jrCRdVZIvjRfvFUd7G+awdS9sWbnjcolg==} - peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - '@deepseek-ai/dsh-session': ^0.1.1-rc.2 - '@deepseek-ai/dsh-session-persistence': ^0.1.1-rc.2 - '@deepseek-ai/dsh-session-projection': ^0.1.1-rc.2 - '@deepseek-ai/dsh-storage-domain': ^0.1.1-rc.2 - - '@deepseek-ai/dsh-session-projection@0.1.1-rc.2': - resolution: {integrity: sha512-SNaOrjRS4RMXocna6uL33TeS/uhcQ7jDJtJZ1HyDPL06mXUdAgje2MVt8OZCh6dH95xIiqpQQm+KjzeiQnhYSQ==} - peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - '@deepseek-ai/dsh-session': ^0.1.1-rc.2 - - '@deepseek-ai/dsh-session-query@0.1.1-rc.2': - resolution: {integrity: sha512-QxQFRg/KnrZnYiO7fNtTJVTakuGs9ZFRkGGgYuNPzSz1pRqiohGNE/JZzBtq+HMv38RRTRZrM4aIOUV8OgqoXQ==} - peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-brand': ^0.1.1-rc.2 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - '@deepseek-ai/dsh-llm': ^0.1.1-rc.2 - '@deepseek-ai/dsh-session': ^0.1.1-rc.2 - '@deepseek-ai/dsh-session-persistence': ^0.1.1-rc.2 - '@deepseek-ai/dsh-session-title': ^0.1.1-rc.2 + '@deepseek-ai/cordis': ~4.0.4 + '@deepseek-ai/dsh-agent': 0.2.0-rc.1 + '@deepseek-ai/dsh-agent-default-model': 0.2.0-rc.1 + '@deepseek-ai/dsh-agent-preset-registry': 0.2.0-rc.1 + '@deepseek-ai/dsh-api-gateway': 0.2.0-rc.1 + '@deepseek-ai/dsh-attachment': 0.2.0-rc.1 + '@deepseek-ai/dsh-client-connection': 0.2.0-rc.1 + '@deepseek-ai/dsh-client-file-upload': 0.2.0-rc.1 + '@deepseek-ai/dsh-commands': 0.2.0-rc.1 + '@deepseek-ai/dsh-credentials': 0.2.0-rc.1 + '@deepseek-ai/dsh-file-reference': 0.2.0-rc.1 + '@deepseek-ai/dsh-fs': 0.2.0-rc.1 + '@deepseek-ai/dsh-llm': 0.2.0-rc.1 + '@deepseek-ai/dsh-native-command': 0.2.0-rc.1 + '@deepseek-ai/dsh-scope': 0.2.0-rc.1 + '@deepseek-ai/dsh-session': 0.2.0-rc.1 + '@deepseek-ai/dsh-session-persistence': 0.2.0-rc.1 + '@deepseek-ai/dsh-session-projection': 0.2.0-rc.1 + '@deepseek-ai/dsh-session-projection-cache': 0.2.0-rc.1 + '@deepseek-ai/dsh-session-query': 0.2.0-rc.1 + '@deepseek-ai/dsh-session-title': 0.2.0-rc.1 + '@deepseek-ai/dsh-settings': 0.2.0-rc.1 + '@deepseek-ai/dsh-skill': 0.2.0-rc.1 + '@deepseek-ai/dsh-subagent': 0.2.0-rc.1 + '@deepseek-ai/dsh-typert-protocol': 0.2.0-rc.1 + '@deepseek-ai/dsh-typert-registry': 0.2.0-rc.1 + '@deepseek-ai/dsh-util-time': 0.2.0-rc.1 + '@deepseek-ai/dsh-util-values': 0.2.0-rc.1 + '@deepseek-ai/dsh-util-workspace-path': 0.2.0-rc.1 + '@deepseek-ai/dsh-workspace': 0.2.0-rc.1 peerDependenciesMeta: '@deepseek-ai/dsh-session-persistence': optional: true + '@deepseek-ai/dsh-session-projection-cache': + optional: true + '@deepseek-ai/dsh-settings': + optional: true - '@deepseek-ai/dsh-session-reference@0.1.1-rc.2': - resolution: {integrity: sha512-c9mz19ndxjVxSnXEhmJwGDjyKG4oNmu4Sfneix8OUJ+mAr3jIgb/QZZ8rYEc8Bi+Dd1z7Wr90IeWOBF0nolU3A==} + '@deepseek-ai/dsh-api-workspace-controller@0.2.0-rc.1': + resolution: {integrity: sha512-ufdQT5WCoHC2eQNBMX/aMtv8FgKdQs6kIdSQaBRZ+olYgfC9WKh4LeUG96KZFXp1KMvMpgdWgarANHcd6Gwviw==} peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-agent': ^0.1.1-rc.2 - '@deepseek-ai/dsh-compaction': ^0.1.1-rc.2 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - '@deepseek-ai/dsh-llm': ^0.1.1-rc.2 - '@deepseek-ai/dsh-output-retention': ^0.1.1-rc.2 - '@deepseek-ai/dsh-session': ^0.1.1-rc.2 - '@deepseek-ai/dsh-session-query': ^0.1.1-rc.2 - '@deepseek-ai/dsh-typert-protocol': ^0.1.1-rc.2 + '@deepseek-ai/cordis': ~4.0.4 + '@deepseek-ai/dsh-api-gateway': 0.2.0-rc.1 + '@deepseek-ai/dsh-client-connection': 0.2.0-rc.1 + '@deepseek-ai/dsh-host-directory-picker': 0.2.0-rc.1 + '@deepseek-ai/dsh-session': 0.2.0-rc.1 + '@deepseek-ai/dsh-storage-domain': 0.2.0-rc.1 + '@deepseek-ai/dsh-typert-protocol': 0.2.0-rc.1 + '@deepseek-ai/dsh-workspace': 0.2.0-rc.1 - '@deepseek-ai/dsh-session-title@0.1.1-rc.2': - resolution: {integrity: sha512-qHv+9nE6J/piHsWwckmbJBS1sJjunCWsv00arhsgjW1XMLCHxG6QOB+U48P4EBZjve798Tz8AQIlWZy+9T8XmA==} + '@deepseek-ai/dsh-app-boot@0.2.0-rc.1': + resolution: {integrity: sha512-iHUYI+Tc3FlaYay0aLg4LsmZELi8wNWd6DSYrd46enUv0SWgm3qXVFLZivlcKqKWxcjuuvL5JxNemxGiMRIWxQ==} peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-brand': ^0.1.1-rc.2 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - '@deepseek-ai/dsh-llm': ^0.1.1-rc.2 - '@deepseek-ai/dsh-session': ^0.1.1-rc.2 - '@deepseek-ai/dsh-session-projection': ^0.1.1-rc.2 + '@deepseek-ai/cordis': ~4.0.4 + '@deepseek-ai/cordis-plugin-group': ~1.0.4 + '@deepseek-ai/cordis-plugin-include': ~1.0.9 + '@deepseek-ai/cordis-plugin-loader': ~1.0.5 + '@deepseek-ai/dsh-home-paths': 0.2.0-rc.1 + '@deepseek-ai/dsh-launch-environment': 0.2.0-rc.1 + '@deepseek-ai/dsh-system-prompt': 0.2.0-rc.1 - '@deepseek-ai/dsh-session@0.1.1-rc.2': - resolution: {integrity: sha512-4/cv6X9HPhm47eyRhCu/WZwzrtJKegk5J+0xaxcZ9i8S0smdxP57tqy8a0jkSshLQn7BzMFxneQrlYExrLrDhQ==} + '@deepseek-ai/dsh-atomic-write@0.2.0-rc.1': + resolution: {integrity: sha512-xfqotH4A560oEQl+EzvyAJFjhiFF68ywiM/LuSuMQ2xvqLnaX50tJV/WCCBfVguM+4x/hObI0jz4oLDBs0d2Kg==} peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-brand': ^0.1.1-rc.2 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - '@deepseek-ai/dsh-llm': ^0.1.1-rc.2 - '@deepseek-ai/dsh-scope': ^0.1.1-rc.2 - '@deepseek-ai/dsh-typert-protocol': ^0.1.1-rc.2 + '@deepseek-ai/cordis': ~4.0.4 - '@deepseek-ai/dsh-settings@0.1.1-rc.2': - resolution: {integrity: sha512-iGdKEt91Im3gE7xA9CzRfTJsPcFcxDeDOCLhAjzbpjEv7TAjx/EoYP7lPtiy+QmOjKSKy206SEtAKol9PXWbOw==} + '@deepseek-ai/dsh-attachment@0.2.0-rc.1': + resolution: {integrity: sha512-aKKFE9fGYYn1BCzDtun7IYkpiMANYt7s51vwPukkCnobNiLfxHrIyANLWNmMTSpq0iENfqREXPR805K/um8Hfw==} peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-brand': ^0.1.1-rc.2 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - '@deepseek-ai/schemastery': ^3.18.1 + '@deepseek-ai/cordis': ~4.0.4 + '@deepseek-ai/dsh-brand': 0.2.0-rc.1 - '@deepseek-ai/dsh-skill@0.1.1-rc.2': - resolution: {integrity: sha512-FACjlOqdsWX+0RtSs3RWrdY0QQEpPJrBfvxUbWSh7E8UyCM8dKdIbsQnuXIjsAgC7GgYp7lyFDSCMovQ3ARp8g==} + '@deepseek-ai/dsh-brand@0.2.0-rc.1': + resolution: {integrity: sha512-TPeMaUt/Xev0X2TfIf6pSVVGiWAbFHy+VWCIW+w8UkC0yH1ep9302JQOBqhUgefAM4s/3W1R8lra/PMbFhjx2w==} peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - '@deepseek-ai/dsh-llm': ^0.1.1-rc.2 - '@deepseek-ai/dsh-scope': ^0.1.1-rc.2 + '@deepseek-ai/cordis': ~4.0.4 - '@deepseek-ai/dsh-storage-domain@0.1.1-rc.2': - resolution: {integrity: sha512-9/3OuaZpxf9NZWhrARpgZ7UBa03pPaTIiDBw+SfESfwVk42NNLVCQgvnEbrWoNwdtzmv0aYCEV23sKwwlQ0LBA==} + '@deepseek-ai/dsh-chunked-list@0.2.0-rc.1': + resolution: {integrity: sha512-UbIx0v5VuVR58vMX6Tv/myS91HSRakMutKHimBT152JjaVWD75tBx+3luRrGFRZesEJ22tNZ0TdTidRCHKgBKA==} peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - '@deepseek-ai/dsh-storage': ^0.1.1-rc.2 + '@deepseek-ai/cordis': ~4.0.4 - '@deepseek-ai/dsh-storage@0.1.1-rc.2': - resolution: {integrity: sha512-ptJ1ss8spF+Y2VXjsMV37Qh1+hviYWZylDvXtfEBXjLbPi/BP3dktT4B6OMIAD1rRN+0A4HdTqJBgLk7Gp1rig==} + '@deepseek-ai/dsh-client-connection@0.2.0-rc.1': + resolution: {integrity: sha512-aMZvpoyryBUYpqIBxaC8+nYWcwluSCegIU5JIuKnWMyaZLNvMC187ZPm7Bbpvy3pR2hnfWqJaFkl2XQodGfGCA==} peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 + '@deepseek-ai/cordis': ~4.0.4 + '@deepseek-ai/dsh-scope': 0.2.0-rc.1 - '@deepseek-ai/dsh-subagent@0.1.1-rc.2': - resolution: {integrity: sha512-CNa0WuFCR69TMnBKYQInz49/olDSaVHiYkDTyTuDh7YW7Y80/f/HjQe5G0fQaqZMLla3IUSXCIPl5EssWmjcQw==} + '@deepseek-ai/dsh-client-file-upload@0.2.0-rc.1': + resolution: {integrity: sha512-vy7v1lOvHUcVYv2GYxz6+iWVQq3lNiJbcBTxjmDESEyEhpv9mtCA6qE0aIict9GrUmvFVhhVZh8+HyYyQr2yeg==} peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-agent': ^0.1.1-rc.2 - '@deepseek-ai/dsh-agent-presets': ^0.1.1-rc.2 - '@deepseek-ai/dsh-brand': ^0.1.1-rc.2 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - '@deepseek-ai/dsh-jobs': ^0.1.1-rc.2 - '@deepseek-ai/dsh-llm': ^0.1.1-rc.2 - '@deepseek-ai/dsh-sandbox': ^0.1.1-rc.2 - '@deepseek-ai/dsh-sandbox-policy': ^0.1.1-rc.2 - '@deepseek-ai/dsh-scope': ^0.1.1-rc.2 - '@deepseek-ai/dsh-session': ^0.1.1-rc.2 - '@deepseek-ai/dsh-session-persistence': ^0.1.1-rc.2 - '@deepseek-ai/dsh-session-projection': ^0.1.1-rc.2 - '@deepseek-ai/dsh-session-projection-cache': ^0.1.1-rc.2 - '@deepseek-ai/dsh-tools': ^0.1.1-rc.2 - '@deepseek-ai/dsh-user-approval': ^0.1.1-rc.2 + '@deepseek-ai/cordis': ~4.0.4 + '@deepseek-ai/dsh-scope': 0.2.0-rc.1 + + '@deepseek-ai/dsh-client-locale@0.2.0-rc.1': + resolution: {integrity: sha512-4LNz28WCad8v3quEeuSTXOTHb6YHrMGkjIq73W+6+6zkEBbbmpfiz4FJ3MW9iE72DXLR9/IyUHNBpf6N/CVZ4Q==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + + '@deepseek-ai/dsh-client-store@0.2.0-rc.1': + resolution: {integrity: sha512-fvjAr7KvcfH/GOGiOuZiNhwZyga+HSyYsb0tvCBHHEn3UiyGZzaguaLa6RtN++GTvE+lUUExpWSNuTGlZQ28zw==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + + '@deepseek-ai/dsh-client-ui-conversation@0.2.0-rc.1': + resolution: {integrity: sha512-2aDx9NZUrExfCe6elV5RczHoxJS/zyJlpdv7fD1FyTZIN7DS2yvDQe9+P6FpPCUfm1Sn6y0slls8QK9aLo4IvQ==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + + '@deepseek-ai/dsh-client-ui-primitives@0.2.0-rc.1': + resolution: {integrity: sha512-1CCpyIh5PJljyXS9zQP8ib6JAg2p6PELh+iZhD3VBjQC5ZZ5i/zdgNGVOGr6Uu+sUpU7BkjYPvUkhy7AZQJWYA==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + + '@deepseek-ai/dsh-client-ui-renderer@0.2.0-rc.1': + resolution: {integrity: sha512-jEX/d4MBgfMEYVhGN2ooiJsPfk596+ISPLKYTfOwSTTOwus/9bvGI8dMCIz2CrSKa0LMHcK6lUi/f0nQ6hWQlw==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + + '@deepseek-ai/dsh-client-ui-session@0.2.0-rc.1': + resolution: {integrity: sha512-eNFVTb0GwNxI0Q7ZlzjHsIXvFYw4NCApMcdw0DnxYw6tsAc2oLFkYFUx/PACigYvWhPiGLw4xZtOEkW5/Iekfw==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + + '@deepseek-ai/dsh-client-ui-sidebar@0.2.0-rc.1': + resolution: {integrity: sha512-OiUg7wrTDt7syjE1CEc6SuXqdNwQZ9naGwUYqGJyFPnyR54o1qM9HPwNP7bwQHgcF/JjizpvgB/9u8rgWzM01g==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + + '@deepseek-ai/dsh-client-ui-slots@0.2.0-rc.1': + resolution: {integrity: sha512-GrQbf1KN9NGa63ZBocAKAA2W5aahRCOAQVYQoW2OLIvg5h2e1j30dqMx+nptni59YUvg0DmmLj6ggUXvFpzCQA==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + + '@deepseek-ai/dsh-client-ui-workspace@0.2.0-rc.1': + resolution: {integrity: sha512-8ehLXqZGvFWk93RxQwnCKkaoMrTxdyE7HBbKyXaav3V6GAMOpe+MbUmR8fLm17JTno4cfMr/Mg2S4P9hS5dBAw==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + + '@deepseek-ai/dsh-commands@0.2.0-rc.1': + resolution: {integrity: sha512-VZOWNwjBDBkX3kXVJcD24oAoKeGRpLnHZjRiPm0gq41ZClCYy9CzNnFdl6IVtJHfG+bz9/HDnONilpiRwBg2lQ==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + '@deepseek-ai/dsh-agent': 0.2.0-rc.1 + '@deepseek-ai/dsh-attachment': 0.2.0-rc.1 + '@deepseek-ai/dsh-brand': 0.2.0-rc.1 + '@deepseek-ai/dsh-invariants': 0.2.0-rc.1 + '@deepseek-ai/dsh-llm': 0.2.0-rc.1 + '@deepseek-ai/dsh-scope': 0.2.0-rc.1 + '@deepseek-ai/dsh-session': 0.2.0-rc.1 + '@deepseek-ai/dsh-typert-protocol': 0.2.0-rc.1 + + '@deepseek-ai/dsh-compaction-image-offload@0.2.0-rc.1': + resolution: {integrity: sha512-GM+Wk7dROfMllrm0gqbYpZY8MCef+Y+tK+vSLP426hd/hNRpSSOcPB72ZNfu05hZF+IUCkNSCF7x0gTAGtm7NQ==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + '@deepseek-ai/dsh-agent': 0.2.0-rc.1 + '@deepseek-ai/dsh-compaction': 0.2.0-rc.1 + '@deepseek-ai/dsh-llm': 0.2.0-rc.1 + '@deepseek-ai/dsh-session': 0.2.0-rc.1 + + '@deepseek-ai/dsh-compaction@0.2.0-rc.1': + resolution: {integrity: sha512-xtyT0MW45DIseej9fJ4HmkUlRK02IY0vC8AWPZ7ORQqaEHMV4lqX/mhTRFA937NOuOeLdLF/DKH5E4bpUeeshQ==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + '@deepseek-ai/dsh-brand': 0.2.0-rc.1 + '@deepseek-ai/dsh-commands': 0.2.0-rc.1 + '@deepseek-ai/dsh-invariants': 0.2.0-rc.1 + '@deepseek-ai/dsh-llm': 0.2.0-rc.1 + '@deepseek-ai/dsh-session': 0.2.0-rc.1 + + '@deepseek-ai/dsh-config-editor@0.2.0-rc.1': + resolution: {integrity: sha512-BGzv0pUgPELrWO073NrL0JbnjE1cXoUvaZIbG6Q9V0kZp46mg1BITtBvbD+p/pIu+SdbKwGeP1YxRyfdHG6ZKg==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + '@deepseek-ai/cordis-plugin-include': ~1.0.9 + '@deepseek-ai/cordis-plugin-loader': ~1.0.5 + '@deepseek-ai/dsh-app-boot': 0.2.0-rc.1 + '@deepseek-ai/dsh-hmr': 0.2.0-rc.1 peerDependenciesMeta: - '@deepseek-ai/dsh-agent-presets': + '@deepseek-ai/dsh-hmr': + optional: true + + '@deepseek-ai/dsh-credentials@0.2.0-rc.1': + resolution: {integrity: sha512-XcAy6bK1lHLW3XWxxwKtrFdDurEvEvpBoqNhfR6PHTetd8wV/f9l06uNg0DO7xg1GUzkY8t88j2EXhg2z2nFrw==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + '@deepseek-ai/dsh-invariants': 0.2.0-rc.1 + + '@deepseek-ai/dsh-deque@0.2.0-rc.1': + resolution: {integrity: sha512-PlCukTxVBSavQGij2Hw7pKjbMblmT0Pbo+iU2Bw73pZeIXqsSuPrWR8z7kHr1bDb4jqd6JuKBk1Bd9fGgBxtoA==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + + '@deepseek-ai/dsh-file-reference@0.2.0-rc.1': + resolution: {integrity: sha512-QYMVTexTK8V3dS3cDpSzYj2USN44nG4MZcUUjNyr0D/58A5g6HeER1ZUiwEnNSenj9wMUrNUulbgQUL2PYBQxg==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + '@deepseek-ai/dsh-agent': 0.2.0-rc.1 + + '@deepseek-ai/dsh-fs@0.2.0-rc.1': + resolution: {integrity: sha512-IWjXn/BsoWwT5dti/Jfkrx49GDGi1H7B3cuTgwRvxIQl6o86eb7ns+3mQiBpFyrCrVOMV+1t8FC1ipiIxol+gA==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + '@deepseek-ai/dsh-brand': 0.2.0-rc.1 + '@deepseek-ai/dsh-invariants': 0.2.0-rc.1 + '@deepseek-ai/dsh-llm': 0.2.0-rc.1 + '@deepseek-ai/dsh-sandbox': 0.2.0-rc.1 + + '@deepseek-ai/dsh-home-paths@0.2.0-rc.1': + resolution: {integrity: sha512-QWHegbfNY4J7qZgBdiWshhhcF6fgybua6XKUaMIhxj4J+mqR9KEQOJ7hRjOOg8Yub3nGbBTyqpH10C44EGGroA==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + + '@deepseek-ai/dsh-host-directory-picker@0.2.0-rc.1': + resolution: {integrity: sha512-8OCjonS/poDfc49afEr2Jv60clYQjGfAqFWnKgE7RZ6AQH+THOEHfqC3LXF7n/YQD2xBesZ4U+uwS8Cjl1/CFw==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + + '@deepseek-ai/dsh-host-webserver@0.2.0-rc.1': + resolution: {integrity: sha512-/LkuSWupB7vijPty3Iypt9DZrBli9wsNh/E485m+xgo4uBbgloANQA+nyIpB0n+N20zleyV4EFYbe6Lb6k2oqQ==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + + '@deepseek-ai/dsh-invariants@0.2.0-rc.1': + resolution: {integrity: sha512-sEeO6sRPGxgHChQsiU/V3LvelbVaLt7kb4WHVQqljZGgoAv3VZK0rzSlQaGfTCYJrThcoJ/a9mCT9pcZEZ3aDg==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + + '@deepseek-ai/dsh-launch-environment@0.2.0-rc.1': + resolution: {integrity: sha512-ADTbIFhcVnFSYmycI4Ln4q9GGv5YS+MRg0ahCbn0+rDLcYyx4TT9B9Xyiz856YRRPpYRbYwQqZ+o14kCDpicQA==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + + '@deepseek-ai/dsh-llm@0.2.0-rc.1': + resolution: {integrity: sha512-F5ZlBG8z8o5PfEWeEF/PN9t/A1N/oEErvqmpqE4J8f9mJR85DvBdV+rjDs7OjAbMJsJ8INjkbroruG5NNKDg5A==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + + '@deepseek-ai/dsh-native-command@0.2.0-rc.1': + resolution: {integrity: sha512-CgWN1pIq+ESrwl54Zuj9yYMQMqhoDch2hDW6/hZ+jzHOx7xyrJP/yCCoaOw6KSH3GRN+jUUIT2ZcciBVxs2nQw==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + + '@deepseek-ai/dsh-package-manifest@0.2.0-rc.1': + resolution: {integrity: sha512-topsRB2Pr2pfyQgqIkcEnS0mjDWZUDS+inb7/FREv0UaxkB0ezIiQuSJVJk5PQ3KMyuMSz2oNH/URlKOGw35Sw==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + + '@deepseek-ai/dsh-ptc-runtime@0.2.0-rc.1': + resolution: {integrity: sha512-bz4ObfDeRZyBCejUMrSiDKpIffCImGafgktIWqTEAqNCprVWLRUHT+rHGFPcxHJRBsvxFQLlXHkYc/ccfqIB4A==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + '@deepseek-ai/dsh-sandbox': 0.2.0-rc.1 + + '@deepseek-ai/dsh-sandbox-policy@0.2.0-rc.1': + resolution: {integrity: sha512-O850xvmnU+Bxpq7F7d0QjiFm3Y581GwFxfvBvLohzyAC81M6iXGBrbxt4EcX/CUPJEIHB0KSOUrX9/3xQulNZw==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + '@deepseek-ai/dsh-agent': 0.2.0-rc.1 + '@deepseek-ai/dsh-invariants': 0.2.0-rc.1 + '@deepseek-ai/dsh-sandbox': 0.2.0-rc.1 + '@deepseek-ai/dsh-session': 0.2.0-rc.1 + '@deepseek-ai/dsh-session-projection': 0.2.0-rc.1 + '@deepseek-ai/dsh-system-prompt': 0.2.0-rc.1 + + '@deepseek-ai/dsh-sandbox@0.2.0-rc.1': + resolution: {integrity: sha512-NnEHqSf4SKoM5cIqtHg+utLUZYJX4r9u2PwQbEpYwiOYSvOW5G4DRtLRpIX7J6V2HOC6CXo2Xcm3DJBOsbKYOA==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + '@deepseek-ai/dsh-llm': 0.2.0-rc.1 + '@deepseek-ai/dsh-session': 0.2.0-rc.1 + + '@deepseek-ai/dsh-scope@0.2.0-rc.1': + resolution: {integrity: sha512-D1JeWIz40A62/nJIi7HwLsddmuDwdcxV9Lbx5IgBveWDZHGqPIP0/CPJ4o6XWr+C1qI/GBtdMkN2Z3F20Rlt7w==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + '@deepseek-ai/dsh-invariants': 0.2.0-rc.1 + + '@deepseek-ai/dsh-session-format-catalog@0.2.0-rc.1': + resolution: {integrity: sha512-Kacc7D3at1ifPlPbFD3t463/m+jg0RdERnuTWH1omv0hjT5ZkX/xM0TS37bhlyhLJdI+1TOqm9Jy3BpR15yR0Q==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + '@deepseek-ai/dsh-session': 0.2.0-rc.1 + + '@deepseek-ai/dsh-session-format-v0-to-v1@0.2.0-rc.1': + resolution: {integrity: sha512-bBf8YJKpolltz2vn03+mbT5IZ3mrAeN1GjgVQ5FwhU5ITWLV6jQqvtN7DWEWjTwKVVmUpl2XkmRcGBib+PH16Q==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + + '@deepseek-ai/dsh-session-format-v1-to-v2@0.2.0-rc.1': + resolution: {integrity: sha512-YXqkqnTqMUKUgdSZT4GXCEwWvfSZv7TEIG+wfYxtJBWQlzfuCf7iHjNIWVNBslQdxl0VxbaFThbwZUtBa3f2Tg==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + + '@deepseek-ai/dsh-session-format-v2-to-v3@0.2.0-rc.1': + resolution: {integrity: sha512-f7QapRRmMstuTYVVORYWgZn2gngw8Vu/ls5iBYfyb+15FbgwYr8bIOKNMGQ660dg4PHsxzWprsTbsxBAe9QDNw==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + + '@deepseek-ai/dsh-session-format-v3-to-v4@0.2.0-rc.1': + resolution: {integrity: sha512-vnplfHQOqTXpe7EMN/0h0VZyBS10+kzzjm5x/X01iu5lynbOQs2jRdi4Lrzp9fgnAUEJYaESZZLlWKY40arLCw==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + + '@deepseek-ai/dsh-session-format@0.2.0-rc.1': + resolution: {integrity: sha512-j2m+3FQeFPW9fgzRktL8E6J2UegpWPcc7nSFP+Ir7fdKYD5xDukcbdYDzzairbqQedntb0QMcp78rBQeJOmoYA==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + + '@deepseek-ai/dsh-session-persistence@0.2.0-rc.1': + resolution: {integrity: sha512-OAHmDpR3LasgEXzpmGyajlgcG5tOEzlUSclovllLtKaY402hcTn6Vm7W/EzRMwc+jvSfEQyXDY1g7wG3t3Ch+g==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + '@deepseek-ai/dsh-brand': 0.2.0-rc.1 + '@deepseek-ai/dsh-session': 0.2.0-rc.1 + '@deepseek-ai/dsh-timeout': 0.2.0-rc.1 + + '@deepseek-ai/dsh-session-projection@0.2.0-rc.1': + resolution: {integrity: sha512-6ymxQyycjXlxayjgVfxAsQv8POk3oKny/mrpxPcz30/Sv8FRsWnEnKaWf1pQvlBsGQcN6atOqXWsNyvHSyT/zw==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + '@deepseek-ai/dsh-session': 0.2.0-rc.1 + + '@deepseek-ai/dsh-session-query@0.2.0-rc.1': + resolution: {integrity: sha512-kjYmW5/D/hANpczVOYUtbkYUen2s2ZyVaAwJfdlYKW5l/ls++XxdKM947BX76DxgHYg8RXjcSkkbK1TPNaAjiA==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + '@deepseek-ai/dsh-brand': 0.2.0-rc.1 + '@deepseek-ai/dsh-llm': 0.2.0-rc.1 + '@deepseek-ai/dsh-session': 0.2.0-rc.1 + '@deepseek-ai/dsh-session-persistence': 0.2.0-rc.1 + '@deepseek-ai/dsh-session-projection': 0.2.0-rc.1 + '@deepseek-ai/dsh-session-projection-cache': 0.2.0-rc.1 + '@deepseek-ai/dsh-session-title': 0.2.0-rc.1 + '@deepseek-ai/dsh-tool-todo': 0.2.0-rc.1 + peerDependenciesMeta: + '@deepseek-ai/dsh-session-persistence': + optional: true + '@deepseek-ai/dsh-session-projection': + optional: true + '@deepseek-ai/dsh-session-projection-cache': + optional: true + + '@deepseek-ai/dsh-session-title@0.2.0-rc.1': + resolution: {integrity: sha512-IHvlestI2LFrknefZ3TrgdtEAghYV75eBVr1CL3gbJfj9ycu8qMpzTTrmMQn4TDldzuKf9mr+6iAp7MhOPKzvA==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + '@deepseek-ai/dsh-agent': 0.2.0-rc.1 + '@deepseek-ai/dsh-brand': 0.2.0-rc.1 + '@deepseek-ai/dsh-invariants': 0.2.0-rc.1 + '@deepseek-ai/dsh-llm': 0.2.0-rc.1 + '@deepseek-ai/dsh-session': 0.2.0-rc.1 + '@deepseek-ai/dsh-session-projection': 0.2.0-rc.1 + + '@deepseek-ai/dsh-session@0.2.0-rc.1': + resolution: {integrity: sha512-KUDCUk8kmiJCwvV3gDbkUSpkyoGHdg36nIhKsEh6iBoYDuIQCuvX2htiVRXCm099XZO6rCBVInmm1193UoPYcA==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + '@deepseek-ai/dsh-scope': 0.2.0-rc.1 + + '@deepseek-ai/dsh-settings@0.2.0-rc.1': + resolution: {integrity: sha512-kC7Cq6Ls6of8J9qY0/8oehLbf9AV62QVA9dL0YPOnvdvgaNJaRbLtXxwr+I36rjDVmOfUkqvW4nxBIjJmPSY/g==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + '@deepseek-ai/dsh-brand': 0.2.0-rc.1 + '@deepseek-ai/dsh-invariants': 0.2.0-rc.1 + '@deepseek-ai/dsh-session': 0.2.0-rc.1 + '@deepseek-ai/schemastery': ~3.18.4 + + '@deepseek-ai/dsh-skill@0.2.0-rc.1': + resolution: {integrity: sha512-gCubwIMvMstpF1nWppJBAygQxrPDxN+XfX4RwQtvXcv3m5qGtcqPL0owx/tF7s+LUGipCf97LwMm5trn5sOOUg==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + '@deepseek-ai/dsh-llm': 0.2.0-rc.1 + '@deepseek-ai/dsh-scope': 0.2.0-rc.1 + + '@deepseek-ai/dsh-storage-domain@0.2.0-rc.1': + resolution: {integrity: sha512-LnoWOJs72A/KxwyOH+EfFji39JUX2u2dqyfeDWodqW/qFVu+bekubuz1HTURuBzuG281TFzTSyHFYt9vgL0wrw==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + '@deepseek-ai/dsh-invariants': 0.2.0-rc.1 + '@deepseek-ai/dsh-storage': 0.2.0-rc.1 + + '@deepseek-ai/dsh-storage@0.2.0-rc.1': + resolution: {integrity: sha512-cHHR5jdsqS+Coj9dm5xslDcn2AUL5N7H8M6udEBAGlxjTCB/0cO+S8i2I04LOuBUd/3MJ+1Xwsny7rC9SpBjHg==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + + '@deepseek-ai/dsh-subagent@0.2.0-rc.1': + resolution: {integrity: sha512-apyy9ovQMHfS1/J1aztVJR1mwwKyksajI+P+LwaRie3ZCpzHksE1U9LPZHHdJFNA0VMoMUu8B+BuupKAjYuihA==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + '@deepseek-ai/dsh-agent': 0.2.0-rc.1 + '@deepseek-ai/dsh-agent-preset-registry': 0.2.0-rc.1 + '@deepseek-ai/dsh-attachment': 0.2.0-rc.1 + '@deepseek-ai/dsh-invariants': 0.2.0-rc.1 + '@deepseek-ai/dsh-jobs': 0.2.0-rc.1 + '@deepseek-ai/dsh-llm': 0.2.0-rc.1 + '@deepseek-ai/dsh-permission-presets': 0.2.0-rc.1 + '@deepseek-ai/dsh-sandbox': 0.2.0-rc.1 + '@deepseek-ai/dsh-sandbox-policy': 0.2.0-rc.1 + '@deepseek-ai/dsh-scope': 0.2.0-rc.1 + '@deepseek-ai/dsh-session': 0.2.0-rc.1 + '@deepseek-ai/dsh-session-persistence': 0.2.0-rc.1 + '@deepseek-ai/dsh-session-projection': 0.2.0-rc.1 + '@deepseek-ai/dsh-session-query': 0.2.0-rc.1 + '@deepseek-ai/dsh-settings': '*' + '@deepseek-ai/dsh-system-prompt': 0.2.0-rc.1 + '@deepseek-ai/dsh-tools': 0.2.0-rc.1 + '@deepseek-ai/dsh-typert-protocol': 0.2.0-rc.1 + '@deepseek-ai/dsh-user-approval': 0.2.0-rc.1 + '@deepseek-ai/dsh-util-time': 0.2.0-rc.1 + '@deepseek-ai/dsh-workspace': 0.2.0-rc.1 + peerDependenciesMeta: + '@deepseek-ai/dsh-agent-preset-registry': optional: true '@deepseek-ai/dsh-jobs': optional: true + '@deepseek-ai/dsh-permission-presets': + optional: true '@deepseek-ai/dsh-sandbox': optional: true '@deepseek-ai/dsh-sandbox-policy': @@ -633,83 +667,112 @@ packages: optional: true '@deepseek-ai/dsh-session-projection': optional: true - '@deepseek-ai/dsh-session-projection-cache': + '@deepseek-ai/dsh-session-query': + optional: true + '@deepseek-ai/dsh-settings': optional: true '@deepseek-ai/dsh-user-approval': optional: true + '@deepseek-ai/dsh-workspace': + optional: true - '@deepseek-ai/dsh-system-prompt@0.1.1-rc.2': - resolution: {integrity: sha512-on4hjAlYI5uX9q7Sf95YkMMBVe6heywtA/H50ksrIMUub8U2B98hO9iQpHhjwIO1F1vu+5pLcPvRr6yUGGmtXQ==} + '@deepseek-ai/dsh-system-prompt@0.2.0-rc.1': + resolution: {integrity: sha512-AZC0HBWaiopkVcJXh/WEzyyF19+/yBPnbuLrZoD7h+UJYF8iG8tlDabauWfMw+dvgoYe9hIiTV2EcFRv4AgJhw==} peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - '@deepseek-ai/dsh-llm': ^0.1.1-rc.2 - '@deepseek-ai/dsh-scope': ^0.1.1-rc.2 + '@deepseek-ai/cordis': ~4.0.4 + '@deepseek-ai/dsh-invariants': 0.2.0-rc.1 + '@deepseek-ai/dsh-llm': 0.2.0-rc.1 + '@deepseek-ai/dsh-scope': 0.2.0-rc.1 - '@deepseek-ai/dsh-timeout@0.1.1-rc.2': - resolution: {integrity: sha512-RrouVgU3G5gXr9zHhpThkMG6YKdcRJzXXdPm1dq3ioBxbvxlfMSfNY4tN8lWMJxLyGtvWkPra0HQX+YWxvdOOA==} + '@deepseek-ai/dsh-timeout@0.2.0-rc.1': + resolution: {integrity: sha512-SQpvDLIPU0EJP1lbphfuEkLrvnX+CE9u9ym1+L5z/8dYe9BCPbhgjQoRvDnyzKZqFyoXVvZFdqdAADlc6DX7Ig==} peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 + '@deepseek-ai/cordis': ~4.0.4 - '@deepseek-ai/dsh-tools@0.1.1-rc.2': - resolution: {integrity: sha512-0GGL4D55MwYDepzZMOI3L0ycu5b2qr96GL0Y7snwhAnpK2Di61rbX3fJE+PB3ZrovGX0csIRdt9n3iJZDVtDrw==} + '@deepseek-ai/dsh-tool-todo@0.2.0-rc.1': + resolution: {integrity: sha512-NzgpZxc/sngDmznEVbMoZPCOx3l0N6UCDcyf9kBK0wQA+FQMgrMrmI0BaZUyjF0yMPXeQ47KXQVAoh8spramHg==} peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-agent': ^0.1.1-rc.2 - '@deepseek-ai/dsh-code-runtime': ^0.1.1-rc.2 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - '@deepseek-ai/dsh-llm': ^0.1.1-rc.2 - '@deepseek-ai/dsh-scope': ^0.1.1-rc.2 - '@deepseek-ai/dsh-session': ^0.1.1-rc.2 - '@deepseek-ai/dsh-system-prompt': ^0.1.1-rc.2 - '@deepseek-ai/dsh-user-approval': ^0.1.1-rc.2 + '@deepseek-ai/cordis': ~4.0.4 + '@deepseek-ai/dsh-agent': 0.2.0-rc.1 + '@deepseek-ai/dsh-invariants': 0.2.0-rc.1 + '@deepseek-ai/dsh-session': 0.2.0-rc.1 + '@deepseek-ai/dsh-session-projection': 0.2.0-rc.1 + '@deepseek-ai/dsh-tools': 0.2.0-rc.1 - '@deepseek-ai/dsh-typert-protocol@0.1.1-rc.2': - resolution: {integrity: sha512-lxBssDc5Pz1qBE5kuIyaArA7AvIPq9rpaVclylodiSzVJe95e2xruBg73tflyjtd8y00toet+DLgQ6tSSsq6Kw==} + '@deepseek-ai/dsh-tools@0.2.0-rc.1': + resolution: {integrity: sha512-HmXY+X4HBoeuGBJWkS+q91GEGK61XgNc3qCXT+QqI+nzCcg1VOIwWvjgOnr1c76x5HKPyxR7FF3PMMq3+hO7oQ==} peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 + '@deepseek-ai/cordis': ~4.0.4 + '@deepseek-ai/dsh-agent': 0.2.0-rc.1 + '@deepseek-ai/dsh-invariants': 0.2.0-rc.1 + '@deepseek-ai/dsh-llm': 0.2.0-rc.1 + '@deepseek-ai/dsh-ptc-runtime': 0.2.0-rc.1 + '@deepseek-ai/dsh-sandbox': 0.2.0-rc.1 + '@deepseek-ai/dsh-sandbox-policy': 0.2.0-rc.1 + '@deepseek-ai/dsh-scope': 0.2.0-rc.1 + '@deepseek-ai/dsh-session': 0.2.0-rc.1 + '@deepseek-ai/dsh-system-prompt': 0.2.0-rc.1 + '@deepseek-ai/dsh-user-approval': 0.2.0-rc.1 - '@deepseek-ai/dsh-typert-registry@0.1.1-rc.2': - resolution: {integrity: sha512-ATZu3i7UId+ktsWW3pUFm5Hi1fVsRXFmByATVPp2RlxH1zjxXnauVW6k70ZwU/4FOsphRzo65SXOlAXA+natYg==} + '@deepseek-ai/dsh-typert-protocol@0.2.0-rc.1': + resolution: {integrity: sha512-MhpeimGP6E3MqSESLm32OmPgx5aNUG7yCJCgcIFw7XBWhQmKB9fU3CWuUxxbWZeC7eWkdJ93AG2ww/Qu6QWW9A==} peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 + '@deepseek-ai/cordis': ~4.0.4 - '@deepseek-ai/dsh-user-approval@0.1.1-rc.2': - resolution: {integrity: sha512-SdsO4Rs+NeJFoertkVilXBACREOLfkKPJJznYKqDhJxeRo38RJ56dtj0Xd0/6rERmsQiMck4Bwdrzg1ubUqPNA==} + '@deepseek-ai/dsh-typert-registry@0.2.0-rc.1': + resolution: {integrity: sha512-qJAMWRlCFeDVqy7lDnLA670VDQ705lu+Ojd3NDCzvTCRBx4gSxjPRs3FKU8CcrCDr+K0GA+qmw1WijhzsOKiNA==} peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-agent': ^0.1.1-rc.2 - '@deepseek-ai/dsh-brand': ^0.1.1-rc.2 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - '@deepseek-ai/dsh-llm': ^0.1.1-rc.2 - '@deepseek-ai/dsh-scope': ^0.1.1-rc.2 - '@deepseek-ai/dsh-session': ^0.1.1-rc.2 - '@deepseek-ai/dsh-system-prompt': ^0.1.1-rc.2 + '@deepseek-ai/cordis': ~4.0.4 - '@deepseek-ai/dsh-user-questions@0.1.1-rc.2': - resolution: {integrity: sha512-9lYoB7qCFE+Vvgwjny3MnRfS7QUefOspj4KpE3b30DAAJfxwrU4hRtLCHOKxyurF01qrkoEBBpXn4H5ilXYTKg==} + '@deepseek-ai/dsh-user-approval@0.2.0-rc.1': + resolution: {integrity: sha512-0d2sFESHYhnnwuIPDw7sNImFE+HWU6kbX9cWZSPntMXLMhr8lgJFmtZFmrZwobQO7lhpEZKcvX8Jhzmc3OCdWQ==} peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-agent': ^0.1.1-rc.2 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - '@deepseek-ai/dsh-llm': ^0.1.1-rc.2 + '@deepseek-ai/cordis': ~4.0.4 + '@deepseek-ai/dsh-agent': 0.2.0-rc.1 + '@deepseek-ai/dsh-brand': 0.2.0-rc.1 + '@deepseek-ai/dsh-invariants': 0.2.0-rc.1 + '@deepseek-ai/dsh-llm': 0.2.0-rc.1 + '@deepseek-ai/dsh-scope': 0.2.0-rc.1 + '@deepseek-ai/dsh-session': 0.2.0-rc.1 + '@deepseek-ai/dsh-system-prompt': 0.2.0-rc.1 - '@deepseek-ai/dsh-workspace@0.1.1-rc.2': - resolution: {integrity: sha512-jBUob4H5TZAiExq9YNVCglKAFmAKMtd1UbyqFfnZZ1Owm+3c3NbAXY947MHiD6NwCwFEW1y7FjrFj66UQvG90A==} + '@deepseek-ai/dsh-util-crypto@0.2.0-rc.1': + resolution: {integrity: sha512-BLBQVRGBlzhNprSpREiMDi1JwX0X8jKdEPWiVRKBnttlG9d33j1pLsaiH9HHLY/D10lXX/NagGia/Zz9mW4FBA==} peerDependencies: - '@deepseek-ai/cordis': ^4.0.1 - '@deepseek-ai/dsh-brand': ^0.1.1-rc.2 - '@deepseek-ai/dsh-invariants': ^0.1.1-rc.2 - '@deepseek-ai/dsh-session': ^0.1.1-rc.2 - '@deepseek-ai/dsh-session-persistence': ^0.1.1-rc.2 - '@deepseek-ai/dsh-storage': ^0.1.1-rc.2 - '@deepseek-ai/dsh-storage-domain': ^0.1.1-rc.2 + '@deepseek-ai/cordis': ~4.0.4 - '@deepseek-ai/schemastery@3.18.1': - resolution: {integrity: sha512-Qn0FCSwCQnpnj6SB31I6i2sIKgKWnkbJM8O0EU91Gv2UsYVvtZTl6IA0sCwk2e2MZf5S8w5hpq9QkeVvK9qwxg==} + '@deepseek-ai/dsh-util-time@0.2.0-rc.1': + resolution: {integrity: sha512-SMJgashRtqOzZM8QvAgiN1tKRXExqIgRRiIkR6s4MStDHgjvUUrpzazPCarL3SAzXKDCi3I+H5QeglGG+j9qKA==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + + '@deepseek-ai/dsh-util-values@0.2.0-rc.1': + resolution: {integrity: sha512-Eh1HH0LFvztBwU2xotdfW5oCwLlWGjK2ygCC5+PnC3tkSDh9gvVQpEf0ezK+Kk6vpLz117V7VPehhR1+gs90+Q==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + + '@deepseek-ai/dsh-util-workspace-path@0.2.0-rc.1': + resolution: {integrity: sha512-8pNpCCgByrlYtxXqDLuIz/77rJg4p+bdQs/IotRppM7ahfIQtY/u3qkcbniCTQo4FUfoC3F2p6Lw/fHdLhcgqQ==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + + '@deepseek-ai/dsh-workspace@0.2.0-rc.1': + resolution: {integrity: sha512-iEVfkxwNdNUUINTlQaalw6GXxU9lQUldBAhc1LY3l6nGk+XY53hQ9rT1bP+RN/jDi7ad6xd+i+jSbowGdLgLgA==} + peerDependencies: + '@deepseek-ai/cordis': ~4.0.4 + '@deepseek-ai/dsh-invariants': 0.2.0-rc.1 + '@deepseek-ai/dsh-session': 0.2.0-rc.1 + '@deepseek-ai/dsh-session-persistence': 0.2.0-rc.1 + '@deepseek-ai/dsh-storage': 0.2.0-rc.1 + '@deepseek-ai/dsh-storage-domain': 0.2.0-rc.1 + '@deepseek-ai/dsh-typert-protocol': 0.2.0-rc.1 + + '@deepseek-ai/schemastery@3.18.5': + resolution: {integrity: sha512-Mnobvqf9rHsZYv4g5edj5ddxS1oF1kIdSlz0DunUgnY3LWG5F26MqvH3YOOsSaodCgyzJ16OMN9O99/s5Crtdw==} + + '@eslint-community/regexpp@4.12.2': + resolution: {integrity: sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} '@exodus/bytes@1.15.1': resolution: {integrity: sha512-S6mL0yNB/Abt9Ei4tq8gDhcczc4S3+vQ4ra7vxnAf+YHC02srtqxKKZghx2Dq6p0e66THKwR6r8N6P95wEty7Q==} @@ -828,67 +891,21 @@ packages: '@rolldown/pluginutils@1.0.1': resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==} - '@shikijs/core@4.4.3': - resolution: {integrity: sha512-QCR4q2ZO/ILJEuwiBMel4wdcTDb1JGwfjKTxPDF6x8ixOaluPrVqIn06C99AcRPhmYlBR56d/Fb+GN58GzExpg==} - engines: {node: '>=20'} - - '@shikijs/engine-javascript@4.4.3': - resolution: {integrity: sha512-FbOjFJp9VLdo1Wevs10BBtVxiTWwNLqZh5Gkhjgda/ioL15YOgeSl9n+6XMa3qRlPQzfhFNe641SrynFHYG0nQ==} - engines: {node: '>=20'} - - '@shikijs/engine-oniguruma@4.4.3': - resolution: {integrity: sha512-EcOQkxdxGQrc1Row/cC2c96/v1dbZqGnEVu1qTuT/MJmp6+cXCvQussowVmCv5Tqr3KuY3c7IbM6HTW3LJ1k9w==} - engines: {node: '>=20'} - - '@shikijs/langs@4.4.3': - resolution: {integrity: sha512-ePic0yfAJGOF83D5wBHK/00EjK65oahBYxFk5epgq33WRv7X9UuxLEV8PtR0szC0z8dl7INIpIodB99JRFlR+A==} - engines: {node: '>=20'} - - '@shikijs/primitive@4.4.3': - resolution: {integrity: sha512-m0wBeLDQDeIxRdUmrCPdQqfuUamDwRL5isCfYbguKD6NiaKpVbsv+3J81DyIKgNW5h4WAIIr8T4EkgQrBBxvaQ==} - engines: {node: '>=20'} - - '@shikijs/themes@4.4.3': - resolution: {integrity: sha512-w8UHjeUnIR965KMWJHUPXOc2mNJUnK3vpVLYLvw5IYU2mnTTJ89E24OrJDBNiJDQ0qzb0tc4l7mrIXx5cFeIyw==} - engines: {node: '>=20'} - - '@shikijs/types@4.4.3': - resolution: {integrity: sha512-UEJxmRR++MAGR6hugn0vgVS2W/6lWAts84FFSrnlH9sP0LNol7E5+NQ792pH8liWUhyMyjhTgSUH3k7iD7tc5g==} - engines: {node: '>=20'} - - '@shikijs/vscode-textmate@10.0.2': - resolution: {integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==} - '@standard-schema/spec@1.1.0': resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} '@types/chai@5.2.3': resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==} - '@types/debug@4.1.13': - resolution: {integrity: sha512-KSVgmQmzMwPlmtljOomayoR89W4FynCAi3E8PPs7vmDVPe84hT+vGPKkJfThkmXs0x0jAaa9U8uW8bbfyS2fWw==} - '@types/deep-eql@4.0.2': resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} '@types/estree@1.0.9': resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} - '@types/hast@3.0.5': - resolution: {integrity: sha512-rp/ezSWaD1m44dPKICGhiskI13nVr7qTloFwDa/IYkhhf5nzwP+zIQcIJh3WIFSBOy/H1PzB40jPjMDksN4F+g==} - '@types/js-yaml@4.0.9': resolution: {integrity: sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==} - '@types/katex@0.16.8': - resolution: {integrity: sha512-trgaNyfU+Xh2Tc+ABIb44a5AYUpicB3uwirOioeOkNPPbmgRNtcWyDeeFRzjPZENO9Vq8gvVqfhaaXWLlevVwg==} - - '@types/mdast@4.0.4': - resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==} - - '@types/ms@2.1.0': - resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==} - '@types/node@24.13.3': resolution: {integrity: sha512-Dh8vAsV36ig5wa9OX4pXvMc9D3Veibfw2wix0CUwYODLD8nkj9UsLjASr49nPg+2eKzxhBV+v7L8pXvT4e639Q==} @@ -903,17 +920,11 @@ packages: '@types/react@18.3.31': resolution: {integrity: sha512-vfEqpXTvwT91yhmwdfouStN2hSKwTvyRs8qpLfADyrq/kxDw0hZM7Wk9Ug1FELj8hIby+S/+kQCSRFF32nv2Qw==} - '@types/unist@3.0.3': - resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} + '@vitest/expect@4.1.8': + resolution: {integrity: sha512-h3nDO677RDLEGlBxyQ5CW8RlMThSKSRLUePLOx09gNIWRL40edgA1GCZSZgf1W55MFAG6/Sw14KeaAnqv0NKdQ==} - '@ungap/structured-clone@1.3.3': - resolution: {integrity: sha512-60YRaenCQcVjYEKOcG824+DRGGIQ3VKErcBoAEDJZz5bKIs2ZG+X/H9Nk+Q6EVkwJk5QNApxbrc5QtBSwtrXAg==} - - '@vitest/expect@4.1.11': - resolution: {integrity: sha512-VX2x5vNJXET47KAFzwERI+KRMtTTCSWTfSMKsW7JsUsXV4psq++e3DvZpuTDOpHcxytiDs6p2nhVb2tVDiiUYw==} - - '@vitest/mocker@4.1.11': - resolution: {integrity: sha512-2XJVD55d1o5AZous5CCGKS74g/riOj9odEt2bQpCVZeblHyHdnMeFl4jl0XjU21stf4mbjUkew2eXQZt65g5CQ==} + '@vitest/mocker@4.1.8': + resolution: {integrity: sha512-LEiN/xe4OSIbKe9HQIp5OC24agGD9J5CnmMgsLohVVoOPWL9a2sBoR6VBx43jQZb7Kr1l4RCuyCJzcAa0+dojw==} peerDependencies: msw: ^2.4.9 vite: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -923,158 +934,182 @@ packages: vite: optional: true - '@vitest/pretty-format@4.1.11': - resolution: {integrity: sha512-yiZzPbGTS9Sr/JpFl8zHrcIkAofNbFV6k21vIgQN/cY/oxZeXhJv5sc/MBJ5jFKWmWs+oJHw0UXLZjmf931+Vw==} + '@vitest/pretty-format@4.1.8': + resolution: {integrity: sha512-9GasEBxpZ1VYIpqHf/0+YGg121uSNwCKOJqIrTwWP/TB7DmFCiaBpNl3aPZzoLWfWkuqhbH8vJIVobZkvdo2cA==} - '@vitest/runner@4.1.11': - resolution: {integrity: sha512-LztvUgdwMNJMIkj3hQnnxiC2Xy1zNxq928W/xhjCLaNCzqTZOudjwbQf6v9IntZGPw132i2Lq2rgTRZHD3JHNw==} + '@vitest/runner@4.1.8': + resolution: {integrity: sha512-EmVxeBAfMJvycdjd6Hm+RbFBbA9fKvo0Kx37hNpBYoYeavH3RNsBXWDooR1mgD52dCrxIIuP7UotpfiwOikvcg==} - '@vitest/snapshot@4.1.11': - resolution: {integrity: sha512-pN7ikn1ON7h8ee4gIAp4AzyK+zBtJPzVbqOgu5LCEh4VaJVbPQcgYQYJIMGQPXVeJJq1fnfazis7a5pFNPahog==} + '@vitest/snapshot@4.1.8': + resolution: {integrity: sha512-acfZboRmAIf05DEKcBQy33VXojFJjtUdLyo7oOmV9kebb2xdU01UknNiPuPZoJZQyO7DF0gZdTGTpeAzET9QPQ==} - '@vitest/spy@4.1.11': - resolution: {integrity: sha512-apNa/prQy2qCeywhnixOHPRCgGNhvg7T4Dapfl1GahLp/R+uhBm5cPyFoNVyqsNd2h1nJxL6BqqdIjiABL60YA==} + '@vitest/spy@4.1.8': + resolution: {integrity: sha512-6EevtBp6OZOPF7bmz36HrGMeP3txgVSrgebWxHOafDXGkhIzfXK14f8KF6MuFfgXXUeHxmpD3BQxkV00/3s5mA==} - '@vitest/utils@4.1.11': - resolution: {integrity: sha512-zTCVGpyFsGWBhllOyKlTw/vnr6D9qxsfSDyfbyZmTyjHw5N/VuvzHpHoQjm2ZJzn4RJgx5w4r7V0er69CmLgPQ==} + '@vitest/utils@4.1.8': + resolution: {integrity: sha512-uOJamYALNhfJ6iolExyQM40yIQwDqYnkKtQ5VCiSe17E33H0aQ/u+1GlRuz4LZBk6Mm3sg90G9hEbmEt37C1Zg==} '@yuku-codegen/binding-android-arm64@0.8.7': resolution: {integrity: sha512-C/0zV5IhgVdYhGJTwrY0v8dknxlhiKwtVJkMUaexu9/QvRmzlV4vfU3hZlUSgqc2BxQHntL1mCVbDq8j0FRFDw==} cpu: [arm64] os: [android] + deprecated: yuku-codegen is pure JavaScript since 0.14 '@yuku-codegen/binding-darwin-arm64@0.8.7': resolution: {integrity: sha512-/u+REDMI4a0/lsJXTM4c53/w31OGZLOReZIyg62uhgLs0kc8NHsj/nOcxTdlQjq5gi0zhdkccD9LaLTXcdzPvw==} cpu: [arm64] os: [darwin] + deprecated: yuku-codegen is pure JavaScript since 0.14 '@yuku-codegen/binding-darwin-x64@0.8.7': resolution: {integrity: sha512-sMMzFOwCo4WXR+/6zIBThOocSC50iIIZZdfiIDbaLvj0Ax/rWt/iavyfEAqajyvzydLyCqR/ZItdLWSRlu1umw==} cpu: [x64] os: [darwin] + deprecated: yuku-codegen is pure JavaScript since 0.14 '@yuku-codegen/binding-freebsd-x64@0.8.7': resolution: {integrity: sha512-MpdpKXix9P+Y1rKgjvcNeNtGjXeL1CmttNhYINrWls8kRpm4xM/oBGTmn6w7to8lAlwj5jm8q03dQPl5mRv4Qw==} cpu: [x64] os: [freebsd] + deprecated: yuku-codegen is pure JavaScript since 0.14 '@yuku-codegen/binding-linux-arm-gnu@0.8.7': resolution: {integrity: sha512-rr1srFLlPAmC1vtxfc9C1YLDe3iH09YjfSeeIidBqKhzx1MATjOAq4mjlRUOnhr/L27MotWIYOFKwVsd5JZFOg==} cpu: [arm] os: [linux] libc: [glibc] + deprecated: yuku-codegen is pure JavaScript since 0.14 '@yuku-codegen/binding-linux-arm-musl@0.8.7': resolution: {integrity: sha512-eAufXh8qBRpiSO6ueaMDL+yyoXIGLhpUce72YbcACtZU2qhExwBIJyEtQf5kH2Ki0X2aqkSjSfog4OPtKXan3Q==} cpu: [arm] os: [linux] libc: [musl] + deprecated: yuku-codegen is pure JavaScript since 0.14 '@yuku-codegen/binding-linux-arm64-gnu@0.8.7': resolution: {integrity: sha512-gw4w6wPoHObBrdIC4duVWLmJOvpdE25j5D7yrM5mACNlK4klRz/lv8hK+ssQk9EJHBgZjSaqZIJVFgqNYbfv7A==} cpu: [arm64] os: [linux] libc: [glibc] + deprecated: yuku-codegen is pure JavaScript since 0.14 '@yuku-codegen/binding-linux-arm64-musl@0.8.7': resolution: {integrity: sha512-L68N6Y4XkqcIaKo3Ra88JEvBEH4AHff44A4INcrxeVWZ8CZtu2tCpfVxe3hR8qQQMcvBSQlDn24KpkCKEhVvfA==} cpu: [arm64] os: [linux] libc: [musl] + deprecated: yuku-codegen is pure JavaScript since 0.14 '@yuku-codegen/binding-linux-x64-gnu@0.8.7': resolution: {integrity: sha512-dzyAbltJmf3Cqlb8HcFuYIf5Yn0fl1vTr3XJ9HiVNNvOlhqPSArOqtw9vI1p6/VTXTjrMLXlU+s+/kNHiIy/Cw==} cpu: [x64] os: [linux] libc: [glibc] + deprecated: yuku-codegen is pure JavaScript since 0.14 '@yuku-codegen/binding-linux-x64-musl@0.8.7': resolution: {integrity: sha512-Otw4MH3404q0Bbvl+YTdW9aoUV5vXmUw8260bWvt1XlaoIX/ceSgI4ygheRDMfBPoHt6FDayQaO9OLVUZAgkFA==} cpu: [x64] os: [linux] libc: [musl] + deprecated: yuku-codegen is pure JavaScript since 0.14 '@yuku-codegen/binding-win32-arm64@0.8.7': resolution: {integrity: sha512-qo/jyrzryiBuKEsFiuWaBCBe3tRMynQ0qFWFgOEjcCMQeZfBm+wKiVEUEFXXLc7bh8YezguAWp0Mtnhq4ARNyA==} cpu: [arm64] os: [win32] + deprecated: yuku-codegen is pure JavaScript since 0.14 '@yuku-codegen/binding-win32-x64@0.8.7': resolution: {integrity: sha512-D5lDsVDx6m00E6bWySlWdH72Ca4TPSaphDqB6QjU6MpuNLIJqoGoatYyq2rOmBE8Zv/kunot/o58KGL03P3eiA==} cpu: [x64] os: [win32] + deprecated: yuku-codegen is pure JavaScript since 0.14 '@yuku-parser/binding-android-arm64@0.8.7': resolution: {integrity: sha512-eGKYiUDX7Y0V7tDTmg+JTVnXnjMqfXXsorZ+EDf5kxwchQ3Or1HS14MzI2fw+jFhHR85fCWt+mtX33Yao73hIQ==} cpu: [arm64] os: [android] + deprecated: yuku-parser runs on yuku-core since 0.14 '@yuku-parser/binding-darwin-arm64@0.8.7': resolution: {integrity: sha512-Re0RHelKLnjEURulY2/KxW+Ngb8zuNA4BRZuMwgGQNzVumT6u4U2N2hc01oeYVNVof0i7GrXE4UCNBgbpRRnjQ==} cpu: [arm64] os: [darwin] + deprecated: yuku-parser runs on yuku-core since 0.14 '@yuku-parser/binding-darwin-x64@0.8.7': resolution: {integrity: sha512-Hn8DROtQkjlA1ACbPgj4a7eP9IuVOI504oiTwpkWPbpaDWD9KdmnVYCqW+1LfenNK/g7O9NhWGpXEdaCNX7lIA==} cpu: [x64] os: [darwin] + deprecated: yuku-parser runs on yuku-core since 0.14 '@yuku-parser/binding-freebsd-x64@0.8.7': resolution: {integrity: sha512-bAP2OV8wRuzplX/jYxv9+vvqQT8JxyNphI8fLfXGL054Xs+4/J5u33cIm3y4rxY8rdoLmmdiJs2Tq7r7lrDRfA==} cpu: [x64] os: [freebsd] + deprecated: yuku-parser runs on yuku-core since 0.14 '@yuku-parser/binding-linux-arm-gnu@0.8.7': resolution: {integrity: sha512-kTYwJQQgmZeAWdDIWabiReIZMpmfLueIj1tCmjStUtFGhR1Z0qwxonKVfUC4N7h/VhGGzLZ//7O1kgt1QKqgCg==} cpu: [arm] os: [linux] libc: [glibc] + deprecated: yuku-parser runs on yuku-core since 0.14 '@yuku-parser/binding-linux-arm-musl@0.8.7': resolution: {integrity: sha512-uL4jE8HPT2BLlxAXyD10LqgPuXa9eDa0BKpCdSANmzIJghq/2eZo3/gQNtaxPZMupWoxjYzSad9IXrwu7aYPXQ==} cpu: [arm] os: [linux] libc: [musl] + deprecated: yuku-parser runs on yuku-core since 0.14 '@yuku-parser/binding-linux-arm64-gnu@0.8.7': resolution: {integrity: sha512-3gVN4pWSKZmXiNX7cU164dR9MPvesCHnlH6nPfpK+yQsCuYphjKKplcb4SnZBrhiqmXbgb2HR0c2TS0IZUPhgA==} cpu: [arm64] os: [linux] libc: [glibc] + deprecated: yuku-parser runs on yuku-core since 0.14 '@yuku-parser/binding-linux-arm64-musl@0.8.7': resolution: {integrity: sha512-S0mwfEjoLpxzXeZw802Wa4RaELsQiPtWqG6INcy8j4GtvNFtl4LCX3eGO1XLn9pyLAISLzTRyU3zUCBUPin8lg==} cpu: [arm64] os: [linux] libc: [musl] + deprecated: yuku-parser runs on yuku-core since 0.14 '@yuku-parser/binding-linux-x64-gnu@0.8.7': resolution: {integrity: sha512-lnbWdPmerE5D1uH1G4IEZKnPzCrWCStRGrtgpSIe1RibAo5bZIjDbbbPYXmMHCEh4F+x/JaJpElh26a3r+BPbg==} cpu: [x64] os: [linux] libc: [glibc] + deprecated: yuku-parser runs on yuku-core since 0.14 '@yuku-parser/binding-linux-x64-musl@0.8.7': resolution: {integrity: sha512-769uwndMvMzUvATWbAcEvyLHKA+DzhHSCl/obBUrRdYfRo26yxui6S8y3z7uJ+Naup7UKrDxrpK7OnQkxkl9KQ==} cpu: [x64] os: [linux] libc: [musl] + deprecated: yuku-parser runs on yuku-core since 0.14 '@yuku-parser/binding-win32-arm64@0.8.7': resolution: {integrity: sha512-mEB/9PlaAkisJ6KWGz0zvywXoU6+80dTlR2LwS7s/jcXXoU6fm2+sitBZXtqu3+Q4DcDgPxM45uWMCzPs0TSRw==} cpu: [arm64] os: [win32] + deprecated: yuku-parser runs on yuku-core since 0.14 '@yuku-parser/binding-win32-x64@0.8.7': resolution: {integrity: sha512-8vNB2DP0ou61nGb8tc/qfi41gfyDXz1MHr2zqL3nR+cJ6CEbiuWV/l/a/vv151gCgiZLLAyGkQGENpozdg716w==} cpu: [x64] os: [win32] + deprecated: yuku-parser runs on yuku-core since 0.14 '@yuku-toolchain/types@0.8.7': resolution: {integrity: sha512-2Z53dNxAJL6UvFoIrDZvYf3zlO8s4VJK4O2hhaB4mXVwwpX/7ajtss3cmfqKvamlNLWyt9FSWs4eoYdlbxpnHA==} - anser@2.3.5: - resolution: {integrity: sha512-vcZjxvvVoxTeR5XBNJB38oTu/7eDCZlwdz32N1eNgpyPF7j/Z7Idf+CUwQOkKKpJ7RJyjxgLHCM7vdIK0iCNMQ==} + ajv@8.20.0: + resolution: {integrity: sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==} ansis@4.3.1: resolution: {integrity: sha512-BJ8/l4R5LRE7hW9WdSuGYrLSHi2ynxeFpDFbH0K/CgNeY/tyhk+vO6TYxXC5r5CpUhNVX310xzPsN/H9lCdfOA==} @@ -1090,36 +1125,29 @@ packages: bidi-js@1.0.3: resolution: {integrity: sha512-RKshQI1R3YQ+n9YJz2QQ147P66ELpa1FQEg20Dk8oW9t2KgLbpDLLp9aGZ7y8WHSshDknG0bknqGw5/tyCs5tw==} + bytes@3.1.2: + resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} + engines: {node: '>= 0.8'} + cac@7.0.0: resolution: {integrity: sha512-tixWYgm5ZoOD+3g6UTea91eow5z6AAHaho3g0V9CNSNb45gM8SmflpAc+GRd1InC4AqN/07Unrgp56Y94N9hJQ==} engines: {node: '>=20.19.0'} - ccount@2.0.1: - resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} - chai@6.2.2: resolution: {integrity: sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==} engines: {node: '>=18'} - character-entities-html4@2.1.0: - resolution: {integrity: sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==} + compressible@2.0.18: + resolution: {integrity: sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==} + engines: {node: '>= 0.6'} - character-entities-legacy@3.0.0: - resolution: {integrity: sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==} + compression@1.8.2: + resolution: {integrity: sha512-o8vI5RE5A6EVVOd9o41jKp41aJom+QTEO/Bx8MYNjexMo/Bv2WOjUfZr+aL0WnYSgymUy6zeguqLTsIhV0gMvQ==} + engines: {node: '>= 0.8.0'} - character-entities@2.0.2: - resolution: {integrity: sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==} - - clsx@2.1.1: - resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} - engines: {node: '>=6'} - - comma-separated-tokens@2.0.3: - resolution: {integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==} - - commander@8.3.0: - resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==} - engines: {node: '>= 12'} + content-type@2.1.0: + resolution: {integrity: sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag==} + engines: {node: '>=18'} convert-source-map@2.0.0: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} @@ -1135,9 +1163,8 @@ packages: resolution: {integrity: sha512-23XHcCF+coGYevirZceTVD7NdJOqVn+49IHyxgszm+JIiHLoB2TkmPtsYkNWT1pvRSGkc35L6NHs0yHkN2SumA==} engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0} - debug@4.4.3: - resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} - engines: {node: '>=6.0'} + debug@2.6.9: + resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} peerDependencies: supports-color: '*' peerDependenciesMeta: @@ -1147,23 +1174,17 @@ packages: decimal.js@10.6.0: resolution: {integrity: sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==} - decode-named-character-reference@1.3.0: - resolution: {integrity: sha512-GtpQYB283KrPp6nRw50q3U9/VfOutZOe103qlN7BPP6Ad27xYnOIWv4lPzo8HCAL+mMZofJ9KEy30fq6MfaK6Q==} - defu@6.1.7: resolution: {integrity: sha512-7z22QmUWiQ/2d0KkdYmANbRUVABpZ9SNYyH5vx6PZ+nE5bcC0l7uFvEfHlyld/HcGBFTL536ClDt3DEcSlEJAQ==} - dequal@2.0.3: - resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} - engines: {node: '>=6'} + destroy@1.2.0: + resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} + engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} detect-libc@2.1.2: resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==} engines: {node: '>=8'} - devlop@1.1.0: - resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==} - dts-resolver@3.0.0: resolution: {integrity: sha512-1T1f+z+4tl9XD+m+0HBgWoL/nm0bOIffyWaUuUSBlFg/86IWvfx+wjNaO/ybU0AJzG9/Mi5hBUgGV6zCmWEN7Q==} engines: {node: ^22.18.0 || >=24.0.0} @@ -1184,10 +1205,6 @@ packages: es-module-lexer@2.3.2: resolution: {integrity: sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==} - escape-string-regexp@5.0.0: - resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} - engines: {node: '>=12'} - estree-walker@3.0.3: resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} @@ -1195,6 +1212,12 @@ packages: resolution: {integrity: sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==} engines: {node: '>=12.0.0'} + fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + + fast-uri@3.1.9: + resolution: {integrity: sha512-hS/0Wt3Ya043oKXs0sIxrMpKQITXhMLIrVAKKXi4gozGC9v7YRWVnXIZzjNPTO02M9BdxLCWqK1yRXgNziVyJQ==} + fdir@6.5.0: resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} engines: {node: '>=12.0.0'} @@ -1204,9 +1227,6 @@ packages: picomatch: optional: true - fflate@0.8.3: - resolution: {integrity: sha512-tbZNuJrLwGUp3zshBtdy4W+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA==} - fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -1216,12 +1236,6 @@ packages: resolution: {integrity: sha512-/6gFNr0N04nob252sTQxyFLi3eKFRqIg1I87YcqAMT1i6SQrSF6KujUEQrtrjMV0H/eejTCltLdDSTEMzHbnsQ==} engines: {node: '>=20.20.0'} - hast-util-to-html@9.0.5: - resolution: {integrity: sha512-OguPdidb+fbHQSU4Q4ZiLKnzWo8Wwsf5bZfbvu7//a9oTYoqD/fWpe96NuHkoS9h0ccGOTe0C4NGXdtS0iObOw==} - - hast-util-whitespace@3.0.0: - resolution: {integrity: sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==} - hookable@6.1.1: resolution: {integrity: sha512-U9LYDy1CwhMCnprUfeAZWZGByVbhd54hwepegYTK7Pi5NvqEj63ifz5z+xukznehT7i6NIZRu89Ay1AZmRsLEQ==} @@ -1229,11 +1243,8 @@ packages: resolution: {integrity: sha512-CV9TW3Y3f8/wT0BRFc1/KAVQ3TUHiXmaAb6VW9vtiMFf7SLoMd1PdAc4W3KFOFETBJUb90KatHqlsZMWV+R9Gg==} engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0} - html-void-elements@3.0.0: - resolution: {integrity: sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==} - - immer@10.2.0: - resolution: {integrity: sha512-d/+XTN3zfODyjr89gM3mPq1WNX2B8pYsu7eORitdwyA2sBubnTl3laYlBk4sXY5FUa5qTZGBDPJICVbvqzjlbw==} + immer@11.2.9: + resolution: {integrity: sha512-IQ4UEtXjZjyefyWjtLEDXUSrF6T2hwjKPi6BIJl3bY/2XXW24d6cNGdXJSBOA/+KNnuiXkZY6DR0C3efolhitA==} import-without-cache@0.4.0: resolution: {integrity: sha512-NkJQA7oZ4YHQhd2+H3BoRFKF3d/XNsiKpHZCQEMH9pDX27hQQLsTyOocyRgaIVtf8gHX3Nt3LPkR4e5EdtPAGQ==} @@ -1258,9 +1269,8 @@ packages: canvas: optional: true - katex@0.16.47: - resolution: {integrity: sha512-Eeo8Ys1doU1z+x8AZsPpQu+p/QcZBI5PeOo7QGQdy2x2m0MU/hYagBbGOmXwr5KVbEfVuWv9LpnQWeehogurjg==} - hasBin: true + json-schema-traverse@1.0.0: + resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} lightningcss-android-arm64@1.33.0: resolution: {integrity: sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==} @@ -1336,9 +1346,6 @@ packages: resolution: {integrity: sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==} engines: {node: '>= 12.0.0'} - longest-streak@3.1.0: - resolution: {integrity: sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==} - loose-envify@1.4.0: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} hasBin: true @@ -1350,155 +1357,106 @@ packages: magic-string@0.30.21: resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} - markdown-table@3.0.4: - resolution: {integrity: sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw==} - - mdast-util-find-and-replace@3.0.2: - resolution: {integrity: sha512-Tmd1Vg/m3Xz43afeNxDIhWRtFZgM2VLyaf4vSTYwudTyeuTneoL3qtWMA5jeLyz/O1vDJmmV4QuScFCA2tBPwg==} - - mdast-util-from-markdown@2.0.3: - resolution: {integrity: sha512-W4mAWTvSlKvf8L6J+VN9yLSqQ9AOAAvHuoDAmPkz4dHf553m5gVj2ejadHJhoJmcmxEnOv6Pa8XJhpxE93kb8Q==} - - mdast-util-gfm-autolink-literal@2.0.1: - resolution: {integrity: sha512-5HVP2MKaP6L+G6YaxPNjuL0BPrq9orG3TsrZ9YXbA3vDw/ACI4MEsnoDpn6ZNm7GnZgtAcONJyPhOP8tNJQavQ==} - - mdast-util-gfm-footnote@2.1.0: - resolution: {integrity: sha512-sqpDWlsHn7Ac9GNZQMeUzPQSMzR6Wv0WKRNvQRg0KqHh02fpTz69Qc1QSseNX29bhz1ROIyNyxExfawVKTm1GQ==} - - mdast-util-gfm-strikethrough@2.0.0: - resolution: {integrity: sha512-mKKb915TF+OC5ptj5bJ7WFRPdYtuHv0yTRxK2tJvi+BDqbkiG7h7u/9SI89nRAYcmap2xHQL9D+QG/6wSrTtXg==} - - mdast-util-gfm-table@2.0.0: - resolution: {integrity: sha512-78UEvebzz/rJIxLvE7ZtDd/vIQ0RHv+3Mh5DR96p7cS7HsBhYIICDBCu8csTNWNO6tBWfqXPWekRuj2FNOGOZg==} - - mdast-util-gfm-task-list-item@2.0.0: - resolution: {integrity: sha512-IrtvNvjxC1o06taBAVJznEnkiHxLFTzgonUdy8hzFVeDun0uTjxxrRGVaNFqkU1wJR3RBPEfsxmU6jDWPofrTQ==} - - mdast-util-gfm@3.1.0: - resolution: {integrity: sha512-0ulfdQOM3ysHhCJ1p06l0b0VKlhU0wuQs3thxZQagjcjPrlFRqY215uZGHHJan9GEAXd9MbfPjFJz+qMkVR6zQ==} - - mdast-util-math@3.0.0: - resolution: {integrity: sha512-Tl9GBNeG/AhJnQM221bJR2HPvLOSnLE/T9cJI9tlc6zwQk2nPk/4f0cHkOdEixQPC/j8UtKDdITswvLAy1OZ1w==} - - mdast-util-phrasing@4.1.0: - resolution: {integrity: sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w==} - - mdast-util-to-hast@13.2.1: - resolution: {integrity: sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA==} - - mdast-util-to-markdown@2.1.2: - resolution: {integrity: sha512-xj68wMTvGXVOKonmog6LwyJKrYXZPvlwabaryTjLh9LuvovB/KAH+kvi8Gjj+7rJjsFi23nkUxRQv1KqSroMqA==} - - mdast-util-to-string@4.0.0: - resolution: {integrity: sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==} - mdn-data@2.27.1: resolution: {integrity: sha512-9Yubnt3e8A0OKwxYSXyhLymGW4sCufcLG6VdiDdUGVkPhpqLxlvP5vl1983gQjJl3tqbrM731mjaZaP68AgosQ==} - micromark-core-commonmark@2.0.3: - resolution: {integrity: sha512-RDBrHEMSxVFLg6xvnXmb1Ayr2WzLAWjeSATAoxwKYJV94TeNavgoIdA0a9ytzDSVzBy2YKFK+emCPOEibLeCrg==} + mime-db@1.54.0: + resolution: {integrity: sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==} + engines: {node: '>= 0.6'} - micromark-extension-gfm-autolink-literal@2.1.0: - resolution: {integrity: sha512-oOg7knzhicgQ3t4QCjCWgTmfNhvQbDDnJeVu9v81r7NltNCVmhPy1fJRX27pISafdjL+SVc4d3l48Gb6pbRypw==} + mime-types@3.0.2: + resolution: {integrity: sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==} + engines: {node: '>=18'} - micromark-extension-gfm-footnote@2.1.0: - resolution: {integrity: sha512-/yPhxI1ntnDNsiHtzLKYnE3vf9JZ6cAisqVDauhp4CEHxlb4uoOTxOCJ+9s51bIB8U1N1FJ1RXOKTIlD5B/gqw==} - - micromark-extension-gfm-strikethrough@2.1.0: - resolution: {integrity: sha512-ADVjpOOkjz1hhkZLlBiYA9cR2Anf8F4HqZUO6e5eDcPQd0Txw5fxLzzxnEkSkfnD0wziSGiv7sYhk/ktvbf1uw==} - - micromark-extension-gfm-table@2.1.1: - resolution: {integrity: sha512-t2OU/dXXioARrC6yWfJ4hqB7rct14e8f7m0cbI5hUmDyyIlwv5vEtooptH8INkbLzOatzKuVbQmAYcbWoyz6Dg==} - - micromark-extension-gfm-tagfilter@2.0.0: - resolution: {integrity: sha512-xHlTOmuCSotIA8TW1mDIM6X2O1SiX5P9IuDtqGonFhEK0qgRI4yeC6vMxEV2dgyr2TiD+2PQ10o+cOhdVAcwfg==} - - micromark-extension-gfm-task-list-item@2.1.0: - resolution: {integrity: sha512-qIBZhqxqI6fjLDYFTBIa4eivDMnP+OZqsNwmQ3xNLE4Cxwc+zfQEfbs6tzAo2Hjq+bh6q5F+Z8/cksrLFYWQQw==} - - micromark-extension-gfm@3.0.0: - resolution: {integrity: sha512-vsKArQsicm7t0z2GugkCKtZehqUm31oeGBV/KVSorWSy8ZlNAv7ytjFhvaryUiCUJYqs+NoE6AFhpQvBTM6Q4w==} - - micromark-extension-math@3.1.0: - resolution: {integrity: sha512-lvEqd+fHjATVs+2v/8kg9i5Q0AP2k85H0WUOwpIVvUML8BapsMvh1XAogmQjOCsLpoKRCVQqEkQBB3NhVBcsOg==} - - micromark-factory-destination@2.0.1: - resolution: {integrity: sha512-Xe6rDdJlkmbFRExpTOmRj9N3MaWmbAgdpSrBQvCFqhezUn4AHqJHbaEnfbVYYiexVSs//tqOdY/DxhjdCiJnIA==} - - micromark-factory-label@2.0.1: - resolution: {integrity: sha512-VFMekyQExqIW7xIChcXn4ok29YE3rnuyveW3wZQWWqF4Nv9Wk5rgJ99KzPvHjkmPXF93FXIbBp6YdW3t71/7Vg==} - - micromark-factory-space@2.0.1: - resolution: {integrity: sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg==} - - micromark-factory-title@2.0.1: - resolution: {integrity: sha512-5bZ+3CjhAd9eChYTHsjy6TGxpOFSKgKKJPJxr293jTbfry2KDoWkhBb6TcPVB4NmzaPhMs1Frm9AZH7OD4Cjzw==} - - micromark-factory-whitespace@2.0.1: - resolution: {integrity: sha512-Ob0nuZ3PKt/n0hORHyvoD9uZhr+Za8sFoP+OnMcnWK5lngSzALgQYKMr9RJVOWLqQYuyn6ulqGWSXdwf6F80lQ==} - - micromark-util-character@2.1.1: - resolution: {integrity: sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==} - - micromark-util-chunked@2.0.1: - resolution: {integrity: sha512-QUNFEOPELfmvv+4xiNg2sRYeS/P84pTW0TCgP5zc9FpXetHY0ab7SxKyAQCNCc1eK0459uoLI1y5oO5Vc1dbhA==} - - micromark-util-classify-character@2.0.1: - resolution: {integrity: sha512-K0kHzM6afW/MbeWYWLjoHQv1sgg2Q9EccHEDzSkxiP/EaagNzCm7T/WMKZ3rjMbvIpvBiZgwR3dKMygtA4mG1Q==} - - micromark-util-combine-extensions@2.0.1: - resolution: {integrity: sha512-OnAnH8Ujmy59JcyZw8JSbK9cGpdVY44NKgSM7E9Eh7DiLS2E9RNQf0dONaGDzEG9yjEl5hcqeIsj4hfRkLH/Bg==} - - micromark-util-decode-numeric-character-reference@2.0.2: - resolution: {integrity: sha512-ccUbYk6CwVdkmCQMyr64dXz42EfHGkPQlBj5p7YVGzq8I7CtjXZJrubAYezf7Rp+bjPseiROqe7G6foFd+lEuw==} - - micromark-util-decode-string@2.0.1: - resolution: {integrity: sha512-nDV/77Fj6eH1ynwscYTOsbK7rR//Uj0bZXBwJZRfaLEJ1iGBR6kIfNmlNqaqJf649EP0F3NWNdeJi03elllNUQ==} - - micromark-util-encode@2.0.1: - resolution: {integrity: sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==} - - micromark-util-html-tag-name@2.0.1: - resolution: {integrity: sha512-2cNEiYDhCWKI+Gs9T0Tiysk136SnR13hhO8yW6BGNyhOC4qYFnwF1nKfD3HFAIXA5c45RrIG1ub11GiXeYd1xA==} - - micromark-util-normalize-identifier@2.0.1: - resolution: {integrity: sha512-sxPqmo70LyARJs0w2UclACPUUEqltCkJ6PhKdMIDuJ3gSf/Q+/GIe3WKl0Ijb/GyH9lOpUkRAO2wp0GVkLvS9Q==} - - micromark-util-resolve-all@2.0.1: - resolution: {integrity: sha512-VdQyxFWFT2/FGJgwQnJYbe1jjQoNTS4RjglmSjTUlpUMa95Htx9NHeYW4rGDJzbjvCsl9eLjMQwGeElsqmzcHg==} - - micromark-util-sanitize-uri@2.0.1: - resolution: {integrity: sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==} - - micromark-util-subtokenize@2.1.0: - resolution: {integrity: sha512-XQLu552iSctvnEcgXw6+Sx75GflAPNED1qx7eBJ+wydBb2KCbRZe+NwvIEEMM83uml1+2WSXpBAcp9IUCgCYWA==} - - micromark-util-symbol@2.0.1: - resolution: {integrity: sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==} - - micromark-util-types@2.0.2: - resolution: {integrity: sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA==} - - micromark@4.0.2: - resolution: {integrity: sha512-zpe98Q6kvavpCr1NPVSCMebCKfD7CA2NqZ+rykeNhONIJBpc1tFKt9hucLGwha3jNTNI8lHpctWJWoimVF4PfA==} - - ms@2.1.3: - resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + ms@2.0.0: + resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} nanoid@3.3.18: resolution: {integrity: sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true + negotiator@0.6.4: + resolution: {integrity: sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==} + engines: {node: '>= 0.6'} + + negotiator@1.1.0: + resolution: {integrity: sha512-NMPBRMJgiQHjbd8phG3Vebdx4kZ1H121rbl5IkMqeOsahptB9BKo/d7oJ3zTXqTgagn2bWlNSXkh0QUGM31RYg==} + engines: {node: '>=18'} + + node-addon-native-custom-loader@0.1.9: + resolution: {integrity: sha512-Zh87aubSc1UF8CzZsRws1KtSwXiPDH0tbcg8V/2OA8Tcq9yGJRESFcEOC5NGLFama5IGfC3aJhubZbrj9Un2qA==} + engines: {node: '>=20'} + + node-addon-require-builtin-darwin-arm64@0.1.9: + resolution: {integrity: sha512-n45xEILQVOLZ2hVhzRXesTMYS4odHquyI/B/IkPMPUCONa8PjNfBag6lYBH4wDrhgpLNNBwMsUD8d8O/13QPPA==} + engines: {node: '>=20'} + cpu: [arm64] + os: [darwin] + + node-addon-require-builtin-darwin-x64@0.1.9: + resolution: {integrity: sha512-Sm4Liqh1uo9zgJB2F/pACPPZdHu+fj9Qniyr1Q99dDQB0v71VgZgkAgv3K0/E1iPQBlZq9rakFkY7MGUIfWc0A==} + engines: {node: '>=20'} + cpu: [x64] + os: [darwin] + + node-addon-require-builtin-linux-arm64-gnu@0.1.9: + resolution: {integrity: sha512-ToU4wGtOD/069i2y4fJ3cjDJiiWtcjSQTZMf0YKlotb5BmTM7FjhR3X1aub8J/YjlOwl6665J/XAYuvCaDO5sA==} + engines: {node: '>=20'} + cpu: [arm64] + os: [linux] + libc: [glibc] + + node-addon-require-builtin-linux-arm64-musl@0.1.9: + resolution: {integrity: sha512-85Z5Avp++wfa9iiTIH8LC/r6qvlC/CiwpifiwIz0gYQ9PzajTSkz06gX7YDqf1oUqWYxU9uwNEOmo7mktHOOfA==} + engines: {node: '>=20'} + cpu: [arm64] + os: [linux] + libc: [musl] + + node-addon-require-builtin-linux-x64-gnu@0.1.9: + resolution: {integrity: sha512-fh3K3/JvBfSYwU8vEOpp4Wdp4N/jX0EnZYq5GsaftlQin1FVqgve/yDNoh+asxBMOQyHOG8F4dXlV1WCierrfg==} + engines: {node: '>=20'} + cpu: [x64] + os: [linux] + libc: [glibc] + + node-addon-require-builtin-linux-x64-musl@0.1.9: + resolution: {integrity: sha512-B6fu/5xmbRxnifM7nWz0IESkYnUl8dwFZmRDMsxdhzv2nb+EtBRFAXg4lf73qhX3yoZD4SnWJILBQMlIAwBCzw==} + engines: {node: '>=20'} + cpu: [x64] + os: [linux] + libc: [musl] + + node-addon-require-builtin-win32-arm64-msvc@0.1.9: + resolution: {integrity: sha512-FOQuzNe8B1BANu886rJgdbQuRxPGUQmewkykw87wSr32U0ibQ3AWGuUM/Gh7LG4RekjFaifj7gEI/tq2+6GU6g==} + engines: {node: '>=20'} + cpu: [arm64] + os: [win32] + + node-addon-require-builtin-win32-ia32-msvc@0.1.9: + resolution: {integrity: sha512-N29P0kmIBT6hnkNNFYzxn+o9ydT6OYZe9RFAi8dSxV1rNSul1FlxtuKWYe8w2sQpbQGYuGDEtpOwdeFtq2iFTg==} + engines: {node: '>=20 <23'} + cpu: [ia32] + os: [win32] + + node-addon-require-builtin-win32-x64-msvc@0.1.9: + resolution: {integrity: sha512-+i6N4A7m7txjbw8pDYESdWXiKO9EEVq0SzTzwPS0WZuV4F1MzQnaDJwJJnO7T6zAc0BvqHXBOkpharCrUjFhbQ==} + engines: {node: '>=20'} + cpu: [x64] + os: [win32] + + node-addon-require-builtin@0.1.9: + resolution: {integrity: sha512-BCxXCMZDs/VLLh64SwKNw/me7Qx1I7Be4qxWwYVRRm8tJoOB8fL7qg6CmXhSXeUqsKt72t8RaKCX4EN+5nocVg==} + engines: {node: '>=20'} + obug@2.1.4: resolution: {integrity: sha512-4a+OsYv9UktOJKE+l1A4OufDgdRF9PifWj+tJnHURo/P+WOxpG4GzUFL9qCalmWauao6ogiG+QvnCovwPoyAWA==} engines: {node: '>=12.20.0'} - oniguruma-parser@0.12.2: - resolution: {integrity: sha512-6HVa5oIrgMC6aA6WF6XyyqbhRPJrKR02L20+2+zpDtO5QAzGHAUGw5TKQvwi5vctNnRHkJYmjAhRVQF2EKdTQw==} - - oniguruma-to-es@4.3.6: - resolution: {integrity: sha512-csuQ9x3Yr0cEIs/Zgx/OEt9iBw9vqIunAPQkx19R/fiMq2oGVTgcMqO/V3Ybqefr1TBvosI6jU539ksaBULJyA==} + on-headers@1.1.0: + resolution: {integrity: sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A==} + engines: {node: '>= 0.8'} parse5@8.0.1: resolution: {integrity: sha512-z1e/HMG90obSGeidlli3hj7cbocou0/wa5HacvI3ASx34PecNjNQeaHNo5WIZpWofN9kgkqV1q5YvXe3F0FoPw==} @@ -1517,9 +1475,6 @@ packages: resolution: {integrity: sha512-u82N74LFzG8ca+dD8puPnplTXoGH4fTPpVGuIbt36G3qvNlkvfD0lEAZSxaly3KX8TS/L1A1gsCEmvKmBcVbkQ==} engines: {node: ^10 || ^12 || >=14} - property-information@7.2.0: - resolution: {integrity: sha512-IAtzIB6sUiWaJYrX9smp3V46pBGbBeLFRGdh25kg1334VcBlD8HzhPeNIWQH9zhGmo2itIe25EHt9dQP7G5hmg==} - punycode@2.3.1: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} @@ -1536,15 +1491,6 @@ packages: resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==} engines: {node: '>=0.10.0'} - regex-recursion@6.0.2: - resolution: {integrity: sha512-0YCaSCq2VRIebiaUviZNs0cBz1kg5kVS2UKUfNIx8YVs1cN3AV7NTctO5FOKBA+UT2BPJIWZauYHPqJODG50cg==} - - regex-utilities@2.3.0: - resolution: {integrity: sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng==} - - regex@6.1.0: - resolution: {integrity: sha512-6VwtthbV4o/7+OaAF9I5L5V3llLEsoPyq9P1JVXkedTP33c7MfCG0/5NOPcSJn0TzXcG9YUrR0gQSWioew3LDg==} - require-from-string@2.0.2: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} @@ -1552,6 +1498,10 @@ packages: resolve-pkg-maps@1.0.0: resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} + resolve.exports@2.0.4: + resolution: {integrity: sha512-zepuGL0ulf+nt+XaFrlKeaiTJeyPFPLLY62+ncq1/VTHBdt3HsfXOH60priZ6tnXQozdGcDeIF5JVTanvIcYWQ==} + engines: {node: '>=10'} + rolldown-plugin-dts@0.27.14: resolution: {integrity: sha512-ZvuDDwoIpRK9RPxDXratCpklFO9QZZWndf/sd0VBFb4LEj0jj07UcHK9OCh7V4XiFz2Z89ziyBC2K6tJiDjrbw==} engines: {node: ^22.18.0 || >=24.11.0} @@ -1576,6 +1526,9 @@ packages: engines: {node: ^20.19.0 || >=22.12.0} hasBin: true + safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + saxes@6.0.0: resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} engines: {node: '>=v12.22.7'} @@ -1583,9 +1536,10 @@ packages: scheduler@0.23.2: resolution: {integrity: sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==} - shiki@4.4.3: - resolution: {integrity: sha512-Mb/GvXPHBAXdgGIcnfU5L3ldpn1XcxrGkPHwqgRx17/I2XRfqlFKk2vGkHWINn1kdXvzJZeuO3is6I9KLPFm0g==} - engines: {node: '>=20'} + semver@7.8.5: + resolution: {integrity: sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==} + engines: {node: '>=10'} + hasBin: true siginfo@2.0.0: resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} @@ -1594,18 +1548,12 @@ packages: resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} engines: {node: '>=0.10.0'} - space-separated-tokens@2.0.2: - resolution: {integrity: sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==} - stackback@0.0.2: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} std-env@4.2.0: resolution: {integrity: sha512-oCUKSupKTHX53EyjDtuZQ64pjLJ6yYCtpmEw0goYxtjG9KpbRe8KAsl2tBUGU9DyMcJ0RwJ8GqJAFzMXcXW1Rw==} - stringify-entities@4.0.4: - resolution: {integrity: sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==} - symbol-tree@3.2.4: resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} @@ -1643,9 +1591,6 @@ packages: resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} hasBin: true - trim-lines@3.0.1: - resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==} - tsdown@0.22.14: resolution: {integrity: sha512-ule7Y+fsAN2iZbLDoo7C4KYljFJNJJ+fLshyn+9gozeTspVersWHxwdGB+Dm2hzA38s6muFnUTl0jK3vJm9ifQ==} engines: {node: ^22.18.0 || >=24.11.0} @@ -1695,39 +1640,19 @@ packages: resolution: {integrity: sha512-HvltHd7avK13QIw/oLe4qoOLyoVSoafqJ2jYOrtMRBkbYT31eiBQ8O0ehRKZiEZCMEyLFQNIADpgCWC5fALvYQ==} engines: {node: '>=22.19.0'} - unist-util-is@6.0.1: - resolution: {integrity: sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g==} - - unist-util-position@5.0.0: - resolution: {integrity: sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==} - - unist-util-remove-position@5.0.0: - resolution: {integrity: sha512-Hp5Kh3wLxv0PHj9m2yZhhLt58KzPtEYKQQ4yxfYFEO7EvHwzyDYnduhHnY1mDxoqr7VUwVuHXk9RXKIiYS1N8Q==} - - unist-util-stringify-position@4.0.0: - resolution: {integrity: sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==} - - unist-util-visit-parents@6.0.2: - resolution: {integrity: sha512-goh1s1TBrqSqukSc8wrjwWhL0hiJxgA8m4kFxGlQ+8FYQ3C/m11FcTs4YYem7V664AhHVvgoQLk890Ssdsr2IQ==} - - unist-util-visit@5.1.0: - resolution: {integrity: sha512-m+vIdyeCOpdr/QeQCu2EzxX/ohgS8KbnPDgFni4dQsfSCtpz8UqDyY5GjRru8PDKuYn7Fq19j1CQ+nJSsGKOzg==} - use-sync-external-store@1.2.0: resolution: {integrity: sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 + vary@1.1.2: + resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} + engines: {node: '>= 0.8'} + verkit@0.3.2: resolution: {integrity: sha512-zj/ob3UsvJGN0whEAKFp53REA5X66hvffVqoCtVQAakJKnKlH+/PcOfMoFwIG/o4rElqLv/ycAFlx8ZlXUorCg==} engines: {node: '>=18.12.0'} - vfile-message@4.0.3: - resolution: {integrity: sha512-QTHzsGd1EhbZs4AsQ20JX1rC3cOlt/IWJruk893DfLRr57lcnOeMaWG4K0JrRta4mIJZKth2Au3mM3u03/JWKw==} - - vfile@6.0.3: - resolution: {integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==} - vite@8.2.2: resolution: {integrity: sha512-cFKLV/PRgAUlIRm5WjMjJ86jrftzpqcgH+Us+DS8mI3CDNiH30Whrz8uHL3+MOLPAgqbMBAqWdAHAphOAM+z/Q==} engines: {node: ^20.19.0 || >=22.12.0} @@ -1771,20 +1696,20 @@ packages: yaml: optional: true - vitest@4.1.11: - resolution: {integrity: sha512-fhACrNXUidIbGSBr5FlbuBkO7VWC1ZyLl0DO4CU2DrQoAPxX84Ysxs+HeGQpii5lZWV1Q4gBZTTu49mF+A6Edw==} + vitest@4.1.8: + resolution: {integrity: sha512-flY6ScbCIt9HThs+C5HS7jvGOB560DJtk/Z15IQROTA6zEy49Nh8T/dofWTQL+n3vswqn87sbJNiuqw1SDp5Ig==} engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@opentelemetry/api': ^1.9.0 '@types/node': ^20.0.0 || ^22.0.0 || >=24.0.0 - '@vitest/browser-playwright': 4.1.11 - '@vitest/browser-preview': 4.1.11 - '@vitest/browser-webdriverio': 4.1.11 - '@vitest/coverage-istanbul': 4.1.11 - '@vitest/coverage-v8': 4.1.11 - '@vitest/ui': 4.1.11 + '@vitest/browser-playwright': 4.1.8 + '@vitest/browser-preview': 4.1.8 + '@vitest/browser-webdriverio': 4.1.8 + '@vitest/coverage-istanbul': 4.1.8 + '@vitest/coverage-v8': 4.1.8 + '@vitest/ui': 4.1.8 happy-dom: '*' jsdom: '*' vite: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -1856,6 +1781,11 @@ packages: xmlchars@2.2.0: resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} + yaml@2.9.1: + resolution: {integrity: sha512-3NxN8+78OdzbT7C/WjGsyfPAtJaN3FNDsWxv7Y7mcDsT/oOmgW8BpyQQFFBnvZE3j9Y2Sdz1ULFLezL7Eb2yFw==} + engines: {node: '>= 14.6'} + hasBin: true + yuku-ast@0.8.7: resolution: {integrity: sha512-h6+4bDfyootiMB9vckk5uKo5r5j0GHrkr17FQTDNfEsFT3DWlN9uu1HJwQwc64pgmLCI945fWM3lbTIqxjT3GQ==} @@ -1868,13 +1798,14 @@ packages: zod@4.4.3: resolution: {integrity: sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==} - zustand@4.4.7: - resolution: {integrity: sha512-QFJWJMdlETcI69paJwhSMJz7PPWjVP8Sjhclxmxmxv/RYI7ZOvR5BHX+ktH0we9gTWQMxcne8q1OY8xxz604gw==} - engines: {node: '>=12.7.0'} + zustand@5.0.16: + resolution: {integrity: sha512-Uv7e327ihlCfayfja3hDc0M64Upev1LWBKpRobdK4NyovDDPeeX4imWXc/wzC1yc6fkYPoAY/ncKVPAs2jrtQw==} + engines: {node: '>=12.20.0'} peerDependencies: - '@types/react': '>=16.8' - immer: '>=9.0' - react: '>=16.8' + '@types/react': '>=18.0.0' + immer: '>=9.0.6' + react: '>=18.0.0' + use-sync-external-store: '>=1.2.0' peerDependenciesMeta: '@types/react': optional: true @@ -1882,9 +1813,8 @@ packages: optional: true react: optional: true - - zwitch@2.0.4: - resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} + use-sync-external-store: + optional: true snapshots: @@ -1931,630 +1861,653 @@ snapshots: '@csstools/css-tokenizer@4.0.0': {} - '@deepseek-ai/cordis-plugin-include@1.0.6(@deepseek-ai/cordis-plugin-loader@1.0.2)(@deepseek-ai/cordis@4.0.1)': + '@deepseek-ai/cordis-plugin-group@1.0.5(@deepseek-ai/cordis-plugin-loader@1.0.6)(@deepseek-ai/cordis@4.0.5)': dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/cordis-plugin-loader': 1.0.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/cosmokit': 1.8.2 + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/cordis-plugin-loader': 1.0.6(@deepseek-ai/cordis@4.0.5)(node-addon-require-builtin@0.1.9) + + '@deepseek-ai/cordis-plugin-include@1.0.10(@deepseek-ai/cordis-plugin-loader@1.0.6)(@deepseek-ai/cordis@4.0.5)': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/cordis-plugin-loader': 1.0.6(@deepseek-ai/cordis@4.0.5)(node-addon-require-builtin@0.1.9) + '@deepseek-ai/cosmokit': 1.8.6 js-yaml: 4.3.1 - '@deepseek-ai/cordis-plugin-loader@1.0.2(@deepseek-ai/cordis@4.0.1)': + '@deepseek-ai/cordis-plugin-loader@1.0.6(@deepseek-ai/cordis@4.0.5)(node-addon-require-builtin@0.1.9)': dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/cosmokit': 1.8.2 + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/cosmokit': 1.8.6 + '@deepseek-ai/schemastery': 3.18.5 + optionalDependencies: + node-addon-require-builtin: 0.1.9 - '@deepseek-ai/cordis@4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2)': + '@deepseek-ai/cordis@4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6)': dependencies: - '@deepseek-ai/cosmokit': 1.8.2 + '@deepseek-ai/cosmokit': 1.8.6 '@standard-schema/spec': 1.1.0 optionalDependencies: - '@deepseek-ai/cordis-plugin-include': 1.0.6(@deepseek-ai/cordis-plugin-loader@1.0.2)(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/cordis-plugin-loader': 1.0.2(@deepseek-ai/cordis@4.0.1) + '@deepseek-ai/cordis-plugin-include': 1.0.10(@deepseek-ai/cordis-plugin-loader@1.0.6)(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/cordis-plugin-loader': 1.0.6(@deepseek-ai/cordis@4.0.5)(node-addon-require-builtin@0.1.9) - '@deepseek-ai/cosmokit@1.8.2': {} + '@deepseek-ai/cosmokit@1.8.6': {} - '@deepseek-ai/dsh-agent-default-model@0.1.1-rc.2(cffd0b3811dd3fb50ded7f3d23c3fd53)': + '@deepseek-ai/dsh-agent-default-model@0.2.0-rc.1(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6)(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-agent@0.2.0-rc.1(fc798d7c31c482bc54f0505b44bb2076))(@deepseek-ai/dsh-app-boot@0.2.0-rc.1(@deepseek-ai/cordis-plugin-group@1.0.5(@deepseek-ai/cordis-plugin-loader@1.0.6)(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6)(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-home-paths@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-launch-environment@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-system-prompt@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))))(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))': dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-agent': 0.1.1-rc.2(c1537a8836b04097f168b024f1e38d85) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/dsh-llm': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-attachment@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) - '@deepseek-ai/dsh-settings': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/schemastery@3.18.1) - '@deepseek-ai/schemastery': 3.18.1 + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-agent': 0.2.0-rc.1(fc798d7c31c482bc54f0505b44bb2076) + '@deepseek-ai/dsh-config-editor': 0.2.0-rc.1(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6)(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-app-boot@0.2.0-rc.1(@deepseek-ai/cordis-plugin-group@1.0.5(@deepseek-ai/cordis-plugin-loader@1.0.6)(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6)(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-home-paths@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-launch-environment@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-system-prompt@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))))) + '@deepseek-ai/dsh-llm': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/schemastery': 3.18.5 + transitivePeerDependencies: + - '@deepseek-ai/cordis-plugin-include' + - '@deepseek-ai/cordis-plugin-loader' + - '@deepseek-ai/dsh-app-boot' + - '@deepseek-ai/dsh-hmr' - '@deepseek-ai/dsh-agent-presets@0.1.1-rc.2(5200ead8959daeaefdf3dd69ba905368)': + '@deepseek-ai/dsh-agent-preset-registry@0.2.0-rc.1(98364bacaab99b35f873e03bd9f9dba7)': dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/cordis-plugin-include': 1.0.6(@deepseek-ai/cordis-plugin-loader@1.0.2)(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/cordis-plugin-loader': 1.0.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/dsh-agent': 0.1.1-rc.2(c1537a8836b04097f168b024f1e38d85) - '@deepseek-ai/dsh-atomic-write': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-home-paths': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/dsh-scope': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-session': 0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc) - '@deepseek-ai/dsh-settings': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/schemastery@3.18.1) - '@deepseek-ai/dsh-system-prompt': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-llm@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-attachment@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))))(@deepseek-ai/dsh-scope@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) - '@deepseek-ai/schemastery': 3.18.1 + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/cordis-plugin-include': 1.0.10(@deepseek-ai/cordis-plugin-loader@1.0.6)(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/cordis-plugin-loader': 1.0.6(@deepseek-ai/cordis@4.0.5)(node-addon-require-builtin@0.1.9) + '@deepseek-ai/dsh-agent': 0.2.0-rc.1(fc798d7c31c482bc54f0505b44bb2076) + '@deepseek-ai/dsh-app-boot': 0.2.0-rc.1(@deepseek-ai/cordis-plugin-group@1.0.5(@deepseek-ai/cordis-plugin-loader@1.0.6)(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6)(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-home-paths@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-launch-environment@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-system-prompt@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))) + '@deepseek-ai/dsh-invariants': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-scope': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)) + '@deepseek-ai/dsh-session': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))) + '@deepseek-ai/dsh-session-projection': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))) + '@deepseek-ai/dsh-settings': 0.2.0-rc.1(d7e409ecfdec5ffa766c2b7e31b5df97) + '@deepseek-ai/dsh-system-prompt': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))) + '@deepseek-ai/dsh-tools': 0.2.0-rc.1(de2a5653d00d1365fa221821333b74b9) + '@deepseek-ai/dsh-typert-protocol': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/schemastery': 3.18.5 js-yaml: 4.3.1 + zod: 4.4.3 + transitivePeerDependencies: + - '@deepseek-ai/cordis-plugin-group' + - '@deepseek-ai/dsh-home-paths' + - '@deepseek-ai/dsh-launch-environment' - '@deepseek-ai/dsh-agent@0.1.1-rc.2(c1537a8836b04097f168b024f1e38d85)': + '@deepseek-ai/dsh-agent@0.2.0-rc.1(fc798d7c31c482bc54f0505b44bb2076)': dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/dsh-llm': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-attachment@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) - '@deepseek-ai/dsh-scope': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-session': 0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc) - '@deepseek-ai/dsh-system-prompt': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-llm@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-attachment@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))))(@deepseek-ai/dsh-scope@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) - '@deepseek-ai/dsh-typert-protocol': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-invariants': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-llm': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-scope': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)) + '@deepseek-ai/dsh-session': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))) + '@deepseek-ai/dsh-session-projection': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))) + '@deepseek-ai/dsh-system-prompt': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))) + '@deepseek-ai/dsh-typert-protocol': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-util-values': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + optionalDependencies: + '@deepseek-ai/dsh-workspace': 0.2.0-rc.1(aa3e0fed6c4fe67757342789f6d25d5e) - '@deepseek-ai/dsh-api-gateway@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-client-connection@0.1.1-rc.2)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-typert-registry@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))': + '@deepseek-ai/dsh-api-gateway@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-client-connection@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))))': dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-client-connection': 0.1.1-rc.2(9b40f28fccfb9ee3f86188afc9586c29) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/dsh-typert-protocol': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-typert-registry': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - - '@deepseek-ai/dsh-api-remotes@0.1.1-rc.2(0037c360ed8ef45e74e856e82932995e)': - dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-agent': 0.1.1-rc.2(c1537a8836b04097f168b024f1e38d85) - '@deepseek-ai/dsh-agent-presets': 0.1.1-rc.2(5200ead8959daeaefdf3dd69ba905368) - '@deepseek-ai/dsh-api-gateway': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-client-connection@0.1.1-rc.2)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-typert-registry@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) - '@deepseek-ai/dsh-commands': 0.1.1-rc.2(0ecd3a66a950f0a38490382753aa1d93) - '@deepseek-ai/dsh-cordis-host-runner': 0.1.1-rc.2(c90d5f481a921221b380b90110ccbd94) - '@deepseek-ai/dsh-credentials': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-file-reference': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-agent@0.1.1-rc.2(c1537a8836b04097f168b024f1e38d85))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-typert-protocol@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) - '@deepseek-ai/dsh-goal': 0.1.1-rc.2(a40f169b35a63b1d25a94e0ed91514fe) - '@deepseek-ai/dsh-host-plugin-inventory': 0.1.1-rc.2(@deepseek-ai/cordis-plugin-loader@1.0.2)(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-typert-protocol@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/dsh-llm': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-attachment@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) - '@deepseek-ai/dsh-message-feedback': 0.1.1-rc.2(b957b1ba06764ef01eadad39e9185151) - '@deepseek-ai/dsh-session': 0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc) - '@deepseek-ai/dsh-session-persistence': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-session@0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) - '@deepseek-ai/dsh-session-reference': 0.1.1-rc.2(535ff208b76500c8770cfd701efd9f97) - '@deepseek-ai/dsh-settings': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/schemastery@3.18.1) - '@deepseek-ai/dsh-typert-protocol': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-typert-registry': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - - '@deepseek-ai/dsh-atomic-write@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))': - dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - - '@deepseek-ai/dsh-attachment@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))': - dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-brand': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - - '@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))': - dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - - '@deepseek-ai/dsh-client-connection@0.1.1-rc.2(9b40f28fccfb9ee3f86188afc9586c29)': - dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-attachment': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-commands': 0.1.1-rc.2(0ecd3a66a950f0a38490382753aa1d93) - '@deepseek-ai/dsh-host-apiproxy': 0.1.1-rc.2(3a4ac70475a4c9406aac4d9ef9838e03) - '@deepseek-ai/dsh-host-webserver': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/dsh-llm': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-attachment@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) - '@deepseek-ai/dsh-session': 0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc) - '@deepseek-ai/dsh-tools': 0.1.1-rc.2(119bc70f73f8eddebfaa6b47561adeb3) - '@deepseek-ai/schemastery': 3.18.1 + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-client-connection': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))) + '@deepseek-ai/dsh-deque': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-timeout': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-typert-protocol': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/schemastery': 3.18.5 ws: 8.21.3 transitivePeerDependencies: - bufferutil - utf-8-validate - '@deepseek-ai/dsh-client-locale@0.1.1-rc.2(048e7c438545728704e82d9acbc5c221)': + '@deepseek-ai/dsh-api-remotes@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))': dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-api-remotes': 0.1.1-rc.2(0037c360ed8ef45e74e856e82932995e) - '@deepseek-ai/dsh-client-connection': 0.1.1-rc.2(9b40f28fccfb9ee3f86188afc9586c29) - '@deepseek-ai/dsh-client-runtime': 0.1.1-rc.2(601e9129357dc48738583e18d75d19b2) - '@deepseek-ai/dsh-client-ui-settings': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-api-remotes@0.1.1-rc.2(0037c360ed8ef45e74e856e82932995e))(@deepseek-ai/dsh-client-connection@0.1.1-rc.2)(@deepseek-ai/dsh-client-runtime@0.1.1-rc.2(601e9129357dc48738583e18d75d19b2))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-settings@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/schemastery@3.18.1)) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/dsh-settings': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/schemastery@3.18.1) - '@deepseek-ai/schemastery': 3.18.1 + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-deque': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-scope': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)) + '@deepseek-ai/dsh-session': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))) + '@deepseek-ai/dsh-util-values': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) - '@deepseek-ai/dsh-client-runtime@0.1.1-rc.2(601e9129357dc48738583e18d75d19b2)': + '@deepseek-ai/dsh-api-session-controller@0.2.0-rc.1(a61a6d3d3854e846fb13450f23ec98d8)': dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-agent': 0.1.1-rc.2(c1537a8836b04097f168b024f1e38d85) - '@deepseek-ai/dsh-api-remotes': 0.1.1-rc.2(0037c360ed8ef45e74e856e82932995e) - '@deepseek-ai/dsh-attachment': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-client-connection': 0.1.1-rc.2(9b40f28fccfb9ee3f86188afc9586c29) - '@deepseek-ai/dsh-commands': 0.1.1-rc.2(0ecd3a66a950f0a38490382753aa1d93) - '@deepseek-ai/dsh-host-apiproxy': 0.1.1-rc.2(3a4ac70475a4c9406aac4d9ef9838e03) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/dsh-llm': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-attachment@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) - '@deepseek-ai/dsh-llm-retry': 0.1.1-rc.2(a0b14eb40667f7e2f3e22b89a59650a0) - '@deepseek-ai/dsh-session': 0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc) - '@deepseek-ai/dsh-session-projection': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-session@0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc)) - '@deepseek-ai/dsh-session-title': 0.1.1-rc.2(54f3cb7dfcb0c20072924b6c262cea76) - '@deepseek-ai/dsh-tools': 0.1.1-rc.2(119bc70f73f8eddebfaa6b47561adeb3) - '@deepseek-ai/dsh-typert-protocol': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-typert-registry': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - immer: 10.2.0 - zustand: 4.4.7(@types/react@18.3.31)(immer@10.2.0)(react@18.3.1) + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-agent': 0.2.0-rc.1(fc798d7c31c482bc54f0505b44bb2076) + '@deepseek-ai/dsh-agent-default-model': 0.2.0-rc.1(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6)(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-agent@0.2.0-rc.1(fc798d7c31c482bc54f0505b44bb2076))(@deepseek-ai/dsh-app-boot@0.2.0-rc.1(@deepseek-ai/cordis-plugin-group@1.0.5(@deepseek-ai/cordis-plugin-loader@1.0.6)(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6)(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-home-paths@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-launch-environment@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-system-prompt@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))))(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)) + '@deepseek-ai/dsh-agent-preset-registry': 0.2.0-rc.1(98364bacaab99b35f873e03bd9f9dba7) + '@deepseek-ai/dsh-api-gateway': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-client-connection@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))) + '@deepseek-ai/dsh-attachment': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-brand@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)) + '@deepseek-ai/dsh-brand': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-client-connection': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))) + '@deepseek-ai/dsh-client-file-upload': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))) + '@deepseek-ai/dsh-commands': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-agent@0.2.0-rc.1(fc798d7c31c482bc54f0505b44bb2076))(@deepseek-ai/dsh-attachment@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-brand@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))(@deepseek-ai/dsh-brand@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))))(@deepseek-ai/dsh-typert-protocol@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)) + '@deepseek-ai/dsh-credentials': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)) + '@deepseek-ai/dsh-deque': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-file-reference': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-agent@0.2.0-rc.1(fc798d7c31c482bc54f0505b44bb2076)) + '@deepseek-ai/dsh-fs': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-brand@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-sandbox@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))))) + '@deepseek-ai/dsh-llm': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-native-command': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-scope': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)) + '@deepseek-ai/dsh-session': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))) + '@deepseek-ai/dsh-session-projection': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))) + '@deepseek-ai/dsh-session-query': 0.2.0-rc.1(465649c4d4196500dea42db4fa6ee05e) + '@deepseek-ai/dsh-session-title': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-agent@0.2.0-rc.1(fc798d7c31c482bc54f0505b44bb2076))(@deepseek-ai/dsh-brand@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-session-projection@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))))(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))) + '@deepseek-ai/dsh-skill': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))) + '@deepseek-ai/dsh-subagent': 0.2.0-rc.1(95f85134af80d488fcbb871824380175) + '@deepseek-ai/dsh-typert-protocol': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-typert-registry': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-util-time': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-util-values': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-util-workspace-path': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-workspace': 0.2.0-rc.1(aa3e0fed6c4fe67757342789f6d25d5e) + '@deepseek-ai/schemastery': 3.18.5 + mime-types: 3.0.2 + zod: 4.4.3 + optionalDependencies: + '@deepseek-ai/dsh-session-persistence': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-brand@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))))(@deepseek-ai/dsh-timeout@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)) + '@deepseek-ai/dsh-settings': 0.2.0-rc.1(d7e409ecfdec5ffa766c2b7e31b5df97) + + '@deepseek-ai/dsh-api-workspace-controller@0.2.0-rc.1(8ea96509e133f65c1732f88269631b18)': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-api-gateway': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-client-connection@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))) + '@deepseek-ai/dsh-client-connection': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))) + '@deepseek-ai/dsh-deque': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-host-directory-picker': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-native-command': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-session': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))) + '@deepseek-ai/dsh-storage-domain': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-storage@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)) + '@deepseek-ai/dsh-typert-protocol': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-workspace': 0.2.0-rc.1(aa3e0fed6c4fe67757342789f6d25d5e) + '@deepseek-ai/schemastery': 3.18.5 + zod: 4.4.3 + + '@deepseek-ai/dsh-app-boot@0.2.0-rc.1(@deepseek-ai/cordis-plugin-group@1.0.5(@deepseek-ai/cordis-plugin-loader@1.0.6)(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6)(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-home-paths@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-launch-environment@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-system-prompt@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))))': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/cordis-plugin-group': 1.0.5(@deepseek-ai/cordis-plugin-loader@1.0.6)(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/cordis-plugin-include': 1.0.10(@deepseek-ai/cordis-plugin-loader@1.0.6)(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/cordis-plugin-loader': 1.0.6(@deepseek-ai/cordis@4.0.5)(node-addon-require-builtin@0.1.9) + '@deepseek-ai/dsh-atomic-write': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-home-paths': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-launch-environment': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-package-manifest': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-system-prompt': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))) + '@eslint-community/regexpp': 4.12.2 + ajv: 8.20.0 + js-yaml: 4.3.1 + node-addon-require-builtin: 0.1.9 + resolve.exports: 2.0.4 + semver: 7.8.5 + + '@deepseek-ai/dsh-atomic-write@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + + '@deepseek-ai/dsh-attachment@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-brand@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-brand': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + + '@deepseek-ai/dsh-brand@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + + '@deepseek-ai/dsh-chunked-list@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + zod: 4.4.3 + + '@deepseek-ai/dsh-client-connection@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-credentials': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)) + '@deepseek-ai/dsh-scope': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)) + '@deepseek-ai/schemastery': 3.18.5 + zod: 4.4.3 transitivePeerDependencies: - - '@types/react' - - react + - '@deepseek-ai/dsh-invariants' - '@deepseek-ai/dsh-client-ui-layout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-client-runtime@0.1.1-rc.2(601e9129357dc48738583e18d75d19b2))(@deepseek-ai/dsh-client-ui-theme@0.1.1-rc.2(a6c39110759121c55549be9a5dac7bf7))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))': + '@deepseek-ai/dsh-client-file-upload@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))': dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-client-runtime': 0.1.1-rc.2(601e9129357dc48738583e18d75d19b2) - '@deepseek-ai/dsh-client-ui-theme': 0.1.1-rc.2(a6c39110759121c55549be9a5dac7bf7) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-brand': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-scope': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)) + '@deepseek-ai/dsh-typert-protocol': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + zod: 4.4.3 - '@deepseek-ai/dsh-client-ui-primitives@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))': + '@deepseek-ai/dsh-client-locale@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)': dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@shikijs/langs': 4.4.3 - '@types/mdast': 4.0.4 - anser: 2.3.5 - clsx: 2.1.1 - katex: 0.16.47 - mdast-util-from-markdown: 2.0.3 - mdast-util-gfm: 3.1.0 - mdast-util-math: 3.0.0 - micromark-core-commonmark: 2.0.3 - micromark-extension-gfm: 3.0.0 - micromark-extension-math: 3.1.0 - micromark-factory-space: 2.0.1 - micromark-util-character: 2.1.1 - micromark-util-classify-character: 2.0.1 - micromark-util-sanitize-uri: 2.0.1 - micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.2 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - shiki: 4.4.3 + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/schemastery': 3.18.5 + + '@deepseek-ai/dsh-client-store@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + + '@deepseek-ai/dsh-client-ui-conversation@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/schemastery': 3.18.5 + + '@deepseek-ai/dsh-client-ui-primitives@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + + '@deepseek-ai/dsh-client-ui-renderer@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + + '@deepseek-ai/dsh-client-ui-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + + '@deepseek-ai/dsh-client-ui-sidebar@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + + '@deepseek-ai/dsh-client-ui-slots@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + + '@deepseek-ai/dsh-client-ui-workspace@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + + '@deepseek-ai/dsh-commands@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-agent@0.2.0-rc.1(fc798d7c31c482bc54f0505b44bb2076))(@deepseek-ai/dsh-attachment@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-brand@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))(@deepseek-ai/dsh-brand@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))))(@deepseek-ai/dsh-typert-protocol@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-agent': 0.2.0-rc.1(fc798d7c31c482bc54f0505b44bb2076) + '@deepseek-ai/dsh-attachment': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-brand@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)) + '@deepseek-ai/dsh-brand': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-invariants': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-llm': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-scope': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)) + '@deepseek-ai/dsh-session': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))) + '@deepseek-ai/dsh-typert-protocol': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-util-crypto': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + zod: 4.4.3 + + '@deepseek-ai/dsh-compaction-image-offload@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-agent@0.2.0-rc.1(fc798d7c31c482bc54f0505b44bb2076))(@deepseek-ai/dsh-compaction@0.2.0-rc.1(406b163bfdcc74fa00ae2553f86c20a9))(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))))': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-agent': 0.2.0-rc.1(fc798d7c31c482bc54f0505b44bb2076) + '@deepseek-ai/dsh-compaction': 0.2.0-rc.1(406b163bfdcc74fa00ae2553f86c20a9) + '@deepseek-ai/dsh-llm': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-session': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))) + '@deepseek-ai/dsh-util-values': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + + '@deepseek-ai/dsh-compaction@0.2.0-rc.1(406b163bfdcc74fa00ae2553f86c20a9)': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-brand': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-commands': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-agent@0.2.0-rc.1(fc798d7c31c482bc54f0505b44bb2076))(@deepseek-ai/dsh-attachment@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-brand@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))(@deepseek-ai/dsh-brand@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))))(@deepseek-ai/dsh-typert-protocol@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)) + '@deepseek-ai/dsh-invariants': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-llm': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-session': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))) + + '@deepseek-ai/dsh-config-editor@0.2.0-rc.1(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6)(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-app-boot@0.2.0-rc.1(@deepseek-ai/cordis-plugin-group@1.0.5(@deepseek-ai/cordis-plugin-loader@1.0.6)(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6)(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-home-paths@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-launch-environment@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-system-prompt@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))))': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/cordis-plugin-include': 1.0.10(@deepseek-ai/cordis-plugin-loader@1.0.6)(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/cordis-plugin-loader': 1.0.6(@deepseek-ai/cordis@4.0.5)(node-addon-require-builtin@0.1.9) + '@deepseek-ai/dsh-app-boot': 0.2.0-rc.1(@deepseek-ai/cordis-plugin-group@1.0.5(@deepseek-ai/cordis-plugin-loader@1.0.6)(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6)(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-home-paths@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-launch-environment@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-system-prompt@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))) + '@deepseek-ai/dsh-atomic-write': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + js-yaml: 4.3.1 + yaml: 2.9.1 + + '@deepseek-ai/dsh-credentials@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-brand': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-invariants': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + + '@deepseek-ai/dsh-deque@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + + '@deepseek-ai/dsh-file-reference@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-agent@0.2.0-rc.1(fc798d7c31c482bc54f0505b44bb2076))': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-agent': 0.2.0-rc.1(fc798d7c31c482bc54f0505b44bb2076) + + '@deepseek-ai/dsh-fs@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-brand@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-sandbox@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))))': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-brand': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-invariants': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-llm': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-sandbox': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))) + + '@deepseek-ai/dsh-home-paths@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + + '@deepseek-ai/dsh-host-directory-picker@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + + '@deepseek-ai/dsh-host-webserver@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/schemastery': 3.18.5 + compression: 1.8.2 + negotiator: 1.1.0 transitivePeerDependencies: - supports-color - '@deepseek-ai/dsh-client-ui-settings@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-api-remotes@0.1.1-rc.2(0037c360ed8ef45e74e856e82932995e))(@deepseek-ai/dsh-client-connection@0.1.1-rc.2)(@deepseek-ai/dsh-client-runtime@0.1.1-rc.2(601e9129357dc48738583e18d75d19b2))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-settings@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/schemastery@3.18.1))': + '@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)': dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-api-remotes': 0.1.1-rc.2(0037c360ed8ef45e74e856e82932995e) - '@deepseek-ai/dsh-client-connection': 0.1.1-rc.2(9b40f28fccfb9ee3f86188afc9586c29) - '@deepseek-ai/dsh-client-runtime': 0.1.1-rc.2(601e9129357dc48738583e18d75d19b2) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/dsh-settings': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/schemastery@3.18.1) - '@deepseek-ai/schemastery': 3.18.1 + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/schemastery': 3.18.5 - '@deepseek-ai/dsh-client-ui-sidebar@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-client-locale@0.1.1-rc.2(048e7c438545728704e82d9acbc5c221))(@deepseek-ai/dsh-client-runtime@0.1.1-rc.2(601e9129357dc48738583e18d75d19b2))(@deepseek-ai/dsh-client-ui-layout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-client-runtime@0.1.1-rc.2(601e9129357dc48738583e18d75d19b2))(@deepseek-ai/dsh-client-ui-theme@0.1.1-rc.2(a6c39110759121c55549be9a5dac7bf7))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))': + '@deepseek-ai/dsh-launch-environment@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)': dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-client-locale': 0.1.1-rc.2(048e7c438545728704e82d9acbc5c221) - '@deepseek-ai/dsh-client-runtime': 0.1.1-rc.2(601e9129357dc48738583e18d75d19b2) - '@deepseek-ai/dsh-client-ui-layout': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-client-runtime@0.1.1-rc.2(601e9129357dc48738583e18d75d19b2))(@deepseek-ai/dsh-client-ui-theme@0.1.1-rc.2(a6c39110759121c55549be9a5dac7bf7))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - clsx: 2.1.1 + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) - '@deepseek-ai/dsh-client-ui-slots@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))': + '@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)': dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - - '@deepseek-ai/dsh-client-ui-theme@0.1.1-rc.2(a6c39110759121c55549be9a5dac7bf7)': - dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-api-remotes': 0.1.1-rc.2(0037c360ed8ef45e74e856e82932995e) - '@deepseek-ai/dsh-client-connection': 0.1.1-rc.2(9b40f28fccfb9ee3f86188afc9586c29) - '@deepseek-ai/dsh-client-locale': 0.1.1-rc.2(048e7c438545728704e82d9acbc5c221) - '@deepseek-ai/dsh-client-runtime': 0.1.1-rc.2(601e9129357dc48738583e18d75d19b2) - '@deepseek-ai/dsh-client-ui-settings': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-api-remotes@0.1.1-rc.2(0037c360ed8ef45e74e856e82932995e))(@deepseek-ai/dsh-client-connection@0.1.1-rc.2)(@deepseek-ai/dsh-client-runtime@0.1.1-rc.2(601e9129357dc48738583e18d75d19b2))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-settings@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/schemastery@3.18.1)) - '@deepseek-ai/dsh-host-webserver': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/dsh-settings': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/schemastery@3.18.1) - '@deepseek-ai/schemastery': 3.18.1 - clsx: 2.1.1 - - '@deepseek-ai/dsh-code-runtime@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))': - dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - - '@deepseek-ai/dsh-commands@0.1.1-rc.2(0ecd3a66a950f0a38490382753aa1d93)': - dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-agent': 0.1.1-rc.2(c1537a8836b04097f168b024f1e38d85) - '@deepseek-ai/dsh-attachment': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-brand': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/dsh-llm': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-attachment@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) - '@deepseek-ai/dsh-scope': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-session': 0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc) - '@deepseek-ai/dsh-typert-protocol': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-brand': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-timeout': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-typert-protocol': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-util-crypto': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-util-values': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/schemastery': 3.18.5 zod: 4.4.3 - '@deepseek-ai/dsh-compaction@0.1.1-rc.2(80d45efbb3b7de81b65c253ede5096fd)': + '@deepseek-ai/dsh-native-command@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)': dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-brand': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-commands': 0.1.1-rc.2(0ecd3a66a950f0a38490382753aa1d93) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/dsh-llm': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-attachment@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) - '@deepseek-ai/dsh-session': 0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc) + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) - '@deepseek-ai/dsh-cordis-host-runner@0.1.1-rc.2(c90d5f481a921221b380b90110ccbd94)': + '@deepseek-ai/dsh-package-manifest@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)': dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-agent': 0.1.1-rc.2(c1537a8836b04097f168b024f1e38d85) - '@deepseek-ai/dsh-brand': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/dsh-llm': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-attachment@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) - '@deepseek-ai/dsh-scope': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-session': 0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc) - '@deepseek-ai/dsh-tools': 0.1.1-rc.2(119bc70f73f8eddebfaa6b47561adeb3) - '@deepseek-ai/dsh-typert-protocol': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/schemastery': 3.18.1 + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + + '@deepseek-ai/dsh-ptc-runtime@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-sandbox@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))))': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-sandbox': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))) + + '@deepseek-ai/dsh-sandbox-policy@0.2.0-rc.1(d3a600bbf4075204431976a26cf5a341)': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-agent': 0.2.0-rc.1(fc798d7c31c482bc54f0505b44bb2076) + '@deepseek-ai/dsh-invariants': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-sandbox': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))) + '@deepseek-ai/dsh-session': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))) + '@deepseek-ai/dsh-session-projection': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))) + '@deepseek-ai/dsh-system-prompt': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))) + '@deepseek-ai/schemastery': 3.18.5 zod: 4.4.3 - '@deepseek-ai/dsh-credentials@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))': + '@deepseek-ai/dsh-sandbox@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))))': dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-brand': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-llm': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-session': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))) + '@deepseek-ai/dsh-util-values': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) - '@deepseek-ai/dsh-file-reference@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-agent@0.1.1-rc.2(c1537a8836b04097f168b024f1e38d85))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-typert-protocol@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))': + '@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))': dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-agent': 0.1.1-rc.2(c1537a8836b04097f168b024f1e38d85) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/dsh-typert-protocol': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - zod: 4.4.3 + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-invariants': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) - '@deepseek-ai/dsh-goal@0.1.1-rc.2(a40f169b35a63b1d25a94e0ed91514fe)': + '@deepseek-ai/dsh-session-format-catalog@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-agent@0.2.0-rc.1(fc798d7c31c482bc54f0505b44bb2076))(@deepseek-ai/dsh-compaction@0.2.0-rc.1(406b163bfdcc74fa00ae2553f86c20a9))(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))))': dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-agent': 0.1.1-rc.2(c1537a8836b04097f168b024f1e38d85) - '@deepseek-ai/dsh-brand': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/dsh-llm': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-attachment@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) - '@deepseek-ai/dsh-scope': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-session': 0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc) - '@deepseek-ai/dsh-session-projection': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-session@0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc)) - '@deepseek-ai/dsh-typert-protocol': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/schemastery': 3.18.1 - zod: 4.4.3 - - '@deepseek-ai/dsh-home-paths@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))': - dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - - '@deepseek-ai/dsh-host-apiproxy@0.1.1-rc.2(3a4ac70475a4c9406aac4d9ef9838e03)': - dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-agent': 0.1.1-rc.2(c1537a8836b04097f168b024f1e38d85) - '@deepseek-ai/dsh-agent-default-model': 0.1.1-rc.2(cffd0b3811dd3fb50ded7f3d23c3fd53) - '@deepseek-ai/dsh-agent-presets': 0.1.1-rc.2(5200ead8959daeaefdf3dd69ba905368) - '@deepseek-ai/dsh-api-remotes': 0.1.1-rc.2(0037c360ed8ef45e74e856e82932995e) - '@deepseek-ai/dsh-attachment': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-brand': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-commands': 0.1.1-rc.2(0ecd3a66a950f0a38490382753aa1d93) - '@deepseek-ai/dsh-cordis-host-runner': 0.1.1-rc.2(c90d5f481a921221b380b90110ccbd94) - '@deepseek-ai/dsh-credentials': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-goal': 0.1.1-rc.2(a40f169b35a63b1d25a94e0ed91514fe) - '@deepseek-ai/dsh-host-directory-picker': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/dsh-jobs': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-agent@0.1.1-rc.2(c1537a8836b04097f168b024f1e38d85))(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-session@0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc)) - '@deepseek-ai/dsh-llm': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-attachment@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) - '@deepseek-ai/dsh-native-command': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-session': 0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc) - '@deepseek-ai/dsh-session-persistence': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-session@0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) - '@deepseek-ai/dsh-session-projection': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-session@0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc)) - '@deepseek-ai/dsh-session-projection-cache': 0.1.1-rc.2(5675a3df65adc346aa213cdd0bac196b) - '@deepseek-ai/dsh-session-query': 0.1.1-rc.2(d854f9afd763ce298cb594d238b23507) - '@deepseek-ai/dsh-session-title': 0.1.1-rc.2(54f3cb7dfcb0c20072924b6c262cea76) - '@deepseek-ai/dsh-settings': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/schemastery@3.18.1) - '@deepseek-ai/dsh-skill': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-llm@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-attachment@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))))(@deepseek-ai/dsh-scope@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) - '@deepseek-ai/dsh-subagent': 0.1.1-rc.2(f18caf5d52b775ea3fe478091fd38a81) - '@deepseek-ai/dsh-tools': 0.1.1-rc.2(119bc70f73f8eddebfaa6b47561adeb3) - '@deepseek-ai/dsh-user-approval': 0.1.1-rc.2(09871eaf880be2109e9d668352ef8c05) - '@deepseek-ai/dsh-user-questions': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-agent@0.1.1-rc.2(c1537a8836b04097f168b024f1e38d85))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-llm@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-attachment@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))) - '@deepseek-ai/dsh-workspace': 0.1.1-rc.2(ca1aef6913f66bb64a14405a8170db89) - '@deepseek-ai/schemastery': 3.18.1 - fflate: 0.8.3 - zod: 4.4.3 + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-compaction-image-offload': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-agent@0.2.0-rc.1(fc798d7c31c482bc54f0505b44bb2076))(@deepseek-ai/dsh-compaction@0.2.0-rc.1(406b163bfdcc74fa00ae2553f86c20a9))(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))) + '@deepseek-ai/dsh-session': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))) + '@deepseek-ai/dsh-session-format': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-session-format-v0-to-v1': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-session-format-v1-to-v2': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-session-format-v2-to-v3': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-session-format-v3-to-v4': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) transitivePeerDependencies: - - '@deepseek-ai/dsh-api-gateway' - - '@deepseek-ai/dsh-code-runtime' - - '@deepseek-ai/dsh-file-reference' - - '@deepseek-ai/dsh-host-plugin-inventory' - - '@deepseek-ai/dsh-message-feedback' - - '@deepseek-ai/dsh-sandbox' - - '@deepseek-ai/dsh-sandbox-policy' - - '@deepseek-ai/dsh-scope' - - '@deepseek-ai/dsh-session-reference' - - '@deepseek-ai/dsh-storage' - - '@deepseek-ai/dsh-storage-domain' - - '@deepseek-ai/dsh-system-prompt' - - '@deepseek-ai/dsh-timeout' - - '@deepseek-ai/dsh-typert-protocol' - - '@deepseek-ai/dsh-typert-registry' + - '@deepseek-ai/dsh-agent' + - '@deepseek-ai/dsh-compaction' + - '@deepseek-ai/dsh-llm' - '@deepseek-ai/dsh-host-directory-picker@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))': + '@deepseek-ai/dsh-session-format-v0-to-v1@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)': dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-session-format': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-util-values': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) - '@deepseek-ai/dsh-host-plugin-inventory@0.1.1-rc.2(@deepseek-ai/cordis-plugin-loader@1.0.2)(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-typert-protocol@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))': + '@deepseek-ai/dsh-session-format-v1-to-v2@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)': dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/cordis-plugin-loader': 1.0.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/dsh-brand': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/dsh-typert-protocol': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-llm': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-session-format': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-session-format-v0-to-v1': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-util-values': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + + '@deepseek-ai/dsh-session-format-v2-to-v3@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-session-format': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-session-format-v0-to-v1': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-session-format-v1-to-v2': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + + '@deepseek-ai/dsh-session-format-v3-to-v4@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-session-format': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-session-format-v2-to-v3': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + + '@deepseek-ai/dsh-session-format@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-util-values': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + + '@deepseek-ai/dsh-session-persistence@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-brand@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))))(@deepseek-ai/dsh-timeout@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-brand': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-session': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))) + '@deepseek-ai/dsh-timeout': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-util-values': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + + '@deepseek-ai/dsh-session-projection@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))))': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-session': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))) zod: 4.4.3 - '@deepseek-ai/dsh-host-webserver@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))': + '@deepseek-ai/dsh-session-query@0.2.0-rc.1(465649c4d4196500dea42db4fa6ee05e)': dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/schemastery': 3.18.1 - - '@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)': - dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/schemastery': 3.18.1 - - '@deepseek-ai/dsh-jobs@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-agent@0.1.1-rc.2(c1537a8836b04097f168b024f1e38d85))(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-session@0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc))': - dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-agent': 0.1.1-rc.2(c1537a8836b04097f168b024f1e38d85) - '@deepseek-ai/dsh-brand': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/dsh-session': 0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc) - - '@deepseek-ai/dsh-llm-retry@0.1.1-rc.2(a0b14eb40667f7e2f3e22b89a59650a0)': - dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-agent': 0.1.1-rc.2(c1537a8836b04097f168b024f1e38d85) - '@deepseek-ai/dsh-brand': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/dsh-llm': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-attachment@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) - '@deepseek-ai/dsh-session': 0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc) - '@deepseek-ai/dsh-timeout': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/schemastery': 3.18.1 - - '@deepseek-ai/dsh-llm@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-attachment@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))': - dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-attachment': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-brand': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/dsh-timeout': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/schemastery': 3.18.1 - - '@deepseek-ai/dsh-message-feedback@0.1.1-rc.2(b957b1ba06764ef01eadad39e9185151)': - dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-brand': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/dsh-llm': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-attachment@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) - '@deepseek-ai/dsh-session': 0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc) - '@deepseek-ai/dsh-session-persistence': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-session@0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) - '@deepseek-ai/dsh-storage-domain': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-storage@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) - '@deepseek-ai/dsh-typert-protocol': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/schemastery': 3.18.1 - zod: 4.4.3 - - '@deepseek-ai/dsh-native-command@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))': - dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - - '@deepseek-ai/dsh-output-retention@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))': - dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - - '@deepseek-ai/dsh-scope@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))': - dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - - '@deepseek-ai/dsh-session-persistence@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-session@0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))': - dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-brand': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/dsh-session': 0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc) - '@deepseek-ai/dsh-timeout': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - - '@deepseek-ai/dsh-session-projection-cache@0.1.1-rc.2(5675a3df65adc346aa213cdd0bac196b)': - dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/dsh-session': 0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc) - '@deepseek-ai/dsh-session-persistence': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-session@0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) - '@deepseek-ai/dsh-session-projection': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-session@0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc)) - '@deepseek-ai/dsh-storage-domain': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-storage@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) - '@deepseek-ai/schemastery': 3.18.1 - zod: 4.4.3 - - '@deepseek-ai/dsh-session-projection@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-session@0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc))': - dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/dsh-session': 0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc) - zod: 4.4.3 - - '@deepseek-ai/dsh-session-query@0.1.1-rc.2(d854f9afd763ce298cb594d238b23507)': - dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-brand': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/dsh-llm': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-attachment@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) - '@deepseek-ai/dsh-session': 0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc) - '@deepseek-ai/dsh-session-title': 0.1.1-rc.2(54f3cb7dfcb0c20072924b6c262cea76) + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-brand': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-llm': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-session': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))) + '@deepseek-ai/dsh-session-format-catalog': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-agent@0.2.0-rc.1(fc798d7c31c482bc54f0505b44bb2076))(@deepseek-ai/dsh-compaction@0.2.0-rc.1(406b163bfdcc74fa00ae2553f86c20a9))(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))) + '@deepseek-ai/dsh-session-title': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-agent@0.2.0-rc.1(fc798d7c31c482bc54f0505b44bb2076))(@deepseek-ai/dsh-brand@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-session-projection@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))))(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))) + '@deepseek-ai/dsh-tool-todo': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-agent@0.2.0-rc.1(fc798d7c31c482bc54f0505b44bb2076))(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-session-projection@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))))(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))))(@deepseek-ai/dsh-tools@0.2.0-rc.1(de2a5653d00d1365fa221821333b74b9)) optionalDependencies: - '@deepseek-ai/dsh-session-persistence': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-session@0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) + '@deepseek-ai/dsh-session-persistence': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-brand@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))))(@deepseek-ai/dsh-timeout@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)) + '@deepseek-ai/dsh-session-projection': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))) + transitivePeerDependencies: + - '@deepseek-ai/dsh-agent' + - '@deepseek-ai/dsh-compaction' - '@deepseek-ai/dsh-session-reference@0.1.1-rc.2(535ff208b76500c8770cfd701efd9f97)': + '@deepseek-ai/dsh-session-title@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-agent@0.2.0-rc.1(fc798d7c31c482bc54f0505b44bb2076))(@deepseek-ai/dsh-brand@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-session-projection@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))))(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))))': dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-agent': 0.1.1-rc.2(c1537a8836b04097f168b024f1e38d85) - '@deepseek-ai/dsh-compaction': 0.1.1-rc.2(80d45efbb3b7de81b65c253ede5096fd) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/dsh-llm': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-attachment@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) - '@deepseek-ai/dsh-output-retention': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-session': 0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc) - '@deepseek-ai/dsh-session-query': 0.1.1-rc.2(d854f9afd763ce298cb594d238b23507) - '@deepseek-ai/dsh-typert-protocol': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/schemastery': 3.18.1 + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-agent': 0.2.0-rc.1(fc798d7c31c482bc54f0505b44bb2076) + '@deepseek-ai/dsh-brand': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-invariants': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-llm': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-session': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))) + '@deepseek-ai/dsh-session-projection': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))) + '@deepseek-ai/dsh-util-values': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/schemastery': 3.18.5 zod: 4.4.3 - '@deepseek-ai/dsh-session-title@0.1.1-rc.2(54f3cb7dfcb0c20072924b6c262cea76)': + '@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))': dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-brand': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/dsh-llm': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-attachment@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) - '@deepseek-ai/dsh-session': 0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc) - '@deepseek-ai/dsh-session-projection': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-session@0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc)) - '@deepseek-ai/schemastery': 3.18.1 + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-brand': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-llm': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-scope': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)) + '@deepseek-ai/dsh-util-values': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + + '@deepseek-ai/dsh-settings@0.2.0-rc.1(d7e409ecfdec5ffa766c2b7e31b5df97)': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/cordis-plugin-loader': 1.0.6(@deepseek-ai/cordis@4.0.5)(node-addon-require-builtin@0.1.9) + '@deepseek-ai/cosmokit': 1.8.6 + '@deepseek-ai/dsh-brand': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-config-editor': 0.2.0-rc.1(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6)(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-app-boot@0.2.0-rc.1(@deepseek-ai/cordis-plugin-group@1.0.5(@deepseek-ai/cordis-plugin-loader@1.0.6)(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6)(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-home-paths@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-launch-environment@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-system-prompt@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))))) + '@deepseek-ai/dsh-invariants': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-session': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))) + '@deepseek-ai/dsh-util-values': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/schemastery': 3.18.5 + yaml: 2.9.1 + transitivePeerDependencies: + - '@deepseek-ai/cordis-plugin-include' + - '@deepseek-ai/dsh-app-boot' + - '@deepseek-ai/dsh-hmr' + - node-addon-require-builtin + + '@deepseek-ai/dsh-skill@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-llm': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-scope': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)) + '@deepseek-ai/dsh-util-values': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/schemastery': 3.18.5 + + '@deepseek-ai/dsh-storage-domain@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-storage@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-invariants': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-storage': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/schemastery': 3.18.5 zod: 4.4.3 - '@deepseek-ai/dsh-session@0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc)': + '@deepseek-ai/dsh-storage@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)': dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-brand': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/dsh-llm': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-attachment@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) - '@deepseek-ai/dsh-scope': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-typert-protocol': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) - '@deepseek-ai/dsh-settings@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/schemastery@3.18.1)': + '@deepseek-ai/dsh-subagent@0.2.0-rc.1(95f85134af80d488fcbb871824380175)': dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-brand': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/schemastery': 3.18.1 - - '@deepseek-ai/dsh-skill@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-llm@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-attachment@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))))(@deepseek-ai/dsh-scope@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))': - dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/dsh-llm': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-attachment@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) - '@deepseek-ai/dsh-scope': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/schemastery': 3.18.1 - - '@deepseek-ai/dsh-storage-domain@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-storage@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))': - dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/dsh-storage': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/schemastery': 3.18.1 - zod: 4.4.3 - - '@deepseek-ai/dsh-storage@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))': - dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - - '@deepseek-ai/dsh-subagent@0.1.1-rc.2(f18caf5d52b775ea3fe478091fd38a81)': - dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-agent': 0.1.1-rc.2(c1537a8836b04097f168b024f1e38d85) - '@deepseek-ai/dsh-brand': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/dsh-llm': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-attachment@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) - '@deepseek-ai/dsh-scope': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-session': 0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc) - '@deepseek-ai/dsh-tools': 0.1.1-rc.2(119bc70f73f8eddebfaa6b47561adeb3) + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-agent': 0.2.0-rc.1(fc798d7c31c482bc54f0505b44bb2076) + '@deepseek-ai/dsh-attachment': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-brand@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)) + '@deepseek-ai/dsh-brand': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-chunked-list': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-invariants': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-llm': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-scope': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)) + '@deepseek-ai/dsh-session': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))) + '@deepseek-ai/dsh-system-prompt': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))) + '@deepseek-ai/dsh-tools': 0.2.0-rc.1(de2a5653d00d1365fa221821333b74b9) + '@deepseek-ai/dsh-typert-protocol': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-util-time': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-util-values': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/schemastery': 3.18.5 zod: 4.4.3 optionalDependencies: - '@deepseek-ai/dsh-agent-presets': 0.1.1-rc.2(5200ead8959daeaefdf3dd69ba905368) - '@deepseek-ai/dsh-jobs': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-agent@0.1.1-rc.2(c1537a8836b04097f168b024f1e38d85))(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-session@0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc)) - '@deepseek-ai/dsh-session-persistence': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-session@0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) - '@deepseek-ai/dsh-session-projection': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-session@0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc)) - '@deepseek-ai/dsh-session-projection-cache': 0.1.1-rc.2(5675a3df65adc346aa213cdd0bac196b) - '@deepseek-ai/dsh-user-approval': 0.1.1-rc.2(09871eaf880be2109e9d668352ef8c05) + '@deepseek-ai/dsh-agent-preset-registry': 0.2.0-rc.1(98364bacaab99b35f873e03bd9f9dba7) + '@deepseek-ai/dsh-sandbox': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))) + '@deepseek-ai/dsh-sandbox-policy': 0.2.0-rc.1(d3a600bbf4075204431976a26cf5a341) + '@deepseek-ai/dsh-session-persistence': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-brand@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))))(@deepseek-ai/dsh-timeout@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)) + '@deepseek-ai/dsh-session-projection': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))) + '@deepseek-ai/dsh-session-query': 0.2.0-rc.1(465649c4d4196500dea42db4fa6ee05e) + '@deepseek-ai/dsh-settings': 0.2.0-rc.1(d7e409ecfdec5ffa766c2b7e31b5df97) + '@deepseek-ai/dsh-user-approval': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-agent@0.2.0-rc.1(fc798d7c31c482bc54f0505b44bb2076))(@deepseek-ai/dsh-brand@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))))(@deepseek-ai/dsh-system-prompt@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))) + '@deepseek-ai/dsh-workspace': 0.2.0-rc.1(aa3e0fed6c4fe67757342789f6d25d5e) - '@deepseek-ai/dsh-system-prompt@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-llm@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-attachment@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))))(@deepseek-ai/dsh-scope@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))': + '@deepseek-ai/dsh-system-prompt@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))': dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/dsh-llm': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-attachment@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) - '@deepseek-ai/dsh-scope': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/schemastery': 3.18.1 + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-invariants': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-llm': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-scope': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)) + '@deepseek-ai/schemastery': 3.18.5 - '@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))': + '@deepseek-ai/dsh-timeout@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)': dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) - '@deepseek-ai/dsh-tools@0.1.1-rc.2(119bc70f73f8eddebfaa6b47561adeb3)': + '@deepseek-ai/dsh-tool-todo@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-agent@0.2.0-rc.1(fc798d7c31c482bc54f0505b44bb2076))(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-session-projection@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))))(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))))(@deepseek-ai/dsh-tools@0.2.0-rc.1(de2a5653d00d1365fa221821333b74b9))': dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-agent': 0.1.1-rc.2(c1537a8836b04097f168b024f1e38d85) - '@deepseek-ai/dsh-code-runtime': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/dsh-llm': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-attachment@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) - '@deepseek-ai/dsh-scope': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-session': 0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc) - '@deepseek-ai/dsh-system-prompt': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-llm@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-attachment@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))))(@deepseek-ai/dsh-scope@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) - '@deepseek-ai/dsh-user-approval': 0.1.1-rc.2(09871eaf880be2109e9d668352ef8c05) - '@deepseek-ai/schemastery': 3.18.1 - - '@deepseek-ai/dsh-typert-protocol@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))': - dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - - '@deepseek-ai/dsh-typert-registry@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))': - dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/dsh-typert-protocol': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-agent': 0.2.0-rc.1(fc798d7c31c482bc54f0505b44bb2076) + '@deepseek-ai/dsh-invariants': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-session': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))) + '@deepseek-ai/dsh-session-projection': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))) + '@deepseek-ai/dsh-tools': 0.2.0-rc.1(de2a5653d00d1365fa221821333b74b9) + '@deepseek-ai/schemastery': 3.18.5 zod: 4.4.3 - '@deepseek-ai/dsh-user-approval@0.1.1-rc.2(09871eaf880be2109e9d668352ef8c05)': + '@deepseek-ai/dsh-tools@0.2.0-rc.1(de2a5653d00d1365fa221821333b74b9)': dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-agent': 0.1.1-rc.2(c1537a8836b04097f168b024f1e38d85) - '@deepseek-ai/dsh-brand': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/dsh-llm': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-attachment@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) - '@deepseek-ai/dsh-scope': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-session': 0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc) - '@deepseek-ai/dsh-system-prompt': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-llm@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-attachment@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))))(@deepseek-ai/dsh-scope@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) - '@deepseek-ai/schemastery': 3.18.1 + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-agent': 0.2.0-rc.1(fc798d7c31c482bc54f0505b44bb2076) + '@deepseek-ai/dsh-brand': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-invariants': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-llm': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-ptc-runtime': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-sandbox@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))))) + '@deepseek-ai/dsh-sandbox': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))) + '@deepseek-ai/dsh-sandbox-policy': 0.2.0-rc.1(d3a600bbf4075204431976a26cf5a341) + '@deepseek-ai/dsh-scope': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)) + '@deepseek-ai/dsh-session': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))) + '@deepseek-ai/dsh-system-prompt': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))) + '@deepseek-ai/dsh-user-approval': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-agent@0.2.0-rc.1(fc798d7c31c482bc54f0505b44bb2076))(@deepseek-ai/dsh-brand@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))))(@deepseek-ai/dsh-system-prompt@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))) + '@deepseek-ai/dsh-util-values': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/schemastery': 3.18.5 - '@deepseek-ai/dsh-user-questions@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-agent@0.1.1-rc.2(c1537a8836b04097f168b024f1e38d85))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-llm@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-attachment@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))))': + '@deepseek-ai/dsh-typert-protocol@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)': dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-agent': 0.1.1-rc.2(c1537a8836b04097f168b024f1e38d85) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/dsh-llm': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-attachment@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-brand': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) - '@deepseek-ai/dsh-workspace@0.1.1-rc.2(ca1aef6913f66bb64a14405a8170db89)': + '@deepseek-ai/dsh-typert-registry@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)': dependencies: - '@deepseek-ai/cordis': 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) - '@deepseek-ai/dsh-brand': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-invariants': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1) - '@deepseek-ai/dsh-session': 0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc) - '@deepseek-ai/dsh-session-persistence': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-brand@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)))(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-session@0.1.1-rc.2(a4e4bb24a1f3580ac25e11cfa3c6b8cc))(@deepseek-ai/dsh-timeout@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) - '@deepseek-ai/dsh-storage': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)) - '@deepseek-ai/dsh-storage-domain': 0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))(@deepseek-ai/dsh-storage@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1)(@deepseek-ai/dsh-invariants@0.1.1-rc.2(@deepseek-ai/cordis@4.0.1))) + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) zod: 4.4.3 - '@deepseek-ai/schemastery@3.18.1': + '@deepseek-ai/dsh-user-approval@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-agent@0.2.0-rc.1(fc798d7c31c482bc54f0505b44bb2076))(@deepseek-ai/dsh-brand@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)))(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))))(@deepseek-ai/dsh-system-prompt@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))))': dependencies: - '@deepseek-ai/cosmokit': 1.8.2 + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-agent': 0.2.0-rc.1(fc798d7c31c482bc54f0505b44bb2076) + '@deepseek-ai/dsh-brand': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-invariants': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-llm': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-scope': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)) + '@deepseek-ai/dsh-session': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))) + '@deepseek-ai/dsh-system-prompt': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-llm@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))) + '@deepseek-ai/schemastery': 3.18.5 + + '@deepseek-ai/dsh-util-crypto@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + + '@deepseek-ai/dsh-util-time@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + + '@deepseek-ai/dsh-util-values@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + + '@deepseek-ai/dsh-util-workspace-path@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + + '@deepseek-ai/dsh-workspace@0.2.0-rc.1(aa3e0fed6c4fe67757342789f6d25d5e)': + dependencies: + '@deepseek-ai/cordis': 4.0.5(@deepseek-ai/cordis-plugin-include@1.0.10)(@deepseek-ai/cordis-plugin-loader@1.0.6) + '@deepseek-ai/dsh-brand': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-invariants': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-session': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))) + '@deepseek-ai/dsh-session-persistence': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-brand@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-session@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-scope@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))))(@deepseek-ai/dsh-timeout@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)) + '@deepseek-ai/dsh-storage': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + '@deepseek-ai/dsh-storage-domain': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)(@deepseek-ai/dsh-invariants@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5))(@deepseek-ai/dsh-storage@0.2.0-rc.1(@deepseek-ai/cordis@4.0.5)) + '@deepseek-ai/dsh-typert-protocol': 0.2.0-rc.1(@deepseek-ai/cordis@4.0.5) + zod: 4.4.3 + + '@deepseek-ai/schemastery@3.18.5': + dependencies: + '@deepseek-ai/cosmokit': 1.8.6 '@standard-schema/spec': 1.1.0 + '@eslint-community/regexpp@4.12.2': {} + '@exodus/bytes@1.15.1': {} '@jridgewell/sourcemap-codec@1.5.5': {} @@ -2612,46 +2565,6 @@ snapshots: '@rolldown/pluginutils@1.0.1': {} - '@shikijs/core@4.4.3': - dependencies: - '@shikijs/primitive': 4.4.3 - '@shikijs/types': 4.4.3 - '@shikijs/vscode-textmate': 10.0.2 - '@types/hast': 3.0.5 - hast-util-to-html: 9.0.5 - - '@shikijs/engine-javascript@4.4.3': - dependencies: - '@shikijs/types': 4.4.3 - '@shikijs/vscode-textmate': 10.0.2 - oniguruma-to-es: 4.3.6 - - '@shikijs/engine-oniguruma@4.4.3': - dependencies: - '@shikijs/types': 4.4.3 - '@shikijs/vscode-textmate': 10.0.2 - - '@shikijs/langs@4.4.3': - dependencies: - '@shikijs/types': 4.4.3 - - '@shikijs/primitive@4.4.3': - dependencies: - '@shikijs/types': 4.4.3 - '@shikijs/vscode-textmate': 10.0.2 - '@types/hast': 3.0.5 - - '@shikijs/themes@4.4.3': - dependencies: - '@shikijs/types': 4.4.3 - - '@shikijs/types@4.4.3': - dependencies: - '@shikijs/vscode-textmate': 10.0.2 - '@types/hast': 3.0.5 - - '@shikijs/vscode-textmate@10.0.2': {} - '@standard-schema/spec@1.1.0': {} '@types/chai@5.2.3': @@ -2659,28 +2572,12 @@ snapshots: '@types/deep-eql': 4.0.2 assertion-error: 2.0.1 - '@types/debug@4.1.13': - dependencies: - '@types/ms': 2.1.0 - '@types/deep-eql@4.0.2': {} '@types/estree@1.0.9': {} - '@types/hast@3.0.5': - dependencies: - '@types/unist': 3.0.3 - '@types/js-yaml@4.0.9': {} - '@types/katex@0.16.8': {} - - '@types/mdast@4.0.4': - dependencies: - '@types/unist': 3.0.3 - - '@types/ms@2.1.0': {} - '@types/node@24.13.3': dependencies: undici-types: 7.18.2 @@ -2696,48 +2593,44 @@ snapshots: '@types/prop-types': 15.7.15 csstype: 3.2.3 - '@types/unist@3.0.3': {} - - '@ungap/structured-clone@1.3.3': {} - - '@vitest/expect@4.1.11': + '@vitest/expect@4.1.8': dependencies: '@standard-schema/spec': 1.1.0 '@types/chai': 5.2.3 - '@vitest/spy': 4.1.11 - '@vitest/utils': 4.1.11 + '@vitest/spy': 4.1.8 + '@vitest/utils': 4.1.8 chai: 6.2.2 tinyrainbow: 3.1.1 - '@vitest/mocker@4.1.11(vite@8.2.2(@types/node@24.13.3))': + '@vitest/mocker@4.1.8(vite@8.2.2(@types/node@24.13.3)(yaml@2.9.1))': dependencies: - '@vitest/spy': 4.1.11 + '@vitest/spy': 4.1.8 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - vite: 8.2.2(@types/node@24.13.3) + vite: 8.2.2(@types/node@24.13.3)(yaml@2.9.1) - '@vitest/pretty-format@4.1.11': + '@vitest/pretty-format@4.1.8': dependencies: tinyrainbow: 3.1.1 - '@vitest/runner@4.1.11': + '@vitest/runner@4.1.8': dependencies: - '@vitest/utils': 4.1.11 + '@vitest/utils': 4.1.8 pathe: 2.0.3 - '@vitest/snapshot@4.1.11': + '@vitest/snapshot@4.1.8': dependencies: - '@vitest/pretty-format': 4.1.11 - '@vitest/utils': 4.1.11 + '@vitest/pretty-format': 4.1.8 + '@vitest/utils': 4.1.8 magic-string: 0.30.21 pathe: 2.0.3 - '@vitest/spy@4.1.11': {} + '@vitest/spy@4.1.8': {} - '@vitest/utils@4.1.11': + '@vitest/utils@4.1.8': dependencies: - '@vitest/pretty-format': 4.1.11 + '@vitest/pretty-format': 4.1.8 convert-source-map: 2.0.0 tinyrainbow: 3.1.1 @@ -2815,7 +2708,12 @@ snapshots: '@yuku-toolchain/types@0.8.7': {} - anser@2.3.5: {} + ajv@8.20.0: + dependencies: + fast-deep-equal: 3.1.3 + fast-uri: 3.1.9 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 ansis@4.3.1: {} @@ -2827,23 +2725,30 @@ snapshots: dependencies: require-from-string: 2.0.2 - cac@7.0.0: {} + bytes@3.1.2: {} - ccount@2.0.1: {} + cac@7.0.0: {} chai@6.2.2: {} - character-entities-html4@2.1.0: {} + compressible@2.0.18: + dependencies: + mime-db: 1.54.0 - character-entities-legacy@3.0.0: {} + compression@1.8.2: + dependencies: + bytes: 3.1.2 + compressible: 2.0.18 + debug: 2.6.9 + destroy: 1.2.0 + negotiator: 0.6.4 + on-headers: 1.1.0 + safe-buffer: 5.2.1 + vary: 1.1.2 + transitivePeerDependencies: + - supports-color - character-entities@2.0.2: {} - - clsx@2.1.1: {} - - comma-separated-tokens@2.0.3: {} - - commander@8.3.0: {} + content-type@2.1.0: {} convert-source-map@2.0.0: {} @@ -2861,26 +2766,18 @@ snapshots: transitivePeerDependencies: - '@noble/hashes' - debug@4.4.3: + debug@2.6.9: dependencies: - ms: 2.1.3 + ms: 2.0.0 decimal.js@10.6.0: {} - decode-named-character-reference@1.3.0: - dependencies: - character-entities: 2.0.2 - defu@6.1.7: {} - dequal@2.0.3: {} + destroy@1.2.0: {} detect-libc@2.1.2: {} - devlop@1.1.0: - dependencies: - dequal: 2.0.3 - dts-resolver@3.0.0: {} empathic@2.0.1: {} @@ -2889,20 +2786,20 @@ snapshots: es-module-lexer@2.3.2: {} - escape-string-regexp@5.0.0: {} - estree-walker@3.0.3: dependencies: '@types/estree': 1.0.9 expect-type@1.4.0: {} + fast-deep-equal@3.1.3: {} + + fast-uri@3.1.9: {} + fdir@6.5.0(picomatch@4.0.5): optionalDependencies: picomatch: 4.0.5 - fflate@0.8.3: {} - fsevents@2.3.3: optional: true @@ -2910,24 +2807,6 @@ snapshots: dependencies: resolve-pkg-maps: 1.0.0 - hast-util-to-html@9.0.5: - dependencies: - '@types/hast': 3.0.5 - '@types/unist': 3.0.3 - ccount: 2.0.1 - comma-separated-tokens: 2.0.3 - hast-util-whitespace: 3.0.0 - html-void-elements: 3.0.0 - mdast-util-to-hast: 13.2.1 - property-information: 7.2.0 - space-separated-tokens: 2.0.2 - stringify-entities: 4.0.4 - zwitch: 2.0.4 - - hast-util-whitespace@3.0.0: - dependencies: - '@types/hast': 3.0.5 - hookable@6.1.1: {} html-encoding-sniffer@6.0.0: @@ -2936,9 +2815,7 @@ snapshots: transitivePeerDependencies: - '@noble/hashes' - html-void-elements@3.0.0: {} - - immer@10.2.0: {} + immer@11.2.9: {} import-without-cache@0.4.0: {} @@ -2976,9 +2853,7 @@ snapshots: transitivePeerDependencies: - '@noble/hashes' - katex@0.16.47: - dependencies: - commander: 8.3.0 + json-schema-traverse@1.0.0: {} lightningcss-android-arm64@1.33.0: optional: true @@ -3029,8 +2904,6 @@ snapshots: lightningcss-win32-arm64-msvc: 1.33.0 lightningcss-win32-x64-msvc: 1.33.0 - longest-streak@3.1.0: {} - loose-envify@1.4.0: dependencies: js-tokens: 4.0.0 @@ -3041,350 +2914,88 @@ snapshots: dependencies: '@jridgewell/sourcemap-codec': 1.5.5 - markdown-table@3.0.4: {} - - mdast-util-find-and-replace@3.0.2: - dependencies: - '@types/mdast': 4.0.4 - escape-string-regexp: 5.0.0 - unist-util-is: 6.0.1 - unist-util-visit-parents: 6.0.2 - - mdast-util-from-markdown@2.0.3: - dependencies: - '@types/mdast': 4.0.4 - '@types/unist': 3.0.3 - decode-named-character-reference: 1.3.0 - devlop: 1.1.0 - mdast-util-to-string: 4.0.0 - micromark: 4.0.2 - micromark-util-decode-numeric-character-reference: 2.0.2 - micromark-util-decode-string: 2.0.1 - micromark-util-normalize-identifier: 2.0.1 - micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.2 - unist-util-stringify-position: 4.0.0 - transitivePeerDependencies: - - supports-color - - mdast-util-gfm-autolink-literal@2.0.1: - dependencies: - '@types/mdast': 4.0.4 - ccount: 2.0.1 - devlop: 1.1.0 - mdast-util-find-and-replace: 3.0.2 - micromark-util-character: 2.1.1 - - mdast-util-gfm-footnote@2.1.0: - dependencies: - '@types/mdast': 4.0.4 - devlop: 1.1.0 - mdast-util-from-markdown: 2.0.3 - mdast-util-to-markdown: 2.1.2 - micromark-util-normalize-identifier: 2.0.1 - transitivePeerDependencies: - - supports-color - - mdast-util-gfm-strikethrough@2.0.0: - dependencies: - '@types/mdast': 4.0.4 - mdast-util-from-markdown: 2.0.3 - mdast-util-to-markdown: 2.1.2 - transitivePeerDependencies: - - supports-color - - mdast-util-gfm-table@2.0.0: - dependencies: - '@types/mdast': 4.0.4 - devlop: 1.1.0 - markdown-table: 3.0.4 - mdast-util-from-markdown: 2.0.3 - mdast-util-to-markdown: 2.1.2 - transitivePeerDependencies: - - supports-color - - mdast-util-gfm-task-list-item@2.0.0: - dependencies: - '@types/mdast': 4.0.4 - devlop: 1.1.0 - mdast-util-from-markdown: 2.0.3 - mdast-util-to-markdown: 2.1.2 - transitivePeerDependencies: - - supports-color - - mdast-util-gfm@3.1.0: - dependencies: - mdast-util-from-markdown: 2.0.3 - mdast-util-gfm-autolink-literal: 2.0.1 - mdast-util-gfm-footnote: 2.1.0 - mdast-util-gfm-strikethrough: 2.0.0 - mdast-util-gfm-table: 2.0.0 - mdast-util-gfm-task-list-item: 2.0.0 - mdast-util-to-markdown: 2.1.2 - transitivePeerDependencies: - - supports-color - - mdast-util-math@3.0.0: - dependencies: - '@types/hast': 3.0.5 - '@types/mdast': 4.0.4 - devlop: 1.1.0 - longest-streak: 3.1.0 - mdast-util-from-markdown: 2.0.3 - mdast-util-to-markdown: 2.1.2 - unist-util-remove-position: 5.0.0 - transitivePeerDependencies: - - supports-color - - mdast-util-phrasing@4.1.0: - dependencies: - '@types/mdast': 4.0.4 - unist-util-is: 6.0.1 - - mdast-util-to-hast@13.2.1: - dependencies: - '@types/hast': 3.0.5 - '@types/mdast': 4.0.4 - '@ungap/structured-clone': 1.3.3 - devlop: 1.1.0 - micromark-util-sanitize-uri: 2.0.1 - trim-lines: 3.0.1 - unist-util-position: 5.0.0 - unist-util-visit: 5.1.0 - vfile: 6.0.3 - - mdast-util-to-markdown@2.1.2: - dependencies: - '@types/mdast': 4.0.4 - '@types/unist': 3.0.3 - longest-streak: 3.1.0 - mdast-util-phrasing: 4.1.0 - mdast-util-to-string: 4.0.0 - micromark-util-classify-character: 2.0.1 - micromark-util-decode-string: 2.0.1 - unist-util-visit: 5.1.0 - zwitch: 2.0.4 - - mdast-util-to-string@4.0.0: - dependencies: - '@types/mdast': 4.0.4 - mdn-data@2.27.1: {} - micromark-core-commonmark@2.0.3: + mime-db@1.54.0: {} + + mime-types@3.0.2: dependencies: - decode-named-character-reference: 1.3.0 - devlop: 1.1.0 - micromark-factory-destination: 2.0.1 - micromark-factory-label: 2.0.1 - micromark-factory-space: 2.0.1 - micromark-factory-title: 2.0.1 - micromark-factory-whitespace: 2.0.1 - micromark-util-character: 2.1.1 - micromark-util-chunked: 2.0.1 - micromark-util-classify-character: 2.0.1 - micromark-util-html-tag-name: 2.0.1 - micromark-util-normalize-identifier: 2.0.1 - micromark-util-resolve-all: 2.0.1 - micromark-util-subtokenize: 2.1.0 - micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.2 + mime-db: 1.54.0 - micromark-extension-gfm-autolink-literal@2.1.0: - dependencies: - micromark-util-character: 2.1.1 - micromark-util-sanitize-uri: 2.0.1 - micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.2 - - micromark-extension-gfm-footnote@2.1.0: - dependencies: - devlop: 1.1.0 - micromark-core-commonmark: 2.0.3 - micromark-factory-space: 2.0.1 - micromark-util-character: 2.1.1 - micromark-util-normalize-identifier: 2.0.1 - micromark-util-sanitize-uri: 2.0.1 - micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.2 - - micromark-extension-gfm-strikethrough@2.1.0: - dependencies: - devlop: 1.1.0 - micromark-util-chunked: 2.0.1 - micromark-util-classify-character: 2.0.1 - micromark-util-resolve-all: 2.0.1 - micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.2 - - micromark-extension-gfm-table@2.1.1: - dependencies: - devlop: 1.1.0 - micromark-factory-space: 2.0.1 - micromark-util-character: 2.1.1 - micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.2 - - micromark-extension-gfm-tagfilter@2.0.0: - dependencies: - micromark-util-types: 2.0.2 - - micromark-extension-gfm-task-list-item@2.1.0: - dependencies: - devlop: 1.1.0 - micromark-factory-space: 2.0.1 - micromark-util-character: 2.1.1 - micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.2 - - micromark-extension-gfm@3.0.0: - dependencies: - micromark-extension-gfm-autolink-literal: 2.1.0 - micromark-extension-gfm-footnote: 2.1.0 - micromark-extension-gfm-strikethrough: 2.1.0 - micromark-extension-gfm-table: 2.1.1 - micromark-extension-gfm-tagfilter: 2.0.0 - micromark-extension-gfm-task-list-item: 2.1.0 - micromark-util-combine-extensions: 2.0.1 - micromark-util-types: 2.0.2 - - micromark-extension-math@3.1.0: - dependencies: - '@types/katex': 0.16.8 - devlop: 1.1.0 - katex: 0.16.47 - micromark-factory-space: 2.0.1 - micromark-util-character: 2.1.1 - micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.2 - - micromark-factory-destination@2.0.1: - dependencies: - micromark-util-character: 2.1.1 - micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.2 - - micromark-factory-label@2.0.1: - dependencies: - devlop: 1.1.0 - micromark-util-character: 2.1.1 - micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.2 - - micromark-factory-space@2.0.1: - dependencies: - micromark-util-character: 2.1.1 - micromark-util-types: 2.0.2 - - micromark-factory-title@2.0.1: - dependencies: - micromark-factory-space: 2.0.1 - micromark-util-character: 2.1.1 - micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.2 - - micromark-factory-whitespace@2.0.1: - dependencies: - micromark-factory-space: 2.0.1 - micromark-util-character: 2.1.1 - micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.2 - - micromark-util-character@2.1.1: - dependencies: - micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.2 - - micromark-util-chunked@2.0.1: - dependencies: - micromark-util-symbol: 2.0.1 - - micromark-util-classify-character@2.0.1: - dependencies: - micromark-util-character: 2.1.1 - micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.2 - - micromark-util-combine-extensions@2.0.1: - dependencies: - micromark-util-chunked: 2.0.1 - micromark-util-types: 2.0.2 - - micromark-util-decode-numeric-character-reference@2.0.2: - dependencies: - micromark-util-symbol: 2.0.1 - - micromark-util-decode-string@2.0.1: - dependencies: - decode-named-character-reference: 1.3.0 - micromark-util-character: 2.1.1 - micromark-util-decode-numeric-character-reference: 2.0.2 - micromark-util-symbol: 2.0.1 - - micromark-util-encode@2.0.1: {} - - micromark-util-html-tag-name@2.0.1: {} - - micromark-util-normalize-identifier@2.0.1: - dependencies: - micromark-util-symbol: 2.0.1 - - micromark-util-resolve-all@2.0.1: - dependencies: - micromark-util-types: 2.0.2 - - micromark-util-sanitize-uri@2.0.1: - dependencies: - micromark-util-character: 2.1.1 - micromark-util-encode: 2.0.1 - micromark-util-symbol: 2.0.1 - - micromark-util-subtokenize@2.1.0: - dependencies: - devlop: 1.1.0 - micromark-util-chunked: 2.0.1 - micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.2 - - micromark-util-symbol@2.0.1: {} - - micromark-util-types@2.0.2: {} - - micromark@4.0.2: - dependencies: - '@types/debug': 4.1.13 - debug: 4.4.3 - decode-named-character-reference: 1.3.0 - devlop: 1.1.0 - micromark-core-commonmark: 2.0.3 - micromark-factory-space: 2.0.1 - micromark-util-character: 2.1.1 - micromark-util-chunked: 2.0.1 - micromark-util-combine-extensions: 2.0.1 - micromark-util-decode-numeric-character-reference: 2.0.2 - micromark-util-encode: 2.0.1 - micromark-util-normalize-identifier: 2.0.1 - micromark-util-resolve-all: 2.0.1 - micromark-util-sanitize-uri: 2.0.1 - micromark-util-subtokenize: 2.1.0 - micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.2 - transitivePeerDependencies: - - supports-color - - ms@2.1.3: {} + ms@2.0.0: {} nanoid@3.3.18: {} + negotiator@0.6.4: {} + + negotiator@1.1.0: + dependencies: + content-type: 2.1.0 + + node-addon-native-custom-loader@0.1.9: {} + + node-addon-require-builtin-darwin-arm64@0.1.9: + dependencies: + node-addon-native-custom-loader: 0.1.9 + optional: true + + node-addon-require-builtin-darwin-x64@0.1.9: + dependencies: + node-addon-native-custom-loader: 0.1.9 + optional: true + + node-addon-require-builtin-linux-arm64-gnu@0.1.9: + dependencies: + node-addon-native-custom-loader: 0.1.9 + optional: true + + node-addon-require-builtin-linux-arm64-musl@0.1.9: + dependencies: + node-addon-native-custom-loader: 0.1.9 + optional: true + + node-addon-require-builtin-linux-x64-gnu@0.1.9: + dependencies: + node-addon-native-custom-loader: 0.1.9 + optional: true + + node-addon-require-builtin-linux-x64-musl@0.1.9: + dependencies: + node-addon-native-custom-loader: 0.1.9 + optional: true + + node-addon-require-builtin-win32-arm64-msvc@0.1.9: + dependencies: + node-addon-native-custom-loader: 0.1.9 + optional: true + + node-addon-require-builtin-win32-ia32-msvc@0.1.9: + dependencies: + node-addon-native-custom-loader: 0.1.9 + optional: true + + node-addon-require-builtin-win32-x64-msvc@0.1.9: + dependencies: + node-addon-native-custom-loader: 0.1.9 + optional: true + + node-addon-require-builtin@0.1.9: + dependencies: + node-addon-native-custom-loader: 0.1.9 + optionalDependencies: + node-addon-require-builtin-darwin-arm64: 0.1.9 + node-addon-require-builtin-darwin-x64: 0.1.9 + node-addon-require-builtin-linux-arm64-gnu: 0.1.9 + node-addon-require-builtin-linux-arm64-musl: 0.1.9 + node-addon-require-builtin-linux-x64-gnu: 0.1.9 + node-addon-require-builtin-linux-x64-musl: 0.1.9 + node-addon-require-builtin-win32-arm64-msvc: 0.1.9 + node-addon-require-builtin-win32-ia32-msvc: 0.1.9 + node-addon-require-builtin-win32-x64-msvc: 0.1.9 + obug@2.1.4: {} - oniguruma-parser@0.12.2: {} - - oniguruma-to-es@4.3.6: - dependencies: - oniguruma-parser: 0.12.2 - regex: 6.1.0 - regex-recursion: 6.0.2 + on-headers@1.1.0: {} parse5@8.0.1: dependencies: @@ -3402,8 +3013,6 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 - property-information@7.2.0: {} - punycode@2.3.1: {} quansync@1.0.0: {} @@ -3418,20 +3027,12 @@ snapshots: dependencies: loose-envify: 1.4.0 - regex-recursion@6.0.2: - dependencies: - regex-utilities: 2.3.0 - - regex-utilities@2.3.0: {} - - regex@6.1.0: - dependencies: - regex-utilities: 2.3.0 - require-from-string@2.0.2: {} resolve-pkg-maps@1.0.0: {} + resolve.exports@2.0.4: {} + rolldown-plugin-dts@0.27.14(rolldown@1.2.5)(typescript@5.9.3): dependencies: dts-resolver: 3.0.0 @@ -3467,6 +3068,8 @@ snapshots: '@rolldown/binding-win32-arm64-msvc': 1.2.5 '@rolldown/binding-win32-x64-msvc': 1.2.5 + safe-buffer@5.2.1: {} + saxes@6.0.0: dependencies: xmlchars: 2.2.0 @@ -3475,32 +3078,16 @@ snapshots: dependencies: loose-envify: 1.4.0 - shiki@4.4.3: - dependencies: - '@shikijs/core': 4.4.3 - '@shikijs/engine-javascript': 4.4.3 - '@shikijs/engine-oniguruma': 4.4.3 - '@shikijs/langs': 4.4.3 - '@shikijs/themes': 4.4.3 - '@shikijs/types': 4.4.3 - '@shikijs/vscode-textmate': 10.0.2 - '@types/hast': 3.0.5 + semver@7.8.5: {} siginfo@2.0.0: {} source-map-js@1.2.1: {} - space-separated-tokens@2.0.2: {} - stackback@0.0.2: {} std-env@4.2.0: {} - stringify-entities@4.0.4: - dependencies: - character-entities-html4: 2.1.0 - character-entities-legacy: 3.0.0 - symbol-tree@3.2.4: {} tinybench@2.9.0: {} @@ -3530,8 +3117,6 @@ snapshots: tree-kill@1.2.2: {} - trim-lines@3.0.1: {} - tsdown@0.22.14(typescript@5.9.3): dependencies: ansis: 4.3.1 @@ -3568,51 +3153,16 @@ snapshots: undici@8.10.0: {} - unist-util-is@6.0.1: - dependencies: - '@types/unist': 3.0.3 - - unist-util-position@5.0.0: - dependencies: - '@types/unist': 3.0.3 - - unist-util-remove-position@5.0.0: - dependencies: - '@types/unist': 3.0.3 - unist-util-visit: 5.1.0 - - unist-util-stringify-position@4.0.0: - dependencies: - '@types/unist': 3.0.3 - - unist-util-visit-parents@6.0.2: - dependencies: - '@types/unist': 3.0.3 - unist-util-is: 6.0.1 - - unist-util-visit@5.1.0: - dependencies: - '@types/unist': 3.0.3 - unist-util-is: 6.0.1 - unist-util-visit-parents: 6.0.2 - use-sync-external-store@1.2.0(react@18.3.1): dependencies: react: 18.3.1 + optional: true + + vary@1.1.2: {} verkit@0.3.2: {} - vfile-message@4.0.3: - dependencies: - '@types/unist': 3.0.3 - unist-util-stringify-position: 4.0.0 - - vfile@6.0.3: - dependencies: - '@types/unist': 3.0.3 - vfile-message: 4.0.3 - - vite@8.2.2(@types/node@24.13.3): + vite@8.2.2(@types/node@24.13.3)(yaml@2.9.1): dependencies: lightningcss: 1.33.0 picomatch: 4.0.5 @@ -3622,16 +3172,17 @@ snapshots: optionalDependencies: '@types/node': 24.13.3 fsevents: 2.3.3 + yaml: 2.9.1 - vitest@4.1.11(@types/node@24.13.3)(jsdom@30.0.1)(vite@8.2.2(@types/node@24.13.3)): + vitest@4.1.8(@types/node@24.13.3)(jsdom@30.0.1)(vite@8.2.2(@types/node@24.13.3)(yaml@2.9.1)): dependencies: - '@vitest/expect': 4.1.11 - '@vitest/mocker': 4.1.11(vite@8.2.2(@types/node@24.13.3)) - '@vitest/pretty-format': 4.1.11 - '@vitest/runner': 4.1.11 - '@vitest/snapshot': 4.1.11 - '@vitest/spy': 4.1.11 - '@vitest/utils': 4.1.11 + '@vitest/expect': 4.1.8 + '@vitest/mocker': 4.1.8(vite@8.2.2(@types/node@24.13.3)(yaml@2.9.1)) + '@vitest/pretty-format': 4.1.8 + '@vitest/runner': 4.1.8 + '@vitest/snapshot': 4.1.8 + '@vitest/spy': 4.1.8 + '@vitest/utils': 4.1.8 es-module-lexer: 2.3.2 expect-type: 1.4.0 magic-string: 0.30.21 @@ -3643,7 +3194,7 @@ snapshots: tinyexec: 1.3.0 tinyglobby: 0.2.17 tinyrainbow: 3.1.1 - vite: 8.2.2(@types/node@24.13.3) + vite: 8.2.2(@types/node@24.13.3)(yaml@2.9.1) why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 24.13.3 @@ -3686,6 +3237,8 @@ snapshots: xmlchars@2.2.0: {} + yaml@2.9.1: {} + yuku-ast@0.8.7: dependencies: '@yuku-toolchain/types': 0.8.7 @@ -3727,12 +3280,9 @@ snapshots: zod@4.4.3: {} - zustand@4.4.7(@types/react@18.3.31)(immer@10.2.0)(react@18.3.1): - dependencies: - use-sync-external-store: 1.2.0(react@18.3.1) + zustand@5.0.16(@types/react@18.3.31)(immer@11.2.9)(react@18.3.1)(use-sync-external-store@1.2.0(react@18.3.1)): optionalDependencies: '@types/react': 18.3.31 - immer: 10.2.0 + immer: 11.2.9 react: 18.3.1 - - zwitch@2.0.4: {} + use-sync-external-store: 1.2.0(react@18.3.1) diff --git a/src/client/FlowerBranch.tsx b/src/client/FlowerBranch.tsx new file mode 100644 index 0000000..bf91566 --- /dev/null +++ b/src/client/FlowerBranch.tsx @@ -0,0 +1,264 @@ +/** + * The flower branch: an SVG overlay that draws one continuous curly stem down + * the sidebar tree, growing to the row you are currently on. + * + * Ported from the RewampUI *Flower Sidebar* reference. The mechanism, verified + * against that page's live DOM: + * + * - TWO paths share one `d` prefix: a **ghost** (dashed, faded) drawing the + * whole route, and a **grown** solid stroke drawn only as far as the active + * row. The grown one is what makes the branch look like it grew to you. + * - A **dot per row**, sitting exactly on the curve. + * - A **flower at the endpoint**: the stem grows into a bloom on the row you + * are on, which is where the grown stroke stops. The bloom TURNS while that + * session is working and rests when it is idle. + * - The whole SVG is `pointer-events: none` and `overflow: visible`, so it is + * pure decoration over the real rows and never intercepts a click. + * + * Measurement, not layout: the rows are rendered by the tree itself (they carry + * drag handlers, menus and hover state), so this component reads each row's + * vertical centre from the DOM and feeds plain numbers to `buildBranch`. That + * keeps the geometry unit-tested (`branch.ts`) while the SVG stays a dumb + * renderer of it. + * + * Re-measured on: row count changes (expand/collapse, new session), the active + * row changing, and container resize. A `ResizeObserver` on the scroll body + * covers the last one without a window listener. + * + * The bloom's spin is NOT re-measured here: it arrives as the `spinning` prop + * and is applied as a class, so a status flip never re-runs the DOM measurement + * above (the tree is the expensive part, not the class swap). + */ +import { useEffect, useMemo, useRef, useState } from 'react' +import { buildBranch, type Branch, type BranchRow } from './branch.ts' + +/** + * Attribute the tree puts on every row the branch should connect. */ +export const BRANCH_ROW_ATTRIBUTE = 'data-wg-branch-row' + +/** + * Attribute marking the row the stem should grow to. + * + * Only the DEEPEST row gets this (the session). Its ancestors — the project and + * the category that contain it — deliberately do NOT, because a session belongs + * to both and marking all three would make "which row is active?" ambiguous. + * When several rows do carry it, the deepest (last in document order) wins. + */ +export const BRANCH_ACTIVE_ATTRIBUTE = 'data-wg-branch-active' + +/** Row kind marker: a group boundary kinks the stem. */ +export const BRANCH_GROUP_ATTRIBUTE = 'data-wg-branch-group' + +/** + * The bloom's petal outline, in the 1024-unit box the artwork was drawn in. + * + * This is the user's own flower glyph verbatim: an eight-petal bloom around a + * ringed center. Kept as a path (not a component) because it is a constant. + */ +const FLOWER_PATH = 'M375.3728 841.8432c92.96-12.5184 203.8784-71.264 299.5456-166.9248 22.6112-22.6112 43.1616-46.08 61.5232-69.952C712.7616 786.3936 621.2608 921.6 512 921.6c-51.1488 0-98.4-29.632-136.6272-79.7568z m-87.808-422.8096C311.2384 237.6064 402.7328 102.4 512 102.4c51.1488 0 98.4 29.632 136.6272 79.7568-92.96 12.5184-203.8784 71.264-299.5456 166.9248a719.1232 719.1232 0 0 0-61.5232 69.952z m-129.536 139.5648c57.3248 74.2464 163.6608 140.9344 294.336 175.9488a719.1232 719.1232 0 0 0 91.3472 18.304c-168.9664 70.208-331.808 58.5728-386.432-36.0512-25.5744-44.288-23.5456-100.032 0.7552-158.2016z m322.2592-287.4496c168.9664-70.208 331.808-58.5728 386.432 36.0512 25.5744 44.288 23.5456 100.032-0.7552 158.2016-57.3184-74.2464-163.648-140.9344-294.336-175.9488a719.1232 719.1232 0 0 0-91.3408-18.304zM294.656 228.7552c-35.6352 86.7648-40.224 212.1984-5.2032 342.8736a719.1232 719.1232 0 0 0 29.8176 88.256C173.9904 548.6592 102.6432 401.824 157.2736 307.2c25.5744-44.288 74.8608-70.4 137.3824-78.4448z m410.0736 135.36c145.28 111.2256 216.6272 258.0608 161.9968 352.6848-25.5744 44.288-74.8608 70.4-137.3824 78.4448 35.6352-86.7648 40.224-212.1984 5.2032-342.8736a719.1232 719.1232 0 0 0-29.8176-88.256zM512 678.4c-88.3648 0-160-71.6352-160-160s71.6352-160 160-160 160 71.6352 160 160-71.6352 160-160 160z m0-83.2c42.4128 0 76.8-34.3872 76.8-76.8s-34.3872-76.8-76.8-76.8-76.8 34.3872-76.8 76.8 34.3872 76.8 76.8 76.8z' + +/** Petal colour: the accent the glyph was drawn in. */ +const FLOWER_PETAL = '#fa541c' + +/** + * Rendered size of the bloom, as a scale factor over the authored 1024 box. + * + * 17 / 1024 ≈ 0.0166 puts the flower at ~17px: clear of neighbouring rows (rows + * are 28px tall) while still reading as a flower rather than a dot at the end of + * the stem. + */ +const FLOWER_SCALE = 17 / 1024 + +/** + * Centre of the artwork inside its own 1024-unit box, measured from the path. + * + * Both the recentring AND the rotation are expressed with this ONE pair of user + * units, so neither depends on a percentage or on a reference box. Verified + * against the live DOM: the path's own `getBBox()` centre is exactly (512, 512). + */ +const FLOWER_CENTRE = 512 + +/** + * The bloom at the branch's endpoint. + * + * Anchoring is done entirely by these transforms, in this order: + * + * 1. `translate(cx cy)` — put the origin on the stem's tip (the endpoint of + * the grown stroke). + * 2. `scale(FLOWER_SCALE)` — shrink the 1024-unit artwork about that origin. + * 3. `translate(-512 -512)` — bring the glyph's own centre (512, 512) onto the + * origin, so the flower is centred on the tip. + * + * The spin is applied by `wgFlowerArt` in CSS as a `rotate()` composed AFTER + * that recentring (`translate(-512 -512) rotate(...)`), so the bloom turns about + * its own centre and the recentring never drifts as it rotates. + * + * Note what is deliberately NOT used here: a percentage `translate(-50%, -50%)` + * or `transform-box: fill-box` + percentage `transform-origin`. Measured on the + * live page, the percentage form resolved against the SVG VIEWPORT rather than + * the path's box, translating by (-24, -409.5) instead of (-373, -409.6) and + * parking the bloom well right of the stem. Explicit user units remove the + * question: 512 is the measured centre, not an inferred one. + * + * The flower rests while the session is idle and turns while it works: one + * animation, paused rather than removed, so a state flip resumes the turn + * instead of snapping the petals back to 0deg. + * + * @param props - endpoint coordinates and whether the session is working. + * @returns the bloom group. + */ +function Flower({ cx, cy, spinning }: { cx: number; cy: number; spinning: boolean }) { + return ( + + + + ) +} + +/** + * Render the branch for the rows currently inside `scope`. + * @param props - the element to measure, and whether the open session is working. + * @returns the SVG overlay, or null until at least one row is measured. + */ +export function FlowerBranch({ scope, spinning }: { scope: HTMLElement | null; spinning: boolean }) { + const [rows, setRows] = useState([]) + + // A cheap change key: the caller cannot tell us when a row expanded, so we + // watch the attribute count and the active row instead of diffing every node. + const measureKey = useRef('') + // The measured pixel pitch is per-list, not the module default: our rows are + // 28/30px tall in places, and assuming 32 would drift the dots off the rows. + const [branch, setBranch] = useState(null) + + useEffect(() => { + if (scope === null) { + setRows([]) + setBranch(null) + return + } + + const measure = (): void => { + const nodes = Array.from(scope.querySelectorAll(`[${BRANCH_ROW_ATTRIBUTE}]`)) + const first = nodes[0] + if (first === undefined) { + if (measureKey.current !== '') { + measureKey.current = '' + setRows([]) + setBranch(null) + } + return + } + + // Exactly one row carries the marker (the session); if a caller ever marks + // several, the deepest wins so the stem still lands on a real leaf. + const activeIndex = nodes.reduce( + (found, node, index) => (node.hasAttribute(BRANCH_ACTIVE_ATTRIBUTE) ? index : found), + -1, + ) + const kinds = nodes.map(n => (n.hasAttribute(BRANCH_GROUP_ATTRIBUTE) ? 'group' : 'item')).join('') + const key = `${nodes.length}|${activeIndex}|${kinds}|${Math.round(scope.clientWidth)}` + if (key === measureKey.current) return + measureKey.current = key + + // Each row carries its OWN measured anchor: y because the tree mixes row + // heights, x because it indents per row via padding (a folder's chevron and + // a session's text do not share an x). + const measured: BranchRow[] = nodes.map((node, index) => ({ + key: `${index}`, + y: center(node), + x: anchorX(node), + kind: node.hasAttribute(BRANCH_GROUP_ATTRIBUTE) ? 'group' : 'item', + active: index === activeIndex, + })) + + setRows(measured) + setBranch(buildBranch(measured)) + } + + /** Vertical centre of a node, relative to the scope box. */ + function center(node: HTMLElement): number { + const r = node.getBoundingClientRect() + const s = (scope as HTMLElement).getBoundingClientRect() + return r.top - s.top + r.height / 2 + } + + /** + * Horizontal anchor of a row, relative to the scope box. + * + * A row with a chevron anchors to that triangle's CENTRE: it is the marker + * the user already reads as "this row opens", so the stem hangs off it + * instead of floating beside it. A chevron-less row (a session) has no + * marker, so it anchors to where its own content starts — the status dot's + * centre, which is the first thing in the row. + */ + function anchorX(node: HTMLElement): number { + const s = (scope as HTMLElement).getBoundingClientRect() + const marker = node.querySelector('.wgChevron') + ?? node.querySelector('[class*="wgStatusSlot"]') + ?? node.querySelector('[class*="wgCategoryIcon"]') + ?? node.querySelector('[class*="wgRowIcon"]') + const box = (marker ?? node).getBoundingClientRect() + return box.left - s.left + box.width / 2 + } + + measure() + + // Row set changes (expand/collapse/new session) arrive as childList edits. + const observer = new MutationObserver(measure) + observer.observe(scope, { childList: true, subtree: true, attributes: true, attributeFilter: [BRANCH_ACTIVE_ATTRIBUTE] }) + + // Width changes reflow row heights in the rail/wide layouts. + const resizer = new ResizeObserver(measure) + resizer.observe(scope) + + return () => { + observer.disconnect() + resizer.disconnect() + } + }, [scope]) + + // Dots are rendered from the measured rows; keep the memo keyed on identity so + // a re-render with the same branch does not rebuild the element list. + const dots = useMemo(() => branch?.dots ?? [], [branch]) + // The endpoint dot gives way to the bloom. + const flowerKey = branch?.flower?.key + + if (branch === null || rows.length === 0) return null + + return ( + + ) +} diff --git a/src/client/GroupsBrowser.tsx b/src/client/GroupsBrowser.tsx index 49c2129..5486dd1 100644 --- a/src/client/GroupsBrowser.tsx +++ b/src/client/GroupsBrowser.tsx @@ -17,14 +17,19 @@ import { useEffect, useMemo, useRef, useState, type DragEvent } from 'react' import { Button, - IconCloseFill14, - IconFolderOpenOutline16, - IconProjectAddOutline16, - IconSearchOutline16, + IconCloseFillMedium, + IconFolderOpenOutlineRegular, + IconProjectAddOutlineRegular, + IconSearchOutlineRegular, + IconWarningOutlineRegular, Modal, + Toast, Tooltip, } from '@deepseek-ai/dsh-client-ui-primitives' -import type { SessionId, SessionListState, SessionSearchResultItem, WorkspaceId, WorkspaceView } from '@deepseek-ai/dsh-client-runtime/client' +import type { SessionId } from '@deepseek-ai/dsh-session/types' +import type { SessionListState, SessionSearchResultItem } from '@deepseek-ai/dsh-api-session-controller/client' +import type { WorkspaceId, WorkspaceView } from '@deepseek-ai/dsh-api-workspace-controller/client' +import type { SessionStatusSnapshot } from '@deepseek-ai/dsh-client-ui-session/client' import { displayCategoryKeys, moveAfter, @@ -35,8 +40,12 @@ import { } from '../core/matcher.ts' import { TOP_LEVEL_ORDER_KEY, UNCATEGORIZED_LABEL, type GroupsConfig, type ManualGroups } from '../core/types.ts' import type { GroupsBrowserProps } from './contract.ts' -import { deriveGroups, deriveSearchGroups, deriveSearchMatches, deriveTopLevel, UNCATEGORIZED_KEY, type CategoryNode, type WorkspaceGroupNode } from './tree.ts' -import { CategoryRow, DND_CATEGORY_TYPE, DND_WORKSPACE_TYPE, hasPluginDragType, SessionRow, WorkspaceRow } from './rows.tsx' +import { deriveGroups, deriveSearchGroups, deriveSearchMatches, deriveTopLevel, currentSessionId, UNCATEGORIZED_KEY, type CategoryNode, type WorkspaceGroupNode } from './tree.ts' +import { CategoryRow, DND_CATEGORY_TYPE, DND_WORKSPACE_TYPE, hasPluginDragType, SessionRow, TreeChildren, WorkspaceRow } from './rows.tsx' +import { fetchOpenInApps, folderAppId, openPathInApp } from './open-folder.ts' +import { QuickPanel } from './QuickPanel.tsx' +import { SessionTabs } from './SessionTabs.tsx' +import { FlowerBranch } from './FlowerBranch.tsx' import css from './styles.css?inline' const SEARCH_DEBOUNCE_MS = 250 @@ -147,6 +156,7 @@ export function GroupsBrowser({ expandSidebar, useSessions, useWorkspaces, + useSessionStatus, useStore, actions, startSession, @@ -162,6 +172,9 @@ export function GroupsBrowser({ pickDirectory, searchSessions, searchResultLimit, + openTab, + useTabs, + tabActions, t, }: GroupsBrowserProps) { // Inject the stylesheet once per fiber; dispose removes it (HMR safe). @@ -173,6 +186,21 @@ export function GroupsBrowser({ return () => { style.remove() } }, []) + // Ctrl+R toggles the quick switch panel. Capture phase + preventDefault: + // beats the browser's page-reload default and any shell-level handler. + const [quickOpen, setQuickOpen] = useState(false) + useEffect(() => { + const onKeyDown = (e: KeyboardEvent): void => { + if (e.ctrlKey && !e.altKey && !e.metaKey && !e.shiftKey && (e.key === 'r' || e.key === 'R')) { + e.preventDefault() + e.stopPropagation() + setQuickOpen(v => !v) + } + } + window.addEventListener('keydown', onKeyDown, true) + return () => window.removeEventListener('keydown', onKeyDown, true) + }, []) + // Grouping config from the host route + the runtime manual overlay. const [config, setConfig] = useState({ categories: [] }) const [manual, setManual] = useState(EMPTY_MANUAL) @@ -199,11 +227,25 @@ export function GroupsBrowser({ const workspaceExpansion = useStore(s => s.workspaceExpansion) const list = useSessions(s => s) - const current = list.current + const statuses = useSessionStatus(s => s) + // 0.1.6: the selected Session is the one retained through `mainView`, not a + // `list.current` field (the list snapshot carries catalog facts only). + const current = currentSessionId(list) const currentWorkspaceKey = current === undefined ? undefined : (workspaces.find(w => w.sessionIds.includes(current as SessionId))?.workspaceId as string | undefined) + // Whether the open session is WORKING right now, which is what makes the + // flower at the branch's endpoint turn. Read from the unified status snapshot + // (the catalog summary alone goes stale), folded together with the session's + // own `running` so a subagent-only turn still counts. + // + // Derived as a boolean on purpose: the overlay re-measures through its own + // MutationObserver, so handing it a live value would re-render the tree on + // every status tick. + const currentRunning = current !== undefined + && ((statuses.get(current)?.running ?? false) || (list.byId[current]?.running ?? false)) + // Auto-expand the category + workspace containing the current session, but // ONLY when the user has never touched that key (`Object.hasOwn`): a // present `false` is a deliberate collapse and must stay folded. Without @@ -229,6 +271,19 @@ export function GroupsBrowser({ ) }, [actions, config, manual, workspacePhase, workspaces]) + // Session tabs: the strip lives in the conversation column, but its lifecycle + // belongs here — the browser already derives the open session for its own tree, + // so one effect covers every way a session can be opened (sidebar row, + // workspace New Session, quick panel, conversation-header crumbs). + // + // `statuses` is a dependency on purpose: a session earns its tab when it + // STARTS working, which is a status change, not a catalog change. Without it a + // conversation that began while already open would never surface a tab. + useEffect(() => { + if (current === undefined) return + openTab(current, statuses.get(current)) + }, [current, list, statuses, openTab]) + const [query, setQuery] = useState('') const [searchExpanded, setSearchExpanded] = useState(false) const normalizedQuery = sanitizeSearchQuery(query).trim() @@ -237,6 +292,10 @@ export function GroupsBrowser({ }) const searchInput = useRef(null) const searchRoot = useRef(null) + // Box the flower branch measures and paints into. Held as a ref (not state) + // because the overlay re-measures on its own MutationObserver; a state update + // here would re-render the whole tree on every layout tick. + const branchScope = useRef(null) // Search debounce + abort, same posture as the official browser. useEffect(() => { @@ -289,17 +348,26 @@ export function GroupsBrowser({ () => deriveGroups(list, workspaces, archivedSessionIds, config, { expandedCategories, expandedWorkspaces, - }, manual), - [list, workspaces, archivedSessionIds, config, manual, expandedCategories, expandedWorkspaces], + }, manual, statuses), + [list, workspaces, archivedSessionIds, config, manual, statuses, expandedCategories, expandedWorkspaces], ) // Top-level (ungrouped) workspace rows, rendered after the group folders. const topLevel = useMemo( () => deriveTopLevel(list, workspaces, archivedSessionIds, config, { expandedCategories, expandedWorkspaces, - }, manual), - [list, workspaces, archivedSessionIds, config, manual, expandedCategories, expandedWorkspaces], + }, manual, statuses), + [list, workspaces, archivedSessionIds, config, manual, statuses, expandedCategories, expandedWorkspaces], ) + // Quick panel (Ctrl+R): category label per grouped workspace id (the tree + // derivation already resolved grouping; top-level workspaces stay absent). + const categoryByWorkspace = useMemo(() => { + const map = new Map() + for (const category of groups) { + for (const workspace of category.workspaces) map.set(workspace.workspaceId as string, category.label) + } + return map + }, [groups]) // While dragging a project, an empty top-level area must still show a landing // line — otherwise a project can never be dragged OUT of a group when every // project is currently grouped. @@ -397,12 +465,44 @@ export function GroupsBrowser({ setSessionRenameError(null) } + // The strip is a child of this component (rendered through a DOM portal), so + // it shares this fiber's props directly: renames call the dialog owner here, + // and activation goes through the same navigation verb the sidebar rows use. + const activateTab = (sessionId: SessionId) => { open(sessionId) } + const onSessionArchive = (sessionId: SessionId) => { archiveSession(sessionId).catch((reason: unknown) => { console.warn('session archive rejected:', reason) }) } + // "Open in folder": the host half of the official open-in-app plugin resolves + // which applications it can launch; the project row then just posts the + // project directory to that host's launch route. One availability read per + // mount — a host without the capability (or a refused read) leaves + // `folderApp` undefined, which drops the menu entry rather than failing. + const [folderApp, setFolderApp] = useState(undefined) + const [folderError, setFolderError] = useState<{ id: number; text: string } | null>(null) + useEffect(() => { + const controller = new AbortController() + fetchOpenInApps(controller.signal).then((apps) => { + if (controller.signal.aborted) return + setFolderApp(folderAppId(apps)) + }).catch(() => { /* no capability: the row simply offers no folder entry */ }) + return () => { controller.abort() } + }, []) + + const openInFolder = folderApp === undefined + ? undefined + : (workspaceId: WorkspaceId): void => { + const workspace = workspaces.find(w => w.workspaceId === workspaceId) + if (workspace === undefined) return + openPathInApp(folderApp, workspace.path).catch((reason: unknown) => { + const detail = reason instanceof Error ? reason.message : String(reason) + setFolderError({ id: Date.now(), text: `${t('workspace.openInFolderError')}: ${detail}` }) + }) + } + // ---- Runtime group management ---------------------------------------------- const [groupDialog, setGroupDialog] = useState(null) @@ -755,6 +855,20 @@ export function GroupsBrowser({ return (
+ {/* The tab strip portals itself into the conversation column's head seat, + so its position here is irrelevant to where it appears; rendering it + from this component is what keeps it on this fiber (and therefore on + this store's single scope) while still reaching the other column. */} +
{wide && {t('section.workspaces')}} {wide && ( @@ -765,7 +879,7 @@ export function GroupsBrowser({ aria-label={t('search')} onClick={() => { setSearchExpanded(true) }} > - + {searchExpanded && ( - + )}
@@ -811,7 +925,7 @@ export function GroupsBrowser({ setGroupDialog({ mode: 'create' }) }} > - + @@ -822,7 +936,7 @@ export function GroupsBrowser({ disabled={adding} onClick={addWorkspace} > - +
@@ -836,7 +950,7 @@ export function GroupsBrowser({ aria-label={t('search')} onClick={() => { setSearchExpanded(true); expandSidebar() }} > - +
@@ -855,6 +969,7 @@ export function GroupsBrowser({ workspaces={workspaces} config={config} archivedSessionIds={archivedSessionIds} + statuses={statuses} query={normalizedQuery} remote={remoteSearch} resultLimit={searchResultLimit} @@ -865,7 +980,13 @@ export function GroupsBrowser({ t={t} /> ) : ( -
+ /* The branch overlay lives beside the tree, not inside it: it measures + the rows and paints behind them, so it must share their box without + becoming a row itself (which would break role="tree" semantics and + the index-based measurement). */ +
+ +
{groups.length === 0 && topLevel.length === 0 && !topLevelDropActive && (
{workspacePhase === 'ready' ? t('empty.noWorkspaces') : t('empty.none')}
)} @@ -908,6 +1029,7 @@ export function GroupsBrowser({ setGroupDeleteError(null) }} onMoveOut={(workspaceId) => { void moveWorkspaceTo(workspaceId, UNCATEGORIZED_KEY) }} + onOpenInFolder={openInFolder} canMoveOut={(workspaceId) => { // The menu "移出分组" is offered for any project that // currently sits inside a group (rule-classified or manual) — @@ -952,8 +1074,10 @@ export function GroupsBrowser({ onSessionRename={onSessionRename} onSessionArchive={onSessionArchive} onFork={forkSession} + onOpenInFolder={openInFolder} /> )} +
)}
@@ -1083,6 +1207,33 @@ export function GroupsBrowser({ >
{addError}
+ + {/* "Open in folder" failure: transient banner, keyed per attempt so a + repeat failure restarts the cycle. */} + {folderError !== null && ( + } + onDone={() => { setFolderError(null) }} + /> + )} + + {/* Ctrl+R quick switch panel (conditionally mounted: fresh query per open). */} + {quickOpen && ( + { setQuickOpen(false) }} + list={list} + workspaces={workspaces} + archivedSessionIds={archivedSessionIds} + categoryByWorkspace={categoryByWorkspace} + current={current} + startSession={startSession} + openSession={open} + now={now} + t={t} + /> + )} ) } @@ -1100,7 +1251,7 @@ function categoriesForCurrent( } /** One category section: header row + expanded workspace folders. */ -function CategorySection({ category, current, now, t, dragIndicator, onDragOverRow, onDragLeaveRow, onDropRow, onDragStartCategory, onDragStartWorkspace, onToggleCategory, onToggleWorkspace, onNewSession, onOpen, onRenameRequest, onDeleteRequest, onSessionRename, onSessionArchive, onFork, onGroupRename, onGroupDelete, onMoveOut, canMoveOut }: { +function CategorySection({ category, current, now, t, dragIndicator, onDragOverRow, onDragLeaveRow, onDropRow, onDragStartCategory, onDragStartWorkspace, onToggleCategory, onToggleWorkspace, onNewSession, onOpen, onRenameRequest, onDeleteRequest, onSessionRename, onSessionArchive, onFork, onGroupRename, onGroupDelete, onMoveOut, canMoveOut, onOpenInFolder }: { category: CategoryNode current: SessionId | undefined now: number @@ -1125,6 +1276,8 @@ function CategorySection({ category, current, now, t, dragIndicator, onDragOverR onGroupDelete: () => void onMoveOut: (workspaceId: WorkspaceId) => void canMoveOut: (workspaceId: WorkspaceId) => boolean + /** Absent when the host resolved no folder application. */ + onOpenInFolder?: ((workspaceId: WorkspaceId) => void) | undefined }) { const categoryLine = dragIndicator?.mode === 'line' && dragIndicator.row.kind === 'category' && dragIndicator.row.key === category.key ? (dragIndicator.before ? 'before' : 'after') @@ -1158,6 +1311,9 @@ function CategorySection({ category, current, now, t, dragIndicator, onDragOverR onDelete={() => { onDeleteRequest(workspace.workspaceId, workspace.label) }} canMoveOut={canMoveOut(workspace.workspaceId)} onMoveOut={() => { onMoveOut(workspace.workspaceId) }} + {...(onOpenInFolder !== undefined + ? { onOpenInFolder: () => { onOpenInFolder(workspace.workspaceId) } } + : {})} dropActive={false} {...(dragIndicator?.mode === 'line' && dragIndicator.row.kind === 'workspace' && dragIndicator.row.key === workspace.workspaceId ? { insertLine: dragIndicator.before ? 'before' : 'after' } @@ -1167,19 +1323,23 @@ function CategorySection({ category, current, now, t, dragIndicator, onDragOverR onRowDrop={onDropRow(category.key, { kind: 'workspace', key: workspace.workspaceId })} onDragStartExtra={onDragStartWorkspace(workspace.workspaceId)} /> - {workspace.expanded && workspace.sessions.map((session) => ( - - ))} + {workspace.expanded && ( + + {workspace.sessions.map((session) => ( + + ))} + + )} ))} @@ -1197,7 +1357,7 @@ function CategorySection({ category, current, now, t, dragIndicator, onDragOverR * last row); * - an empty top level shows a standalone line under the last group folder. */ -function TopLevelSection({ topLevel, current, now, t, dragging, dragIndicator, topLevelRef, onDragOverRow, onDragOverTopLevelArea, onDragLeaveRow, onDropRow, onDragStartWorkspace, onToggleWorkspace, onNewSession, onOpen, onRenameRequest, onDeleteRequest, onSessionRename, onSessionArchive, onFork }: { +function TopLevelSection({ topLevel, current, now, t, dragging, dragIndicator, topLevelRef, onDragOverRow, onDragOverTopLevelArea, onDragLeaveRow, onDropRow, onDragStartWorkspace, onToggleWorkspace, onNewSession, onOpen, onRenameRequest, onDeleteRequest, onSessionRename, onSessionArchive, onFork, onOpenInFolder }: { topLevel: readonly WorkspaceGroupNode[] current: SessionId | undefined now: number @@ -1219,6 +1379,8 @@ function TopLevelSection({ topLevel, current, now, t, dragging, dragIndicator, t onSessionRename: (sessionId: SessionId, currentTitle: string) => void onSessionArchive: (sessionId: SessionId) => void onFork: (sessionId: SessionId) => void + /** Absent when the host resolved no folder application. */ + onOpenInFolder?: ((workspaceId: WorkspaceId) => void) | undefined }) { const emptyLineActive = dragIndicator?.mode === 'line' && dragIndicator.row.kind === 'topLevel' && dragIndicator.row.key === topLevelRef.key return ( @@ -1251,6 +1413,9 @@ function TopLevelSection({ topLevel, current, now, t, dragging, dragIndicator, t onNewSession={() => { onNewSession(workspace.workspaceId) }} onRename={() => { onRenameRequest(workspace.workspaceId, workspace.label) }} onDelete={() => { onDeleteRequest(workspace.workspaceId, workspace.label) }} + {...(onOpenInFolder !== undefined + ? { onOpenInFolder: () => { onOpenInFolder(workspace.workspaceId) } } + : {})} {...(dragIndicator?.mode === 'line' && dragIndicator.row.kind === 'topLevel' && dragIndicator.row.key === workspace.workspaceId ? { insertLine: dragIndicator.before ? 'before' : 'after' } : {})} @@ -1259,19 +1424,23 @@ function TopLevelSection({ topLevel, current, now, t, dragging, dragIndicator, t onRowDrop={onDropRow(UNCATEGORIZED_KEY, { kind: 'topLevel', key: workspace.workspaceId })} onDragStartExtra={onDragStartWorkspace(workspace.workspaceId)} /> - {workspace.expanded && workspace.sessions.map((session) => ( - - ))} + {workspace.expanded && ( + + {workspace.sessions.map((session) => ( + + ))} + + )} ))} @@ -1283,11 +1452,12 @@ function TopLevelSection({ topLevel, current, now, t, dragging, dragIndicator, t * 分类文件夹 → 项目文件夹 → 命中会话行. Reuses the same row components as * the idle tree, so search keeps the same folder hierarchy the user is used to. */ -function SearchBody({ list, workspaces, config, archivedSessionIds, query, remote, resultLimit, current, now, open, manual, t }: { +function SearchBody({ list, workspaces, config, archivedSessionIds, statuses, query, remote, resultLimit, current, now, open, manual, t }: { list: SessionListState workspaces: readonly WorkspaceView[] config: GroupsConfig archivedSessionIds: readonly SessionId[] + statuses: SessionStatusSnapshot query: string remote: RemoteSearchState resultLimit: number @@ -1303,8 +1473,8 @@ function SearchBody({ list, workspaces, config, archivedSessionIds, query, remot [list, workspaces, config, query, archivedSessionIds, currentRemote, resultLimit], ) const searchTree = useMemo( - () => deriveSearchGroups(list, workspaces, config, matches.matchedIds, archivedSessionIds, manual, matches.snippetsBySession), - [list, workspaces, config, matches, archivedSessionIds, manual], + () => deriveSearchGroups(list, workspaces, config, matches.matchedIds, archivedSessionIds, manual, matches.snippetsBySession, statuses), + [list, workspaces, config, matches, archivedSessionIds, manual, statuses], ) const groups = searchTree.categories const searchTopLevel = searchTree.topLevel diff --git a/src/client/QuickPanel.tsx b/src/client/QuickPanel.tsx new file mode 100644 index 0000000..6c27b1e --- /dev/null +++ b/src/client/QuickPanel.tsx @@ -0,0 +1,353 @@ +/** + * Ctrl+R quick switch panel: two tabs over the framework's global hooks. + * + * - Workspaces tab: search real Workspaces, select one, then either start a + * New Session in it or jump straight to its most recently updated running + * session (the button reads the none-running state and disables). + * - Sessions tab: every top-level session across workspaces — running ones + * pinned on top, everything else under them, both groups newest first; one + * click (or Enter) opens it. The shared search input filters by session or + * workspace title and never re-sorts, so the running-first order survives. + * + * Current-row marker: the open workspace (workspaces tab) and the open + * session (sessions tab) render `.wgQuickRowCurrent`; with no current + * session — or one no listed workspace holds — nothing is marked. + * + * Mount discipline: the parent conditionally mounts this component, so every + * open starts from a fresh query/selection (quick-switcher semantics). The + * overlay portals to document.body (sidebar ancestors clip `fixed`), sizes + * itself like a launcher (top-anchored, 640px) instead of the host Modal's + * 380px dialog, and handles Escape / mask click by itself. Pure data shaping + * lives in quick.ts; this file only binds hooks + actions. + */ +import { useEffect, useMemo, useRef, useState, type KeyboardEvent, type MouseEvent } from 'react' +import { createPortal } from 'react-dom' +import { Button, StateDot } from '@deepseek-ai/dsh-client-ui-primitives' +import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots' +import type { SessionListState } from '@deepseek-ai/dsh-api-session-controller/client' +import type { WorkspaceId, WorkspaceView } from '@deepseek-ai/dsh-api-workspace-controller/client' +import type { SessionId } from '@deepseek-ai/dsh-session/types' +import { activeWorkspaceId, allSessions, filterSessions, filterWorkspaces, latestRunningInWorkspace, runningCountByWorkspace, runningSessions } from './quick.ts' +import { relativeTimeLabel } from './rows.tsx' + +/** Which surface of the quick panel is active. */ +export type QuickTab = 'workspaces' | 'sessions' + +/** The locale seat's translate function (same shape GroupsBrowser receives). */ +type Translate = PropsLocale<'workspaceGroups'>['t'] + +/** Quick panel props: hooks snapshots + the two injected verbs + shared CSS context. */ +export type QuickPanelProps = { + /** Close request (Escape, mask click, action completed, or parent Ctrl+R toggle). */ + onClose: () => void + /** Sessions list snapshot (drives running detection). */ + list: SessionListState + /** Real workspaces in stable Host order. */ + workspaces: readonly WorkspaceView[] + /** Registry-global archive set. */ + archivedSessionIds: readonly SessionId[] + /** Category label per grouped workspace id (badge column; top-level absent). */ + categoryByWorkspace: ReadonlyMap + /** The Session the Conversation currently shows (mainView retention), if any. */ + current: SessionId | undefined + /** Start a New Session in a workspace (injected share verb). */ + startSession: (workspaceId?: WorkspaceId) => void + /** Open a real Session (injected share verb). */ + openSession: (sessionId: SessionId) => void + /** Render clock for relative times (parent refreshes per render). */ + now: number + /** Dictionary accessor (workspaceGroups namespace). */ + t: Translate +} + +/** Basename of a host path (both separators; shortens the workspace row sub-line). */ +function pathBasename(path: string): string { + const trimmed = path.replace(/[/\\]+$/, '') + const base = trimmed.split(/[/\\]/).pop() + return base !== undefined && base !== '' ? base : trimmed +} + +/** + * Render the quick switch panel (portaled overlay). + * @param props - hooks snapshots + injected verbs. + * @returns the panel element tree. + */ +export function QuickPanel({ + onClose, + list, + workspaces, + archivedSessionIds, + categoryByWorkspace, + current: currentSessionId, + startSession, + openSession, + now, + t, +}: QuickPanelProps) { + const [tab, setTab] = useState('workspaces') + const [query, setQuery] = useState('') + const [selectedId, setSelectedId] = useState(null) + const [activeIndex, setActiveIndex] = useState(0) + const inputRef = useRef(null) + const activeRowRef = useRef(null) + + const archived = useMemo(() => new Set(archivedSessionIds), [archivedSessionIds]) + const running = useMemo(() => runningSessions(list, archived), [list, archived]) + const runCounts = useMemo(() => runningCountByWorkspace(running, workspaces), [running, workspaces]) + const filtered = useMemo( + () => filterWorkspaces(workspaces, query, ws => categoryByWorkspace.get(ws.workspaceId as string)), + [workspaces, query, categoryByWorkspace], + ) + + // Where the user is right now: the open session and its owning workspace. + // Both may be absent (no mainView retention, or a session no listed + // workspace holds) — the current-row marker simply never renders then. + const currentWorkspaceId = useMemo( + () => activeWorkspaceId(workspaces, currentSessionId), + [workspaces, currentSessionId], + ) + + // Sessions tab data: every top-level session, running pinned on top then + // recency, filtered by the shared search query (filter never re-sorts). + const sessions = useMemo( + () => allSessions(list, archived, currentSessionId), + [list, archived, currentSessionId], + ) + // Owning workspace title per session id (row sub-line + search field); + // first workspace wins — a session lives in exactly one. + const workspaceTitleBySession = useMemo(() => { + const map = new Map() + for (const workspace of workspaces) { + for (const sessionId of workspace.sessionIds) { + if (!map.has(sessionId)) map.set(sessionId, workspace.title) + } + } + return map + }, [workspaces]) + const filteredSessions = useMemo( + () => filterSessions(sessions, query, s => workspaceTitleBySession.get(s.id)), + [sessions, query, workspaceTitleBySession], + ) + + const selected = selectedId === null + ? undefined + : workspaces.find(w => (w.workspaceId as string) === selectedId) + const selectedRunningId = selected === undefined ? undefined : latestRunningInWorkspace(list, selected) + + // Focus the search input whenever a tab becomes reachable (both tabs own it). + useEffect(() => { + inputRef.current?.focus() + }, [tab]) + + // Keep the keyboard-active row visible while arrowing through the list. + useEffect(() => { + activeRowRef.current?.scrollIntoView({ block: 'nearest' }) + }, [activeIndex]) + + /** Select the workspace and close (New Session verb). */ + const launchNewSession = (workspace: WorkspaceView): void => { + startSession(workspace.workspaceId) + onClose() + } + + /** Open a session row and close (sessions tab click or Enter). */ + const launchSession = (sessionId: SessionId): void => { + openSession(sessionId) + onClose() + } + + /** Switch tabs; the query carries over, the per-tab selection resets. */ + const switchTab = (next: QuickTab): void => { + setTab(next) + setSelectedId(null) + setActiveIndex(0) + } + + /** Search-input keyboard: arrows move the active row; Enter confirms it. */ + const onSearchKeyDown = (e: KeyboardEvent): void => { + if (e.key === 'ArrowDown') { + e.preventDefault() + const max = (tab === 'workspaces' ? filtered.length : filteredSessions.length) - 1 + setActiveIndex(i => Math.min(i + 1, Math.max(max, 0))) + } else if (e.key === 'ArrowUp') { + e.preventDefault() + setActiveIndex(i => Math.max(i - 1, 0)) + } else if (e.key === 'Enter') { + e.preventDefault() + if (tab === 'workspaces') { + if (selected === undefined) { + const target = filtered[activeIndex] + if (target !== undefined) setSelectedId(target.workspaceId as string) + } else { + launchNewSession(selected) + } + } else { + const target = filteredSessions[activeIndex] + if (target !== undefined) launchSession(target.id) + } + } + } + + /** Escape closes (capture so row buttons and the input can't swallow it). */ + const onCardKeyDown = (e: KeyboardEvent): void => { + if (e.key === 'Escape') { + e.preventDefault() + e.stopPropagation() + onClose() + } + } + + /** Mask click closes; clicks inside the card never reach the mask. */ + const onOverlayMouseDown = (e: MouseEvent): void => { + if (e.target === e.currentTarget) onClose() + } + + const selectWorkspace = (id: string): void => { + setSelectedId(id) + inputRef.current?.focus() + } + + return createPortal( +
+
+
+ {t('quick.title')} +
+ + +
+
+ + {/* Shared search: workspaces on one tab, sessions on the other. */} +
+ { + setQuery(e.target.value) + setSelectedId(null) + setActiveIndex(0) + }} + onKeyDown={onSearchKeyDown} + /> +
+ {tab === 'workspaces' ? ( + <> +
+ {filtered.map((workspace, i) => { + const id = workspace.workspaceId as string + const count = runCounts.get(id) ?? 0 + const category = categoryByWorkspace.get(id) + const isCurrent = id === currentWorkspaceId + return ( + + ) + })} + {filtered.length === 0 &&
{t('quick.empty.workspaces')}
} +
+
+ + {selected === undefined ? t('quick.select.hint') : selected.title} + + + +
+ + ) : ( +
+ {filteredSessions.map((session, i) => { + const workspaceTitle = workspaceTitleBySession.get(session.id) ?? '' + const isCurrent = session.id === currentSessionId + return ( + + ) + })} + {filteredSessions.length === 0 &&
{t('quick.empty.sessions')}
} +
+ )} + +
{t('quick.hint')}
+
+
, + document.body, + ) +} diff --git a/src/client/SessionTabs.tsx b/src/client/SessionTabs.tsx new file mode 100644 index 0000000..95843d4 --- /dev/null +++ b/src/client/SessionTabs.tsx @@ -0,0 +1,191 @@ +/** + * The session tab strip: one chip per opened conversation, rendered into the + * DOM seat at the head of the conversation column (see `tab-seat.ts` for why + * this is a DOM injection rather than a slot). + * + * A tab is a *view* of the open session, not a second navigation model: + * clicking a chip navigates through `ctx.uiWorkspace.openSession`, which is the + * one path that retains a target session; the owning component derives the + * strip from the open session plus the tab store. + * + * The active chip is derived, never stored: it is the chip whose session is the + * open one, so clicking a background chip immediately shows that chip active. + */ +import { useEffect, useMemo, useRef, useState } from 'react' +import { createPortal } from 'react-dom' +import { IconCloseFillMedium, StateDot, Tooltip, type StateDotState } from '@deepseek-ai/dsh-client-ui-primitives' +import type { SessionsTabsProps } from './contract.ts' +import { mountTabSeat } from './tab-seat.ts' +import { orderedTabs, projectIndex, tabIndicator, type SessionTab, type SessionTabIndicator } from './tabs.ts' +import { currentSessionId } from './tree.ts' + +/** Dot state for one tab (the sidebar's session rows share this vocabulary). */ +function dotState(indicator: SessionTabIndicator): StateDotState { + if (indicator.attention) return 'warning' + if (indicator.running) return 'ongoing' + return 'done' +} + +/** + * Render the session tab strip into the conversation column's head seat. + * @param props - tab store, catalog/status hooks, navigation, locale. + * @returns the portal (or null until the column has mounted). + */ +export function SessionTabs({ + useTabs, + actions, + useSessions, + useSessionStatus, + useWorkspaces, + activate, + rename, + t, +}: SessionsTabsProps) { + const tabs = useTabs(s => s.tabs) + const list = useSessions(s => s) + const statuses = useSessionStatus(s => s) + const currentId = useSessions(s => currentSessionId(s)) + const workspaces = useWorkspaces(s => s.items) + + // Session → owning project, in one pass over the workspace registry. This is + // what lets each chip name its project; without it a strip of session titles + // is ambiguous as soon as two projects are open. + const projects = useMemo(() => projectIndex(workspaces), [workspaces]) + + // The seat is a DOM node outside React's tree, so it cannot arrive through + // props; it is discovered once per mount and held in state to trigger the + // portal's first render when the column appears. + const [seat, setSeat] = useState(null) + // The scrolling row, for wheel redirection and keep-active-in-view. + const scrollRef = useRef(null) + + useEffect(() => { + const mounted = mountTabSeat(setSeat) + // The column may already exist, in which case onReady fired synchronously + // during mountTabSeat and setSeat is already queued; adopt it here too so + // the very first paint has a host instead of waiting a frame. + if (mounted.host !== null) setSeat(mounted.host) + return () => { + mounted.dispose() + // The portal must stop targeting a removed node before the next mount. + setSeat(null) + } + }, []) + + // The strip renders exactly the tabs the store holds. There is deliberately NO + // filtering against the session catalog and no "close tabs whose session + // vanished" sweep: a tab is removed when the USER closes it, and by nothing + // else. Trimming automatically also misfires — the catalog is briefly empty on + // every load, which deleted restored tabs before the sessions arrived. + // + // Arrival order is the only order: the active tab is marked, never moved. + const display = useMemo(() => orderedTabs(tabs, currentId), [tabs, currentId]) + + // With the row scrollable, the active chip can sit outside the viewport — + // e.g. after clicking a session in the sidebar that has a tab far to the + // right. Bring it into view on selection change. `block: 'nearest'` keeps + // this a horizontal-only scroll, and `inline: 'nearest'` avoids nudging the + // row when the chip is already fully visible. + useEffect(() => { + const el = scrollRef.current + if (el === null || currentId === undefined) return + const chip = el.querySelector(`[data-tab-session="${CSS.escape(currentId)}"]`) + chip?.scrollIntoView({ block: 'nearest', inline: 'nearest' }) + }, [currentId, display.length]) + + if (seat === null || display.length === 0) return null + + return createPortal( +
+
{ + // A plain wheel reports only `deltaY`, and the overflow here is + // horizontal, so without this the wheel would do nothing over the + // strip (or scroll the transcript behind it). Redirect the dominant + // delta to scrollLeft, and only swallow the event once there is + // somewhere left to scroll — otherwise a wheel at either end keeps + // propagating and the page still scrolls normally. + const el = event.currentTarget + if (el.scrollWidth <= el.clientWidth) return + const delta = Math.abs(event.deltaY) > Math.abs(event.deltaX) ? event.deltaY : event.deltaX + if (delta === 0) return + const atStart = el.scrollLeft <= 0 && delta < 0 + const atEnd = el.scrollLeft + el.clientWidth >= el.scrollWidth - 1 && delta > 0 + if (atStart || atEnd) return + el.scrollLeft += delta + event.preventDefault() + }} + > + {display.map((tab: SessionTab) => { + const summary = list.byId[tab.sessionId] + // A restored tab can render before its catalog row arrives. Show the + // session id meanwhile rather than an empty chip — the tab is real, and + // the title fills in as soon as the catalog catches up. + const label = summary === undefined + ? tab.sessionId + : summary.blank ? t('newSession') : summary.displayTitle + const active = tab.sessionId === currentId + const indicator = tabIndicator(summary, statuses.get(tab.sessionId)) + // The project this session belongs to. Absent for a session that is in + // no workspace (a bare session, or one just created before the + // registry caught up) — the chip then shows the title alone rather + // than a placeholder. + const project = projects.get(tab.sessionId) + // Title attribute carries the full pair plus the directory, so the + // truncated chip text is recoverable on hover. + const tip = project === undefined + ? label + : `${project.label} · ${label}\n${project.path}` + return ( +
+ + + + +
+ ) + })} +
+
, + seat, + ) +} diff --git a/src/client/branch.ts b/src/client/branch.ts new file mode 100644 index 0000000..bff4faf --- /dev/null +++ b/src/client/branch.ts @@ -0,0 +1,340 @@ +/** + * The "flower branch" geometry for the sidebar tree. + * + * Reproduces the RewampUI *Flower Sidebar* mechanism: a single curly branch runs + * down the left of the nav list, drawn as SVG so it can be *grown* — a faded + * dashed ghost shows the whole route, and a solid stroke is drawn only as far as + * the row you are on. Each row gets a dot sitting exactly on the curve, and the + * active row's dot blooms. + * + * How it maps onto OUR tree (three levels: 分组 folder → 项目 folder → 会话 row): + * + * - The branch is **one continuous path** through every visible row, not one + * rail per folder. That is what makes it read as a plant rather than as the + * per-folder rail it replaces. + * - The stem runs at `STEM_X`; at each **group boundary** it kinks outward to + * `BULGE_X` and back — a half-pitch out plus a half-pitch back, which is + * exactly the reference's 32px rhythm. + * - Rows that are not group boundaries sit on a straight run, one row pitch + * apart, each carrying a dot at its own y. + * + * Runtime-free on purpose (same discipline as `tabs.ts` / `store-core.ts`): the + * component measures the DOM and hands plain numbers here, so the geometry is + * unit-testable without a browser. + */ + +/** Horizontal position of the stem's straight runs. */ +/** + * Default x for a row's anchor, in SVG coordinates. + * + * A fallback only: rows carry their OWN measured `x`, because the tree indents + * with per-row padding rather than one shared origin. A folder's chevron and a + * session's text sit at different x, and no single constant lands on both. + */ +export const STEM_X = 30 + +/** Default vertical pitch between two rows. */ +export const ROW_PITCH = 32 + +/** + * One row the branch must pass through. + * + * Both coordinates are MEASURED, not derived: + * - `y` because the tree mixes row heights and inter-row gaps (deriving one + * pitch from a single gap drifted the dots up to 15px off their rows); + * - `x` because the tree indents per row via padding, so a folder's chevron and + * a session's text are at different x. + */ +export interface BranchRow { + /** Stable key, used to match a row to its dot. */ + readonly key: string + /** Row centre y, in the SVG's coordinate space. */ + readonly y: number + /** + * Row anchor x, in the SVG's coordinate space. + * + * A folder row's anchor is its CHEVRON centre — the triangle the user already + * reads as "this row opens" — so the stem visually hangs off the marker rather + * than floating beside it. A session row's anchor is the indent its text sits + * on. + */ + readonly x: number + /** + * Row kind. A `'group'` row starts a new group and makes the stem kink; + * an `'item'` row runs straight (or curves back in right after a group). + */ + readonly kind: 'group' | 'item' + /** Whether this is the row the user is currently on (the bloomed dot). */ + readonly active: boolean +} + +/** A dot on the branch: one per row, positioned on the curve. */ +export interface BranchDot { + /** The row this dot belongs to. */ + readonly key: string + readonly cx: number + readonly cy: number + readonly active: boolean +} + +/** + * The bloom that flowers at the branch's endpoint. + * + * The endpoint is where the GROWN stroke stops — the row the user is on — not + * the last visible row: the stem is drawn to the active row, so that is where + * the plant has visibly reached, whether the tree is folded above it or not. + * + * This is deliberately the ONE row an active marker names, so the flower can + * never disagree with the stem about where the branch ends. + */ +export interface BranchFlower { + /** Row whose endpoint carries the bloom (the active row's key). */ + readonly key: string + /** Endpoint x: the last dot's centre, i.e. exactly where the grown path stops. */ + readonly cx: number + /** Endpoint y, on the measured row centre. */ + readonly cy: number +} + +/** The branch: one path for the ghost, its total length, and the dots. */ +export interface Branch { + /** Full route, drawn as the faded dashed ghost. */ + readonly ghostPath: string + /** Path up to and including the active row (the "grown" part). */ + readonly grownPath: string + /** Drawn length of the full route. */ + readonly ghostLength: number + /** Drawn length of the grown part. */ + readonly grownLength: number + /** Dots, in row order. */ + readonly dots: readonly BranchDot[] + /** + * Bloom at the grown path's endpoint, or NULL when no row carries the active + * marker. + * + * Deliberately stricter than `grownPath`: the stem has to be *some* path even + * when nothing is active (it collapses to the bare origin, drawing nothing), + * but a bloom with no active row has nothing to be the flower OF. Falling back + * to the first dot — the earlier rule — put the blossom on a folder row at the + * top of the tree as soon as the open session's folder was collapsed, because + * folding removes the only row carrying the marker. No active row means no + * flower. + */ + readonly flower: BranchFlower | null + /** Total vertical extent, so the SVG box can be sized. */ + readonly height: number +} + +/** + * Internal: one move of the route, kept as STRUCTURE rather than only as a path + * string. The endpoint trim below has to shorten the final move along its own + * direction, which is only sound if the segment still knows where it goes. + */ +interface Segment { + /** SVG path command for the full move. */ + readonly d: string + /** Length the move contributes to the run. */ + readonly length: number + /** Where the move starts. */ + readonly from: { readonly x: number; readonly y: number } + /** Where the move ends. */ + readonly to: { readonly x: number; readonly y: number } + /** Bulge x for a curved move (the curve is vertical-tangent at both ends). */ + readonly controlX?: number +} + +/** + * Plan the route: one segment per row after the first, plus the dot positions. + * + * Kept separate from the string assembly so the length walk and the SVG `d` + * always describe the same geometry — measuring one path against another is how + * a grown/ghost pair drifts out of sync. + * + * The stem lands on each row's OWN anchor (x) and centre (y), so uneven row + * heights and the tree's per-row indents both stay exact. A group row's anchor + * is pushed out by `BULGE_OFFSET`, which is what creates the kink. + * + * @param rows - visible rows in render order, carrying measured anchors. + * @returns the per-row segments and dot x positions. + */ +function plan(rows: readonly BranchRow[]): { segments: Segment[]; dotX: number[] } { + const segments: Segment[] = [] + const first = rows[0] as BranchRow + const dotX: number[] = [first.x] + let x = first.x + + for (let i = 1; i < rows.length; i += 1) { + const row = rows[i] as BranchRow + const prev = rows[i - 1] as BranchRow + const startY = prev.y + const endY = row.y + const midY = startY + (endY - startY) / 2 + + // Every dot lands on its OWN anchor; the stem simply travels between them. + // When two consecutive rows share an anchor (sessions under one project) the + // travel is a straight run; when it changes (a folder's chevron sits left of + // its children's dots) the stem swings out through an S-curve, which is what + // reads as the branch stepping around the folder marker. + const target = row.x + + if (target === x) { + segments.push({ + d: `L ${x} ${endY}`, + length: Math.abs(endY - startY), + from: { x, y: startY }, + to: { x, y: endY }, + }) + } else { + // Two halves so the tangent is vertical at both ends, matching the + // reference's curve rhythm. + segments.push({ + d: `C ${x} ${midY}, ${target} ${midY}, ${target} ${endY}`, + length: Math.hypot(target - x, endY - midY), + from: { x, y: startY }, + to: { x: target, y: endY }, + controlX: x, + }) + x = target + } + dotX.push(x) + } + + return { segments, dotX } +} + +/** + * How far short of the flower's centre the stem stops, in SVG user units. + * + * The bloom is drawn ON the endpoint, so a stem that runs all the way to the + * centre is visible through the petal notches and reads as a line crossing the + * flower. Stopping the stroke at (a little over) the bloom's radius keeps the + * stem ending cleanly at the flower's edge, where it reads as a stalk holding + * the bloom. + * + * 7 units ≈ the 6.2-unit flower radius plus a hair, so the stroke's round cap + * tucks just under the outer petals without a visible gap. + */ +export const STEM_END_CLEARANCE = 7 + +/** + * Shorten a move so it stops `clearance` short of its end point. + * + * Used only on the LAST move of the grown run, which is what hides the stroke + * behind the bloom. A straight move is trimmed along its axis; a curved move is + * trimmed by moving its end and its control point together, which shortens the + * curve while keeping its vertical tangents (so the kink's shape is preserved + * rather than being flattened into a line). + * + * Returns the move unchanged when it is too short to trim (the stem would + * invert), so a cramped layout degrades to "line meets flower" rather than + * producing a backwards path. + * + * @param segment - the move to shorten. + * @param clearance - distance to stop short of the end. + * @returns the shortened move. + */ +function trimEnd(segment: Segment, clearance: number): Segment { + const { from, to } = segment + const span = Math.hypot(to.x - from.x, to.y - from.y) + if (span <= clearance) return segment + + if (segment.controlX === undefined) { + // Straight: retreat along the axis by the clearance. + const ratio = (span - clearance) / span + const endX = from.x + (to.x - from.x) * ratio + const endY = from.y + (to.y - from.y) * ratio + return { ...segment, d: `L ${endX} ${endY}`, to: { x: endX, y: endY }, length: span - clearance } + } + + // Curved: the move is two mirrored halves, so retreating the END by half the + // clearance and the control point by the full one shortens it symmetrically + // while keeping both tangents vertical. + const endY = to.y - clearance + const controlY = from.y + (to.y - from.y) / 2 - clearance + const endX = to.x + return { + ...segment, + d: `C ${segment.controlX} ${controlY}, ${endX} ${controlY}, ${endX} ${endY}`, + to: { x: endX, y: endY }, + length: Math.max(0, segment.length - clearance), + } +} + +/** + * Build the branch for a list of rows. + * + * @param rows - visible rows in render order, each carrying its MEASURED centre. + * @returns the branch geometry; empty strings when there are no rows. + */ +export function buildBranch(rows: readonly BranchRow[]): Branch { + const first = rows[0] + if (first === undefined) { + return { ghostPath: '', grownPath: '', ghostLength: 0, grownLength: 0, dots: [], flower: null, height: 0 } + } + + const { segments, dotX } = plan(rows) + const head = `M ${first.x} ${first.y}` + + const dots: BranchDot[] = rows.map((row, index) => ({ + key: row.key, + cx: dotX[index] ?? row.x, + cy: row.y, + active: row.active, + })) + + // The grown stroke stops AT the active row, so its path contains every + // segment before that row and none after. An active first row grows nothing + // beyond the origin, which is correct (the dot sits on the stem origin). + // + // `activeIndex < 0` is the NO-ACTIVE-ROW case: the open session's folder was + // collapsed, or the catalog has not resolved yet. The stem then collapses to + // the bare origin (drawing nothing), and — crucially — `hasActive` stays false + // so no flower is produced. Conflating this with "the first row is active" is + // what used to sprout the blossom on a top-level folder row. + const activeIndex = rows.findIndex(row => row.active) + const hasActive = activeIndex >= 0 + const grownTo = hasActive ? activeIndex : 0 + + // The bloom sits on the endpoint of `grownPath`, which `join` puts at the + // active row. It therefore uses the SAME index as the grown stroke, so the + // flower and the stem can never disagree about where the branch ends — and it + // exists ONLY when a row actually claimed the marker. + const flowerAt = dots[grownTo] as BranchDot | undefined + const flower: BranchFlower | null = hasActive && flowerAt !== undefined + ? { key: flowerAt.key, cx: flowerAt.cx, cy: flowerAt.cy } + : null + + const join = (list: readonly Segment[]): string => + list.length === 0 ? head : [head, ...list.map(s => s.d)].join(' ') + + // The grown run: every move before the active row, plus the move INTO it — + // which is the one trimmed so the stroke stops at the bloom's edge instead of + // crossing the flower. The GHOST keeps its full length: it is a faint dashed + // route at 28% opacity, and shortening it too would leave the last row's + // guide visibly detached from that row. + const grownSegments = segments.slice(0, grownTo) + const lastGrown = grownSegments[grownSegments.length - 1] + const grownStroke = lastGrown === undefined + ? grownSegments + : [...grownSegments.slice(0, -1), trimEnd(lastGrown, STEM_END_CLEARANCE)] + + const lengthOf = (count: number): number => + segments.slice(0, count).reduce((sum, s) => sum + s.length, 0) + + const last = rows[rows.length - 1] as BranchRow + // Half a row height of breathing room below the last dot, so the stem does not + // stop dead on the final row. + const tail = rows.length > 1 ? Math.abs(last.y - (rows[rows.length - 2] as BranchRow).y) / 2 : 0 + + return { + ghostPath: join(segments), + grownPath: join(grownStroke), + ghostLength: lengthOf(segments.length), + // The grown length follows the TRIMMED run, so a consumer measuring the + // stroke (a dash animation, say) stays consistent with what is drawn. + grownLength: Math.max(0, lengthOf(grownTo) - (lastGrown === undefined ? 0 : STEM_END_CLEARANCE)), + dots, + flower, + height: last.y + tail, + } +} diff --git a/src/client/contract.ts b/src/client/contract.ts index 8a06320..b541684 100644 --- a/src/client/contract.ts +++ b/src/client/contract.ts @@ -1,67 +1,129 @@ /** * Registrant-private injected share for the workspace-groups browser entry. * Mirrors the official ui-workspace browser inject (same runtime calls), with - * two differences: no directory-flow hole dependency (Add Workspace is - * self-contained via `pickDirectory`), and no locale-keyed naming collision. + * two differences: the directory-flow hole is kept occupied (`hooks.directoryFlow`) + * because the official entry stays registered behind this one and gates its own + * "Add workspace…" affordance on that hole — Add Workspace itself is + * self-contained via `pickDirectory` — and no locale-keyed naming collision. */ -import type { - PropsHooks, - PropsLocale, - PropsRuntime, - PropsStore, -} from '@deepseek-ai/dsh-client-ui-slots' -// Type-only: pulls the sidebar shell's SlotMap merge (sidebar.workspaces). -import type {} from '@deepseek-ai/dsh-client-ui-sidebar/client' -import type { HostDescriptionSource } from '@deepseek-ai/dsh-client-connection/client' -import type { - SessionId, - SessionSearchResultItem, - WorkspaceId, - WorkspaceView, -} from '@deepseek-ai/dsh-client-runtime/client' -import type { createGroupsViewStore } from './stores.ts' +import type { HostObservable, InjectFace, PropsLocale, PropsRuntime, PropsStore, SnapshotSelectorHook } from '@deepseek-ai/dsh-client-ui-slots'; +// Type-only: merges the sidebar shell's SlotMap row (`sidebar.workspaces`, the +// slot this registrant shadows) and its runtime props. Erased from both the JS +// bundle and the emitted .d.ts, so it must stay a bare `import type {}`. +import type {} from '@deepseek-ai/dsh-client-ui-sidebar/client'; +import type { SessionId } from '@deepseek-ai/dsh-session/types'; +import type { SessionListState, SessionSearchResultItem } from '@deepseek-ai/dsh-api-session-controller/client'; +import type { SessionStatus, SessionStatusSnapshot } from '@deepseek-ai/dsh-client-ui-session/client'; +import type { WorkspaceId, WorkspaceSnapshot, WorkspaceView } from '@deepseek-ai/dsh-api-workspace-controller/client'; +import type { createGroupsViewStore } from './stores.ts'; +import type { SessionTabsInstance, SessionTabsState } from './tab-store.ts'; +/** Services/slots this registrant's props depend on (documentation alias). */ +export type WorkspaceGroupsStoreHandle = ReturnType; /** Injected share (arrives via the register inject factory). */ export type GroupsBrowserInjected = { - /** Start a New Session in a Workspace (reuse-or-create its blank session and open it). */ - startSession: (workspaceId?: WorkspaceId) => void - /** Open a real Session. */ - open: (sessionId: SessionId) => void - /** Search current visible conversation messages. */ - searchSessions: (query: string, signal: AbortSignal) => Promise<{ - items: readonly SessionSearchResultItem[] - hasMore: boolean - }> - /** Maximum number of merged rows rendered for one search. */ - searchResultLimit: number - /** Rename a Session (resolves on host acceptance). */ - renameSession: (sessionId: SessionId, title: string) => Promise - /** Fork a Session at its last completed turn and open the child. */ - forkSession: (sessionId: SessionId) => void - /** Rename a Host Workspace (rejects on name conflict). */ - renameWorkspace: (workspaceId: WorkspaceId, title: string) => Promise - /** Delete only a Host Workspace registration; directory and Session logs remain. */ - deleteWorkspace: (workspaceId: WorkspaceId) => Promise - /** Reorder a Workspace in the durable registry display order (omitted anchor appends). */ - insertWorkspaceBefore: (workspaceId: WorkspaceId, beforeWorkspaceId?: WorkspaceId) => Promise - /** Archive a Session into the registry-global set (hidden from grouping surfaces). */ - archiveSession: (sessionId: SessionId) => Promise - /** Reorder a session inside its Workspace account. */ - insertSessionBefore: (workspaceId: WorkspaceId, sessionId: SessionId, beforeSessionId?: SessionId) => Promise - /** Adopt a picked host directory as a real Workspace before targeting a Session. */ - createWorkspace: (input: { path: string }) => Promise - /** Ask the local Host to open its native single-directory chooser (self-contained Add Workspace). */ - pickDirectory: () => Promise - /** Browser-private injected hooks (host description; bound by the slot renderer). */ - hooks: { - /** Current generation's Host description. */ - hostDescription: HostDescriptionSource - } -} - + /** + * Reserved hooks compartment. `directoryFlow` reports the + * `sidebar.workspaces.directoryFlow` hole as occupied: the official + * ui-workspace entry stays registered behind this one and withdraws its + * "Add workspace…" affordance when the hole is empty, so this browser keeps + * it truthy (it drives the picker itself through `pickDirectory`). + */ + hooks: { + /** True while the sidebar browsing region's directory-flow hole is occupied. */ + directoryFlow: HostObservable; + }; + /** Start a New Session in a Workspace (reuse-or-create its blank session and open it). */ + startSession: (workspaceId?: WorkspaceId) => void; + /** Open a real Session. */ + open: (sessionId: SessionId) => void; + /** Search current visible conversation messages. */ + searchSessions: (query: string, signal: AbortSignal) => Promise<{ + items: readonly SessionSearchResultItem[]; + hasMore: boolean; + }>; + /** Maximum number of merged rows rendered for one search. */ + searchResultLimit: number; + /** Rename a Session (resolves on host acceptance). */ + renameSession: (sessionId: SessionId, title: string) => Promise; + /** Fork a Session at its last completed turn and open the child. */ + forkSession: (sessionId: SessionId) => void; + /** Rename a Host Workspace (rejects on name conflict). */ + renameWorkspace: (workspaceId: WorkspaceId, title: string) => Promise; + /** Delete only a Host Workspace registration; directory and Session logs remain. */ + deleteWorkspace: (workspaceId: WorkspaceId) => Promise; + /** Reorder a Workspace in the durable registry display order (omitted anchor appends). */ + insertWorkspaceBefore: (workspaceId: WorkspaceId, beforeWorkspaceId?: WorkspaceId) => Promise; + /** Archive a Session into the registry-global set (hidden from grouping surfaces). */ + archiveSession: (sessionId: SessionId) => Promise; + /** Reorder a session inside its Workspace account. */ + insertSessionBefore: (workspaceId: WorkspaceId, sessionId: SessionId, beforeSessionId?: SessionId) => Promise; + /** Adopt a picked host directory as a real Workspace before targeting a Session. */ + createWorkspace: (input: { + path: string; + }) => Promise; + /** Ask the local Host to open its native single-directory chooser (self-contained Add Workspace). */ + pickDirectory: () => Promise; + /** + * Surface the session-tab strip for a session that is in play (called with the + * session the browser itself just opened, and again whenever its status + * changes). Tab visibility rules live in `shouldOpenTab`; the status is passed + * in because "it started working" is a live-status fact the store layer cannot + * read on its own. + * @param sessionId - the session to consider. + * @param status - its unified UI status, when one is published. + */ + openTab: (sessionId: SessionId, status: SessionStatus | undefined) => void; + /** + * Selector hook over the shared tab store, bound by this plugin (the strip is + * not a slot occupant, so the framework does not bind it). Built from the one + * live instance the browser writes through. + */ + useTabs: (selector: (state: SessionTabsState) => S, eq?: (a: S, b: S) => boolean) => S; + /** The tab store's baked write set (the same one `apply` writes through). */ + tabActions: SessionTabsInstance['actions']; +}; /** Full browser props: shell owner share + viewing store + injected actions + locale seat. */ -export type GroupsBrowserProps = PropsRuntime<'sidebar.workspaces'> & - PropsStore> & - Omit & - PropsHooks & - PropsLocale<'workspaceGroups'> +export type GroupsBrowserProps = PropsRuntime<'sidebar.workspaces'> & PropsStore> & InjectFace & PropsLocale<'workspaceGroups'>; +/** + * The two framework global seats the strip reads, declared structurally because + * `GlobalStandardProps`'s own members arrive from merge declarations this repo + * cannot resolve (its packages ship no `src`, so the merged hook types are only + * visible to the compiling package). Both are the shipped global selector hooks + * with the same names and shapes, and both are seated on the + * `sidebar.workspaces` occupant that renders this strip. + */ +export interface SessionsTabsStandardProps { + /** Session list and current selection (framework global seat). */ + useSessions: SnapshotSelectorHook; + /** Unified per-session UI status (framework global seat). */ + useSessionStatus: SnapshotSelectorHook; + /** + * Workspace registry (framework global seat). The strip reads it to label each + * tab with the project that owns its session — the one fact a bare strip of + * session titles cannot convey. + */ + useWorkspaces: SnapshotSelectorHook; +} +/** + * Full tab-strip props. + * + * The strip is NOT a slot occupant: the conversation column declares no child + * slot, so it renders through a DOM seat (`tab-seat.ts`) and receives plain + * React props instead of framework shares. Only the two global selector hooks + * below are framework-provided, and they arrive because the strip is rendered + * as a CHILD of this plugin's own `sidebar.workspaces` occupant — which seats + * both of them in the standard kit. Everything else is passed explicitly by + * that parent, which is what removes the strip from the slot registry entirely + * and with it the cross-scope store conflict the slot version hit. + */ +export type SessionsTabsProps = SessionsTabsStandardProps & { + /** Selector hook over the shared tab store's snapshot. */ + useTabs: SnapshotSelectorHook; + /** The tab store's baked write set (the same set `apply` writes through). */ + actions: SessionTabsInstance['actions']; + /** Make a tab's session the open one (`ctx.uiWorkspace.openSession`). */ + activate: (sessionId: SessionId) => void; + /** Ask the browser to open its rename dialog for a tab session. */ + rename: (sessionId: SessionId, currentTitle: string) => void; +} & PropsLocale<'workspaceGroups'>; diff --git a/src/client/index.ts b/src/client/index.ts index 86bc80b..e0c4b7e 100644 --- a/src/client/index.ts +++ b/src/client/index.ts @@ -1,24 +1,62 @@ /** - * dsh-workspace-groups client half: registers the three-level grouped - * workspace browser into the `sidebar.workspaces` slot, shadowing the - * official ui-workspace browser. + * @dsh-xhl/workspace-groups client half. ONE registration, plus a DOM-seated + * view that hangs off it: * - * Shadowing mechanics (SlotCore semantics): - * - `sidebar.workspaces` is a `single`/`root` slot. The official browser - * registers at priority 0; this entry registers at priority -1, and the - * single-cell shadow rule makes the LOWEST priority the winner — the - * sidebar renders this browser instead of the official one. - * - This entry deliberately declares NO child slots: the official entry - * already declared `sidebar.workspaces.directoryFlow` (a second declaration - * of an occupied child key throws). Add Workspace is therefore self- - * contained — `ctx.workspaces.pickDirectory()` + `create()`, no hole. + * The three-level grouped workspace browser into `sidebar.workspaces`, + * shadowing the official ui-workspace browser. + * + * Shadowing mechanics (SlotCore semantics): + * - `sidebar.workspaces` is a `single`/`root` slot. The official browser + * registers at priority 0; this entry registers at priority -1, and the + * single-cell shadow rule makes the LOWEST priority the winner — the + * sidebar renders this browser instead of the official one. + * - This entry deliberately declares NO child slots: the official entry + * already declared `sidebar.workspaces.directoryFlow` (a second declaration + * of an occupied child key throws). Add Workspace is therefore self- + * contained — the shared navigation service + `workspaces.create()`, no + * hole. + * + * The session tab strip is NOT a second registration. It renders into a DOM + * seat at the head of the conversation column (`pI_x6G_centerCol`) because that + * column declares no child slot — its only child is the `main` slot's occupant + * — so there is nowhere to register. See `tab-seat.ts` for the injection and + * `SessionTabs.tsx` for the portal. + * + * Two consequences of that choice, both deliberate: + * - The strip is a CHILD of this entry's component, so it inherits this + * fiber's frame; it needs no injected seam, no cross-entry callback set, + * and the rename dialog stays owned by one place. + * - The tab store is seated by exactly ONE entry. Registering one handle + * under a second, differently-scoped slot throws inside the registry + * ("one handle, one scope") and would abort this whole `apply()` — which + * is precisely why the strip does not occupy a slot. + * + * 0.1.6 适配:导航(选中会话 / New Session / fork / archive / 目录选择)从 + * `ctx.sessions` 抽到 ui-workspace 提供的 `ctx.uiWorkspace` 服务 + * (`ISessions` 现在只有目录 / retain / search 能力,选中由 `mainView` 保留位 + * 表达)。本插件不再自建 connectWorkspace/recentWorkspace 语义,全部委托给该 + * 服务,只保留改名、删除、排序、搜索等数据动作。 */ -import type { ClientContext } from '@deepseek-ai/dsh-client-runtime/client' -import type { ConnectionHandle } from '@deepseek-ai/dsh-client-connection/client' -// Type-only: pulls the locale plugin's Context merge (ctx.locale). +import type { Context } from '@deepseek-ai/cordis' +// Type-only service merges: sessions/workspaces controllers, the ui-workspace +// navigation service face (ctx.uiWorkspace), locale dictionary seat, the +// SlotRegistry, and the sidebar SlotMap. +import type {} from '@deepseek-ai/dsh-api-session-controller/client' +import type {} from '@deepseek-ai/dsh-api-workspace-controller/client' import type {} from '@deepseek-ai/dsh-client-locale/client' +import type {} from '@deepseek-ai/dsh-client-ui-renderer/client' +import type {} from '@deepseek-ai/dsh-client-ui-workspace/client' +import type { SnapshotSelectorHook } from '@deepseek-ai/dsh-client-ui-slots' +// `useWorkspaces` is contributed by the ui-workspace browser domain (same +// declaration as the official ui-workspace client half). +import type { WorkspaceSnapshot } from '@deepseek-ai/dsh-api-workspace-controller/client' +import type { SessionId } from '@deepseek-ai/dsh-session/types' import type { GroupsBrowserInjected } from './contract.ts' import { createGroupsViewStore } from './stores.ts' +import { createSessionTabsStore } from './tab-store.ts' +import { loadTabs, saveTabs } from './tab-persist.ts' +import { createStoreHook } from './store-hook.ts' +import { shouldOpenTab, type TabOpenMode } from './tabs.ts' import { GroupsBrowser } from './GroupsBrowser.tsx' import { en, zh, type WorkspaceGroupsKey } from './locales.ts' @@ -27,13 +65,28 @@ declare module '@deepseek-ai/dsh-client-ui-slots' { /** The workspace-groups browsing region copy. */ workspaceGroups: WorkspaceGroupsKey } + + interface GlobalStandardProps { + /** Selector hook over the pure Workspace Controller snapshot. */ + useWorkspaces: SnapshotSelectorHook + } } /** Dictionary namespace owned by this plugin. */ const NS = 'workspaceGroups' -/** Required services (cordis fiber inject). */ -export const inject = ['slots', 'sessions', 'workspaces', 'locale', 'connection'] +/** + * Tab visibility policy. `auto` is the behaviour the feature was asked for — + * opening a session that has no tab yet adds one at the front of the strip; + * `manual` leaves the strip to callers that drive `openTab` themselves. + */ +const TAB_OPEN_MODE: TabOpenMode = 'auto' + +/** + * Required services (cordis fiber inject; 0.1.6 service roster). `uiWorkspace` + * is the shipped navigation face this entry delegates selection to. + */ +export const inject = ['slots', 'sessions', 'workspaces', 'uiWorkspace', 'locale'] /** * Register the grouped browser once the sidebar slot declaration is on the @@ -41,8 +94,61 @@ export const inject = ['slots', 'sessions', 'workspaces', 'locale', 'connection' * framework's global hooks. * @param ctx - client root context. */ -export function apply(ctx: ClientContext): void { - ctx.effect(() => ctx.locale.register(NS, { zh, en }), 'dsh-workspace-groups: dictionaries') +export function apply(ctx: Context): void { + ctx.effect(() => ctx.locale.register(NS, { zh, en }), '@dsh-xhl/workspace-groups: dictionaries') + + // ONE store, ONE scope. The tab store is seated only by the + // `sidebar.workspaces` entry below (scope root); the strip reads it as a + // plain prop because it renders as a CHILD of that entry through a DOM + // portal, not as a second slot occupant. Seating the same handle under a + // session-scoped slot as well throws inside the registry + // (one handle, one scope) and would abort this whole apply(). + const tabsStore = createSessionTabsStore() + const tabInstance = tabsStore.create() + const tabWrites = tabInstance.actions + + // Persist the strip on the HOST, not in browser storage: the origin includes + // the port and every launch picks a new one, so localStorage/sessionStorage + // both start empty next time. + // + // Writes are GATED until the initial restore has settled. The store starts + // empty and the browser's own effects run before the host read resolves, so an + // ungated subscriber would write that empty state over the stored tabs — + // erasing exactly what it was supposed to restore. `hydrated` is the latch. + let hydrated = false + ctx.effect(() => { + const stop = tabInstance.subscribe(() => { + if (!hydrated) return + void saveTabs({ + order: tabInstance.getSnapshot().order, + tabs: tabInstance.getSnapshot().tabs, + }) + }) + return () => { stop() } + }, '@dsh-xhl/workspace-groups: tab persistence') + + // Hydrate once from the host, then open the write gate. + // + // `restore` is a no-op if the user already opened a tab while this was in + // flight, so a slow response cannot discard live work. The settle deliberately + // does NOT write: writing the strip here would erase the stored tabs whenever + // the read came back empty for a transient reason (host still booting, a + // dropped request). Only a real state CHANGE persists, via the subscriber. + ctx.effect(() => { + let cancelled = false + void loadTabs().then((tabs) => { + if (cancelled) return + if (tabs.length > 0) { + tabWrites.restore(tabs.map(tab => ({ sessionId: tab.sessionId as SessionId, order: tab.order }))) + } + hydrated = true + }).catch(() => { + // The read failed; leave the gate open so the user's own actions persist, + // but never write on the strength of a failed read. + if (!cancelled) hydrated = true + }) + return () => { cancelled = true } + }, '@dsh-xhl/workspace-groups: tab restore') const searchSessions: GroupsBrowserInjected['searchSessions'] = async (query, signal) => { const result = await ctx.sessions.search(query, signal) @@ -51,40 +157,82 @@ export function apply(ctx: ClientContext): void { } const browserInjected = (): GroupsBrowserInjected => ({ - startSession: (workspaceId) => { ctx.workspaces.startSession(workspaceId) }, - open: (sessionId) => { ctx.sessions.open(sessionId) }, + // Navigation verbs belong to the shipped ui-workspace service: it owns the + // retained `mainView` selection, supersession and pending-navigation + // cancellation (0.1.6 moved them out of `ctx.sessions`). + startSession: (workspaceId) => { ctx.uiWorkspace.startSession(workspaceId) }, + open: (sessionId) => { ctx.uiWorkspace.openSession(sessionId) }, + forkSession: (sessionId) => { + ctx.uiWorkspace.forkSession(sessionId).catch((reason: unknown) => { + console.warn('fork session failed:', reason) + }) + }, + archiveSession: async (sessionId) => { + await ctx.uiWorkspace.archiveSession(sessionId) + // The tab is deliberately LEFT ALONE. Archiving hides the session from the + // grouped surfaces, but a tab is something the user opened, and the rule + // for this strip is that only they close one — an automatic close here + // would silently drop work they were keeping an eye on. The chip keeps + // rendering (falling back to the session id when the title no longer + // resolves). + }, + pickDirectory: () => ctx.uiWorkspace.pickDirectory(), searchSessions, searchResultLimit: ctx.sessions.searchResultLimit, + // Directory-flow hole occupancy. The official ui-workspace browser gates + // its "Add workspace…" affordance on the hole being occupied (the shipped + // picker package's client half fills it); this browser drives the picker + // itself through `pickDirectory`, so it must keep the hole occupied or the + // official entry (still live at priority 0) would silently withdraw the + // affordance. + hooks: { + directoryFlow: { + getSnapshot: () => true, + subscribe: () => () => {}, + }, + }, + // Data-only verbs stay on the controllers. renameSession: async (sessionId, title) => { const session = ctx.sessions.binding(sessionId)?.session if (session === undefined) throw new Error(`unknown session "${sessionId}"`) const result = await session.rename(title) if (!result.ok) throw new Error(result.error.message) }, - forkSession: (sessionId) => { - ctx.sessions.fork({ sessionId, increaseTitle: true }) - .then((childId) => { ctx.sessions.open(childId) }) - .catch(() => {}) - }, renameWorkspace: async (workspaceId, title) => { await ctx.workspaces.rename(workspaceId, title) }, deleteWorkspace: async (workspaceId) => { await ctx.workspaces.delete(workspaceId) }, insertWorkspaceBefore: async (workspaceId, beforeWorkspaceId) => { await ctx.workspaces.insertBefore(workspaceId, beforeWorkspaceId) }, - archiveSession: async (sessionId) => { await ctx.workspaces.archiveSession(sessionId) }, insertSessionBefore: async (workspaceId, sessionId, beforeSessionId) => { await ctx.workspaces.insertSessionBefore(workspaceId, sessionId, beforeSessionId) }, createWorkspace: input => ctx.workspaces.create(input), - pickDirectory: () => ctx.workspaces.pickDirectory(), - hooks: { - hostDescription: (ctx.get('connection') as ConnectionHandle).hostDescription, + // "Show a tab for what I just opened" — but only while it is actually in + // play. The browser decides per session (see `shouldOpenTab`): a draft that + // has not been talked to, and settled history, both stay out of the strip. + // The status arrives from the caller because it is a live UI fact read + // through a hook, which this (non-React) factory cannot reach. + openTab: (sessionId, status) => { + const summary = ctx.sessions.list.getSnapshot().byId[sessionId] + if (shouldOpenTab(TAB_OPEN_MODE, summary, status)) tabWrites.touch(sessionId) }, + // The strip rides this entry's own store seat, so it needs both faces + // explicitly: a selector hook over the one live instance, and the baked + // writes. Both come from the same instance the browser writes through. + useTabs: createStoreHook(tabInstance), + tabActions: tabWrites, }) // priority: -1 — lower than the official browser's default 0, so the // single-slot shadow rule elects this entry. No children declaration: the // official entry already owns `sidebar.workspaces.directoryFlow`. + // + // The official WorkspaceBrowser entry is NEVER disposed — shadowing only + // changes which entry renders (activation just bumps the store's mount + // count). Both entries live at the same cell, so if this one ever throws + // during render the slot core retires it for the rest of its registration's + // life and silently falls back to the official browser. Anything that can + // throw belongs outside the hot path. ctx.slots.inject('sidebar.workspaces', () => ctx.slots.register( { name: 'sidebar.workspaces', @@ -92,7 +240,7 @@ export function apply(ctx: ClientContext): void { store: createGroupsViewStore(), inject: browserInjected, locale: NS, - registrant: 'dsh-workspace-groups', + registrant: '@dsh-xhl/workspace-groups', }, GroupsBrowser, )) diff --git a/src/client/locales.ts b/src/client/locales.ts index 4d17536..316b826 100644 --- a/src/client/locales.ts +++ b/src/client/locales.ts @@ -32,6 +32,8 @@ export type WorkspaceGroupsKey = | 'workspace.renameConfirm' | 'workspace.renameCancel' | 'workspace.moveOutOfGroup' + | 'workspace.openInFolder' + | 'workspace.openInFolderError' | 'group.create' | 'group.createTitle' | 'group.createPlaceholder' @@ -68,6 +70,21 @@ export type WorkspaceGroupsKey = | 'collapse' | 'expandMore' | 'newSession' + | 'quick.title' + | 'quick.tab.workspaces' + | 'quick.tab.sessions' + | 'quick.search.placeholder' + | 'quick.search.sessions' + | 'quick.empty.workspaces' + | 'quick.action.newSession' + | 'quick.action.running' + | 'quick.action.noneRunning' + | 'quick.empty.sessions' + | 'quick.select.hint' + | 'quick.hint' + | 'tabs.aria' + | 'tabs.close' + | 'tabs.archive' export type WorkspaceGroupsDict = LocaleDictOf<'workspaceGroups'> @@ -99,6 +116,8 @@ export const zh: WorkspaceGroupsDict = { 'workspace.renameConfirm': '重命名', 'workspace.renameCancel': '取消', 'workspace.moveOutOfGroup': '移出分组', + 'workspace.openInFolder': '在文件夹中打开', + 'workspace.openInFolderError': '打开文件夹失败', 'group.create': '新建分组', 'group.createTitle': '新建分组', 'group.createPlaceholder': '分组名称', @@ -135,6 +154,21 @@ export const zh: WorkspaceGroupsDict = { collapse: '折叠', expandMore: '展开全部', newSession: '新建会话', + 'quick.title': '快速切换', + 'quick.tab.workspaces': '工作区', + 'quick.tab.sessions': '全部会话', + 'quick.search.placeholder': '搜索工作区…', + 'quick.search.sessions': '搜索会话…', + 'quick.empty.workspaces': '没有匹配的工作区', + 'quick.action.newSession': '新建会话', + 'quick.action.running': '切到运行中的会话', + 'quick.action.noneRunning': '没有正在运行的会话', + 'quick.empty.sessions': '还没有会话', + 'quick.select.hint': '在上方选择一个工作区', + 'quick.hint': 'Ctrl+R 开关 · Enter 打开/新建 · Esc 关闭', + 'tabs.aria': '已打开的会话', + 'tabs.close': '关闭标签', + 'tabs.archive': '归档', } /** English dictionary. */ @@ -165,6 +199,8 @@ export const en: WorkspaceGroupsDict = { 'workspace.renameConfirm': 'Rename', 'workspace.renameCancel': 'Cancel', 'workspace.moveOutOfGroup': 'Move out of group', + 'workspace.openInFolder': 'Open in folder', + 'workspace.openInFolderError': 'Could not open the folder', 'group.create': 'New group', 'group.createTitle': 'New group', 'group.createPlaceholder': 'Group name', @@ -201,4 +237,19 @@ export const en: WorkspaceGroupsDict = { collapse: 'Collapse', expandMore: 'Show all', newSession: 'New Session', + 'quick.title': 'Quick switch', + 'quick.tab.workspaces': 'Workspaces', + 'quick.tab.sessions': 'All sessions', + 'quick.search.placeholder': 'Search workspaces…', + 'quick.search.sessions': 'Search sessions…', + 'quick.empty.workspaces': 'No matching workspaces', + 'quick.action.newSession': 'New Session', + 'quick.action.running': 'Switch to running session', + 'quick.action.noneRunning': 'No running session', + 'quick.empty.sessions': 'No sessions yet', + 'quick.select.hint': 'Pick a workspace above', + 'quick.hint': 'Ctrl+R toggle · Enter open/new · Esc close', + 'tabs.aria': 'Open sessions', + 'tabs.close': 'Close tab', + 'tabs.archive': 'Archive', } diff --git a/src/client/open-folder.ts b/src/client/open-folder.ts new file mode 100644 index 0000000..e216506 --- /dev/null +++ b/src/client/open-folder.ts @@ -0,0 +1,79 @@ +/** + * Transport for the official open-in-app host routes served by + * `@deepseek-ai/dsh-host-open-in-app`. The project row offers "open this + * project's folder" by asking that host half for the applications it verified + * as installed, then POSTing the launcher it already resolved — this plugin + * never probes or spawns a launcher itself, and a host without the capability + * (no resolved application, e.g. an SSH launch) simply yields no menu entry. + */ + +/** GET route serving the probed application ids (host-owned constant). */ +export const OPEN_IN_APP_APPS_ROUTE = '/open-in-app/apps' + +/** POST route launching one resolved application on one absolute directory. */ +export const OPEN_IN_APP_OPEN_ROUTE = '/open-in-app/open' + +/** + * Catalog ids that open a directory in the platform file manager, most + * specific first (the official catalog names one per platform: `explorer` on + * Windows, `finder` on macOS, `filemanager` on Linux). + */ +const FOLDER_APP_IDS = ['explorer', 'finder', 'filemanager'] as const + +/** + * The installed file-manager id for this host, or undefined when the host + * resolved none (the row then offers no "open in folder" entry). + * @param apps - installed catalog ids from the apps route. + * @returns the preferred available id. + */ +export function folderAppId(apps: readonly string[]): string | undefined { + for (const id of FOLDER_APP_IDS) { + if (apps.includes(id)) return id + } + return undefined +} + +/** + * Resolve the browser's Host base with the connection carrier's null-origin + * fallback (same rule the official button uses): a sandboxed document reports + * the literal origin "null", which cannot address the host. + * @returns the absolute base URL of the current Host. + */ +function hostBase(): string { + const origin = globalThis.location?.origin + return origin !== undefined && origin !== 'null' ? origin : 'http://dsh.internal' +} + +/** + * Read the host's installed-application ids. A host without the capability + * (or one that refuses) reads as an empty list rather than an error, so the + * caller can treat "no apps" and "no route" identically. + * @param signal - aborts the read when the browser half unmounts. + * @returns installed catalog ids, in host menu order. + */ +export async function fetchOpenInApps(signal?: AbortSignal): Promise { + const response = await fetch(new URL(OPEN_IN_APP_APPS_ROUTE, hostBase()), { + headers: { accept: 'application/json' }, + cache: 'no-store', + ...(signal === undefined ? {} : { signal }), + }) + if (!response.ok) throw new Error(`open-in-app apps request failed: ${response.status}`) + const payload: unknown = await response.json() + const apps = (payload as { apps?: unknown }).apps + return Array.isArray(apps) ? apps.filter((id): id is string => typeof id === 'string') : [] +} + +/** + * Launch one installed application on one absolute directory. + * @param appId - catalog id from the apps route. + * @param path - the project's absolute directory. + * @returns after the host acknowledged the launch; rejects on any refusal. + */ +export async function openPathInApp(appId: string, path: string): Promise { + const response = await fetch(new URL(OPEN_IN_APP_OPEN_ROUTE, hostBase()), { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ app: appId, path }), + }) + if (!response.ok) throw new Error(`open-in-app launch failed: ${response.status}`) +} diff --git a/src/client/quick.ts b/src/client/quick.ts new file mode 100644 index 0000000..b3abdea --- /dev/null +++ b/src/client/quick.ts @@ -0,0 +1,186 @@ +/** + * Pure data shaping for the Ctrl+R quick switch panel. Runtime-free (same + * discipline as store-core.ts): unit tests exercise the real semantics + * without a browser module loader; the panel only binds them to the + * framework's global hooks. + */ +import type { SessionId } from '@deepseek-ai/dsh-session/types' +import type { SessionListState, SessionSummary } from '@deepseek-ai/dsh-api-session-controller/client' +import type { WorkspaceView } from '@deepseek-ai/dsh-api-workspace-controller/client' + +/** A session row eligible for quick switching: running, top-level, real. */ +function quickEligible(summary: SessionSummary): boolean { + return summary.running === true && summary.origin !== 'subagent' && !summary.blank +} + +/** + * Running quick-switchable sessions across the whole list, newest first. + * @param list - sessions list snapshot. + * @param archived - registry-global archive set (archived rows never surface). + * @returns running summaries in recency order (id as deterministic tiebreak). + */ +export function runningSessions(list: SessionListState, archived: ReadonlySet): SessionSummary[] { + const out: SessionSummary[] = [] + for (const id of list.ids) { + if (archived.has(id)) continue + const summary = list.byId[id] + if (summary !== undefined && quickEligible(summary)) out.push(summary) + } + out.sort((a, b) => (b.updatedAt !== a.updatedAt ? b.updatedAt - a.updatedAt : (a.id < b.id ? -1 : 1))) + return out +} + +/** + * Every quick-switchable session across the whole list — the sessions tab's + * data: running rows pinned on top, everything else under them, both groups + * newest first. Visibility mirrors the tree (subagent rows never; archived + * never; a blank row only while it is the open session). + * @param list - sessions list snapshot. + * @param archived - registry-global archive set (archived rows never surface). + * @param current - the selected session (`mainView` retention; keeps its blank row visible). + * @returns summaries with running first, then recency (id as deterministic tiebreak). + */ +export function allSessions( + list: SessionListState, + archived: ReadonlySet, + current: SessionId | undefined, +): SessionSummary[] { + const out: SessionSummary[] = [] + for (const id of list.ids) { + if (archived.has(id)) continue + const summary = list.byId[id] + if (summary === undefined) continue + if (summary.origin === 'subagent') continue + if (summary.blank && summary.id !== current) continue + out.push(summary) + } + out.sort((a, b) => { + if (a.running !== b.running) return a.running ? -1 : 1 + return b.updatedAt !== a.updatedAt ? b.updatedAt - a.updatedAt : (a.id < b.id ? -1 : 1) + }) + return out +} + +/** + * Session search for the quick panel: display-title or owning-workspace-title + * substring match (trimmed, case-insensitive). Filters only — the incoming + * running-first/recency order is preserved verbatim, so "running on top" + * survives any query. + * @param sessions - allSessions() output (running pinned on top, then recency). + * @param query - raw query. + * @param workspaceTitleOf - owning workspace title resolver (sub-line source). + * @param limit - hard render cap. + * @returns matching sessions in the given order. + */ +export function filterSessions( + sessions: readonly SessionSummary[], + query: string, + workspaceTitleOf: (session: SessionSummary) => string | undefined, + limit = 200, +): SessionSummary[] { + const q = query.trim().toLowerCase() + if (q === '') return sessions.slice(0, limit) + const out: SessionSummary[] = [] + for (const session of sessions) { + const workspace = workspaceTitleOf(session)?.toLowerCase() ?? '' + if (session.displayTitle.toLowerCase().includes(q) || workspace.includes(q)) out.push(session) + } + return out.slice(0, limit) +} + +/** + * Most recently updated running session inside one workspace. + * @param list - sessions list snapshot. + * @param workspace - target workspace (its session account order is irrelevant; + * recency picks the row). + * @returns the session id, or undefined when nothing in the workspace runs. + */ +export function latestRunningInWorkspace(list: SessionListState, workspace: WorkspaceView): SessionId | undefined { + let best: SessionId | undefined + let bestTime = Number.NEGATIVE_INFINITY + for (const id of workspace.sessionIds) { + const summary = list.byId[id] + if (summary === undefined || !quickEligible(summary)) continue + if (summary.updatedAt > bestTime) { + best = summary.id + bestTime = summary.updatedAt + } + } + return best +} + +/** + * Running-session count per workspace id (badge on the workspace tab rows). + * @param running - runningSessions() output. + * @param workspaces - real workspaces in stable Host order. + * @returns counts keyed by workspace id; absent key = none running. + */ +export function runningCountByWorkspace( + running: readonly SessionSummary[], + workspaces: readonly WorkspaceView[], +): Map { + const counts = new Map() + if (running.length === 0) return counts + const runningIds = new Set(running.map(s => s.id)) + for (const workspace of workspaces) { + let count = 0 + for (const sessionId of workspace.sessionIds) { + if (runningIds.has(sessionId)) count += 1 + } + if (count > 0) counts.set(workspace.workspaceId as string, count) + } + return counts +} + +/** + * The workspace that owns the currently open session. + * @param workspaces - real workspaces in stable Host order. + * @param currentSessionId - the selected session (`mainView` retention); may be undefined + * (no session open, cleared selection) or an id no listed workspace holds + * (e.g. an addressed subagent session). + * @returns the workspace id, or undefined when there is no active workspace. + */ +export function activeWorkspaceId( + workspaces: readonly WorkspaceView[], + currentSessionId: SessionId | undefined, +): string | undefined { + if (currentSessionId === undefined) return undefined + const workspace = workspaces.find(w => w.sessionIds.includes(currentSessionId)) + return workspace?.workspaceId as string | undefined +} + +/** + * Workspace search for the quick panel: title prefix → title substring → + * category label substring → path substring; ties keep host order via a + * stable title compare inside one rank. + * @param workspaces - real workspaces in stable Host order. + * @param query - raw query (trimmed, case-insensitive). + * @param categoryLabelOf - category label resolver (grouped workspaces only). + * @param limit - hard render cap. + * @returns ranked matches; an empty query returns host order. + */ +export function filterWorkspaces( + workspaces: readonly WorkspaceView[], + query: string, + categoryLabelOf?: (workspace: WorkspaceView) => string | undefined, + limit = 50, +): WorkspaceView[] { + const q = query.trim().toLowerCase() + if (q === '') return workspaces.slice(0, limit) + const scored: { workspace: WorkspaceView; score: number }[] = [] + for (const workspace of workspaces) { + const title = workspace.title.toLowerCase() + const path = workspace.path.toLowerCase() + const category = (categoryLabelOf?.(workspace) ?? '').toLowerCase() + let score: number | undefined + if (title.startsWith(q)) score = 0 + else if (title.includes(q)) score = 1 + else if (category !== '' && category.includes(q)) score = 2 + else if (path.includes(q)) score = 3 + if (score !== undefined) scored.push({ workspace, score }) + } + scored.sort((a, b) => (a.score !== b.score + ? a.score - b.score + : a.workspace.title.localeCompare(b.workspace.title))) + return scored.slice(0, limit).map(entry => entry.workspace) +} diff --git a/src/client/rows.tsx b/src/client/rows.tsx index 3f74d80..cb346a2 100644 --- a/src/client/rows.tsx +++ b/src/client/rows.tsx @@ -8,19 +8,20 @@ * workspace rows, standing for their containing category) are drop targets. * The payload is a custom dataTransfer type so only in-plugin drags land. */ -import { useState, type DragEvent } from 'react' +import { useState, type DragEvent, type ReactNode } from 'react' import { - IconArchiveOutline20, - IconBranchOutline16, - IconEditOutline16, - IconEllipsisOutline16, - IconFolderClose16, - IconFolderOpen16, - IconFolderOpenOutline16, - IconPlusOutline16, - IconProjectAddOutline16, - IconTriangleRightFill14, - IconTrashOutline16, + IconArchiveOutlineRegular, + IconBranchOutlineRegular, + IconEditOutlineRegular, + IconEllipsisOutlineRegular, + IconFolderCloseMedium, + IconFolderOpenMedium, + IconFolderOpenOutlineRegular, + IconPlusOutlineRegular, + IconProjectAddOutlineRegular, + IconRightUpOutlineRegular, + IconTriangleRightFillMedium, + IconTrashOutlineRegular, Menu, StateDot, type StateDotState, @@ -114,6 +115,12 @@ export function CategoryRow({ node, t, onToggle, onRename, onDelete, dropActive aria-expanded={node.expanded} aria-label={t('section.workspaces')} data-wg-category={node.key} + /* Flower-branch hooks: a category row starts a group, so the stem kinks + here. Deliberately NOT marked active even when it contains the open + session — the session row below it carries that marker, and only one + row may claim it (see BRANCH_ACTIVE_ATTRIBUTE). */ + data-wg-branch-row="" + data-wg-branch-group="" draggable={onDragStartCategory !== undefined} onClick={onToggle} onDragStart={onDragStartCategory} @@ -122,10 +129,10 @@ export function CategoryRow({ node, t, onToggle, onRename, onDelete, dropActive onDrop={onRowDrop} > - + - {node.expanded ? : } + {node.expanded ? : } {node.label} {count} @@ -135,8 +142,8 @@ export function CategoryRow({ node, t, onToggle, onRename, onDelete, dropActive open={menuOpen} onClose={() => { setMenuOpen(false) }} items={[ - { id: 'rename', label: t('group.rename'), icon: }, - { id: 'delete', label: t('group.delete'), icon: , danger: true }, + { id: 'rename', label: t('group.rename'), icon: }, + { id: 'delete', label: t('group.delete'), icon: , danger: true }, ]} onSelect={(id) => { setMenuOpen(false) @@ -153,7 +160,7 @@ export function CategoryRow({ node, t, onToggle, onRename, onDelete, dropActive aria-label={`${t('group.rename')} ${node.label}`} onClick={(e) => { e.stopPropagation(); setMenuOpen(v => !v) }} > - + )} /> @@ -164,7 +171,7 @@ export function CategoryRow({ node, t, onToggle, onRename, onDelete, dropActive } /** One workspace folder row inside a category: draggable source + drop target. */ -export function WorkspaceRow({ node, t, onToggle, onNewSession, onRename, onDelete, canMoveOut = false, onMoveOut, flat = false, dropActive = false, insertLine, onRowDragOver, onRowDragLeave, onRowDrop, onDragStartExtra }: { +export function WorkspaceRow({ node, t, onToggle, onNewSession, onRename, onDelete, canMoveOut = false, onMoveOut, onOpenInFolder, flat = false, dropActive = false, insertLine, onRowDragOver, onRowDragLeave, onRowDrop, onDragStartExtra }: { node: WorkspaceGroupNode t: T onToggle: () => void @@ -174,6 +181,12 @@ export function WorkspaceRow({ node, t, onToggle, onNewSession, onRename, onDele /** Project currently sits inside a group — offer "move out of group". */ canMoveOut?: boolean onMoveOut?: () => void + /** + * Open the project directory in the host's file manager. Omitted when the + * host resolved no folder application (no capability, or a remote launch), + * which keeps the entry out of the menu entirely. + */ + onOpenInFolder?: () => void /** Render as a top-level row (no folder indentation). */ flat?: boolean /** Extra dragstart hook (e.g. collapse all expanded projects while dragging). */ @@ -181,11 +194,14 @@ export function WorkspaceRow({ node, t, onToggle, onNewSession, onRename, onDele } & RowDropProps) { const [menuOpen, setMenuOpen] = useState(false) const menuItems = [ - ...(canMoveOut && onMoveOut !== undefined - ? [{ id: 'moveOut', label: t('workspace.moveOutOfGroup'), icon: }] + ...(onOpenInFolder !== undefined + ? [{ id: 'openInFolder', label: t('workspace.openInFolder'), icon: }] : []), - { id: 'rename', label: t('workspace.rename'), icon: }, - { id: 'delete', label: t('workspace.delete'), icon: , danger: true }, + ...(canMoveOut && onMoveOut !== undefined + ? [{ id: 'moveOut', label: t('workspace.moveOutOfGroup'), icon: }] + : []), + { id: 'rename', label: t('workspace.rename'), icon: }, + { id: 'delete', label: t('workspace.delete'), icon: , danger: true }, ] const onDragStart = (event: DragEvent): void => { event.dataTransfer.setData(DND_WORKSPACE_TYPE, node.workspaceId) @@ -198,6 +214,15 @@ export function WorkspaceRow({ node, t, onToggle, onNewSession, onRename, onDele role="treeitem" aria-expanded={node.expanded} data-wsid={node.workspaceId} + /* Branch hooks. A project row IS a branch point: it heads its own run of + session rows, so the stem kinks here and curves back in on the first + session beneath it. That gives the branch one kink per project, which is + the readable rhythm — a single top-level category would otherwise never + produce a kink at all. + Active is NOT set here: when this project holds the open session, the + session row itself carries the marker. */ + data-wg-branch-row="" + data-wg-branch-group="" draggable onClick={onToggle} onDragStart={onDragStart} @@ -206,12 +231,12 @@ export function WorkspaceRow({ node, t, onToggle, onNewSession, onRename, onDele onDrop={onRowDrop} > - + {/* Project rows use the project glyph (same as the official workspace browser) so groups (folder glyph) and projects stay distinguishable. */} - + {node.label} @@ -221,6 +246,7 @@ export function WorkspaceRow({ node, t, onToggle, onNewSession, onRename, onDele items={menuItems} onSelect={(id) => { setMenuOpen(false) + if (id === 'openInFolder') onOpenInFolder?.() if (id === 'moveOut') onMoveOut?.() if (id === 'rename') onRename() if (id === 'delete') onDelete() @@ -235,7 +261,7 @@ export function WorkspaceRow({ node, t, onToggle, onNewSession, onRename, onDele aria-label={`${t('workspace.rename')} ${node.label}`} onClick={(e) => { e.stopPropagation(); setMenuOpen(v => !v) }} > - + )} /> @@ -246,13 +272,29 @@ export function WorkspaceRow({ node, t, onToggle, onNewSession, onRename, onDele aria-label={`${t('session.new')} ${node.label}`} onClick={(e) => { e.stopPropagation(); onNewSession() }} > - + ) } +/** + * Children container for one folder's rows. + * + * Keeps the tree's `role="group"` semantics and gives the rows a single + * positioned ancestor. It used to draw a per-folder guide rail; that is now the + * flower branch's job (one continuous stem for the whole tree, see + * `FlowerBranch.tsx`), so this is structure only. + */ +export function TreeChildren({ children }: { children: ReactNode }) { + return ( +
+ {children} +
+ ) +} + /** One session leaf row. */ export function SessionRow({ node, currentId, now, t, onOpen, onRename, onFork, onArchive }: { node: SessionNode @@ -266,17 +308,25 @@ export function SessionRow({ node, currentId, now, t, onOpen, onRename, onFork, }) { const selected = node.id === currentId const [menuOpen, setMenuOpen] = useState(false) - const showStatus = true + // The ACTIVE session hands its status slot to the flower: the branch anchors + // on this cell (`anchorX` targets `.wgStatusSlot`), so the bloom and the dot + // occupy the same 14px square. Drawing both puts the dot's green "ongoing" + // ring (or the loading spinner) on top of the petals, which is what made the + // flower look broken. The flower already carries this row's state — it turns + // exactly while the session runs — so the dot is redundant here anyway. + const showStatus = !selected const menuItems = [ - { id: 'rename', label: t('session.rename'), icon: }, - { id: 'fork', label: t('session.fork'), icon: }, - { id: 'archive', label: t('session.archive'), icon: }, + { id: 'rename', label: t('session.rename'), icon: }, + { id: 'fork', label: t('session.fork'), icon: }, + { id: 'archive', label: t('session.archive'), icon: }, ] return (
{ onOpen(node.id) }} > @@ -308,7 +358,7 @@ export function SessionRow({ node, currentId, now, t, onOpen, onRename, onFork, aria-label={`${t('session.rename')} ${node.title}`} onClick={(e) => { e.stopPropagation(); setMenuOpen(v => !v) }} > - + )} /> diff --git a/src/client/store-hook.ts b/src/client/store-hook.ts new file mode 100644 index 0000000..420759e --- /dev/null +++ b/src/client/store-hook.ts @@ -0,0 +1,86 @@ +/** + * A framework-shaped selector hook over a store instance. + * + * The renderer builds this hook for slot seats (`bindSnapshotSelector` in + * ui-renderer, wrapping React's `useSyncExternalStoreWithSelector`), but the tab + * strip is NOT a slot occupant: it renders through a DOM seat as a child of this + * plugin's own `sidebar.workspaces` occupant, so it receives its store face as a + * plain prop and needs the equivalent binding here. + * + * The implementation mirrors React's `useSyncExternalStoreWithSelector` without + * depending on the `use-sync-external-store` package (it is not resolvable from + * this plugin). The two behaviours that matter: + * + * - identity-stable subscribe/getSnapshot closures, so the strip never + * resubscribes across renders; + * - a memoized selection: the selector re-runs only when the state reference + * changes, and an equal result (by `eq`, defaulting to `Object.is`) returns + * the PREVIOUS reference, so a selector allocating a fresh array or object + * does not spin the render loop. + * + * The hook must be called unconditionally (Rules of Hooks). + */ +import { useCallback, useRef, useSyncExternalStore } from 'react' +import type { ActionsDecl, StoreInstance } from '@deepseek-ai/dsh-client-store' + +/** One memory cell: the state it was derived from, and the value it produced. */ +interface Selection { + state: T + value: S + /** Whether `value` was produced by the selector (vs. carried over as equal). */ + hasValue: boolean +} + +/** + * Build a selector hook bound to one store instance. + * @param instance - the live store instance (snapshot source). + * @returns a `SnapshotSelectorHook`-compatible hook over that instance. + */ +export function createStoreHook>( + instance: StoreInstance, +): (selector: (state: T) => S, eq?: (a: S, b: S) => boolean) => S { + // Captured once: stable closures keep uSES from resubscribing every render. + const subscribe = (onChange: () => void): (() => void) => instance.subscribe(onChange) + const getState = (): T => instance.getSnapshot() + + return function useSelector( + selector: (state: T) => S, + eq?: (a: S, b: S) => boolean, + ): S { + // Seeded eagerly so the first render selects without an extra pass. + const memory = useRef | null>(null) + + // Re-select the value for the current state. Called by uSES on every + // notification AND on every render; the memory makes it cheap and + // reference-stable. + const getSelection = useCallback((): S => { + const state = getState() + const previous = memory.current + + // Same state object => the previous value is still valid. This is the + // path that lets an allocating selector stay reference-stable. + if (previous !== null && previous.hasValue && Object.is(previous.state, state)) { + return previous.value + } + + const value = selector(state) + + // New state, but an equal value: carry the old reference forward so uSES + // sees no change and skips the re-render. + if (previous !== null && previous.hasValue) { + const equal = eq !== undefined ? eq(previous.value, value) : Object.is(previous.value, value) + if (equal) { + memory.current = { state, value: previous.value, hasValue: true } + return previous.value + } + } + + memory.current = { state, value, hasValue: true } + return value + }, [selector, eq]) + + // The third argument is the server snapshot; the client plugin never + // server-renders, so the same getter is correct for both. + return useSyncExternalStore(subscribe, getSelection, getSelection) + } +} diff --git a/src/client/stores.ts b/src/client/stores.ts index 9b339a8..fdd8729 100644 --- a/src/client/stores.ts +++ b/src/client/stores.ts @@ -10,7 +10,7 @@ * unit tests exercise the real semantics without a browser module loader; * this file only binds them through defineStore. */ -import { defineStore, type EngineStoreHandle } from '@deepseek-ai/dsh-client-runtime/client' +import { defineStore, type EngineStoreHandle } from '@deepseek-ai/dsh-client-store' import { retainKeysImpl, setCategoryExpandedImpl, diff --git a/src/client/styles.css b/src/client/styles.css index 6b5711f..7699219 100644 --- a/src/client/styles.css +++ b/src/client/styles.css @@ -1,423 +1,848 @@ -/* dsh-workspace-groups browser styles. Plain CSS injected by the plugin's - apply (via the ?inline virtual module) — no CSS Modules toolchain needed. */ - .wgRoot { - display: flex; - flex-direction: column; - min-height: 0; - flex: 1; - box-sizing: border-box; - width: 100%; - overflow: hidden; + box-sizing:border-box; + flex-direction:column; + flex:1; + width:100%; + min-height:0; + display:flex; + overflow:hidden; } .wgSectionHeader { - display: flex; - align-items: center; - gap: 4px; - padding: 0 12px; - height: 36px; - flex: none; + flex:none; + align-items:center; + gap:4px; + height:36px; + padding:0 12px; + display:flex; } .wgSectionLabel { - flex: none; - max-width: 45%; - min-width: 0; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - font-size: 12px; - font-weight: 600; - color: var(--dsw-fg-1, inherit); + text-overflow:ellipsis; + white-space:nowrap; + min-width:0; + max-width:45%; + color:var(--dsw-fg-1,inherit); + flex:none; + font-size:12px; + font-weight:600; + overflow:hidden; } .wgIconButton { - display: inline-flex; - align-items: center; - justify-content: center; - width: 26px; - height: 26px; - border: none; - background: transparent; - border-radius: 6px; - color: var(--dsw-fg-2, inherit); - cursor: pointer; - padding: 0; + width:26px; + height:26px; + color:var(--dsw-fg-2,inherit); + cursor:pointer; + background:0 0; + border:none; + border-radius:6px; + justify-content:center; + align-items:center; + padding:0; + display:inline-flex; } .wgIconButton:hover { - background: var(--dsw-bg-hover, rgba(127, 127, 127, 0.12)); - color: var(--dsw-fg-1, inherit); + background:var(--dsw-bg-hover,#7f7f7f1f); + color:var(--dsw-fg-1,inherit); } .wgIconButton:disabled { - opacity: 0.5; - cursor: default; + opacity:.5; + cursor:default; } .wgSearch { - display: flex; - align-items: center; - flex: 1; - min-width: 0; - max-width: 28px; - margin-left: auto; - transition: max-width 180ms ease; + flex:1; + align-items:center; + min-width:0; + max-width:28px; + margin-left:auto; + transition:max-width .18s; + display:flex; } -/* Search expanded: the slot grows to fill the header so the input widens - (mirrors the official ui-workspace searchSlot idle/expanded swap). */ .wgSearchExpanded { - max-width: 100%; + max-width:100%; } .wgSearchInput { - flex: 1; - min-width: 0; - border: none; - background: transparent; - outline: none; - font-size: 12px; - color: var(--dsw-fg-1, inherit); - padding: 0; + min-width:0; + color:var(--dsw-fg-1,inherit); + background:0 0; + border:none; + outline:none; + flex:1; + padding:0; + font-size:12px; } .wgTreeBody { - flex: 1; - min-height: 0; - overflow-y: auto; - padding: 0 8px 8px; + flex:1; + min-height:0; + padding:0 8px 8px; + overflow-y:auto; } .wgList { - display: flex; - flex-direction: column; - gap: 1px; + flex-direction:column; + gap:1px; + display:flex; } .wgEmpty { - padding: 16px 8px; - text-align: center; - font-size: 12px; - color: var(--dsw-fg-3, rgba(127, 127, 127, 0.8)); + text-align:center; + color:var(--dsw-fg-3,#7f7f7fcc); + padding:16px 8px; + font-size:12px; } -/* Category row: top-level folder. */ .wgCategoryRow { - display: flex; - align-items: center; - gap: 4px; - height: 28px; - padding: 0 4px; - border-radius: 6px; - cursor: pointer; - user-select: none; - position: relative; + cursor:pointer; + user-select:none; + border-radius:6px; + align-items:center; + gap:4px; + height:28px; + padding:0 4px; + display:flex; + position:relative; } .wgCategoryRow:hover { - background: var(--dsw-bg-hover, rgba(127, 127, 127, 0.12)); + background:var(--dsw-bg-hover,#7f7f7f1f); } -/* Manual-group menu on category rows appears on hover (like workspace rows). */ -.wgCategoryRow:hover .wgRowActions, -.wgCategoryRow:focus-within .wgRowActions { - opacity: 1; +.wgCategoryRow:hover .wgRowActions,.wgCategoryRow:focus-within .wgRowActions { + opacity:1; } -/* Active drag-over drop target: a workspace may be dropped into this group. */ .wgDropTarget { - background: var(--dsw-bg-selected, rgba(74, 144, 217, 0.18)); - outline: 1px dashed var(--dsw-accent, #4a90d9); - outline-offset: -1px; + background:var(--dsw-bg-selected,#4a90d92e); + outline:1px dashed var(--dsw-accent,#4a90d9); + outline-offset:-1px; } -/* Insertion indicator while dragging: a 2px line above (before) or below - (after) the row — the exact spot the dragged project/group will land. - Top half of the row = before, bottom half = after. */ -.wgInsertBefore::before, -.wgInsertAfter::after { - content: ''; - position: absolute; - left: 2px; - right: 2px; - height: 2px; - border-radius: 1px; - background: var(--dsw-accent, #4a90d9); - box-shadow: 0 0 0 1px color-mix(in srgb, var(--dsw-accent, #4a90d9) 25%, transparent); - pointer-events: none; - z-index: 6; +.wgInsertBefore:before,.wgInsertAfter:after { + content:""; + background:var(--dsw-accent,#4a90d9); + height:2px; + box-shadow:0 0 0 1px color-mix(in srgb, var(--dsw-accent,#4a90d9) 25%, transparent); + pointer-events:none; + z-index:6; + border-radius:1px; + position:absolute; + left:2px; + right:2px; } -.wgInsertBefore::before { - top: -1px; +.wgInsertBefore:before { + top:-1px; } -.wgInsertAfter::after { - bottom: -1px; +.wgInsertAfter:after { + bottom:-1px; } .wgChevron { - display: inline-flex; - align-items: center; - justify-content: center; - width: 14px; - height: 14px; - flex: none; - transition: transform 120ms ease; - color: var(--dsw-fg-3, rgba(127, 127, 127, 0.8)); + width:14px; + height:14px; + color:var(--dsw-fg-3,#7f7f7fcc); + flex:none; + justify-content:center; + align-items:center; + transition:transform .12s; + display:inline-flex; } .wgChevronOpen { - transform: rotate(90deg); + transform:rotate(90deg); } .wgCategoryIcon { - display: inline-flex; - align-items: center; - justify-content: center; - flex: none; - color: var(--dsw-fg-2, inherit); + color:var(--dsw-fg-2,inherit); + flex:none; + justify-content:center; + align-items:center; + display:inline-flex; } .wgCategoryLabel { - flex: 1; - min-width: 0; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - font-size: 12px; - font-weight: 600; - color: var(--dsw-fg-1, inherit); + text-overflow:ellipsis; + white-space:nowrap; + min-width:0; + color:var(--dsw-fg-1,inherit); + flex:1; + font-size:12px; + font-weight:600; + overflow:hidden; } .wgCategoryCount { - flex: none; - font-size: 11px; - color: var(--dsw-fg-3, rgba(127, 127, 127, 0.8)); + color:var(--dsw-fg-3,#7f7f7fcc); + flex:none; + font-size:11px; } -/* Workspace row: project folder under a category. */ .wgProjectRow { - display: flex; - align-items: center; - gap: 4px; - height: 28px; - padding: 0 4px 0 20px; - border-radius: 6px; - cursor: pointer; - user-select: none; - position: relative; + cursor:pointer; + user-select:none; + border-radius:6px; + align-items:center; + gap:4px; + height:28px; + padding:0 4px 0 20px; + display:flex; + position:relative; } -/* Top-level (ungrouped) workspace row: no folder indentation. */ .wgProjectFlat { - padding-left: 4px; + padding-left:4px; } -/* Top-level (ungrouped) rows area. The blank space below the last row accepts - a drop (appends to the end of the top-level list). */ .wgTopLevelArea { - margin-top: 2px; - padding-bottom: 10px; + margin-top:2px; + padding-bottom:10px; } -/* Empty top level while dragging a project: a standalone insertion line under - the last group folder — the only way to move a project OUT of a group when - no top-level rows exist yet. */ .wgTopLevelEmpty { - position: relative; - height: 14px; - border-radius: 4px; + border-radius:4px; + height:14px; + position:relative; } + .wgTopLevelEmptyLine { - position: absolute; - left: 2px; - right: 2px; - top: 50%; - height: 2px; - border-radius: 1px; - background: var(--dsw-accent, #4a90d9); - box-shadow: 0 0 0 1px color-mix(in srgb, var(--dsw-accent, #4a90d9) 25%, transparent); - pointer-events: none; + background:var(--dsw-accent,#4a90d9); + height:2px; + box-shadow:0 0 0 1px color-mix(in srgb, var(--dsw-accent,#4a90d9) 25%, transparent); + pointer-events:none; + border-radius:1px; + position:absolute; + top:50%; + left:2px; + right:2px; } + .wgTopLevelEmptyActive { - background: var(--dsw-bg-selected, rgba(74, 144, 217, 0.18)); + background:var(--dsw-bg-selected,#4a90d92e); } .wgProjectRow:hover { - background: var(--dsw-bg-hover, rgba(127, 127, 127, 0.12)); + background:var(--dsw-bg-hover,#7f7f7f1f); } -.wgProjectActive { - color: var(--dsw-accent, #4a90d9); +.wgProjectActive .wgProjectLabel { + font-weight:700; } .wgProjectLabel { - flex: 1; - min-width: 0; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - font-size: 12px; - color: var(--dsw-fg-1, inherit); + text-overflow:ellipsis; + white-space:nowrap; + min-width:0; + color:var(--dsw-alias-label-primary,var(--dsw-fg-1,inherit)); + font-size:12px; + font-weight:600; + font-family:var(--dsw-font-mono,ui-monospace, SFMono-Regular, Menlo, monospace); + flex:1; + overflow:hidden; } .wgRowActions { - display: inline-flex; - align-items: center; - gap: 2px; - flex: none; - opacity: 0; + opacity:0; + flex:none; + align-items:center; + gap:2px; + display:inline-flex; } -.wgProjectRow:hover .wgRowActions, -.wgProjectRow:focus-within .wgRowActions { - opacity: 1; +.wgProjectRow:hover .wgRowActions,.wgProjectRow:focus-within .wgRowActions { + opacity:1; +} + +.wgTreeWrap { + position:relative; +} + +.wgBranch { + z-index:2; + pointer-events:none; + position:absolute; + top:0; + left:0; + overflow:visible; +} + +.wgTreeWrap>.wgList { + z-index:1; + position:relative; +} + +.wgBranchGhost { + fill:none; + stroke:var(--dsw-alias-border-l2,#7f7f7f47); + stroke-width:1.5px; + stroke-dasharray:2 3; + vector-effect:non-scaling-stroke; +} + +.wgBranchGrown { + fill:none; + stroke:var(--dsw-alias-label-primary,currentColor); + stroke-width:2px; + stroke-linecap:round; + vector-effect:non-scaling-stroke; + transition:stroke .16s; +} + +.wgBranchDot { + fill:var(--dsw-alias-border-l2,#7f7f7f80); + transition:r .16s,fill .16s; +} + +.wgBranchDotActive { + fill:var(--dsw-alias-label-primary,currentColor); +} + +.wgFlowerArt { + transform-box:fill-box; + transform-origin:50%; + animation:4s linear infinite paused wg-flower-spin; +} + +.wgFlowerSpinning .wgFlowerArt { + animation-play-state:running; +} + +@keyframes wg-flower-spin { + 0%{transform:rotate(0)}to{transform:rotate(360deg)}; +} + +@media (prefers-reduced-motion:reduce) { + .wgBranchGrown,.wgBranchDot{transition:none}.wgFlowerArt{animation:none}; +} + +.wgTreeChildren { + position:relative; } -/* Session row: leaf under a workspace folder. */ .wgSessionRow { - display: flex; - align-items: center; - gap: 6px; - height: 30px; - padding: 0 4px 0 40px; - border-radius: 6px; - cursor: pointer; - user-select: none; + cursor:pointer; + user-select:none; + border-radius:6px; + align-items:center; + gap:6px; + height:28px; + padding:0 4px 0 40px; + display:flex; } .wgSessionRow:hover { - background: var(--dsw-bg-hover, rgba(127, 127, 127, 0.12)); + background:var(--dsw-bg-hover,#7f7f7f1f); } -.wgSessionRow:hover .wgRowActions, -.wgSessionRow:focus-within .wgRowActions { - opacity: 1; +.wgSessionRow:hover .wgRowActions,.wgSessionRow:focus-within .wgRowActions { + opacity:1; } .wgSelected { - background: var(--dsw-bg-selected, rgba(74, 144, 217, 0.18)); + background:var(--dsw-bg-selected,#4a90d92e); } .wgStatusSlot { - display: inline-flex; - align-items: center; - justify-content: center; - width: 14px; - height: 14px; - flex: none; + flex:none; + justify-content:center; + align-items:center; + width:14px; + height:14px; + display:inline-flex; } .wgSessionTitle { - flex: 1; - min-width: 0; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - font-size: 12px; - color: var(--dsw-fg-1, inherit); + text-overflow:ellipsis; + white-space:nowrap; + min-width:0; + color:var(--dsw-alias-label-secondary,var(--dsw-fg-2,inherit)); + flex:1; + font-size:12px; + overflow:hidden; +} + +.wgSelected .wgSessionTitle { + color:var(--dsw-alias-label-primary,var(--dsw-fg-1,inherit)); + font-weight:500; } .wgSessionTime { - flex: none; - font-size: 11px; - color: var(--dsw-fg-3, rgba(127, 127, 127, 0.8)); + color:var(--dsw-fg-3,#7f7f7fcc); + flex:none; + font-size:11px; } .wgVisuallyHidden { - position: absolute; - width: 1px; - height: 1px; - margin: -1px; - padding: 0; - overflow: hidden; - clip: rect(0 0 0 0); - white-space: nowrap; - border: 0; + clip:rect(0 0 0 0); + white-space:nowrap; + border:0; + width:1px; + height:1px; + margin:-1px; + padding:0; + position:absolute; + overflow:hidden; } -/* Search: the idle tree is re-rendered pruned to matched branches; matched - session rows get a tint, and content hits show a snippet line. */ .wgMatched { - background: var(--dsw-bg-selected, rgba(74, 144, 217, 0.18)); + background:var(--dsw-bg-selected,#4a90d92e); } .wgSessionSnippet { - flex: 1; - min-width: 0; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - font-size: 11px; - color: var(--dsw-fg-3, rgba(127, 127, 127, 0.8)); + text-overflow:ellipsis; + white-space:nowrap; + min-width:0; + color:var(--dsw-fg-3,#7f7f7fcc); + flex:1; + font-size:11px; + overflow:hidden; } .wgSearchStatus { - padding: 8px; - font-size: 11px; - color: var(--dsw-fg-3, rgba(127, 127, 127, 0.8)); - text-align: center; + color:var(--dsw-fg-3,#7f7f7fcc); + text-align:center; + padding:8px; + font-size:11px; } -/* Transient save errors for group operations (drag / menu). */ .wgManualError { - color: var(--dsw-fg-1, inherit); - text-align: left; - word-break: break-word; + color:var(--dsw-fg-1,inherit); + text-align:left; + word-break:break-word; } .wgRail { - display: flex; - flex-direction: column; - align-items: center; - gap: 12px; - padding: 8px 0 0; - overflow: hidden; + flex-direction:column; + align-items:center; + gap:12px; + padding:8px 0 0; + display:flex; + overflow:hidden; } .wgRail .wgSectionHeader { - flex-direction: column; - width: 36px; - height: auto; - gap: 12px; - align-items: center; - align-self: center; - padding: 0; + flex-direction:column; + align-self:center; + align-items:center; + gap:12px; + width:36px; + height:auto; + padding:0; } .wgRail .wgIconButton { - width: 36px; - height: 36px; - border-radius: 50%; + border-radius:50%; + width:36px; + height:36px; } .wgRail .wgTreeBody { - display: none; + display:none; } .wgAddError { - font-size: 12px; - color: var(--dsw-fg-1, inherit); - white-space: pre-wrap; - word-break: break-word; - max-height: 200px; - overflow-y: auto; + color:var(--dsw-fg-1,inherit); + white-space:pre-wrap; + word-break:break-word; + max-height:200px; + font-size:12px; + overflow-y:auto; } .wgRenameInput { - width: 100%; - border: 1px solid var(--dsw-border, rgba(127, 127, 127, 0.3)); - border-radius: 6px; - background: var(--dsw-bg-1, transparent); - color: var(--dsw-fg-1, inherit); - font-size: 13px; - padding: 6px 8px; - outline: none; + border:1px solid var(--dsw-border,#7f7f7f4d); + background:var(--dsw-bg-1,transparent); + width:100%; + color:var(--dsw-fg-1,inherit); + border-radius:6px; + outline:none; + padding:6px 8px; + font-size:13px; } .wgRenameInput:focus { - border-color: var(--dsw-accent, #4a90d9); + border-color:var(--dsw-accent,#4a90d9); +} + +.wgQuickOverlay { + z-index:1100; + background:var(--dsw-alias-bg-mask-1,#00000052); + backdrop-filter:var(--dsw-mask-blur,blur(2px)); + justify-content:center; + align-items:flex-start; + padding:10vh 24px 24px; + display:flex; + position:fixed; + inset:0; +} + +.wgQuickCard { + border:1px solid var(--dsw-border,#7f7f7f33); + background:var(--dsw-alias-bg-layer-2,var(--dsw-bg-1,#fff)); + width:min(640px,100%); + max-height:min(560px,90vh - 48px); + box-shadow:var(--dsw-elevation-prominent,0 16px 48px #00000040); + box-sizing:border-box; + border-radius:12px; + flex-direction:column; + gap:10px; + padding:14px; + display:flex; + overflow:hidden; +} + +.wgQuickHeader { + flex:none; + justify-content:space-between; + align-items:center; + gap:12px; + display:flex; +} + +.wgQuickTitle { + color:var(--dsw-alias-label-primary,var(--dsw-fg-1,inherit)); + font-size:13px; + font-weight:600; +} + +.wgQuickTabs { + gap:2px; + display:flex; +} + +.wgQuickTab { + color:var(--dsw-alias-label-secondary,var(--dsw-fg-2,inherit)); + cursor:pointer; + background:0 0; + border:none; + border-radius:6px; + align-items:center; + gap:6px; + padding:4px 12px; + font-family:inherit; + font-size:12px; + display:inline-flex; +} + +.wgQuickTab:hover { + background:var(--dsw-alias-interactive-bg-hover,var(--dsw-bg-hover,#7f7f7f1f)); +} + +.wgQuickTabActive { + background:var(--dsw-alias-interactive-bg-hover,var(--dsw-bg-selected,#4a90d92e)); + color:var(--dsw-alias-label-primary,var(--dsw-fg-1,inherit)); + font-weight:600; +} + +.wgQuickTabCount { + background:var(--dsw-accent,#4a90d9); + color:#fff; + text-align:center; + border-radius:8px; + min-width:16px; + height:16px; + padding:0 4px; + font-size:10px; + font-weight:600; + line-height:16px; +} + +.wgQuickSearchWrap { + flex:none; +} + +.wgQuickSearch { + border:1px solid var(--dsw-border,#7f7f7f4d); + background:var(--dsw-bg-1,transparent); + width:100%; + height:34px; + color:var(--dsw-alias-label-primary,var(--dsw-fg-1,inherit)); + box-sizing:border-box; + border-radius:8px; + outline:none; + padding:0 10px; + font-family:inherit; + font-size:13px; +} + +.wgQuickSearch:focus { + border-color:var(--dsw-accent,#4a90d9); +} + +.wgQuickList { + flex-direction:column; + flex:auto; + gap:2px; + min-height:64px; + padding-right:2px; + display:flex; + overflow-y:auto; +} + +.wgQuickRow { + cursor:pointer; + text-align:left; + box-sizing:border-box; + background:0 0; + border:none; + border-radius:8px; + flex-direction:column; + flex:none; + gap:2px; + width:100%; + padding:7px 10px; + font-family:inherit; + display:flex; +} + +.wgQuickRow:hover,.wgQuickRowActive { + background:var(--dsw-alias-interactive-bg-hover,var(--dsw-bg-hover,#7f7f7f1f)); +} + +.wgQuickRowSelected,.wgQuickRowCurrent { + background:var(--dsw-bg-selected,#4a90d92e); +} + +.wgQuickRowMain { + align-items:center; + gap:8px; + width:100%; + min-width:0; + display:flex; +} + +.wgQuickRowTitle { + text-overflow:ellipsis; + white-space:nowrap; + min-width:0; + color:var(--dsw-alias-label-primary,var(--dsw-fg-1,inherit)); + flex:1; + font-size:13px; + font-weight:500; + overflow:hidden; +} + +.wgQuickRunBadge { + color:var(--dsw-accent,#4a90d9); + flex:none; + font-size:11px; +} + +.wgQuickTime { + color:var(--dsw-alias-label-secondary,var(--dsw-fg-3,#7f7f7fcc)); + flex:none; + font-size:11px; +} + +.wgQuickRowSub { + min-width:0; + display:flex; +} + +.wgQuickRowPath { + text-overflow:ellipsis; + white-space:nowrap; + min-width:0; + color:var(--dsw-alias-label-secondary,var(--dsw-fg-3,#7f7f7fcc)); + flex:1; + font-size:11px; + overflow:hidden; +} + +.wgQuickEmpty { + text-align:center; + color:var(--dsw-alias-label-secondary,var(--dsw-fg-3,#7f7f7fcc)); + padding:24px 8px; + font-size:12px; +} + +.wgQuickFooter { + flex:none; + align-items:center; + gap:8px; + padding-top:2px; + display:flex; +} + +.wgQuickSelected { + text-overflow:ellipsis; + white-space:nowrap; + min-width:0; + color:var(--dsw-alias-label-secondary,var(--dsw-fg-3,#7f7f7fcc)); + flex:1; + font-size:12px; + overflow:hidden; +} + +.wgQuickHint { + text-align:center; + color:var(--dsw-alias-label-secondary,var(--dsw-fg-3,#7f7f7fcc)); + flex:none; + font-size:11px; +} + +.wgTabs { + box-sizing:border-box; + border-bottom:1px solid var(--dsw-alias-border-l2,#7f7f7f33); + background:0 0; + flex:none; + align-items:stretch; + gap:4px; + min-width:0; + height:56px; + padding:8px 10px; + display:flex; +} + +.wgTabsScroll { + scrollbar-width:none; + -ms-overflow-style:none; + -webkit-overflow-scrolling:touch; + overscroll-behavior-x:contain; + box-sizing:border-box; + flex:auto; + align-items:stretch; + gap:6px; + min-width:0; + padding:1px 0; + display:flex; + overflow:auto hidden; +} + +.wgTabsScroll::-webkit-scrollbar { + width:0; + height:0; + display:none; +} + +.wgTab { + min-width:0; + max-width:240px; + box-shadow:inset 0 0 0 1px var(--dsw-alias-border-l2,#7f7f7f2e); + color:var(--dsw-alias-label-secondary,var(--dsw-fg-2,inherit)); + border-radius:8px; + flex:none; + align-items:center; + padding:0 6px 0 10px; + transition:background .12s,box-shadow .12s; + display:inline-flex; +} + +.wgTabText { + flex-direction:column; + flex:auto; + justify-content:center; + align-items:flex-start; + gap:3px; + min-width:0; + height:100%; + display:flex; +} + +.wgTabProject { + text-overflow:ellipsis; + white-space:nowrap; + min-width:0; + max-width:100%; + font-family:var(--dsw-font-mono,ui-monospace, SFMono-Regular, Menlo, monospace); + letter-spacing:.02em; + color:var(--dsw-alias-label-secondary,var(--dsw-fg-3,inherit)); + opacity:.85; + flex:none; + font-size:10px; + line-height:13px; + overflow:hidden; +} + +.wgTab:hover { + background:var(--dsw-alias-interactive-bg-hover,var(--dsw-bg-hover,#7f7f7f1f)); +} + +.wgTabActive { + background:var(--dsw-alias-interactive-bg-hover,var(--dsw-bg-hover,#7f7f7f1f)); + box-shadow:inset 0 0 0 1px var(--dsw-alias-label-secondary,#7f7f7f73); + color:var(--dsw-alias-label-primary,var(--dsw-fg-1,inherit)); +} + +.wgTabActive .wgTabProject { + opacity:1; +} + +.wgTabMain { + box-sizing:border-box; + min-width:0; + height:100%; + color:inherit; + cursor:pointer; + background:0 0; + border:none; + flex:auto; + align-items:center; + gap:8px; + padding:6px 0; + font-family:inherit; + font-size:12px; + display:inline-flex; +} + +.wgTabStatus { + flex:none; + justify-content:center; + align-items:center; + width:12px; + height:12px; + display:inline-flex; +} + +.wgTabStatus[data-tab-state=idle] { + opacity:.45; +} + +.wgTabLabel { + text-overflow:ellipsis; + white-space:nowrap; + min-width:0; + max-width:100%; + color:var(--dsw-alias-label-primary,var(--dsw-fg-1,inherit)); + flex:none; + font-size:12px; + line-height:16px; + overflow:hidden; +} + +.wgTabText>.wgTabLabel:only-child { + align-self:center; +} + +.wgTabClose { + width:20px; + height:20px; + color:inherit; + cursor:pointer; + opacity:0; + background:0 0; + border:none; + border-radius:5px; + flex:none; + justify-content:center; + align-items:center; + margin-left:2px; + padding:0; + transition:opacity .12s,background .12s; + display:inline-flex; +} + +.wgTab:hover .wgTabClose,.wgTab:focus-within .wgTabClose,.wgTabActive .wgTabClose { + opacity:1; +} + +.wgTabClose:hover { + background:var(--dsw-alias-interactive-bg-hover-solid,#7f7f7f33); } diff --git a/src/client/subagent-lineage.ts b/src/client/subagent-lineage.ts new file mode 100644 index 0000000..9aeb75f --- /dev/null +++ b/src/client/subagent-lineage.ts @@ -0,0 +1,50 @@ +/** + * Plugin-owned projection of descendant counts from Session summaries. + * + * 0.1.2 移除了 `@deepseek-ai/dsh-client-runtime/client`(平台模块表不再提供 + * `indexSubagentDescendants`),官方 ui-workspace 改为各自持有本地副本 + * (packages/client/ui-workspace/src/client/subagent-lineage.ts,MIT)。这里 + * 保持同一实现,使运行中的子代理会话数在树行上继续可见。 + */ +import type { SessionId } from '@deepseek-ai/dsh-session/types' + +interface LineageEntry { + readonly id: SessionId + readonly parentId?: SessionId + readonly origin?: 'subagent' + readonly running: boolean +} + +/** Descendant counts for one possible parent Session. */ +export interface SubagentDescendantSummary { + readonly count: number + readonly runningCount: number +} + +/** + * Index uninterrupted subagent descendants under each ancestor. + * @param summaries - Session summaries keyed by id. + * @returns descendant totals keyed by possible parent id. + */ +export function indexSubagentDescendants( + summaries: Readonly>, +): ReadonlyMap { + const indexed = new Map() + for (const descendant of Object.values(summaries)) { + if (descendant.origin !== 'subagent') continue + const seen = new Set() + let current: LineageEntry | undefined = descendant + while (current?.origin === 'subagent' && current.parentId !== undefined && !seen.has(current.id)) { + seen.add(current.id) + const aggregate = indexed.get(current.parentId) + if (aggregate === undefined) { + indexed.set(current.parentId, { count: 1, runningCount: descendant.running ? 1 : 0 }) + } else { + aggregate.count += 1 + if (descendant.running) aggregate.runningCount += 1 + } + current = summaries[current.parentId] + } + } + return indexed +} diff --git a/src/client/tab-persist.ts b/src/client/tab-persist.ts new file mode 100644 index 0000000..f4aff71 --- /dev/null +++ b/src/client/tab-persist.ts @@ -0,0 +1,84 @@ +/** + * Client side of the session-tab persistence, talking to + * `GET|PUT /workspace-groups/tabs` on the host. + * + * Why not browser storage: **the origin includes the PORT**, and every `dsh web` + * / `dsh test` / desktop launch picks a different one. `localStorage` and + * `sessionStorage` are both scoped to the origin, so they start empty on the + * next launch — a tab list kept there survives a reload only when the port + * happens to match. The host's JSON sidecar has no such problem, which is why + * the strip is stored there and read back verbatim. + * + * There is deliberately no per-browser-session marker. A marker has to live in + * browser storage, which the port invalidates, so every restart looked like a + * fresh session and silently discarded the user's tabs — the exact failure this + * module exists to prevent. + * + * Every call is best-effort: a failed read means "no tabs" and a failed write is + * swallowed, because the strip is a convenience and must never break the app. + */ + +/** Host route holding the strip. */ +export const TABS_ROUTE = '/workspace-groups/tabs' + +/** One tab as it crosses the wire. */ +export interface WireTab { + readonly sessionId: string + readonly order: number +} + +/** + * Fetch the stored strip. + * @param fetchImpl - fetch implementation (injectable for tests). + * @returns the tabs, oldest first; empty on any failure. + */ +export async function loadTabs(fetchImpl: typeof fetch = fetch): Promise { + try { + const response = await fetchImpl(TABS_ROUTE, { + method: 'GET', + // Per-session state; a cached response would restore stale tabs. + cache: 'no-store', + }) + if (!response.ok) return [] + const body: unknown = await response.json() + if (typeof body !== 'object' || body === null) return [] + const list = (body as { tabs?: unknown }).tabs + if (!Array.isArray(list)) return [] + const tabs: WireTab[] = [] + for (const entry of list) { + if (typeof entry !== 'object' || entry === null) continue + const row = entry as Record + if (typeof row.sessionId !== 'string' || row.sessionId === '') continue + if (typeof row.order !== 'number' || !Number.isFinite(row.order)) continue + tabs.push({ sessionId: row.sessionId, order: row.order }) + } + return tabs + } catch { + return [] + } +} + +/** + * Store the strip. Failures are swallowed. + * @param state - the client's current strip and its arrival counter. + * @param fetchImpl - fetch implementation (injectable for tests). + */ +export async function saveTabs( + state: { order: number; tabs: readonly WireTab[] }, + fetchImpl: typeof fetch = fetch, +): Promise { + try { + await fetchImpl(TABS_ROUTE, { + method: 'PUT', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ order: state.order, tabs: state.tabs }), + cache: 'no-store', + // Survive a navigation that happens while the request is in flight; the + // write is idempotent so a re-send is harmless. + keepalive: true, + }) + } catch { + // Offline or the host is restarting: the next change writes the full state + // again, so nothing is lost beyond this tick. + } +} diff --git a/src/client/tab-seat.ts b/src/client/tab-seat.ts new file mode 100644 index 0000000..b9b119a --- /dev/null +++ b/src/client/tab-seat.ts @@ -0,0 +1,180 @@ +/** + * DOM seat for the session tab strip. + * + * Why this exists instead of a slot: the strip belongs at the very top of the + * conversation column — `pI_x6G_centerCol` (ui-layout's AppFrame `.centerCol`, + * a hashed CSS-Modules class). That column declares NO child slots: its only + * child is the `main` slot's occupant (`renderSlot('main', …)`, the + * Conversation or a global panel), so there is nowhere to register. The + * shipped slot in that neighbourhood — `conversation.composer.dock` — is the + * band UNDER the composer card, a different place entirely. + * + * So the strip gets a real DOM seat: this module finds the column, prepends a + * `
` to it, and hands that element to a React portal. The element is + * OURS, never React's: it is inserted outside the column's child list that + * React reconciles, and it is re-inserted if React (or a theme/titlebar + * re-render) ever drops it. + * + * Two hazards this module is built around: + * + * 1. `centerCol` is a hashed class name (`pI_x6G_centerCol`) that changes when + * the package is rebuilt. Matching is therefore done on the *structural* + * contract — a grid-item column that holds the `main` panel — plus a + * `[class*="_centerCol"]` probe, never on the exact hash. + * 2. The column mounts after the client plugin's `apply()` runs. Discovery is + * therefore a MutationObserver on `document.body` plus a `requestAnimationFrame` + * retry, and both are torn down when the owning effect disposes. + */ + +/** Persistent marker for the injected container (survives React re-renders). */ +const SEAT_ATTRIBUTE = 'data-wg-tab-seat' + +/** Sentinel attribute on the container so discovery can skip our own node. */ +const SEAT_SELECTOR = `[${SEAT_ATTRIBUTE}]` + +/** + * Match the conversation column by its hashed CSS-Modules class. + * + * The hash prefix (`pI_x6G_`) is build-dependent, so the probe matches the + * `_centerCol` suffix that the Modules transform always preserves. A plain + * `class*="centerCol"` scan would risk matching unrelated utility classes, so + * the leading underscore is required. + * @param root - subtree to scan (normally `document`). + * @returns the column element, or null while it has not mounted. + */ +function findCenterColumn(root: ParentNode): HTMLElement | null { + // Fast path: the seat is already in place and still attached, which is the + // steady state on every re-render (portal into an existing element). + const existing = root.querySelector(SEAT_SELECTOR) + if (existing?.isConnected === true) return existing.parentElement + + // Structural probe: the column is the direct child of the app frame grid + // that contains the `main` panel. Querying the class suffix first keeps this + // to one selector evaluation in the common case. + const column = root.querySelector('[class*="_centerCol"]') + if (column !== null) return column + + // Nothing matched: either the shell has not mounted yet, or the Modules hash + // convention changed. Returning null keeps the caller in its wait loop + // instead of guessing at a wrong node (which would visually corrupt the + // shell). The strip simply appears once the frame is up. + return null +} + +/** A mounted seat: the host element plus the disposer that removes it. */ +export interface TabSeat { + /** + * The element the React portal renders into — null until the conversation + * column mounts. The portal is simply not rendered while this is null. + */ + readonly host: HTMLElement | null + /** Remove the seat and stop watching for the column. */ + dispose: () => void +} + +/** + * Ensure a seat exists as the FIRST child of the conversation column, creating + * it if needed, and keep it there for as long as the returned handle is live. + * + * The seat element is created once and reused: a portal that re-mounts into a + * fresh node on every shell re-render would drop the tab strip's React state + * and visible focus. If React removes the node (it owns the column's child + * list, and our node is not part of it), the observer re-inserts the SAME + * element, so the portal's subtree moves with it. + * + * @param onReady - called with the host element each time it becomes attached + * (once immediately when the column already exists). Used to seed React + * state; may fire more than once if the column is remounted. + * @returns the seat handle. `host` is null until the column appears, so the + * caller renders nothing meanwhile and starts rendering when `onReady` + * fires. Never null: a missing column must degrade to "no strip", not to a + * thrown error that would take the whole client plugin down. + */ +export function mountTabSeat(onReady: (host: HTMLElement) => void): TabSeat { + let host: HTMLElement | null = null + let column: HTMLElement | null = null + let observer: MutationObserver | null = null + let raf = 0 + let attempts = 0 + let disposed = false + + // Bounded retry: ~5s at 60fps. The shell mounts well inside this; the bound + // exists so a missing column degrades to "no strip" instead of a permanent + // frame loop. + const MAX_ATTEMPTS = 300 + + /** + * Put the seat at the head of the column, creating it on first success. + * Idempotent: a seat already first is left untouched, so repeated calls from + * the observer cause no DOM churn (and therefore no observer feedback loop — + * our insertion schedules one more callback, which then takes this early + * return instead of re-inserting). + */ + const place = (target: HTMLElement): void => { + if (disposed) return + if (host === null) { + host = document.createElement('div') + host.setAttribute(SEAT_ATTRIBUTE, '') + } + if (target.firstChild === host) return + target.insertBefore(host, target.firstChild) + } + + /** Locate the column and, on success, seat the host and notify the caller. */ + const tryMount = (): boolean => { + if (disposed) return true + // Steady state: the column we already found is still attached. + if (column !== null && column.isConnected) { + place(column) + return true + } + const found = findCenterColumn(document) + if (found === null) return false + // A different column than last time (shell remount): re-seat AND re-notify, + // because the caller may hold a stale host element from the old tree. + const changed = found !== column + column = found + place(found) + if (changed) onReady(host as HTMLElement) + return true + } + + const tick = (): void => { + if (disposed) return + raf = 0 + if (tryMount()) return + attempts += 1 + if (attempts >= MAX_ATTEMPTS) return + raf = requestAnimationFrame(tick) + } + + // The observer covers both "column mounts later" and "React dropped our + // node": either way the child list changes and we re-seat. `requestAnimationFrame` + // alone would miss a removal that happens after the retry budget is spent. + observer = new MutationObserver(() => { + if (disposed) return + if (tryMount()) return + if (raf === 0 && attempts < MAX_ATTEMPTS) raf = requestAnimationFrame(tick) + }) + observer.observe(document.body, { childList: true, subtree: true }) + + if (!tryMount() && raf === 0) raf = requestAnimationFrame(tick) + + return { + get host(): HTMLElement | null { + // Null until the column mounts; the caller's `onReady` fires at the same + // moment this becomes non-null, so the two never disagree. + return host + }, + dispose: () => { + disposed = true + if (raf !== 0) cancelAnimationFrame(raf) + raf = 0 + observer?.disconnect() + observer = null + host?.remove() + host = null + column = null + }, + } as TabSeat +} diff --git a/src/client/tab-store.ts b/src/client/tab-store.ts new file mode 100644 index 0000000..8c629c6 --- /dev/null +++ b/src/client/tab-store.ts @@ -0,0 +1,101 @@ +/** + * The session-tab store: the `defineStore` binding and nothing else. + * + * The action TRANSFORMS live in `tabs.ts` (pure, runtime-free), so unit tests + * exercise the real semantics without pulling in the store engine — this module + * is the only place that needs `@deepseek-ai/dsh-client-store`, and importing it + * from a test would drag `zustand` into the test process. + * + * One handle, one scope: the tab store is seated by the `sidebar.workspaces` + * entry alone. The tab strip is a CHILD of that entry (rendered through a DOM + * portal into the conversation column), not a second slot registration, so the + * handle is never mounted under a second, differently-scoped slot — which the + * registry rejects outright ("one handle, one scope"). + * + * Placement is navigation, not data: the strip derives its active chip from the + * open session, and arrival order is the strip's only order, so nothing here + * mirrors selection. + */ +import { defineStore, type EngineStoreHandle, type StoreHandle } from '@deepseek-ai/dsh-client-store' +import type { SessionId } from '@deepseek-ai/dsh-session/types' +import { + closeTabImpl, + restoreTabsImpl, + touchTabImpl, + type SessionTab, + type SessionTabsState, +} from './tabs.ts' + +export type { SessionTabsState } + +/** + * Session-tab strip actions (bound by the framework, handed to the browser). + * + * There is deliberately NO "drop tabs whose session vanished" action. An open + * tab is closed by the USER and by nothing else — a program that trims the strip + * on its own eventually eats tabs the user wanted, and the whole point of the + * strip is that it holds what you opened. + * + * This is also why the store needs no catalog at all: it never consults one. + */ +export interface SessionTabsActions { + /** Add the open session, or leave its existing tab untouched in place. */ + touch: (sessionId: SessionId) => void + /** Close one tab; navigation is untouchable from here (the caller decides). */ + close: (sessionId: SessionId) => void + /** + * Replace the strip with tabs loaded from the host. + * + * The host read is a `fetch`, so it cannot happen inside `init()`. This action + * is how the async result lands, and it is a no-op once the user has already + * opened a tab — a slow response must never discard what they just did. + */ + restore: (tabs: readonly SessionTab[]) => void +} + +/** Annotation twin of the actions literal below (structural `ActionsDecl`). */ +type SessionTabsActionsDecl = { + touch: typeof touchTabImpl + close: typeof closeTabImpl + restore: typeof restoreTabsImpl +} + +/** + * The tab store's registered handle: identity + spec + the instance factory the + * framework resolves per entry x scope. It deliberately does NOT claim the live + * instance's faces (`getSnapshot` / `actions`) — `defineStore`'s concrete return + * is structurally narrower, and this alias has to stay a type that value can be + * assigned to. + */ +export type SessionTabsStoreHandle = StoreHandle + +/** + * The live tab store value: the handle's `create()` product, which carries the + * baked write set and the snapshot source. Named here so the registrations and + * the strip's props can share one type without importing the store engine. + */ +export type SessionTabsInstance = ReturnType['create']> + +/** + * Create the session-tab store handle. + * + * The strip starts EMPTY and is hydrated by the caller through the `restore` + * action: persistence lives on the host behind a `fetch`, which cannot run + * during `init()`. Browser storage is deliberately not used — the origin + * includes the port, and every launch picks a new one, so `localStorage` and + * `sessionStorage` both start empty on the next start. + * + * @returns the store handle (spec + type + identity + factory in one). + */ +export function createSessionTabsStore(): EngineStoreHandle { + return defineStore({ + init: (): SessionTabsState => ({ tabs: [], order: 0 }), + actions: { + touch: touchTabImpl, + close: closeTabImpl, + restore: restoreTabsImpl, + }, + }) +} + +export type { SessionTab } \ No newline at end of file diff --git a/src/client/tabs.ts b/src/client/tabs.ts new file mode 100644 index 0000000..f4042dc --- /dev/null +++ b/src/client/tabs.ts @@ -0,0 +1,339 @@ +/** + * Pure session-tab state: the ordered strip of sessions the user has opened, + * the active one, and each tab's derived presentation. + * + * Position model: a tab's place in the strip is decided ONCE, when it is first + * opened, and never changes afterwards. Switching to a tab, or re-opening a + * session that already has one, leaves the strip exactly as it was — so clicking + * a chip never moves the chip out from under the pointer. Only two events change + * the order: a session opening for the FIRST time (append) and a tab closing + * (remove). + * + * Runtime-free on purpose (same discipline as `store-core.ts` / `quick.ts`): + * the component owns the ref + React state, this module owns every rule, and + * unit tests exercise the real semantics without a browser module loader. + * + * Retention note: a tab outlives whatever it points at. The strip is a list of + * things the USER opened, so nothing here consults the session catalog — a tab + * whose session is gone stays visible until the user closes it, and no + * background sweep ever trims the strip. + */ +import type { SessionId } from '@deepseek-ai/dsh-session/types' +import type { SessionSummary } from '@deepseek-ai/dsh-api-session-controller/client' +import type { SessionStatus } from '@deepseek-ai/dsh-client-ui-session/client' + +/** One open tab: a session id plus its arrival key (React list identity). */ +export interface SessionTab { + /** The session the tab shows. */ + readonly sessionId: SessionId + /** + * Monotonic arrival key. It doubles as the React `key`, so it must stay + * attached to the session for the tab's whole life — a reused key would make + * React move an existing chip's DOM node instead of reconciling it in place. + */ + readonly order: number +} + +/** Feature switch: whether opening a session also surfaces a tab. */ +export type TabOpenMode = 'auto' | 'manual' + +/** Per-tab indicator derived from the catalog summary and the live UI status. */ +export interface SessionTabIndicator { + /** A domain request is waiting for the user (approval / plan review / question). */ + readonly attention: boolean + /** The agent is producing output, or a descendant subagent is. */ + readonly running: boolean + /** The turn finished while the tab was in the background and was never looked at. */ + readonly unread: boolean + /** Idle tab whose session already has a title (a settled conversation). */ + readonly settled: boolean +} + +/** + * Add a session to the strip, or leave an existing entry exactly where it is. + * + * Arrival order is the strip's only order, so re-opening a session that already + * has a tab is a NO-OP: the tab keeps its position and its arrival key. Moving + * it to the front here would fight the whole point of stable positions — a user + * clicking through sessions would watch the strip reshuffle on every click. + * + * @param tabs - current strip (oldest first). + * @param sessionId - arriving session. + * @param nextOrder - monotonic arrival counter to spend when appending. + * @returns the strip, unchanged (same array) when the session already has a tab. + */ +export function appendTab(tabs: readonly SessionTab[], sessionId: SessionId, nextOrder: number): SessionTab[] { + const existing = tabs.find(tab => tab.sessionId === sessionId) + if (existing !== undefined) return tabs as SessionTab[] + return [...tabs, { sessionId, order: nextOrder }] +} + +/** + * Remove one session's tab. An absent session leaves the strip untouched. + * @param tabs - current strip. + * @param sessionId - session whose tab closes. + * @returns a new strip. + */ +export function removeTab(tabs: readonly SessionTab[], sessionId: SessionId): SessionTab[] { + return tabs.filter(tab => tab.sessionId !== sessionId) +} + +/** + * Order the strip for display: strictly by arrival, regardless of which tab is + * active. + * + * Position is a property of the TAB, not of the selection. Switching to a tab + * must not move it — an earlier version pulled the active tab to the front, + * which made every click reshuffle the strip and slid the chip out from under + * the pointer that had just clicked it. + * + * `activeId` is therefore accepted only to document that "active" deliberately + * does NOT participate in ordering; it is unused. The returned array is a copy + * so callers cannot mutate the store's state through it. + * + * @param tabs - strip in arrival order. + * @param activeId - the open session, if it has a tab (intentionally unused). + * @returns a new array in arrival order. + */ +export function orderedTabs(tabs: readonly SessionTab[], activeId: SessionId | undefined): SessionTab[] { + void activeId + return [...tabs] +} + +/** + * Whether the open session must surface a tab. + * + * A tab means "this conversation is in play right now", not "I once opened + * this". Browsing history is what the sidebar is for; opening an old + * conversation to read it should not litter the strip, which is the whole point + * of the strip being a working set rather than a second session list. + * + * A session therefore earns a tab only once a conversation has actually STARTED + * in it and is still engaged, which is any of: + * - **running** — the agent is producing output (including subagents); + * - **waiting on you** — an approval / plan review / question is pending; + * - **unseen completion** — it finished while you were elsewhere, so the tab is + * the thing that tells you to come back. + * + * A still-blank draft gets NO tab: the tab appears the moment the first message + * is sent (which is when the controller flips `blank` on `turn/start`). Once the + * turn ends and you have read the result, the session is settled history and + * does not earn a tab — so clicking through finished conversations leaves the + * strip alone. Tabs already opened stay open: this gate only decides whether a + * NEW tab appears, never whether an existing one closes. + * + * `blank` (from `sessionListMetadata`) is exactly "no turn has started": the + * controller flips it to false on `turn/start`. It is the right signal for + * "has this conversation begun", and the wrong one ALONE — a conversation + * finished a week ago is also non-blank, which is why the earlier `!blank` rule + * surfaced every old conversation the user clicked. + * + * @param mode - feature switch ('auto' applies the engagement rule). + * @param summary - the session's catalog row (absent while the catalog has not + * caught up with a just-created session). + * @param status - the session's unified UI status (absent → no live signal). + * @returns true when a tab belongs in the strip. + */ +export function shouldOpenTab( + mode: TabOpenMode, + summary: SessionSummary | undefined, + status: SessionStatus | undefined, +): boolean { + if (mode === 'manual') return false + if (summary === undefined) return false + // No turn yet: a scratch draft is not a conversation, so it holds no tab. The + // first message flips `blank`, and the tab appears then. + if (summary.blank) return false + // A conversation has begun. Keep the tab only while it is still in play. + if (summary.running) return true + if (status?.running === true) return true + if (status?.pendingInteraction !== undefined) return true + if (status?.completionUnread === true) return true + // Begun, but quiet and read: settled history, not a working tab. + return false +} + +/** + * Derive one tab's indicators from the catalog row and the unified UI status. + * @param summary - the tab session's catalog row (absent → inert indicators). + * @param status - the tab session's unified UI status (absent → idle). + * @returns the indicator quadruple. + */ +export function tabIndicator( + summary: SessionSummary | undefined, + status: SessionStatus | undefined, +): SessionTabIndicator { + const pending = status?.pendingInteraction !== undefined + const running = status?.running === true || summary?.running === true + const unread = status?.completionUnread === true + const blank = summary?.blank !== false + return { + attention: pending, + running, + unread, + settled: !pending && !running && !unread && summary !== undefined && !blank, + } +} + +/** + * Where one session lives: the project (workspace) that accounts for it. + * + * Tabs carry this because a strip of bare session titles is ambiguous once + * several projects are open — two checkouts both named "api", or a session + * titled after a file, give no hint which project it belongs to. + */ +export interface TabProject { + /** Stable workspace id. */ + readonly workspaceId: string + /** Display label: the workspace title, falling back to its directory name. */ + readonly label: string + /** Canonical directory path, for the tooltip. */ + readonly path: string +} + +/** + * Index sessions by the project that owns them. + * + * Membership comes from the workspace registry (`sessionIds`), which is the same + * authority the sidebar tree uses — a tab and its sidebar row therefore agree on + * the project without a second derivation. + * + * Built once per render pass rather than scanned per tab: a strip of N tabs over + * M projects is O(N×M) with a naive `find` per tab. + * + * @param workspaces - workspace views from the controller snapshot. + * @returns a session id → project map; sessions in no workspace are absent. + */ +export function projectIndex( + workspaces: readonly WorkspaceViewLike[], +): ReadonlyMap { + const index = new Map() + for (const workspace of workspaces) { + const label = projectLabel(workspace) + const project: TabProject = { + workspaceId: workspace.workspaceId, + label, + path: workspace.path, + } + for (const sessionId of workspace.sessionIds) { + // First writer wins: a session wrongly listed by two workspaces keeps the + // first, so the tab never flickers between labels across renders. + if (!index.has(sessionId)) index.set(sessionId, project) + } + } + return index +} + +/** Minimal workspace shape this module needs (keeps it importable in tests). */ +export interface WorkspaceViewLike { + readonly workspaceId: string + readonly path: string + readonly title: string + readonly sessionIds: readonly SessionId[] +} + +/** + * Display label for a project: its title, else the directory basename. + * @param workspace - workspace view. + * @returns a non-empty label, falling back to the raw path. + */ +export function projectLabel(workspace: Pick): string { + const title = workspace.title.trim() + if (title !== '') return title + // Both separators: the host path may be Windows or POSIX. + const parts = workspace.path.split(/[\\/]/).filter(part => part !== '') + return parts[parts.length - 1] ?? workspace.path +} + +/** + * Whether two strips are the same sequence of sessions (arrival keys ignored). + * @param left - previous strip. + * @param right - next strip. + * @returns true when no entry was added, removed, or reordered. + */ +export function sameTabs(left: readonly SessionTab[], right: readonly SessionTab[]): boolean { + return left.length === right.length + && left.every((tab, index) => right[index]?.sessionId === tab.sessionId) +} + +/** Session-tab strip state (the shape the store persists). */ +export interface SessionTabsState { + /** Open tabs in arrival order — the strip's one and only order. */ + tabs: SessionTab[] + /** Monotonic arrival counter; each FIRST-time session spends one. */ + order: number +} + +/** + * Store transform: add the open session, or leave its existing tab in place. + * + * Live here rather than in `tab-store.ts` so unit tests can exercise the real + * semantics without importing `@deepseek-ai/dsh-client-store` (which pulls + * `zustand` into the test process). The store module binds these into its + * actions table. + * + * The no-op guard matters: this runs on EVERY catalog change for the open + * session, so an unguarded write would wake the strip and spend arrival keys on + * every projection tick. + * + * @param state - store draft, mutated in place. + * @param sessionId - the session that just became open. + */ +export function touchTabImpl(state: SessionTabsState, sessionId: SessionId): void { + const next = appendTab(state.tabs, sessionId, state.order + 1) + // Same array => the session already had a tab; nothing changed, so nothing is + // written and no subscriber wakes. + if (next === state.tabs) return + state.order += 1 + state.tabs = next +} + +/** + * Store transform: close one tab. Closing a session that has no tab is not a + * state change, so it writes nothing. + * @param state - store draft, mutated in place. + * @param sessionId - the tab to close. + */ +export function closeTabImpl(state: SessionTabsState, sessionId: SessionId): void { + const next = removeTab(state.tabs, sessionId) + if (next.length === state.tabs.length) return + state.tabs = next +} + +/** + * Store transform: adopt tabs loaded from the host, MERGING with whatever is + * already in the strip. + * + * Async by nature (the host read is a `fetch`), so it can land after the browser + * has already opened a tab for the current session. Merging — rather than + * "ignore the read if the strip is non-empty" — is what makes a restart safe: + * the tab opened during startup survives AND the stored tabs still come back. + * (Bailing on a non-empty strip would silently drop every stored tab whenever + * the startup tab won the race, which is the common case for a session that is + * running or unread.) + * + * The arrival counter is lifted above every restored key so a tab opened later + * cannot reuse one; a reused key makes React move a chip's DOM node instead of + * reconciling it. + * + * @param state - store draft, mutated in place. + * @param tabs - tabs read from the host, oldest first. + */ +export function restoreTabsImpl(state: SessionTabsState, tabs: readonly SessionTab[]): void { + if (tabs.length === 0) return + const present = new Set(state.tabs.map(tab => tab.sessionId)) + const additions: SessionTab[] = [] + let order = state.order + for (const tab of tabs) { + // Never duplicate: a session already in the strip keeps its existing entry + // and position. + if (present.has(tab.sessionId)) continue + present.add(tab.sessionId) + // Re-key onto a fresh, monotonically increasing counter so a restored key + // can never collide with one already spent. + order += 1 + additions.push({ sessionId: tab.sessionId, order }) + } + if (additions.length > 0) state.tabs = [...state.tabs, ...additions] + state.order = order +} diff --git a/src/client/tree.ts b/src/client/tree.ts index ca37aac..fbf4bfd 100644 --- a/src/client/tree.ts +++ b/src/client/tree.ts @@ -4,20 +4,52 @@ * scans. Session visibility rules mirror the official ui-workspace tree * (blank rows only when current, archived excluded, subagent rows excluded). */ -import { - indexSubagentDescendants, - type PendingInteractionStatus, - type SessionId, - type SessionListState, - type SessionSearchResultItem, - type SessionSummary, - type SubagentDescendantSummary, - type WorkspaceId, - type WorkspaceView, -} from '@deepseek-ai/dsh-client-runtime/client' +import type { + SessionListState, + SessionSearchResultItem, + SessionSummary, +} from '@deepseek-ai/dsh-api-session-controller/client' +import type { WorkspaceId, WorkspaceView } from '@deepseek-ai/dsh-api-workspace-controller/client' +// Type-only: the unified UI status snapshot. 0.1.6 把 running / pendingInteraction / +// 未读完成提示收敛为 ui-session 的 SessionStatusSnapshot;SessionSummary.completed +// 与 SessionListState.current 同时移除,当前会话改由 `mainView` 保留位推导。 +import type { SessionStatus, SessionStatusSnapshot } from '@deepseek-ai/dsh-client-ui-session/client' +import type { SessionId } from '@deepseek-ai/dsh-session/types' +import { indexSubagentDescendants, type SubagentDescendantSummary } from './subagent-lineage.ts' import { effectiveCategories, orderedWorkspaceIds, resolveCategory } from '../core/matcher.ts' import { TOP_LEVEL_ORDER_KEY, UNCATEGORIZED_LABEL, type GroupsConfig, type ManualGroups } from '../core/types.ts' +/** Pending interaction kinds with dedicated Workspace-row presentation. */ +export type SessionPendingInteractionStatus = 'approval' | 'plan-review' | 'question' + +/** Current unified UI status by Session (ui-session snapshot). */ +type SessionStatuses = SessionStatusSnapshot + +/** + * The Session the Conversation is currently showing. + * + * 0.1.6 removed `SessionListState.current`: selection is expressed as the + * Session retained through the `mainView` reference source (the ui-workspace + * navigation holds exactly one). Same read the official browser performs. + * @param list - sessions list snapshot. + * @returns the retained Session id, or undefined while no Session is selected. + */ +export function currentSessionId(list: SessionListState): SessionId | undefined { + return Object.values(list.byId).find(session => (session.retainedBy?.mainView ?? 0) > 0)?.id +} + +/** Keep navigation presentation independent from domain-owned interaction objects. */ +function visiblePendingKind(kind: string | undefined): SessionPendingInteractionStatus | undefined { + switch (kind) { + case 'approval': + case 'plan-review': + case 'question': + return kind + default: + return undefined + } +} + /** One top-level session row inside a workspace folder. */ export interface SessionNode { id: SessionId @@ -25,7 +57,7 @@ export interface SessionNode { title: string /** The provisional blank session (renderer shows the localized New Session title). */ blank: boolean - pendingInteraction?: PendingInteractionStatus + pendingInteraction?: SessionPendingInteractionStatus running: boolean /** Running descendants connected through uninterrupted subagent-origin lineage. */ runningSubagentCount: number @@ -100,16 +132,24 @@ function sessionTitle(session: SessionSummary): string { function sessionNode( s: SessionSummary, descendants: ReadonlyMap, + statuses: SessionStatuses, ): SessionNode { + // `SessionStatusSnapshot` is typed as ReadonlyMap, but the framework binds a + // plain record at runtime (client.js: `statuses[sessionId]`). Read both shapes + // so a hook backed by an object never throws "statuses.get is not a function". + const status = typeof (statuses as { get?: unknown } | undefined)?.get === 'function' + ? statuses.get(s.id) + : (statuses as unknown as Record)[s.id] + const pending = visiblePendingKind(status?.pendingInteraction?.kind) return { id: s.id, title: sessionTitle(s), blank: s.blank, - running: s.running, + running: status?.running ?? s.running, runningSubagentCount: descendants.get(s.id)?.runningCount ?? 0, - completed: s.completed === true, + completed: status?.completionUnread === true, updatedAt: s.updatedAt, - ...(s.pendingInteraction === undefined ? {} : { pendingInteraction: s.pendingInteraction }), + ...(pending === undefined ? {} : { pendingInteraction: pending }), } } @@ -119,13 +159,15 @@ function workspaceSessions( workspace: WorkspaceView, archived: ReadonlySet, descendants: ReadonlyMap, + statuses: SessionStatuses, + current: SessionId | undefined, ): SessionNode[] { const nodes: SessionNode[] = [] for (const id of workspace.sessionIds) { const summary = list.byId[id] if (summary === undefined) continue // account may lead the list pull; appears when the summary lands - if (!sessionVisible(summary, list.current, archived)) continue - nodes.push(sessionNode(summary, descendants)) + if (!sessionVisible(summary, current, archived)) continue + nodes.push(sessionNode(summary, descendants, statuses)) } return nodes } @@ -139,6 +181,8 @@ function workspaceSessions( * @param view - local expansion arrays. * @param manual - runtime overlay (manual groups + overrides). A workspace's * manual override wins over rule classification; removing it reverts to rules. + * @param statuses - unified UI status by Session (drives the running / warning + * / unread-completion row indicators); defaults to none (tests). * @returns category sections in render order (rule categories first, then * manual-only ones, uncategorized last). Manual groups render even while * empty; empty rule buckets stay hidden. @@ -150,11 +194,13 @@ export function deriveGroups( config: GroupsConfig, view: GroupsTreeView, manual: ManualGroups, + statuses: SessionStatuses = new Map(), ): CategoryNode[] { const archived = new Set(archivedSessionIds) const expandedCategories = new Set(view.expandedCategories) const expandedWorkspaces = new Set(view.expandedWorkspaces) const descendants = indexSubagentDescendants(list.byId) + const current = currentSessionId(list) // Bucket workspaces by display key. Seed with every effective category so // manual groups render while empty. Top-level (ungrouped) workspaces are @@ -171,9 +217,9 @@ export function deriveGroups( } const manualCategories = new Set(manual.categories) - const currentWorkspaceId = list.current === undefined + const currentWorkspaceId = current === undefined ? undefined - : workspaces.find(w => w.sessionIds.includes(list.current as SessionId))?.workspaceId + : workspaces.find(w => w.sessionIds.includes(current))?.workspaceId const nodes: CategoryNode[] = [] // Effective categories in display order (categoryOrder applied). @@ -188,7 +234,7 @@ export function deriveGroups( for (const workspaceId of ordered) { const workspace = bucket.find(w => w.workspaceId === workspaceId) if (workspace === undefined) continue - const sessions = workspaceSessions(list, workspace, archived, descendants) + const sessions = workspaceSessions(list, workspace, archived, descendants, statuses, current) const wsExpanded = expandedWorkspaces.has(workspace.workspaceId as string) const wsContainsCurrent = workspace.workspaceId === currentWorkspaceId if (wsContainsCurrent) containsCurrent = true @@ -228,13 +274,15 @@ export function deriveTopLevel( config: GroupsConfig, view: GroupsTreeView, manual: ManualGroups, + statuses: SessionStatuses = new Map(), ): WorkspaceGroupNode[] { const archived = new Set(archivedSessionIds) const expandedWorkspaces = new Set(view.expandedWorkspaces) const descendants = indexSubagentDescendants(list.byId) - const currentWorkspaceId = list.current === undefined + const current = currentSessionId(list) + const currentWorkspaceId = current === undefined ? undefined - : workspaces.find(w => w.sessionIds.includes(list.current as SessionId))?.workspaceId + : workspaces.find(w => w.sessionIds.includes(current))?.workspaceId const topLevelIds = workspaces .filter(w => resolveCategory(config, manual, w.workspaceId, w.path, w.title) === undefined) @@ -245,7 +293,7 @@ export function deriveTopLevel( for (const workspaceId of ordered) { const workspace = workspaces.find(w => w.workspaceId === workspaceId) if (workspace === undefined) continue - const sessions = workspaceSessions(list, workspace, archived, descendants) + const sessions = workspaceSessions(list, workspace, archived, descendants, statuses, current) const wsExpanded = expandedWorkspaces.has(workspaceId) nodes.push({ workspaceId: workspace.workspaceId, @@ -294,6 +342,7 @@ export function deriveSearchMatches( if (q === '') return { matchedIds: new Set(), snippetsBySession: new Map(), hasMore: false } const archived = new Set(archivedSessionIds) const descendants = indexSubagentDescendants(list.byId) + const current = currentSessionId(list) const workspaceBySession = new Map() for (const workspace of workspaces) { @@ -307,7 +356,7 @@ export function deriveSearchMatches( const local: SessionSummary[] = [] for (const id of list.ids) { const summary = list.byId[id] - if (summary === undefined || summary.blank || !sessionVisible(summary, list.current, archived)) continue + if (summary === undefined || summary.blank || !sessionVisible(summary, current, archived)) continue if ( sessionTitle(summary).toLowerCase().includes(q) || labelOf(summary).toLowerCase().includes(q) @@ -327,7 +376,7 @@ export function deriveSearchMatches( for (const summary of local) include(summary) for (const item of content.items) { const summary = list.byId[item.sessionId] - if (summary !== undefined && !summary.blank && sessionVisible(summary, list.current, archived)) include(summary) + if (summary !== undefined && !summary.blank && sessionVisible(summary, current, archived)) include(summary) } const snippets = new Map() @@ -365,6 +414,8 @@ export interface SearchTree { * @param archivedSessionIds - registry-global archive set. * @param manual - runtime overlay (manual groups + overrides). * @param snippetsBySession - optional content-match snippets keyed by session id. + * @param statuses - unified UI status by Session (drives the running / warning + * / unread-completion row indicators); defaults to none (tests). * @returns group folders in render order plus top-level matched workspaces, * pruned to matched branches only. */ @@ -376,9 +427,11 @@ export function deriveSearchGroups( archivedSessionIds: readonly SessionId[], manual: ManualGroups, snippetsBySession?: ReadonlyMap, + statuses: SessionStatuses = new Map(), ): SearchTree { const archived = new Set(archivedSessionIds) const descendants = indexSubagentDescendants(list.byId) + const current = currentSessionId(list) const byCategory = new Map() for (const key of effectiveCategories(config, manual).map(e => e.key)) byCategory.set(key, []) @@ -390,8 +443,8 @@ export function deriveSearchGroups( for (const id of workspace.sessionIds) { const summary = list.byId[id] if (summary === undefined || !matchedIds.has(id)) continue - if (!sessionVisible(summary, list.current, archived)) continue - const node = sessionNode(summary, descendants) + if (!sessionVisible(summary, current, archived)) continue + const node = sessionNode(summary, descendants, statuses) const snippet = snippetsBySession?.get(id) nodes.push({ ...node, diff --git a/src/core/types.ts b/src/core/types.ts index 42657da..a3e193c 100644 --- a/src/core/types.ts +++ b/src/core/types.ts @@ -1,5 +1,5 @@ /** - * Shared config types for dsh-workspace-groups. Pure types (zero runtime + * Shared config types for @dsh-xhl/workspace-groups. Pure types (zero runtime * deps) so both halves — the node half (sidecar YAML reading) and the * browser half (tree derivation) — compile against the same contract. */ diff --git a/src/host-config.ts b/src/host-config.ts index c1d059e..9206b0e 100644 --- a/src/host-config.ts +++ b/src/host-config.ts @@ -1,5 +1,5 @@ /** - * Sidecar config reading for dsh-workspace-groups. The classification rules + * Sidecar config reading for @dsh-xhl/workspace-groups. The classification rules * live in a user-editable YAML file (default `~/.dsh/workspace-groups.yaml`), * read and validated on the host, served to the browser half as JSON. The * core workspace.json and session storage are never touched. diff --git a/src/host-manual.ts b/src/host-manual.ts index 18af489..a66670f 100644 --- a/src/host-manual.ts +++ b/src/host-manual.ts @@ -1,5 +1,5 @@ /** - * Runtime grouping overlay for dsh-workspace-groups: manual groups created in + * Runtime grouping overlay for @dsh-xhl/workspace-groups: manual groups created in * the sidebar UI and per-workspace category overrides. Stored in a plugin- * owned JSON sidecar (`$DSH_HOME/workspace-groups.manual.json`), separate from * the operator YAML — the YAML stays the rule source, this file only records diff --git a/src/host-tabs.ts b/src/host-tabs.ts new file mode 100644 index 0000000..cf22fa4 --- /dev/null +++ b/src/host-tabs.ts @@ -0,0 +1,148 @@ +/** + * Host-side persistence for the session-tab strip. + * + * Why the host and not the browser: **browser storage is scoped to the origin, + * and the origin includes the PORT.** `dsh web` / `dsh test` / the desktop shell + * each pick a port, and a different port is a different origin, so BOTH + * `localStorage` and `sessionStorage` start empty on the next launch. A tab list + * kept there survives a reload only by luck (same port) and is lost on the next + * start. + * + * Host storage has no such problem: one JSON sidecar under `$DSH_HOME`, keyed by + * nothing but the plugin, so every port and every session reads the same file. + * That file IS the strip's memory — it is returned as-is, with no browser-session + * marker gating it. + * + * (An earlier version DID gate on a `sessionKey` kept in `sessionStorage`, to + * express "clear when the browser closes". That cannot work here: the marker is + * itself per-origin, so a port change erased it, the host saw an unfamiliar + * marker, and every restart silently discarded the user's tabs. Persistence the + * user can rely on beats a tidy-up nobody asked for.) + * + * Writes are atomic (temp file + fsync + rename), matching the manual overlay. + */ +import { mkdir, open, readFile, rename, unlink } from 'node:fs/promises' +import { dirname, resolve } from 'node:path' +import { homedir } from 'node:os' + +/** One persisted tab. */ +export interface PersistedTab { + /** Session id the tab points at. */ + readonly sessionId: string + /** Arrival key (React list identity). */ + readonly order: number +} + +/** The persisted document. */ +export interface TabsDocument { + /** Shape version; a mismatch discards the file rather than guessing. */ + readonly version: 1 + /** Arrival counter, kept ahead of every tab's own order. */ + readonly order: number + readonly tabs: readonly PersistedTab[] +} + +/** Default location: `$DSH_HOME/workspace-groups.tabs.json`. */ +export function defaultTabsPath(): string { + const home = process.env.DSH_HOME !== undefined && process.env.DSH_HOME !== '' + ? process.env.DSH_HOME + : resolve(homedir(), '.dsh') + return resolve(home, 'workspace-groups.tabs.json') +} + +/** + * Parse + shape-validate a tabs document. + * + * Tolerant on purpose: this file is a display cache, so a malformed one must + * read as "no tabs" rather than break the strip. Individual bad rows are dropped + * and the rest kept. Unknown fields (such as the `sessionKey` an older build + * wrote) are ignored, so an existing file keeps working across the change. + * + * @param raw - parsed JSON value. + * @returns the normalized document, or null when it is unusable. + */ +export function parseTabsDocument(raw: unknown): TabsDocument | null { + if (typeof raw !== 'object' || raw === null || Array.isArray(raw)) return null + const source = raw as Record + if (source.version !== 1) return null + if (typeof source.order !== 'number' || !Number.isFinite(source.order)) return null + if (!Array.isArray(source.tabs)) return null + const tabs: PersistedTab[] = [] + const seen = new Set() + for (const entry of source.tabs) { + if (typeof entry !== 'object' || entry === null) continue + const row = entry as Record + if (typeof row.sessionId !== 'string' || row.sessionId === '') continue + if (typeof row.order !== 'number' || !Number.isFinite(row.order)) continue + if (seen.has(row.sessionId)) continue + seen.add(row.sessionId) + tabs.push({ sessionId: row.sessionId, order: row.order }) + } + return { + version: 1, + order: source.order, + tabs, + } +} + +/** + * Read the tabs document. + * + * A missing file is not an error (first run). A corrupt one is reported as null + * so the caller starts empty, and the next write repairs the file. + * + * @param path - sidecar path. + * @returns the document, or null when absent/unusable. + */ +export async function readTabsDocument(path: string): Promise { + let text: string + try { + text = await readFile(path, 'utf8') + } catch (error) { + if ((error as NodeJS.ErrnoException).code === 'ENOENT') return null + throw error + } + try { + return parseTabsDocument(JSON.parse(text)) + } catch { + return null + } +} + +/** + * Write the tabs document atomically. + * @param path - sidecar path. + * @param document - document to store. + */ +export async function writeTabsDocument(path: string, document: TabsDocument): Promise { + await mkdir(dirname(path), { recursive: true }) + const temp = `${path}.${process.pid}.${Date.now()}.tmp` + const body = `${JSON.stringify(document, null, 2)}\n` + const handle = await open(temp, 'w') + try { + await handle.writeFile(body, 'utf8') + await handle.sync() + } finally { + await handle.close() + } + try { + await rename(temp, path) + } catch (error) { + await unlink(temp).catch(() => {}) + throw error + } +} + +/** + * Build the document to persist. + * @param state - the client's current strip and its arrival counter. + * @returns the document to write. + */ +export function documentForTabs(state: { order: number; tabs: readonly PersistedTab[] }): TabsDocument { + const highest = state.tabs.reduce((max, tab) => Math.max(max, tab.order), 0) + return { + version: 1, + order: Math.max(state.order, highest), + tabs: [...state.tabs], + } +} diff --git a/src/index.ts b/src/index.ts index 1bba40a..4f4dc61 100644 --- a/src/index.ts +++ b/src/index.ts @@ -6,6 +6,9 @@ * - `GET /workspace-groups/config` — snapshot of the YAML rule categories * merged with the runtime manual overlay (groups + assignments). Read-only * for the rules; the overlay is attached so one fetch boots the browser. + * - `GET /workspace-groups/tabs` — the persisted session-tab strip (host-side + * sidecar; see host-tabs.ts for why it cannot live in the browser). + * - `PUT /workspace-groups/tabs` — replace the stored strip whole. * - `PUT /workspace-groups/manual` — replace the whole manual overlay * (manual groups + per-workspace overrides). Validated against the current * rule categories, written atomically to the plugin-owned JSON sidecar. @@ -22,9 +25,17 @@ import { validateManualGroups, writeManualGroups, } from './host-manual.ts' +import { + defaultTabsPath, + documentForTabs, + readTabsDocument, + writeTabsDocument, + type PersistedTab, + type TabsDocument, +} from './host-tabs.ts' /** Plugin identity for cordis.yml rows. */ -export const name = 'dsh-workspace-groups' +export const name = '@dsh-xhl/workspace-groups' /** Services required before mounting: the webserver route. */ export const inject = ['webServer'] @@ -39,6 +50,36 @@ class HttpError extends Error { } } +/** + * Shape-validate a PUT /tabs body. + * + * Returns null on a malformed payload rather than throwing, so the route can + * answer 400 without a try/catch around the parse. Individual bad tab rows are + * dropped (the strip is a display cache; one bad row must not reject a whole + * write), and duplicate session ids are collapsed to the first. + * + * @param raw - parsed request body. + * @returns the payload, or null when the envelope is unusable. + */ +function parseTabsPayload(raw: unknown): { order: number; tabs: PersistedTab[] } | null { + if (typeof raw !== 'object' || raw === null || Array.isArray(raw)) return null + const source = raw as Record + if (typeof source.order !== 'number' || !Number.isFinite(source.order)) return null + if (!Array.isArray(source.tabs)) return null + const tabs: PersistedTab[] = [] + const seen = new Set() + for (const entry of source.tabs) { + if (typeof entry !== 'object' || entry === null) continue + const row = entry as Record + if (typeof row.sessionId !== 'string' || row.sessionId === '') continue + if (typeof row.order !== 'number' || !Number.isFinite(row.order)) continue + if (seen.has(row.sessionId)) continue + seen.add(row.sessionId) + tabs.push({ sessionId: row.sessionId, order: row.order }) + } + return { order: source.order, tabs } +} + /** Write a plain-text error response with the given status. */ function writeError(res: ServerResponse, status: number, message: string): void { res.writeHead(status, { 'Content-Type': 'text/plain; charset=utf-8' }) @@ -63,6 +104,7 @@ async function readBody(req: IncomingMessage, limit: number): Promise { export function apply(ctx: GroupsContext): void { const configPath = defaultConfigPath() const manualPath = defaultManualPath() + const tabsPath = defaultTabsPath() ctx.effect(() => ctx.webServer.register({ kind: 'exact', @@ -91,7 +133,61 @@ export function apply(ctx: GroupsContext): void { }) res.end(req.method === 'HEAD' ? undefined : body) }, - }), 'dsh-workspace-groups: /workspace-groups/config route') + }), '@dsh-xhl/workspace-groups: /workspace-groups/config route') + + ctx.effect(() => ctx.webServer.register({ + kind: 'exact', + path: '/workspace-groups/tabs', + handler: async (req, res) => { + if (req.method === 'GET' || req.method === 'HEAD') { + let stored: TabsDocument | null + try { + stored = await readTabsDocument(tabsPath) + } catch (error) { + writeError(res, 500, `workspace-groups: failed to read tabs: ${error instanceof Error ? error.message : String(error)}`) + return + } + const body = JSON.stringify({ tabs: stored?.tabs ?? [] }) + res.writeHead(200, { + 'Content-Type': 'application/json; charset=utf-8', + 'Cache-Control': 'no-store', + 'Content-Length': Buffer.byteLength(body), + }) + res.end(req.method === 'HEAD' ? undefined : body) + return + } + if (req.method !== 'PUT') { + writeError(res, 405, 'method not allowed') + return + } + let raw: unknown + try { + raw = JSON.parse(await readBody(req, MAX_MANUAL_BODY_BYTES)) + } catch (error) { + const status = error instanceof HttpError ? error.status : 400 + writeError(res, status, `workspace-groups: ${error instanceof Error ? error.message : String(error)}`) + return + } + const parsed = parseTabsPayload(raw) + if (parsed === null) { + writeError(res, 400, 'workspace-groups: malformed tabs payload') + return + } + try { + await writeTabsDocument(tabsPath, documentForTabs(parsed)) + } catch (error) { + writeError(res, 500, `workspace-groups: failed to write tabs: ${error instanceof Error ? error.message : String(error)}`) + return + } + const body = JSON.stringify({ ok: true }) + res.writeHead(200, { + 'Content-Type': 'application/json; charset=utf-8', + 'Cache-Control': 'no-store', + 'Content-Length': Buffer.byteLength(body), + }) + res.end(body) + }, + }), '@dsh-xhl/workspace-groups: /workspace-groups/tabs route') ctx.effect(() => ctx.webServer.register({ kind: 'exact', @@ -134,5 +230,5 @@ export function apply(ctx: GroupsContext): void { }) res.end(body) }, - }), 'dsh-workspace-groups: /workspace-groups/manual route') + }), '@dsh-xhl/workspace-groups: /workspace-groups/manual route') } diff --git a/tsdown.config.ts b/tsdown.config.ts index 220ab73..5ee2ce2 100644 --- a/tsdown.config.ts +++ b/tsdown.config.ts @@ -40,6 +40,13 @@ const CLIENT_EXTERNALS = [ '@deepseek-ai/cordis', '@deepseek-ai/dsh-client-ui-slots', '@deepseek-ai/dsh-client-ui-primitives', + // `defineStore` / store handle types. In the current shell the store runtime is + // the module-table row `@deepseek-ai/dsh-client-store`: official plugins load it + // exactly this way (e.g. `@deepseek-ai/dsh-api-job-controller/lib/client.js` + // does `require("@deepseek-ai/dsh-client-store")`). The older + // `@deepseek-ai/dsh-client-runtime/client` row is kept for compatibility with + // plugins built before the rename. + '@deepseek-ai/dsh-client-store', '@deepseek-ai/dsh-client-runtime/client', ] as const @@ -140,7 +147,7 @@ function clientConfig(): UserConfig { ], outputOptions: { entryFileNames: 'client.js', - banner: `window.__ModuleLoader__.load({ id: "dsh-workspace-groups", factory: (require) => {`, + banner: `window.__ModuleLoader__.load({ id: "@dsh-xhl/workspace-groups", factory: (require) => {`, footer: 'return module.exports; } });', intro: 'var module = { exports: {} }; var exports = module.exports;', },