Commit Graph

4805 Commits

Author SHA1 Message Date
手瓜一十雪
6aadc2402d Enable o3HookMode and update Win32 native binary
Set o3HookMode to 1 in packages/napcat-core/external/napcat.json to enable O3 hook mode. Replace the prebuilt napi2native.win32.x64.node binary in packages/napcat-native/napi2native to include corresponding native changes for Win32 x64.
v4.17.8
2026-02-16 14:58:06 +08:00
手瓜一十雪
eb937b29e4 Enable native verbose logging via env var
Some checks failed
Build NapCat Artifacts / Build-Framework (push) Has been cancelled
Build NapCat Artifacts / Build-Shell (push) Has been cancelled
Read NAPCAT_ENABLE_VERBOSE_LOG at startup and call napi2nativeLoader.nativeExports.setVerbose(true) (if available) right after loading the wrapper so native verbose logging can be enabled via environment. Also includes an updated native .node binary.
v4.17.5
2026-02-13 19:33:48 +08:00
手瓜一十雪
f44aca9a2f Update napi2native Windows x64 binary
Replace the compiled napi2native.win32.x64.node binary for the Windows x64 build. This updates the native addon artifact (likely rebuilt due to code or build environment changes) so consumers get the latest native implementation.
v4.17.4
2026-02-13 19:06:12 +08:00
手瓜一十雪
c34812bc9c Update napi2native Windows x64 binary
Replace the compiled napi2native.win32.x64.node binary in packages/napcat-native/napi2native. This updates the Windows x64 native addon (rebuild/bugfix or dependency-linked binary update); no JS/source changes are included in this diff.
v4.17.3
2026-02-13 19:01:37 +08:00
手瓜一十雪
d93b430034 Revert "Enable native verbose logging"
This reverts commit cad567dc3f.
2026-02-13 18:12:11 +08:00
手瓜一十雪
c91e1378cf Increase OpenRouter max_tokens to 5000
Update .github/workflows/release.yml to raise the OpenRouter request max_tokens from 1500 to 5000. This allows the model to generate longer responses during the release workflow; be aware this may increase token usage and cost.
2026-02-13 18:01:36 +08:00
手瓜一十雪
cad567dc3f Enable native verbose logging
Invoke nativeExports.setVerbose(true) immediately after loading the QQ wrapper so the native module emits verbose logs (uses optional chaining so it’s safe if the symbol is absent). Also includes an updated napi2native.win32.x64.node binary. This helps with debugging native bypass behavior.
v4.17.2
2026-02-13 17:54:45 +08:00
手瓜一十雪
82c8de00d0 Add env var to disable Napi bypass
Some checks failed
Build NapCat Artifacts / Build-Framework (push) Has been cancelled
Build NapCat Artifacts / Build-Shell (push) Has been cancelled
Introduce NAPCAT_DISABLE_BYPASS to conditionally skip calling napi2nativeLoader.nativeExports.enableAllBypasses. Updates in napcat-framework/napcat.ts and napcat-shell/base.ts: bypass is enabled by default, but if NAPCAT_DISABLE_BYPASS is set to '1' the bypass call is skipped and a log message indicates it was disabled via environment variable. Keeps existing log when bypass is successfully enabled.
v4.17.1
2026-02-13 15:46:30 +08:00
手瓜一十雪
f17abccfdc Cleanup orphaned Electron child processes
Add cleanupOrphanedProcesses to terminate leftover child processes when running in Electron. The function imports Electron at runtime, uses app.getAppMetrics() to enumerate processes, excludes the main and provided worker PIDs, and sends SIGTERM to stray PIDs while ignoring already-dead processes and API errors. Also invoke this cleanup in restartWorker after starting the new worker to avoid lingering processes after restarts. Includes @ts-ignore for the dynamic Electron import and debug logging on failure.
2026-02-13 15:45:05 +08:00
手瓜一十雪
35af50bb73 Add ffmpeg.dll and update Windows native module
Add ffmpeg.dll to the napi2native package and update the prebuilt Windows x64 native addon (napi2native.win32.x64.node). This bundles the FFmpeg runtime with the native package and includes a rebuilt/updated native binary for Windows x64 to ensure compatibility with the new dependency or recent native changes.
2026-02-13 15:34:49 +08:00
手瓜一十雪
5c72f771c3 Add enableAllBypasses and call on startup
Expose an optional enableAllBypasses export in the Napi2Native loader and invoke it during initialization in both napcat-framework and napcat-shell to enable bypasses (logs when enabled). Pre-initialize native modules earlier in the shell startup flow and await nativePacketHandler.init. Also update config o3HookMode from 1 to 0, apply a small signature whitespace fix in clientContext.sendOidbPacket, and include an updated native binary.
v4.17.0
2026-02-13 14:56:18 +08:00
手瓜一十雪
62c9246368 feat: 为反检测做准备 2026-02-13 14:28:25 +08:00
手瓜一十雪
d622178b25 Refine NodeIKernel service interfaces (#1619)
Some checks failed
Build NapCat Artifacts / Build-Framework (push) Has been cancelled
Build NapCat Artifacts / Build-Shell (push) Has been cancelled
Add multiple NodeIKernel service interface files and tighten up method signatures and types across napcat-core. New interfaces added (e.g. NodeIKernelAVSDKService, NodeIKernelAddBuddyService, NodeIKernelBdhUploadService, NodeIKernelConfigMgrService, NodeIKernelDirectSessionService, NodeIKernelEmojiService, NodeIKernelFeedService, NodeIKernelFileBridgeClientService, NodeIKernelFileBridgeHostService, etc.). Updated existing interfaces with clearer parameter and return types, consistent spacing/semicolons, improved complex return shapes (AlbumService, CollectionService), listener methods, isNull checks, and many other method signature refinements (Avatar, Buddy, DbTools, ECDH, FileAssistant, FlashTransfer, GroupService, and more) to improve type safety and readability.
2026-02-12 21:47:43 +08:00
手瓜一十雪
9887eb8565 Add Linux machine-info GUID management
Add end-to-end support for reading/writing Linux machine-info and computing GUIDs.

Backend: - Introduce MachineInfoUtils (TS) for machine-info path lookup, ROT13 serialization, read/write/delete, backups, and MD5-based GUID computation. - Add a Python utility (guid.py) for CLI inspection, encode/decode, dump, and GUID computation. - Extend QQLogin API with new handlers: GetPlatformInfo, GetLinuxMAC, SetLinuxMAC, GetLinuxMachineId, ComputeLinuxGUID, GetLinuxMachineInfoBackups, CreateLinuxMachineInfoBackup, RestoreLinuxMachineInfoBackup, ResetLinuxDeviceID. Handlers include automatic backup behavior and error handling.

Router: Register new QQLogin routes for platform info and Linux machine-info operations.

Frontend: - Enhance guid_manager UI to detect platform and provide Linux-specific workflow (display machine-id, show/edit MAC, preview computed GUID via MD5, backup/restore/delete machine-info, and restart actions). - Add client-side MD5 (crypto-js) usage and new QQManager API methods to call the new backend endpoints.

This change enables cross-platform GUID management (Windows and Linux), includes CLI tooling for low-level inspection, and adds frontend workflows for Linux device-id management.
2026-02-12 19:00:36 +08:00
手瓜一十雪
2f8569f30c Add Registry20 GUID management and DPAPI support
Introduce tools and UI to read, write, backup and restore QQ Registry20 GUIDs using Windows DPAPI. Adds a Python CLI (guid_tool.py) for local Registry20 operations and a new TypeScript package napcat-dpapi with native bindings for DPAPI. Implements Registry20Utils in the webui-backend to protect/unprotect Registry20, plus backup/restore/delete helpers. Exposes new backend API handlers and routes (get/set GUID, backups, restore, reset, restart) and integrates frontend GUIDManager component and qq_manager controller methods. Propagates QQ data path via WebUiDataRuntime (setter/getter) and wires it up in framework/shell; updates Vite alias and package.json to include the new dpapi workspace. Includes native addon binaries for win32 x64/arm64 and basic tsconfig/readme/license for the new package.
v4.16.0
2026-02-12 17:08:24 +08:00
林小槐
82d0c51716 feat(webui): 插件商店增加插件详情弹窗并支持通过 url 传递 id 直接打开 (#1615)
Some checks failed
Build NapCat Artifacts / Build-Framework (push) Has been cancelled
Build NapCat Artifacts / Build-Shell (push) Has been cancelled
* feat(webui): 插件商店增加插件详情弹窗并支持通过 url 传递 id 直接打开

* fix(webui):type check
v4.15.19
2026-02-11 12:12:06 +08:00
手瓜一十雪
37fb2d68d7 Prefer QQAppId/ marker when parsing AppID
Some checks failed
Build NapCat Artifacts / Build-Framework (push) Has been cancelled
Build NapCat Artifacts / Build-Shell (push) Has been cancelled
Add parseAppidFromMajorV2 to napcat-common to scan a Major file for the "QQAppId/" marker and extract a null-terminated numeric AppID. Update qq-basic-info to import and prefer this new parser (falling back to the existing parseAppidFromMajor). Also correct the getMajorPath argument order when obtaining the major file path. This enables detection of AppID from a newer Major format while preserving legacy fallback behavior.
2026-02-08 09:55:31 +08:00
手瓜一十雪
a240f93784 Add appid entry for 9.9.27-45758
Add a new mapping to packages/napcat-core/external/appid.json for version 9.9.27-45758 (Windows). The entry sets appid to 537340213 and qua to "V1_WIN_NQ_9.9.27_45758_GW_B".
v4.15.18
2026-02-08 09:41:14 +08:00
时瑾
172a75b514 fix(webui-backend): sanitize plugin ID to prevent path injection (CodeQL js/path-injection)
Some checks failed
Build NapCat Artifacts / Build-Framework (push) Has been cancelled
Build NapCat Artifacts / Build-Shell (push) Has been cancelled
v4.15.17
2026-02-07 13:52:15 +08:00
时瑾
beef1233fa fix(ci): 修复 Update apifox 步骤中因 OpenAPI 文件过大导致的参数列表过长错误 v4.15.16 2026-02-07 13:44:25 +08:00
时瑾
8f69e2424a fix(backend): 修复插件列表接口新增字段导致的类型错误 v4.15.15 2026-02-07 13:38:53 +08:00
时瑾
f3156b1843 Merge branch 'main' of https://github.com/NapNeko/NapCatQQ v4.15.14 2026-02-07 13:32:58 +08:00
时瑾
61a16b44a4 style(webui): 优化插件商店与插件管理界面 UI/UX
- 重构插件卡片样式,采用毛玻璃效果与主题色交互
- 优化插件商店搜索栏布局,增加对顶部搜索及 Ctrl+F 快捷键的支持
- 实现智能头像提取逻辑,支持从 GitHub、自定义域名(Favicon)及 Vercel 自动生成
- 增加插件描述溢出预览(悬停提示及点击展开功能)
- 修复标签溢出处理,支持 Tooltip 完整显示
- 增强后端插件列表 API,支持返回主页及仓库信息
- 修复部分类型错误与代码规范问题
2026-02-07 13:30:50 +08:00
Nepenthe
7b17ef44dd Merge pull request #1598 from faithleysath/feat/schema-enhancement-refactor
refactor(schema): 重构 schema 组件引用与 OpenAPI 生成流程,并补齐消息 union 类型
2026-02-07 13:27:58 +08:00
吴天一
2c166299a3 fix(schema): 添加 data 字段描述到 BaseResponseSchema 2026-02-07 13:21:06 +08:00
吴天一
75d2611eda fix(schema): 将响应 data 字段标记为必填 2026-02-07 09:27:47 +08:00
吴天一
e2d2e65620 fix(schema): 修复 properties 容器误判导致错误注入 type 2026-02-06 21:37:50 +08:00
吴天一
f479fccf3e refactor(schema): 提取并复用 OpenAPI 响应示例,减少重复定义
在 napcat-schema 中引入 ActionExamples,统一复用公共错误示例定义。

新增默认成功示例 Success_Default,并注册到 components.examples。

将公共错误示例(1400/1401/1404)集中注册到 components.examples,统一响应示例来源。

优化 buildResponseExamples:当 returnExample 为 null、空对象或空数组时,自动引用默认成功示例;当错误示例命中公共定义时,优先使用  引用组件示例,未命中时保持内联示例。

未提供 errorExamples 时,默认引用 #/components/examples/Error_1400,减少重复定义并提升文档一致性。

本次变更不改变接口响应结构,主要改进 OpenAPI 示例复用策略与文档可维护性。
2026-02-06 17:07:24 +08:00
吴天一
45652612b4 refactor(schema): 重构消息 schema 与 OpenAPI 生成流程
- 为 OneBot action 相关对象补充稳定 $id,提升 schema 复用与组件引用能力
- 补齐消息联合类型,纳入 location/xml/miniapp 等消息段定义
- 重构 napcat-schema 中 OpenAPI 生成逻辑,优化组件注册与缺失项报告
- openapi schema 文件行数从 36433 缩减到 23137(减少 13296 行,约 36.5%)
- 统一 schema 结构与描述,降低后续扩展与文档生成维护成本
2026-02-06 16:12:34 +08:00
pohgxz
54266f97f8 fix: 尝试修复 Update apifox 错误
Some checks failed
Build NapCat Artifacts / Build-Framework (push) Has been cancelled
Build NapCat Artifacts / Build-Shell (push) Has been cancelled
2026-02-05 22:47:02 +08:00
手瓜一十雪
687a5f5708 Update ffmpeg native addon binaries
feat: ogg opus格式支持 fix #1593
v4.15.13
2026-02-05 22:00:12 +08:00
手瓜一十雪
3dab2b4361 Update appid for 3.2.25-45758
Correct the appid entry in packages/napcat-core/external/appid.json for version 3.2.25-45758, changing it from 537314197 to 537340249 to ensure the build is identified correctly. (File now lacks a trailing newline.)
v4.15.12
2026-02-05 20:28:11 +08:00
006lp
74be268dbe Update appid and qua for version 3.2.25-45758 (#1596)
Signed-off-by: 006lp <144674902+006lp@users.noreply.github.com>
2026-02-05 20:27:53 +08:00
手瓜一十雪
8b3f60628e Bump appid entry to 3.2.25-45758
Rename the object key in packages/napcat-core/external/appid.json from "3.2.25-45627" to "3.2.25-45758" to register the new build. The appid (537340249) and qua string were not modified in this change; please verify whether the qua should also be updated to match the new build identifier.
v4.15.11 v4.14.9
2026-02-05 20:13:48 +08:00
手瓜一十雪
f0eb6379c1 Add Linux appid 3.2.25-45627
Add a new entry to packages/napcat-core/external/appid.json for version 3.2.25-45627 with appid 537340249 and qua "V1_LNX_NQ_3.2.25_45627_GW_B". This registers the Linux build identifier in the appid mapping.
v4.15.8
2026-02-05 20:05:35 +08:00
手瓜一十雪
f3e24811ad Simplify QQ/Node download in release workflow
Merge and simplify the QQ and Node.js download steps in .github/workflows/release.yml: remove the actions/cache step and related QQ cache logic, always download the QQ x64 installer directly, and assemble/extract using a single temporary directory (TMPDIR). Also rename the step to "Download and Assemble NapCat.Shell.Windows.Node.zip" and switch NODE_EXTRACT to use TMPDIR instead of WORK_TMPDIR. This reduces workflow complexity and avoids maintaining a local cache for the QQ installer.
2026-02-05 18:40:47 +08:00
Qiao
ecbac2b782 fix(webui): 修复 Toast 提示信息过长导致 UI 溢出的问题 (#1595)
- 新增路径截断工具函数,支持 Windows/Linux 长路径处理

- 创建 toast 包装器,自动截断错误信息中的长路径

- 为 Toaster 组件添加 maxWidth 和 word-break 样式防止溢出

- 更新插件配置弹窗使用新的 toast 工具
v4.15.6
2026-02-05 18:22:25 +08:00
手瓜一十雪
49b5496406 Revert "Lower NTQQ build check from 41679 to 39038"
This reverts commit 280aac5c75.
v4.15.5
2026-02-05 18:03:29 +08:00
pohgxz
dc8b85da1c feat: 自动更新apifox
Some checks are pending
Build NapCat Artifacts / Build-Framework (push) Waiting to run
Build NapCat Artifacts / Build-Shell (push) Waiting to run
2026-02-05 12:56:53 +08:00
手瓜一十雪
b862b2fa1c Add mappings for 3.2.25 and 9.9.27 builds
Update external mapping files to include new build entries. Added send/recv addresses for 3.2.25-45758 (x64 and arm64) and 9.9.27-45758-x64 in packages/napcat-core/external/napi2native.json and packages/napcat-core/external/packet.json. No functional code changes — just registry updates for new builds.
2026-02-05 11:29:49 +08:00
Qiao
39a2a4028b feat(webui): 添加QQ掉线时重启进程提示
- 后端 CheckLoginStatus API 新增 isOffline 字段区分掉线与未登录状态
- 后端 GetQQLoginInfo API 新增返回 online 和 avatarUrl 字段
- 前端掉线时弹窗提示用户是否重启进程
- 修正 isLogin 类型从 string 改为 boolean
2026-02-05 11:07:02 +08:00
手瓜一十雪
29d7b95d05 Add codeString prop to Snippet for formatted JSON
Pass JSON.stringify(...) as the codeString prop to Snippet so structured message/response objects are rendered as pretty-printed JSON and can be copied via the tooltip. Changes applied in show_structed_message.tsx, display_card/render.tsx, and display_card/response.tsx.
2026-02-04 12:33:18 +08:00
手瓜一十雪
280aac5c75 Lower NTQQ build check from 41679 to 39038
Update NTQQFriendApi to use a lower minimum NTQQ build threshold (39038) when deciding which buddyListV2 API path to call. The change replaces occurrences of '41679' with '39038' in packages/napcat-core/apis/friend.ts (affecting getBuddyV2SimpleInfoMap and the buddyListV2 retrieval logic) to broaden compatibility with older NTQQ builds.
2026-02-03 22:56:12 +08:00
手瓜一十雪
67dc41bbd2 Improve extension tab UI and add /plugin proxy
Update dashboard extension UI to prevent title overflow: add truncate and max-width to the tab title, include the plugin name in the title tooltip, and hide the plugin-name label on small screens (visible from md+). Also add a '/plugin' proxy entry to the Vite dev server config so plugin requests are forwarded to the backend debug URL.
2026-02-03 18:58:40 +08:00
手瓜一十雪
24c832be16 refactor: serviceworker
重构sw.js,实现更智能的缓存,根据路由设计缓存
2026-02-03 18:09:12 +08:00
手瓜一十雪
2fcc5c74d3 Add externalVersion and refine API types
Add externalVersion boolean to LoginInitConfig and pass false at initialization; bump appid qua for 9.9.27 entry. Refine several IPC/wrapper typings to use Promise return types, adjust pathIsReadableAndWriteable signature to accept a type and return Promise<number>, and update NodeIKernelNodeMiscService method signatures (styling) while adding getQimei36WithNewSdk(). These changes improve type accuracy for async/native calls and add a new SDK helper.
2026-02-03 15:59:31 +08:00
手瓜一十雪
029feaa51a Cache QQ installer and handle win64 files
Update GitHub Actions release workflow to use a cached QQ x64 installer (updated NT_URL), add cache key generation and actions/cache usage, and implement a download-and-extract step that reuses the cache. Adjust temporary directory usage (WORK_TMPDIR/NODE_EXTRACT), add LightQuic.dll to copy targets, and copy specific win64 files into an OUT_DIR/win64 folder.

Update packages/napcat-develop/loadNapCat.cjs to recognize and copy win64 artifacts: add TARGET_WIN64_DIR, include LightQuic.dll, define win64ItemsToCopy (SSOShareInfoHelper64.dll, parent-ipc-core-x64.dll), validate their presence, ensure target directories, and copy win64 files into dist/win64. These changes speed CI by caching the installer and ensure required win64 DLLs are packaged alongside the main distribution.
2026-02-03 15:28:13 +08:00
Qiao
d2734234e8 style(webui): 优化插件商店样式,使用固定头部 (#1585)
* fix: 修复 qq_login.tsx 类型错误

- onSelectionChange 的 key 参数可能为 null,添加空值检查

* style(webui): refactor plugin store layout with sticky header
2026-02-03 14:23:13 +08:00
Qiao
21d5652924 fix: 插件更新时保留 data 文件夹 (#1584)
* fix: 修复 qq_login.tsx 类型错误

- onSelectionChange 的 key 参数可能为 null,添加空值检查

* fix: 插件更新时保留 data 文件夹

- 更新插件时备份 data 文件夹,解压后恢复

- 添加异常处理,确保解压失败时也能恢复 data 文件夹
2026-02-03 09:55:21 +08:00
手瓜一十雪
168447dcbc Add password login support to web UI and backend
Implement password-based QQ login across the stack: add a PasswordLogin React component, integrate it into the QQ login page, and add a frontend controller method to call a new /QQLogin/PasswordLogin API. On the backend, add QQPasswordLoginHandler, router entry, and WebUiDataRuntime hooks (setPasswordLoginCall / requestPasswordLogin) plus a default handler. Register a password login callback in the shell (base.ts) that calls the kernel login service, handles common error cases and falls back to QR code when needed. Update types to include onPasswordLoginRequested and adjust NodeIKernelLoginService method signatures (including passwordLogin return type changed to Promise<QuickLoginResult>) and minor formatting fixes.
2026-02-02 19:48:31 +08:00