Commit Graph

535 Commits

Author SHA1 Message Date
手瓜一十雪
44f6c79a24 feat: 标准化 2025-09-20 15:20:43 +08:00
手瓜一十雪
1135089071 Add Readme for stream API actions
Introduces a Readme.txt file in the stream action directory, providing an overview and usage notes for stream-related API functions such as file upload, download, and cleanup.
2025-09-16 23:33:48 +08:00
手瓜一十雪
fe878687ee Add streaming file upload and download actions
Introduces new OneBot actions for streaming file upload and download, including chunked file transfer with memory/disk management and SHA256 verification. Adds CleanStreamTempFile, DownloadFileStream, UploadFileStream, and TestStreamDownload actions, updates action routing and network adapters to support streaming via HTTP and WebSocket, and provides Python test scripts for concurrent upload testing.
2025-09-16 23:24:00 +08:00
手瓜一十雪
d28ba233ae fix: 多层解析 2025-09-08 16:05:10 +08:00
手瓜一十雪
5892ddb6e5 Add quick_reply support to message parsing
Introduces the quick_reply boolean option to message history schema and message parsing logic. Updates relevant functions to handle quick_reply, allowing for conditional behavior during message reply and segment parsing.
2025-09-02 22:33:05 +08:00
手瓜一十雪
518a7c1906 Refactor packet client and update message history actions
Replaced LRUCache with Map for callback and event management in packet clients, and standardized callback hash usage. Updated GetFriendMsgHistory and GetGroupMsgHistory actions to use snake_case for payload keys. Modified OneBotMsgApi to support disabling URL retrieval for ptt elements via a new parameter.
2025-09-02 22:24:53 +08:00
手瓜一十雪
5b2ff5acd3 Add resource health management and enhance message parsing
Introduces a ResourceManager for health checking and retry logic in src/common/health.ts. Updates OneBot message parsing to support disabling URL fetching and multi-message parsing via new payload options. File, image, video, and ptt URL retrievals now use resource health management for improved reliability. Also refactors packet API to allow configurable timeout for FetchRkey.
#1220
2025-09-02 21:19:49 +08:00
手瓜一十雪
a99bb2f88b Add group album media actions and API integration
Introduces new OneBot actions for group album media: listing, commenting, liking, and deleting. Adds supporting API methods and data structures for album media operations in NTQQWebApi and NodeIKernelAlbumService. Updates action router and index to register new actions.
2025-08-26 14:58:11 +08:00
手瓜一十雪
56708da509 Add NTQQ album list API and update related logic
Introduces getAlbumListByNTQQ to NTQQWebApi for retrieving group album lists via NTQQ. Updates NodeIKernelAlbumService interface for typed getAlbumList parameters and response. Refactors GetQunAlbumList action to use the new NTQQ API and return the correct album list format. Also fixes cookie and bkn usage in album-related methods for consistency.
2025-08-25 19:04:22 +08:00
手瓜一十雪
637094d26f fix #1171 && Improve message recall handling and cleanup
Changed recallMsg to return the result of the event call. Added a 5-second cache cleanup for recall events in DeleteMsg. Removed an unnecessary blank line in plugin.ts.
2025-08-25 15:50:05 +08:00
手瓜一十雪
2b5f4cfea0 Add cookie header to getAlbumList API request
The getAlbumList method in NTQQWebApi now includes a 'Cookie' header with skey, pskey, and uin for authentication. Updated GetQunAlbumList action to use the correct return type from NTQQWebApi.getAlbumList.
2025-08-24 20:39:07 +08:00
手瓜一十雪
3ed5f4cd3c feat: Add group album upload utilities and refactor API && close #1116
Introduces src/core/data/webapi.ts with utilities for chunked group album uploads, including session creation and chunk management. Refactors NTQQWebApi in webapi.ts to use these utilities, adds getAlbumList and uploadImageToQunAlbum methods, and improves upload logic for efficiency and maintainability.
2025-08-24 20:12:35 +08:00
手瓜一十雪
568c20d9b0 feat: #1121 & Add cache cleaning for specific directories
Extended the CleanCache action to remove files from Pic, Ptt, Video, File, and log directories under the nt_data path. This improves cache management by ensuring these directories are also cleaned, with logging for successful and failed deletions. 增强缓存清理
2025-08-24 16:02:05 +08:00
手瓜一十雪
3032dbcbef feat: #1179 2025-08-24 15:50:08 +08:00
手瓜一十雪
887a37753d fix: #1171 2025-08-24 14:53:58 +08:00
囧囧JOJO
5c4e161434 feat: 添加可选参数 'count' 到 SetGroupAddRequest 以支持动态获取通知数量(#1113 补充) (#1146)
* feat: 添加可选参数 'count' 到 SetGroupAddRequest 以支持动态获取通知数量(#1113 补充)

* feat: 设置 SetGroupAddRequest 中 'count' 的默认值为 100

* Update src/onebot/action/group/SetGroupAddRequest.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-06 20:38:57 +08:00
手瓜一十雪
11308d9e01 Pr enhance (#1176)
* fix

* Refactor PacketApi status checks and fix typos

Replaced all usages of PacketApi.available with PacketApi.packetStatus for more accurate status checking. Fixed a typo in getFullQQVesion to getFullQQVersion. Updated plugin_onmessage to fetch and parse messages for a user. These changes improve reliability and consistency in API status handling.

* Fix typo in getFullQQVersion method name

Corrected the method name from getFullQQVesion to getFullQQVersion in multiple locations to ensure consistency and prevent potential runtime errors.

* Remove performance CLI and demo, fix typos, update proto

Deleted the performance CLI and demo files. Fixed a typo in getFullQQVesion to getFullQQVersion across multiple files. Changed the 'time' field type from UINT32 to UINT64 in Oidb.0x9067_202 proto. Commented out performanceMonitorPlugin in vite.config.ts. Removed an unimplemented log statement in NodeIKernelBuddyListener.

* Comment out default plugin adapter registration

The default registration of OB11PluginAdapter in NapCatOneBot11Adapter was commented out, likely to prevent automatic plugin loading or to allow for more flexible plugin management. Also, removed an unnecessary blank line in the plugin_onmessage function.

* fix

* Add shell-analysis mode with performance monitoring

Introduces a new .env.shell-analysis file and a dev:shell-analysis npm script for building in shell-analysis mode. Updates vite.config.ts to support the new mode, enabling the performance monitor plugin with an updated exclude list. Also extends the plugin's exclude patterns to filter out 'packet' files.

* Delete performance-api.ts

* Add commented export for performance-monitor

Added a commented-out export statement for '@/common/performance-monitor' in napcat.ts, possibly for future use or reference. No functional changes to the file.
2025-08-06 20:37:45 +08:00
囧囧JOJO
7a084d51f6 feat: 向 /get_system_msg 添加可选参数 'count' (#1113)
* feat: Add the optional parameter "count" to /get_system_msg

* Refactor GetGroupSystemMsg to use TypeBox schema

Introduced TypeBox for payload validation in GetGroupSystemMsg, replacing manual count handling with a schema-based approach. Updated the handler to use the new payload type and schema, improving type safety and input validation.

---------

Co-authored-by: 手瓜一十雪 <nanaeonn@outlook.com>
2025-07-07 20:46:26 +08:00
时瑾
e17e96957d fix: 优化get_group_ignored_notifies接口返回值 2025-06-12 20:14:11 +08:00
时瑾
e09341b344 feat: get_collection_list 2025-06-12 13:28:31 +08:00
时瑾
15b77e3e15 feat: get_group_ignore_add_request 2025-06-12 13:23:22 +08:00
时瑾
a949413bb9 fix: 修正部分接口的参数、返回值,提高兼容性 (#1072)
* fix: 修正`get_group_system_msg` `get_group_honor_info`接口返回值 提升兼容性

* fix: `create_group_file_folder` 接口兼容性提升
2025-06-11 12:37:29 +08:00
手瓜一十雪
2235d831ff fix: #1049 2025-06-10 13:05:36 +08:00
时瑾
ed8e67b21d fix: 转发消息接口返回值兼容gocq (#1066) 2025-06-09 10:02:27 +08:00
手瓜一十雪
aa6344a2b2 fix: #1043 2025-05-26 19:58:50 +08:00
手瓜一十雪
6047a5aaaa fix 2025-05-25 16:30:15 +08:00
手瓜一十雪
493bf58a53 fix: #1031 2025-05-25 16:18:50 +08:00
手瓜一十雪
7383dc011c fix 2025-05-18 20:59:11 +08:00
手瓜一十雪
dc0b1d977d fix 2025-05-18 20:57:41 +08:00
手瓜一十雪
1c3b5060c9 fix 2025-05-18 20:42:03 +08:00
手瓜一十雪
8b85c5a4d5 fix 2025-05-18 20:19:53 +08:00
手瓜一十雪
86d01c77b4 fix: #1018 2025-05-18 20:15:38 +08:00
手瓜一十雪
d46f129b74 feat: 隔离context传递 避免高并发干扰一个实例 2025-05-18 19:21:14 +08:00
手瓜一十雪
c6a9f082ff fix 2025-05-09 13:17:47 +08:00
手瓜一十雪
f4b5439140 fix: typo
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
2025-05-08 18:04:40 +08:00
手瓜一十雪
238814c594 fix 2025-05-08 17:58:12 +08:00
Nepenthe
e144d3a218 接口 _get_model_show 的 model 设置为可选属性 2025-04-26 14:48:35 +08:00
手瓜一十雪
270d67575b fix: 969 2025-04-24 09:50:26 +08:00
手瓜一十雪
e6907aee6d feat: doubt friends支持 2025-04-23 16:46:09 +08:00
手瓜一十雪
5e507dbc08 fix: #963 2025-04-23 11:47:58 +08:00
手瓜一十雪
20b8b8226a feat: 消息context增强识别 2025-04-19 11:36:27 +08:00
手瓜一十雪
e52b6ccf23 fix 2025-04-19 11:13:02 +08:00
手瓜一十雪
ff531b6b6e feat: 回归ajv 2025-04-19 11:07:01 +08:00
手瓜一十雪
f315ab15e6 fix 2025-04-19 11:03:03 +08:00
手瓜一十雪
37611c8338 Revert "feat: 区分resId和普通消息Id"
This reverts commit d57f90c7e8.
2025-04-19 11:01:12 +08:00
手瓜一十雪
3fd3a2df0c Revert "fix: 修掉漏掉的"
This reverts commit 9c0f13248b.
2025-04-19 11:01:06 +08:00
手瓜一十雪
60577552d7 Revert "fix"
This reverts commit cd1db2bcf4.
2025-04-19 10:59:04 +08:00
手瓜一十雪
b2bd48cf49 Revert "fix:coerce"
This reverts commit b190c21ef8.
2025-04-19 10:58:56 +08:00
手瓜一十雪
981e510963 Revert "fix: checker"
This reverts commit 875b20ea9e.
2025-04-19 10:58:46 +08:00
手瓜一十雪
e77d8f93ba Revert "fix: zod boolean强制转换"
This reverts commit db37def059.
2025-04-19 10:58:39 +08:00