@shadowob/connector 1.1.6 → 1.1.7

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.cjs CHANGED
@@ -88,7 +88,7 @@ function buildOpenClawPlan(input) {
88
88
  return {
89
89
  target: "openclaw",
90
90
  title: "OpenClaw",
91
- summary: "Install the Shadow channel plugin and bind this Buddy token to OpenClaw.",
91
+ summary: "Install the Shadow channel plugin, Shadow CLI bin/skills, and a Buddy CLI profile for OpenClaw.",
92
92
  connectCommand,
93
93
  quickCommand,
94
94
  commands,
@@ -99,6 +99,9 @@ function buildOpenClawPlan(input) {
99
99
  `Shadow server URL: ${serverUrl}`,
100
100
  `Buddy token: ${token}`,
101
101
  "",
102
+ `Preferred one-line setup: ${connectCommand}`,
103
+ "The connector installs/configures the Shadow CLI, official Shadow skill files, and the Buddy profile before applying the OpenClaw channel config.",
104
+ "",
102
105
  "Run these steps in order:",
103
106
  ...commands.map((item, index) => `${index + 1}. ${item.command}`),
104
107
  "",
@@ -183,7 +186,7 @@ function buildHermesPlan(input) {
183
186
  return {
184
187
  target: "hermes",
185
188
  title: "Hermes Agent",
186
- summary: "Install the ShadowOB Hermes platform plugin and run Hermes gateway for this Buddy.",
189
+ summary: "Install the ShadowOB Hermes platform plugin, Shadow CLI bin/skills, and a Buddy CLI profile.",
187
190
  connectCommand,
188
191
  quickCommand: commands.map((item) => item.command).join(" && "),
189
192
  commands,
@@ -197,7 +200,8 @@ function buildHermesPlan(input) {
197
200
  `Shadow server URL: ${serverUrl}`,
198
201
  `Buddy token: ${token}`,
199
202
  "",
200
- "Install the bundled ShadowOB platform plugin, write the environment values above, enable the plugin, then run hermes gateway. The plugin resolves the Buddy agent id and channel policy from Shadow at runtime."
203
+ `Preferred one-line setup: ${connectCommand}`,
204
+ "The connector installs/configures the Shadow CLI, official Shadow skill files, and the Buddy profile before writing Hermes config. The plugin resolves the Buddy agent id and channel policy from Shadow at runtime."
201
205
  ].join("\n"),
202
206
  docsUrl: "https://hermes-agent.nousresearch.com/docs/user-guide/messaging",
203
207
  capabilities: [
@@ -275,7 +279,7 @@ function buildCcConnectPlan(input) {
275
279
  return {
276
280
  target: "cc-connect",
277
281
  title: "cc-connect",
278
- summary: `Use ${CC_CONNECT_FORK_REPO}@${CC_CONNECT_FORK_SHORT_REF} with ShadowOB Socket.IO platform support for this Buddy token.`,
282
+ summary: `Use ${CC_CONNECT_FORK_REPO}@${CC_CONNECT_FORK_SHORT_REF} with ShadowOB Socket.IO support, Shadow CLI bin/skills, and a Buddy CLI profile.`,
279
283
  connectCommand: startCommand,
280
284
  quickCommand: startCommand,
281
285
  commands,
@@ -288,7 +292,8 @@ function buildCcConnectPlan(input) {
288
292
  `Project work_dir: ${workDir}`,
289
293
  `Agent type: ${agentType}`,
290
294
  "",
291
- `Install ${CC_CONNECT_FORK_REPO}@${CC_CONNECT_FORK_SHORT_REF}, add the TOML platform block, and start cc-connect.`
295
+ `Preferred one-line setup: ${startCommand}`,
296
+ `Install ${CC_CONNECT_FORK_REPO}@${CC_CONNECT_FORK_SHORT_REF}, install/configure the Shadow CLI and official Shadow skill files, add the TOML platform block, and start cc-connect.`
292
297
  ].join("\n"),
293
298
  docsUrl: CC_CONNECT_FORK_DOCS_URL,
294
299
  capabilities: [
package/dist/index.js CHANGED
@@ -61,7 +61,7 @@ function buildOpenClawPlan(input) {
61
61
  return {
62
62
  target: "openclaw",
63
63
  title: "OpenClaw",
64
- summary: "Install the Shadow channel plugin and bind this Buddy token to OpenClaw.",
64
+ summary: "Install the Shadow channel plugin, Shadow CLI bin/skills, and a Buddy CLI profile for OpenClaw.",
65
65
  connectCommand,
66
66
  quickCommand,
67
67
  commands,
@@ -72,6 +72,9 @@ function buildOpenClawPlan(input) {
72
72
  `Shadow server URL: ${serverUrl}`,
73
73
  `Buddy token: ${token}`,
74
74
  "",
75
+ `Preferred one-line setup: ${connectCommand}`,
76
+ "The connector installs/configures the Shadow CLI, official Shadow skill files, and the Buddy profile before applying the OpenClaw channel config.",
77
+ "",
75
78
  "Run these steps in order:",
76
79
  ...commands.map((item, index) => `${index + 1}. ${item.command}`),
77
80
  "",
@@ -156,7 +159,7 @@ function buildHermesPlan(input) {
156
159
  return {
157
160
  target: "hermes",
158
161
  title: "Hermes Agent",
159
- summary: "Install the ShadowOB Hermes platform plugin and run Hermes gateway for this Buddy.",
162
+ summary: "Install the ShadowOB Hermes platform plugin, Shadow CLI bin/skills, and a Buddy CLI profile.",
160
163
  connectCommand,
161
164
  quickCommand: commands.map((item) => item.command).join(" && "),
162
165
  commands,
@@ -170,7 +173,8 @@ function buildHermesPlan(input) {
170
173
  `Shadow server URL: ${serverUrl}`,
171
174
  `Buddy token: ${token}`,
172
175
  "",
173
- "Install the bundled ShadowOB platform plugin, write the environment values above, enable the plugin, then run hermes gateway. The plugin resolves the Buddy agent id and channel policy from Shadow at runtime."
176
+ `Preferred one-line setup: ${connectCommand}`,
177
+ "The connector installs/configures the Shadow CLI, official Shadow skill files, and the Buddy profile before writing Hermes config. The plugin resolves the Buddy agent id and channel policy from Shadow at runtime."
174
178
  ].join("\n"),
175
179
  docsUrl: "https://hermes-agent.nousresearch.com/docs/user-guide/messaging",
176
180
  capabilities: [
@@ -248,7 +252,7 @@ function buildCcConnectPlan(input) {
248
252
  return {
249
253
  target: "cc-connect",
250
254
  title: "cc-connect",
251
- summary: `Use ${CC_CONNECT_FORK_REPO}@${CC_CONNECT_FORK_SHORT_REF} with ShadowOB Socket.IO platform support for this Buddy token.`,
255
+ summary: `Use ${CC_CONNECT_FORK_REPO}@${CC_CONNECT_FORK_SHORT_REF} with ShadowOB Socket.IO support, Shadow CLI bin/skills, and a Buddy CLI profile.`,
252
256
  connectCommand: startCommand,
253
257
  quickCommand: startCommand,
254
258
  commands,
@@ -261,7 +265,8 @@ function buildCcConnectPlan(input) {
261
265
  `Project work_dir: ${workDir}`,
262
266
  `Agent type: ${agentType}`,
263
267
  "",
264
- `Install ${CC_CONNECT_FORK_REPO}@${CC_CONNECT_FORK_SHORT_REF}, add the TOML platform block, and start cc-connect.`
268
+ `Preferred one-line setup: ${startCommand}`,
269
+ `Install ${CC_CONNECT_FORK_REPO}@${CC_CONNECT_FORK_SHORT_REF}, install/configure the Shadow CLI and official Shadow skill files, add the TOML platform block, and start cc-connect.`
265
270
  ].join("\n"),
266
271
  docsUrl: CC_CONNECT_FORK_DOCS_URL,
267
272
  capabilities: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shadowob/connector",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "description": "Shadow connector helpers for OpenClaw, Hermes Agent, and cc-connect",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -22,6 +22,7 @@
22
22
  "files": [
23
23
  "dist",
24
24
  "hermes-shadowob-plugin",
25
+ "skills",
25
26
  "README.md"
26
27
  ],
27
28
  "keywords": [
@@ -0,0 +1,451 @@
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
+ ## Threads
107
+
108
+ ```bash
109
+ # List threads
110
+ shadowob threads list <channel-id> --json
111
+
112
+ # Get thread
113
+ shadowob threads get <thread-id> --json
114
+
115
+ # Create/Delete
116
+ shadowob threads create <channel-id> --name <name> --parent-message <id> --json
117
+ shadowob threads delete <thread-id>
118
+
119
+ # Messages
120
+ shadowob threads messages <thread-id> [--limit 50] --json
121
+ shadowob threads send <thread-id> --content "text" --json
122
+ ```
123
+
124
+ ## Direct Messages (DMs)
125
+
126
+ ```bash
127
+ # List DM channels
128
+ shadowob dms list --json
129
+
130
+ # Get DM channel
131
+ shadowob dms get <dm-channel-id> --json
132
+
133
+ # Create DM channel
134
+ shadowob dms create --user-id <user-id> --json
135
+
136
+ # Messages
137
+ shadowob dms messages <dm-channel-id> [--limit 50] --json
138
+ shadowob dms send <dm-channel-id> --content "text" --json
139
+
140
+ # Delete DM channel
141
+ shadowob dms delete <dm-channel-id>
142
+ ```
143
+
144
+ ## Buddies
145
+
146
+ ```bash
147
+ # List buddies
148
+ shadowob buddies list --json
149
+
150
+ # Get buddy
151
+ shadowob buddies get <buddy-id> --json
152
+
153
+ # Create/Update/Delete
154
+ shadowob buddies create --name <name> --username <username> [--display-name <name>] [--avatar-url <url>] --json
155
+ shadowob buddies update <buddy-id> [--name <name>] [--display-name <name>] --json
156
+ shadowob buddies delete <buddy-id>
157
+
158
+ # Control
159
+ shadowob buddies start <buddy-id>
160
+ shadowob buddies stop <buddy-id>
161
+
162
+ # Token
163
+ shadowob buddies token <buddy-id> --json
164
+
165
+ # Config
166
+ shadowob buddies config <buddy-id> --json
167
+ ```
168
+
169
+ ## Workspace
170
+
171
+ ```bash
172
+ # Workspace info
173
+ shadowob workspace get <server-id> --json
174
+ shadowob workspace tree <server-id> --json
175
+ shadowob workspace stats <server-id> --json
176
+
177
+ # Children
178
+ shadowob workspace children <server-id> [--parent-id <id>] --json
179
+
180
+ # Files
181
+ shadowob workspace files get <server-id> <file-id> --json
182
+ shadowob workspace files upload <server-id> --file <path> [--name <name>] [--parent-id <id>] --json
183
+ shadowob workspace files update <server-id> <file-id> [--name <name>] [--parent-id <id>] --json
184
+ shadowob workspace files delete <server-id> <file-id>
185
+ shadowob workspace files search <server-id> [--search-text <text>] [--ext <ext>] [--parent-id <id>] --json
186
+ # Note: files download is not yet implemented in CLI; download via contentRef URL instead.
187
+
188
+ # Folders
189
+ shadowob workspace folders create <server-id> --name <name> [--parent-id <id>] --json
190
+ shadowob workspace folders update <server-id> <folder-id> [--name <name>] [--parent-id <id>] --json
191
+ shadowob workspace folders delete <server-id> <folder-id>
192
+ ```
193
+
194
+ ### Workspace Node Metadata
195
+
196
+ Each workspace node has a `flags` JSONB field with optional metadata:
197
+
198
+ - **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.
199
+ - **Traceability**: `flags.source = "channel_message_attachment"` with `channelId` and `messageId` for files uploaded via channel messages, enabling reverse lookup to the originating message.
200
+ - **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.
201
+
202
+ ## Shop
203
+
204
+ ```bash
205
+ # Shop info
206
+ shadowob shop get <server-id> --json
207
+ shadowob shop get-by-id <shop-id> --json
208
+ shadowob shop me get --json
209
+
210
+ # Products
211
+ shadowob shop products list <server-id> [--status active] [--keyword <text>] [--limit <n>] --json
212
+ shadowob shop products list-by-shop <shop-id> [--status active] [--limit <n>] --json
213
+ shadowob shop products get <server-id> <product-id> --json
214
+ shadowob shop products purchase <shop-id> <product-id> --idempotency-key <unique-operation-id> --json
215
+
216
+ # Offers, deliverables, and shop assets
217
+ shadowob shop offers list <shop-id> --json
218
+ shadowob shop offers create <shop-id> --data '<offer-json>' --json
219
+ shadowob shop offers deliverables create <shop-id> <offer-id> --data '<deliverable-json>' --json
220
+ shadowob shop assets list <shop-id> --json
221
+ shadowob shop assets create <shop-id> --data '<asset-definition-json>' --json
222
+ shadowob shop entitlements list <shop-id> --json
223
+
224
+ # Cart
225
+ shadowob shop cart list <server-id> --json
226
+
227
+ # Orders
228
+ shadowob shop orders list <server-id> --json
229
+ shadowob shop orders get <server-id> <order-id> --json
230
+
231
+ # Wallet
232
+ shadowob shop wallet balance --json
233
+ ```
234
+
235
+ ## Commerce
236
+
237
+ ```bash
238
+ # Product and offer buyer context
239
+ shadowob commerce products context <product-id> --json
240
+ shadowob commerce offers preview <offer-id> --json
241
+ shadowob commerce offers purchase <offer-id> --idempotency-key <unique-operation-id> --json
242
+
243
+ # Chat commerce cards
244
+ shadowob commerce cards list --channel-id <channel-id> [--keyword <text>] --json
245
+ shadowob commerce cards purchase <message-id> <card-id> --idempotency-key <unique-operation-id> --json
246
+
247
+ # Purchases, delivery, protected files, and community assets
248
+ shadowob commerce entitlements list [--server <server>] --json
249
+ shadowob commerce entitlements get <entitlement-id> --json
250
+ shadowob commerce entitlements verify <entitlement-id> --json
251
+ shadowob commerce paid-files open <file-id> --json
252
+ shadowob commerce assets list --json
253
+ shadowob commerce assets consume <grant-id> --idempotency-key <unique-operation-id> --json
254
+
255
+ # Seller income and support actions
256
+ shadowob commerce settlements list --json
257
+ shadowob commerce settlements settle --json
258
+ shadowob commerce tips send --recipient-user-id <user-id> --amount <shrimp> [--message <text>] --json
259
+ shadowob commerce gifts send --recipient-user-id <user-id> --assets '<json-array>' --json
260
+ ```
261
+
262
+ ## Commerce Validation Notes
263
+
264
+ - Use the CLI for setup, inspection, and automation, but validate commerce user stories in the
265
+ browser before calling them complete.
266
+ - Do not add seed code to populate commerce surfaces. Create ordinary local/test records through
267
+ browser flows or explicit setup calls.
268
+ - When inspecting a commerce flow, preserve ids for the handoff: product, offer, order,
269
+ entitlement, shop, server, Buddy, and workspace file where applicable.
270
+ - External app entitlement automation must use Shadow OAuth commerce APIs and remain scoped to the
271
+ app's own `external_app` resource namespace.
272
+
273
+ ## Apps
274
+
275
+ ```bash
276
+ # Server App integrations
277
+ shadowob app list --server <server-id-or-slug> --json
278
+ shadowob app preview --server <server-id-or-slug> --manifest-url <manifest-url> --json
279
+ shadowob app install --server <server-id-or-slug> --manifest-url <manifest-url> --json
280
+ shadowob app uninstall <app-key> --server <server-id-or-slug>
281
+ shadowob app discover --server <server-id-or-slug> --json
282
+ shadowob app inspect <app-key> --server <server-id-or-slug> --json
283
+ shadowob app skills <app-key> --server <server-id-or-slug>
284
+ shadowob app call <app-key> <command> --server <server-id-or-slug> --channel-id <channel-id> --json-input '<raw-command-input-json>' --json
285
+ ```
286
+
287
+ For server App commands, use the `shadowob app` CLI path only. Do not use curl, fetch, raw HTTP
288
+ routes, or the JavaScript SDK to call server App commands. Pass the command input object directly
289
+ to `--json-input`, for example `{"title":"Example","priority":"high"}`; the CLI wraps the HTTP
290
+ request for you and binds Shadow OAuth identity, server membership, App grants, and command policy.
291
+ When a channel message mentions a server App, use the mentioned app key/server id directly and pass
292
+ the current channel id with `--channel-id` when available. If a server App command requires
293
+ approval, do not send a chat form or call the approval endpoint yourself as a Buddy. Wait for a
294
+ person to confirm the Shadow approval popup, then retry the original command.
295
+
296
+ ```bash
297
+ # Legacy workspace apps
298
+ shadowob apps list <server-id> --json
299
+
300
+ # Get app
301
+ shadowob apps get <app-id> --json
302
+
303
+ # Create/Update/Delete
304
+ shadowob apps create <server-id> --name <name> --type <url|workspace|static> [--source-url <url>] [--description <desc>] [--settings <json>] --json
305
+ shadowob apps update <app-id> [--name <name>] [--description <desc>] [--source-url <url>] [--settings <json>] --json
306
+ shadowob apps delete <app-id>
307
+
308
+ # Publish from workspace
309
+ shadowob apps publish <server-id> --folder-id <id> [--name <name>] [--description <desc>] --json
310
+
311
+ # Download source
312
+ shadowob apps download <app-id> [--output <path>]
313
+ ```
314
+
315
+ ## Notifications
316
+
317
+ ```bash
318
+ # List notifications
319
+ shadowob notifications list [--unread-only] [--limit <n>] --json
320
+
321
+ # Get/Read/Delete
322
+ shadowob notifications get <notification-id> --json
323
+ shadowob notifications mark-read <notification-id>
324
+ shadowob notifications mark-all-read
325
+ shadowob notifications delete <notification-id>
326
+
327
+ # Preferences
328
+ shadowob notifications preferences get --json
329
+ shadowob notifications preferences update [--email-enabled <bool>] [--push-enabled <bool>] [--mentions-only <bool>] --json
330
+ ```
331
+
332
+ ## Friends
333
+
334
+ ```bash
335
+ # List friends
336
+ shadowob friends list --json
337
+
338
+ # Friend requests
339
+ shadowob friends requests [--incoming] [--outgoing] --json
340
+ shadowob friends add <username> [--message <text>] --json
341
+ shadowob friends accept <request-id> --json
342
+ shadowob friends reject <request-id> --json
343
+
344
+ # Remove friend
345
+ shadowob friends remove <friendship-id> --json
346
+ ```
347
+
348
+ ## Invites
349
+
350
+ ```bash
351
+ # List your invite codes
352
+ shadowob invites list --json
353
+
354
+ # Create invite code
355
+ shadowob invites create [--max-uses <n>] [--expires-in <hours>] --json
356
+
357
+ # Deactivate/Delete invite
358
+ shadowob invites deactivate <invite-id>
359
+ shadowob invites delete <invite-id>
360
+ ```
361
+
362
+ ## OAuth
363
+
364
+ ```bash
365
+ # List OAuth apps
366
+ shadowob oauth list --json
367
+
368
+ # Create OAuth app
369
+ shadowob oauth create --name <name> [--description <desc>] [--redirect-uri <uri>] [--homepage <url>] --json
370
+
371
+ # Update/Delete OAuth app
372
+ shadowob oauth update <app-id> [--name <name>] [--description <desc>] [--redirect-uri <uri>] [--homepage <url>] --json
373
+ shadowob oauth delete <app-id>
374
+
375
+ # Reset client secret
376
+ shadowob oauth reset-secret <app-id> --json
377
+
378
+ # List authorized apps (user consents)
379
+ shadowob oauth consents --json
380
+
381
+ # Revoke consent for an app
382
+ shadowob oauth revoke <app-id>
383
+
384
+ # External app commerce entitlement checks use OAuth access tokens, not user JWTs
385
+ shadowob oauth commerce check --access-token <oauth-access-token> --resource-id <app-id>:premium --json
386
+ shadowob oauth commerce redeem --access-token <oauth-access-token> --resource-id <app-id>:premium --idempotency-key <provider-operation-id> --json
387
+ ```
388
+
389
+ ## Marketplace
390
+
391
+ ```bash
392
+ # Listings
393
+ shadowob marketplace listings list [--agent-id <id>] [--min-price <n>] [--max-price <n>] --json
394
+ shadowob marketplace listings get <listing-id> --json
395
+ shadowob marketplace listings create --agent-id <id> --price <n> [--description <text>] --json
396
+ shadowob marketplace listings update <listing-id> [--price <n>] [--description <text>] [--active <bool>] --json
397
+ shadowob marketplace listings delete <listing-id>
398
+
399
+ # Contracts
400
+ shadowob marketplace contracts list [--as-renter] [--as-owner] [--active-only] --json
401
+ shadowob marketplace contracts get <contract-id> --json
402
+ shadowob marketplace contracts create --listing-id <id> --hours <n> [--note <text>] --json
403
+ shadowob marketplace contracts cancel <contract-id>
404
+ shadowob marketplace contracts extend <contract-id> --hours <n> --json
405
+ ```
406
+
407
+ ## Media
408
+
409
+ ```bash
410
+ # Upload a file
411
+ shadowob media upload --file <path> [--server <server>] [--channel-id <id>] --json
412
+
413
+ # Download a file
414
+ shadowob media download <file-url> [--output <path>]
415
+ ```
416
+
417
+ ## Search
418
+
419
+ ```bash
420
+ # Search messages
421
+ shadowob search messages --query <text> [--server <server>] [--channel-id <id>] [--author-id <id>] [--after <date>] [--before <date>] [--has-attachments] [--limit <n>] --json
422
+ ```
423
+
424
+ ## Listen (Real-time Events)
425
+
426
+ ```bash
427
+ # Stream mode: listen until timeout or count
428
+ shadowob listen channel <channel-id> --mode stream [--timeout 60] [--count 10] --json
429
+
430
+ # Poll mode: fetch recent messages
431
+ shadowob listen channel <channel-id> --mode poll [--last 50] --json
432
+
433
+ # Filter events
434
+ shadowob listen channel <id> --event-type message:new,reaction:add --json
435
+
436
+ # DM events
437
+ shadowob listen dm <dm-channel-id> [--timeout 60] --json
438
+ ```
439
+
440
+ ## Output Format
441
+
442
+ - Default: human-readable list format
443
+ - `--json`: JSON output for programmatic use
444
+
445
+ ## Error Handling
446
+
447
+ Commands exit with code 1 on error. Use `--json` to get structured errors:
448
+
449
+ ```json
450
+ { "error": "message" }
451
+ ```