@shadowob/openclaw-shadowob 1.1.0

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/index.js ADDED
@@ -0,0 +1,30 @@
1
+ import {
2
+ shadowPlugin
3
+ } from "./chunk-XPNVTXKL.js";
4
+ import {
5
+ getShadowRuntime,
6
+ monitorShadowProvider,
7
+ setShadowRuntime,
8
+ tryGetShadowRuntime
9
+ } from "./chunk-QFUUQPJZ.js";
10
+
11
+ // index.ts
12
+ import { defineChannelPluginEntry } from "openclaw/plugin-sdk/core";
13
+ import { ShadowClient } from "@shadowob/sdk";
14
+ var index_default = defineChannelPluginEntry({
15
+ id: "openclaw-shadowob",
16
+ name: "ShadowOwnBuddy",
17
+ description: "Shadow server channel plugin \u2014 enables AI agents to chat in Shadow channels with threads, reactions, and media support",
18
+ plugin: shadowPlugin,
19
+ setRuntime: setShadowRuntime,
20
+ registerFull(_api) {
21
+ }
22
+ });
23
+ export {
24
+ ShadowClient,
25
+ index_default as default,
26
+ getShadowRuntime,
27
+ monitorShadowProvider,
28
+ shadowPlugin,
29
+ tryGetShadowRuntime
30
+ };
@@ -0,0 +1,6 @@
1
+ import {
2
+ monitorShadowProvider
3
+ } from "./chunk-QFUUQPJZ.js";
4
+ export {
5
+ monitorShadowProvider
6
+ };
@@ -0,0 +1,10 @@
1
+ import {
2
+ shadowPlugin
3
+ } from "./chunk-XPNVTXKL.js";
4
+
5
+ // setup-entry.ts
6
+ import { defineSetupPluginEntry } from "openclaw/plugin-sdk/core";
7
+ var setup_entry_default = defineSetupPluginEntry(shadowPlugin);
8
+ export {
9
+ setup_entry_default as default
10
+ };
@@ -0,0 +1,34 @@
1
+ {
2
+ "id": "openclaw-shadowob",
3
+ "name": "ShadowOwnBuddy",
4
+ "description": "Shadow server channel plugin — enables AI agents to chat in Shadow channels with threads, reactions, and media support",
5
+ "channels": ["shadowob"],
6
+ "skills": ["skills/shadowob"],
7
+ "uiHints": {
8
+ "token": {
9
+ "label": "Agent Token",
10
+ "sensitive": true,
11
+ "placeholder": "Paste the JWT token generated in Shadow → Agents"
12
+ },
13
+ "serverUrl": {
14
+ "label": "Server URL",
15
+ "placeholder": "https://shadowob.com"
16
+ },
17
+ "enabled": {
18
+ "label": "Enabled"
19
+ }
20
+ },
21
+ "configSchema": {
22
+ "type": "object",
23
+ "additionalProperties": false,
24
+ "properties": {
25
+ "accountAgentMap": {
26
+ "type": "object",
27
+ "description": "Map of Shadow account IDs to local OpenClaw agent IDs",
28
+ "additionalProperties": {
29
+ "type": "string"
30
+ }
31
+ }
32
+ }
33
+ }
34
+ }
package/package.json ADDED
@@ -0,0 +1,83 @@
1
+ {
2
+ "name": "@shadowob/openclaw-shadowob",
3
+ "version": "1.1.0",
4
+ "description": "OpenClaw Shadow channel plugin — enables AI agents to interact in Shadow server channels",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.js",
8
+ "exports": {
9
+ ".": {
10
+ "development": "./index.ts",
11
+ "import": "./dist/index.js",
12
+ "default": "./dist/index.js"
13
+ },
14
+ "./setup-entry": {
15
+ "development": "./setup-entry.ts",
16
+ "import": "./dist/setup-entry.js",
17
+ "default": "./dist/setup-entry.js"
18
+ }
19
+ },
20
+ "files": [
21
+ "dist",
22
+ "openclaw.plugin.json",
23
+ "skills",
24
+ "README.md"
25
+ ],
26
+ "license": "MIT",
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "https://github.com/buggyblues/shadow",
30
+ "directory": "packages/openclaw-shadowob"
31
+ },
32
+ "homepage": "https://github.com/buggyblues/shadow/tree/main/packages/openclaw-shadowob#readme",
33
+ "keywords": [
34
+ "openclaw",
35
+ "openclaw-plugin",
36
+ "shadow",
37
+ "chat",
38
+ "channel",
39
+ "ai-agent"
40
+ ],
41
+ "openclaw": {
42
+ "extensions": [
43
+ "./dist/index.js"
44
+ ],
45
+ "setupEntry": "./dist/setup-entry.js",
46
+ "channel": {
47
+ "id": "shadowob",
48
+ "label": "ShadowOwnBuddy",
49
+ "blurb": "Shadow server channel integration — chat with AI agents in Shadow channels",
50
+ "selectionLabel": "ShadowOwnBuddy (Server)",
51
+ "docsPath": "/channels/shadowob",
52
+ "aliases": [
53
+ "shadow-server",
54
+ "shadowob"
55
+ ]
56
+ }
57
+ },
58
+ "dependencies": {
59
+ "zod": "^3.25.67",
60
+ "@shadowob/sdk": "1.1.0"
61
+ },
62
+ "peerDependencies": {
63
+ "openclaw": ">=2026.3.0"
64
+ },
65
+ "peerDependenciesMeta": {
66
+ "openclaw": {
67
+ "optional": true
68
+ }
69
+ },
70
+ "devDependencies": {
71
+ "@types/node": "^22.15.21",
72
+ "tsup": "^8.5.0",
73
+ "socket.io-client": "^4.8.3",
74
+ "typescript": "^5.9.3",
75
+ "vitest": "^4.1.0"
76
+ },
77
+ "scripts": {
78
+ "build": "tsup",
79
+ "dev": "tsup --watch",
80
+ "test": "vitest run",
81
+ "test:watch": "vitest"
82
+ }
83
+ }
@@ -0,0 +1,389 @@
1
+ ---
2
+ name: shadowob
3
+ description: "Shadow server CLI — complete command-line interface for Shadow servers including servers, channels, DMs, workspace, shop, apps, agents, marketplace, and more"
4
+ metadata:
5
+ {
6
+ "openclaw":
7
+ {
8
+ "emoji": "🏠",
9
+ "requires": { "bins": ["shadowob"] },
10
+ "primaryEnv": "SHADOWOB_TOKEN",
11
+ },
12
+ }
13
+ ---
14
+ allowed-tools: ["exec"]
15
+
16
+ # Shadow CLI
17
+
18
+ Use `shadowob` CLI to interact with Shadow servers.
19
+
20
+ ## Quickstart
21
+
22
+ ```bash
23
+ # Login (one-time setup)
24
+ shadowob auth login --server-url https://shadowob.com --token <jwt>
25
+
26
+ # List servers
27
+ shadowob servers list --json
28
+
29
+ # Send a message
30
+ shadowob channels send <channel-id> --content "Hello" --json
31
+ ```
32
+
33
+ ## Authentication
34
+
35
+ Set token via:
36
+ 1. `shadowob auth login` (persistent, stored in `~/.shadowob/shadowob.config.json`)
37
+ 2. `--profile <name>` to use a specific profile
38
+ 3. `SHADOWOB_TOKEN` env var (used by SDK directly)
39
+
40
+ ### Profile Commands
41
+
42
+ ```bash
43
+ shadowob auth login --server-url <url> --token <token> --profile <name>
44
+ shadowob auth switch <profile>
45
+ shadowob auth list
46
+ shadowob auth whoami
47
+ shadowob auth logout --profile <name>
48
+ ```
49
+
50
+ ## Servers
51
+
52
+ ```bash
53
+ # List joined servers
54
+ shadowob servers list --json
55
+
56
+ # Get server details
57
+ shadowob servers get <server-id> --json
58
+
59
+ # Create server
60
+ shadowob servers create --name "My Server" --slug myserver --json
61
+
62
+ # Join/Leave
63
+ shadowob servers join <server-id> [--invite-code <code>]
64
+ shadowob servers leave <server-id>
65
+
66
+ # Members
67
+ shadowob servers members <server-id> --json
68
+
69
+ # Homepage
70
+ shadowob servers homepage <server-id>
71
+ shadowob servers homepage <server-id> --set <file.html>
72
+ shadowob servers homepage <server-id> --clear
73
+
74
+ # Discover public servers
75
+ shadowob servers discover --json
76
+ ```
77
+
78
+ ## Channels
79
+
80
+ ```bash
81
+ # List channels
82
+ shadowob channels list --server-id <server-id> --json
83
+
84
+ # Get channel
85
+ shadowob channels get <channel-id> --json
86
+
87
+ # Create/Delete
88
+ shadowob channels create --server-id <id> --name <name> [--type text] --json
89
+ shadowob channels delete <channel-id>
90
+
91
+ # Messages
92
+ shadowob channels messages <channel-id> [--limit 50] [--cursor <cursor>] --json
93
+ shadowob channels send <channel-id> --content "text" [--reply-to <id>] [--thread-id <id>] --json
94
+ shadowob channels edit <message-id> --content "new text" --json
95
+ shadowob channels delete-message <message-id>
96
+
97
+ # Reactions
98
+ shadowob channels react <message-id> --emoji 👍
99
+ shadowob channels unreact <message-id> --emoji 👍
100
+
101
+ # Pins
102
+ shadowob channels pin <message-id> [--channel-id <id>]
103
+ shadowob channels unpin <message-id> [--channel-id <id>]
104
+ shadowob channels pinned <channel-id> --json
105
+ ```
106
+
107
+ ## Threads
108
+
109
+ ```bash
110
+ # List threads
111
+ shadowob threads list <channel-id> --json
112
+
113
+ # Get thread
114
+ shadowob threads get <thread-id> --json
115
+
116
+ # Create/Delete
117
+ shadowob threads create <channel-id> --name <name> --parent-message <id> --json
118
+ shadowob threads delete <thread-id>
119
+
120
+ # Messages
121
+ shadowob threads messages <thread-id> [--limit 50] --json
122
+ shadowob threads send <thread-id> --content "text" --json
123
+ ```
124
+
125
+ ## Direct Messages (DMs)
126
+
127
+ ```bash
128
+ # List DM channels
129
+ shadowob dms list --json
130
+
131
+ # Get DM channel
132
+ shadowob dms get <dm-channel-id> --json
133
+
134
+ # Create DM channel
135
+ shadowob dms create --user-id <user-id> --json
136
+
137
+ # Messages
138
+ shadowob dms messages <dm-channel-id> [--limit 50] --json
139
+ shadowob dms send <dm-channel-id> --content "text" --json
140
+
141
+ # Delete DM channel
142
+ shadowob dms delete <dm-channel-id>
143
+ ```
144
+
145
+ ## Agents
146
+
147
+ ```bash
148
+ # List agents
149
+ shadowob agents list --json
150
+
151
+ # Get agent
152
+ shadowob agents get <agent-id> --json
153
+
154
+ # Create/Update/Delete
155
+ shadowob agents create --name <name> [--display-name <name>] [--avatar-url <url>] --json
156
+ shadowob agents update <agent-id> [--name <name>] [--display-name <name>] --json
157
+ shadowob agents delete <agent-id>
158
+
159
+ # Control
160
+ shadowob agents start <agent-id>
161
+ shadowob agents stop <agent-id>
162
+
163
+ # Token
164
+ shadowob agents token <agent-id> --json
165
+
166
+ # Config
167
+ shadowob agents config <agent-id> --json
168
+ ```
169
+
170
+ ## Workspace
171
+
172
+ ```bash
173
+ # Workspace info
174
+ shadowob workspace get <server-id> --json
175
+ shadowob workspace tree <server-id> --json
176
+ shadowob workspace stats <server-id> --json
177
+
178
+ # Children
179
+ shadowob workspace children <server-id> [--parent-id <id>] --json
180
+
181
+ # Files
182
+ shadowob workspace files get <file-id> --json
183
+ shadowob workspace files create <server-id> --name <name> [--content <text>] [--parent-id <id>] --json
184
+ shadowob workspace files update <file-id> [--name <name>] [--content <text>] --json
185
+ shadowob workspace files delete <file-id>
186
+ shadowob workspace files upload <server-id> --file <path> [--name <name>] [--parent-id <id>] --json
187
+ shadowob workspace files download <file-id> [--output <path>]
188
+
189
+ # Folders
190
+ shadowob workspace folders create <server-id> --name <name> [--parent-id <id>] --json
191
+ shadowob workspace folders update <folder-id> --name <name> --json
192
+ shadowob workspace folders delete <folder-id>
193
+ ```
194
+
195
+ ## Shop
196
+
197
+ ```bash
198
+ # Shop info
199
+ shadowob shop get <server-id> --json
200
+ shadowob shop update <server-id> [--name <name>] [--description <desc>] --json
201
+
202
+ # Categories
203
+ shadowob shop categories list <server-id> --json
204
+ shadowob shop categories create <server-id> --name <name> [--description <desc>] --json
205
+ shadowob shop categories update <category-id> [--name <name>] [--description <desc>] --json
206
+ shadowob shop categories delete <category-id>
207
+
208
+ # Products
209
+ shadowob shop products list <server-id> [--category-id <id>] --json
210
+ shadowob shop products get <product-id> --json
211
+ shadowob shop products create <server-id> --name <name> --price <n> [--description <desc>] [--category-id <id>] [--stock <n>] --json
212
+ shadowob shop products update <product-id> [--name <name>] [--price <n>] [--description <desc>] [--stock <n>] --json
213
+ shadowob shop products delete <product-id>
214
+
215
+ # Cart
216
+ shadowob shop cart list <server-id> --json
217
+ shadowob shop cart add <server-id> --product-id <id> [--quantity <n>] --json
218
+ shadowob shop cart update <item-id> --quantity <n> --json
219
+ shadowob shop cart remove <item-id>
220
+
221
+ # Orders
222
+ shadowob shop orders list [--server-id <id>] --json
223
+ shadowob shop orders get <order-id> --json
224
+ shadowob shop orders create <server-id> [--note <text>] --json
225
+
226
+ # Wallet
227
+ shadowob shop wallet balance --json
228
+ shadowob shop wallet transactions [--limit <n>] --json
229
+ shadowob shop wallet topup --amount <n> --json
230
+ ```
231
+
232
+ ## Apps
233
+
234
+ ```bash
235
+ # List apps
236
+ shadowob apps list <server-id> --json
237
+
238
+ # Get app
239
+ shadowob apps get <app-id> --json
240
+
241
+ # Create/Update/Delete
242
+ shadowob apps create <server-id> --name <name> --type <url|workspace|static> [--source-url <url>] [--description <desc>] [--settings <json>] --json
243
+ shadowob apps update <app-id> [--name <name>] [--description <desc>] [--source-url <url>] [--settings <json>] --json
244
+ shadowob apps delete <app-id>
245
+
246
+ # Publish from workspace
247
+ shadowob apps publish <server-id> --folder-id <id> [--name <name>] [--description <desc>] --json
248
+
249
+ # Download source
250
+ shadowob apps download <app-id> [--output <path>]
251
+ ```
252
+
253
+ ## Notifications
254
+
255
+ ```bash
256
+ # List notifications
257
+ shadowob notifications list [--unread-only] [--limit <n>] --json
258
+
259
+ # Get/Read/Delete
260
+ shadowob notifications get <notification-id> --json
261
+ shadowob notifications mark-read <notification-id>
262
+ shadowob notifications mark-all-read
263
+ shadowob notifications delete <notification-id>
264
+
265
+ # Preferences
266
+ shadowob notifications preferences get --json
267
+ shadowob notifications preferences update [--email-enabled <bool>] [--push-enabled <bool>] [--mentions-only <bool>] --json
268
+ ```
269
+
270
+ ## Friends
271
+
272
+ ```bash
273
+ # List friends
274
+ shadowob friends list --json
275
+
276
+ # Requests
277
+ shadowob friends requests [--incoming] [--outgoing] --json
278
+ shadowob friends add <user-id> [--message <text>] --json
279
+ shadowob friends accept <user-id> --json
280
+ shadowob friends reject <user-id>
281
+
282
+ # Manage
283
+ shadowob friends remove <user-id>
284
+ shadowob friends block <user-id>
285
+ shadowob friends unblock <user-id>
286
+ shadowob friends blocked --json
287
+ ```
288
+
289
+ ## Invites
290
+
291
+ ```bash
292
+ # List invites
293
+ shadowob invites list <server-id> --json
294
+
295
+ # Create/Revoke
296
+ shadowob invites create <server-id> [--max-uses <n>] [--expires-in <hours>] --json
297
+ shadowob invites revoke <invite-id>
298
+ shadowob invites regenerate <server-id> --json
299
+
300
+ # Get by code
301
+ shadowob invites get <invite-code> --json
302
+ ```
303
+
304
+ ## OAuth
305
+
306
+ ```bash
307
+ # List apps
308
+ shadowob oauth list --json
309
+
310
+ # Get/Create/Update/Delete
311
+ shadowob oauth get <app-id> --json
312
+ shadowob oauth create --name <name> [--description <desc>] [--redirect-uri <uri>] [--homepage <url>] --json
313
+ shadowob oauth update <app-id> [--name <name>] [--description <desc>] [--redirect-uri <uri>] [--homepage <url>] --json
314
+ shadowob oauth delete <app-id>
315
+ shadowob oauth regenerate-secret <app-id> --json
316
+
317
+ # Tokens
318
+ shadowob oauth tokens list --json
319
+ shadowob oauth tokens revoke <token-id>
320
+ ```
321
+
322
+ ## Marketplace
323
+
324
+ ```bash
325
+ # Listings
326
+ shadowob marketplace listings list [--agent-id <id>] [--min-price <n>] [--max-price <n>] --json
327
+ shadowob marketplace listings get <listing-id> --json
328
+ shadowob marketplace listings create --agent-id <id> --price <n> [--description <text>] --json
329
+ shadowob marketplace listings update <listing-id> [--price <n>] [--description <text>] [--active <bool>] --json
330
+ shadowob marketplace listings delete <listing-id>
331
+
332
+ # Contracts
333
+ shadowob marketplace contracts list [--as-renter] [--as-owner] [--active-only] --json
334
+ shadowob marketplace contracts get <contract-id> --json
335
+ shadowob marketplace contracts create --listing-id <id> --hours <n> [--note <text>] --json
336
+ shadowob marketplace contracts cancel <contract-id>
337
+ shadowob marketplace contracts extend <contract-id> --hours <n> --json
338
+ ```
339
+
340
+ ## Media
341
+
342
+ ```bash
343
+ # Upload/Download
344
+ shadowob media upload --file <path> [--server-id <id>] [--channel-id <id>] --json
345
+ shadowob media download <content-ref> [--output <path>]
346
+ shadowob media delete <content-ref>
347
+ shadowob media list [--server-id <id>] [--channel-id <id>] [--limit <n>] --json
348
+ ```
349
+
350
+ ## Search
351
+
352
+ ```bash
353
+ # Global search
354
+ shadowob search global --query <text> [--server-id <id>] [--channel-id <id>] [--type <type>] [--limit <n>] --json
355
+
356
+ # Specific searches
357
+ shadowob search messages --query <text> [--server-id <id>] [--channel-id <id>] [--author-id <id>] [--after <date>] [--before <date>] [--has-attachments] [--limit <n>] --json
358
+ shadowob search users --query <text> [--limit <n>] --json
359
+ shadowob search servers --query <text> [--limit <n>] --json
360
+ ```
361
+
362
+ ## Listen (Real-time Events)
363
+
364
+ ```bash
365
+ # Stream mode: listen until timeout or count
366
+ shadowob listen channel <channel-id> --mode stream [--timeout 60] [--count 10] --json
367
+
368
+ # Poll mode: fetch recent messages
369
+ shadowob listen channel <channel-id> --mode poll [--last 50] --json
370
+
371
+ # Filter events
372
+ shadowob listen channel <id> --event-type message:new,reaction:add --json
373
+
374
+ # DM events
375
+ shadowob listen dm <dm-channel-id> [--timeout 60] --json
376
+ ```
377
+
378
+ ## Output Format
379
+
380
+ - Default: human-readable list format
381
+ - `--json`: JSON output for programmatic use
382
+
383
+ ## Error Handling
384
+
385
+ Commands exit with code 1 on error. Use `--json` to get structured errors:
386
+
387
+ ```json
388
+ { "error": "message" }
389
+ ```