From d17381a221796d64fdb26669c7438c8057971f57 Mon Sep 17 00:00:00 2001 From: DrSmoothl <1787882683@qq.com> Date: Thu, 2 Jul 2026 15:02:13 +0800 Subject: [PATCH 01/16] perf(webui): batch log SSE into ~80ms flushes instead of per-line setState MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 日志页每收到一条日志就 setLogs(prev => [...prev.filter(id≠), entry].slice(-cap)), 高日志速率下是每条一次 O(n) 过滤+复制 + 一次 React commit。改为入队到 pending、 每 ~80ms 批量 flush:一次 O(n) 合并(Map 去重、last wins)+ 一次 commit。去重(重连 重放同 id)与 maxLines 上限语义保持不变,卸载时 dispose + 清 timer。 --- .../webui/src/components/pages/logs-page.tsx | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/packages/webui/src/components/pages/logs-page.tsx b/packages/webui/src/components/pages/logs-page.tsx index 3978eccf..03e0e1f0 100644 --- a/packages/webui/src/components/pages/logs-page.tsx +++ b/packages/webui/src/components/pages/logs-page.tsx @@ -141,9 +141,27 @@ export function LogsPage() { }, [api, serverLevel, levelBusy]); useEffect(() => { - return api.logs.stream({ + // Batch incoming lines: buffer in a ref and flush on a ~80ms timer instead + // of a per-line setState. Under a high log rate this turns N O(n) array + // copies + N React commits per window into one. Dedup-by-id and the + // maxLines cap are preserved (a reconnect can replay recent ids). + let pending: LogEntry[] = []; + let flushTimer: number | null = null; + const flush = () => { + flushTimer = null; + if (pending.length === 0) return; + const batchMap = new Map(pending.map((e) => [e.id, e] as const)); + pending = []; + setLogs((prev) => { + const kept = prev.length ? prev.filter((it) => !batchMap.has(it.id)) : prev; + const merged = kept.length ? [...kept, ...batchMap.values()] : [...batchMap.values()]; + return merged.length > maxLinesRef.current ? merged.slice(-maxLinesRef.current) : merged; + }); + }; + const dispose = api.logs.stream({ onLine: (entry) => { - setLogs((prev) => [...prev.filter((it) => it.id !== entry.id), entry].slice(-maxLinesRef.current)); + pending.push(entry); + if (flushTimer == null) flushTimer = window.setTimeout(flush, 80); }, onStatus: (s) => { if (s === 'open') setStreamStatus('实时'); @@ -151,6 +169,10 @@ export function LogsPage() { else setStreamStatus('已断开'); }, }); + return () => { + dispose(); + if (flushTimer != null) clearTimeout(flushTimer); + }; }, [api]); useEffect(() => { From 99547e847efe034c63cdcea07abf3cd81a2f2dc5 Mon Sep 17 00:00:00 2001 From: DrSmoothl <1787882683@qq.com> Date: Thu, 2 Jul 2026 15:02:13 +0800 Subject: [PATCH 02/16] perf(webui): gate list/system polling on tab visibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 两个兜底轮询(列表 reconcile、systemInfo 快轮询)的 tick 在 document.hidden 时跳过, 并监听 visibilitychange 在切回时立即补一次。后台标签页不再空转 fetch;实时状态本就 走 SSE(未门控),切回时立即刷新无空态闪烁。 --- packages/webui/src/router/app-layout.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/webui/src/router/app-layout.tsx b/packages/webui/src/router/app-layout.tsx index 15e314e0..4e741f99 100644 --- a/packages/webui/src/router/app-layout.tsx +++ b/packages/webui/src/router/app-layout.tsx @@ -142,16 +142,21 @@ export function AppLayout() { let cancelled = false; const reconcileMs = Math.max(pollInterval * 10, 10_000); const tick = async () => { - if (cancelled) return; + // Skip while the tab is hidden — SSE already carries live updates, and a + // backgrounded tab has no UI to refresh. Re-tick on becoming visible. + if (cancelled || document.hidden) return; await Promise.all([refreshQqList(), refreshProcesses(), refreshConnections()]); }; // Initial tick primes the lists before the SSE handshake completes // (avoids a flash of empty state in the chrome). tick(); const interval = setInterval(tick, reconcileMs); + const onVisible = () => { if (!document.hidden) void tick(); }; + document.addEventListener('visibilitychange', onVisible); return () => { cancelled = true; clearInterval(interval); + document.removeEventListener('visibilitychange', onVisible); }; }, [pollInterval, refreshQqList, refreshProcesses, refreshConnections]); @@ -164,14 +169,17 @@ export function AppLayout() { if (pollInterval <= 0) return; let cancelled = false; const tick = async () => { - if (cancelled) return; + if (cancelled || document.hidden) return; await refreshSystem(); }; tick(); const interval = setInterval(tick, pollInterval); + const onVisible = () => { if (!document.hidden) void tick(); }; + document.addEventListener('visibilitychange', onVisible); return () => { cancelled = true; clearInterval(interval); + document.removeEventListener('visibilitychange', onVisible); }; }, [pollInterval, refreshSystem]); From c85c510c0b5a3494e63dbe3506c8aef24661c491 Mon Sep 17 00:00:00 2001 From: DrSmoothl <1787882683@qq.com> Date: Thu, 2 Jul 2026 15:02:13 +0800 Subject: [PATCH 03/16] perf(webui): trim debug-view rendering cost (json-tree, activity, tester) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - json-tree:折叠节点不再枚举子项(改用 count),整棵树的 JSON.stringify 从每次渲染 改为点击复制时才算。 - live-activity:搜索命中串在入队时预生成,过滤不再对每行 JSON.stringify(300 行 × 每次击键)。 - action-tester:流式帧封顶 2000,长/失控流不再无限增长数组与 DOM。 均行为保持(或纯改善),对抗性 Agent 逐条核验无回归。 --- .../src/components/debug/action-tester.tsx | 5 +++- .../src/components/debug/live-activity.tsx | 8 ++++-- .../webui/src/components/ui/json-tree.tsx | 28 ++++++++++++------- 3 files changed, 27 insertions(+), 14 deletions(-) diff --git a/packages/webui/src/components/debug/action-tester.tsx b/packages/webui/src/components/debug/action-tester.tsx index a463d8ee..84e18229 100644 --- a/packages/webui/src/components/debug/action-tester.tsx +++ b/packages/webui/src/components/debug/action-tester.tsx @@ -25,6 +25,9 @@ const cardCls = 'rounded-2xl border border-border/60 bg-card/80 shadow-[0_1px_2p // positives just add one extra click; false negatives skip a confirm — both low // stakes (the amber banner already warns that any write is real). const DESTRUCTIVE_RE = /(kick|ban|mute|recall|withdraw|delete|del_|dismiss|disband|leave|quit|remove|revoke)/i; +// Cap retained stream frames so a long-running / runaway stream can't grow the +// array and DOM without bound. Generous enough to keep a full normal stream. +const MAX_STREAM_FRAMES = 2000; function qqAvatarUrl(uin: string) { return `/avatar/${encodeURIComponent(uin)}`; @@ -136,7 +139,7 @@ export function ActionTester({ accounts, docs, presetAction }: { accounts: QQInf try { await api.debug.invokeStream(uin, actionName.trim(), params, (frame) => { last = frame; - setFrames((prev) => [...prev, frame]); + setFrames((prev) => (prev.length >= MAX_STREAM_FRAMES ? [...prev.slice(-(MAX_STREAM_FRAMES - 1)), frame] : [...prev, frame])); const d = frame.data as { type?: string; progress?: number; transferred?: number; total?: number } | undefined; if (d && typeof d.progress === 'number') tasks.update(taskId, { progress: d.progress }); else if (d && typeof d.transferred === 'number' && typeof d.total === 'number' && d.total > 0) tasks.update(taskId, { progress: d.transferred / d.total }); diff --git a/packages/webui/src/components/debug/live-activity.tsx b/packages/webui/src/components/debug/live-activity.tsx index eac53d87..4ab93647 100644 --- a/packages/webui/src/components/debug/live-activity.tsx +++ b/packages/webui/src/components/debug/live-activity.tsx @@ -14,7 +14,7 @@ import type { DebugStreamMessage } from '@/types'; const STREAM_CAP = 300; const cardCls = 'rounded-2xl border border-border/60 bg-card/80 shadow-[0_1px_2px_rgb(0_0_0/0.04),0_8px_24px_-12px_rgb(0_0_0/0.10)] backdrop-blur-sm'; -interface StreamRow { id: number; at: number; msg: Extract } +interface StreamRow { id: number; at: number; msg: Extract; search: string } function IconBtn({ onClick, title, children }: { onClick: () => void; title: string; children: ReactNode }) { return ( @@ -103,7 +103,9 @@ export function LiveActivity() { (m) => { if (m.kind === 'ready' || pausedRef.current) return; setRows((prev) => { - const next = [{ id: idRef.current++, at: Date.now(), msg: m }, ...prev]; + // Precompute the search haystack once at enqueue, so filtering never + // re-stringifies every row on each keystroke. + const next = [{ id: idRef.current++, at: Date.now(), msg: m, search: JSON.stringify(m).toLowerCase() }, ...prev]; return next.length > STREAM_CAP ? next.slice(0, STREAM_CAP) : next; }); }, @@ -119,7 +121,7 @@ export function LiveActivity() { if (!q) return true; if (r.msg.kind === 'dropped') return false; const { label } = rowLabel(r.msg); - return label.toLowerCase().includes(q) || r.msg.uin.includes(q) || JSON.stringify(r.msg).toLowerCase().includes(q); + return label.toLowerCase().includes(q) || r.msg.uin.includes(q) || r.search.includes(q); }); }, [rows, kindFilter, query]); diff --git a/packages/webui/src/components/ui/json-tree.tsx b/packages/webui/src/components/ui/json-tree.tsx index 36a671f2..59922222 100644 --- a/packages/webui/src/components/ui/json-tree.tsx +++ b/packages/webui/src/components/ui/json-tree.tsx @@ -66,12 +66,18 @@ function Node({ k, value, depth, defaultOpen }: { k?: string; value: unknown; de ); } - const entries = Array.isArray(value) - ? value.map((v, i) => [String(i), v] as const) - : Object.entries(value as Record); - const openB = Array.isArray(value) ? '[' : '{'; - const closeB = Array.isArray(value) ? ']' : '}'; - const shown = open ? Math.min(entries.length, limit) : 0; + const isArr = Array.isArray(value); + const count = isArr ? (value as unknown[]).length : Object.keys(value as object).length; + const openB = isArr ? '[' : '{'; + const closeB = isArr ? ']' : '}'; + const shown = open ? Math.min(count, limit) : 0; + // Only materialise child entries when expanded — a deep tree has many + // collapsed nodes, and enumerating each on every render is wasted work. + const entries: ReadonlyArray = open + ? (isArr + ? (value as unknown[]).map((v, i) => [String(i), v] as const) + : Object.entries(value as Record)) + : []; return (
@@ -84,21 +90,21 @@ function Node({ k, value, depth, defaultOpen }: { k?: string; value: unknown; de {keyLabel} {openB} - {!open && {entries.length}{Array.isArray(value) ? '' : ' keys'}{closeB}} + {!open && {count}{isArr ? '' : ' keys'}{closeB}} {open && ( <> {entries.slice(0, shown).map(([ck, cv]) => ( ))} - {entries.length > shown && ( + {count > shown && ( )}
{closeB}
@@ -110,9 +116,11 @@ function Node({ k, value, depth, defaultOpen }: { k?: string; value: unknown; de export function JsonTree({ data, className, maxHeight = '20rem' }: { data: unknown; className?: string; maxHeight?: string }) { const [copied, setCopied] = useState(false); - const text = (() => { try { return JSON.stringify(data, null, 2); } catch { return String(data); } })(); const copy = async () => { + // Stringify lazily, only on an actual copy — not on every render (a large + // payload would otherwise re-serialise the whole tree each commit). + const text = (() => { try { return JSON.stringify(data, null, 2); } catch { return String(data); } })(); try { if (navigator.clipboard?.writeText) { await navigator.clipboard.writeText(text); From 1f2bf4d3f27fc01e5d7794da0ac351424c77073a Mon Sep 17 00:00:00 2001 From: DrSmoothl <1787882683@qq.com> Date: Thu, 2 Jul 2026 15:16:40 +0800 Subject: [PATCH 04/16] chore(deps): patch low-severity esbuild + @babel/core advisories MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 两个构建/测试期工具链的 transitive 依赖存在低危「任意文件读」告警(非运行时产物): - esbuild 0.27.7 → 0.28.1(dev server 任意文件读,vite 接受 ^0.28.0,兼容) - @babel/core 7.29.0 → 7.29.7(sourceMappingURL 任意文件读) pnpm.overrides 钉住修复版下限(esbuild@<0.28.1 / @babel/core@<7.29.6),防止后续 lockfile 重生回退。全 12 包 typecheck 干净、webui vite build 通过、protocol 572 测试 全绿,工具链未受影响。 --- package.json | 6 +- pnpm-lock.yaml | 520 ++++++++++++++++++++++++++----------------------- 2 files changed, 281 insertions(+), 245 deletions(-) diff --git a/package.json b/package.json index c83b5e0c..28e3c654 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,11 @@ }, "onlyBuiltDependencies": [ "better-sqlite3" - ] + ], + "overrides": { + "esbuild@<0.28.1": "^0.28.1", + "@babel/core@<7.29.6": "^7.29.6" + } }, "packageManager": "pnpm@10.28.0", "engines": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e0351dfb..f079dbbd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,7 +14,8 @@ catalogs: version: 8.1.0 overrides: - tar: ^7.5.13 + esbuild@<0.28.1: ^0.28.1 + '@babel/core@<7.29.6': ^7.29.6 importers: @@ -68,10 +69,10 @@ importers: version: 6.0.2 vite: specifier: 'catalog:' - version: 8.1.0(@types/node@24.12.2)(esbuild@0.27.7)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0) + version: 8.1.0(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0) vitest: specifier: ^4.1.4 - version: 4.1.4(@types/node@24.12.2)(@vitest/coverage-istanbul@4.1.4)(@vitest/coverage-v8@4.1.4)(vite@8.1.0(@types/node@24.12.2)(esbuild@0.27.7)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0)) + version: 4.1.4(@types/node@24.12.2)(@vitest/coverage-istanbul@4.1.4)(@vitest/coverage-v8@4.1.4)(vite@8.1.0(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0)) packages/common: devDependencies: @@ -83,7 +84,7 @@ importers: version: 6.0.2 vitest: specifier: ^4.1.4 - version: 4.1.4(@types/node@24.12.2)(@vitest/coverage-istanbul@4.1.4)(@vitest/coverage-v8@4.1.4)(vite@8.1.0(@types/node@24.12.2)(esbuild@0.27.7)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0)) + version: 4.1.4(@types/node@24.12.2)(@vitest/coverage-istanbul@4.1.4)(@vitest/coverage-v8@4.1.4)(vite@8.1.0(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0)) packages/core: dependencies: @@ -132,13 +133,13 @@ importers: version: 6.0.2 vite: specifier: 'catalog:' - version: 8.1.0(@types/node@24.12.2)(esbuild@0.27.7)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0) + version: 8.1.0(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0) vite-plugin-cp: specifier: ^6.0.3 version: 6.0.3 vitest: specifier: ^4.1.4 - version: 4.1.4(@types/node@24.12.2)(@vitest/coverage-istanbul@4.1.4)(@vitest/coverage-v8@4.1.4)(vite@8.1.0(@types/node@24.12.2)(esbuild@0.27.7)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0)) + version: 4.1.4(@types/node@24.12.2)(@vitest/coverage-istanbul@4.1.4)(@vitest/coverage-v8@4.1.4)(vite@8.1.0(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0)) packages/mcp: dependencies: @@ -160,10 +161,10 @@ importers: version: 6.0.2 vite: specifier: 'catalog:' - version: 8.1.0(@types/node@24.12.2)(esbuild@0.27.7)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0) + version: 8.1.0(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0) vitest: specifier: ^4.1.4 - version: 4.1.4(@types/node@24.12.2)(@vitest/coverage-istanbul@4.1.4)(@vitest/coverage-v8@4.1.4)(vite@8.1.0(@types/node@24.12.2)(esbuild@0.27.7)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0)) + version: 4.1.4(@types/node@24.12.2)(@vitest/coverage-istanbul@4.1.4)(@vitest/coverage-v8@4.1.4)(vite@8.1.0(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0)) packages/onebot: dependencies: @@ -194,10 +195,10 @@ importers: version: 6.0.2 vite: specifier: 'catalog:' - version: 8.1.0(@types/node@24.12.2)(esbuild@0.27.7)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0) + version: 8.1.0(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0) vitest: specifier: ^4.1.4 - version: 4.1.4(@types/node@24.12.2)(@vitest/coverage-istanbul@4.1.4)(@vitest/coverage-v8@4.1.4)(vite@8.1.0(@types/node@24.12.2)(esbuild@0.27.7)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0)) + version: 4.1.4(@types/node@24.12.2)(@vitest/coverage-istanbul@4.1.4)(@vitest/coverage-v8@4.1.4)(vite@8.1.0(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0)) packages/proto-defs: dependencies: @@ -232,10 +233,10 @@ importers: version: 6.0.2 vite: specifier: 'catalog:' - version: 8.1.0(@types/node@24.12.2)(esbuild@0.27.7)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0) + version: 8.1.0(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0) vitest: specifier: ^4.1.4 - version: 4.1.4(@types/node@24.12.2)(@vitest/coverage-istanbul@4.1.4)(@vitest/coverage-v8@4.1.4)(vite@8.1.0(@types/node@24.12.2)(esbuild@0.27.7)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0)) + version: 4.1.4(@types/node@24.12.2)(@vitest/coverage-istanbul@4.1.4)(@vitest/coverage-v8@4.1.4)(vite@8.1.0(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0)) packages/proton: dependencies: @@ -251,10 +252,10 @@ importers: version: 8.5.1(jiti@2.6.1)(postcss@8.5.15)(tsx@4.21.0)(typescript@6.0.2) vite: specifier: 'catalog:' - version: 8.1.0(@types/node@24.12.2)(esbuild@0.27.7)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0) + version: 8.1.0(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0) vitest: specifier: ^4.1.4 - version: 4.1.4(@types/node@24.12.2)(@vitest/coverage-istanbul@4.1.4)(@vitest/coverage-v8@4.1.4)(vite@8.1.0(@types/node@24.12.2)(esbuild@0.27.7)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0)) + version: 4.1.4(@types/node@24.12.2)(@vitest/coverage-istanbul@4.1.4)(@vitest/coverage-v8@4.1.4)(vite@8.1.0(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0)) packages/runtime: {} @@ -268,7 +269,7 @@ importers: version: 6.0.2 vitest: specifier: ^4.1.4 - version: 4.1.4(@types/node@24.12.2)(@vitest/coverage-istanbul@4.1.4)(@vitest/coverage-v8@4.1.4)(vite@8.1.0(@types/node@24.12.2)(esbuild@0.27.7)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0)) + version: 4.1.4(@types/node@24.12.2)(@vitest/coverage-istanbul@4.1.4)(@vitest/coverage-v8@4.1.4)(vite@8.1.0(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0)) packages/ui: dependencies: @@ -411,7 +412,7 @@ importers: version: 10.0.1(eslint@10.2.0(jiti@2.6.1)) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.1.0(@types/node@25.6.0)(esbuild@0.27.7)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0)) + version: 4.2.2(vite@8.1.0(@types/node@25.6.0)(esbuild@0.28.1)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0)) '@types/node': specifier: ^25.6.0 version: 25.6.0 @@ -423,7 +424,7 @@ importers: version: 19.2.3(@types/react@19.2.14) '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(vite@8.1.0(@types/node@25.6.0)(esbuild@0.27.7)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0)) + version: 6.0.1(vite@8.1.0(@types/node@25.6.0)(esbuild@0.28.1)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0)) eslint: specifier: ^10.2.0 version: 10.2.0(jiti@2.6.1) @@ -450,58 +451,66 @@ importers: version: 8.58.2(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) vite: specifier: 'catalog:' - version: 8.1.0(@types/node@25.6.0)(esbuild@0.27.7)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0) + version: 8.1.0(@types/node@25.6.0)(esbuild@0.28.1)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0) packages: - '@babel/code-frame@7.29.0': - resolution: {integrity: sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==} + '@babel/code-frame@7.29.7': + resolution: {integrity: sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==} engines: {node: '>=6.9.0'} - '@babel/compat-data@7.29.0': - resolution: {integrity: sha512-T1NCJqT/j9+cn8fvkt7jtwbLBfLC/1y1c7NtCeXFRgzGTsafi68MRv8yzkYSapBnFA6L3U2VSc02ciDzoAJhJg==} + '@babel/compat-data@7.29.7': + resolution: {integrity: sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==} engines: {node: '>=6.9.0'} - '@babel/core@7.29.0': - resolution: {integrity: sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==} + '@babel/core@7.29.7': + resolution: {integrity: sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==} engines: {node: '>=6.9.0'} - '@babel/generator@7.29.1': - resolution: {integrity: sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw==} + '@babel/generator@7.29.7': + resolution: {integrity: sha512-DkXD5OJQaAQIdZ1bt3UZdEnHAn9Imd3IVBdX03UFe+ony9Ojw5pzr9YVKGDY1jt+Gcn/FnGkNf8r+Vj5NOJWtQ==} engines: {node: '>=6.9.0'} - '@babel/helper-compilation-targets@7.28.6': - resolution: {integrity: sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA==} + '@babel/helper-compilation-targets@7.29.7': + resolution: {integrity: sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==} engines: {node: '>=6.9.0'} - '@babel/helper-globals@7.28.0': - resolution: {integrity: sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==} + '@babel/helper-globals@7.29.7': + resolution: {integrity: sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==} engines: {node: '>=6.9.0'} - '@babel/helper-module-imports@7.28.6': - resolution: {integrity: sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw==} + '@babel/helper-module-imports@7.29.7': + resolution: {integrity: sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==} engines: {node: '>=6.9.0'} - '@babel/helper-module-transforms@7.28.6': - resolution: {integrity: sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA==} + '@babel/helper-module-transforms@7.29.7': + resolution: {integrity: sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==} engines: {node: '>=6.9.0'} peerDependencies: - '@babel/core': ^7.0.0 + '@babel/core': ^7.29.6 '@babel/helper-string-parser@7.27.1': resolution: {integrity: sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==} engines: {node: '>=6.9.0'} + '@babel/helper-string-parser@7.29.7': + resolution: {integrity: sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==} + engines: {node: '>=6.9.0'} + '@babel/helper-validator-identifier@7.28.5': resolution: {integrity: sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==} engines: {node: '>=6.9.0'} - '@babel/helper-validator-option@7.27.1': - resolution: {integrity: sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==} + '@babel/helper-validator-identifier@7.29.7': + resolution: {integrity: sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==} engines: {node: '>=6.9.0'} - '@babel/helpers@7.29.2': - resolution: {integrity: sha512-HoGuUs4sCZNezVEKdVcwqmZN8GoHirLUcLaYVNBK2J0DadGtdcqgr3BCbvH8+XUo4NGjNl3VOtSjEKNzqfFgKw==} + '@babel/helper-validator-option@7.29.7': + resolution: {integrity: sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==} + engines: {node: '>=6.9.0'} + + '@babel/helpers@7.29.7': + resolution: {integrity: sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==} engines: {node: '>=6.9.0'} '@babel/parser@7.29.2': @@ -514,18 +523,27 @@ packages: engines: {node: '>=6.0.0'} hasBin: true - '@babel/template@7.28.6': - resolution: {integrity: sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==} + '@babel/parser@7.29.7': + resolution: {integrity: sha512-hnORnjP/1P/zFEndoeX+n+t1RwWRJiJpM/jO7FW32Kn9r5+sJB2JWOdYo4L6k78j15eCwY3Gm/7364B1EMwtNg==} + engines: {node: '>=6.0.0'} + hasBin: true + + '@babel/template@7.29.7': + resolution: {integrity: sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==} engines: {node: '>=6.9.0'} - '@babel/traverse@7.29.0': - resolution: {integrity: sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA==} + '@babel/traverse@7.29.7': + resolution: {integrity: sha512-EhlfNQtZ+NK22w5BM61ciuiq1m58ed33Wr1Xan//ZRTy6hgjnwyCffRYwzsGXdASJSUJ1guZILsErh1eQcl+zw==} engines: {node: '>=6.9.0'} '@babel/types@7.29.0': resolution: {integrity: sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==} engines: {node: '>=6.9.0'} + '@babel/types@7.29.7': + resolution: {integrity: sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA==} + engines: {node: '>=6.9.0'} + '@bcoe/v8-coverage@1.0.2': resolution: {integrity: sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA==} engines: {node: '>=18'} @@ -542,158 +560,158 @@ packages: '@epic-web/invariant@1.0.0': resolution: {integrity: sha512-lrTPqgvfFQtR/eY/qkIzp98OGdNJu0m5ji3q/nJI8v3SXkRKEnWiOxMmbvcSoAIzv/cGiuvRy57k4suKQSAdwA==} - '@esbuild/aix-ppc64@0.27.7': - resolution: {integrity: sha512-EKX3Qwmhz1eMdEJokhALr0YiD0lhQNwDqkPYyPhiSwKrh7/4KRjQc04sZ8db+5DVVnZ1LmbNDI1uAMPEUBnQPg==} + '@esbuild/aix-ppc64@0.28.1': + resolution: {integrity: sha512-Svl7tq8k/08+p6CXPpRjQ1fKX+1odH/BQbb48fV6fj3CWHhsoIOoY87w1oHXm0qEpkIK3ZfVgp0hed3XBXzXMQ==} engines: {node: '>=18'} cpu: [ppc64] os: [aix] - '@esbuild/android-arm64@0.27.7': - resolution: {integrity: sha512-62dPZHpIXzvChfvfLJow3q5dDtiNMkwiRzPylSCfriLvZeq0a1bWChrGx/BbUbPwOrsWKMn8idSllklzBy+dgQ==} + '@esbuild/android-arm64@0.28.1': + resolution: {integrity: sha512-34EGEbCIAgosYz6goLcopX6Mo7NyGv9tfwEM2/7Ce2VcVRk568iSvniGWcUXIy7wEDR1wzolcxcriFVrWYcwBg==} engines: {node: '>=18'} cpu: [arm64] os: [android] - '@esbuild/android-arm@0.27.7': - resolution: {integrity: sha512-jbPXvB4Yj2yBV7HUfE2KHe4GJX51QplCN1pGbYjvsyCZbQmies29EoJbkEc+vYuU5o45AfQn37vZlyXy4YJ8RQ==} + '@esbuild/android-arm@0.28.1': + resolution: {integrity: sha512-0k2F129Xdio1TdJfzJ8sy1Q47vUD2NnwdhiAf7drUN1EBTfPf4hsFCtmMgu/6m8JSzsBrlmVjudMBQqOfG8usQ==} engines: {node: '>=18'} cpu: [arm] os: [android] - '@esbuild/android-x64@0.27.7': - resolution: {integrity: sha512-x5VpMODneVDb70PYV2VQOmIUUiBtY3D3mPBG8NxVk5CogneYhkR7MmM3yR/uMdITLrC1ml/NV1rj4bMJuy9MCg==} + '@esbuild/android-x64@0.28.1': + resolution: {integrity: sha512-dbwY7ltSMDWsRatcRpCnES4F+im88OCUgGZjy52shC7GqHRE/cYlxNbB4Z4UpJswpcc4Qxd2oE/ufM0p61IKng==} engines: {node: '>=18'} cpu: [x64] os: [android] - '@esbuild/darwin-arm64@0.27.7': - resolution: {integrity: sha512-5lckdqeuBPlKUwvoCXIgI2D9/ABmPq3Rdp7IfL70393YgaASt7tbju3Ac+ePVi3KDH6N2RqePfHnXkaDtY9fkw==} + '@esbuild/darwin-arm64@0.28.1': + resolution: {integrity: sha512-TZbWkQY7kvTAXbXUT7uVACR5cMHsDiSz9z7ZKAX/RTq/WJEk3QyRr0wZpNhBDX+/0CtdqUIJlOiodQcta6tY3Q==} engines: {node: '>=18'} cpu: [arm64] os: [darwin] - '@esbuild/darwin-x64@0.27.7': - resolution: {integrity: sha512-rYnXrKcXuT7Z+WL5K980jVFdvVKhCHhUwid+dDYQpH+qu+TefcomiMAJpIiC2EM3Rjtq0sO3StMV/+3w3MyyqQ==} + '@esbuild/darwin-x64@0.28.1': + resolution: {integrity: sha512-zfdzgK9ACBNZLI/CyHTOx81SyNbM6YXn7rxSgX97VjyiPl9W1i4Ka4fgKECEoFCKGpvBj5qArWIGgQjOwkgskQ==} engines: {node: '>=18'} cpu: [x64] os: [darwin] - '@esbuild/freebsd-arm64@0.27.7': - resolution: {integrity: sha512-B48PqeCsEgOtzME2GbNM2roU29AMTuOIN91dsMO30t+Ydis3z/3Ngoj5hhnsOSSwNzS+6JppqWsuhTp6E82l2w==} + '@esbuild/freebsd-arm64@0.28.1': + resolution: {integrity: sha512-wG2EA8ENdEI0qhkSZMjfqrdY+ziCYCPMmtZjjIwOmXFjmyzEHn+UUxk5of+SYsjtfs3VpnlC7QLzSI5hY/rOAw==} engines: {node: '>=18'} cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-x64@0.27.7': - resolution: {integrity: sha512-jOBDK5XEjA4m5IJK3bpAQF9/Lelu/Z9ZcdhTRLf4cajlB+8VEhFFRjWgfy3M1O4rO2GQ/b2dLwCUGpiF/eATNQ==} + '@esbuild/freebsd-x64@0.28.1': + resolution: {integrity: sha512-i7dZ9vQgnvSCzi/rYCXNgtF/U+eKZNJBzu3eTQbRgHnM7tNSizLOkRFAl3qzVc/Op/u5YkHHa4pf/3DOYHthLQ==} engines: {node: '>=18'} cpu: [x64] os: [freebsd] - '@esbuild/linux-arm64@0.27.7': - resolution: {integrity: sha512-RZPHBoxXuNnPQO9rvjh5jdkRmVizktkT7TCDkDmQ0W2SwHInKCAV95GRuvdSvA7w4VMwfCjUiPwDi0ZO6Nfe9A==} + '@esbuild/linux-arm64@0.28.1': + resolution: {integrity: sha512-yHs+0uc8+nvEAfAfxrWQKK5peSNzBc4PegcMO0EJ2hT71uA7vB8Ihg2e77R2P7SG5uYjPbHlLLmve4LLLRCf0g==} engines: {node: '>=18'} cpu: [arm64] os: [linux] - '@esbuild/linux-arm@0.27.7': - resolution: {integrity: sha512-RkT/YXYBTSULo3+af8Ib0ykH8u2MBh57o7q/DAs3lTJlyVQkgQvlrPTnjIzzRPQyavxtPtfg0EopvDyIt0j1rA==} + '@esbuild/linux-arm@0.28.1': + resolution: {integrity: sha512-qVXBOHQS+d5Y722GwJzJUtOLlX7km3CraOaGormF1pDtPd2C/l1SHRPgjLunLGe51Sh5YYWKMFDyV4SxgMQYTQ==} engines: {node: '>=18'} cpu: [arm] os: [linux] - '@esbuild/linux-ia32@0.27.7': - resolution: {integrity: sha512-GA48aKNkyQDbd3KtkplYWT102C5sn/EZTY4XROkxONgruHPU72l+gW+FfF8tf2cFjeHaRbWpOYa/uRBz/Xq1Pg==} + '@esbuild/linux-ia32@0.28.1': + resolution: {integrity: sha512-d1z4ZuP0ajrfz/FhGT4vv278rX8KnPPJx8i5+AtK7TYbx9Le9F1hyzurZpkEyjkGa9dUGhQow4C1NmeGvqxN2w==} engines: {node: '>=18'} cpu: [ia32] os: [linux] - '@esbuild/linux-loong64@0.27.7': - resolution: {integrity: sha512-a4POruNM2oWsD4WKvBSEKGIiWQF8fZOAsycHOt6JBpZ+JN2n2JH9WAv56SOyu9X5IqAjqSIPTaJkqN8F7XOQ5Q==} + '@esbuild/linux-loong64@0.28.1': + resolution: {integrity: sha512-M5sRjUVZrkm1OAPR3dlOYzNmN+loZKGVi1VUQGrwuqLcbR6qeAz+famMhjASeH3YVKvZz+zT1jlh/keC3Rj/lg==} engines: {node: '>=18'} cpu: [loong64] os: [linux] - '@esbuild/linux-mips64el@0.27.7': - resolution: {integrity: sha512-KabT5I6StirGfIz0FMgl1I+R1H73Gp0ofL9A3nG3i/cYFJzKHhouBV5VWK1CSgKvVaG4q1RNpCTR2LuTVB3fIw==} + '@esbuild/linux-mips64el@0.28.1': + resolution: {integrity: sha512-mRObBZeHh2OxcBFPWE/FjylkRgZdYuiTR3vaTozquCGOH14iP9oN4x4Ge81CoIDYQrXmIxpFumJBu5MtZpnQJQ==} engines: {node: '>=18'} cpu: [mips64el] os: [linux] - '@esbuild/linux-ppc64@0.27.7': - resolution: {integrity: sha512-gRsL4x6wsGHGRqhtI+ifpN/vpOFTQtnbsupUF5R5YTAg+y/lKelYR1hXbnBdzDjGbMYjVJLJTd2OFmMewAgwlQ==} + '@esbuild/linux-ppc64@0.28.1': + resolution: {integrity: sha512-slScBsMAb3GFDcdrCgLwZtPYRoH2H/youv10QiZyRjmsP48fznoveWytSgCI/R0ZcUgpc0ZhIUEx6LHts8yrfQ==} engines: {node: '>=18'} cpu: [ppc64] os: [linux] - '@esbuild/linux-riscv64@0.27.7': - resolution: {integrity: sha512-hL25LbxO1QOngGzu2U5xeXtxXcW+/GvMN3ejANqXkxZ/opySAZMrc+9LY/WyjAan41unrR3YrmtTsUpwT66InQ==} + '@esbuild/linux-riscv64@0.28.1': + resolution: {integrity: sha512-kw0owk1o0GFETUJyW0jc0G4Yzs0BHZn0JDZ8JRT088vjJYX777BAs1fDGxAC+q831qOs2DTC96mNsG2opdfyyQ==} engines: {node: '>=18'} cpu: [riscv64] os: [linux] - '@esbuild/linux-s390x@0.27.7': - resolution: {integrity: sha512-2k8go8Ycu1Kb46vEelhu1vqEP+UeRVj2zY1pSuPdgvbd5ykAw82Lrro28vXUrRmzEsUV0NzCf54yARIK8r0fdw==} + '@esbuild/linux-s390x@0.28.1': + resolution: {integrity: sha512-/lAIjX8aYFRByhh6L5rYtPEDRqa9de/4V/juOXcta5frjvzXO4/sqEtyytse0g3zZFuWu5cDN0MkLz2qRDD2Ag==} engines: {node: '>=18'} cpu: [s390x] os: [linux] - '@esbuild/linux-x64@0.27.7': - resolution: {integrity: sha512-hzznmADPt+OmsYzw1EE33ccA+HPdIqiCRq7cQeL1Jlq2gb1+OyWBkMCrYGBJ+sxVzve2ZJEVeePbLM2iEIZSxA==} + '@esbuild/linux-x64@0.28.1': + resolution: {integrity: sha512-u/anNYF2mmVOEDwLtnQ1wOr3EZ9sTNGLWrsYGYwHWzGA3Si84IOkHXlbWTD1NB+9/1lcnweYKO54uhxZydNzfA==} engines: {node: '>=18'} cpu: [x64] os: [linux] - '@esbuild/netbsd-arm64@0.27.7': - resolution: {integrity: sha512-b6pqtrQdigZBwZxAn1UpazEisvwaIDvdbMbmrly7cDTMFnw/+3lVxxCTGOrkPVnsYIosJJXAsILG9XcQS+Yu6w==} + '@esbuild/netbsd-arm64@0.28.1': + resolution: {integrity: sha512-oks0DYbLwWMmaakTsCb+zL4E+aHRVLom9IJZOAthMQEPiQmydXHkziYEsGYRx0uNV/IjEKGAV941JzH02pflqw==} engines: {node: '>=18'} cpu: [arm64] os: [netbsd] - '@esbuild/netbsd-x64@0.27.7': - resolution: {integrity: sha512-OfatkLojr6U+WN5EDYuoQhtM+1xco+/6FSzJJnuWiUw5eVcicbyK3dq5EeV/QHT1uy6GoDhGbFpprUiHUYggrw==} + '@esbuild/netbsd-x64@0.28.1': + resolution: {integrity: sha512-aeL6lAnN89Hz43Mlh1G8ARasbuoYvSITDEx0tHh5b7jJnHcssqgjy9Yx430GDpmCa6OyrKoS0aNRjKundRizGg==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] - '@esbuild/openbsd-arm64@0.27.7': - resolution: {integrity: sha512-AFuojMQTxAz75Fo8idVcqoQWEHIXFRbOc1TrVcFSgCZtQfSdc1RXgB3tjOn/krRHENUB4j00bfGjyl2mJrU37A==} + '@esbuild/openbsd-arm64@0.28.1': + resolution: {integrity: sha512-MEFJe5C3R8pwXdZ5Y21oo6m7ePiS0d9pWucn99O/wvyJZChoIQKrQDxKrGeW8F5+T0okTHesAmDeiHDTIq0V/Q==} engines: {node: '>=18'} cpu: [arm64] os: [openbsd] - '@esbuild/openbsd-x64@0.27.7': - resolution: {integrity: sha512-+A1NJmfM8WNDv5CLVQYJ5PshuRm/4cI6WMZRg1by1GwPIQPCTs1GLEUHwiiQGT5zDdyLiRM/l1G0Pv54gvtKIg==} + '@esbuild/openbsd-x64@0.28.1': + resolution: {integrity: sha512-i/ZLIOafE0Z8cI/XANJAixoJL/uRAoS2xOA3rb0xN+KK0K177cMAsQYkzHtBrtMXAKuAc7HGgcWiZ/sRC1Nxgw==} engines: {node: '>=18'} cpu: [x64] os: [openbsd] - '@esbuild/openharmony-arm64@0.27.7': - resolution: {integrity: sha512-+KrvYb/C8zA9CU/g0sR6w2RBw7IGc5J2BPnc3dYc5VJxHCSF1yNMxTV5LQ7GuKteQXZtspjFbiuW5/dOj7H4Yw==} + '@esbuild/openharmony-arm64@0.28.1': + resolution: {integrity: sha512-ge+Z7EXFNt2BO1oAMsVpiQ8EwndV9i1xXerAeTIK7AtPs3bKFXQM7nlRxDSIUIMeueR1CNXxqztLzdNeReKBJg==} engines: {node: '>=18'} cpu: [arm64] os: [openharmony] - '@esbuild/sunos-x64@0.27.7': - resolution: {integrity: sha512-ikktIhFBzQNt/QDyOL580ti9+5mL/YZeUPKU2ivGtGjdTYoqz6jObj6nOMfhASpS4GU4Q/Clh1QtxWAvcYKamA==} + '@esbuild/sunos-x64@0.28.1': + resolution: {integrity: sha512-BEjgtECkL3vY+SaSQ6nzVfiALUeFxpawyp8Jmf5PtYhf1Ug40N1h/hxlhts+f1FvSvarEigdxS3BlSMI2PJLcQ==} engines: {node: '>=18'} cpu: [x64] os: [sunos] - '@esbuild/win32-arm64@0.27.7': - resolution: {integrity: sha512-7yRhbHvPqSpRUV7Q20VuDwbjW5kIMwTHpptuUzV+AA46kiPze5Z7qgt6CLCK3pWFrHeNfDd1VKgyP4O+ng17CA==} + '@esbuild/win32-arm64@0.28.1': + resolution: {integrity: sha512-lCv9eK/H6ZJWbE7bh2nw54CZ9M2nupBxJcTsdk/QQnWkdSjKGuxmmH8/GWrlT1eMmZfn4dGcCjRte397WqfQXA==} engines: {node: '>=18'} cpu: [arm64] os: [win32] - '@esbuild/win32-ia32@0.27.7': - resolution: {integrity: sha512-SmwKXe6VHIyZYbBLJrhOoCJRB/Z1tckzmgTLfFYOfpMAx63BJEaL9ExI8x7v0oAO3Zh6D/Oi1gVxEYr5oUCFhw==} + '@esbuild/win32-ia32@0.28.1': + resolution: {integrity: sha512-zvb/mB2bSCoJOpoCBgYKKpX6YM6mJBlBUVUtVj41DlZJVEB6/0CKlRYxP5wWl1C1ILiCoAU5wZZ4q1P3qeS6Eg==} engines: {node: '>=18'} cpu: [ia32] os: [win32] - '@esbuild/win32-x64@0.27.7': - resolution: {integrity: sha512-56hiAJPhwQ1R4i+21FVF7V8kSD5zZTdHcVuRFMW0hn753vVfQN8xlx4uOPT4xoGH0Z/oVATuR82AiqSTDIpaHg==} + '@esbuild/win32-x64@0.28.1': + resolution: {integrity: sha512-bm4Mowrv+GXMlpWX++EcXw/iLyd1o3+bJkC2DkWXYVvgZCqD/bSj9ctZeAMC3cIxgjRVR2Dufaiu4YPxr5gW1A==} engines: {node: '>=18'} cpu: [x64] os: [win32] @@ -1920,8 +1938,8 @@ packages: base-log-factory@2.1.4: resolution: {integrity: sha512-FK1tHOB+rXvlBcGYYhSNR2QS2juEG4SZ1ekXQRQ2XscYNtDxllzqkzfgBFr12EVrKb2/07NLdbr0cSwVoc378A==} - baseline-browser-mapping@2.10.19: - resolution: {integrity: sha512-qCkNLi2sfBOn8XhZQ0FXsT1Ki/Yo5P90hrkRamVFRS7/KV9hpfA4HkoWNU152+8w0zPjnxo5psx5NL3PSGgv5g==} + baseline-browser-mapping@2.10.40: + resolution: {integrity: sha512-BSSLZ9/Cjjv7Gtj5B68ZzXcXUg8iOf3fme+FCuh8rC/Go+Kmh8cox7M3A8dolou16s64QjLPOSdngh7GxXvkSw==} engines: {node: '>=6.0.0'} hasBin: true @@ -1939,8 +1957,8 @@ packages: resolution: {integrity: sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==} engines: {node: 18 || 20 || >=22} - browserslist@4.28.2: - resolution: {integrity: sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==} + browserslist@4.28.4: + resolution: {integrity: sha512-MTc8i/x9jBQd1iMw2CFGS+rwMa07eYjLR0CCTLDACl9xhxy+nIs3KeML/biicXtk9JrZ6dnnTatmc7ErPXIxqw==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true @@ -1948,7 +1966,7 @@ packages: resolution: {integrity: sha512-3WrrOuZiyaaZPWiEt4G3+IffISVC9HYlWueJEBWED4ZH4aIAC2PnkdnuRrR94M+w6yGWn4AglWtJtBI8YqvgoA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} peerDependencies: - esbuild: '>=0.18' + esbuild: ^0.28.1 bytes@3.1.2: resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} @@ -1966,8 +1984,8 @@ packages: resolution: {integrity: sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==} engines: {node: '>= 0.4'} - caniuse-lite@1.0.30001788: - resolution: {integrity: sha512-6q8HFp+lOQtcf7wBK+uEenxymVWkGKkjFpCvw5W25cmMwEDU45p1xQFBQv8JDlMMry7eNxyBaR+qxgmTUZkIRQ==} + caniuse-lite@1.0.30001800: + resolution: {integrity: sha512-MMHtuAz9Ys840zAY5F4k6fV5GaivZ9sPk+nz0mY+GYVzRBnYkN0mpqkSR92oWRQ19yQWo4HvBV/FnC16AJX8MA==} chai@6.2.2: resolution: {integrity: sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==} @@ -2078,8 +2096,8 @@ packages: ee-first@1.1.1: resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} - electron-to-chromium@1.5.339: - resolution: {integrity: sha512-Is+0BBHJ4NrdpAYiperrmp53pLywG/yV/6lIMTAnhxvzj/Cmn5Q/ogSHC6AKe7X+8kPLxxFk0cs5oc/3j/fxIg==} + electron-to-chromium@1.5.384: + resolution: {integrity: sha512-g6KAKY1vkYsADvSPWvdJsuYT0ixdcu6lUtD9P/wJKGBEDlZVXh2AX42j1mPqqaQPDluWjara9ziQ7xqAeXCt5A==} encodeurl@2.0.0: resolution: {integrity: sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==} @@ -2104,8 +2122,8 @@ packages: resolution: {integrity: sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==} engines: {node: '>= 0.4'} - esbuild@0.27.7: - resolution: {integrity: sha512-IxpibTjyVnmrIQo5aqNpCgoACA/dTKLTlhMHihVHhdkxKyPO1uBBthumT0rdHmcsk9uMonIWS0m4FljWzILh3w==} + esbuild@0.28.1: + resolution: {integrity: sha512-HrJrvZv5ayxBzPfwphOoNzkzOIIlifzk0KJrGK2c8R4+LKpMtpYLQeUdjnwjWv/LZlkH2laZk+4w78pi99D4Vw==} engines: {node: '>=18'} hasBin: true @@ -2365,8 +2383,8 @@ packages: resolution: {integrity: sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==} engines: {node: '>= 4'} - immutable@5.1.6: - resolution: {integrity: sha512-q1swsS8K7L8usSHuOqF2TAoCCkonYz0SG38wLAggaa4Wml70zixIvt2ql4coQ2C2B3hTjltJry4r6bULwgAXLQ==} + immutable@5.1.9: + resolution: {integrity: sha512-m8nVez3rwrgmWxtLMt1ZYXB2Lv7OKYn/disyxAlSDYAlKSlFoPPfIAmAM/M5xqL4m4C/wAPw7S2/CNaUii1Hxg==} imurmurhash@0.1.4: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} @@ -2650,8 +2668,9 @@ packages: node-addon-api@7.1.1: resolution: {integrity: sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==} - node-releases@2.0.37: - resolution: {integrity: sha512-1h5gKZCF+pO/o3Iqt5Jp7wc9rH3eJJ0+nh/CIoiRwjRxde/hAHyLPXYN4V3CqKAbiZPSeJFSWHmJsbkicta0Eg==} + node-releases@2.0.50: + resolution: {integrity: sha512-J6l92tKHX6w8Jy5nO1Vuc01NoIiRGi/d6qBKVxh+IQ8Cr3b6HbVNfKiF8ZpFKufTwpwxMmce2W3iQZ861ZRyTg==} + engines: {node: '>=18'} object-assign@4.1.1: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} @@ -3118,7 +3137,7 @@ packages: peerDependencies: '@types/node': ^20.19.0 || >=22.12.0 '@vitejs/devtools': ^0.3.0 - esbuild: ^0.27.0 || ^0.28.0 + esbuild: ^0.28.1 jiti: '>=1.21.0' less: ^4.0.0 sass: ^1.70.0 @@ -3239,25 +3258,25 @@ packages: snapshots: - '@babel/code-frame@7.29.0': + '@babel/code-frame@7.29.7': dependencies: - '@babel/helper-validator-identifier': 7.28.5 + '@babel/helper-validator-identifier': 7.29.7 js-tokens: 4.0.0 picocolors: 1.1.1 - '@babel/compat-data@7.29.0': {} + '@babel/compat-data@7.29.7': {} - '@babel/core@7.29.0': + '@babel/core@7.29.7': dependencies: - '@babel/code-frame': 7.29.0 - '@babel/generator': 7.29.1 - '@babel/helper-compilation-targets': 7.28.6 - '@babel/helper-module-transforms': 7.28.6(@babel/core@7.29.0) - '@babel/helpers': 7.29.2 - '@babel/parser': 7.29.2 - '@babel/template': 7.28.6 - '@babel/traverse': 7.29.0 - '@babel/types': 7.29.0 + '@babel/code-frame': 7.29.7 + '@babel/generator': 7.29.7 + '@babel/helper-compilation-targets': 7.29.7 + '@babel/helper-module-transforms': 7.29.7(@babel/core@7.29.7) + '@babel/helpers': 7.29.7 + '@babel/parser': 7.29.7 + '@babel/template': 7.29.7 + '@babel/traverse': 7.29.7 + '@babel/types': 7.29.7 '@jridgewell/remapping': 2.3.5 convert-source-map: 2.0.0 debug: 4.4.3 @@ -3267,50 +3286,54 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/generator@7.29.1': + '@babel/generator@7.29.7': dependencies: - '@babel/parser': 7.29.2 - '@babel/types': 7.29.0 + '@babel/parser': 7.29.7 + '@babel/types': 7.29.7 '@jridgewell/gen-mapping': 0.3.13 '@jridgewell/trace-mapping': 0.3.31 jsesc: 3.1.0 - '@babel/helper-compilation-targets@7.28.6': + '@babel/helper-compilation-targets@7.29.7': dependencies: - '@babel/compat-data': 7.29.0 - '@babel/helper-validator-option': 7.27.1 - browserslist: 4.28.2 + '@babel/compat-data': 7.29.7 + '@babel/helper-validator-option': 7.29.7 + browserslist: 4.28.4 lru-cache: 5.1.1 semver: 6.3.1 - '@babel/helper-globals@7.28.0': {} + '@babel/helper-globals@7.29.7': {} - '@babel/helper-module-imports@7.28.6': + '@babel/helper-module-imports@7.29.7': dependencies: - '@babel/traverse': 7.29.0 - '@babel/types': 7.29.0 + '@babel/traverse': 7.29.7 + '@babel/types': 7.29.7 transitivePeerDependencies: - supports-color - '@babel/helper-module-transforms@7.28.6(@babel/core@7.29.0)': + '@babel/helper-module-transforms@7.29.7(@babel/core@7.29.7)': dependencies: - '@babel/core': 7.29.0 - '@babel/helper-module-imports': 7.28.6 - '@babel/helper-validator-identifier': 7.28.5 - '@babel/traverse': 7.29.0 + '@babel/core': 7.29.7 + '@babel/helper-module-imports': 7.29.7 + '@babel/helper-validator-identifier': 7.29.7 + '@babel/traverse': 7.29.7 transitivePeerDependencies: - supports-color '@babel/helper-string-parser@7.27.1': {} + '@babel/helper-string-parser@7.29.7': {} + '@babel/helper-validator-identifier@7.28.5': {} - '@babel/helper-validator-option@7.27.1': {} + '@babel/helper-validator-identifier@7.29.7': {} - '@babel/helpers@7.29.2': + '@babel/helper-validator-option@7.29.7': {} + + '@babel/helpers@7.29.7': dependencies: - '@babel/template': 7.28.6 - '@babel/types': 7.29.0 + '@babel/template': 7.29.7 + '@babel/types': 7.29.7 '@babel/parser@7.29.2': dependencies: @@ -3320,20 +3343,24 @@ snapshots: dependencies: '@babel/types': 7.29.0 - '@babel/template@7.28.6': + '@babel/parser@7.29.7': dependencies: - '@babel/code-frame': 7.29.0 - '@babel/parser': 7.29.2 - '@babel/types': 7.29.0 + '@babel/types': 7.29.7 - '@babel/traverse@7.29.0': + '@babel/template@7.29.7': dependencies: - '@babel/code-frame': 7.29.0 - '@babel/generator': 7.29.1 - '@babel/helper-globals': 7.28.0 - '@babel/parser': 7.29.2 - '@babel/template': 7.28.6 - '@babel/types': 7.29.0 + '@babel/code-frame': 7.29.7 + '@babel/parser': 7.29.7 + '@babel/types': 7.29.7 + + '@babel/traverse@7.29.7': + dependencies: + '@babel/code-frame': 7.29.7 + '@babel/generator': 7.29.7 + '@babel/helper-globals': 7.29.7 + '@babel/parser': 7.29.7 + '@babel/template': 7.29.7 + '@babel/types': 7.29.7 debug: 4.4.3 transitivePeerDependencies: - supports-color @@ -3343,6 +3370,11 @@ snapshots: '@babel/helper-string-parser': 7.27.1 '@babel/helper-validator-identifier': 7.28.5 + '@babel/types@7.29.7': + dependencies: + '@babel/helper-string-parser': 7.29.7 + '@babel/helper-validator-identifier': 7.29.7 + '@bcoe/v8-coverage@1.0.2': {} '@emnapi/core@1.11.1': @@ -3363,82 +3395,82 @@ snapshots: '@epic-web/invariant@1.0.0': {} - '@esbuild/aix-ppc64@0.27.7': + '@esbuild/aix-ppc64@0.28.1': optional: true - '@esbuild/android-arm64@0.27.7': + '@esbuild/android-arm64@0.28.1': optional: true - '@esbuild/android-arm@0.27.7': + '@esbuild/android-arm@0.28.1': optional: true - '@esbuild/android-x64@0.27.7': + '@esbuild/android-x64@0.28.1': optional: true - '@esbuild/darwin-arm64@0.27.7': + '@esbuild/darwin-arm64@0.28.1': optional: true - '@esbuild/darwin-x64@0.27.7': + '@esbuild/darwin-x64@0.28.1': optional: true - '@esbuild/freebsd-arm64@0.27.7': + '@esbuild/freebsd-arm64@0.28.1': optional: true - '@esbuild/freebsd-x64@0.27.7': + '@esbuild/freebsd-x64@0.28.1': optional: true - '@esbuild/linux-arm64@0.27.7': + '@esbuild/linux-arm64@0.28.1': optional: true - '@esbuild/linux-arm@0.27.7': + '@esbuild/linux-arm@0.28.1': optional: true - '@esbuild/linux-ia32@0.27.7': + '@esbuild/linux-ia32@0.28.1': optional: true - '@esbuild/linux-loong64@0.27.7': + '@esbuild/linux-loong64@0.28.1': optional: true - '@esbuild/linux-mips64el@0.27.7': + '@esbuild/linux-mips64el@0.28.1': optional: true - '@esbuild/linux-ppc64@0.27.7': + '@esbuild/linux-ppc64@0.28.1': optional: true - '@esbuild/linux-riscv64@0.27.7': + '@esbuild/linux-riscv64@0.28.1': optional: true - '@esbuild/linux-s390x@0.27.7': + '@esbuild/linux-s390x@0.28.1': optional: true - '@esbuild/linux-x64@0.27.7': + '@esbuild/linux-x64@0.28.1': optional: true - '@esbuild/netbsd-arm64@0.27.7': + '@esbuild/netbsd-arm64@0.28.1': optional: true - '@esbuild/netbsd-x64@0.27.7': + '@esbuild/netbsd-x64@0.28.1': optional: true - '@esbuild/openbsd-arm64@0.27.7': + '@esbuild/openbsd-arm64@0.28.1': optional: true - '@esbuild/openbsd-x64@0.27.7': + '@esbuild/openbsd-x64@0.28.1': optional: true - '@esbuild/openharmony-arm64@0.27.7': + '@esbuild/openharmony-arm64@0.28.1': optional: true - '@esbuild/sunos-x64@0.27.7': + '@esbuild/sunos-x64@0.28.1': optional: true - '@esbuild/win32-arm64@0.27.7': + '@esbuild/win32-arm64@0.28.1': optional: true - '@esbuild/win32-ia32@0.27.7': + '@esbuild/win32-ia32@0.28.1': optional: true - '@esbuild/win32-x64@0.27.7': + '@esbuild/win32-x64@0.28.1': optional: true '@eslint-community/eslint-utils@4.9.1(eslint@10.2.0(jiti@2.6.1))': @@ -4251,12 +4283,12 @@ snapshots: '@tailwindcss/oxide-win32-arm64-msvc': 4.2.2 '@tailwindcss/oxide-win32-x64-msvc': 4.2.2 - '@tailwindcss/vite@4.2.2(vite@8.1.0(@types/node@25.6.0)(esbuild@0.27.7)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0))': + '@tailwindcss/vite@4.2.2(vite@8.1.0(@types/node@25.6.0)(esbuild@0.28.1)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0))': dependencies: '@tailwindcss/node': 4.2.2 '@tailwindcss/oxide': 4.2.2 tailwindcss: 4.2.2 - vite: 8.1.0(@types/node@25.6.0)(esbuild@0.27.7)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0) + vite: 8.1.0(@types/node@25.6.0)(esbuild@0.28.1)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0) '@tanstack/history@1.161.6': {} @@ -4427,14 +4459,14 @@ snapshots: '@typescript-eslint/types': 8.58.2 eslint-visitor-keys: 5.0.1 - '@vitejs/plugin-react@6.0.1(vite@8.1.0(@types/node@25.6.0)(esbuild@0.27.7)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0))': + '@vitejs/plugin-react@6.0.1(vite@8.1.0(@types/node@25.6.0)(esbuild@0.28.1)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0))': dependencies: '@rolldown/pluginutils': 1.0.0-rc.7 - vite: 8.1.0(@types/node@25.6.0)(esbuild@0.27.7)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0) + vite: 8.1.0(@types/node@25.6.0)(esbuild@0.28.1)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0) '@vitest/coverage-istanbul@4.1.4(vitest@4.1.4)': dependencies: - '@babel/core': 7.29.0 + '@babel/core': 7.29.7 '@istanbuljs/schema': 0.1.6 '@jridgewell/gen-mapping': 0.3.13 '@jridgewell/trace-mapping': 0.3.31 @@ -4444,7 +4476,7 @@ snapshots: magicast: 0.5.3 obug: 2.1.1 tinyrainbow: 3.1.0 - vitest: 4.1.4(@types/node@24.12.2)(@vitest/coverage-istanbul@4.1.4)(@vitest/coverage-v8@4.1.4)(vite@8.1.0(@types/node@24.12.2)(esbuild@0.27.7)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0)) + vitest: 4.1.4(@types/node@24.12.2)(@vitest/coverage-istanbul@4.1.4)(@vitest/coverage-v8@4.1.4)(vite@8.1.0(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0)) transitivePeerDependencies: - supports-color @@ -4460,7 +4492,7 @@ snapshots: obug: 2.1.1 std-env: 4.1.0 tinyrainbow: 3.1.0 - vitest: 4.1.4(@types/node@24.12.2)(@vitest/coverage-istanbul@4.1.4)(@vitest/coverage-v8@4.1.4)(vite@8.1.0(@types/node@24.12.2)(esbuild@0.27.7)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0)) + vitest: 4.1.4(@types/node@24.12.2)(@vitest/coverage-istanbul@4.1.4)(@vitest/coverage-v8@4.1.4)(vite@8.1.0(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0)) '@vitest/expect@4.1.4': dependencies: @@ -4471,13 +4503,13 @@ snapshots: chai: 6.2.2 tinyrainbow: 3.1.0 - '@vitest/mocker@4.1.4(vite@8.1.0(@types/node@24.12.2)(esbuild@0.27.7)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0))': + '@vitest/mocker@4.1.4(vite@8.1.0(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0))': dependencies: '@vitest/spy': 4.1.4 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - vite: 8.1.0(@types/node@24.12.2)(esbuild@0.27.7)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0) + vite: 8.1.0(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0) '@vitest/pretty-format@4.1.4': dependencies: @@ -4553,7 +4585,7 @@ snapshots: date-manip: 2.0.6 is-what-type: 1.1.4 - baseline-browser-mapping@2.10.19: {} + baseline-browser-mapping@2.10.40: {} blf-colorful-appender@1.0.6: dependencies: @@ -4588,17 +4620,17 @@ snapshots: dependencies: balanced-match: 4.0.4 - browserslist@4.28.2: + browserslist@4.28.4: dependencies: - baseline-browser-mapping: 2.10.19 - caniuse-lite: 1.0.30001788 - electron-to-chromium: 1.5.339 - node-releases: 2.0.37 - update-browserslist-db: 1.2.3(browserslist@4.28.2) + baseline-browser-mapping: 2.10.40 + caniuse-lite: 1.0.30001800 + electron-to-chromium: 1.5.384 + node-releases: 2.0.50 + update-browserslist-db: 1.2.3(browserslist@4.28.4) - bundle-require@5.1.0(esbuild@0.27.7): + bundle-require@5.1.0(esbuild@0.28.1): dependencies: - esbuild: 0.27.7 + esbuild: 0.28.1 load-tsconfig: 0.2.5 bytes@3.1.2: {} @@ -4615,7 +4647,7 @@ snapshots: call-bind-apply-helpers: 1.0.2 get-intrinsic: 1.3.0 - caniuse-lite@1.0.30001788: {} + caniuse-lite@1.0.30001800: {} chai@6.2.2: {} @@ -4693,7 +4725,7 @@ snapshots: ee-first@1.1.1: {} - electron-to-chromium@1.5.339: {} + electron-to-chromium@1.5.384: {} encodeurl@2.0.0: {} @@ -4712,34 +4744,34 @@ snapshots: dependencies: es-errors: 1.3.0 - esbuild@0.27.7: + esbuild@0.28.1: optionalDependencies: - '@esbuild/aix-ppc64': 0.27.7 - '@esbuild/android-arm': 0.27.7 - '@esbuild/android-arm64': 0.27.7 - '@esbuild/android-x64': 0.27.7 - '@esbuild/darwin-arm64': 0.27.7 - '@esbuild/darwin-x64': 0.27.7 - '@esbuild/freebsd-arm64': 0.27.7 - '@esbuild/freebsd-x64': 0.27.7 - '@esbuild/linux-arm': 0.27.7 - '@esbuild/linux-arm64': 0.27.7 - '@esbuild/linux-ia32': 0.27.7 - '@esbuild/linux-loong64': 0.27.7 - '@esbuild/linux-mips64el': 0.27.7 - '@esbuild/linux-ppc64': 0.27.7 - '@esbuild/linux-riscv64': 0.27.7 - '@esbuild/linux-s390x': 0.27.7 - '@esbuild/linux-x64': 0.27.7 - '@esbuild/netbsd-arm64': 0.27.7 - '@esbuild/netbsd-x64': 0.27.7 - '@esbuild/openbsd-arm64': 0.27.7 - '@esbuild/openbsd-x64': 0.27.7 - '@esbuild/openharmony-arm64': 0.27.7 - '@esbuild/sunos-x64': 0.27.7 - '@esbuild/win32-arm64': 0.27.7 - '@esbuild/win32-ia32': 0.27.7 - '@esbuild/win32-x64': 0.27.7 + '@esbuild/aix-ppc64': 0.28.1 + '@esbuild/android-arm': 0.28.1 + '@esbuild/android-arm64': 0.28.1 + '@esbuild/android-x64': 0.28.1 + '@esbuild/darwin-arm64': 0.28.1 + '@esbuild/darwin-x64': 0.28.1 + '@esbuild/freebsd-arm64': 0.28.1 + '@esbuild/freebsd-x64': 0.28.1 + '@esbuild/linux-arm': 0.28.1 + '@esbuild/linux-arm64': 0.28.1 + '@esbuild/linux-ia32': 0.28.1 + '@esbuild/linux-loong64': 0.28.1 + '@esbuild/linux-mips64el': 0.28.1 + '@esbuild/linux-ppc64': 0.28.1 + '@esbuild/linux-riscv64': 0.28.1 + '@esbuild/linux-s390x': 0.28.1 + '@esbuild/linux-x64': 0.28.1 + '@esbuild/netbsd-arm64': 0.28.1 + '@esbuild/netbsd-x64': 0.28.1 + '@esbuild/openbsd-arm64': 0.28.1 + '@esbuild/openbsd-x64': 0.28.1 + '@esbuild/openharmony-arm64': 0.28.1 + '@esbuild/sunos-x64': 0.28.1 + '@esbuild/win32-arm64': 0.28.1 + '@esbuild/win32-ia32': 0.28.1 + '@esbuild/win32-x64': 0.28.1 escalade@3.2.0: {} @@ -4749,7 +4781,7 @@ snapshots: eslint-plugin-react-hooks@7.0.1(eslint@10.2.0(jiti@2.6.1)): dependencies: - '@babel/core': 7.29.0 + '@babel/core': 7.29.7 '@babel/parser': 7.29.2 eslint: 10.2.0(jiti@2.6.1) hermes-parser: 0.25.1 @@ -5027,7 +5059,7 @@ snapshots: ignore@7.0.5: {} - immutable@5.1.6: + immutable@5.1.9: optional: true imurmurhash@0.1.4: {} @@ -5245,7 +5277,7 @@ snapshots: node-addon-api@7.1.1: optional: true - node-releases@2.0.37: {} + node-releases@2.0.50: {} object-assign@4.1.1: {} @@ -5456,7 +5488,7 @@ snapshots: sass@1.99.0: dependencies: chokidar: 4.0.3 - immutable: 5.1.6 + immutable: 5.1.9 source-map-js: 1.2.1 optionalDependencies: '@parcel/watcher': 2.5.6 @@ -5614,12 +5646,12 @@ snapshots: tsup@8.5.1(jiti@2.6.1)(postcss@8.5.15)(tsx@4.21.0)(typescript@6.0.2): dependencies: - bundle-require: 5.1.0(esbuild@0.27.7) + bundle-require: 5.1.0(esbuild@0.28.1) cac: 6.7.14 chokidar: 4.0.3 consola: 3.4.2 debug: 4.4.3 - esbuild: 0.27.7 + esbuild: 0.28.1 fix-dts-default-cjs-exports: 1.0.1 joycon: 3.1.1 picocolors: 1.1.1 @@ -5642,7 +5674,7 @@ snapshots: tsx@4.21.0: dependencies: - esbuild: 0.27.7 + esbuild: 0.28.1 get-tsconfig: 4.14.0 optionalDependencies: fsevents: 2.3.3 @@ -5682,9 +5714,9 @@ snapshots: unpipe@1.0.0: {} - update-browserslist-db@1.2.3(browserslist@4.28.2): + update-browserslist-db@1.2.3(browserslist@4.28.4): dependencies: - browserslist: 4.28.2 + browserslist: 4.28.4 escalade: 3.2.0 picocolors: 1.1.1 @@ -5722,7 +5754,7 @@ snapshots: transitivePeerDependencies: - supports-color - vite@8.1.0(@types/node@24.12.2)(esbuild@0.27.7)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0): + vite@8.1.0(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0): dependencies: lightningcss: 1.32.0 picomatch: 4.0.4 @@ -5731,13 +5763,13 @@ snapshots: tinyglobby: 0.2.17 optionalDependencies: '@types/node': 24.12.2 - esbuild: 0.27.7 + esbuild: 0.28.1 fsevents: 2.3.3 jiti: 2.6.1 sass: 1.99.0 tsx: 4.21.0 - vite@8.1.0(@types/node@25.6.0)(esbuild@0.27.7)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0): + vite@8.1.0(@types/node@25.6.0)(esbuild@0.28.1)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0): dependencies: lightningcss: 1.32.0 picomatch: 4.0.4 @@ -5746,16 +5778,16 @@ snapshots: tinyglobby: 0.2.17 optionalDependencies: '@types/node': 25.6.0 - esbuild: 0.27.7 + esbuild: 0.28.1 fsevents: 2.3.3 jiti: 2.6.1 sass: 1.99.0 tsx: 4.21.0 - vitest@4.1.4(@types/node@24.12.2)(@vitest/coverage-istanbul@4.1.4)(@vitest/coverage-v8@4.1.4)(vite@8.1.0(@types/node@24.12.2)(esbuild@0.27.7)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0)): + vitest@4.1.4(@types/node@24.12.2)(@vitest/coverage-istanbul@4.1.4)(@vitest/coverage-v8@4.1.4)(vite@8.1.0(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0)): dependencies: '@vitest/expect': 4.1.4 - '@vitest/mocker': 4.1.4(vite@8.1.0(@types/node@24.12.2)(esbuild@0.27.7)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0)) + '@vitest/mocker': 4.1.4(vite@8.1.0(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0)) '@vitest/pretty-format': 4.1.4 '@vitest/runner': 4.1.4 '@vitest/snapshot': 4.1.4 @@ -5772,7 +5804,7 @@ snapshots: tinyexec: 1.1.1 tinyglobby: 0.2.16 tinyrainbow: 3.1.0 - vite: 8.1.0(@types/node@24.12.2)(esbuild@0.27.7)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0) + vite: 8.1.0(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0) why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 24.12.2 From b5ede9577238dcd89e27bfdb444d940f8d210dca Mon Sep 17 00:00:00 2001 From: DrSmoothl <1787882683@qq.com> Date: Thu, 2 Jul 2026 19:55:50 +0800 Subject: [PATCH 05/16] test(core): fake timers for group-history walk-back to skip send-gap waits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The walk-back loop enforces a real ~300ms gap between each SsoGetGroupMsg send (a deliberate process-wide anti-flood throttle). The test paid that gap for real — up to 300ms x 12 sends per case — making the file ~5.2s. Install vitest fake timers and drain the queued send-gap timers via runAllTimersAsync, so the loop/cursor logic runs instantly. The production throttle is untouched (only the test file changes). Walk-back test body ~5237ms -> ~4ms; full core suite ~21s -> ~4.4s. --- .../core/tests/group-history-walkback.test.ts | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/packages/core/tests/group-history-walkback.test.ts b/packages/core/tests/group-history-walkback.test.ts index 541d73fc..b98c1f79 100644 --- a/packages/core/tests/group-history-walkback.test.ts +++ b/packages/core/tests/group-history-walkback.test.ts @@ -3,7 +3,7 @@ // so this exercises the loop/cursor logic, not the wire decode (covered in // packages/protocol/tests/msg-push/fetch-group-history.test.ts). -import { beforeEach, describe, expect, it, vi } from 'vitest'; +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; vi.mock('@snowluma/protocol/msg-push', async (importOriginal) => { const actual = await importOriginal(); @@ -27,7 +27,22 @@ function gm(seq: number): any { const ctx = { identity: {}, sendRawPacket: vi.fn() } as any; describe('MessageApi.getGroupHistory walk-back', () => { - beforeEach(() => mockFetch.mockReset()); + // The walk-back loop enforces a real ~300ms gap between each SsoGetGroupMsg + // send (a deliberate anti-flood throttle, unchanged in production). Fake the + // clock so the test exercises the loop/cursor logic instantly instead of + // waiting out 300ms × up-to-12 real sends. + beforeEach(() => { + mockFetch.mockReset(); + vi.useFakeTimers(); + }); + afterEach(() => vi.useRealTimers()); + + // Drives a throttled getGroupHistory to completion under fake timers: kick it + // off, flush the queued send-gap timers, then await the result. + async function runHistory(promise: Promise): Promise { + await vi.runAllTimersAsync(); + return promise; + } it('walks back across short-capped windows, dedups, returns newest `want` ascending', async () => { // Server caps every window to its newest 10 sequences → forces walk-back. @@ -37,7 +52,7 @@ describe('MessageApi.getGroupHistory walk-back', () => { return out; }); - const res = await new MessageApi(ctx).getGroupHistory(9999, 200, 50); + const res = await runHistory(new MessageApi(ctx).getGroupHistory(9999, 200, 50)); expect(res).toHaveLength(50); expect(res[0].msgSeq).toBe(151); // newest 50 ending at 200 → 151..200 @@ -54,7 +69,7 @@ describe('MessageApi.getGroupHistory walk-back', () => { return out; }); - const res = await new MessageApi(ctx).getGroupHistory(9999, 20, 100); // only seq 1..20 exist + const res = await runHistory(new MessageApi(ctx).getGroupHistory(9999, 20, 100)); // only seq 1..20 exist expect(res.map((m) => m.msgSeq)).toEqual(Array.from({ length: 20 }, (_, i) => i + 1)); }); @@ -65,7 +80,7 @@ describe('MessageApi.getGroupHistory walk-back', () => { return [gm(end)]; // one message per window → never reaches a large `want` }); - const res = await new MessageApi(ctx).getGroupHistory(9999, 100_000, 9999); + const res = await runHistory(new MessageApi(ctx).getGroupHistory(9999, 100_000, 9999)); expect(calls).toBeLessThanOrEqual(12); // HISTORY_MAX_REQUESTS expect(res.length).toBeLessThanOrEqual(200); // HISTORY_MAX_COUNT }); From 3e99d3bb5af2306e8d1882a9de341275ec6b7ac4 Mon Sep 17 00:00:00 2001 From: DrSmoothl <1787882683@qq.com> Date: Thu, 2 Jul 2026 21:04:35 +0800 Subject: [PATCH 06/16] fix(webui): guard async polling against re-entrant overlap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 三个 setInterval 轮询(列表 reconcile、systemInfo 快刷、6h 更新检查)调度的都是 async tick,但 setInterval 不感知 Promise 完成——当某次请求慢于轮询间隔时,下一次 tick 会在 上一次未完成时又发起,导致同类请求并发堆叠、越积越慢。 每个 tick 加在途 running 互斥:上一次刷新还在飞就跳过本次,完成(try/finally,含出错)后 恢复调度。保留已有的 document.hidden 门控与变可见补刷。慢 tick 只是被跳过、完成后自愈, 不会永久停摆。 (引 non-overlapping-poll 工具 + 给 webui 新增测试基建对 3 个轮询点属过度工程,故就地加 互斥。) --- packages/webui/src/router/app-layout.tsx | 28 +++++++++++++++++++----- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/packages/webui/src/router/app-layout.tsx b/packages/webui/src/router/app-layout.tsx index 4e741f99..65a8b1c6 100644 --- a/packages/webui/src/router/app-layout.tsx +++ b/packages/webui/src/router/app-layout.tsx @@ -140,12 +140,20 @@ export function AppLayout() { useEffect(() => { if (pollInterval <= 0) return; let cancelled = false; + let running = false; const reconcileMs = Math.max(pollInterval * 10, 10_000); const tick = async () => { // Skip while the tab is hidden — SSE already carries live updates, and a // backgrounded tab has no UI to refresh. Re-tick on becoming visible. - if (cancelled || document.hidden) return; - await Promise.all([refreshQqList(), refreshProcesses(), refreshConnections()]); + // `running` drops a tick while the previous refresh is still in flight, + // so a slow backend can't stack overlapping requests. + if (cancelled || document.hidden || running) return; + running = true; + try { + await Promise.all([refreshQqList(), refreshProcesses(), refreshConnections()]); + } finally { + running = false; + } }; // Initial tick primes the lists before the SSE handshake completes // (avoids a flash of empty state in the chrome). @@ -168,9 +176,11 @@ export function AppLayout() { useEffect(() => { if (pollInterval <= 0) return; let cancelled = false; + let running = false; const tick = async () => { - if (cancelled || document.hidden) return; - await refreshSystem(); + if (cancelled || document.hidden || running) return; + running = true; + try { await refreshSystem(); } finally { running = false; } }; tick(); const interval = setInterval(tick, pollInterval); @@ -187,8 +197,14 @@ export function AppLayout() { // list-polling above — GitHub's API is rate-limited, the result rarely // changes, and the server caches it anyway, so this is cheap. useEffect(() => { - refreshUpdate(); - const id = setInterval(() => refreshUpdate(), 6 * 60 * 60 * 1000); + let running = false; + const tick = async () => { + if (running) return; + running = true; + try { await refreshUpdate(); } finally { running = false; } + }; + tick(); + const id = setInterval(tick, 6 * 60 * 60 * 1000); return () => clearInterval(id); }, [refreshUpdate]); From 884db940df71fc09103e119f36376dd20ded9cc1 Mon Sep 17 00:00:00 2001 From: Airline233 Date: Thu, 2 Jul 2026 22:38:05 +0800 Subject: [PATCH 07/16] feat(qzone): add set_qzone_msg_right to change a feed's visibility (#186) * feat(qzone): add set_qzone_msg_right to change a feed's visibility Add updateQzoneMsgRight in the protocol layer, porting php-qzone's updateRight: fetch the feed via emotion_cgi_msgdetail_v6, rebuild the full publish-shaped payload (richval/pic_bo/con), then override ugc_right/allow_uins and POST to emotion_cgi_update. Expose it through QzoneApi.updateRight and the OneBot set_qzone_msg_right action, with the same ugc_right/target_uins validation as send_qzone_msg. Covered by protocol, core and onebot tests. * fix(qzone): make qzoneParse more stable and fixed a test example --- packages/core/src/bridge/apis/qzone.ts | 11 + packages/core/tests/actions/qzone.test.ts | 10 + packages/mcp/src/generated/catalog.json | 89 +++++- packages/mcp/src/generated/catalog.ts | 89 +++++- packages/onebot/src/actions/qzone.ts | 28 ++ packages/onebot/tests/qzone-actions.test.ts | 27 ++ packages/protocol/src/web/qzone.ts | 263 +++++++++++++++++- .../tests/web/qzone-update-right.test.ts | 143 ++++++++++ 8 files changed, 653 insertions(+), 7 deletions(-) create mode 100644 packages/protocol/tests/web/qzone-update-right.test.ts diff --git a/packages/core/src/bridge/apis/qzone.ts b/packages/core/src/bridge/apis/qzone.ts index 99785167..924dac2a 100644 --- a/packages/core/src/bridge/apis/qzone.ts +++ b/packages/core/src/bridge/apis/qzone.ts @@ -5,11 +5,13 @@ import { getQzoneMsgList, publishQzoneMsg, setQzoneLike, + updateQzoneMsgRight, uploadQzoneImageFromSource, type QzoneCommentResult, type QzoneFeedsResult, type QzoneMsgListResult, type QzonePublishResult, + type QzoneUpdateRightResult, type QzoneUploadImageResult, } from '@snowluma/protocol/web/qzone'; import type { BridgeContext } from '../bridge-context'; @@ -74,6 +76,15 @@ export class QzoneApi { await deleteQzoneMsg(cookieObject, this.ctx.identity.uin, tid); } + /** + * 修改机器人自己空间一条已发说说的查看权限(按 tid)。 + * `ugcRight` / `targetUins` 含义同 publish(16/128 时 targetUins 必填)。 + */ + async updateRight(tid: string, ugcRight: number, targetUins?: string): Promise { + const cookieObject = await this.ctx.apis.web.getCookies('qzone.qq.com'); + return updateQzoneMsgRight(cookieObject, this.ctx.identity.uin, tid, ugcRight, targetUins); + } + /** * 给一条说说点赞/取消赞。`targetUin` 省略时点赞机器人自己空间的说说; * 点赞好友说说时传好友 uin(tid 来自 get_qzone_feeds / get_qzone_msg_list)。 diff --git a/packages/core/tests/actions/qzone.test.ts b/packages/core/tests/actions/qzone.test.ts index 219a1412..d76558ce 100644 --- a/packages/core/tests/actions/qzone.test.ts +++ b/packages/core/tests/actions/qzone.test.ts @@ -117,6 +117,16 @@ describe('apis/qzone', () => { expect(delSpy).toHaveBeenCalledWith({ p_skey: 'PSK' }, '10001', 'TID9'); }); + it('updateRight changes a feed\'s visibility on the bot\'s own space', async () => { + const getCookies = vi.fn(async () => ({ p_skey: 'PSK' })); + const bridge = mockBridge({ apis: { ...mockApiHub(), web: { getCookies } } as never }); + const updSpy = vi.spyOn(qzoneWeb, 'updateQzoneMsgRight').mockResolvedValue({ ugc_right: 16 }); + const out = await new QzoneApi(bridge as never).updateRight('TID9', 16, '10002|10003'); + expect(getCookies).toHaveBeenCalledWith('qzone.qq.com'); + expect(updSpy).toHaveBeenCalledWith({ p_skey: 'PSK' }, '10001', 'TID9', 16, '10002|10003'); + expect(out).toEqual({ ugc_right: 16 }); + }); + it('like defaults the feed owner to self and passes opUin=self + like flag', async () => { const getCookies = vi.fn(async () => ({ p_skey: 'PSK' })); const bridge = mockBridge({ apis: { ...mockApiHub(), web: { getCookies } } as never }); diff --git a/packages/mcp/src/generated/catalog.json b/packages/mcp/src/generated/catalog.json index 931ebc36..683ddff0 100644 --- a/packages/mcp/src/generated/catalog.json +++ b/packages/mcp/src/generated/catalog.json @@ -8903,6 +8903,93 @@ }, "category": "扩展" }, + { + "name": "set_qzone_msg_right", + "aliases": [], + "summary": "修改一条已发说说的查看权限(QQ 空间,按 tid)", + "returns": "更新后的权限对象。", + "returnsSchema": { + "type": "object", + "properties": { + "ugc_right": { + "type": "integer", + "description": "更新后的查看权限" + } + }, + "required": [ + "ugc_right" + ] + }, + "readOnly": false, + "params": [ + { + "name": "tid", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + }, + "desc": "说说 tid(来自 get_qzone_msg_list / send_qzone_msg)" + }, + { + "name": "ugc_right", + "type": "int", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "查看权限:1=所有人可见,4=好友可见,16=部分好友可见,64=仅自己可见,128=部分好友不可见" + }, + { + "name": "target_uins", + "type": "uint[]", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "minimum": 1 + } + }, + "desc": "权限作用 QQ 号数组;ugc_right=16 时表示可见名单,128 时表示不可见名单" + } + ], + "invariants": [ + "ugc_right must be one of 1, 4, 16, 64, 128", + "target_uins is required when ugc_right is 16 or 128" + ], + "inputSchema": { + "type": "object", + "properties": { + "tid": { + "type": "string", + "minLength": 1, + "description": "说说 tid(来自 get_qzone_msg_list / send_qzone_msg)" + }, + "ugc_right": { + "type": "integer", + "minimum": 1, + "description": "查看权限:1=所有人可见,4=好友可见,16=部分好友可见,64=仅自己可见,128=部分好友不可见" + }, + "target_uins": { + "type": "array", + "items": { + "type": "integer", + "minimum": 1 + }, + "description": "权限作用 QQ 号数组;ugc_right=16 时表示可见名单,128 时表示不可见名单" + } + }, + "required": [ + "tid", + "ugc_right" + ], + "additionalProperties": true + }, + "category": "空间" + }, { "name": "set_restart", "aliases": [], @@ -9834,7 +9921,7 @@ }, { "category": "空间", - "count": 7 + "count": 8 }, { "category": "流式接口", diff --git a/packages/mcp/src/generated/catalog.ts b/packages/mcp/src/generated/catalog.ts index 66b59332..42422e11 100644 --- a/packages/mcp/src/generated/catalog.ts +++ b/packages/mcp/src/generated/catalog.ts @@ -8906,6 +8906,93 @@ export const ACTIONS: CatalogAction[] = [ }, "category": "扩展" }, + { + "name": "set_qzone_msg_right", + "aliases": [], + "summary": "修改一条已发说说的查看权限(QQ 空间,按 tid)", + "returns": "更新后的权限对象。", + "returnsSchema": { + "type": "object", + "properties": { + "ugc_right": { + "type": "integer", + "description": "更新后的查看权限" + } + }, + "required": [ + "ugc_right" + ] + }, + "readOnly": false, + "params": [ + { + "name": "tid", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + }, + "desc": "说说 tid(来自 get_qzone_msg_list / send_qzone_msg)" + }, + { + "name": "ugc_right", + "type": "int", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "查看权限:1=所有人可见,4=好友可见,16=部分好友可见,64=仅自己可见,128=部分好友不可见" + }, + { + "name": "target_uins", + "type": "uint[]", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "minimum": 1 + } + }, + "desc": "权限作用 QQ 号数组;ugc_right=16 时表示可见名单,128 时表示不可见名单" + } + ], + "invariants": [ + "ugc_right must be one of 1, 4, 16, 64, 128", + "target_uins is required when ugc_right is 16 or 128" + ], + "inputSchema": { + "type": "object", + "properties": { + "tid": { + "type": "string", + "minLength": 1, + "description": "说说 tid(来自 get_qzone_msg_list / send_qzone_msg)" + }, + "ugc_right": { + "type": "integer", + "minimum": 1, + "description": "查看权限:1=所有人可见,4=好友可见,16=部分好友可见,64=仅自己可见,128=部分好友不可见" + }, + "target_uins": { + "type": "array", + "items": { + "type": "integer", + "minimum": 1 + }, + "description": "权限作用 QQ 号数组;ugc_right=16 时表示可见名单,128 时表示不可见名单" + } + }, + "required": [ + "tid", + "ugc_right" + ], + "additionalProperties": true + }, + "category": "空间" + }, { "name": "set_restart", "aliases": [], @@ -9838,7 +9925,7 @@ export const CATEGORIES: CatalogCategory[] = [ }, { "category": "空间", - "count": 7 + "count": 8 }, { "category": "流式接口", diff --git a/packages/onebot/src/actions/qzone.ts b/packages/onebot/src/actions/qzone.ts index d3924b2b..16db40f8 100644 --- a/packages/onebot/src/actions/qzone.ts +++ b/packages/onebot/src/actions/qzone.ts @@ -147,6 +147,34 @@ export const actions = [ }, }), + // set_qzone_msg_right — 修改机器人自己空间一条已发说说的查看权限(按 tid)。 + // 写操作;ugc_right/target_uins 语义与 send_qzone_msg 一致。 + defineAction({ + name: 'set_qzone_msg_right', + returns: '更新后的权限对象。', + returnsSchema: { + type: 'object', + properties: { + ugc_right: { type: 'integer', description: '更新后的查看权限' }, + }, + required: ['ugc_right'], + }, + summary: '修改一条已发说说的查看权限(QQ 空间,按 tid)', + params: { + tid: f.string({ allowEmpty: false }).describe('说说 tid(来自 get_qzone_msg_list / send_qzone_msg)'), + ugc_right: f.int({ min: 1 }).describe('查看权限:1=所有人可见,4=好友可见,16=部分好友可见,64=仅自己可见,128=部分好友不可见'), + target_uins: f.array(f.uint()).describe('权限作用 QQ 号数组;ugc_right=16 时表示可见名单,128 时表示不可见名单').optional(), + }, + rules: (r) => [ + r.rule('ugc_right must be one of 1, 4, 16, 64, 128', (p) => QZONE_UGC_RIGHTS.has(p.ugc_right)), + r.rule('target_uins is required when ugc_right is 16 or 128', (p) => (p.ugc_right !== 16 && p.ugc_right !== 128) || !!p.target_uins?.length), + ], + run: async (p, ctx) => { + const res = await ctx.bridge.apis.qzone.updateRight(p.tid, p.ugc_right, p.target_uins?.join('|')); + return okResponse(res as unknown as JsonValue); + }, + }), + // like_qzone — 给一条说说点赞。target_uin 省略=机器人自己空间;点赞好友说说传其 uin。 // abstime=该说说的发表时间(unix 秒,来自 get_qzone_feeds/get_qzone_msg_list), // 传真实值更可靠;不传按 0。写操作;高频点赞会被 Qzone 风控,调用方需限流。 diff --git a/packages/onebot/tests/qzone-actions.test.ts b/packages/onebot/tests/qzone-actions.test.ts index 92c40a6c..486a331c 100644 --- a/packages/onebot/tests/qzone-actions.test.ts +++ b/packages/onebot/tests/qzone-actions.test.ts @@ -62,4 +62,31 @@ describe('qzone actions', () => { expect(publish).not.toHaveBeenCalled(); }); + it('set_qzone_msg_right joins target_uins with | and passes through', async () => { + const updateRight = vi.fn().mockResolvedValue({ ugc_right: 16 }); + const handler = makeHandler({ updateRight }); + + const res = await handler.handle('set_qzone_msg_right', { + tid: 'T1', + ugc_right: 16, + target_uins: [10001, 10002], + }); + + expect(res).toMatchObject({ status: 'ok', retcode: 0, data: { ugc_right: 16 } }); + expect(updateRight).toHaveBeenCalledWith('T1', 16, '10001|10002'); + }); + + it('set_qzone_msg_right rejects invalid ugc_right and 16/128 without target_uins', async () => { + const updateRight = vi.fn(); + const handler = makeHandler({ updateRight }); + + const bad = await handler.handle('set_qzone_msg_right', { tid: 'T1', ugc_right: 2 }); + expect(bad).toMatchObject({ status: 'failed' }); + + const missing = await handler.handle('set_qzone_msg_right', { tid: 'T1', ugc_right: 128 }); + expect(missing).toMatchObject({ status: 'failed' }); + + expect(updateRight).not.toHaveBeenCalled(); + }); + }); diff --git a/packages/protocol/src/web/qzone.ts b/packages/protocol/src/web/qzone.ts index 222f55ce..3b0aee1f 100644 --- a/packages/protocol/src/web/qzone.ts +++ b/packages/protocol/src/web/qzone.ts @@ -64,20 +64,30 @@ export interface QzoneMsgListResult { /** * Parse a Qzone CGI body that may be raw JSON or a JSONP callback wrapper - * (`_Callback({...});` / `callback({...})`). We slice from the first `{` - * to the last `}` and JSON.parse that — robust to either form without + * (`_Callback({...});` / `callback({...})`). We first attempt to slice from + * the first `{` to the last `}`, when failed attempt from the first `back({` + * to the last `})` and JSON.parse that — robust to either form without * pinning the callback name, which Qzone varies. Throws if no object body * is present (e.g. an HTML error page), which the caller turns into a * failed response rather than a silent empty list. */ export function parseQzoneJson(text: string): T { const s = text.trim(); - const start = s.indexOf('{'); - const end = s.lastIndexOf('}'); + try { + const start = s.indexOf('{'); + const end = s.lastIndexOf('}'); + if (start !== -1 && end !== -1 && end > start) { + return JSON.parse(s.slice(start, end + 1)) as T; + } + } catch { + + } + const start = s.indexOf('back({'); + const end = s.lastIndexOf('})'); if (start === -1 || end === -1 || end < start) { throw new Error('invalid response from qzone api'); } - return JSON.parse(s.slice(start, end + 1)) as T; + return JSON.parse(s.slice(start + 5, end + 1)) as T; } /** @@ -1040,3 +1050,246 @@ export async function commentQzoneMsg( const commentId = data.commentid ?? data.commentId; return { comment_id: commentId !== undefined ? String(commentId) : '' }; } + +// ─────── 改说说权限 (update right) — emotion_cgi_msgdetail_v6 + emotion_cgi_update ─────── +// Changes the view permission (ugc_right) of an EXISTING 说说. The update CGI +// is not a partial patch — it re-submits the whole feed (content, richval, +// pic_bo, …), so the flow is two-step: GET the feed detail from +// emotion_cgi_msgdetail_v6 (NOTE: proxied domain is taotao.qq.com, not +// taotao.qzone.qq.com — that's what the working impl hits), rebuild the full +// publish-shaped payload from it, override ugc_right/allow_uins, and POST to +// emotion_cgi_update. Both the detail param set and the payload rebuild are +// CONFIRMED against php-qzone/qzone.class.php updateRight (live-verified +// there); success signal is `subcode == 0`, same envelope as the siblings. +// WRITE OP — rate-limit like publish. + +interface RawMsgDetailPic { + pic_id?: string; + pictype?: number | string; + type?: number | string; + height?: number | string; + b_height?: number | string; + width?: number | string; + b_width?: number | string; + smallurl?: string; + url1?: string; + url2?: string; + url3?: string; +} + +interface RawMsgDetailResponse { + code?: number; + subcode?: number; + message?: string; + msg?: string; + tid?: string; + uin?: number | string; + content?: string; + conlist?: Array<{ con?: string }> | null; + pic?: RawMsgDetailPic[] | null; + richtype?: number | string; + richval?: string; + pic_template?: string; + special_url?: string; + t1_subtype?: number | string; + subrichtype?: number | string; + feedversion?: number | string; + ver?: number | string; + ugc_right?: number | string; + to_sign?: number | string; + ugcright_id?: string; + code_version?: number | string; +} + +interface RawUpdateResponse { + code?: number; + subcode?: number; + message?: string; + msg?: string; + ugc_right?: number | string; +} + +/** Result of changing a 说说's view permission. */ +export interface QzoneUpdateRightResult { + [key: string]: JsonValue; + /** The feed's ugc_right after the update (echoed by the server when present). */ + ugc_right: number; +} + +/** + * Rebuild the full emotion_cgi_update payload from a msgdetail_v6 response. + * Field-for-field port of php-qzone's buildUpdatePayloadFromDetail: richval + * strings are reconstructed from each `pic[].pic_id` (`,albumid,lloc,sloc, + * type,height,width,,0,0`, tab-joined), `pic_bo` from the `bo=` query param + * of any picture URL variant (group tab-doubled), and the content from + * `conlist` when present. Exported for tests; THROWS on a detail body it + * cannot rebuild from (missing tid, or an image post whose pic info is + * unusable) rather than submitting a lossy update. + */ +export function buildQzoneUpdatePayload(detail: RawMsgDetailResponse, selfUin: string): URLSearchParams { + if (!detail.tid) { + throw new Error('qzone msg detail is missing tid'); + } + + const pics = detail.pic ?? []; + const richtype = detail.richtype !== undefined ? Number(detail.richtype) : (pics.length === 0 ? '' : 1); + const richvals: string[] = []; + const picBoItems: string[] = []; + + for (const pic of pics) { + const picId = String(pic.pic_id ?? ''); + if (!picId) continue; + + const parts = picId.split(','); + const albumId = parts[1] ?? ''; + const lloc = parts[2] ?? ''; + if (!albumId || !lloc) { + throw new Error('qzone msg detail has unsupported pic info'); + } + + const sloc = lloc; + const picType = String(pic.pictype ?? pic.type ?? 22); + const height = String(pic.height ?? pic.b_height ?? 0); + const width = String(pic.width ?? pic.b_width ?? 0); + richvals.push(`,${albumId},${lloc},${sloc},${picType},${height},${width},,0,0`); + + for (const urlKey of ['smallurl', 'url1', 'url2', 'url3'] as const) { + const picUrl = pic[urlKey]; + if (!picUrl) continue; + const match = /[?&]bo=([^&#]+)/.exec(picUrl); + if (match) { + picBoItems.push(decodeURIComponent(match[1]!)); + break; + } + } + } + + if (richtype === 1 && richvals.length === 0) { + throw new Error('qzone image post detail is missing pic info'); + } + + let content = detail.content ?? ''; + const conParts = (detail.conlist ?? []) + .map((c) => c.con) + .filter((c): c is string => c !== undefined); + if (conParts.length > 0) { + content = conParts.join('').trim(); + } + + const subrichtype = detail.t1_subtype ?? detail.subrichtype ?? (richvals.length === 0 ? '' : 1); + const boGroup = picBoItems.join(','); + const picBo = boGroup ? `${boGroup}\t${boGroup}` : ''; + + const hostuin = String(detail.uin ?? selfUin); + return new URLSearchParams({ + syn_tweet_verson: '1', + tid: String(detail.tid), + paramstr: '1', + pic_template: detail.pic_template ?? '', + richtype: String(richtype), + richval: richvals.length > 0 ? richvals.join('\t') : (detail.richval ?? ''), + special_url: detail.special_url ?? '', + subrichtype: String(subrichtype), + pic_bo: picBo, + con: content, + feedversion: String(detail.feedversion ?? 1), + ver: String(detail.ver ?? 1), + ugc_right: String(Number(detail.ugc_right ?? 1)), + to_sign: String(Number(detail.to_sign ?? 0)), + ugcright_id: String(detail.ugcright_id ?? detail.tid), + hostuin, + code_version: String(detail.code_version ?? 1), + format: 'fs', + qzreferrer: `https://user.qzone.qq.com/${hostuin}`, + }); +} + +/** Fetch one 说说's full detail (the update payload's source of truth). */ +async function getQzoneMsgDetail( + cookieObject: Record, + selfUin: string, + tid: string, +): Promise { + const bkn = getBknFromCookie(cookieObject); + const url = `https://h5.qzone.qq.com/proxy/domain/taotao.qq.com/cgi-bin/emotion_cgi_msgdetail_v6?${new URLSearchParams( + { + tid, + uin: selfUin, + t1_source: '1', + not_trunc_con: '1', + need_right: '1', + not_adapt_outpic: '1', + g_tk: bkn, + }, + ).toString()}`; + + const text = await RequestUtil.HttpGetText(url, 'GET', '', { + Cookie: cookieToString(cookieObject), + }); + log.trace('getQzoneMsgDetail raw body (tid=%s): %s', tid, text); + const data = parseQzoneJson(text); + + const code = data.subcode ?? data.code ?? -1; + if (code !== 0) { + log.warn('getQzoneMsgDetail: non-zero code (tid=%s) code=%d msg=%s', tid, code, data.message ?? data.msg); + throw new Error(`qzone msg detail failed: code=${code} ${data.message ?? data.msg ?? ''}`.trim()); + } + return data; +} + +/** + * Change the view permission of an existing 说说 (`tid`, on the bot's own + * space) via the msgdetail_v6 → emotion_cgi_update two-step. `ugcRight` is + * one of 1(所有人)/4(好友)/16(部分可见)/64(仅自己)/128(部分不可见); + * `targetUins` (|-separated QQ numbers) is required for 16/128 and ignored + * otherwise. Errors PROPAGATE from both steps: a transport failure, a + * non-zero Qzone code on the detail fetch (unknown/foreign tid, auth), an + * unrebuildable detail, or a non-zero `subcode` on the update all throw. + */ +export async function updateQzoneMsgRight( + cookieObject: Record, + selfUin: string, + tid: string, + ugcRight: number, + targetUins?: string, +): Promise { + if (!cookieObject || typeof cookieObject !== 'object') { + throw new Error('cookieObject is required'); + } + if (!tid) { + throw new Error('tid is required'); + } + + const right = normalizeQzoneUgcRight(ugcRight); + const effectiveTargetUins = right === 16 || right === 128 ? normalizeTargetUins(targetUins) : ''; + if ((right === 16 || right === 128) && !effectiveTargetUins) { + throw new Error('target_uins is required when ugc_right is 16 or 128'); + } + + const detail = await getQzoneMsgDetail(cookieObject, selfUin, tid); + const bodyParams = buildQzoneUpdatePayload(detail, selfUin); + bodyParams.set('ugc_right', String(right)); + if (effectiveTargetUins) bodyParams.set('allow_uins', effectiveTargetUins); + + const bkn = getBknFromCookie(cookieObject); + const url = `https://h5.qzone.qq.com/proxy/domain/taotao.qzone.qq.com/cgi-bin/emotion_cgi_update?g_tk=${bkn}`; + const text = await RequestUtil.HttpGetText(url, 'POST', bodyParams.toString(), { + Cookie: cookieToString(cookieObject), + 'Content-Type': 'application/x-www-form-urlencoded', + }); + // format=fs wraps the JSON in a callback (`frameElement.callback({...});` + // or `_Callback({...});`) — parseQzoneJson's first-{-to-last-} slice + // handles every observed variant. + const data = parseQzoneJson(text); + + if (typeof data.subcode === 'number' && data.subcode !== 0) { + log.warn('updateQzoneMsgRight: non-zero subcode (tid=%s) subcode=%d msg=%s', tid, data.subcode, data.message ?? data.msg); + throw new Error(`qzone update right failed: subcode=${data.subcode} ${data.message ?? data.msg ?? ''}`.trim()); + } + if (typeof data.code === 'number' && data.code !== 0) { + log.warn('updateQzoneMsgRight: non-zero code (tid=%s) code=%d msg=%s', tid, data.code, data.message ?? data.msg); + throw new Error(`qzone update right failed: code=${data.code} ${data.message ?? data.msg ?? ''}`.trim()); + } + + return { ugc_right: Number(data.ugc_right ?? right) }; +} diff --git a/packages/protocol/tests/web/qzone-update-right.test.ts b/packages/protocol/tests/web/qzone-update-right.test.ts new file mode 100644 index 00000000..3b826a0d --- /dev/null +++ b/packages/protocol/tests/web/qzone-update-right.test.ts @@ -0,0 +1,143 @@ +import { describe, it, expect, vi, afterEach } from 'vitest'; +import { buildQzoneUpdatePayload, updateQzoneMsgRight } from '@snowluma/protocol/web/qzone'; +import { RequestUtil } from '@snowluma/protocol/web/request-util'; + +// updateQzoneMsgRight is the two-step msgdetail_v6 → emotion_cgi_update flow. +// The real logic is the payload REBUILD (detail → publish-shaped form body, +// ported from php-qzone's live-verified updateRight): richval reconstruction +// from pic_id, pic_bo from the `bo=` query param, conlist → con. We pin that +// plus both request shapes and the throw contracts. + +const cookies = { p_skey: 'PSK', skey: 'SK', uin: 'o10000', p_uin: 'o10000' }; + +describe('qzone / buildQzoneUpdatePayload', () => { + it('rebuilds a text-only payload with ugcright_id defaulting to tid', () => { + const body = buildQzoneUpdatePayload( + { tid: 'T1', uin: 10000, content: 'hello', ugc_right: 1 }, + '10000', + ); + expect(body.get('tid')).toBe('T1'); + expect(body.get('con')).toBe('hello'); + expect(body.get('richtype')).toBe(''); + expect(body.get('richval')).toBe(''); + expect(body.get('pic_bo')).toBe(''); + expect(body.get('ugcright_id')).toBe('T1'); + expect(body.get('hostuin')).toBe('10000'); + expect(body.get('format')).toBe('fs'); + }); + + it('rebuilds richval from pic_id and pic_bo from the bo= query param', () => { + const body = buildQzoneUpdatePayload( + { + tid: 'T2', + uin: 10000, + content: 'pics', + conlist: [{ con: 'pi' }, { con: 'cs' }], + richtype: 1, + pic: [ + { + pic_id: 'X,ALBUM1,LLOC1,extra', + pictype: 22, + height: 800, + width: 600, + url1: 'https://photo.example/a.jpg?bo=abc%2Cdef&x=1', + }, + ], + }, + '10000', + ); + expect(body.get('con')).toBe('pics'); + expect(body.get('richtype')).toBe('1'); + expect(body.get('richval')).toBe(',ALBUM1,LLOC1,LLOC1,22,800,600,,0,0'); + expect(body.get('pic_bo')).toBe('abc,def\tabc,def'); + }); + + it('throws when an image post detail carries unusable pic info', () => { + expect(() => + buildQzoneUpdatePayload({ tid: 'T3', richtype: 1, pic: [{ pic_id: 'broken' }] }, '10000'), + ).toThrow('unsupported pic info'); + expect(() => buildQzoneUpdatePayload({ tid: 'T3', richtype: 1, pic: [] }, '10000')).toThrow( + 'missing pic info', + ); + }); + + it('throws when the detail has no tid', () => { + expect(() => buildQzoneUpdatePayload({}, '10000')).toThrow('missing tid'); + }); +}); + +describe('qzone / updateQzoneMsgRight (HTTP layer)', () => { + afterEach(() => vi.restoreAllMocks()); + + const detailBody = + '_Callback({"code":0,"subcode":0,"tid":"T1","uin":10000,"content":"hello","ugc_right":1});'; + + it('GETs the detail then POSTs the rebuilt payload with the new ugc_right', async () => { + const spy = vi + .spyOn(RequestUtil, 'HttpGetText') + .mockResolvedValueOnce(detailBody) + .mockResolvedValueOnce('frameElement.callback({"code":0,"subcode":0,"ugc_right":64});'); + + const out = await updateQzoneMsgRight(cookies, '10000', 'T1', 64); + expect(out).toEqual({ ugc_right: 64 }); + + const [detailUrl, detailMethod] = spy.mock.calls[0]!; + expect(detailMethod).toBe('GET'); + expect(detailUrl).toContain( + 'https://h5.qzone.qq.com/proxy/domain/taotao.qq.com/cgi-bin/emotion_cgi_msgdetail_v6?', + ); + const dq = new URLSearchParams((detailUrl as string).split('?')[1]); + expect(dq.get('tid')).toBe('T1'); + expect(dq.get('uin')).toBe('10000'); + + const [updateUrl, updateMethod, updateBody] = spy.mock.calls[1]!; + expect(updateMethod).toBe('POST'); + expect(updateUrl).toContain( + 'https://h5.qzone.qq.com/proxy/domain/taotao.qzone.qq.com/cgi-bin/emotion_cgi_update?', + ); + const uq = new URLSearchParams(updateBody as string); + expect(uq.get('tid')).toBe('T1'); + expect(uq.get('con')).toBe('hello'); + expect(uq.get('ugc_right')).toBe('64'); + expect(uq.get('allow_uins')).toBeNull(); + }); + + it('sets allow_uins (deduped) for ugc_right 16 and requires it', async () => { + const spy = vi + .spyOn(RequestUtil, 'HttpGetText') + .mockResolvedValueOnce(detailBody) + .mockResolvedValueOnce('{"code":0,"subcode":0}'); + + await updateQzoneMsgRight(cookies, '10000', 'T1', 16, '10001|10001|10002'); + const uq = new URLSearchParams(spy.mock.calls[1]![2] as string); + expect(uq.get('ugc_right')).toBe('16'); + expect(uq.get('allow_uins')).toBe('10001|10002'); + + await expect(updateQzoneMsgRight(cookies, '10000', 'T1', 128)).rejects.toThrow( + 'target_uins is required', + ); + }); + + it('rejects an invalid ugc_right before any request', async () => { + const spy = vi.spyOn(RequestUtil, 'HttpGetText'); + await expect(updateQzoneMsgRight(cookies, '10000', 'T1', 2)).rejects.toThrow( + 'ugc_right must be one of', + ); + expect(spy).not.toHaveBeenCalled(); + }); + + it('throws on a non-zero detail code and skips the update POST', async () => { + const spy = vi + .spyOn(RequestUtil, 'HttpGetText') + .mockResolvedValueOnce('{"code":-3000,"subcode":-3000,"message":"need login"}'); + await expect(updateQzoneMsgRight(cookies, '10000', 'T1', 64)).rejects.toThrow('code=-3000'); + expect(spy).toHaveBeenCalledTimes(1); + }); + + it('throws on a non-zero update subcode', async () => { + vi.spyOn(RequestUtil, 'HttpGetText') + .mockResolvedValueOnce(detailBody) + .mockResolvedValueOnce('{"code":0,"subcode":-200,"message":"denied"}'); + await expect(updateQzoneMsgRight(cookies, '10000', 'T1', 64)).rejects.toThrow('subcode=-200'); + }); +}); From 7744e24af2d3e1a6de852bde8dfacf181e9464e0 Mon Sep 17 00:00:00 2001 From: DrSmoothl <1787882683@qq.com> Date: Fri, 3 Jul 2026 16:08:08 +0800 Subject: [PATCH 08/16] fix(protocol): make set_group_search actually apply search flags (#191) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 旧实现走 OIDB 0x89a_0 但 settings 发空字节 → 服务端返 ok 却 no-op;action 也只收 group_id,没有设置搜索方式的参数(报告属实)。 真机 RE 定稿(tempserver,bot 为管理员的实群逐字段扫描 + GET 读回): - 修改命令 = 0x89a_0(全量抓包确认,与 MuteAll 同命令,靠 body 形状区分)。结构 = {1:groupUin, 2: 只含被改字段的 GroupDetailInfo modify 子消息}。这是与 0x88D_0 群详情 GET **不同的消息域**(mute/shutUpTime 在此=tag17,在 GET 里却是字符串), 所以标签不能照搬 GET。 - 在 modify 子消息里逐 tag 试写、经 0x88D_0 GET 读回效果,定位: noFingerOpen(关键词/群指纹搜索)=tag 35,noCodeFingerOpen(群号搜索/总开关)=tag 36; 再对照客户端「被搜索方式」三选下拉(私密/群号/群号+关键词)核实语义与 0/1 取值。 - proto-defs:settings 改为 Oidb0x89a_0SearchSettings 子消息,两 flag 用 pb_optional (显式存在)——否则 proto3 丢 0 值,导致关闭(=0)被静默忽略。undefined 仍省略。 - set-search/bridge/action:透传 no_finger_open / no_code_finger_open;只下发提供的 字段(同 NapCat filter 机制、与 modify-group-ext-info 一致)。catalog regen。 - 编码测试锁定:0 值必发 tag 35/36、未提供则省略、命令为 0x89a_0。 typecheck 12 包干净;protocol 585 / onebot 521 / core 472 全绿。 --- packages/core/src/bridge/apis/group-admin.ts | 4 +- packages/mcp/src/generated/catalog.json | 28 ++++++++++- packages/mcp/src/generated/catalog.ts | 28 ++++++++++- packages/onebot/src/actions/group-admin.ts | 8 +++- packages/proto-defs/src/oidb-actions/base.ts | 22 ++++++++- .../oidb-services/group-admin/set-search.ts | 30 ++++++++---- .../tests/oidb-services/set-search.test.ts | 48 +++++++++++++++++++ 7 files changed, 152 insertions(+), 16 deletions(-) create mode 100644 packages/protocol/tests/oidb-services/set-search.test.ts diff --git a/packages/core/src/bridge/apis/group-admin.ts b/packages/core/src/bridge/apis/group-admin.ts index a9bc16b9..e0a03609 100644 --- a/packages/core/src/bridge/apis/group-admin.ts +++ b/packages/core/src/bridge/apis/group-admin.ts @@ -35,8 +35,8 @@ export class GroupAdminApi { return SetAddOption.invoke(this.ctx, { groupId, addType }); } - setSearch(groupId: number): Promise { - return SetSearch.invoke(this.ctx, { groupId }); + setSearch(groupId: number, noFingerOpen?: number, noCodeFingerOpen?: number): Promise { + return SetSearch.invoke(this.ctx, { groupId, noFingerOpen, noCodeFingerOpen }); } setAddRequest( diff --git a/packages/mcp/src/generated/catalog.json b/packages/mcp/src/generated/catalog.json index 683ddff0..42c78ebd 100644 --- a/packages/mcp/src/generated/catalog.json +++ b/packages/mcp/src/generated/catalog.json @@ -8410,7 +8410,7 @@ { "name": "set_group_search", "aliases": [], - "summary": "允许群被搜索", + "summary": "设置群被搜索方式(群指纹 / 群号搜索开关)", "readOnly": false, "params": [ { @@ -8423,6 +8423,24 @@ "minimum": 1 }, "desc": "群号" + }, + { + "name": "no_finger_open", + "type": "int", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + } + }, + { + "name": "no_code_finger_open", + "type": "int", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + } } ], "invariants": [], @@ -8434,6 +8452,14 @@ "minimum": 1, "description": "群号", "x-role": "group_id" + }, + "no_finger_open": { + "type": "integer", + "minimum": 0 + }, + "no_code_finger_open": { + "type": "integer", + "minimum": 0 } }, "required": [ diff --git a/packages/mcp/src/generated/catalog.ts b/packages/mcp/src/generated/catalog.ts index 42422e11..d4b69f64 100644 --- a/packages/mcp/src/generated/catalog.ts +++ b/packages/mcp/src/generated/catalog.ts @@ -8413,7 +8413,7 @@ export const ACTIONS: CatalogAction[] = [ { "name": "set_group_search", "aliases": [], - "summary": "允许群被搜索", + "summary": "设置群被搜索方式(群指纹 / 群号搜索开关)", "readOnly": false, "params": [ { @@ -8426,6 +8426,24 @@ export const ACTIONS: CatalogAction[] = [ "minimum": 1 }, "desc": "群号" + }, + { + "name": "no_finger_open", + "type": "int", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + } + }, + { + "name": "no_code_finger_open", + "type": "int", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + } } ], "invariants": [], @@ -8437,6 +8455,14 @@ export const ACTIONS: CatalogAction[] = [ "minimum": 1, "description": "群号", "x-role": "group_id" + }, + "no_finger_open": { + "type": "integer", + "minimum": 0 + }, + "no_code_finger_open": { + "type": "integer", + "minimum": 0 } }, "required": [ diff --git a/packages/onebot/src/actions/group-admin.ts b/packages/onebot/src/actions/group-admin.ts index 383d6163..c2f5fb6b 100644 --- a/packages/onebot/src/actions/group-admin.ts +++ b/packages/onebot/src/actions/group-admin.ts @@ -54,9 +54,13 @@ export const actions = [ groupAction({ name: 'set_group_search', - summary: '允许群被搜索', + summary: '设置群被搜索方式(群指纹 / 群号搜索开关)', + params: { + no_finger_open: f.int({ min: 0 }).optional(), + no_code_finger_open: f.int({ min: 0 }).optional(), + }, run: async (p, ctx) => { - await ctx.bridge.apis.groupAdmin.setSearch(p.group_id); + await ctx.bridge.apis.groupAdmin.setSearch(p.group_id, p.no_finger_open, p.no_code_finger_open); return okResponse(); }, }), diff --git a/packages/proto-defs/src/oidb-actions/base.ts b/packages/proto-defs/src/oidb-actions/base.ts index d5a27a32..5df7e4ea 100644 --- a/packages/proto-defs/src/oidb-actions/base.ts +++ b/packages/proto-defs/src/oidb-actions/base.ts @@ -31,9 +31,29 @@ export interface Oidb0x89a_0AddOption { settings?: pb<2, Oidb0x89a_0AddOptionSettings>; field12?: pb<12, uint_32>; } +// The `settings` payload is the GroupDetailInfo "modify" sub-message carrying +// only the fields being changed (the NT GroupDetailFilter is client-side — it +// just gates which fields the encoder emits, like modify-group-ext-info). This +// is a DIFFERENT message domain from the 0x88D_0 group-detail GET: mute/ +// shutUpTime is tag 17 here (Lagrange/MuteAll) but a string in the GET, so the +// tags do NOT match the GET's groupInfo. Tags RE'd empirically on a live group +// (bot as admin) by sweeping this sub-message tag-by-tag and reading the effect +// back through the 0x88D_0 GET (82/83), then confirming against the client's +// 3-state "被搜索方式" dropdown (私密 / 群号 / 群号+关键词): +// noFingerOpen (关键词/群指纹搜索) = tag 35 → GET 82 +// noCodeFingerOpen (群号搜索 / 总开关) = tag 36 → GET 83 +// Value 0 = that mode open/enabled, 1 = disabled ("no…Open"); keyword search +// additionally requires code search on. Matches NapCat modifyGroupDetailInfoV2. +export interface Oidb0x89a_0SearchSettings { + // pb_optional (explicit presence): a value of 0 (mode enabled) MUST be sent, + // so these can't use plain pb<> — proto3 would drop the zero and the request + // would silently no-op. undefined is still elided (field left unchanged). + noFingerOpen?: pb_optional<35, uint_32>; + noCodeFingerOpen?: pb_optional<36, uint_32>; +} export interface Oidb0x89a_0Search { groupUin?: pb<1, uint_64>; - settings?: pb<2, bytes>; + settings?: pb<2, Oidb0x89a_0SearchSettings>; field12?: pb<12, uint_32>; } export interface OidbKickMember { diff --git a/packages/protocol/src/oidb-services/group-admin/set-search.ts b/packages/protocol/src/oidb-services/group-admin/set-search.ts index 36352467..0d3f18bc 100644 --- a/packages/protocol/src/oidb-services/group-admin/set-search.ts +++ b/packages/protocol/src/oidb-services/group-admin/set-search.ts @@ -1,24 +1,36 @@ -// 0x89A_0 — toggle group "searchable" flag. Same cmd+subcmd shape as -// MuteAll / SetAddOption / SetName. +// 0x89A_0 — set a group's "被搜索方式" (searchability). Same cmd+subcmd shape as +// MuteAll / SetAddOption / SetName; the `settings` submessage carries the two +// search flags. Empty settings is a no-op (why the earlier version silently +// did nothing) — a real change must emit at least one flag. Command + tags +// (noFingerOpen=35, noCodeFingerOpen=36) RE'd empirically on a live group by +// sweeping the modify sub-message and reading the effect back through the +// 0x88D_0 GET (see Oidb0x89a_0SearchSettings for the full derivation). import { protobuf_decode, protobuf_encode } from '@snowluma/proton'; import type { OidbBase, OidbEmpty } from '@snowluma/proto-defs/oidb'; -import type { Oidb0x89a_0Search } from '@snowluma/proto-defs/oidb-actions/base'; +import type { Oidb0x89a_0Search, Oidb0x89a_0SearchSettings } from '@snowluma/proto-defs/oidb-actions/base'; import { invokeOidb, type OidbSender } from '../../oidb-service'; export namespace SetSearch { export const command = 0x89A; export const subCommand = 0; - export interface Params { groupId: number; } + export interface Params { + groupId: number; + /** 群指纹(关键词)搜索开关。undefined → 不改(不下发该字段)。 */ + noFingerOpen?: number; + /** 群号搜索开关。undefined → 不改(不下发该字段)。 */ + noCodeFingerOpen?: number; + } export type Deps = OidbSender; - export const serialize = (_ctx: Deps, p: Params): Oidb0x89a_0Search => ({ - groupUin: BigInt(p.groupId), - settings: new Uint8Array(0), - field12: 0, - }); + export const serialize = (_ctx: Deps, p: Params): Oidb0x89a_0Search => { + const settings: Oidb0x89a_0SearchSettings = {}; + if (p.noFingerOpen !== undefined) settings.noFingerOpen = p.noFingerOpen; + if (p.noCodeFingerOpen !== undefined) settings.noCodeFingerOpen = p.noCodeFingerOpen; + return { groupUin: BigInt(p.groupId), settings, field12: 0 }; + }; export const deserialize = (_ctx: Deps, _: OidbEmpty): void => {}; diff --git a/packages/protocol/tests/oidb-services/set-search.test.ts b/packages/protocol/tests/oidb-services/set-search.test.ts new file mode 100644 index 00000000..ae4f4815 --- /dev/null +++ b/packages/protocol/tests/oidb-services/set-search.test.ts @@ -0,0 +1,48 @@ +import { describe, expect, it, vi } from 'vitest'; +import type { SendPacketResult } from '@snowluma/common/packet-sender'; +import { SetSearch } from '../../src/oidb-services/group-admin/set-search'; + +// Capture the exact OIDB request bytes SetSearch sends, via a fake sender. +async function sentHex(params: SetSearch.Params): Promise { + let body: Uint8Array | undefined; + const deps = { + sendRawPacket: vi.fn(async (_cmd: string, b: Uint8Array): Promise => { + body = b; + return { success: true, gotResponse: true, errorCode: 0, errorMessage: '', responseData: Buffer.alloc(0) }; + }), + }; + await SetSearch.invoke(deps as never, params); + return Buffer.from(body!).toString('hex'); +} + +// settings (field2) sub-message: noFingerOpen = tag 35 (35<<3 = 280 → varint +// "98 02"), noCodeFingerOpen = tag 36 (36<<3 = 288 → "a0 02"). Tags RE'd +// empirically on a live group (#191, see Oidb0x89a_0SearchSettings). +describe('SetSearch (0x89a_0) settings encoding (#191)', () => { + it('emits BOTH flags even at value 0 — toggle-off must not be dropped', async () => { + const h = await sentHex({ groupId: 941657197, noFingerOpen: 0, noCodeFingerOpen: 0 }); + // field2 = { 35: 0, 36: 0 } → 12 06 980200 a00200 + expect(h).toContain('1206980200a00200'); + }); + + it('emits value 1 correctly', async () => { + const h = await sentHex({ groupId: 941657197, noFingerOpen: 1, noCodeFingerOpen: 1 }); + expect(h).toContain('1206980201a00201'); + }); + + it('elides an unprovided flag (undefined → not sent)', async () => { + const h = await sentHex({ groupId: 941657197, noCodeFingerOpen: 0 }); + expect(h).toContain('a00200'); // tag 36 (noCodeFingerOpen) present, value 0 + expect(h).not.toContain('980200'); // tag 35 (noFingerOpen) absent + }); + + it('carries the group uin + command 0x89a_0', async () => { + const deps = { + sendRawPacket: vi.fn(async (): Promise => ({ + success: true, gotResponse: true, errorCode: 0, errorMessage: '', responseData: Buffer.alloc(0), + })), + }; + await SetSearch.invoke(deps as never, { groupId: 941657197, noFingerOpen: 1 }); + expect(deps.sendRawPacket).toHaveBeenCalledWith('OidbSvcTrpcTcp.0x89a_0', expect.anything(), undefined); + }); +}); From abef7973d97eedfa8abd9841fb46b71d99777100 Mon Sep 17 00:00:00 2001 From: DrSmoothl <1787882683@qq.com> Date: Fri, 3 Jul 2026 19:30:53 +0800 Subject: [PATCH 09/16] feat(webui): auto-login via ?token= URL query param (#194) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 登录页每次手输密码很繁琐。支持在 URL 带 `?token=` 直接免密进入: API client 构造时读取该参数作为 bearer token,交由既有 /api/status 门校验—— 有效则直达主页,无效/过期则照常落登录页(无安全降级,服务端仍校验)。 安全处理:token 读取后**立即从 URL 剥离**(history.replaceState)——凭据留在地址栏 会经浏览器历史 / 服务端访问日志 / Referer 头泄露。同时持久化到 tokenStore, 使随后刷新(URL 已无参数)仍保持登录。URL token 优先于已存 token。 只做 token(不做 password)——token 就是实际 bearer 凭据,无需额外登录往返、 也比明文密码更适合放链接。 --- packages/webui/src/lib/api/client.ts | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/packages/webui/src/lib/api/client.ts b/packages/webui/src/lib/api/client.ts index 1219a085..7249081d 100644 --- a/packages/webui/src/lib/api/client.ts +++ b/packages/webui/src/lib/api/client.ts @@ -37,6 +37,27 @@ function extractErrorMessage(payload: ErrorPayload, fallback: string): string { return payload.message || payload.error || fallback; } +// #194: seed the bearer token from a `?token=…` URL query param so an operator +// can bookmark / share a one-click auto-login link instead of typing the +// password every visit. The token is consumed once and IMMEDIATELY stripped +// from the URL (via replaceState) — a credential left in the address bar leaks +// through browser history, server access logs, and the Referer header. It's +// still validated server-side by the normal /api/status check, so a stale or +// forged value just falls through to the login page. +function consumeUrlToken(): string | null { + if (typeof window === 'undefined') return null; + try { + const url = new URL(window.location.href); + const token = url.searchParams.get('token'); + if (!token) return null; + url.searchParams.delete('token'); + window.history.replaceState({}, '', `${url.pathname}${url.search}${url.hash}`); + return token; + } catch { + return null; + } +} + class HttpApiClient implements ApiClient { private tokenStore: TokenStore; private currentToken: string | null; @@ -56,7 +77,12 @@ class HttpApiClient implements ApiClient { constructor(opts: CreateApiClientOptions = {}) { this.tokenStore = opts.tokenStore ?? localStorageTokenStore(DEFAULT_TOKEN_KEY); - this.currentToken = this.tokenStore.load(); + // A `?token=…` link wins over any previously stored token, and is persisted + // so a later reload (URL now stripped) stays signed in. Validation happens + // in the normal status() gate, so an invalid link just shows the login page. + const urlToken = consumeUrlToken(); + this.currentToken = urlToken ?? this.tokenStore.load(); + if (urlToken) this.tokenStore.save(urlToken); this.onUnauthorized = opts.onUnauthorized; this.processes = { From 7b93eb2716ca411cd05d8b254e64e8bd6f7e06ca Mon Sep 17 00:00:00 2001 From: DrSmoothl <1787882683@qq.com> Date: Fri, 3 Jul 2026 19:41:25 +0800 Subject: [PATCH 10/16] fix(webui): treat ?token= URL param as the login password (#194) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit abef797 misread the request and seeded the value as a bearer session token (which the operator would have to dig out of localStorage). The intent is simpler: `?token=<你的WebUI登录密码>` — the value is the plain WebUI login password, so the link is trivially constructable from something the operator already knows. - Revert the client-constructor bearer seeding from abef797. - AuthBoundary: when no stored token already authed us and the URL carries ?token=, run it through client.login() (the normal password path). A correct password lands on the home page; a wrong one falls through to the login page (server-verified, no bypass). The password is carried into the forced change-password gate, matching the interactive login flow. - The param is consumed once and stripped from the URL (replaceState) before the login call — a password in the address bar leaks via history / logs / Referer. typecheck 12 包干净。 --- packages/webui/src/App.tsx | 37 +++++++++++++++++++++++++++- packages/webui/src/lib/api/client.ts | 28 +-------------------- 2 files changed, 37 insertions(+), 28 deletions(-) diff --git a/packages/webui/src/App.tsx b/packages/webui/src/App.tsx index f1a380b3..588ba12e 100644 --- a/packages/webui/src/App.tsx +++ b/packages/webui/src/App.tsx @@ -20,6 +20,24 @@ export default function App() { ); } +// #194: read a one-shot `?token=` login param and immediately strip +// it from the URL (replaceState) so the credential doesn't linger in the +// address bar / browser history / Referer header. Named `token` to match the +// requested query key; the value is the WebUI login password. +function consumeUrlToken(): string | null { + if (typeof window === 'undefined') return null; + try { + const url = new URL(window.location.href); + const value = url.searchParams.get('token'); + if (!value) return null; + url.searchParams.delete('token'); + window.history.replaceState({}, '', `${url.pathname}${url.search}${url.hash}`); + return value; + } catch { + return null; + } +} + function AuthBoundary() { const [authChecked, setAuthChecked] = useState(false); const [authed, setAuthed] = useState(false); @@ -60,11 +78,28 @@ function AuthBoundary() { useEffect(() => { (async () => { - const ok = await client.status(); + let ok = await client.status(); + // #194: `?token=` in the URL logs in without typing the + // password. Only attempted when no stored token already authed us; the + // value is the WebUI login password (verified by /api/login server-side, + // so a wrong one just falls through to the login page). The param is + // consumed once and stripped from the URL first — a password in the + // address bar leaks via browser history / access logs / the Referer. + let urlPassword: string | undefined; + if (!ok) { + const pw = consumeUrlToken(); + if (pw) { + const result = await client.login(pw); + if (result.ok) { ok = true; urlPassword = pw; } + } + } if (ok) { setAuthed(true); setStatus('已连接'); setMustChange(await client.mustChangePassword()); + // Carry the URL password into the forced change-password gate so it + // needn't re-prompt for the old password (matches the login flow). + if (urlPassword) setLoginPassword(urlPassword); await refreshAgreements(); } setAuthChecked(true); diff --git a/packages/webui/src/lib/api/client.ts b/packages/webui/src/lib/api/client.ts index 7249081d..1219a085 100644 --- a/packages/webui/src/lib/api/client.ts +++ b/packages/webui/src/lib/api/client.ts @@ -37,27 +37,6 @@ function extractErrorMessage(payload: ErrorPayload, fallback: string): string { return payload.message || payload.error || fallback; } -// #194: seed the bearer token from a `?token=…` URL query param so an operator -// can bookmark / share a one-click auto-login link instead of typing the -// password every visit. The token is consumed once and IMMEDIATELY stripped -// from the URL (via replaceState) — a credential left in the address bar leaks -// through browser history, server access logs, and the Referer header. It's -// still validated server-side by the normal /api/status check, so a stale or -// forged value just falls through to the login page. -function consumeUrlToken(): string | null { - if (typeof window === 'undefined') return null; - try { - const url = new URL(window.location.href); - const token = url.searchParams.get('token'); - if (!token) return null; - url.searchParams.delete('token'); - window.history.replaceState({}, '', `${url.pathname}${url.search}${url.hash}`); - return token; - } catch { - return null; - } -} - class HttpApiClient implements ApiClient { private tokenStore: TokenStore; private currentToken: string | null; @@ -77,12 +56,7 @@ class HttpApiClient implements ApiClient { constructor(opts: CreateApiClientOptions = {}) { this.tokenStore = opts.tokenStore ?? localStorageTokenStore(DEFAULT_TOKEN_KEY); - // A `?token=…` link wins over any previously stored token, and is persisted - // so a later reload (URL now stripped) stays signed in. Validation happens - // in the normal status() gate, so an invalid link just shows the login page. - const urlToken = consumeUrlToken(); - this.currentToken = urlToken ?? this.tokenStore.load(); - if (urlToken) this.tokenStore.save(urlToken); + this.currentToken = this.tokenStore.load(); this.onUnauthorized = opts.onUnauthorized; this.processes = { From f127e3dc596f18901d7d2b67954ac93e7f709288 Mon Sep 17 00:00:00 2001 From: DrSmoothl <1787882683@qq.com> Date: Sat, 4 Jul 2026 00:08:30 +0800 Subject: [PATCH 11/16] fix(webui): meet WCAG AA for log-level text on light theme The log-level accent colors (info/success/warn/error) are tuned as fills; as small text on the light canvas they fell below WCAG AA (info 2.6:1, success 2.4:1, warn 2.0:1, error 4.3:1, trace 2.5:1). Add dedicated --log-* text tokens that are darkened in light mode (>=4.5:1) while keeping the bright, already-passing values in dark mode, so the app-wide accent is untouched. trace moves from /60 to /90 to clear AA yet stay the faintest level. Applied to both the logs page and overview RecentAlerts. --- .../webui/src/components/pages/logs-page.tsx | 14 ++++++++----- .../src/components/pages/overview-page.tsx | 13 +++++++----- packages/webui/src/index.css | 21 +++++++++++++++++++ 3 files changed, 38 insertions(+), 10 deletions(-) diff --git a/packages/webui/src/components/pages/logs-page.tsx b/packages/webui/src/components/pages/logs-page.tsx index 03e0e1f0..f3e91a62 100644 --- a/packages/webui/src/components/pages/logs-page.tsx +++ b/packages/webui/src/components/pages/logs-page.tsx @@ -13,13 +13,17 @@ import { useApi } from '@/lib/api'; import { useTheme } from '@/contexts/ThemeContext'; import { useLayout } from '@/contexts/LayoutContext'; +// Dedicated log-level text tokens (see index.css): the app accent colors are +// too light as small text on the light canvas (WCAG AA fails), so these hit +// >=4.5:1 in light mode while keeping the bright values in dark. trace stays the +// faintest level (dimmer than debug) but at /90 it now also clears AA. const levelClass: Record = { - trace: 'text-muted-foreground/60', + trace: 'text-muted-foreground/90', debug: 'text-muted-foreground', - info: 'text-primary', - success: 'text-success', - warn: 'text-warning', - error: 'text-destructive', + info: 'text-log-info', + success: 'text-log-success', + warn: 'text-log-warn', + error: 'text-log-error', }; const LEVELS: LogLevel[] = ['trace', 'debug', 'info', 'success', 'warn', 'error']; diff --git a/packages/webui/src/components/pages/overview-page.tsx b/packages/webui/src/components/pages/overview-page.tsx index 023af6a0..766691b6 100644 --- a/packages/webui/src/components/pages/overview-page.tsx +++ b/packages/webui/src/components/pages/overview-page.tsx @@ -889,13 +889,16 @@ function AccountWidget({ config }: { config: AccountConfig }) { // ─────────────── recent alerts ─────────────── +// Same WCAG-tuned log-level text tokens as the logs page (see index.css / the +// levelClass note there): the raw accent colors fail AA as small text on the +// light canvas. const ALERT_LEVEL_CLASS: Record = { - trace: 'text-muted-foreground/60', + trace: 'text-muted-foreground/90', debug: 'text-muted-foreground', - info: 'text-primary', - success: 'text-success', - warn: 'text-warning', - error: 'text-destructive', + info: 'text-log-info', + success: 'text-log-success', + warn: 'text-log-warn', + error: 'text-log-error', }; function RecentAlertsCard({ config }: { config: AlertsConfig }) { diff --git a/packages/webui/src/index.css b/packages/webui/src/index.css index b8860998..b67b6885 100644 --- a/packages/webui/src/index.css +++ b/packages/webui/src/index.css @@ -37,6 +37,16 @@ --success: oklch(70% 0.15 160); --warning: oklch(78% 0.16 80); + /* Log-level TEXT colors. The accent tokens above are tuned as fills (white + text on them passes AA); as small text on the light canvas they fail WCAG + AA (info 2.6:1, success 2.4:1, warn 2.0:1, error 4.3:1). These darker + variants restore >=4.5:1 for the log viewer without darkening the app-wide + accent. Dark theme keeps the bright values (they already pass on dark). */ + --log-info: oklch(50% 0.155 230); + --log-success: oklch(50% 0.15 160); + --log-warn: oklch(52% 0.16 80); + --log-error: oklch(55% 0.22 27); + --border: oklch(92% 0.01 240); --input: oklch(94% 0.012 240); --ring: oklch(68.5% 0.155 230); @@ -79,6 +89,13 @@ --success: oklch(72% 0.15 160); --warning: oklch(80% 0.16 80); + /* On the dark canvas the bright accents already clear AA as text, so the + log-level text tokens mirror them (see the :root note above). */ + --log-info: oklch(75% 0.14 230); + --log-success: oklch(72% 0.15 160); + --log-warn: oklch(80% 0.16 80); + --log-error: oklch(62% 0.2 27); + --border: oklch(28% 0.02 250); --input: oklch(26% 0.02 250); --ring: oklch(75% 0.14 230); @@ -112,6 +129,10 @@ --color-destructive-foreground: var(--destructive-foreground); --color-success: var(--success); --color-warning: var(--warning); + --color-log-info: var(--log-info); + --color-log-success: var(--log-success); + --color-log-warn: var(--log-warn); + --color-log-error: var(--log-error); --color-border: var(--border); --color-input: var(--input); --color-ring: var(--ring); From 95b58784567490dd7602ef72dbe05c46cc5ee946 Mon Sep 17 00:00:00 2001 From: DrSmoothl <1787882683@qq.com> Date: Sat, 4 Jul 2026 01:25:14 +0800 Subject: [PATCH 12/16] feat(onebot): return new folder info from create_group_file_folder (#195) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit create_group_file_folder 之前只回 data:null,拿不到新建文件夹的 folderId。现对齐 NapCat 返回结构,data 带回文件夹信息: { result: { retCode, retMsg }, groupItem: { folderInfo: { folderId, folderName, folderPath, createTime, modifyTime, createUin, modifyUin } } } - 0x6D7_0 创建响应本就在 field 4 携带 folderInfo,SnowLuma 旧 proto 没解(只读 retcode/retMsg/clientWording)。补上 OidbGroupFileFolderInfoResp 并让 create 的 deserialize / bridge / action 一路把它带出来。 - 真机验证(bot 在测试群建夹→读回 folderId→删除清理):确认 folderInfo 存在,且 **modifyUin 在 field 9 而非 Lagrange proto 标注的 field 7**——按真机 wire 修正。 - 新增两个解码回归测试(带 folderInfo / 缺 folderInfo 兜底)。catalog regen。 typecheck 12 包;protocol 587 / onebot 521 / core 472 全绿。 --- packages/core/src/bridge/apis/group-file.ts | 2 +- packages/mcp/src/generated/catalog.json | 1 + packages/mcp/src/generated/catalog.ts | 1 + packages/onebot/src/actions/group-file.ts | 10 ++++++-- .../proto-defs/src/oidb-actions/group-file.ts | 15 +++++++++++ .../group-file/create-group-folder.ts | 25 +++++++++++++++++-- .../group-file/create-group-folder.test.ts | 24 ++++++++++++++++++ 7 files changed, 73 insertions(+), 5 deletions(-) diff --git a/packages/core/src/bridge/apis/group-file.ts b/packages/core/src/bridge/apis/group-file.ts index bf0923c0..f3f42616 100644 --- a/packages/core/src/bridge/apis/group-file.ts +++ b/packages/core/src/bridge/apis/group-file.ts @@ -623,7 +623,7 @@ export class GroupFileApi { // ─────────────── folders ─────────────── - createFolder(groupId: number, name: string, parentId = '/'): Promise { + createFolder(groupId: number, name: string, parentId = '/'): Promise { return CreateGroupFolder.invoke(this.ctx, { groupId, parentId: normalizeDirectory(parentId), folderName: name, }); diff --git a/packages/mcp/src/generated/catalog.json b/packages/mcp/src/generated/catalog.json index 42c78ebd..cb6ffa09 100644 --- a/packages/mcp/src/generated/catalog.json +++ b/packages/mcp/src/generated/catalog.json @@ -837,6 +837,7 @@ "name": "create_group_file_folder", "aliases": [], "summary": "创建群文件夹", + "returns": "{ result: { retCode, retMsg }, groupItem: { folderInfo: { folderId, folderName, folderPath, createTime, modifyTime, createUin, modifyUin } } }", "readOnly": false, "params": [ { diff --git a/packages/mcp/src/generated/catalog.ts b/packages/mcp/src/generated/catalog.ts index d4b69f64..b49954e4 100644 --- a/packages/mcp/src/generated/catalog.ts +++ b/packages/mcp/src/generated/catalog.ts @@ -840,6 +840,7 @@ export const ACTIONS: CatalogAction[] = [ "name": "create_group_file_folder", "aliases": [], "summary": "创建群文件夹", + "returns": "{ result: { retCode, retMsg }, groupItem: { folderInfo: { folderId, folderName, folderPath, createTime, modifyTime, createUin, modifyUin } } }", "readOnly": false, "params": [ { diff --git a/packages/onebot/src/actions/group-file.ts b/packages/onebot/src/actions/group-file.ts index 9920c260..c018a77e 100644 --- a/packages/onebot/src/actions/group-file.ts +++ b/packages/onebot/src/actions/group-file.ts @@ -224,10 +224,16 @@ export const actions = [ groupAction({ name: 'create_group_file_folder', summary: '创建群文件夹', + // NapCat-aligned data so callers can read back the new folderId (#195): + // { result, groupItem: { folderInfo: { folderId, folderName, … } } }. + returns: '{ result: { retCode, retMsg }, groupItem: { folderInfo: { folderId, folderName, folderPath, createTime, modifyTime, createUin, modifyUin } } }', params: { name: f.string({ allowEmpty: false }), parent_id: f.string().default('/') }, run: async (p, ctx) => { - await ctx.bridge.apis.groupFile.createFolder(p.group_id, p.name, p.parent_id || '/'); - return okResponse(); + const folderInfo = await ctx.bridge.apis.groupFile.createFolder(p.group_id, p.name, p.parent_id || '/'); + return okResponse({ + result: { retCode: 0, retMsg: 'success' }, + groupItem: { folderInfo }, + }); }, }), diff --git a/packages/proto-defs/src/oidb-actions/group-file.ts b/packages/proto-defs/src/oidb-actions/group-file.ts index efa4b543..d6235e45 100644 --- a/packages/proto-defs/src/oidb-actions/group-file.ts +++ b/packages/proto-defs/src/oidb-actions/group-file.ts @@ -183,10 +183,25 @@ export interface OidbGroupFileFolderReq { delete?: pb<2, OidbGroupFileDeleteFolderReq>; rename?: pb<3, OidbGroupFileRenameFolderReq>; } +// The create (0x6D7_0) response also carries the new folder's info at field 4 +// — the source of folderId (#195). delete/rename responses leave it empty. +// Tags confirmed against a live create response (bot creating a folder in a +// test group): modifyUin is field 9, NOT 7 as Lagrange's +// OidbSvcTrpcTcp0x6D7_0ResponseFolderInfo has it. +export interface OidbGroupFileFolderInfoResp { + folderId?: pb<1, string>; + folderPath?: pb<2, string>; + folderName?: pb<3, string>; + createTime?: pb<4, uint_32>; + modifyTime?: pb<5, uint_32>; + createUin?: pb<6, uint_32>; + modifyUin?: pb<9, uint_32>; +} export interface OidbGroupFileFolderRetResp { retcode?: pb<1, uint_32>; retMsg?: pb<2, string>; clientWording?: pb<3, string>; + folderInfo?: pb<4, OidbGroupFileFolderInfoResp>; } export interface OidbGroupFileFolderResp { create?: pb<1, OidbGroupFileFolderRetResp>; diff --git a/packages/protocol/src/oidb-services/group-file/create-group-folder.ts b/packages/protocol/src/oidb-services/group-file/create-group-folder.ts index d35f382b..9bcd6aef 100644 --- a/packages/protocol/src/oidb-services/group-file/create-group-folder.ts +++ b/packages/protocol/src/oidb-services/group-file/create-group-folder.ts @@ -17,6 +17,17 @@ export namespace CreateGroupFolder { export interface Params { groupId: number; parentId: string; folderName: string; } export type Deps = OidbSender; + /** The newly created folder, from the create response's folderInfo (#195). */ + export type Result = { + folderId: string; + folderName: string; + folderPath: string; + createTime: number; + modifyTime: number; + createUin: number; + modifyUin: number; + }; + export const serialize = (_ctx: Deps, p: Params): OidbGroupFileFolderReq => ({ create: { groupUin: p.groupId, @@ -25,10 +36,20 @@ export namespace CreateGroupFolder { }, }); - export const deserialize = (_ctx: Deps, body: OidbGroupFileFolderResp): void => { + export const deserialize = (_ctx: Deps, body: OidbGroupFileFolderResp): Result => { const result = body.create; if (!result) throw new Error('group folder create response missing'); ensureRetCodeZero('group folder create', result.retcode, result.retMsg, result.clientWording); + const info = result.folderInfo ?? {}; + return { + folderId: info.folderId ?? '', + folderName: info.folderName ?? '', + folderPath: info.folderPath ?? '', + createTime: info.createTime ?? 0, + modifyTime: info.modifyTime ?? 0, + createUin: info.createUin ?? 0, + modifyUin: info.modifyUin ?? 0, + }; }; export const encode = (env: OidbBase): Uint8Array => @@ -37,6 +58,6 @@ export namespace CreateGroupFolder { export const decode = (bytes: Uint8Array): OidbBase => protobuf_decode>(bytes); - export const invoke = (deps: Deps, params: Params): Promise => + export const invoke = (deps: Deps, params: Params): Promise => invokeOidb(deps, CreateGroupFolder, params); } diff --git a/packages/protocol/tests/oidb-services/group-file/create-group-folder.test.ts b/packages/protocol/tests/oidb-services/group-file/create-group-folder.test.ts index 62668888..146085f8 100644 --- a/packages/protocol/tests/oidb-services/group-file/create-group-folder.test.ts +++ b/packages/protocol/tests/oidb-services/group-file/create-group-folder.test.ts @@ -37,4 +37,28 @@ describe('CreateGroupFolder namespace', () => { await expect(CreateGroupFolder.invoke(deps, { groupId: 1, parentId: '/', folderName: 'f' })) .rejects.toThrow(/code=7/); }); + + it('returns the new folder info from the response folderInfo (#195)', async () => { + const deps = makeDeps({ create: { + retcode: 0, + folderInfo: { + folderId: '/0f1e2d', folderPath: '/docs', folderName: 'docs', + createTime: 100, modifyTime: 200, createUin: 111, modifyUin: 222, + }, + } as any }); + const r = await CreateGroupFolder.invoke(deps, { groupId: 1, parentId: '/', folderName: 'docs' }); + expect(r).toEqual({ + folderId: '/0f1e2d', folderName: 'docs', folderPath: '/docs', + createTime: 100, modifyTime: 200, createUin: 111, modifyUin: 222, + }); + }); + + it('defaults every field when the response omits folderInfo (#195)', async () => { + const deps = makeDeps({ create: { retcode: 0 } as any }); + const r = await CreateGroupFolder.invoke(deps, { groupId: 1, parentId: '/', folderName: 'f' }); + expect(r).toEqual({ + folderId: '', folderName: '', folderPath: '', + createTime: 0, modifyTime: 0, createUin: 0, modifyUin: 0, + }); + }); }); From c027161a64013e8656afee60fc32c098de93b4fa Mon Sep 17 00:00:00 2001 From: DrSmoothl <1787882683@qq.com> Date: Sat, 4 Jul 2026 01:59:52 +0800 Subject: [PATCH 13/16] fix(protocol): get_group_file_system_info returns real counts + space (#196) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit file_count 恒为 0(且 used_space/limit_count/total_space 是占位/写死值)。根因: 0x6D8 view 命令分三个 subcommand(1=List, 2=Count, 3=Space),但 getCount 错发到 **subCommand 3(Space)** 且 busId=0,并从 pb<1>/pb<2> 读计数——服务端根本没返回 Count 块,于是恒 0。 真机 RE(bot 在测试群传/删文件核对): - Count 走 **0x6D8_2 + busId=6**,响应 Count 块里 fileCount=**field 4**、maxCount(文件 数上限,如 1500)=**field 6**(旧 pb<1>/pb<2> 全落空)。 - Space 走 **0x6D8_3**,响应 Space 块 totalSpace=**field 4**、usedSpace=**field 5**(64 位)。 - 实测:fileCount=4、limitCount=1500、usedSpace=20103729、totalSpace=10737418240。 修复:改 GetGroupFileCount 到 subCommand 2 + busId 6 + 正确 tag;新增 GetGroupFileSpace (0x6D8_3);action 并发查两者,四个字段全返回**服务端实际值**(优于 NapCat 的写死占位)。 含 count/space 编解码回归测试。catalog regen。 typecheck 12 包;protocol 591 / onebot 521 / core 472 全绿。 --- packages/core/src/bridge/apis/group-file.ts | 5 ++ packages/mcp/src/generated/catalog.json | 8 ++-- packages/mcp/src/generated/catalog.ts | 8 ++-- packages/onebot/src/actions/extended.ts | 22 +++++---- .../proto-defs/src/oidb-actions/group-file.ts | 22 +++++++-- .../group-file/get-group-file-count.ts | 13 +++--- .../group-file/get-group-file-space.ts | 42 +++++++++++++++++ .../group-file/get-group-file-count.test.ts | 12 ++--- .../group-file/get-group-file-space.test.ts | 46 +++++++++++++++++++ 9 files changed, 146 insertions(+), 32 deletions(-) create mode 100644 packages/protocol/src/oidb-services/group-file/get-group-file-space.ts create mode 100644 packages/protocol/tests/oidb-services/group-file/get-group-file-space.test.ts diff --git a/packages/core/src/bridge/apis/group-file.ts b/packages/core/src/bridge/apis/group-file.ts index f3f42616..c792f29d 100644 --- a/packages/core/src/bridge/apis/group-file.ts +++ b/packages/core/src/bridge/apis/group-file.ts @@ -12,6 +12,7 @@ import { CreateGroupFolder } from '@snowluma/protocol/oidb-services/group-file/c import { DeleteGroupFile } from '@snowluma/protocol/oidb-services/group-file/delete-group-file'; import { DeleteGroupFolder } from '@snowluma/protocol/oidb-services/group-file/delete-group-folder'; import { GetGroupFileCount } from '@snowluma/protocol/oidb-services/group-file/get-group-file-count'; +import { GetGroupFileSpace } from '@snowluma/protocol/oidb-services/group-file/get-group-file-space'; import { GetGroupFileUrl } from '@snowluma/protocol/oidb-services/group-file/get-group-file-url'; import { GetGroupPttUrl } from '@snowluma/protocol/oidb-services/group-file/get-group-ptt-url'; import { GetGroupVideoUrl } from '@snowluma/protocol/oidb-services/group-file/get-group-video-url'; @@ -250,6 +251,10 @@ export class GroupFileApi { return GetGroupFileCount.invoke(this.ctx, { groupId }); } + getSpace(groupId: number): Promise<{ usedSpace: number; totalSpace: number }> { + return GetGroupFileSpace.invoke(this.ctx, { groupId }); + } + // ─────────────── upload (3-stage: OIDB preflight → highway → publish) ─────────────── async upload( diff --git a/packages/mcp/src/generated/catalog.json b/packages/mcp/src/generated/catalog.json index cb6ffa09..4f8c2566 100644 --- a/packages/mcp/src/generated/catalog.json +++ b/packages/mcp/src/generated/catalog.json @@ -3276,7 +3276,7 @@ "name": "get_group_file_system_info", "aliases": [], "summary": "获取群文件系统信息", - "returns": "{ file_count, limit_count, used_space, total_space }:群文件数量与容量信息(used_space 恒 0,total_space 为固定 10GiB 常量)。", + "returns": "{ file_count, limit_count, used_space, total_space }:群文件数量与容量信息(均为服务端实际值)。", "returnsSchema": { "type": "object", "properties": { @@ -3286,15 +3286,15 @@ }, "limit_count": { "type": "integer", - "description": "最大文件数" + "description": "文件数上限" }, "used_space": { "type": "integer", - "description": "已用空间(占位,恒 0)" + "description": "已用空间(字节)" }, "total_space": { "type": "integer", - "description": "总空间(占位,恒 10GiB)" + "description": "总空间(字节)" } }, "required": [ diff --git a/packages/mcp/src/generated/catalog.ts b/packages/mcp/src/generated/catalog.ts index b49954e4..fe615076 100644 --- a/packages/mcp/src/generated/catalog.ts +++ b/packages/mcp/src/generated/catalog.ts @@ -3279,7 +3279,7 @@ export const ACTIONS: CatalogAction[] = [ "name": "get_group_file_system_info", "aliases": [], "summary": "获取群文件系统信息", - "returns": "{ file_count, limit_count, used_space, total_space }:群文件数量与容量信息(used_space 恒 0,total_space 为固定 10GiB 常量)。", + "returns": "{ file_count, limit_count, used_space, total_space }:群文件数量与容量信息(均为服务端实际值)。", "returnsSchema": { "type": "object", "properties": { @@ -3289,15 +3289,15 @@ export const ACTIONS: CatalogAction[] = [ }, "limit_count": { "type": "integer", - "description": "最大文件数" + "description": "文件数上限" }, "used_space": { "type": "integer", - "description": "已用空间(占位,恒 0)" + "description": "已用空间(字节)" }, "total_space": { "type": "integer", - "description": "总空间(占位,恒 10GiB)" + "description": "总空间(字节)" } }, "required": [ diff --git a/packages/onebot/src/actions/extended.ts b/packages/onebot/src/actions/extended.ts index ea34c725..c11c6e82 100644 --- a/packages/onebot/src/actions/extended.ts +++ b/packages/onebot/src/actions/extended.ts @@ -706,24 +706,28 @@ export const actions = [ name: 'get_group_file_system_info', summary: '获取群文件系统信息', readOnly: true, - returns: '{ file_count, limit_count, used_space, total_space }:群文件数量与容量信息(used_space 恒 0,total_space 为固定 10GiB 常量)。', + returns: '{ file_count, limit_count, used_space, total_space }:群文件数量与容量信息(均为服务端实际值)。', returnsSchema: { type: 'object', properties: { file_count: { type: 'integer', description: '当前文件数' }, - limit_count: { type: 'integer', description: '最大文件数' }, - used_space: { type: 'integer', description: '已用空间(占位,恒 0)' }, - total_space: { type: 'integer', description: '总空间(占位,恒 10GiB)' }, + limit_count: { type: 'integer', description: '文件数上限' }, + used_space: { type: 'integer', description: '已用空间(字节)' }, + total_space: { type: 'integer', description: '总空间(字节)' }, }, required: ['file_count', 'limit_count', 'used_space', 'total_space'], }, run: async (p, ctx) => { - const info = await ctx.bridge.apis.groupFile.getCount(p.group_id); + // 0x6D8 count (subcmd 2) + space (subcmd 3) are separate queries (#196). + const [count, space] = await Promise.all([ + ctx.bridge.apis.groupFile.getCount(p.group_id), + ctx.bridge.apis.groupFile.getSpace(p.group_id), + ]); return okResponse({ - file_count: info.fileCount, - limit_count: info.maxCount, - used_space: 0, - total_space: 10737418240, + file_count: count.fileCount, + limit_count: count.maxCount, + used_space: space.usedSpace, + total_space: space.totalSpace, }); }, }), diff --git a/packages/proto-defs/src/oidb-actions/group-file.ts b/packages/proto-defs/src/oidb-actions/group-file.ts index d6235e45..69beec12 100644 --- a/packages/proto-defs/src/oidb-actions/group-file.ts +++ b/packages/proto-defs/src/oidb-actions/group-file.ts @@ -213,14 +213,30 @@ export interface OidbGroupFileCountReq { appId?: pb<2, uint_32>; busId?: pb<3, uint_32>; } +// Count response (0x6D8_2): fileCount is field 4 and maxCount (the group's file +// ceiling, e.g. 1500) field 6 — RE'd from a live count query (#196). The old +// pb<1>/pb<2> tags matched nothing, so file_count always decoded to 0. export interface OidbGroupFileCountResp { - fileCount?: pb<1, uint_32>; - maxCount?: pb<2, uint_32>; - isEnd?: pb<3, bool>; + fileCount?: pb<4, uint_32>; + maxCount?: pb<6, uint_32>; + isFull?: pb<7, bool>; } +// Space request/response (0x6D8_3). Both values are 64-bit — the 10 GiB ceiling +// already exceeds uint32. +export interface OidbGroupFileSpaceReq { + groupUin?: pb<1, uint_32>; + appId?: pb<2, uint_32>; +} +export interface OidbGroupFileSpaceResp { + totalSpace?: pb<4, uint_64>; + usedSpace?: pb<5, uint_64>; +} +// count → subCommand 2, space → subCommand 3 (List is subCommand 1). export interface OidbGroupFileCountViewReq { count?: pb<3, OidbGroupFileCountReq>; + space?: pb<4, OidbGroupFileSpaceReq>; } export interface OidbGroupFileCountViewResp { count?: pb<3, OidbGroupFileCountResp>; + space?: pb<4, OidbGroupFileSpaceResp>; } \ No newline at end of file diff --git a/packages/protocol/src/oidb-services/group-file/get-group-file-count.ts b/packages/protocol/src/oidb-services/group-file/get-group-file-count.ts index 5f48735b..ca2752e7 100644 --- a/packages/protocol/src/oidb-services/group-file/get-group-file-count.ts +++ b/packages/protocol/src/oidb-services/group-file/get-group-file-count.ts @@ -1,7 +1,8 @@ -// 0x6D8_3 — fetch group file slot usage. Returns the current count -// alongside the server-side ceiling (NTQQ's `maxCount` default is -// 10000; we surface that fallback so the OneBot action can render -// the gauge without a second call when the server elides the field). +// 0x6D8_2 — fetch the group file slot count. The 0x6D8 view command splits +// into three subcommands: 1=List, 2=Count, 3=Space (see GetGroupFileSpace). +// This was previously mis-wired to subCommand 3 (Space) with busId=0, so the +// Count block was never returned and file_count always came back 0 (#196). +// The count request needs busId=6. import { protobuf_decode, protobuf_encode } from '@snowluma/proton'; import type { OidbBase } from '@snowluma/proto-defs/oidb'; @@ -17,13 +18,13 @@ export interface GroupFileCount { export namespace GetGroupFileCount { export const command = 0x6D8; - export const subCommand = 3; + export const subCommand = 2; export interface Params { groupId: number; } export type Deps = OidbSender; export const serialize = (_ctx: Deps, p: Params): OidbGroupFileCountViewReq => ({ - count: { groupUin: p.groupId, appId: 7, busId: 0 }, + count: { groupUin: p.groupId, appId: 7, busId: 6 }, }); export const deserialize = (_ctx: Deps, body: OidbGroupFileCountViewResp): GroupFileCount => ({ diff --git a/packages/protocol/src/oidb-services/group-file/get-group-file-space.ts b/packages/protocol/src/oidb-services/group-file/get-group-file-space.ts new file mode 100644 index 00000000..e3d92c30 --- /dev/null +++ b/packages/protocol/src/oidb-services/group-file/get-group-file-space.ts @@ -0,0 +1,42 @@ +// 0x6D8_3 — fetch the group file space usage (used / total bytes). Sibling of +// GetGroupFileCount (0x6D8_2): the 0x6D8 view command's subCommand 3 = Space. +// RE'd from a live query (#196) — the response carries a Space block at field 4 +// with totalSpace at field 4 and usedSpace at field 5 (both 64-bit). + +import { protobuf_decode, protobuf_encode } from '@snowluma/proton'; +import type { OidbBase } from '@snowluma/proto-defs/oidb'; +import type { + OidbGroupFileCountViewReq, OidbGroupFileCountViewResp, +} from '@snowluma/proto-defs/oidb-actions/group-file'; +import { invokeOidb, type OidbSender } from '../../oidb-service'; + +export interface GroupFileSpace { + usedSpace: number; + totalSpace: number; +} + +export namespace GetGroupFileSpace { + export const command = 0x6D8; + export const subCommand = 3; + + export interface Params { groupId: number; } + export type Deps = OidbSender; + + export const serialize = (_ctx: Deps, p: Params): OidbGroupFileCountViewReq => ({ + space: { groupUin: p.groupId, appId: 7 }, + }); + + export const deserialize = (_ctx: Deps, body: OidbGroupFileCountViewResp): GroupFileSpace => ({ + usedSpace: Number(body.space?.usedSpace ?? 0), + totalSpace: Number(body.space?.totalSpace ?? 0), + }); + + export const encode = (env: OidbBase): Uint8Array => + protobuf_encode>(env); + + export const decode = (bytes: Uint8Array): OidbBase => + protobuf_decode>(bytes); + + export const invoke = (deps: Deps, params: Params): Promise => + invokeOidb(deps, GetGroupFileSpace, params); +} diff --git a/packages/protocol/tests/oidb-services/group-file/get-group-file-count.test.ts b/packages/protocol/tests/oidb-services/group-file/get-group-file-count.test.ts index 3f45ac3b..15440a74 100644 --- a/packages/protocol/tests/oidb-services/group-file/get-group-file-count.test.ts +++ b/packages/protocol/tests/oidb-services/group-file/get-group-file-count.test.ts @@ -17,21 +17,21 @@ function makeDeps(body?: OidbGroupFileCountViewResp) { } describe('GetGroupFileCount namespace', () => { - it('declares 0x6D8_3', () => { + it('declares 0x6D8_2 (Count subcommand)', () => { expect(GetGroupFileCount.command).toBe(0x6D8); - expect(GetGroupFileCount.subCommand).toBe(3); + expect(GetGroupFileCount.subCommand).toBe(2); }); - it('routes to 0x6d8_3 with groupUin + appId=7 + busId=0', async () => { + it('routes to 0x6d8_2 with groupUin + appId=7 + busId=6 (#196)', async () => { const deps = makeDeps({ count: { fileCount: 1, maxCount: 100 } }); await GetGroupFileCount.invoke(deps, { groupId: 12345 }); const [wire, bytes] = deps.sendRawPacket.mock.calls[0]!; - expect(wire).toBe('OidbSvcTrpcTcp.0x6d8_3'); + expect(wire).toBe('OidbSvcTrpcTcp.0x6d8_2'); const env = protobuf_decode>(bytes); - expect(env.body?.count).toMatchObject({ groupUin: 12345, appId: 7 }); + expect(env.body?.count).toMatchObject({ groupUin: 12345, appId: 7, busId: 6 }); }); - it('decodes both counters as plain numbers', async () => { + it('decodes fileCount (field 4) + maxCount (field 6) as plain numbers', async () => { const deps = makeDeps({ count: { fileCount: 42, maxCount: 1000 } }); const out = await GetGroupFileCount.invoke(deps, { groupId: 1 }); expect(out).toEqual({ fileCount: 42, maxCount: 1000 }); diff --git a/packages/protocol/tests/oidb-services/group-file/get-group-file-space.test.ts b/packages/protocol/tests/oidb-services/group-file/get-group-file-space.test.ts new file mode 100644 index 00000000..11e510b5 --- /dev/null +++ b/packages/protocol/tests/oidb-services/group-file/get-group-file-space.test.ts @@ -0,0 +1,46 @@ +import { describe, expect, it, vi } from 'vitest'; +import { protobuf_decode, protobuf_encode } from '@snowluma/proton'; +import type { OidbBase } from '@snowluma/proto-defs/oidb'; +import type { + OidbGroupFileCountViewReq, OidbGroupFileCountViewResp, +} from '@snowluma/proto-defs/oidb-actions/group-file'; +import type { SendPacketResult } from '@snowluma/common/packet-sender'; + +import { GetGroupFileSpace } from '../../../src/oidb-services/group-file/get-group-file-space'; + +function makeDeps(body?: OidbGroupFileCountViewResp) { + const responseData = body !== undefined + ? Buffer.from(protobuf_encode>({ body })) + : Buffer.alloc(0); + const r: SendPacketResult = { success: true, gotResponse: true, errorCode: 0, errorMessage: '', responseData }; + return { sendRawPacket: vi.fn(async () => r) }; +} + +describe('GetGroupFileSpace namespace (#196)', () => { + it('declares 0x6D8_3 (Space subcommand)', () => { + expect(GetGroupFileSpace.command).toBe(0x6D8); + expect(GetGroupFileSpace.subCommand).toBe(3); + }); + + it('routes to 0x6d8_3 with a space request (groupUin + appId=7)', async () => { + const deps = makeDeps({ space: {} }); + await GetGroupFileSpace.invoke(deps, { groupId: 12345 }); + const [wire, bytes] = deps.sendRawPacket.mock.calls[0]!; + expect(wire).toBe('OidbSvcTrpcTcp.0x6d8_3'); + const env = protobuf_decode>(bytes); + expect(env.body?.space).toMatchObject({ groupUin: 12345, appId: 7 }); + expect(env.body?.count).toBeNull(); + }); + + it('decodes usedSpace (field 5) + totalSpace (field 4) as plain numbers', async () => { + const deps = makeDeps({ space: { usedSpace: 20103729n, totalSpace: 10737418240n } }); + const out = await GetGroupFileSpace.invoke(deps, { groupId: 1 }); + expect(out).toEqual({ usedSpace: 20103729, totalSpace: 10737418240 }); + }); + + it('defaults to 0 when the server elides the space block', async () => { + const deps = makeDeps({ space: {} }); + const out = await GetGroupFileSpace.invoke(deps, { groupId: 1 }); + expect(out).toEqual({ usedSpace: 0, totalSpace: 0 }); + }); +}); From b20ed127617ecccebce30d71c386ea68cb81e6cf Mon Sep 17 00:00:00 2001 From: DrSmoothl <1787882683@qq.com> Date: Sat, 4 Jul 2026 12:48:06 +0800 Subject: [PATCH 14/16] fix(onebot): approve group requests from the filtered inbox too (#197) set_group_add_request could fail with "matching group request not found" for a request SnowLuma had itself just reported. handleGroupAddRequest only fetched the main inbox (0x10C8 subCommand 1); a spam-filtered join/invite lives in the filtered inbox (subCommand 2) and was never searched, so its flag couldn't be resolved to a sequence. Fetch both inboxes and search the union. Each request keeps the `filtered` flag its approval subCommand needs, so a filtered request is approved through subCommand 2. A failing inbox fetch degrades to the other instead of aborting. Regular MSF invite pushes don't carry the approval msgseq (only the private-card path does, #125), so the fetch is the only source. Regression tests: filtered-only request is found + approved via subCommand 2; "not found" only when neither inbox has it. --- .../onebot/src/modules/request-actions.ts | 13 ++++++++- packages/onebot/tests/request-actions.test.ts | 29 +++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/packages/onebot/src/modules/request-actions.ts b/packages/onebot/src/modules/request-actions.ts index 573179a1..27224c4c 100644 --- a/packages/onebot/src/modules/request-actions.ts +++ b/packages/onebot/src/modules/request-actions.ts @@ -27,7 +27,18 @@ export async function handleGroupAddRequest( } } - const requests = await bridge.apis.contacts.fetchGroupRequests(); + // A join/invite request lands in either the main inbox (0x10c8 subCommand 1) + // or the spam-filtered one (subCommand 2). The old code only fetched the main + // inbox, so a filtered request that SnowLuma had already reported to the + // client couldn't be approved through its own flag — "matching group request + // not found" (#197). Search both; each request keeps the `filtered` flag its + // inbox needs for the approval subCommand. One inbox failing degrades to the + // other rather than aborting. + const [mainInbox, filteredInbox] = await Promise.all([ + bridge.apis.contacts.fetchGroupRequests(false).catch(() => []), + bridge.apis.contacts.fetchGroupRequests(true).catch(() => []), + ]); + const requests = [...mainInbox, ...filteredInbox]; const matching = requests.find((r) => { if (r.groupId !== groupId) return false; if (requestType === 'add') return r.targetUid === targetUid; diff --git a/packages/onebot/tests/request-actions.test.ts b/packages/onebot/tests/request-actions.test.ts index 682dcb1e..0b63f6be 100644 --- a/packages/onebot/tests/request-actions.test.ts +++ b/packages/onebot/tests/request-actions.test.ts @@ -82,4 +82,33 @@ describe('onebot/modules/request-actions / handleGroupAddRequest', () => { expect(setAddRequest).toHaveBeenCalledOnce(); expect(setAddRequest).toHaveBeenCalledWith(999, 97, 8, false, 'no', false); }); + + it('finds a request that only lives in the filtered inbox (#197)', async () => { + const setAddRequest = vi.fn(async () => {}); + const bridge = fakeBridge({ + // Main inbox empty; the invite sits only in the spam-filtered inbox. + fetchGroupRequests: vi.fn(async (filtered: boolean) => + filtered + ? [fakeRequest({ groupId: 999, invitorUid: 'u_i', sequence: 55, eventType: 2, filtered: true })] + : []), + getGroupInviteCardSequence: vi.fn(() => null), + apis: { groupAdmin: { setAddRequest } } as any, + }); + + await handleGroupAddRequest(bridge, 'invite:999:u_i', true, 'ok'); + + // Approved through the filtered inbox (subCommand 2 → last arg true). + expect(setAddRequest).toHaveBeenCalledOnce(); + expect(setAddRequest).toHaveBeenCalledWith(999, 55, 2, true, 'ok', true); + }); + + it('surfaces "not found" only when neither inbox has the request', async () => { + const bridge = fakeBridge({ + fetchGroupRequests: vi.fn(async () => []), + getGroupInviteCardSequence: vi.fn(() => null), + apis: { groupAdmin: { setAddRequest: vi.fn(async () => {}) } } as any, + }); + await expect(handleGroupAddRequest(bridge, 'invite:999:u_i', true, 'ok')) + .rejects.toThrow(/matching group request not found/); + }); }); From 07c08ed74d11bc5556f9c92004ccd6c5b6e15b91 Mon Sep 17 00:00:00 2001 From: DrSmoothl <1787882683@qq.com> Date: Sat, 4 Jul 2026 13:04:32 +0800 Subject: [PATCH 15/16] feat(onebot): enrich group/member info fields (#197) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Round out the OneBot v11 group-profile fields the issue asked for. Group (get_group_info / get_group_list, inherited by get_group_info_ex / get_group_detail_info): - group_create_time + group_memo come free from the 0xFE5_2 list (createdTime / announcement), verified live (createdTime=1729505343, announcement populated). - group_level lives only in the 0x88D_0 detail; get_group_info fetches it (memoized 5min) so a joined group doesn't hit the detail every call. get_group_list leaves it 0 — a per-group detail fetch across the whole list would be far too costly. Member (get_group_member_info / get_group_member_list): - Add area / unfriendly / title_expire_time / card_changeable. QQ NT does not expose these, so they're fixed placeholders ('' / false / 0 / true), matching go-cqhttp / NapCat. sex/age stay unknown/0 (real values need a per-member profile fetch — out of scope here). typecheck 12 packages; onebot 523 / core 472 green. --- packages/core/src/bridge/apis/contacts.ts | 9 +++ packages/mcp/src/generated/catalog.json | 56 +++++++++++++++++++ packages/mcp/src/generated/catalog.ts | 56 +++++++++++++++++++ packages/onebot/src/actions/group-info.ts | 19 ++++++- .../onebot/src/modules/contact-actions.ts | 38 +++++++++++++ packages/onebot/tests/contact-actions.test.ts | 1 + packages/protocol/src/qq-info.ts | 6 ++ 7 files changed, 183 insertions(+), 2 deletions(-) diff --git a/packages/core/src/bridge/apis/contacts.ts b/packages/core/src/bridge/apis/contacts.ts index 6514b216..521b994e 100644 --- a/packages/core/src/bridge/apis/contacts.ts +++ b/packages/core/src/bridge/apis/contacts.ts @@ -115,6 +115,10 @@ export class ContactsApi { memberCount: raw.info?.memberCount ?? 0, memberMax: raw.info?.memberMax ?? 0, members: new Map(), + // #197: the list already carries these — no extra fetch needed. `level` + // is not in the list (0x88D_0 detail only), so it stays undefined here. + createTime: raw.info?.createdTime ?? 0, + memo: raw.info?.announcement || raw.info?.description || '', }); } this.ctx.identity.rememberGroups(groups); @@ -140,6 +144,11 @@ export class ContactsApi { memberCount: Number(r.memberCount ?? 0n), memberMax: Number(r.maxMemberCount ?? 0n), members: new Map(), + // #197: the detail is the only source of `level`; it also carries + // createTime + the notice preview (memo). + createTime: Number(r.createTime ?? 0n), + level: Number(r.level ?? 0n), + memo: r.noticePreview ?? '', }; } diff --git a/packages/mcp/src/generated/catalog.json b/packages/mcp/src/generated/catalog.json index 4f8c2566..669c0188 100644 --- a/packages/mcp/src/generated/catalog.json +++ b/packages/mcp/src/generated/catalog.json @@ -3786,6 +3786,18 @@ "max_member_count": { "type": "integer", "description": "成员上限" + }, + "group_create_time": { + "type": "integer", + "description": "建群时间戳(秒)" + }, + "group_level": { + "type": "integer", + "description": "群等级" + }, + "group_memo": { + "type": "string", + "description": "群简介 / 公告预览" } }, "required": [ @@ -3899,6 +3911,18 @@ "max_member_count": { "type": "integer", "description": "成员上限" + }, + "group_create_time": { + "type": "integer", + "description": "建群时间戳(秒)" + }, + "group_level": { + "type": "integer", + "description": "群等级(列表批量场景恒 0,详见 get_group_info)" + }, + "group_memo": { + "type": "string", + "description": "群简介 / 公告预览" } }, "required": [ @@ -3995,6 +4019,22 @@ "title": { "type": "string", "description": "专属头衔" + }, + "area": { + "type": "string", + "description": "地区(QQ NT 不提供,恒空)" + }, + "unfriendly": { + "type": "boolean", + "description": "是否不良记录(QQ NT 不提供,恒 false)" + }, + "title_expire_time": { + "type": "integer", + "description": "头衔过期时间戳(QQ NT 不提供,恒 0)" + }, + "card_changeable": { + "type": "boolean", + "description": "是否可改名片(占位,恒 true)" } }, "required": [ @@ -4130,6 +4170,22 @@ "title": { "type": "string", "description": "专属头衔" + }, + "area": { + "type": "string", + "description": "地区(QQ NT 不提供,恒空)" + }, + "unfriendly": { + "type": "boolean", + "description": "是否不良记录(QQ NT 不提供,恒 false)" + }, + "title_expire_time": { + "type": "integer", + "description": "头衔过期时间戳(QQ NT 不提供,恒 0)" + }, + "card_changeable": { + "type": "boolean", + "description": "是否可改名片(占位,恒 true)" } }, "required": [ diff --git a/packages/mcp/src/generated/catalog.ts b/packages/mcp/src/generated/catalog.ts index fe615076..8d6acb5d 100644 --- a/packages/mcp/src/generated/catalog.ts +++ b/packages/mcp/src/generated/catalog.ts @@ -3789,6 +3789,18 @@ export const ACTIONS: CatalogAction[] = [ "max_member_count": { "type": "integer", "description": "成员上限" + }, + "group_create_time": { + "type": "integer", + "description": "建群时间戳(秒)" + }, + "group_level": { + "type": "integer", + "description": "群等级" + }, + "group_memo": { + "type": "string", + "description": "群简介 / 公告预览" } }, "required": [ @@ -3902,6 +3914,18 @@ export const ACTIONS: CatalogAction[] = [ "max_member_count": { "type": "integer", "description": "成员上限" + }, + "group_create_time": { + "type": "integer", + "description": "建群时间戳(秒)" + }, + "group_level": { + "type": "integer", + "description": "群等级(列表批量场景恒 0,详见 get_group_info)" + }, + "group_memo": { + "type": "string", + "description": "群简介 / 公告预览" } }, "required": [ @@ -3998,6 +4022,22 @@ export const ACTIONS: CatalogAction[] = [ "title": { "type": "string", "description": "专属头衔" + }, + "area": { + "type": "string", + "description": "地区(QQ NT 不提供,恒空)" + }, + "unfriendly": { + "type": "boolean", + "description": "是否不良记录(QQ NT 不提供,恒 false)" + }, + "title_expire_time": { + "type": "integer", + "description": "头衔过期时间戳(QQ NT 不提供,恒 0)" + }, + "card_changeable": { + "type": "boolean", + "description": "是否可改名片(占位,恒 true)" } }, "required": [ @@ -4133,6 +4173,22 @@ export const ACTIONS: CatalogAction[] = [ "title": { "type": "string", "description": "专属头衔" + }, + "area": { + "type": "string", + "description": "地区(QQ NT 不提供,恒空)" + }, + "unfriendly": { + "type": "boolean", + "description": "是否不良记录(QQ NT 不提供,恒 false)" + }, + "title_expire_time": { + "type": "integer", + "description": "头衔过期时间戳(QQ NT 不提供,恒 0)" + }, + "card_changeable": { + "type": "boolean", + "description": "是否可改名片(占位,恒 true)" } }, "required": [ diff --git a/packages/onebot/src/actions/group-info.ts b/packages/onebot/src/actions/group-info.ts index 34515558..5bedda4d 100644 --- a/packages/onebot/src/actions/group-info.ts +++ b/packages/onebot/src/actions/group-info.ts @@ -18,6 +18,9 @@ export const actions = [ group_name: { type: 'string', description: '群名' }, member_count: { type: 'integer', description: '当前成员数' }, max_member_count: { type: 'integer', description: '成员上限' }, + group_create_time: { type: 'integer', description: '建群时间戳(秒)' }, + group_level: { type: 'integer', description: '群等级(列表批量场景恒 0,详见 get_group_info)' }, + group_memo: { type: 'string', description: '群简介 / 公告预览' }, }, required: ['group_id', 'group_name', 'member_count', 'max_member_count'], }, @@ -44,6 +47,9 @@ export const actions = [ group_name: { type: 'string', description: '群名' }, member_count: { type: 'integer', description: '当前成员数' }, max_member_count: { type: 'integer', description: '成员上限' }, + group_create_time: { type: 'integer', description: '建群时间戳(秒)' }, + group_level: { type: 'integer', description: '群等级' }, + group_memo: { type: 'string', description: '群简介 / 公告预览' }, }, required: ['group_id', 'group_name', 'member_count', 'max_member_count'], }, @@ -51,11 +57,12 @@ export const actions = [ run: async (p, ctx) => { const groupId = p.group_id; const noCache = p.no_cache; + const fallback = { group_id: groupId, group_name: '', member_count: 0, max_member_count: 0, group_create_time: 0, group_level: 0, group_memo: '' }; if (ctx.getGroupInfo) { const info = await ctx.getGroupInfo(groupId, noCache); - return okResponse(info ?? { group_id: groupId, group_name: '', member_count: 0, max_member_count: 0 }); + return okResponse(info ?? fallback); } - return okResponse({ group_id: groupId, group_name: '', member_count: 0, max_member_count: 0 }); + return okResponse(fallback); }, }), @@ -80,6 +87,10 @@ export const actions = [ level: { type: 'string', description: '群等级' }, role: { type: 'string', enum: ['owner', 'admin', 'member'], description: '角色' }, title: { type: 'string', description: '专属头衔' }, + area: { type: 'string', description: '地区(QQ NT 不提供,恒空)' }, + unfriendly: { type: 'boolean', description: '是否不良记录(QQ NT 不提供,恒 false)' }, + title_expire_time: { type: 'integer', description: '头衔过期时间戳(QQ NT 不提供,恒 0)' }, + card_changeable: { type: 'boolean', description: '是否可改名片(占位,恒 true)' }, }, required: ['group_id', 'user_id', 'nickname', 'role'], }, @@ -114,6 +125,10 @@ export const actions = [ level: { type: 'string', description: '群等级' }, role: { type: 'string', enum: ['owner', 'admin', 'member'], description: '角色' }, title: { type: 'string', description: '专属头衔' }, + area: { type: 'string', description: '地区(QQ NT 不提供,恒空)' }, + unfriendly: { type: 'boolean', description: '是否不良记录(QQ NT 不提供,恒 false)' }, + title_expire_time: { type: 'integer', description: '头衔过期时间戳(QQ NT 不提供,恒 0)' }, + card_changeable: { type: 'boolean', description: '是否可改名片(占位,恒 true)' }, }, required: ['group_id', 'user_id', 'nickname', 'role'], }, diff --git a/packages/onebot/src/modules/contact-actions.ts b/packages/onebot/src/modules/contact-actions.ts index 8392378a..781fbbc1 100644 --- a/packages/onebot/src/modules/contact-actions.ts +++ b/packages/onebot/src/modules/contact-actions.ts @@ -50,9 +50,34 @@ export async function getGroupList( group_name: g.groupName, member_count: g.memberCount, max_member_count: g.memberMax, + // #197: create_time + memo come free from the list; group_level is only in + // the per-group 0x88D_0 detail, so it stays 0 here (a per-group fetch across + // the whole list would be far too expensive). get_group_info fills it in. + group_create_time: g.createTime ?? 0, + group_level: g.level ?? 0, + group_memo: g.memo ?? '', })); } +// group_level lives only in the 0x88D_0 detail. Memoize it (short TTL) so a +// joined-group get_group_info doesn't fetch the detail on every call (#197). +const GROUP_LEVEL_TTL_MS = 5 * 60 * 1000; +const groupLevelCache = new Map(); +async function getGroupLevel(bridge: BridgeInterface, groupId: number, noCache?: boolean): Promise { + if (!noCache) { + const c = groupLevelCache.get(groupId); + if (c && Date.now() - c.at < GROUP_LEVEL_TTL_MS) return c.level; + } + try { + const detail = await bridge.apis.contacts.fetchGroupDetail(groupId); + const level = detail?.level ?? 0; + groupLevelCache.set(groupId, { level, at: Date.now() }); + return level; + } catch { + return 0; + } +} + // Short-TTL cache for the non-member group lookup (0x88D_0). Joined groups come // from the identity roster (kept fresh by fetchGroupList) and are NOT cached // here; this only memoizes the per-id server query so a burst of invites for the @@ -79,6 +104,9 @@ export async function getGroupInfo( group_name: g.groupName, member_count: g.memberCount, max_member_count: g.memberMax, + group_create_time: g.createTime ?? 0, + group_level: await getGroupLevel(bridge, groupId, noCache), + group_memo: g.memo ?? '', }; } @@ -96,6 +124,9 @@ export async function getGroupInfo( group_name: detail.groupName, member_count: detail.memberCount, max_member_count: detail.memberMax, + group_create_time: detail.createTime ?? 0, + group_level: detail.level ?? 0, + group_memo: detail.memo ?? '', }; nonMemberGroupCache.set(groupId, { info, at: Date.now() }); return { ...info }; @@ -264,5 +295,12 @@ function formatGroupMember( level: String(member.level), role: member.role, title: member.title, + // OneBot v11 completeness (#197). QQ NT doesn't expose these, so they're + // fixed placeholders — matching go-cqhttp / NapCat, which also hardcode + // them: area='', unfriendly=false, title_expire_time=0, card_changeable=true. + area: '', + unfriendly: false, + title_expire_time: 0, + card_changeable: true, }; } diff --git a/packages/onebot/tests/contact-actions.test.ts b/packages/onebot/tests/contact-actions.test.ts index a03a8c44..1d3b5f03 100644 --- a/packages/onebot/tests/contact-actions.test.ts +++ b/packages/onebot/tests/contact-actions.test.ts @@ -151,6 +151,7 @@ describe('onebot/contact-actions / getGroupList', () => { expect(out).toEqual([{ group_id: 100, group_name: 'Group A', member_count: 0, max_member_count: 500, + group_create_time: 0, group_level: 0, group_memo: '', }]); }); diff --git a/packages/protocol/src/qq-info.ts b/packages/protocol/src/qq-info.ts index 40ce2779..f62148fe 100644 --- a/packages/protocol/src/qq-info.ts +++ b/packages/protocol/src/qq-info.ts @@ -41,6 +41,12 @@ export interface QQGroupInfo { memberCount: number; memberMax: number; members: Map; + /** Group creation time (unix seconds). 0 when unknown (#197). */ + createTime?: number; + /** Group level. Only the 0x88D_0 detail carries it; 0 from the list (#197). */ + level?: number; + /** Group memo / announcement preview. '' when unknown (#197). */ + memo?: string; } export interface GroupRequestInfo { From 6cb7f2c6d04b4ce62393c83c6ecf29bc7e193377 Mon Sep 17 00:00:00 2001 From: DrSmoothl <1787882683@qq.com> Date: Sat, 4 Jul 2026 13:39:00 +0800 Subject: [PATCH 16/16] chore(release): v1.11.2 --- package.json | 2 +- packages/bridge/package.json | 2 +- packages/common/package.json | 2 +- packages/core/package.json | 2 +- packages/mcp/package.json | 2 +- packages/onebot/package.json | 2 +- packages/proto-defs/package.json | 2 +- packages/protocol/package.json | 2 +- packages/proton/package.json | 2 +- packages/runtime/package.json | 2 +- packages/sdk/package.json | 2 +- packages/ui/package.json | 2 +- packages/websocket/package.json | 2 +- packages/webui/package.json | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index 28e3c654..5acb56f9 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "license": "SEE LICENSE IN LICENSE", "name": "snowluma-monorepo", - "version": "1.11.1", + "version": "1.11.2", "description": "SnowLuma monorepo workspace (pnpm)", "private": true, "type": "module", diff --git a/packages/bridge/package.json b/packages/bridge/package.json index 20be2547..59efcec6 100644 --- a/packages/bridge/package.json +++ b/packages/bridge/package.json @@ -1,7 +1,7 @@ { "license": "SEE LICENSE IN LICENSE", "name": "@snowluma/bridge", - "version": "1.11.1", + "version": "1.11.2", "private": true, "type": "module", "description": "SnowLuma bridge — QQ NT desktop client lifecycle: hook injection (via native addon), per-PID HookSession orchestration, pipe-watcher for process discovery, and the BridgeManagerSink interface that lets the hook layer call back into a UIN-keyed session router without depending on @snowluma/core. Consumed by the top-level app entry (which constructs the BridgeManager from @snowluma/core and injects it as the sink) and by the WebUI server (read-only HookProcessInfo views).", diff --git a/packages/common/package.json b/packages/common/package.json index f0c5ac07..e6d0acb2 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,7 +1,7 @@ { "license": "SEE LICENSE IN LICENSE", "name": "@snowluma/common", - "version": "1.11.1", + "version": "1.11.2", "private": true, "type": "module", "description": "SnowLuma shared infrastructure — leaf-package utilities with zero business dependencies. Logger / hex codec / log file transport / log line summariser / packet sender wire-protocol types / runtime config loader. Consumed by @snowluma/protocol, @snowluma/core, and @snowluma/onebot. Per-file subpath exports keep import sites unambiguous and let the bundler tree-shake aggressively (importing `@snowluma/common/hex` doesn't pull in `node:fs` from the logger transport).", diff --git a/packages/core/package.json b/packages/core/package.json index 58373dc7..cd38b46d 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,7 +1,7 @@ { "license": "SEE LICENSE IN LICENSE", "name": "@snowluma/core", - "version": "1.11.1", + "version": "1.11.2", "description": "SnowLuma core - NTQQ packet sniffer with Node.js native addon", "private": true, "type": "module", diff --git a/packages/mcp/package.json b/packages/mcp/package.json index c22e59fe..bb567d09 100644 --- a/packages/mcp/package.json +++ b/packages/mcp/package.json @@ -1,7 +1,7 @@ { "license": "SEE LICENSE IN LICENSE", "name": "@snowluma/mcp", - "version": "1.11.1", + "version": "1.11.2", "description": "MCP server exposing the SnowLuma OneBot action catalog (docs + JSON Schemas) and optional execution to LLM clients.", "repository": { "type": "git", diff --git a/packages/onebot/package.json b/packages/onebot/package.json index 2f9b28bb..f4a1765e 100644 --- a/packages/onebot/package.json +++ b/packages/onebot/package.json @@ -1,7 +1,7 @@ { "license": "SEE LICENSE IN LICENSE", "name": "@snowluma/onebot", - "version": "1.11.1", + "version": "1.11.2", "private": true, "type": "module", "description": "SnowLuma OneBot v11 adapter — the protocol translation layer that maps the public OneBot vocabulary (HTTP / WebSocket actions, message segments, post events) onto @snowluma/core's typed Api hub (`bridge.apis..method()`). Owns network adapters (HTTP server / HTTP client / WS server / WS client), the registered action handlers, the receive-side event→OneBot converter, message-id hashing, message store (SQLite-backed event history), media store, and the OneBot instance + manager that ties one OneBotConfig to one Bridge. Per-file subpath exports mirror the legacy `core/src/onebot/*` layout 1:1 so the previous `import { … } from '../onebot/'` collapses to `import { … } from '@snowluma/onebot/'`.", diff --git a/packages/proto-defs/package.json b/packages/proto-defs/package.json index 466bc522..162f3c86 100644 --- a/packages/proto-defs/package.json +++ b/packages/proto-defs/package.json @@ -1,7 +1,7 @@ { "license": "SEE LICENSE IN LICENSE", "name": "@snowluma/proto-defs", - "version": "1.11.1", + "version": "1.11.2", "private": true, "type": "module", "description": "SnowLuma QQ/Lagrange wire-protobuf type definitions. Pure TypeScript interfaces with proton's `pb` marker types — `@snowluma/proton`'s vite plugin compiles them into zero-runtime encoder/decoder functions at the call sites in `@snowluma/core` (and any downstream consumer). Exposed as per-file subpaths (`@snowluma/proto-defs/oidb`, `@snowluma/proto-defs/message`, …) so the import-site shape mirrors the legacy `bridge/proto/proton/*` layout and avoids name collisions across files (notably `highway.ts` and `oidb-actions/media.ts` share NTV2-prefixed names).", diff --git a/packages/protocol/package.json b/packages/protocol/package.json index b1b8e2a9..e2f00be1 100644 --- a/packages/protocol/package.json +++ b/packages/protocol/package.json @@ -1,7 +1,7 @@ { "license": "SEE LICENSE IN LICENSE", "name": "@snowluma/protocol", - "version": "1.11.1", + "version": "1.11.2", "private": true, "type": "module", "description": "SnowLuma protocol — the protocol-layer between QQ wire bytes and typed events. Owns: identity service (uid↔uin cache with SQLite persistence), event bus, packet pipeline (incoming SSO packet → QQEventVariant), msg-push decoders, element-builder (MessageElement → wire elems[]), highway upload protocol (file/image/video/ptt), OIDB envelope helper, and the event/notice/request type vocabulary. Consumers (@snowluma/core, @snowluma/onebot) talk to this package through `BridgeContext` for runtime calls and the standalone classes (IdentityService, BridgeEventBus, IncomingPacketPipeline) for composition. Per-file subpath exports mirror the legacy `core/src/bridge/*` layout 1:1 so the previous `import { …} from '../bridge/'` collapses to `import { … } from '@snowluma/protocol/'`.", diff --git a/packages/proton/package.json b/packages/proton/package.json index 30e33528..7adc131e 100644 --- a/packages/proton/package.json +++ b/packages/proton/package.json @@ -1,7 +1,7 @@ { "license": "SEE LICENSE IN LICENSE", "name": "@snowluma/proton", - "version": "1.11.1", + "version": "1.11.2", "private": true, "type": "module", "description": "Compile-time protobuf encoder/decoder generator for SnowLuma. TypeScript interfaces → fully-inlined, zero-runtime protobuf codec functions. Vendored from SnowLuma/protobuf-dsl (reference copy under dev/protobuf-dsl/) with edge-case fixes applied.", diff --git a/packages/runtime/package.json b/packages/runtime/package.json index f27b3255..122d3fc5 100644 --- a/packages/runtime/package.json +++ b/packages/runtime/package.json @@ -1,7 +1,7 @@ { "license": "SEE LICENSE IN LICENSE", "name": "@snowluma/runtime", - "version": "1.11.1", + "version": "1.11.2", "private": true, "type": "module", "main": "index.mjs", diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 2fa236b1..41c3d7a7 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -4,7 +4,7 @@ "name": "MotricSeven", "email": "motricseven@gmail.com" }, - "version": "1.11.1", + "version": "1.11.2", "description": "TypeScript SDK for SnowLuma OneBot HTTP and WebSocket transports", "keywords": [ "snowluma", diff --git a/packages/ui/package.json b/packages/ui/package.json index 6fba313f..2bd674b6 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -4,7 +4,7 @@ "name": "MotricSeven", "email": "motricseven@gmail.com" }, - "version": "1.11.1", + "version": "1.11.2", "description": "Shared SnowLuma UI primitives — Tailwind 4 theme tokens + shadcn-style atomic components", "keywords": [ "snowluma", diff --git a/packages/websocket/package.json b/packages/websocket/package.json index 32a4b50a..b117bff7 100644 --- a/packages/websocket/package.json +++ b/packages/websocket/package.json @@ -1,7 +1,7 @@ { "license": "SEE LICENSE IN LICENSE", "name": "@snowluma/websocket", - "version": "1.11.1", + "version": "1.11.2", "private": true, "type": "module", "main": "./src/index.ts", diff --git a/packages/webui/package.json b/packages/webui/package.json index 8d94d726..9a425e89 100644 --- a/packages/webui/package.json +++ b/packages/webui/package.json @@ -2,7 +2,7 @@ "license": "SEE LICENSE IN LICENSE", "name": "webui", "private": true, - "version": "1.11.1", + "version": "1.11.2", "type": "module", "scripts": { "dev": "vite",