@qqbrowser/openclaw-qbot 0.0.88 → 0.0.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agents-Dxk5oWw_.js → agents-BBYlUP5T.js} +1 -1
- package/dist/{agents.config-CXoN8qvY.js → agents.config-CoZtnyKH.js} +1 -1
- package/dist/{agents.config-D6kg-4Ct.js → agents.config-Dyqz-Sk-.js} +1 -1
- package/dist/{auth-choice-COKpi33u.js → auth-choice-CVvPBerD.js} +1 -1
- package/dist/{auth-choice-K5eGX1sj.js → auth-choice-DSNX3Hdu.js} +1 -1
- package/dist/{banner-DsZegXc3.js → banner-C4Bgn_Gf.js} +1 -1
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +1 -1
- package/dist/bundled/session-memory/handler.js +1 -1
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-options-BU9Qf5Cq.js → channel-options-9lP0IBR0.js} +1 -1
- package/dist/{channel-options-C-h17ZYO.js → channel-options-C9PHeVlU.js} +1 -1
- package/dist/{channel-web-DmmMXUdc.js → channel-web-DhNCVKla.js} +1 -1
- package/dist/{channel-web-C2Z4xKq3.js → channel-web-NeSGV-e7.js} +1 -1
- package/dist/{channels-cli-WBY_CB2-.js → channels-cli-CWu-PrIl.js} +1 -1
- package/dist/{channels-cli-DM6DIc_P.js → channels-cli-DHD8V6-q.js} +1 -1
- package/dist/{cli-DXZKyKLK.js → cli-BWE7sLVx.js} +1 -1
- package/dist/{cli-RLbxgNsy.js → cli-DF5ZcuuX.js} +1 -1
- package/dist/{command-registry-CIBlcDrG.js → command-registry-DIOnYWDt.js} +1 -1
- package/dist/{compact-BfHim3cA.js → compact-DgbuvsDF.js} +6 -6
- package/dist/{compact.runtime-C_urV0W5.js → compact.runtime-B5zaMKSa.js} +1 -1
- package/dist/{compact.runtime-eUr8DtWw.js → compact.runtime-B6qfwW6l.js} +1 -1
- package/dist/{compact.runtime-DtLl0dZ5.js → compact.runtime-BofMQvNu.js} +1 -1
- package/dist/{compact.runtime-BpYpUiXf.js → compact.runtime-C-OsuZNM.js} +1 -1
- package/dist/{completion-cli-BYf6ef-t.js → completion-cli-CckNzelT.js} +1 -1
- package/dist/{completion-cli-Dsi5-gGE.js → completion-cli-F60ntV7X.js} +1 -1
- package/dist/{config-cli-GwzrxUR-.js → config-cli-1Ut82gjz.js} +1 -1
- package/dist/{config-cli-IpFnLniP.js → config-cli-BVtPmTcO.js} +1 -1
- package/dist/{configure-Cx7WvgVM.js → configure-3Kgwf3gj.js} +1 -1
- package/dist/{configure-DIVEkxxF.js → configure-Bpy51qkb.js} +1 -1
- package/dist/{deps-send-whatsapp.runtime-CdAcLrxO.js → deps-send-whatsapp.runtime-CI4UsY0E.js} +1 -1
- package/dist/{deps-send-whatsapp.runtime-Dj_dh7mb.js → deps-send-whatsapp.runtime-CJbg_i22.js} +1 -1
- package/dist/{deps-send-whatsapp.runtime-DJOAewju.js → deps-send-whatsapp.runtime-CPhSRgv3.js} +1 -1
- package/dist/{deps-send-whatsapp.runtime-BfuHSQxE.js → deps-send-whatsapp.runtime-DLRNnLUS.js} +1 -1
- package/dist/{doctor-completion-BcvWFszV.js → doctor-completion-CucfTzWR.js} +1 -1
- package/dist/{doctor-completion-CQMvGm9I.js → doctor-completion-D76qqYqG.js} +1 -1
- package/dist/entry.js +1 -1
- package/dist/extensionAPI.js +1 -1
- package/dist/{gateway-cli-CBK9IHgW.js → gateway-cli-BKWQlBHk.js} +2 -2
- package/dist/{gateway-cli-BUcUT6It.js → gateway-cli-DtqcCdL7.js} +2 -2
- package/dist/{health-CiTej6rM.js → health-BXDoFh4Q.js} +1 -1
- package/dist/{health-Pqtl8jCk.js → health-xCl2atiY.js} +1 -1
- package/dist/{hooks-cli-C6nsAzQh.js → hooks-cli-B2j44Nvk.js} +1 -1
- package/dist/{hooks-cli-BR-m9Vxi.js → hooks-cli-DT0Hmbz-.js} +1 -1
- package/dist/index.js +2 -2
- package/dist/llm-slug-generator.js +1 -1
- package/dist/{models-CxaUXLzo.js → models-DhX1F_Pj.js} +1 -1
- package/dist/{models-cli-DuamSrQA.js → models-cli-B-kAey2t.js} +1 -1
- package/dist/{models-cli-DM55mW-t.js → models-cli-B53yy1mw.js} +1 -1
- package/dist/{npm-resolution-CKwFeFIB.js → npm-resolution-BIifLd1f.js} +1 -1
- package/dist/{npm-resolution-9bO0TPQF.js → npm-resolution-C2Ow0mqR.js} +1 -1
- package/dist/{onboard-BU0gG29k.js → onboard-D9IefEER.js} +2 -2
- package/dist/{onboard-channels-CsKyM82H.js → onboard-channels-B8JZHEaQ.js} +1 -1
- package/dist/{onboard-channels-BK5KINY9.js → onboard-channels-ByD6UdVu.js} +1 -1
- package/dist/{onboard-BlGJhhEF.js → onboard-qMIhLeRM.js} +2 -2
- package/dist/{onboarding-CM_9Fyo2.js → onboarding-CddGtlY5.js} +1 -1
- package/dist/{onboarding-Kz5K9mKB.js → onboarding-CgqsAteJ.js} +1 -1
- package/dist/{onboarding.finalize-DstFPCVD.js → onboarding.finalize-BgCWB7kF.js} +1 -1
- package/dist/{onboarding.finalize-C96gv5GP.js → onboarding.finalize-CkHWKgcF.js} +1 -1
- package/dist/{pi-embedded-BHryO0s2.js → pi-embedded-C6L57IhI.js} +6 -6
- package/dist/{pi-embedded-D_03X4gB.js → pi-embedded-CN25rQwp.js} +6 -6
- package/dist/{plugin-registry-DyreKTxc.js → plugin-registry-Cido8VxT.js} +1 -1
- package/dist/{plugin-registry-Dsb86j5r.js → plugin-registry-CpPyaWT0.js} +1 -1
- package/dist/plugin-sdk/{channel-web-BDO73YAY.js → channel-web-DgBEXyWx.js} +1 -1
- package/dist/plugin-sdk/{channel-web-C0hljM9U.js → channel-web-T7e1VB_g.js} +1 -1
- package/dist/plugin-sdk/{compact.runtime-B-jUdCSu.js → compact.runtime-B0qhTLAN.js} +1 -1
- package/dist/plugin-sdk/{compact.runtime-iEjcWTOi.js → compact.runtime-C5aI5KIg.js} +1 -1
- package/dist/plugin-sdk/{compact.runtime-BspLSIc1.js → compact.runtime-Da9JL-Re.js} +1 -1
- package/dist/plugin-sdk/{compact.runtime-CMWw2lwa.js → compact.runtime-DuWXCPO4.js} +1 -1
- package/dist/plugin-sdk/{compact.runtime-HnqzVAl7.js → compact.runtime-F35snTaz.js} +1 -1
- package/dist/plugin-sdk/{compact.runtime-C2keFFLA.js → compact.runtime-kL8PhhSi.js} +1 -1
- package/dist/plugin-sdk/compat.js +1 -1
- package/dist/plugin-sdk/{deps-send-whatsapp.runtime-BRm24Qy-.js → deps-send-whatsapp.runtime-BWVV9ImJ.js} +1 -1
- package/dist/plugin-sdk/{deps-send-whatsapp.runtime-Bw9eegUO.js → deps-send-whatsapp.runtime-BdOLZ0P3.js} +1 -1
- package/dist/plugin-sdk/{deps-send-whatsapp.runtime-DdS9G3TR.js → deps-send-whatsapp.runtime-DMD-mrgL.js} +1 -1
- package/dist/plugin-sdk/{deps-send-whatsapp.runtime-ClvlojBM.js → deps-send-whatsapp.runtime-DNaHPuYl.js} +1 -1
- package/dist/plugin-sdk/{deps-send-whatsapp.runtime-DjAB5JP0.js → deps-send-whatsapp.runtime-DkmDJ3eX.js} +1 -1
- package/dist/plugin-sdk/{deps-send-whatsapp.runtime-yd5qmNGP.js → deps-send-whatsapp.runtime-nRQWODTL.js} +1 -1
- package/dist/plugin-sdk/{dispatch-BtGxkC47.js → dispatch--4Vuy9oL.js} +6 -6
- package/dist/plugin-sdk/{dispatch-BO5EIrCx.js → dispatch-DPafUBvi.js} +6 -6
- package/dist/plugin-sdk/{dispatch-DABpoSJj.js → dispatch-DzdnDix3.js} +6 -6
- package/dist/plugin-sdk/{dispatch-DfBUhUa2.js → dispatch-_3aPMKVc.js} +6 -6
- package/dist/plugin-sdk/{dispatch-BFVL83hy.js → dispatch-v8f5j6tA.js} +6 -6
- package/dist/plugin-sdk/index.js +1 -1
- package/dist/plugin-sdk/irc.js +1 -1
- package/dist/plugin-sdk/matrix.js +1 -1
- package/dist/plugin-sdk/msteams.js +1 -1
- package/dist/plugin-sdk/nextcloud-talk.js +1 -1
- package/dist/plugin-sdk/{reply-0QJVop5g.js → reply-FZOMaPdT.js} +6 -6
- package/dist/plugin-sdk/{slash-dispatch.runtime-I6_T20Yd.js → slash-dispatch.runtime-CV3coyWo.js} +1 -1
- package/dist/plugin-sdk/{slash-dispatch.runtime-BwEZoF7O.js → slash-dispatch.runtime-CYrhiT19.js} +1 -1
- package/dist/plugin-sdk/{slash-dispatch.runtime-W9VRo3lf.js → slash-dispatch.runtime-CkVpd9xh.js} +1 -1
- package/dist/plugin-sdk/{slash-dispatch.runtime-CaemgmaW.js → slash-dispatch.runtime-CzBVRyba.js} +1 -1
- package/dist/plugin-sdk/{slash-dispatch.runtime-B4nePbcc.js → slash-dispatch.runtime-DjGJDpWI.js} +1 -1
- package/dist/plugin-sdk/{slash-dispatch.runtime-ByQEhvcx.js → slash-dispatch.runtime-WIHCc0nP.js} +1 -1
- package/dist/plugin-sdk/{subagent-registry-runtime-pjzgZyiw.js → subagent-registry-runtime-4o_8yfyB.js} +1 -1
- package/dist/plugin-sdk/{subagent-registry-runtime-ikSo08Bh.js → subagent-registry-runtime-BJxZkq6N.js} +1 -1
- package/dist/plugin-sdk/{subagent-registry-runtime-BPHOIYnR.js → subagent-registry-runtime-BRl0zIp-.js} +1 -1
- package/dist/plugin-sdk/{subagent-registry-runtime-C2TUyWmj.js → subagent-registry-runtime-C-2UF0IM.js} +1 -1
- package/dist/plugin-sdk/{subagent-registry-runtime-Co3rxlYB.js → subagent-registry-runtime-bCP-yDZd.js} +1 -1
- package/dist/plugin-sdk/{subagent-registry-runtime-Wu14xqj_.js → subagent-registry-runtime-lM2A6bas.js} +1 -1
- package/dist/plugin-sdk/{web-Bgl0ILbD.js → web--MzzmLKe.js} +1 -1
- package/dist/plugin-sdk/{web-BzRQSS8R.js → web-BoQezxCE.js} +1 -1
- package/dist/plugin-sdk/{web-CK9n5ZfK.js → web-CgFT-LB5.js} +1 -1
- package/dist/plugin-sdk/{web-3TYyfPQG.js → web-CskfGkR8.js} +1 -1
- package/dist/plugin-sdk/{web-WIpdyZZQ.js → web-KZ3WEX08.js} +1 -1
- package/dist/plugin-sdk/{web-BCOXLnUB.js → web-sUKMDnvE.js} +1 -1
- package/dist/plugin-sdk/whatsapp.js +1 -1
- package/dist/{plugins-cli-B_m-0xTz.js → plugins-cli-7Rom2MRn.js} +1 -1
- package/dist/{plugins-cli-fpI_fBTE.js → plugins-cli-ULYhpcRr.js} +1 -1
- package/dist/{program-B52FJo5X.js → program-C8M8kVC0.js} +2 -2
- package/dist/{program-context-9FmjmgRi.js → program-context-DNheupaq.js} +1 -1
- package/dist/{prompt-select-styled-7bpPt2PG.js → prompt-select-styled-BfSAWDfm.js} +1 -1
- package/dist/{prompt-select-styled-bL9scez3.js → prompt-select-styled-Qtie1Z5m.js} +1 -1
- package/dist/{provider-auth-helpers-CatlYQ1x.js → provider-auth-helpers-PSez6fyE.js} +1 -1
- package/dist/{provider-auth-helpers-DgQEZQZm.js → provider-auth-helpers-fIKVMJmj.js} +1 -1
- package/dist/{push-apns-Bc0uTUFe.js → push-apns-CZ3x5b7S.js} +1 -1
- package/dist/{push-apns-Dq1z7GKZ.js → push-apns-D4QwEU4o.js} +1 -1
- package/dist/{register.agent-Cjvn_JC_.js → register.agent-CQCSZoM3.js} +1 -1
- package/dist/{register.agent-DZ68nNV_.js → register.agent-CkdmFMol.js} +1 -1
- package/dist/{register.configure-DAq-OZQ_.js → register.configure-CY7jH_t-.js} +1 -1
- package/dist/{register.configure-DNeVIlZk.js → register.configure-jvsFtsEY.js} +1 -1
- package/dist/{register.maintenance-Cx5TbFUH.js → register.maintenance-Cn2-JBxc.js} +1 -1
- package/dist/{register.maintenance-BGD-EdYb.js → register.maintenance-DbdyMqnN.js} +1 -1
- package/dist/{register.message-BVBF2xBA.js → register.message-8Pxm1wyr.js} +1 -1
- package/dist/{register.message-BahjRagK.js → register.message-DxNX0-7A.js} +1 -1
- package/dist/{register.onboard-BYsU9URi.js → register.onboard-BeuVHdxu.js} +1 -1
- package/dist/{register.onboard-CsUvw9JY.js → register.onboard-D9LNxSOp.js} +1 -1
- package/dist/{register.setup-DUGQ3LjU.js → register.setup-AyriKZAD.js} +1 -1
- package/dist/{register.setup-Czz8kiz8.js → register.setup-D6sjApkR.js} +1 -1
- package/dist/{register.status-health-sessions-DwQDXdjY.js → register.status-health-sessions-C3YEi9ej.js} +1 -1
- package/dist/{register.status-health-sessions-C-6pt1vC.js → register.status-health-sessions-DLibm4n2.js} +1 -1
- package/dist/{register.subclis-nr-J0DsM.js → register.subclis-DMwBX73g.js} +1 -1
- package/dist/{reply-Bv0w_dst.js → reply-JaJmymld.js} +6 -6
- package/dist/{run-main-C9SR6tqO.js → run-main-BtJ9Rvkf.js} +1 -1
- package/dist/{server-node-events-DBU3p4Am.js → server-node-events-B1xc0xHC.js} +1 -1
- package/dist/{server-node-events-duTsLOu5.js → server-node-events-DkYb_tMY.js} +1 -1
- package/dist/{slash-dispatch.runtime-BKW0b-z4.js → slash-dispatch.runtime-5FhvH4vs.js} +1 -1
- package/dist/{slash-dispatch.runtime-Dllhj5El.js → slash-dispatch.runtime-8bdhjt7e.js} +1 -1
- package/dist/{slash-dispatch.runtime-BykVo525.js → slash-dispatch.runtime-BSGNAoT3.js} +1 -1
- package/dist/{slash-dispatch.runtime-CwKA-3Mz.js → slash-dispatch.runtime-DzFzghS8.js} +1 -1
- package/dist/{status-BUdDRE9f.js → status-Ln-hRgxh.js} +1 -1
- package/dist/{status-QCEyD_DK.js → status-XJoKJIPd.js} +1 -1
- package/dist/{subagent-registry-runtime-ANqbVbfo.js → subagent-registry-runtime-CMgr0_UE.js} +1 -1
- package/dist/{subagent-registry-runtime-CWrWUjll.js → subagent-registry-runtime-DA3RtD85.js} +1 -1
- package/dist/{subagent-registry-runtime-CA_UwsAM.js → subagent-registry-runtime-DDF1mHS2.js} +1 -1
- package/dist/{subagent-registry-runtime-DjLSmsYn.js → subagent-registry-runtime-DTliYOy2.js} +1 -1
- package/dist/{update-cli-2Prf30Co.js → update-cli-DhZZ9nIA.js} +1 -1
- package/dist/{update-cli-BZ7xaJXP.js → update-cli-T5qjfgGh.js} +1 -1
- package/dist/{update-runner-Dmea_7oZ.js → update-runner-C6Z9RGJ6.js} +1 -1
- package/dist/{update-runner-CzyTP7xB.js → update-runner-DThdoQ9_.js} +1 -1
- package/dist/{web-BYWPQTzp.js → web-BinddLZf.js} +1 -1
- package/dist/{web-B90WZv9Y.js → web-CWJIsRZO.js} +1 -1
- package/dist/{web-DTS3rwm1.js → web-D995jmBq.js} +1 -1
- package/dist/{web-BvZz642s.js → web-F5nE_LwQ.js} +1 -1
- package/package.json +1 -1
- package/preset-config.json +15 -1
- package/docs/competitor-openclaw-analysis.md +0 -390
|
@@ -1,390 +0,0 @@
|
|
|
1
|
-
# 竞品 OpenClaw 包裁剪方案分析
|
|
2
|
-
|
|
3
|
-
> 分析时间:2026-03-23
|
|
4
|
-
> 竞品版本:openclaw@2026.3.13
|
|
5
|
-
> 我们版本:@qqbrowser/openclaw-qbot@0.0.86
|
|
6
|
-
> 竞品安装路径:`/Applications/QClaw.app/Contents/Resources/openclaw/`
|
|
7
|
-
> 我们安装路径:`~/.openclaw-qbot/node/lib/node_modules/@qqbrowser/openclaw-qbot/`
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## 1. 总体数据对比
|
|
12
|
-
|
|
13
|
-
| 维度 | 竞品 (openclaw) | 我们 (@qqbrowser/openclaw-qbot) | 差距 |
|
|
14
|
-
|------|-----------------|--------------------------------|------|
|
|
15
|
-
| **整个安装目录** | **431M** | **675M** | 1.6x |
|
|
16
|
-
| **包自身大小** | 103M | — (包含在总大小中) | — |
|
|
17
|
-
| **node_modules 总大小** | 249M (含 openclaw 103M) | 584M | 2.3x |
|
|
18
|
-
| **node_modules 依赖数量** | 495 | 644 | +149 个 |
|
|
19
|
-
| **dist 目录** | 68M | 56M | 我们更小 ✅ |
|
|
20
|
-
| **extensions 目录** | 17M | 17M | 持平 |
|
|
21
|
-
| **docs 目录** | 15M | 15M | 持平 |
|
|
22
|
-
| **assets 目录** | 1.3M | 1.3M | 持平 |
|
|
23
|
-
| **skills 目录** | 468K | 572K | 接近 |
|
|
24
|
-
|
|
25
|
-
### 关键结论
|
|
26
|
-
|
|
27
|
-
包自身内容(dist/extensions/docs/assets/skills)两边基本一致,**差距主要在 node_modules(依赖)**。
|
|
28
|
-
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
## 2. 竞品的安装架构
|
|
32
|
-
|
|
33
|
-
### 2.1 包装项目模式
|
|
34
|
-
|
|
35
|
-
竞品**没有直接安装 openclaw 包**,而是使用了一个**独立的包装项目**:
|
|
36
|
-
|
|
37
|
-
```json
|
|
38
|
-
// /Applications/QClaw.app/Contents/Resources/openclaw/package.json
|
|
39
|
-
{
|
|
40
|
-
"name": "@guanjia-openclaw/openclaw",
|
|
41
|
-
"version": "0.0.1",
|
|
42
|
-
"private": true,
|
|
43
|
-
"scripts": {
|
|
44
|
-
"postinstall": "npx patch-package"
|
|
45
|
-
},
|
|
46
|
-
"dependencies": {
|
|
47
|
-
"openclaw": "2026.3.13"
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
**优势**:
|
|
53
|
-
- 通过外层 package.json 精确控制安装行为
|
|
54
|
-
- 可使用 `npm install --omit=optional` 跳过可选依赖
|
|
55
|
-
- 安装后可通过脚本做二次清理/prune
|
|
56
|
-
- 利用 `patch-package` 修改参数而不引入新依赖
|
|
57
|
-
|
|
58
|
-
### 2.2 使用 npm 而非 pnpm
|
|
59
|
-
|
|
60
|
-
竞品使用 **npm** 安装(有 `package-lock.json`),而我们用的是 **pnpm**。npm 的扁平化 node_modules 结构在这种场景下更容易做后处理清理。
|
|
61
|
-
|
|
62
|
-
### 2.3 patch-package 调参
|
|
63
|
-
|
|
64
|
-
竞品通过 `patches/openclaw+2026.3.13.patch` 直接修改 dist 中的构建产物,调整运行参数:
|
|
65
|
-
|
|
66
|
-
```diff
|
|
67
|
-
- const BASE_RUN_RETRY_ITERATIONS = 24;
|
|
68
|
-
+ const BASE_RUN_RETRY_ITERATIONS = 0;
|
|
69
|
-
- const RUN_RETRY_ITERATIONS_PER_PROFILE = 8;
|
|
70
|
-
+ const RUN_RETRY_ITERATIONS_PER_PROFILE = 6;
|
|
71
|
-
- const MIN_RUN_RETRY_ITERATIONS = 32;
|
|
72
|
-
- const MAX_RUN_RETRY_ITERATIONS = 160;
|
|
73
|
-
+ const MIN_RUN_RETRY_ITERATIONS = 6;
|
|
74
|
-
+ const MAX_RUN_RETRY_ITERATIONS = 72;
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
### 2.4 config 目录
|
|
78
|
-
|
|
79
|
-
竞品还有一个独立的 `config/` 目录,放置自定义的 `openclaw.json`、扩展和技能配置,与 openclaw 包解耦。
|
|
80
|
-
|
|
81
|
-
---
|
|
82
|
-
|
|
83
|
-
## 3. 依赖差异分析
|
|
84
|
-
|
|
85
|
-
### 3.1 我们有但竞品没有的 dependencies(共 12 个)
|
|
86
|
-
|
|
87
|
-
| 依赖包 | 版本 | 安装大小 | 说明 |
|
|
88
|
-
|--------|------|----------|------|
|
|
89
|
-
| `@anthropic-ai/sandbox-runtime` | ^0.0.42 | 8.4M | 沙箱运行时,会拉入 @cloudflare 等 |
|
|
90
|
-
| `@opentelemetry/api` | 1.9.0 | — | 遥测 API |
|
|
91
|
-
| `@opentelemetry/exporter-metrics-otlp-http` | 0.213.0 | — | 遥测指标导出 |
|
|
92
|
-
| `@opentelemetry/exporter-metrics-otlp-proto` | 0.213.0 | — | 遥测指标导出 |
|
|
93
|
-
| `@opentelemetry/exporter-trace-otlp-proto` | 0.213.0 | — | 遥测追踪导出 |
|
|
94
|
-
| `@opentelemetry/resources` | 2.6.0 | — | 遥测资源 |
|
|
95
|
-
| `@opentelemetry/sdk-metrics` | 2.6.0 | — | 遥测指标 SDK |
|
|
96
|
-
| `@opentelemetry/sdk-trace-base` | 2.6.0 | — | 遥测追踪基础 |
|
|
97
|
-
| `@opentelemetry/sdk-trace-node` | 2.6.0 | — | 遥测追踪 Node |
|
|
98
|
-
| `@opentelemetry/semantic-conventions` | 1.40.0 | — | 遥测语义约定 |
|
|
99
|
-
| `tsx` | ^4.21.0 | — | TS 运行时(会拉入 esbuild) |
|
|
100
|
-
| `uuid` | ^10.0.0 | — | UUID 生成 |
|
|
101
|
-
|
|
102
|
-
**@opentelemetry 系列 9 个包合计安装大小:33M**
|
|
103
|
-
|
|
104
|
-
### 3.2 竞品有但我们没有的 dependencies
|
|
105
|
-
|
|
106
|
-
**无。** 竞品的 55 个 dependencies 是我们 67 个 dependencies 的子集。
|
|
107
|
-
|
|
108
|
-
### 3.3 peerDependencies 对比
|
|
109
|
-
|
|
110
|
-
| 维度 | 竞品 | 我们 |
|
|
111
|
-
|------|------|------|
|
|
112
|
-
| `@napi-rs/canvas` | ✅ peer (^0.1.89) | ✅ peer (^0.1.89) |
|
|
113
|
-
| `node-llama-cpp` | ✅ peer (3.16.2) | ✅ peer (3.16.2) |
|
|
114
|
-
| **peerDependenciesMeta** | ✅ `node-llama-cpp: { optional: true }` | ❌ **没有** |
|
|
115
|
-
|
|
116
|
-
> ⚠️ **关键差异**:竞品通过 `peerDependenciesMeta` 将 `node-llama-cpp` 标记为可选,npm 安装时不会自动安装它。
|
|
117
|
-
|
|
118
|
-
---
|
|
119
|
-
|
|
120
|
-
## 4. 竞品未安装的大依赖(安装后清理/跳过)
|
|
121
|
-
|
|
122
|
-
### 4.1 通过 npm --omit=optional 跳过的可选依赖
|
|
123
|
-
|
|
124
|
-
lockfile 中标记为 `optional` 的包有 **84 个**,其中 **75 个实际未安装**。主要包括:
|
|
125
|
-
|
|
126
|
-
| 包名 | lockfile 中标记 | 实际安装 | 我们是否安装 | 我们的大小 |
|
|
127
|
-
|------|----------------|---------|-------------|-----------|
|
|
128
|
-
| `koffi` | optional: true | ❌ | ✅ | **87M** |
|
|
129
|
-
| `@img/sharp-*` (29个) | optional: true | ❌ | ✅ (当前平台) | **16M** |
|
|
130
|
-
| `@napi-rs/canvas-*` | optional: true | ❌ | ✅ (当前平台) | **26M** |
|
|
131
|
-
| `@node-llama-cpp/*` | optional: true | ❌ | ✅ | **5M** |
|
|
132
|
-
| `@cloudflare/workers-types` | optional: true | ❌ | ✅ | 9.2M |
|
|
133
|
-
| `@lydell/node-pty-*` (平台包) | optional: true | 仅当前平台 | ✅ | — |
|
|
134
|
-
| `@esbuild/*` | optional: true | ❌ | ✅ | 10M |
|
|
135
|
-
|
|
136
|
-
### 4.2 安装后手动删除的包
|
|
137
|
-
|
|
138
|
-
以下包在竞品的 lockfile 中**未标记为 optional**,但实际**不存在于 node_modules** 中,推测是安装后手动删除的:
|
|
139
|
-
|
|
140
|
-
| 包名 | lockfile optional 标记 | 实际安装 | 说明 |
|
|
141
|
-
|------|----------------------|---------|------|
|
|
142
|
-
| `pdfjs-dist` | ❌ (非 optional) | ❌ 不存在 | 安装后被手动删除 |
|
|
143
|
-
| `sharp` | ❌ (非 optional) | ❌ 不存在 | 安装后被手动删除 |
|
|
144
|
-
|
|
145
|
-
> 💡 **推断**:竞品在打包进 App Bundle 前,通过构建脚本删除了 `pdfjs-dist`(40M) 和 `sharp`(含 @img 16M) 等运行时不必要的重包。
|
|
146
|
-
|
|
147
|
-
---
|
|
148
|
-
|
|
149
|
-
## 5. 我们独有的大依赖汇总
|
|
150
|
-
|
|
151
|
-
以下是我们安装了但竞品没有安装的大依赖,按大小排序:
|
|
152
|
-
|
|
153
|
-
| 排名 | 包名 | 大小 | 来源 |
|
|
154
|
-
|------|------|------|------|
|
|
155
|
-
| 1 | `koffi` | **87M** | `@mariozechner/pi-tui` 的 optionalDep |
|
|
156
|
-
| 2 | `pdfjs-dist` | **40M** | 直接 dependency |
|
|
157
|
-
| 3 | `node-llama-cpp` | **35M** | peerDependency(竞品标记为 optional) |
|
|
158
|
-
| 4 | `@opentelemetry/*` (9个包) | **33M** | 我们独有的 dependencies |
|
|
159
|
-
| 5 | `@napi-rs/canvas-darwin-arm64` | **26M** | peerDependency 的平台包 |
|
|
160
|
-
| 6 | `@img/sharp-*` | **16M** | sharp 的 native bindings |
|
|
161
|
-
| 7 | `@octokit/*` | **12M** | @anthropic-ai/sandbox-runtime 传递依赖 |
|
|
162
|
-
| 8 | `@esbuild/darwin-arm64` | **10M** | tsx 传递依赖 |
|
|
163
|
-
| 9 | `@cloudflare/*` | **9.2M** | @anthropic-ai/sandbox-runtime 传递依赖 |
|
|
164
|
-
| 10 | `@anthropic-ai/sandbox-runtime` | **8.4M** | 我们独有的 dependency |
|
|
165
|
-
| 11 | `@types/*` | **8.0M** | 类型声明(生产环境不需要) |
|
|
166
|
-
| 12 | `@node-llama-cpp/*` | **5.0M** | node-llama-cpp 的平台包 |
|
|
167
|
-
| | **合计** | **~290M** | |
|
|
168
|
-
|
|
169
|
-
---
|
|
170
|
-
|
|
171
|
-
## 6. 竞品 node_modules 大小 TOP 15
|
|
172
|
-
|
|
173
|
-
| 排名 | 包名 | 大小 |
|
|
174
|
-
|------|------|------|
|
|
175
|
-
| 1 | openclaw (包自身) | 103M |
|
|
176
|
-
| 2 | @mariozechner/* | 14M |
|
|
177
|
-
| 3 | @google/genai | 11M |
|
|
178
|
-
| 4 | @larksuiteoapi/node-sdk | 10M |
|
|
179
|
-
| 5 | playwright-core | 8M |
|
|
180
|
-
| 6 | openai | 7M |
|
|
181
|
-
| 7 | @whiskeysockets/baileys | 7M |
|
|
182
|
-
| 8 | web-streams-polyfill | 6M |
|
|
183
|
-
| 9 | @mistralai/mistralai | 6M |
|
|
184
|
-
| 10 | @line/bot-sdk | 6M |
|
|
185
|
-
| 11 | zod | 5M |
|
|
186
|
-
| 12 | @aws-sdk/* | 4M |
|
|
187
|
-
| 13 | highlight.js | 3M |
|
|
188
|
-
| 14 | @sinclair/typebox | 3M |
|
|
189
|
-
| 15 | @silvia-odwyer/photon-node | 3M |
|
|
190
|
-
|
|
191
|
-
> 竞品最大的非 openclaw 包仅 14M,没有任何超大的 native 依赖。
|
|
192
|
-
|
|
193
|
-
---
|
|
194
|
-
|
|
195
|
-
## 7. 裁剪策略总结
|
|
196
|
-
|
|
197
|
-
```
|
|
198
|
-
竞品裁剪方案
|
|
199
|
-
├── 1. 包装项目架构
|
|
200
|
-
│ ├── 用独立的 private package.json 包装 openclaw
|
|
201
|
-
│ ├── 使用 npm (非 pnpm) 安装
|
|
202
|
-
│ └── 可控的安装参数 (--omit=optional)
|
|
203
|
-
│
|
|
204
|
-
├── 2. 依赖精简(少了 12 个 dependencies)
|
|
205
|
-
│ ├── 不声明 @opentelemetry/* (9个包,33M)
|
|
206
|
-
│ ├── 不声明 @anthropic-ai/sandbox-runtime (8.4M + 传递依赖 21M)
|
|
207
|
-
│ ├── 不声明 tsx (传递拉入 @esbuild 10M)
|
|
208
|
-
│ └── 不声明 uuid
|
|
209
|
-
│
|
|
210
|
-
├── 3. peerDependenciesMeta 控制
|
|
211
|
-
│ └── node-llama-cpp 标记为 optional: true (35M + @node-llama-cpp 5M)
|
|
212
|
-
│
|
|
213
|
-
├── 4. npm --omit=optional 跳过可选依赖
|
|
214
|
-
│ ├── koffi (87M) - @mariozechner/pi-tui 的 optionalDep
|
|
215
|
-
│ ├── @img/sharp-* (16M) - sharp 的 native bindings
|
|
216
|
-
│ ├── @napi-rs/canvas-* (26M) - peerDep 的平台包
|
|
217
|
-
│ ├── @esbuild/* (10M)
|
|
218
|
-
│ └── @cloudflare/workers-types (9.2M)
|
|
219
|
-
│
|
|
220
|
-
├── 5. 安装后手动删除
|
|
221
|
-
│ ├── pdfjs-dist (40M) - 声明了但安装后删除
|
|
222
|
-
│ └── sharp (含 native,声明了但安装后删除)
|
|
223
|
-
│
|
|
224
|
-
└── 6. patch-package 调参
|
|
225
|
-
└── 修改 dist 中的运行参数,无需引入额外依赖
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
---
|
|
229
|
-
|
|
230
|
-
## 8. 我们的优化建议
|
|
231
|
-
|
|
232
|
-
### P0 - 立即可做(预计节省 ~200M)
|
|
233
|
-
|
|
234
|
-
#### 8.1 添加 peerDependenciesMeta
|
|
235
|
-
|
|
236
|
-
在 `package.json` 中添加:
|
|
237
|
-
|
|
238
|
-
```json
|
|
239
|
-
"peerDependenciesMeta": {
|
|
240
|
-
"node-llama-cpp": {
|
|
241
|
-
"optional": true
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
**预计节省**:~40M(node-llama-cpp 35M + @node-llama-cpp 5M)
|
|
247
|
-
|
|
248
|
-
#### 8.2 安装时使用 --omit=optional
|
|
249
|
-
|
|
250
|
-
安装命令改为:
|
|
251
|
-
|
|
252
|
-
```bash
|
|
253
|
-
npm install --omit=optional
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
或配置 `.npmrc`:
|
|
257
|
-
|
|
258
|
-
```ini
|
|
259
|
-
optional=false
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
**预计节省**:~148M(koffi 87M + @img 16M + @napi-rs 26M + @esbuild 10M + @cloudflare 9M)
|
|
263
|
-
|
|
264
|
-
### P1 - 需要代码改动(预计节省 ~74M)
|
|
265
|
-
|
|
266
|
-
#### 8.3 将 @opentelemetry/* 改为可选/动态加载
|
|
267
|
-
|
|
268
|
-
将 9 个 @opentelemetry 包从 `dependencies` 移除,改为动态 `import()` 按需加载:
|
|
269
|
-
|
|
270
|
-
```typescript
|
|
271
|
-
// 改为运行时按需加载
|
|
272
|
-
let otel: typeof import('@opentelemetry/api') | undefined;
|
|
273
|
-
try {
|
|
274
|
-
otel = await import('@opentelemetry/api');
|
|
275
|
-
} catch {
|
|
276
|
-
// OpenTelemetry 不可用,静默降级
|
|
277
|
-
}
|
|
278
|
-
```
|
|
279
|
-
|
|
280
|
-
**预计节省**:33M
|
|
281
|
-
|
|
282
|
-
#### 8.4 移除 @anthropic-ai/sandbox-runtime
|
|
283
|
-
|
|
284
|
-
从 `dependencies` 中移除,改为可选或运行时按需安装。
|
|
285
|
-
|
|
286
|
-
**预计节省**:8.4M 直接 + ~21M 传递依赖(@octokit 12M + @cloudflare 9.2M)
|
|
287
|
-
|
|
288
|
-
#### 8.5 移除 tsx
|
|
289
|
-
|
|
290
|
-
构建后不再需要 TypeScript 运行时,`tsx` 会拉入 `esbuild`。
|
|
291
|
-
|
|
292
|
-
**预计节省**:~10M
|
|
293
|
-
|
|
294
|
-
### P2 - 安装后清理(预计节省 ~56M)
|
|
295
|
-
|
|
296
|
-
#### 8.6 安装后删除 pdfjs-dist 和 sharp
|
|
297
|
-
|
|
298
|
-
学习竞品做法,如果这两个包在桌面端不需要,安装后手动删除:
|
|
299
|
-
|
|
300
|
-
```bash
|
|
301
|
-
rm -rf node_modules/pdfjs-dist # 40M
|
|
302
|
-
rm -rf node_modules/sharp # 含 native
|
|
303
|
-
rm -rf node_modules/@img # 16M
|
|
304
|
-
```
|
|
305
|
-
|
|
306
|
-
**预计节省**:~56M
|
|
307
|
-
|
|
308
|
-
#### 8.7 清理 @types/* 和 bun-types
|
|
309
|
-
|
|
310
|
-
生产安装中不需要类型声明包:
|
|
311
|
-
|
|
312
|
-
```bash
|
|
313
|
-
rm -rf node_modules/@types # 8M
|
|
314
|
-
```
|
|
315
|
-
|
|
316
|
-
**预计节省**:~8M
|
|
317
|
-
|
|
318
|
-
### P3 - 架构优化
|
|
319
|
-
|
|
320
|
-
#### 8.8 采用包装项目模式
|
|
321
|
-
|
|
322
|
-
学习竞品,用独立的安装 package.json 精确控制依赖树:
|
|
323
|
-
|
|
324
|
-
```json
|
|
325
|
-
{
|
|
326
|
-
"name": "@qqbrowser/openclaw-wrapper",
|
|
327
|
-
"private": true,
|
|
328
|
-
"scripts": {
|
|
329
|
-
"postinstall": "npx patch-package"
|
|
330
|
-
},
|
|
331
|
-
"dependencies": {
|
|
332
|
-
"@qqbrowser/openclaw-qbot": "0.0.86"
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
```
|
|
336
|
-
|
|
337
|
-
### 优化效果预估
|
|
338
|
-
|
|
339
|
-
| 优先级 | 措施 | 预计节省 | 实施难度 |
|
|
340
|
-
|--------|------|----------|----------|
|
|
341
|
-
| P0 | peerDependenciesMeta + --omit=optional | ~188M | 低 |
|
|
342
|
-
| P1 | 移除 @opentelemetry/sandbox-runtime/tsx | ~74M | 中 |
|
|
343
|
-
| P2 | 安装后清理 pdfjs-dist/sharp/@types | ~64M | 低 |
|
|
344
|
-
| P3 | 包装项目架构 | 整体可控 | 中 |
|
|
345
|
-
| **总计** | | **~326M** | |
|
|
346
|
-
|
|
347
|
-
优化后预计总安装大小:**675M - 326M ≈ 349M**,接近竞品的 431M 水平。
|
|
348
|
-
|
|
349
|
-
---
|
|
350
|
-
|
|
351
|
-
## 附录 A:竞品目录结构
|
|
352
|
-
|
|
353
|
-
```
|
|
354
|
-
/Applications/QClaw.app/Contents/Resources/openclaw/
|
|
355
|
-
├── config/
|
|
356
|
-
│ ├── extensions/ # 扩展配置
|
|
357
|
-
│ ├── skills/ # 技能配置
|
|
358
|
-
│ └── openclaw.json # 主配置文件
|
|
359
|
-
├── node_modules/ # 249M, 495 个依赖
|
|
360
|
-
│ ├── openclaw/ # 103M (包自身)
|
|
361
|
-
│ │ ├── dist/ # 68M
|
|
362
|
-
│ │ ├── extensions/ # 17M
|
|
363
|
-
│ │ ├── docs/ # 15M
|
|
364
|
-
│ │ ├── assets/ # 1.3M
|
|
365
|
-
│ │ ├── skills/ # 468K
|
|
366
|
-
│ │ └── openclaw.mjs # 4K (入口)
|
|
367
|
-
│ ├── @mariozechner/* # 14M
|
|
368
|
-
│ ├── @google/genai # 11M
|
|
369
|
-
│ └── ... (其余 ~146M)
|
|
370
|
-
├── patches/
|
|
371
|
-
│ └── openclaw+2026.3.13.patch # 参数调整补丁
|
|
372
|
-
├── package.json # 包装项目
|
|
373
|
-
└── package-lock.json # npm lock 文件
|
|
374
|
-
```
|
|
375
|
-
|
|
376
|
-
## 附录 B:files 字段对比
|
|
377
|
-
|
|
378
|
-
| 竞品 | 我们 |
|
|
379
|
-
|------|------|
|
|
380
|
-
| CHANGELOG.md | CHANGELOG.md |
|
|
381
|
-
| LICENSE | LICENSE |
|
|
382
|
-
| openclaw.mjs | openclaw.mjs |
|
|
383
|
-
| README-header.png | **preset-config.json** ← 我们独有 |
|
|
384
|
-
| README.md | README-header.png |
|
|
385
|
-
| assets/ | README.md |
|
|
386
|
-
| dist/ | assets/ |
|
|
387
|
-
| docs/ | dist/ |
|
|
388
|
-
| extensions/ | docs/ |
|
|
389
|
-
| skills/ | extensions/ |
|
|
390
|
-
| | skills/ |
|