b058604077807b9bffd762bb675403d48d476a05
Introduce a safe PR build dispatch flow and related helpers. - Add GitHubAPI.createWorkflowDispatch to .github/scripts/lib/github.ts and tighten getRepository nullability. - Add .github/scripts/pr-build-dispatch.ts to dispatch an untrusted workflow_run (workflow_dispatch) for PR builds. - Rewrite .github/workflows/build-pr.yml to split privileged checks (pull_request_target / issue_comment) from untrusted execution (workflow_dispatch): - Add workflow_dispatch inputs for PR metadata. - Ensure privileged jobs only check conditions, post comments and dispatch the untrusted build. - Untrusted build jobs (framework/shell/publish) run under workflow_dispatch, checkout PR code into a separate workspace, clear GITHUB_TOKEN in build steps, and set stricter permissions and persist-credentials:false where appropriate. - Adjust concurrency, outputs, and inter-job dependencies to work with inputs rather than passing sensitive data between privileged and untrusted contexts. - Update trigger-docker and result-comment flows to rely on workflow_dispatch inputs and only run in the untrusted run where appropriate. - Change packages/napcat-vite/vite-plugin-version.js to read NAPCAT_GITHUB_TOKEN (instead of GITHUB_TOKEN) to avoid exposing Actions write tokens in untrusted builds. These changes aim to improve security by preventing execution of PR-controlled code with elevated repo permissions and by isolating token usage.
NapCat
Modern protocol-side framework implemented based on NTQQ.
云起兮风生,心向远方兮路未曾至.
New Feature
在 v4.8.115+ 版本开始
- NapCatQQ 支持 Stream Api
- NapCatQQ 推荐 message_id/user_id/group_id 均使用字符串类型
- [1] 解决 Docker/跨设备/大文件 的多媒体上下传问题
- [2] 采用字符串可以解决扩展到int64的问题,同时也可以解决部分语言(如JavaScript)对大整数支持不佳的问题,增加极少成本。
Welcome
- NapCatQQ is a modern implementation of the Bot protocol based on NTQQ.
- NapCatQQ 是现代化的基于 NTQQ 的 Bot 协议端实现
Feature
- Easy to Use
- 作为初学者能够轻松使用.
- Quick and Efficient
- 在低内存操作系统长时运行.
- Rich API Interface
- 完整实现了大部分标准接口.
- Stable and Reliable
- 持续稳定的开发与维护.
Quick Start
可前往 Release 页面下载最新版本
首次使用请务必查看如下文档看使用教程
项目非盈利,涉及 对接问题/基础问题/下层框架问题 请自行搜索解决,本项目社区不提供此类解答。
Link
| Docs |
|---|
| Docs |
|---|
| QQ Group |
|---|
| Telegram |
|---|
| DeepWiki |
|---|
QQ群因为特殊原因需要入群密钥,请在webui关于页面获取,仅最新的100个版本以内有效。
下面的QQ Group 无需密钥,随时清理不活跃人员和Bot,仅500人容量。
Thanks
-
Lagrange 对本项目的大力支持 参考部分代码 已获授权
-
AstrBot 是完美适配本项目的LLM Bot框架 在此推荐一下
-
MaiBot 一只赛博群友 麦麦 Bot框架 在此推荐一下
-
qq-chat-exporter 基于NapCat的消息导出工具 在此推荐一下
-
不过最最重要的 还是需要感谢屏幕前的你哦~
License
本项目采用 混合协议 开源,因此使用本项目时,你需要注意以下几点:
- 第三方库代码或修改部分遵循其原始开源许可.
- 本项目获取部分项目授权而不受部分约束
- 项目其余逻辑代码采用本仓库开源许可.
本仓库仅用于提高易用性,实现消息推送类功能,此外,禁止任何项目未经仓库主作者授权基于 NapCat 代码开发。使用请遵守当地法律法规,由此造成的问题由使用者和提供违规使用教程者负责。
Languages
TypeScript
97.7%
JavaScript
1.3%
HTML
0.4%
Python
0.2%
Batchfile
0.2%
Other
0.2%