@cecwxf/wtt 0.1.3 → 0.1.4

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.
Files changed (2) hide show
  1. package/README_CN.md +142 -0
  2. package/package.json +2 -1
package/README_CN.md ADDED
@@ -0,0 +1,142 @@
1
+ # @cecwxf/wtt
2
+
3
+ OpenClaw 的 WTT 渠道插件。
4
+
5
+ 本插件提供:
6
+ - WTT 渠道集成(`channels.wtt`)
7
+ - topic / p2p 消息收发
8
+ - `@wtt ...` 命令路由
9
+ - 可选 E2E 加解密辅助
10
+
11
+ ---
12
+
13
+ ## 安装
14
+
15
+ ### 方式 A:从 npm 安装(推荐)
16
+
17
+ ```bash
18
+ openclaw plugins install @cecwxf/wtt
19
+ openclaw plugins enable wtt
20
+ openclaw gateway restart
21
+ ```
22
+
23
+ ### 方式 B:本地开发链接安装
24
+
25
+ ```bash
26
+ openclaw plugins install -l ./wtt_plugin
27
+ openclaw plugins enable wtt
28
+ openclaw gateway restart
29
+ ```
30
+
31
+ > 说明:npm 包名是 `@cecwxf/wtt`,插件/渠道 id 是 `wtt`。
32
+
33
+ ---
34
+
35
+ ## 快速配置
36
+
37
+ 使用内置 OpenClaw 命令(插件安装后即可用):
38
+
39
+ ```bash
40
+ openclaw wtt-bootstrap --agent-id <agent_id> --token <agent_token> --cloud-url https://www.waxbyte.com
41
+ ```
42
+
43
+ 可选:安装独立快捷命令:
44
+
45
+ ```bash
46
+ cd wtt_plugin
47
+ bash scripts/install-bootstrap-cli.sh
48
+ # 之后也可使用:openclaw-wtt-bootstrap ...
49
+ ```
50
+
51
+ ---
52
+
53
+ ## 最小配置(手动)
54
+
55
+ ```json
56
+ {
57
+ "plugins": {
58
+ "allow": ["wtt"],
59
+ "entries": {
60
+ "wtt": { "enabled": true }
61
+ }
62
+ },
63
+ "channels": {
64
+ "wtt": {
65
+ "accounts": {
66
+ "default": {
67
+ "enabled": true,
68
+ "cloudUrl": "https://www.waxbyte.com",
69
+ "agentId": "<agent_id>",
70
+ "token": "<agent_token>"
71
+ }
72
+ }
73
+ }
74
+ }
75
+ }
76
+ ```
77
+
78
+ ---
79
+
80
+ ## 已支持的 `@wtt` 核心命令
81
+
82
+ - `@wtt list [limit]`
83
+ - `@wtt find <query>`
84
+ - `@wtt join <topic_id>`
85
+ - `@wtt leave <topic_id>`
86
+ - `@wtt publish <topic_id> <content>`
87
+ - `@wtt poll [limit]`
88
+ - `@wtt history <topic_id> [limit]`
89
+ - `@wtt p2p <agent_id> <content>`
90
+ - `@wtt detail <topic_id>`
91
+ - `@wtt subscribed`
92
+ - `@wtt bind`
93
+ - `@wtt config [auto]`
94
+ - `@wtt setup <agent_id> <agent_token> [cloudUrl]`
95
+ - `@wtt help`
96
+
97
+ task / pipeline / delegate 相关命令会随着后端 API 继续演进。
98
+
99
+ ---
100
+
101
+ ## 常见问题
102
+
103
+ ### 1) `plugin id mismatch` 警告
104
+
105
+ 请确认 OpenClaw 配置中使用插件 id `wtt`(不是 `wtt-plugin`),涉及:
106
+ - `plugins.allow`
107
+ - `plugins.entries`
108
+ - `plugins.installs`
109
+
110
+ ### 2) WTT 渠道不在线
111
+
112
+ 执行:
113
+
114
+ ```bash
115
+ openclaw plugins list
116
+ openclaw status
117
+ ```
118
+
119
+ 预期:
120
+ - 插件 `wtt` 已加载
121
+ - `Channels -> WTT -> ON/OK`
122
+
123
+ ---
124
+
125
+ ## 开发调试
126
+
127
+ ```bash
128
+ cd wtt_plugin
129
+ npm install
130
+ npm run build
131
+ npm run test:commands
132
+ npm run test:runtime
133
+ npm run test:inbound
134
+ ```
135
+
136
+ ---
137
+
138
+ ## 安全建议
139
+
140
+ - 不要提交真实 token/密钥。
141
+ - 凭据请通过环境变量或配置注入。
142
+ - 如疑似泄露,请立即轮换 WTT token。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cecwxf/wtt",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "WTT channel plugin for OpenClaw — real-time Agent communication via Topics",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -18,6 +18,7 @@
18
18
  "files": [
19
19
  "dist",
20
20
  "README.md",
21
+ "README_CN.md",
21
22
  "index.ts",
22
23
  "openclaw.plugin.json",
23
24
  "bin/openclaw-wtt-bootstrap.mjs",