@b3os/cli 0.2.1 → 0.2.2

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 (214) hide show
  1. package/README.md +87 -8
  2. package/assets/b3os-run.py +137 -0
  3. package/assets/skill/b3os/SKILL.md +111 -0
  4. package/dist/commands/_agents.d.ts +14 -0
  5. package/dist/commands/_agents.js +33 -0
  6. package/dist/commands/_agents.js.map +1 -0
  7. package/dist/commands/_common.js +6 -2
  8. package/dist/commands/_common.js.map +1 -1
  9. package/dist/commands/_context.d.ts +49 -0
  10. package/dist/commands/_context.js +260 -0
  11. package/dist/commands/_context.js.map +1 -0
  12. package/dist/commands/_next.d.ts +39 -0
  13. package/dist/commands/_next.js +77 -0
  14. package/dist/commands/_next.js.map +1 -0
  15. package/dist/commands/agent.d.ts +42 -0
  16. package/dist/commands/agent.js +218 -0
  17. package/dist/commands/agent.js.map +1 -0
  18. package/dist/commands/app.d.ts +2 -5
  19. package/dist/commands/app.js +229 -69
  20. package/dist/commands/app.js.map +1 -1
  21. package/dist/commands/auth.d.ts +70 -2
  22. package/dist/commands/auth.js +308 -33
  23. package/dist/commands/auth.js.map +1 -1
  24. package/dist/commands/docs.d.ts +54 -0
  25. package/dist/commands/docs.js +202 -0
  26. package/dist/commands/docs.js.map +1 -0
  27. package/dist/commands/doctor.d.ts +23 -0
  28. package/dist/commands/doctor.js +313 -0
  29. package/dist/commands/doctor.js.map +1 -0
  30. package/dist/commands/init.d.ts +38 -1
  31. package/dist/commands/init.js +259 -60
  32. package/dist/commands/init.js.map +1 -1
  33. package/dist/commands/listen.d.ts +30 -0
  34. package/dist/commands/listen.js +194 -0
  35. package/dist/commands/listen.js.map +1 -0
  36. package/dist/commands/manifest.d.ts +13 -1
  37. package/dist/commands/manifest.js +59 -7
  38. package/dist/commands/manifest.js.map +1 -1
  39. package/dist/commands/mcp.d.ts +25 -2
  40. package/dist/commands/mcp.js +120 -11
  41. package/dist/commands/mcp.js.map +1 -1
  42. package/dist/commands/sandbox.d.ts +35 -6
  43. package/dist/commands/sandbox.js +208 -9
  44. package/dist/commands/sandbox.js.map +1 -1
  45. package/dist/commands/setup.d.ts +39 -0
  46. package/dist/commands/setup.js +203 -0
  47. package/dist/commands/setup.js.map +1 -0
  48. package/dist/commands/tool.d.ts +109 -1
  49. package/dist/commands/tool.js +635 -47
  50. package/dist/commands/tool.js.map +1 -1
  51. package/dist/config.d.ts +30 -6
  52. package/dist/config.js +39 -8
  53. package/dist/config.js.map +1 -1
  54. package/dist/ctx.d.ts +5 -45
  55. package/dist/ctx.js +25 -160
  56. package/dist/ctx.js.map +1 -1
  57. package/dist/docs/index.json +1 -0
  58. package/dist/docs/pages/actions/call.md +300 -0
  59. package/dist/docs/pages/actions/catalog/airtable.md +737 -0
  60. package/dist/docs/pages/actions/catalog/arxiv.md +166 -0
  61. package/dist/docs/pages/actions/catalog/chainalysis-sanctions.md +125 -0
  62. package/dist/docs/pages/actions/catalog/coingecko.md +1558 -0
  63. package/dist/docs/pages/actions/catalog/deps-dev.md +465 -0
  64. package/dist/docs/pages/actions/catalog/dexscreener.md +568 -0
  65. package/dist/docs/pages/actions/catalog/discord.md +784 -0
  66. package/dist/docs/pages/actions/catalog/finnhub.md +776 -0
  67. package/dist/docs/pages/actions/catalog/frankfurter.md +438 -0
  68. package/dist/docs/pages/actions/catalog/github.md +1853 -0
  69. package/dist/docs/pages/actions/catalog/gmail.md +575 -0
  70. package/dist/docs/pages/actions/catalog/google-calendar.md +654 -0
  71. package/dist/docs/pages/actions/catalog/google-drive.md +502 -0
  72. package/dist/docs/pages/actions/catalog/google-sheets.md +700 -0
  73. package/dist/docs/pages/actions/catalog/hacker-news.md +542 -0
  74. package/dist/docs/pages/actions/catalog/http.md +824 -0
  75. package/dist/docs/pages/actions/catalog/hyperliquid.md +942 -0
  76. package/dist/docs/pages/actions/catalog/jira.md +920 -0
  77. package/dist/docs/pages/actions/catalog/kalshi.md +917 -0
  78. package/dist/docs/pages/actions/catalog/linear.md +1030 -0
  79. package/dist/docs/pages/actions/catalog/markets.md +21 -0
  80. package/dist/docs/pages/actions/catalog/morpho.md +247 -0
  81. package/dist/docs/pages/actions/catalog/notion.md +1077 -0
  82. package/dist/docs/pages/actions/catalog/nws.md +485 -0
  83. package/dist/docs/pages/actions/catalog/open-meteo.md +559 -0
  84. package/dist/docs/pages/actions/catalog/polymarket.md +1523 -0
  85. package/dist/docs/pages/actions/catalog/pushbullet.md +220 -0
  86. package/dist/docs/pages/actions/catalog/resend.md +307 -0
  87. package/dist/docs/pages/actions/catalog/s3.md +513 -0
  88. package/dist/docs/pages/actions/catalog/sec-edgar.md +487 -0
  89. package/dist/docs/pages/actions/catalog/slack.md +2629 -0
  90. package/dist/docs/pages/actions/catalog/stripe.md +1405 -0
  91. package/dist/docs/pages/actions/catalog/wikipedia.md +379 -0
  92. package/dist/docs/pages/actions/catalog.md +46 -0
  93. package/dist/docs/pages/actions/limits.md +50 -0
  94. package/dist/docs/pages/actions/model-tools.md +225 -0
  95. package/dist/docs/pages/actions/packs.md +148 -0
  96. package/dist/docs/pages/actions/settings.md +69 -0
  97. package/dist/docs/pages/actions/tools.md +244 -0
  98. package/dist/docs/pages/actions/triggers.md +149 -0
  99. package/dist/docs/pages/actions.md +88 -0
  100. package/dist/docs/pages/compat/anthropic.md +168 -0
  101. package/dist/docs/pages/compat/e2b.md +194 -0
  102. package/dist/docs/pages/compat/firecrawl.md +138 -0
  103. package/dist/docs/pages/compat/openai.md +168 -0
  104. package/dist/docs/pages/concepts/auth.md +151 -0
  105. package/dist/docs/pages/concepts/beta.md +55 -0
  106. package/dist/docs/pages/concepts/glossary.md +71 -0
  107. package/dist/docs/pages/concepts/ids.md +98 -0
  108. package/dist/docs/pages/concepts/jobs.md +229 -0
  109. package/dist/docs/pages/concepts/latency.md +138 -0
  110. package/dist/docs/pages/concepts/limits.md +191 -0
  111. package/dist/docs/pages/concepts/stack.md +59 -0
  112. package/dist/docs/pages/concepts/timing.md +86 -0
  113. package/dist/docs/pages/concepts/usage.md +110 -0
  114. package/dist/docs/pages/design/b3os-yaml.md +370 -0
  115. package/dist/docs/pages/design/deploy-from-github.md +122 -0
  116. package/dist/docs/pages/design/observability.md +134 -0
  117. package/dist/docs/pages/errors.md +1824 -0
  118. package/dist/docs/pages/infer/chat.md +570 -0
  119. package/dist/docs/pages/infer/limits.md +55 -0
  120. package/dist/docs/pages/infer/messages.md +185 -0
  121. package/dist/docs/pages/infer/responses.md +173 -0
  122. package/dist/docs/pages/infer/settings.md +154 -0
  123. package/dist/docs/pages/infer/speech.md +323 -0
  124. package/dist/docs/pages/infer.md +154 -0
  125. package/dist/docs/pages/introduction.md +162 -0
  126. package/dist/docs/pages/platform/addresses.md +174 -0
  127. package/dist/docs/pages/platform/call-log.md +99 -0
  128. package/dist/docs/pages/platform/custom-domains.md +104 -0
  129. package/dist/docs/pages/platform/keys.md +79 -0
  130. package/dist/docs/pages/platform/limits.md +57 -0
  131. package/dist/docs/pages/platform/members.md +101 -0
  132. package/dist/docs/pages/platform/requests.md +116 -0
  133. package/dist/docs/pages/platform/settings.md +129 -0
  134. package/dist/docs/pages/platform/webhooks.md +68 -0
  135. package/dist/docs/pages/platform.md +67 -0
  136. package/dist/docs/pages/quickstart/mcp.md +94 -0
  137. package/dist/docs/pages/quickstart/sandbox-agent.md +205 -0
  138. package/dist/docs/pages/quickstart/scrape.md +134 -0
  139. package/dist/docs/pages/quickstart.md +45 -0
  140. package/dist/docs/pages/render/inspections.md +162 -0
  141. package/dist/docs/pages/render/limits.md +72 -0
  142. package/dist/docs/pages/render/screenshots.md +179 -0
  143. package/dist/docs/pages/render/settings.md +431 -0
  144. package/dist/docs/pages/render/styles.md +342 -0
  145. package/dist/docs/pages/render/videos.md +272 -0
  146. package/dist/docs/pages/render.md +118 -0
  147. package/dist/docs/pages/routines/callables.md +174 -0
  148. package/dist/docs/pages/routines/definitions.md +361 -0
  149. package/dist/docs/pages/routines/limits.md +117 -0
  150. package/dist/docs/pages/routines/runs.md +328 -0
  151. package/dist/docs/pages/routines/settings.md +104 -0
  152. package/dist/docs/pages/routines/triggers.md +339 -0
  153. package/dist/docs/pages/routines.md +216 -0
  154. package/dist/docs/pages/sandboxes/agents.md +217 -0
  155. package/dist/docs/pages/sandboxes/commands.md +272 -0
  156. package/dist/docs/pages/sandboxes/images.md +166 -0
  157. package/dist/docs/pages/sandboxes/limits.md +143 -0
  158. package/dist/docs/pages/sandboxes/ports.md +260 -0
  159. package/dist/docs/pages/sandboxes/settings.md +358 -0
  160. package/dist/docs/pages/sandboxes/snapshots.md +423 -0
  161. package/dist/docs/pages/sandboxes/swarms.md +146 -0
  162. package/dist/docs/pages/sandboxes/volumes.md +131 -0
  163. package/dist/docs/pages/sandboxes.md +231 -0
  164. package/dist/docs/pages/sdks/cli.md +121 -0
  165. package/dist/docs/pages/sdks/mcp.md +169 -0
  166. package/dist/docs/pages/sdks/python.md +146 -0
  167. package/dist/docs/pages/sdks/typescript.md +202 -0
  168. package/dist/docs/pages/sdks.md +282 -0
  169. package/dist/docs/pages/settings.md +33 -0
  170. package/dist/docs/pages/vault/limits.md +46 -0
  171. package/dist/docs/pages/vault.md +133 -0
  172. package/dist/docs/pages/vision/agent-browser.md +115 -0
  173. package/dist/docs/pages/vision/crawl.md +333 -0
  174. package/dist/docs/pages/vision/extract.md +152 -0
  175. package/dist/docs/pages/vision/fetcher.md +15 -0
  176. package/dist/docs/pages/vision/limits.md +79 -0
  177. package/dist/docs/pages/vision/profiles.md +111 -0
  178. package/dist/docs/pages/vision/proxy.md +131 -0
  179. package/dist/docs/pages/vision/scrape.md +356 -0
  180. package/dist/docs/pages/vision/sessions.md +311 -0
  181. package/dist/docs/pages/vision/settings.md +656 -0
  182. package/dist/docs/pages/vision.md +175 -0
  183. package/dist/errors.d.ts +129 -0
  184. package/dist/errors.js +326 -0
  185. package/dist/errors.js.map +1 -0
  186. package/dist/main.d.ts +1 -1
  187. package/dist/main.js +26 -13
  188. package/dist/main.js.map +1 -1
  189. package/dist/manifest/domains.d.ts +50 -0
  190. package/dist/manifest/domains.js +159 -0
  191. package/dist/manifest/domains.js.map +1 -0
  192. package/dist/manifest/link.d.ts +20 -0
  193. package/dist/manifest/link.js +24 -0
  194. package/dist/manifest/link.js.map +1 -0
  195. package/dist/manifest/record.d.ts +1 -1
  196. package/dist/tool/archive.d.ts +33 -0
  197. package/dist/tool/archive.js +174 -0
  198. package/dist/tool/archive.js.map +1 -0
  199. package/dist/tool/calls.d.ts +46 -0
  200. package/dist/tool/calls.js +274 -0
  201. package/dist/tool/calls.js.map +1 -0
  202. package/dist/tool/checks.d.ts +21 -0
  203. package/dist/tool/checks.js +145 -0
  204. package/dist/tool/checks.js.map +1 -0
  205. package/dist/tool/elf.d.ts +19 -0
  206. package/dist/tool/elf.js +107 -0
  207. package/dist/tool/elf.js.map +1 -0
  208. package/dist/tool/predict.d.ts +8 -0
  209. package/dist/tool/predict.js +38 -0
  210. package/dist/tool/predict.js.map +1 -0
  211. package/dist/tool/ustar.d.ts +5 -0
  212. package/dist/tool/ustar.js +220 -0
  213. package/dist/tool/ustar.js.map +1 -0
  214. package/package.json +6 -5
@@ -0,0 +1,784 @@
1
+ # Discord
2
+
3
+ > The io.b3os/discord pack: 8 actions with call snippets, fixture outputs, connection setup and error codes, generated from version 1.0.0.
4
+
5
+ Source: https://docs.beta.b3os.org/actions/catalog/discord.md
6
+
7
+ <a id="discord"></a>
8
+
9
+ `io.b3os/discord` 1.0.0 · `messaging`, `community` · MIT
10
+
11
+ Post, read, edit, react to and delete messages, start threads, and list a server's channels with your own Discord bot's token (API v10). The bot must be in the server with permission for each channel (View Channel, Send Messages, Read Message History, Add Reactions, Manage Messages to delete others' messages). Reading message content needs the Message Content intent enabled for the bot.
12
+
13
+ Every call's result carries `upstream_status` and `timing`: `validate_ms`, `inject_ms`, `render_ms`, `upstream_ms`, `map_ms` and `total_ms`. `upstream` is the service's time; the others are B3OS's own ([call actions](https://docs.beta.b3os.org/actions/call)). The snippets below show no timing values, because a fixture records none.
14
+
15
+ ## Connection
16
+
17
+ `bot`, type `api_key`: Discord bot token.
18
+
19
+ The token of your own bot from the Discord Developer Portal (Applications, Bot, Reset Token). It is sent as Authorization: Bot <token>.
20
+
21
+ How to get one: [discord.com](https://discord.com/developers/docs/topics/oauth2#bots).
22
+
23
+ The credential is sent only to `discord.com`.
24
+
25
+ Store the credential once as a [vault connection](https://docs.beta.b3os.org/vault) for this pack and key, then name its id in a call's `connections`. Leave the key out and B3OS uses the project's newest connection for the pack and key without a `subject` ([connections](https://docs.beta.b3os.org/actions/call#connections)).
26
+
27
+ Hosts it reaches: `discord.com`.
28
+
29
+ ## Actions
30
+
31
+ | Action | Effect | MCP tool | Title |
32
+ |---|---|---|---|
33
+ | [`get-bot-user`](https://docs.beta.b3os.org/actions/catalog/discord#discord-get-bot-user) | read | `discord__get-bot-user` | Get bot user |
34
+ | [`send-message`](https://docs.beta.b3os.org/actions/catalog/discord#discord-send-message) | write | `discord__send-message` | Send message |
35
+ | [`get-messages`](https://docs.beta.b3os.org/actions/catalog/discord#discord-get-messages) | read | `discord__get-messages` | Get messages |
36
+ | [`edit-message`](https://docs.beta.b3os.org/actions/catalog/discord#discord-edit-message) | write | `discord__edit-message` | Edit message |
37
+ | [`delete-message`](https://docs.beta.b3os.org/actions/catalog/discord#discord-delete-message) | irreversible | `discord__delete-message` | Delete message |
38
+ | [`add-reaction`](https://docs.beta.b3os.org/actions/catalog/discord#discord-add-reaction) | write | `discord__add-reaction` | Add reaction |
39
+ | [`create-thread`](https://docs.beta.b3os.org/actions/catalog/discord#discord-create-thread) | write | `discord__create-thread` | Start thread from message |
40
+ | [`list-guild-channels`](https://docs.beta.b3os.org/actions/catalog/discord#discord-list-guild-channels) | read | `discord__list-guild-channels` | List server channels |
41
+
42
+ <h3 id="discord-get-bot-user"><code>get-bot-user</code></h3>
43
+
44
+ **Get bot user.** The bot's own user: id, username and display name. A cheap way to check the token.
45
+
46
+ Ref `io.b3os/discord/get-bot-user@1.0.0` · effect `read` · connection `bot` · MCP tool `discord__get-bot-user`
47
+
48
+ **curl**
49
+
50
+ ```bash
51
+ curl -s https://beta-api.b3os.org/v1/actions/call \
52
+ -H "Authorization: Bearer $B3OS_API_KEY" \
53
+ -H "Content-Type: application/json" \
54
+ -d '{
55
+ "ref": "io.b3os/discord/get-bot-user@1",
56
+ "input": {},
57
+ "connections": {"bot": "conn_01m5t6cbgdjs1ketgcqwa2sne8"}
58
+ }'
59
+ ```
60
+ **TypeScript**
61
+
62
+ ```ts
63
+ import { B3OS } from "@b3os/sdk";
64
+
65
+ const b3os = new B3OS();
66
+ const result = await b3os.actions.call({
67
+ ref: "io.b3os/discord/get-bot-user@1",
68
+ input: {},
69
+ connections: { bot: "conn_01m5t6cbgdjs1ketgcqwa2sne8" },
70
+ });
71
+ console.log(result.output);
72
+ ```
73
+ **Python**
74
+
75
+ ```python
76
+ from b3os import B3OS
77
+
78
+ b3os = B3OS()
79
+ result = b3os.actions.call({
80
+ "ref": "io.b3os/discord/get-bot-user@1",
81
+ "input": {},
82
+ "connections": {"bot": "conn_01m5t6cbgdjs1ketgcqwa2sne8"},
83
+ })
84
+ print(result["output"])
85
+ ```
86
+ **MCP**
87
+
88
+ ```json
89
+ {
90
+ "method": "tools/call",
91
+ "params": {"name": "discord__get-bot-user", "arguments": {}}
92
+ }
93
+ ```
94
+
95
+ Expose the pack as tools with `--packs discord` on the local server or `?packs=discord` on the remote URL, and the agent calls `discord__get-bot-user` with the action's input. The tool uses your newest connection for each key without a `subject`. Without exposing the pack, `actions_call` takes the same input with `ref`.
96
+
97
+ Output, labeled `fixture`: Get bot user (documented response shape, example values). From the bundle's `fixtures/get-bot-user.json`, not a live call.
98
+
99
+ ```json
100
+ {
101
+ "id": "1193000000000000001",
102
+ "username": "deploybot",
103
+ "global_name": "Deploy Bot",
104
+ "bot": true
105
+ }
106
+ ```
107
+
108
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
109
+
110
+ | `pack_error.code` | Service status | Retryable | Message |
111
+ |---|---|---|---|
112
+ | `not_found` | 404 | no | built from the service's response |
113
+ | `connection_unauthorized` | 401 | no | Discord rejected the bot token. |
114
+ | `forbidden` | 403 | no | built from the service's response |
115
+ | `rate_limited` | 429 | yes | built from the service's response |
116
+ | `invalid_request` | 400 | no | built from the service's response |
117
+
118
+ <h3 id="discord-send-message"><code>send-message</code></h3>
119
+
120
+ **Send message.** Post a message (up to 2,000 characters of Discord Markdown) in a text channel or thread, optionally as a reply. Mentions in the text do not ping anyone unless allow_mentions is true. Returns the message id. Not idempotent.
121
+
122
+ Ref `io.b3os/discord/send-message@1.0.0` · effect `write` · connection `bot` · MCP tool `discord__send-message`
123
+
124
+ **curl**
125
+
126
+ ```bash
127
+ curl -s https://beta-api.b3os.org/v1/actions/call \
128
+ -H "Authorization: Bearer $B3OS_API_KEY" \
129
+ -H "Idempotency-Key: 7c1e2f6a-1d43-4a8e-b2a5-3f0c9d5e8b11" \
130
+ -H "Content-Type: application/json" \
131
+ -d '{
132
+ "ref": "io.b3os/discord/send-message@1",
133
+ "input": {
134
+ "channel_id": "1192000000000000001",
135
+ "content": "Deploy finished: **v2.4.0** is live."
136
+ },
137
+ "connections": {"bot": "conn_01m5t6cbgdjs1ketgcqwa2sne8"}
138
+ }'
139
+ ```
140
+ **TypeScript**
141
+
142
+ ```ts
143
+ import { B3OS } from "@b3os/sdk";
144
+
145
+ const b3os = new B3OS();
146
+ const result = await b3os.actions.call({
147
+ ref: "io.b3os/discord/send-message@1",
148
+ input: {
149
+ channel_id: "1192000000000000001",
150
+ content: "Deploy finished: **v2.4.0** is live.",
151
+ },
152
+ connections: { bot: "conn_01m5t6cbgdjs1ketgcqwa2sne8" },
153
+ }, { idempotencyKey: crypto.randomUUID() });
154
+ console.log(result.output);
155
+ ```
156
+ **Python**
157
+
158
+ ```python
159
+ import uuid
160
+ from b3os import B3OS
161
+
162
+ b3os = B3OS()
163
+ result = b3os.actions.call({
164
+ "ref": "io.b3os/discord/send-message@1",
165
+ "input": {
166
+ "channel_id": "1192000000000000001",
167
+ "content": "Deploy finished: **v2.4.0** is live.",
168
+ },
169
+ "connections": {"bot": "conn_01m5t6cbgdjs1ketgcqwa2sne8"},
170
+ }, idempotency_key=str(uuid.uuid4()))
171
+ print(result["output"])
172
+ ```
173
+ **MCP**
174
+
175
+ ```json
176
+ {
177
+ "method": "tools/call",
178
+ "params": {
179
+ "name": "discord__send-message",
180
+ "arguments": {
181
+ "channel_id": "1192000000000000001",
182
+ "content": "Deploy finished: **v2.4.0** is live."
183
+ }
184
+ }
185
+ }
186
+ ```
187
+
188
+ Expose the pack as tools with `--packs discord` on the local server or `?packs=discord` on the remote URL, and the agent calls `discord__send-message` with the action's input. The tool uses your newest connection for each key without a `subject`. Without exposing the pack, `actions_call` takes the same input with `ref`.
189
+
190
+ Output, labeled `fixture`: Send message (documented response shape, example values). From the bundle's `fixtures/send-message.json`, not a live call.
191
+
192
+ ```json
193
+ {
194
+ "id": "1194000000000000001",
195
+ "channel_id": "1192000000000000001",
196
+ "author": "deploybot",
197
+ "author_id": "1193000000000000001",
198
+ "content": "Deploy finished: **v2.4.0** is live.",
199
+ "timestamp": "2026-10-26T08:00:00.000000+00:00",
200
+ "edited_timestamp": null,
201
+ "attachments": [],
202
+ "thread_id": null
203
+ }
204
+ ```
205
+
206
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
207
+
208
+ | `pack_error.code` | Service status | Retryable | Message |
209
+ |---|---|---|---|
210
+ | `not_found` | 404 | no | built from the service's response |
211
+ | `connection_unauthorized` | 401 | no | Discord rejected the bot token. |
212
+ | `forbidden` | 403 | no | built from the service's response |
213
+ | `rate_limited` | 429 | yes | built from the service's response |
214
+ | `invalid_request` | 400 | no | built from the service's response |
215
+
216
+ <h3 id="discord-get-messages"><code>get-messages</code></h3>
217
+
218
+ **Get messages.** Recent messages in a channel, newest first (up to 100), or those before or after a message id for paging. Content is empty unless the bot has the Message Content intent.
219
+
220
+ Ref `io.b3os/discord/get-messages@1.0.0` · effect `read` · connection `bot` · MCP tool `discord__get-messages`
221
+
222
+ **curl**
223
+
224
+ ```bash
225
+ curl -s https://beta-api.b3os.org/v1/actions/call \
226
+ -H "Authorization: Bearer $B3OS_API_KEY" \
227
+ -H "Content-Type: application/json" \
228
+ -d '{
229
+ "ref": "io.b3os/discord/get-messages@1",
230
+ "input": {"channel_id": "1192000000000000001", "limit": 2},
231
+ "connections": {"bot": "conn_01m5t6cbgdjs1ketgcqwa2sne8"}
232
+ }'
233
+ ```
234
+ **TypeScript**
235
+
236
+ ```ts
237
+ import { B3OS } from "@b3os/sdk";
238
+
239
+ const b3os = new B3OS();
240
+ const result = await b3os.actions.call({
241
+ ref: "io.b3os/discord/get-messages@1",
242
+ input: { channel_id: "1192000000000000001", limit: 2 },
243
+ connections: { bot: "conn_01m5t6cbgdjs1ketgcqwa2sne8" },
244
+ });
245
+ console.log(result.output);
246
+ ```
247
+ **Python**
248
+
249
+ ```python
250
+ from b3os import B3OS
251
+
252
+ b3os = B3OS()
253
+ result = b3os.actions.call({
254
+ "ref": "io.b3os/discord/get-messages@1",
255
+ "input": {"channel_id": "1192000000000000001", "limit": 2},
256
+ "connections": {"bot": "conn_01m5t6cbgdjs1ketgcqwa2sne8"},
257
+ })
258
+ print(result["output"])
259
+ ```
260
+ **MCP**
261
+
262
+ ```json
263
+ {
264
+ "method": "tools/call",
265
+ "params": {
266
+ "name": "discord__get-messages",
267
+ "arguments": {"channel_id": "1192000000000000001", "limit": 2}
268
+ }
269
+ }
270
+ ```
271
+
272
+ Expose the pack as tools with `--packs discord` on the local server or `?packs=discord` on the remote URL, and the agent calls `discord__get-messages` with the action's input. The tool uses your newest connection for each key without a `subject`. Without exposing the pack, `actions_call` takes the same input with `ref`.
273
+
274
+ Output, labeled `fixture`: Get messages (documented response shape, example values). From the bundle's `fixtures/get-messages.json`, not a live call.
275
+
276
+ ```json
277
+ {
278
+ "messages": [
279
+ {
280
+ "id": "1194000000000000002",
281
+ "channel_id": "1192000000000000001",
282
+ "author": "mona",
283
+ "author_id": "1193000000000000002",
284
+ "content": "Rolling back.",
285
+ "timestamp": "2026-10-26T08:00:00.000000+00:00",
286
+ "edited_timestamp": null,
287
+ "attachments": [],
288
+ "thread_id": null
289
+ },
290
+ {
291
+ "id": "1194000000000000001",
292
+ "channel_id": "1192000000000000001",
293
+ "author": "deploybot",
294
+ "author_id": "1193000000000000001",
295
+ "content": "Deploy finished: **v2.4.0** is live.",
296
+ "timestamp": "2026-10-26T08:00:00.000000+00:00",
297
+ "edited_timestamp": null,
298
+ "attachments": [],
299
+ "thread_id": "1195000000000000001"
300
+ }
301
+ ]
302
+ }
303
+ ```
304
+
305
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
306
+
307
+ | `pack_error.code` | Service status | Retryable | Message |
308
+ |---|---|---|---|
309
+ | `not_found` | 404 | no | built from the service's response |
310
+ | `connection_unauthorized` | 401 | no | Discord rejected the bot token. |
311
+ | `forbidden` | 403 | no | built from the service's response |
312
+ | `rate_limited` | 429 | yes | built from the service's response |
313
+ | `invalid_request` | 400 | no | built from the service's response |
314
+
315
+ <h3 id="discord-edit-message"><code>edit-message</code></h3>
316
+
317
+ **Edit message.** Replace the text of a message the bot posted.
318
+
319
+ Ref `io.b3os/discord/edit-message@1.0.0` · effect `write` · connection `bot` · MCP tool `discord__edit-message`
320
+
321
+ **curl**
322
+
323
+ ```bash
324
+ curl -s https://beta-api.b3os.org/v1/actions/call \
325
+ -H "Authorization: Bearer $B3OS_API_KEY" \
326
+ -H "Idempotency-Key: 7c1e2f6a-1d43-4a8e-b2a5-3f0c9d5e8b11" \
327
+ -H "Content-Type: application/json" \
328
+ -d '{
329
+ "ref": "io.b3os/discord/edit-message@1",
330
+ "input": {
331
+ "channel_id": "1192000000000000001",
332
+ "message_id": "1194000000000000001",
333
+ "content": "Deploy finished: **v2.4.1** is live."
334
+ },
335
+ "connections": {"bot": "conn_01m5t6cbgdjs1ketgcqwa2sne8"}
336
+ }'
337
+ ```
338
+ **TypeScript**
339
+
340
+ ```ts
341
+ import { B3OS } from "@b3os/sdk";
342
+
343
+ const b3os = new B3OS();
344
+ const result = await b3os.actions.call({
345
+ ref: "io.b3os/discord/edit-message@1",
346
+ input: {
347
+ channel_id: "1192000000000000001",
348
+ message_id: "1194000000000000001",
349
+ content: "Deploy finished: **v2.4.1** is live.",
350
+ },
351
+ connections: { bot: "conn_01m5t6cbgdjs1ketgcqwa2sne8" },
352
+ }, { idempotencyKey: crypto.randomUUID() });
353
+ console.log(result.output);
354
+ ```
355
+ **Python**
356
+
357
+ ```python
358
+ import uuid
359
+ from b3os import B3OS
360
+
361
+ b3os = B3OS()
362
+ result = b3os.actions.call({
363
+ "ref": "io.b3os/discord/edit-message@1",
364
+ "input": {
365
+ "channel_id": "1192000000000000001",
366
+ "message_id": "1194000000000000001",
367
+ "content": "Deploy finished: **v2.4.1** is live.",
368
+ },
369
+ "connections": {"bot": "conn_01m5t6cbgdjs1ketgcqwa2sne8"},
370
+ }, idempotency_key=str(uuid.uuid4()))
371
+ print(result["output"])
372
+ ```
373
+ **MCP**
374
+
375
+ ```json
376
+ {
377
+ "method": "tools/call",
378
+ "params": {
379
+ "name": "discord__edit-message",
380
+ "arguments": {
381
+ "channel_id": "1192000000000000001",
382
+ "message_id": "1194000000000000001",
383
+ "content": "Deploy finished: **v2.4.1** is live."
384
+ }
385
+ }
386
+ }
387
+ ```
388
+
389
+ Expose the pack as tools with `--packs discord` on the local server or `?packs=discord` on the remote URL, and the agent calls `discord__edit-message` with the action's input. The tool uses your newest connection for each key without a `subject`. Without exposing the pack, `actions_call` takes the same input with `ref`.
390
+
391
+ Output, labeled `fixture`: Edit message (documented response shape, example values). From the bundle's `fixtures/edit-message.json`, not a live call.
392
+
393
+ ```json
394
+ {
395
+ "id": "1194000000000000001",
396
+ "channel_id": "1192000000000000001",
397
+ "author": "deploybot",
398
+ "author_id": "1193000000000000001",
399
+ "content": "Deploy finished: **v2.4.1** is live.",
400
+ "timestamp": "2026-10-26T08:00:00.000000+00:00",
401
+ "edited_timestamp": "2026-10-26T08:05:00.000000+00:00",
402
+ "attachments": [],
403
+ "thread_id": null
404
+ }
405
+ ```
406
+
407
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
408
+
409
+ | `pack_error.code` | Service status | Retryable | Message |
410
+ |---|---|---|---|
411
+ | `not_found` | 404 | no | built from the service's response |
412
+ | `connection_unauthorized` | 401 | no | Discord rejected the bot token. |
413
+ | `forbidden` | 403 | no | built from the service's response |
414
+ | `rate_limited` | 429 | yes | built from the service's response |
415
+ | `invalid_request` | 400 | no | built from the service's response |
416
+
417
+ <h3 id="discord-delete-message"><code>delete-message</code></h3>
418
+
419
+ **Delete message.** Delete a message. The bot can delete its own messages; others' need Manage Messages. Cannot be undone.
420
+
421
+ Ref `io.b3os/discord/delete-message@1.0.0` · effect `irreversible` · connection `bot` · MCP tool `discord__delete-message`
422
+
423
+ **curl**
424
+
425
+ ```bash
426
+ curl -s https://beta-api.b3os.org/v1/actions/call \
427
+ -H "Authorization: Bearer $B3OS_API_KEY" \
428
+ -H "Idempotency-Key: 7c1e2f6a-1d43-4a8e-b2a5-3f0c9d5e8b11" \
429
+ -H "Content-Type: application/json" \
430
+ -d '{
431
+ "ref": "io.b3os/discord/delete-message@1",
432
+ "input": {
433
+ "channel_id": "1192000000000000001",
434
+ "message_id": "1194000000000000001"
435
+ },
436
+ "connections": {"bot": "conn_01m5t6cbgdjs1ketgcqwa2sne8"}
437
+ }'
438
+ ```
439
+ **TypeScript**
440
+
441
+ ```ts
442
+ import { B3OS } from "@b3os/sdk";
443
+
444
+ const b3os = new B3OS();
445
+ const result = await b3os.actions.call({
446
+ ref: "io.b3os/discord/delete-message@1",
447
+ input: {
448
+ channel_id: "1192000000000000001",
449
+ message_id: "1194000000000000001",
450
+ },
451
+ connections: { bot: "conn_01m5t6cbgdjs1ketgcqwa2sne8" },
452
+ }, { idempotencyKey: crypto.randomUUID() });
453
+ console.log(result.output);
454
+ ```
455
+ **Python**
456
+
457
+ ```python
458
+ import uuid
459
+ from b3os import B3OS
460
+
461
+ b3os = B3OS()
462
+ result = b3os.actions.call({
463
+ "ref": "io.b3os/discord/delete-message@1",
464
+ "input": {
465
+ "channel_id": "1192000000000000001",
466
+ "message_id": "1194000000000000001",
467
+ },
468
+ "connections": {"bot": "conn_01m5t6cbgdjs1ketgcqwa2sne8"},
469
+ }, idempotency_key=str(uuid.uuid4()))
470
+ print(result["output"])
471
+ ```
472
+ **MCP**
473
+
474
+ ```json
475
+ {
476
+ "method": "tools/call",
477
+ "params": {
478
+ "name": "discord__delete-message",
479
+ "arguments": {
480
+ "channel_id": "1192000000000000001",
481
+ "message_id": "1194000000000000001"
482
+ }
483
+ }
484
+ }
485
+ ```
486
+
487
+ Expose the pack as tools with `--packs discord` on the local server or `?packs=discord` on the remote URL, and the agent calls `discord__delete-message` with the action's input. The tool uses your newest connection for each key without a `subject`. Without exposing the pack, `actions_call` takes the same input with `ref`.
488
+
489
+ Output, labeled `fixture`: Delete message (documented response shape, example values). From the bundle's `fixtures/delete-message.json`, not a live call.
490
+
491
+ ```json
492
+ {"deleted": true, "message_id": "1194000000000000001"}
493
+ ```
494
+
495
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
496
+
497
+ | `pack_error.code` | Service status | Retryable | Message |
498
+ |---|---|---|---|
499
+ | `not_found` | 404 | no | built from the service's response |
500
+ | `connection_unauthorized` | 401 | no | Discord rejected the bot token. |
501
+ | `forbidden` | 403 | no | built from the service's response |
502
+ | `rate_limited` | 429 | yes | built from the service's response |
503
+ | `invalid_request` | 400 | no | built from the service's response |
504
+
505
+ <h3 id="discord-add-reaction"><code>add-reaction</code></h3>
506
+
507
+ **Add reaction.** React to a message with a Unicode emoji (for example a check mark) or a custom server emoji written name:id.
508
+
509
+ Ref `io.b3os/discord/add-reaction@1.0.0` · effect `write` · connection `bot` · MCP tool `discord__add-reaction`
510
+
511
+ **curl**
512
+
513
+ ```bash
514
+ curl -s https://beta-api.b3os.org/v1/actions/call \
515
+ -H "Authorization: Bearer $B3OS_API_KEY" \
516
+ -H "Idempotency-Key: 7c1e2f6a-1d43-4a8e-b2a5-3f0c9d5e8b11" \
517
+ -H "Content-Type: application/json" \
518
+ -d '{
519
+ "ref": "io.b3os/discord/add-reaction@1",
520
+ "input": {
521
+ "channel_id": "1192000000000000001",
522
+ "message_id": "1194000000000000001",
523
+ "emoji": "✅"
524
+ },
525
+ "connections": {"bot": "conn_01m5t6cbgdjs1ketgcqwa2sne8"}
526
+ }'
527
+ ```
528
+ **TypeScript**
529
+
530
+ ```ts
531
+ import { B3OS } from "@b3os/sdk";
532
+
533
+ const b3os = new B3OS();
534
+ const result = await b3os.actions.call({
535
+ ref: "io.b3os/discord/add-reaction@1",
536
+ input: {
537
+ channel_id: "1192000000000000001",
538
+ message_id: "1194000000000000001",
539
+ emoji: "✅",
540
+ },
541
+ connections: { bot: "conn_01m5t6cbgdjs1ketgcqwa2sne8" },
542
+ }, { idempotencyKey: crypto.randomUUID() });
543
+ console.log(result.output);
544
+ ```
545
+ **Python**
546
+
547
+ ```python
548
+ import uuid
549
+ from b3os import B3OS
550
+
551
+ b3os = B3OS()
552
+ result = b3os.actions.call({
553
+ "ref": "io.b3os/discord/add-reaction@1",
554
+ "input": {
555
+ "channel_id": "1192000000000000001",
556
+ "message_id": "1194000000000000001",
557
+ "emoji": "✅",
558
+ },
559
+ "connections": {"bot": "conn_01m5t6cbgdjs1ketgcqwa2sne8"},
560
+ }, idempotency_key=str(uuid.uuid4()))
561
+ print(result["output"])
562
+ ```
563
+ **MCP**
564
+
565
+ ```json
566
+ {
567
+ "method": "tools/call",
568
+ "params": {
569
+ "name": "discord__add-reaction",
570
+ "arguments": {
571
+ "channel_id": "1192000000000000001",
572
+ "message_id": "1194000000000000001",
573
+ "emoji": "✅"
574
+ }
575
+ }
576
+ }
577
+ ```
578
+
579
+ Expose the pack as tools with `--packs discord` on the local server or `?packs=discord` on the remote URL, and the agent calls `discord__add-reaction` with the action's input. The tool uses your newest connection for each key without a `subject`. Without exposing the pack, `actions_call` takes the same input with `ref`.
580
+
581
+ Output, labeled `fixture`: Add reaction (documented response shape, example values). From the bundle's `fixtures/add-reaction.json`, not a live call.
582
+
583
+ ```json
584
+ {"reacted": true}
585
+ ```
586
+
587
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
588
+
589
+ | `pack_error.code` | Service status | Retryable | Message |
590
+ |---|---|---|---|
591
+ | `not_found` | 404 | no | built from the service's response |
592
+ | `connection_unauthorized` | 401 | no | Discord rejected the bot token. |
593
+ | `forbidden` | 403 | no | built from the service's response |
594
+ | `rate_limited` | 429 | yes | built from the service's response |
595
+ | `invalid_request` | 400 | no | built from the service's response |
596
+
597
+ <h3 id="discord-create-thread"><code>create-thread</code></h3>
598
+
599
+ **Start thread from message.** Start a public thread from an existing message, with a name and an auto-archive time (1 hour to 1 week of inactivity). Returns the thread id, which send-message accepts as a channel.
600
+
601
+ Ref `io.b3os/discord/create-thread@1.0.0` · effect `write` · connection `bot` · MCP tool `discord__create-thread`
602
+
603
+ **curl**
604
+
605
+ ```bash
606
+ curl -s https://beta-api.b3os.org/v1/actions/call \
607
+ -H "Authorization: Bearer $B3OS_API_KEY" \
608
+ -H "Idempotency-Key: 7c1e2f6a-1d43-4a8e-b2a5-3f0c9d5e8b11" \
609
+ -H "Content-Type: application/json" \
610
+ -d '{
611
+ "ref": "io.b3os/discord/create-thread@1",
612
+ "input": {
613
+ "channel_id": "1192000000000000001",
614
+ "message_id": "1194000000000000001",
615
+ "name": "v2.4.0 follow-up"
616
+ },
617
+ "connections": {"bot": "conn_01m5t6cbgdjs1ketgcqwa2sne8"}
618
+ }'
619
+ ```
620
+ **TypeScript**
621
+
622
+ ```ts
623
+ import { B3OS } from "@b3os/sdk";
624
+
625
+ const b3os = new B3OS();
626
+ const result = await b3os.actions.call({
627
+ ref: "io.b3os/discord/create-thread@1",
628
+ input: {
629
+ channel_id: "1192000000000000001",
630
+ message_id: "1194000000000000001",
631
+ name: "v2.4.0 follow-up",
632
+ },
633
+ connections: { bot: "conn_01m5t6cbgdjs1ketgcqwa2sne8" },
634
+ }, { idempotencyKey: crypto.randomUUID() });
635
+ console.log(result.output);
636
+ ```
637
+ **Python**
638
+
639
+ ```python
640
+ import uuid
641
+ from b3os import B3OS
642
+
643
+ b3os = B3OS()
644
+ result = b3os.actions.call({
645
+ "ref": "io.b3os/discord/create-thread@1",
646
+ "input": {
647
+ "channel_id": "1192000000000000001",
648
+ "message_id": "1194000000000000001",
649
+ "name": "v2.4.0 follow-up",
650
+ },
651
+ "connections": {"bot": "conn_01m5t6cbgdjs1ketgcqwa2sne8"},
652
+ }, idempotency_key=str(uuid.uuid4()))
653
+ print(result["output"])
654
+ ```
655
+ **MCP**
656
+
657
+ ```json
658
+ {
659
+ "method": "tools/call",
660
+ "params": {
661
+ "name": "discord__create-thread",
662
+ "arguments": {
663
+ "channel_id": "1192000000000000001",
664
+ "message_id": "1194000000000000001",
665
+ "name": "v2.4.0 follow-up"
666
+ }
667
+ }
668
+ }
669
+ ```
670
+
671
+ Expose the pack as tools with `--packs discord` on the local server or `?packs=discord` on the remote URL, and the agent calls `discord__create-thread` with the action's input. The tool uses your newest connection for each key without a `subject`. Without exposing the pack, `actions_call` takes the same input with `ref`.
672
+
673
+ Output, labeled `fixture`: Start thread from message (documented response shape, example values). From the bundle's `fixtures/create-thread.json`, not a live call.
674
+
675
+ ```json
676
+ {
677
+ "id": "1195000000000000001",
678
+ "name": "v2.4.0 follow-up",
679
+ "parent_id": "1192000000000000001"
680
+ }
681
+ ```
682
+
683
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
684
+
685
+ | `pack_error.code` | Service status | Retryable | Message |
686
+ |---|---|---|---|
687
+ | `not_found` | 404 | no | built from the service's response |
688
+ | `connection_unauthorized` | 401 | no | Discord rejected the bot token. |
689
+ | `forbidden` | 403 | no | built from the service's response |
690
+ | `rate_limited` | 429 | yes | built from the service's response |
691
+ | `invalid_request` | 400 | no | built from the service's response |
692
+
693
+ <h3 id="discord-list-guild-channels"><code>list-guild-channels</code></h3>
694
+
695
+ **List server channels.** The channels of a server (guild): id, name, type (0 text, 2 voice, 4 category, 5 announcement, 15 forum), parent category and position. Threads are not included.
696
+
697
+ Ref `io.b3os/discord/list-guild-channels@1.0.0` · effect `read` · connection `bot` · MCP tool `discord__list-guild-channels`
698
+
699
+ **curl**
700
+
701
+ ```bash
702
+ curl -s https://beta-api.b3os.org/v1/actions/call \
703
+ -H "Authorization: Bearer $B3OS_API_KEY" \
704
+ -H "Content-Type: application/json" \
705
+ -d '{
706
+ "ref": "io.b3os/discord/list-guild-channels@1",
707
+ "input": {"guild_id": "1191000000000000001"},
708
+ "connections": {"bot": "conn_01m5t6cbgdjs1ketgcqwa2sne8"}
709
+ }'
710
+ ```
711
+ **TypeScript**
712
+
713
+ ```ts
714
+ import { B3OS } from "@b3os/sdk";
715
+
716
+ const b3os = new B3OS();
717
+ const result = await b3os.actions.call({
718
+ ref: "io.b3os/discord/list-guild-channels@1",
719
+ input: { guild_id: "1191000000000000001" },
720
+ connections: { bot: "conn_01m5t6cbgdjs1ketgcqwa2sne8" },
721
+ });
722
+ console.log(result.output);
723
+ ```
724
+ **Python**
725
+
726
+ ```python
727
+ from b3os import B3OS
728
+
729
+ b3os = B3OS()
730
+ result = b3os.actions.call({
731
+ "ref": "io.b3os/discord/list-guild-channels@1",
732
+ "input": {"guild_id": "1191000000000000001"},
733
+ "connections": {"bot": "conn_01m5t6cbgdjs1ketgcqwa2sne8"},
734
+ })
735
+ print(result["output"])
736
+ ```
737
+ **MCP**
738
+
739
+ ```json
740
+ {
741
+ "method": "tools/call",
742
+ "params": {
743
+ "name": "discord__list-guild-channels",
744
+ "arguments": {"guild_id": "1191000000000000001"}
745
+ }
746
+ }
747
+ ```
748
+
749
+ Expose the pack as tools with `--packs discord` on the local server or `?packs=discord` on the remote URL, and the agent calls `discord__list-guild-channels` with the action's input. The tool uses your newest connection for each key without a `subject`. Without exposing the pack, `actions_call` takes the same input with `ref`.
750
+
751
+ Output, labeled `fixture`: List server channels (documented response shape, example values). From the bundle's `fixtures/list-guild-channels.json`, not a live call.
752
+
753
+ ```json
754
+ {
755
+ "channels": [
756
+ {
757
+ "id": "1192000000000000000",
758
+ "name": "Engineering",
759
+ "type": 4,
760
+ "parent_id": null,
761
+ "position": 0,
762
+ "topic": null
763
+ },
764
+ {
765
+ "id": "1192000000000000001",
766
+ "name": "deploys",
767
+ "type": 0,
768
+ "parent_id": "1192000000000000000",
769
+ "position": 1,
770
+ "topic": "Release train"
771
+ }
772
+ ]
773
+ }
774
+ ```
775
+
776
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
777
+
778
+ | `pack_error.code` | Service status | Retryable | Message |
779
+ |---|---|---|---|
780
+ | `not_found` | 404 | no | built from the service's response |
781
+ | `connection_unauthorized` | 401 | no | Discord rejected the bot token. |
782
+ | `forbidden` | 403 | no | built from the service's response |
783
+ | `rate_limited` | 429 | yes | built from the service's response |
784
+ | `invalid_request` | 400 | no | built from the service's response |