@zlr_236/popo 0.0.1

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/index.ts ADDED
@@ -0,0 +1,53 @@
1
+ import type { OpenClawPluginApi } from "openclaw/plugin-sdk";
2
+ import { emptyPluginConfigSchema } from "openclaw/plugin-sdk";
3
+ import { popoPlugin } from "./src/channel.js";
4
+ import { setPopoRuntime } from "./src/runtime.js";
5
+
6
+ export { monitorPopoProvider } from "./src/monitor.js";
7
+ export {
8
+ sendMessagePopo,
9
+ sendRichTextPopo,
10
+ sendCardPopo,
11
+ createStreamCardPopo,
12
+ updateStreamCardPopo,
13
+ updateInstructionVariableOptions,
14
+ } from "./src/send.js";
15
+ export {
16
+ uploadImagePopo,
17
+ uploadFilePopo,
18
+ sendImagePopo,
19
+ sendFilePopo,
20
+ sendMediaPopo,
21
+ recallMessagePopo,
22
+ getMessageReadAckPopo,
23
+ configureCardCallbackPopo,
24
+ downloadMessageFilePopo,
25
+ registerFileUploadPopo,
26
+ } from "./src/media.js";
27
+ export { probePopo } from "./src/probe.js";
28
+ export { popoPlugin } from "./src/channel.js";
29
+ export {
30
+ createTeam,
31
+ inviteToTeam,
32
+ dropTeam,
33
+ getTeamMembers,
34
+ getTeamInfo,
35
+ updateTeamInfo,
36
+ updateTeamManagement,
37
+ getViewScope,
38
+ modifyViewScope,
39
+ publishRobot,
40
+ } from "./src/team.js";
41
+
42
+ const plugin = {
43
+ id: "popo",
44
+ name: "POPO",
45
+ description: "POPO channel plugin",
46
+ configSchema: emptyPluginConfigSchema(),
47
+ register(api: OpenClawPluginApi) {
48
+ setPopoRuntime(api.runtime);
49
+ api.registerChannel({ plugin: popoPlugin });
50
+ },
51
+ };
52
+
53
+ export default plugin;
@@ -0,0 +1,10 @@
1
+ {
2
+ "id": "popo",
3
+ "channels": ["popo"],
4
+ "skills": ["./skills"],
5
+ "configSchema": {
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "properties": {}
9
+ }
10
+ }
package/package.json ADDED
@@ -0,0 +1,66 @@
1
+ {
2
+ "name": "@zlr_236/popo",
3
+ "version": "0.0.1",
4
+ "type": "module",
5
+ "description": "OpenClaw POPO channel plugin",
6
+ "license": "MIT",
7
+ "files": [
8
+ "index.ts",
9
+ "src",
10
+ "skills",
11
+ "openclaw.plugin.json"
12
+ ],
13
+ "author": {
14
+ "name": "Hengheng Shen",
15
+ "email": "1048157315@qq.com"
16
+ },
17
+ "publishConfig": {
18
+ "cache": "~/.npm",
19
+ "access": "public"
20
+ },
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "git+https://github.com/m1heng/clawdbot-feishu.git"
24
+ },
25
+ "keywords": [
26
+ "openclaw",
27
+ "popo",
28
+ "netease",
29
+ "chatbot",
30
+ "ai",
31
+ "claude"
32
+ ],
33
+ "openclaw": {
34
+ "extensions": [
35
+ "./index.ts"
36
+ ],
37
+ "channel": {
38
+ "id": "popo",
39
+ "label": "POPO",
40
+ "selectionLabel": "POPO (网易)",
41
+ "docsPath": "/channels/popo",
42
+ "docsLabel": "popo",
43
+ "blurb": "POPO enterprise messaging.",
44
+ "aliases": [],
45
+ "order": 80
46
+ },
47
+ "install": {
48
+ "npmSpec": "@zlr_236/popo",
49
+ "localPath": ".",
50
+ "defaultChoice": "npm"
51
+ }
52
+ },
53
+ "dependencies": {
54
+ "@sinclair/typebox": "^0.34.48",
55
+ "zod": "^4.3.6"
56
+ },
57
+ "devDependencies": {
58
+ "@types/node": "^25.0.10",
59
+ "openclaw": "2026.1.29",
60
+ "tsx": "^4.21.0",
61
+ "typescript": "^5.7.0"
62
+ },
63
+ "peerDependencies": {
64
+ "openclaw": ">=2026.1.29"
65
+ }
66
+ }
@@ -0,0 +1,195 @@
1
+ ---
2
+ name: popo-admin
3
+ description: |
4
+ POPO robot administration operations. Activate when user mentions robot visibility, publishing, or admin settings.
5
+ ---
6
+
7
+ # POPO Admin Tool
8
+
9
+ Manage robot visibility scope and publishing.
10
+
11
+ ## Overview
12
+
13
+ POPO admin operations support:
14
+ - Query robot visibility scope (who can see/use the robot)
15
+ - Modify visibility scope (add/remove users or departments)
16
+ - Apply to publish robot changes
17
+
18
+ ## Actions
19
+
20
+ ### Get View Scope
21
+
22
+ Query the current visibility scope of the robot.
23
+
24
+ ```json
25
+ {
26
+ "action": "view-scope",
27
+ "scopeType": "PERSONAL",
28
+ "current": 1,
29
+ "limit": 10
30
+ }
31
+ ```
32
+
33
+ **Parameters:**
34
+ - `scopeType` (optional): "PERSONAL" (default) or "DEPARTMENT"
35
+ - `current` (optional): Current page, default 1
36
+ - `limit` (optional): Page size, default 10
37
+
38
+ **Response:**
39
+ ```json
40
+ {
41
+ "ok": true,
42
+ "records": [
43
+ {
44
+ "scopeType": "PERSONAL",
45
+ "scopeValue": "user@corp.netease.com"
46
+ },
47
+ {
48
+ "scopeType": "DEPARTMENT",
49
+ "scopeValue": "D001"
50
+ }
51
+ ],
52
+ "viewScopeType": 2,
53
+ "total": 2,
54
+ "current": 1
55
+ }
56
+ ```
57
+
58
+ **View Scope Types:**
59
+ - `1` - All visible (全员可见)
60
+ - `2` - Partial visible (部分可见)
61
+
62
+ ### Modify View Scope
63
+
64
+ Add or remove users/departments from robot visibility scope.
65
+
66
+ ```json
67
+ {
68
+ "action": "modify-view-scope",
69
+ "operationType": 1,
70
+ "scopeType": "PERSONAL",
71
+ "scopeValues": ["user1@corp.netease.com", "user2@corp.netease.com"]
72
+ }
73
+ ```
74
+
75
+ **Parameters:**
76
+ - `operationType` (required): 1=add, 2=delete
77
+ - `scopeType` (required): "PERSONAL" or "DEPARTMENT"
78
+ - `scopeValues` (required): Array of emails or department IDs
79
+
80
+ **Response:**
81
+ ```json
82
+ {
83
+ "ok": true,
84
+ "successNum": 2,
85
+ "failNum": 0,
86
+ "failMsg": {}
87
+ }
88
+ ```
89
+
90
+ **Notes:**
91
+ - To delete scope, the user/department must have been explicitly added before
92
+ - Cannot modify "all visible" scope directly - must be partial visible first
93
+ - Changes require publishing to take effect
94
+
95
+ ### Publish Robot
96
+
97
+ Apply to publish robot visibility changes (requires admin approval).
98
+
99
+ ```json
100
+ {
101
+ "action": "publish-robot",
102
+ "uid": "admin@corp.netease.com"
103
+ }
104
+ ```
105
+
106
+ **Parameters:**
107
+ - `uid` (required): Applicant email (must be robot creator or admin)
108
+
109
+ **Notes:**
110
+ - After modifying visibility scope, you must call publish for changes to take effect
111
+ - Publishing requires admin approval
112
+ - New visibility scope will be merged with existing scope
113
+
114
+ ## Examples
115
+
116
+ ### Add users to visibility scope
117
+
118
+ ```json
119
+ {
120
+ "action": "modify-view-scope",
121
+ "operationType": 1,
122
+ "scopeType": "PERSONAL",
123
+ "scopeValues": [
124
+ "pm@corp.netease.com",
125
+ "dev1@corp.netease.com",
126
+ "dev2@corp.netease.com"
127
+ ]
128
+ }
129
+ ```
130
+
131
+ ### Add department to visibility scope
132
+
133
+ ```json
134
+ {
135
+ "action": "modify-view-scope",
136
+ "operationType": 1,
137
+ "scopeType": "DEPARTMENT",
138
+ "scopeValues": ["D001", "D002"]
139
+ }
140
+ ```
141
+
142
+ ### Remove user from scope
143
+
144
+ ```json
145
+ {
146
+ "action": "modify-view-scope",
147
+ "operationType": 2,
148
+ "scopeType": "PERSONAL",
149
+ "scopeValues": ["former@corp.netease.com"]
150
+ }
151
+ ```
152
+
153
+ ### Query current scope
154
+
155
+ ```json
156
+ {
157
+ "action": "view-scope",
158
+ "scopeType": "PERSONAL",
159
+ "limit": 50
160
+ }
161
+ ```
162
+
163
+ ### Publish changes
164
+
165
+ ```json
166
+ {
167
+ "action": "publish-robot",
168
+ "uid": "creator@corp.netease.com"
169
+ }
170
+ ```
171
+
172
+ ## Configuration
173
+
174
+ ```yaml
175
+ channels:
176
+ popo:
177
+ enabled: true
178
+ appKey: "your_app_key"
179
+ appSecret: "your_app_secret"
180
+ token: "your_token"
181
+ aesKey: "your_aes_key"
182
+ ```
183
+
184
+ ## Important Notes
185
+
186
+ - Visibility changes require admin approval via `publish-robot`
187
+ - Cannot modify scope if robot is set to "all visible"
188
+ - When deleting scope, the target must have been explicitly added
189
+ - Publishing merges new scope with existing approved scope
190
+
191
+ ## API Reference
192
+
193
+ - Get view scope: `POST /open-apis/robots/v1/view-scope`
194
+ - Modify view scope: `POST /open-apis/robots/v1/view-scope/modify`
195
+ - Publish robot: `POST /open-apis/robots/v1/view-scope/publish`