@shadowob/connector 1.1.6 → 1.1.8

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.
@@ -0,0 +1,485 @@
1
+ ---
2
+ name: shadowob
3
+ description: "Use when live Shadow context or actions are needed: channel/DM history, pins, members, server/channel/workspace/shop/app/buddy data, or sending/managing Shadow content via the shadowob CLI."
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
+ Activate this skill when you need current Shadow context, such as recent channel or DM history,
21
+ pinned messages, member/server/channel state, workspace/shop/app/buddy data, or when you need to
22
+ send or manage Shadow content. Prefer narrow `--json` reads before acting.
23
+
24
+ ## Quickstart
25
+
26
+ ```bash
27
+ # Login (one-time setup)
28
+ shadowob auth login --server-url https://shadowob.com --token <jwt>
29
+
30
+ # List servers
31
+ shadowob servers list --json
32
+
33
+ # Send a message
34
+ shadowob channels send <channel-id> --content "Hello" --json
35
+ ```
36
+
37
+ ## Authentication
38
+
39
+ Set token via:
40
+ 1. `shadowob auth login` (persistent, stored in `~/.shadowob/shadowob.config.json`)
41
+ 2. `--profile <name>` to use a specific profile
42
+ 3. `SHADOWOB_TOKEN` env var (used by SDK directly)
43
+
44
+ ### Profile Commands
45
+
46
+ ```bash
47
+ shadowob auth login --server-url <url> --token <token> --profile <name>
48
+ shadowob auth switch <profile>
49
+ shadowob auth list
50
+ shadowob auth whoami
51
+ shadowob auth logout --profile <name>
52
+ ```
53
+
54
+ ## Servers
55
+
56
+ ```bash
57
+ # List joined servers
58
+ shadowob servers list --json
59
+
60
+ # Get server details
61
+ shadowob servers get <server-id> --json
62
+
63
+ # Create server
64
+ shadowob servers create --name "My Server" --slug myserver --json
65
+
66
+ # Join/Leave
67
+ shadowob servers join <server-id> [--invite-code <code>]
68
+ shadowob servers leave <server-id>
69
+
70
+ # Members
71
+ shadowob servers members <server-id> --json
72
+
73
+ # Discover public servers
74
+ shadowob servers discover --json
75
+ ```
76
+
77
+ ## Channels
78
+
79
+ ```bash
80
+ # List channels
81
+ shadowob channels list --server <server> --json
82
+
83
+ # Get channel
84
+ shadowob channels get <channel-id> --json
85
+
86
+ # Create/Delete
87
+ shadowob channels create --server <server> --name <name> [--type text] --json
88
+ shadowob channels delete <channel-id>
89
+
90
+ # Messages
91
+ shadowob channels messages <channel-id> [--limit 50] [--cursor <cursor>] --json
92
+ shadowob channels send <channel-id> --content "text" [--reply-to <id>] [--thread-id <id>] --json
93
+ shadowob channels edit <message-id> --content "new text" --json
94
+ shadowob channels delete-message <message-id>
95
+
96
+ # Reactions
97
+ shadowob channels react <message-id> --emoji 👍
98
+ shadowob channels unreact <message-id> --emoji 👍
99
+
100
+ # Pins
101
+ shadowob channels pin <message-id> [--channel-id <id>]
102
+ shadowob channels unpin <message-id> [--channel-id <id>]
103
+ shadowob channels pinned <channel-id> --json
104
+ ```
105
+
106
+ ## Buddy Inbox Task Cards
107
+
108
+ Inbox tasks are ordinary channel messages with `metadata.cards[]` entries where `kind="task"`.
109
+ When a task card is assigned to the current Buddy, treat it as an explicit trigger even if the
110
+ channel normally requires mentions.
111
+
112
+ ```bash
113
+ # Discover or repair Inbox channels
114
+ shadowob inbox list --server <server-id-or-slug> --json
115
+ shadowob inbox ensure --server <server-id-or-slug> --agent <agent-id> --json
116
+
117
+ # Enqueue a task card when acting as an authorized tool or Server App operator
118
+ shadowob inbox enqueue --server <server-id-or-slug> --agent <agent-id> --title "Task title" --json
119
+
120
+ # Claim the next task from a Buddy Inbox
121
+ shadowob inbox claim-next --server <server-id-or-slug> --agent <agent-id> --json
122
+
123
+ # Claim/update a known task card
124
+ shadowob inbox claim <message-id> <card-id> --json
125
+ shadowob inbox update <message-id> <card-id> --status running --note "Started" --json
126
+ shadowob inbox update <message-id> <card-id> --status completed --note "Done" --json
127
+ shadowob inbox retry <message-id> <card-id> --note "Retry after fixing input" --json
128
+
129
+ # Turn an existing chat message into a Buddy Inbox task
130
+ shadowob inbox promote <message-id> --server <server-id-or-slug> --agent <agent-id> --title "Task title" --json
131
+ ```
132
+
133
+ Runner contract:
134
+
135
+ - Read `metadata.cards` before deciding whether to skip a message.
136
+ - Accept active task cards assigned to your `agentId` or bot `userId`.
137
+ - Claim before work, mark `running` while working, then mark `completed` or `failed` with a concise note.
138
+ - Reply to the Inbox task message when you need the owner to see a human-readable result.
139
+
140
+ ## Threads
141
+
142
+ ```bash
143
+ # List threads
144
+ shadowob threads list <channel-id> --json
145
+
146
+ # Get thread
147
+ shadowob threads get <thread-id> --json
148
+
149
+ # Create/Delete
150
+ shadowob threads create <channel-id> --name <name> --parent-message <id> --json
151
+ shadowob threads delete <thread-id>
152
+
153
+ # Messages
154
+ shadowob threads messages <thread-id> [--limit 50] --json
155
+ shadowob threads send <thread-id> --content "text" --json
156
+ ```
157
+
158
+ ## Direct Messages (DMs)
159
+
160
+ ```bash
161
+ # List DM channels
162
+ shadowob dms list --json
163
+
164
+ # Get DM channel
165
+ shadowob dms get <dm-channel-id> --json
166
+
167
+ # Create DM channel
168
+ shadowob dms create --user-id <user-id> --json
169
+
170
+ # Messages
171
+ shadowob dms messages <dm-channel-id> [--limit 50] --json
172
+ shadowob dms send <dm-channel-id> --content "text" --json
173
+
174
+ # Delete DM channel
175
+ shadowob dms delete <dm-channel-id>
176
+ ```
177
+
178
+ ## Buddies
179
+
180
+ ```bash
181
+ # List buddies
182
+ shadowob buddies list --json
183
+
184
+ # Get buddy
185
+ shadowob buddies get <buddy-id> --json
186
+
187
+ # Create/Update/Delete
188
+ shadowob buddies create --name <name> --username <username> [--display-name <name>] [--avatar-url <url>] --json
189
+ shadowob buddies update <buddy-id> [--name <name>] [--display-name <name>] --json
190
+ shadowob buddies delete <buddy-id>
191
+
192
+ # Control
193
+ shadowob buddies start <buddy-id>
194
+ shadowob buddies stop <buddy-id>
195
+
196
+ # Token
197
+ shadowob buddies token <buddy-id> --json
198
+
199
+ # Config
200
+ shadowob buddies config <buddy-id> --json
201
+ ```
202
+
203
+ ## Workspace
204
+
205
+ ```bash
206
+ # Workspace info
207
+ shadowob workspace get <server-id> --json
208
+ shadowob workspace tree <server-id> --json
209
+ shadowob workspace stats <server-id> --json
210
+
211
+ # Children
212
+ shadowob workspace children <server-id> [--parent-id <id>] --json
213
+
214
+ # Files
215
+ shadowob workspace files get <server-id> <file-id> --json
216
+ shadowob workspace files upload <server-id> --file <path> [--name <name>] [--parent-id <id>] --json
217
+ shadowob workspace files update <server-id> <file-id> [--name <name>] [--parent-id <id>] --json
218
+ shadowob workspace files delete <server-id> <file-id>
219
+ shadowob workspace files search <server-id> [--search-text <text>] [--ext <ext>] [--parent-id <id>] --json
220
+ # Note: files download is not yet implemented in CLI; download via contentRef URL instead.
221
+
222
+ # Folders
223
+ shadowob workspace folders create <server-id> --name <name> [--parent-id <id>] --json
224
+ shadowob workspace folders update <server-id> <folder-id> [--name <name>] [--parent-id <id>] --json
225
+ shadowob workspace folders delete <server-id> <folder-id>
226
+ ```
227
+
228
+ ### Workspace Node Metadata
229
+
230
+ Each workspace node has a `flags` JSONB field with optional metadata:
231
+
232
+ - **Access control**: `flags.access = { scope: "server" | "channel", serverId, channelId? }`. All nodes have at least `scope: "server"` + `serverId`. Channel-scoped nodes require channel membership for access.
233
+ - **Traceability**: `flags.source = "channel_message_attachment"` with `channelId` and `messageId` for files uploaded via channel messages, enabling reverse lookup to the originating message.
234
+ - **Path is server-computed**: `path` is derived from parent path + name, maintained server-side. Do not set path manually — it is auto-updated on rename/move.
235
+
236
+ ## Shop
237
+
238
+ ```bash
239
+ # Shop info
240
+ shadowob shop get <server-id> --json
241
+ shadowob shop get-by-id <shop-id> --json
242
+ shadowob shop me get --json
243
+
244
+ # Products
245
+ shadowob shop products list <server-id> [--status active] [--keyword <text>] [--limit <n>] --json
246
+ shadowob shop products list-by-shop <shop-id> [--status active] [--limit <n>] --json
247
+ shadowob shop products get <server-id> <product-id> --json
248
+ shadowob shop products purchase <shop-id> <product-id> --idempotency-key <unique-operation-id> --json
249
+
250
+ # Offers, deliverables, and shop assets
251
+ shadowob shop offers list <shop-id> --json
252
+ shadowob shop offers create <shop-id> --data '<offer-json>' --json
253
+ shadowob shop offers deliverables create <shop-id> <offer-id> --data '<deliverable-json>' --json
254
+ shadowob shop assets list <shop-id> --json
255
+ shadowob shop assets create <shop-id> --data '<asset-definition-json>' --json
256
+ shadowob shop entitlements list <shop-id> --json
257
+
258
+ # Cart
259
+ shadowob shop cart list <server-id> --json
260
+
261
+ # Orders
262
+ shadowob shop orders list <server-id> --json
263
+ shadowob shop orders get <server-id> <order-id> --json
264
+
265
+ # Wallet
266
+ shadowob shop wallet balance --json
267
+ ```
268
+
269
+ ## Commerce
270
+
271
+ ```bash
272
+ # Product and offer buyer context
273
+ shadowob commerce products context <product-id> --json
274
+ shadowob commerce offers preview <offer-id> --json
275
+ shadowob commerce offers purchase <offer-id> --idempotency-key <unique-operation-id> --json
276
+
277
+ # Chat commerce cards
278
+ shadowob commerce cards list --channel-id <channel-id> [--keyword <text>] --json
279
+ shadowob commerce cards purchase <message-id> <card-id> --idempotency-key <unique-operation-id> --json
280
+
281
+ # Purchases, delivery, protected files, and community assets
282
+ shadowob commerce entitlements list [--server <server>] --json
283
+ shadowob commerce entitlements get <entitlement-id> --json
284
+ shadowob commerce entitlements verify <entitlement-id> --json
285
+ shadowob commerce paid-files open <file-id> --json
286
+ shadowob commerce assets list --json
287
+ shadowob commerce assets consume <grant-id> --idempotency-key <unique-operation-id> --json
288
+
289
+ # Seller income and support actions
290
+ shadowob commerce settlements list --json
291
+ shadowob commerce settlements settle --json
292
+ shadowob commerce tips send --recipient-user-id <user-id> --amount <shrimp> [--message <text>] --json
293
+ shadowob commerce gifts send --recipient-user-id <user-id> --assets '<json-array>' --json
294
+ ```
295
+
296
+ ## Commerce Validation Notes
297
+
298
+ - Use the CLI for setup, inspection, and automation, but validate commerce user stories in the
299
+ browser before calling them complete.
300
+ - Do not add seed code to populate commerce surfaces. Create ordinary local/test records through
301
+ browser flows or explicit setup calls.
302
+ - When inspecting a commerce flow, preserve ids for follow-up actions: product, offer, order,
303
+ entitlement, shop, server, Buddy, and workspace file where applicable.
304
+ - External app entitlement automation must use Shadow OAuth commerce APIs and remain scoped to the
305
+ app's own `external_app` resource namespace.
306
+
307
+ ## Apps
308
+
309
+ ```bash
310
+ # Server App integrations
311
+ shadowob app list --server <server-id-or-slug> --json
312
+ shadowob app preview --server <server-id-or-slug> --manifest-url <manifest-url> --json
313
+ shadowob app install --server <server-id-or-slug> --manifest-url <manifest-url> --json
314
+ shadowob app uninstall <app-key> --server <server-id-or-slug>
315
+ shadowob app discover --server <server-id-or-slug> --json
316
+ shadowob app inspect <app-key> --server <server-id-or-slug> --json
317
+ shadowob app skills <app-key> --server <server-id-or-slug>
318
+ shadowob app call <app-key> <command> --server <server-id-or-slug> --channel-id <channel-id> --json-input '<raw-command-input-json>' --json
319
+ ```
320
+
321
+ For server App commands, use the `shadowob app` CLI path only. Do not use curl, fetch, raw HTTP
322
+ routes, or the JavaScript SDK to call server App commands. Pass the command input object directly
323
+ to `--json-input`, for example `{"title":"Example","priority":"high"}`; the CLI wraps the HTTP
324
+ request for you and binds Shadow OAuth identity, server membership, App grants, and command policy.
325
+ When a channel message mentions a server App, use the mentioned app key/server id directly and pass
326
+ the current channel id with `--channel-id` when available. If a server App command requires
327
+ approval, do not send a chat form or call the approval endpoint yourself as a Buddy. Wait for a
328
+ person to confirm the Shadow approval popup, then retry the original command.
329
+
330
+ ```bash
331
+ # Legacy workspace apps
332
+ shadowob apps list <server-id> --json
333
+
334
+ # Get app
335
+ shadowob apps get <app-id> --json
336
+
337
+ # Create/Update/Delete
338
+ shadowob apps create <server-id> --name <name> --type <url|workspace|static> [--source-url <url>] [--description <desc>] [--settings <json>] --json
339
+ shadowob apps update <app-id> [--name <name>] [--description <desc>] [--source-url <url>] [--settings <json>] --json
340
+ shadowob apps delete <app-id>
341
+
342
+ # Publish from workspace
343
+ shadowob apps publish <server-id> --folder-id <id> [--name <name>] [--description <desc>] --json
344
+
345
+ # Download source
346
+ shadowob apps download <app-id> [--output <path>]
347
+ ```
348
+
349
+ ## Notifications
350
+
351
+ ```bash
352
+ # List notifications
353
+ shadowob notifications list [--unread-only] [--limit <n>] --json
354
+
355
+ # Get/Read/Delete
356
+ shadowob notifications get <notification-id> --json
357
+ shadowob notifications mark-read <notification-id>
358
+ shadowob notifications mark-all-read
359
+ shadowob notifications delete <notification-id>
360
+
361
+ # Preferences
362
+ shadowob notifications preferences get --json
363
+ shadowob notifications preferences update [--email-enabled <bool>] [--push-enabled <bool>] [--mentions-only <bool>] --json
364
+ ```
365
+
366
+ ## Friends
367
+
368
+ ```bash
369
+ # List friends
370
+ shadowob friends list --json
371
+
372
+ # Friend requests
373
+ shadowob friends requests [--incoming] [--outgoing] --json
374
+ shadowob friends add <username> [--message <text>] --json
375
+ shadowob friends accept <request-id> --json
376
+ shadowob friends reject <request-id> --json
377
+
378
+ # Remove friend
379
+ shadowob friends remove <friendship-id> --json
380
+ ```
381
+
382
+ ## Invites
383
+
384
+ ```bash
385
+ # List your invite codes
386
+ shadowob invites list --json
387
+
388
+ # Create invite code
389
+ shadowob invites create [--max-uses <n>] [--expires-in <hours>] --json
390
+
391
+ # Deactivate/Delete invite
392
+ shadowob invites deactivate <invite-id>
393
+ shadowob invites delete <invite-id>
394
+ ```
395
+
396
+ ## OAuth
397
+
398
+ ```bash
399
+ # List OAuth apps
400
+ shadowob oauth list --json
401
+
402
+ # Create OAuth app
403
+ shadowob oauth create --name <name> [--description <desc>] [--redirect-uri <uri>] [--homepage <url>] --json
404
+
405
+ # Update/Delete OAuth app
406
+ shadowob oauth update <app-id> [--name <name>] [--description <desc>] [--redirect-uri <uri>] [--homepage <url>] --json
407
+ shadowob oauth delete <app-id>
408
+
409
+ # Reset client secret
410
+ shadowob oauth reset-secret <app-id> --json
411
+
412
+ # List authorized apps (user consents)
413
+ shadowob oauth consents --json
414
+
415
+ # Revoke consent for an app
416
+ shadowob oauth revoke <app-id>
417
+
418
+ # External app commerce entitlement checks use OAuth access tokens, not user JWTs
419
+ shadowob oauth commerce check --access-token <oauth-access-token> --resource-id <app-id>:premium --json
420
+ shadowob oauth commerce redeem --access-token <oauth-access-token> --resource-id <app-id>:premium --idempotency-key <provider-operation-id> --json
421
+ ```
422
+
423
+ ## Marketplace
424
+
425
+ ```bash
426
+ # Listings
427
+ shadowob marketplace listings list [--agent-id <id>] [--min-price <n>] [--max-price <n>] --json
428
+ shadowob marketplace listings get <listing-id> --json
429
+ shadowob marketplace listings create --agent-id <id> --price <n> [--description <text>] --json
430
+ shadowob marketplace listings update <listing-id> [--price <n>] [--description <text>] [--active <bool>] --json
431
+ shadowob marketplace listings delete <listing-id>
432
+
433
+ # Contracts
434
+ shadowob marketplace contracts list [--as-renter] [--as-owner] [--active-only] --json
435
+ shadowob marketplace contracts get <contract-id> --json
436
+ shadowob marketplace contracts create --listing-id <id> --hours <n> [--note <text>] --json
437
+ shadowob marketplace contracts cancel <contract-id>
438
+ shadowob marketplace contracts extend <contract-id> --hours <n> --json
439
+ ```
440
+
441
+ ## Media
442
+
443
+ ```bash
444
+ # Upload a file
445
+ shadowob media upload --file <path> [--server <server>] [--channel-id <id>] --json
446
+
447
+ # Download a file
448
+ shadowob media download <file-url> [--output <path>]
449
+ ```
450
+
451
+ ## Search
452
+
453
+ ```bash
454
+ # Search messages
455
+ shadowob search messages --query <text> [--server <server>] [--channel-id <id>] [--author-id <id>] [--after <date>] [--before <date>] [--has-attachments] [--limit <n>] --json
456
+ ```
457
+
458
+ ## Listen (Real-time Events)
459
+
460
+ ```bash
461
+ # Stream mode: listen until timeout or count
462
+ shadowob listen channel <channel-id> --mode stream [--timeout 60] [--count 10] --json
463
+
464
+ # Poll mode: fetch recent messages
465
+ shadowob listen channel <channel-id> --mode poll [--last 50] --json
466
+
467
+ # Filter events
468
+ shadowob listen channel <id> --event-type message:new,reaction:add --json
469
+
470
+ # DM events
471
+ shadowob listen dm <dm-channel-id> [--timeout 60] --json
472
+ ```
473
+
474
+ ## Output Format
475
+
476
+ - Default: human-readable list format
477
+ - `--json`: JSON output for programmatic use
478
+
479
+ ## Error Handling
480
+
481
+ Commands exit with code 1 on error. Use `--json` to get structured errors:
482
+
483
+ ```json
484
+ { "error": "message" }
485
+ ```