@b3os/cli 0.2.0 → 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.
- package/README.md +87 -7
- package/assets/b3os-run.py +137 -0
- package/assets/skill/b3os/SKILL.md +111 -0
- package/dist/commands/_agents.d.ts +14 -0
- package/dist/commands/_agents.js +33 -0
- package/dist/commands/_agents.js.map +1 -0
- package/dist/commands/_common.js +6 -2
- package/dist/commands/_common.js.map +1 -1
- package/dist/commands/_context.d.ts +49 -0
- package/dist/commands/_context.js +260 -0
- package/dist/commands/_context.js.map +1 -0
- package/dist/commands/_next.d.ts +39 -0
- package/dist/commands/_next.js +77 -0
- package/dist/commands/_next.js.map +1 -0
- package/dist/commands/agent.d.ts +42 -0
- package/dist/commands/agent.js +218 -0
- package/dist/commands/agent.js.map +1 -0
- package/dist/commands/app.d.ts +2 -0
- package/dist/commands/app.js +559 -54
- package/dist/commands/app.js.map +1 -1
- package/dist/commands/auth.d.ts +88 -2
- package/dist/commands/auth.js +354 -44
- package/dist/commands/auth.js.map +1 -1
- package/dist/commands/docs.d.ts +54 -0
- package/dist/commands/docs.js +202 -0
- package/dist/commands/docs.js.map +1 -0
- package/dist/commands/doctor.d.ts +23 -0
- package/dist/commands/doctor.js +313 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/init.d.ts +38 -1
- package/dist/commands/init.js +259 -60
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/listen.d.ts +30 -0
- package/dist/commands/listen.js +194 -0
- package/dist/commands/listen.js.map +1 -0
- package/dist/commands/manifest.d.ts +13 -1
- package/dist/commands/manifest.js +81 -18
- package/dist/commands/manifest.js.map +1 -1
- package/dist/commands/mcp.d.ts +25 -2
- package/dist/commands/mcp.js +120 -11
- package/dist/commands/mcp.js.map +1 -1
- package/dist/commands/sandbox.d.ts +35 -6
- package/dist/commands/sandbox.js +208 -9
- package/dist/commands/sandbox.js.map +1 -1
- package/dist/commands/setup.d.ts +39 -0
- package/dist/commands/setup.js +203 -0
- package/dist/commands/setup.js.map +1 -0
- package/dist/commands/tool.d.ts +154 -0
- package/dist/commands/tool.js +785 -0
- package/dist/commands/tool.js.map +1 -0
- package/dist/config.d.ts +30 -6
- package/dist/config.js +39 -8
- package/dist/config.js.map +1 -1
- package/dist/ctx.d.ts +5 -45
- package/dist/ctx.js +25 -160
- package/dist/ctx.js.map +1 -1
- package/dist/docs/index.json +1 -0
- package/dist/docs/pages/actions/call.md +300 -0
- package/dist/docs/pages/actions/catalog/airtable.md +737 -0
- package/dist/docs/pages/actions/catalog/arxiv.md +166 -0
- package/dist/docs/pages/actions/catalog/chainalysis-sanctions.md +125 -0
- package/dist/docs/pages/actions/catalog/coingecko.md +1558 -0
- package/dist/docs/pages/actions/catalog/deps-dev.md +465 -0
- package/dist/docs/pages/actions/catalog/dexscreener.md +568 -0
- package/dist/docs/pages/actions/catalog/discord.md +784 -0
- package/dist/docs/pages/actions/catalog/finnhub.md +776 -0
- package/dist/docs/pages/actions/catalog/frankfurter.md +438 -0
- package/dist/docs/pages/actions/catalog/github.md +1853 -0
- package/dist/docs/pages/actions/catalog/gmail.md +575 -0
- package/dist/docs/pages/actions/catalog/google-calendar.md +654 -0
- package/dist/docs/pages/actions/catalog/google-drive.md +502 -0
- package/dist/docs/pages/actions/catalog/google-sheets.md +700 -0
- package/dist/docs/pages/actions/catalog/hacker-news.md +542 -0
- package/dist/docs/pages/actions/catalog/http.md +824 -0
- package/dist/docs/pages/actions/catalog/hyperliquid.md +942 -0
- package/dist/docs/pages/actions/catalog/jira.md +920 -0
- package/dist/docs/pages/actions/catalog/kalshi.md +917 -0
- package/dist/docs/pages/actions/catalog/linear.md +1030 -0
- package/dist/docs/pages/actions/catalog/markets.md +21 -0
- package/dist/docs/pages/actions/catalog/morpho.md +247 -0
- package/dist/docs/pages/actions/catalog/notion.md +1077 -0
- package/dist/docs/pages/actions/catalog/nws.md +485 -0
- package/dist/docs/pages/actions/catalog/open-meteo.md +559 -0
- package/dist/docs/pages/actions/catalog/polymarket.md +1523 -0
- package/dist/docs/pages/actions/catalog/pushbullet.md +220 -0
- package/dist/docs/pages/actions/catalog/resend.md +307 -0
- package/dist/docs/pages/actions/catalog/s3.md +513 -0
- package/dist/docs/pages/actions/catalog/sec-edgar.md +487 -0
- package/dist/docs/pages/actions/catalog/slack.md +2629 -0
- package/dist/docs/pages/actions/catalog/stripe.md +1405 -0
- package/dist/docs/pages/actions/catalog/wikipedia.md +379 -0
- package/dist/docs/pages/actions/catalog.md +46 -0
- package/dist/docs/pages/actions/limits.md +50 -0
- package/dist/docs/pages/actions/model-tools.md +225 -0
- package/dist/docs/pages/actions/packs.md +148 -0
- package/dist/docs/pages/actions/settings.md +69 -0
- package/dist/docs/pages/actions/tools.md +244 -0
- package/dist/docs/pages/actions/triggers.md +149 -0
- package/dist/docs/pages/actions.md +88 -0
- package/dist/docs/pages/compat/anthropic.md +168 -0
- package/dist/docs/pages/compat/e2b.md +194 -0
- package/dist/docs/pages/compat/firecrawl.md +138 -0
- package/dist/docs/pages/compat/openai.md +168 -0
- package/dist/docs/pages/concepts/auth.md +151 -0
- package/dist/docs/pages/concepts/beta.md +55 -0
- package/dist/docs/pages/concepts/glossary.md +71 -0
- package/dist/docs/pages/concepts/ids.md +98 -0
- package/dist/docs/pages/concepts/jobs.md +229 -0
- package/dist/docs/pages/concepts/latency.md +138 -0
- package/dist/docs/pages/concepts/limits.md +191 -0
- package/dist/docs/pages/concepts/stack.md +59 -0
- package/dist/docs/pages/concepts/timing.md +86 -0
- package/dist/docs/pages/concepts/usage.md +110 -0
- package/dist/docs/pages/design/b3os-yaml.md +370 -0
- package/dist/docs/pages/design/deploy-from-github.md +122 -0
- package/dist/docs/pages/design/observability.md +134 -0
- package/dist/docs/pages/errors.md +1824 -0
- package/dist/docs/pages/infer/chat.md +570 -0
- package/dist/docs/pages/infer/limits.md +55 -0
- package/dist/docs/pages/infer/messages.md +185 -0
- package/dist/docs/pages/infer/responses.md +173 -0
- package/dist/docs/pages/infer/settings.md +154 -0
- package/dist/docs/pages/infer/speech.md +323 -0
- package/dist/docs/pages/infer.md +154 -0
- package/dist/docs/pages/introduction.md +162 -0
- package/dist/docs/pages/platform/addresses.md +174 -0
- package/dist/docs/pages/platform/call-log.md +99 -0
- package/dist/docs/pages/platform/custom-domains.md +104 -0
- package/dist/docs/pages/platform/keys.md +79 -0
- package/dist/docs/pages/platform/limits.md +57 -0
- package/dist/docs/pages/platform/members.md +101 -0
- package/dist/docs/pages/platform/requests.md +116 -0
- package/dist/docs/pages/platform/settings.md +129 -0
- package/dist/docs/pages/platform/webhooks.md +68 -0
- package/dist/docs/pages/platform.md +67 -0
- package/dist/docs/pages/quickstart/mcp.md +94 -0
- package/dist/docs/pages/quickstart/sandbox-agent.md +205 -0
- package/dist/docs/pages/quickstart/scrape.md +134 -0
- package/dist/docs/pages/quickstart.md +45 -0
- package/dist/docs/pages/render/inspections.md +162 -0
- package/dist/docs/pages/render/limits.md +72 -0
- package/dist/docs/pages/render/screenshots.md +179 -0
- package/dist/docs/pages/render/settings.md +431 -0
- package/dist/docs/pages/render/styles.md +342 -0
- package/dist/docs/pages/render/videos.md +272 -0
- package/dist/docs/pages/render.md +118 -0
- package/dist/docs/pages/routines/callables.md +174 -0
- package/dist/docs/pages/routines/definitions.md +361 -0
- package/dist/docs/pages/routines/limits.md +117 -0
- package/dist/docs/pages/routines/runs.md +328 -0
- package/dist/docs/pages/routines/settings.md +104 -0
- package/dist/docs/pages/routines/triggers.md +339 -0
- package/dist/docs/pages/routines.md +216 -0
- package/dist/docs/pages/sandboxes/agents.md +217 -0
- package/dist/docs/pages/sandboxes/commands.md +272 -0
- package/dist/docs/pages/sandboxes/images.md +166 -0
- package/dist/docs/pages/sandboxes/limits.md +143 -0
- package/dist/docs/pages/sandboxes/ports.md +260 -0
- package/dist/docs/pages/sandboxes/settings.md +358 -0
- package/dist/docs/pages/sandboxes/snapshots.md +423 -0
- package/dist/docs/pages/sandboxes/swarms.md +146 -0
- package/dist/docs/pages/sandboxes/volumes.md +131 -0
- package/dist/docs/pages/sandboxes.md +231 -0
- package/dist/docs/pages/sdks/cli.md +121 -0
- package/dist/docs/pages/sdks/mcp.md +169 -0
- package/dist/docs/pages/sdks/python.md +146 -0
- package/dist/docs/pages/sdks/typescript.md +202 -0
- package/dist/docs/pages/sdks.md +282 -0
- package/dist/docs/pages/settings.md +33 -0
- package/dist/docs/pages/vault/limits.md +46 -0
- package/dist/docs/pages/vault.md +133 -0
- package/dist/docs/pages/vision/agent-browser.md +115 -0
- package/dist/docs/pages/vision/crawl.md +333 -0
- package/dist/docs/pages/vision/extract.md +152 -0
- package/dist/docs/pages/vision/fetcher.md +15 -0
- package/dist/docs/pages/vision/limits.md +79 -0
- package/dist/docs/pages/vision/profiles.md +111 -0
- package/dist/docs/pages/vision/proxy.md +131 -0
- package/dist/docs/pages/vision/scrape.md +356 -0
- package/dist/docs/pages/vision/sessions.md +311 -0
- package/dist/docs/pages/vision/settings.md +656 -0
- package/dist/docs/pages/vision.md +175 -0
- package/dist/errors.d.ts +129 -0
- package/dist/errors.js +326 -0
- package/dist/errors.js.map +1 -0
- package/dist/main.d.ts +1 -1
- package/dist/main.js +26 -13
- package/dist/main.js.map +1 -1
- package/dist/manifest/apply.d.ts +4 -0
- package/dist/manifest/apply.js +2 -0
- package/dist/manifest/apply.js.map +1 -1
- package/dist/manifest/domains.d.ts +50 -0
- package/dist/manifest/domains.js +159 -0
- package/dist/manifest/domains.js.map +1 -0
- package/dist/manifest/link.d.ts +20 -0
- package/dist/manifest/link.js +24 -0
- package/dist/manifest/link.js.map +1 -0
- package/dist/manifest/record.d.ts +1 -1
- package/dist/tool/archive.d.ts +33 -0
- package/dist/tool/archive.js +174 -0
- package/dist/tool/archive.js.map +1 -0
- package/dist/tool/calls.d.ts +46 -0
- package/dist/tool/calls.js +274 -0
- package/dist/tool/calls.js.map +1 -0
- package/dist/tool/checks.d.ts +21 -0
- package/dist/tool/checks.js +145 -0
- package/dist/tool/checks.js.map +1 -0
- package/dist/tool/elf.d.ts +19 -0
- package/dist/tool/elf.js +107 -0
- package/dist/tool/elf.js.map +1 -0
- package/dist/tool/predict.d.ts +8 -0
- package/dist/tool/predict.js +38 -0
- package/dist/tool/predict.js.map +1 -0
- package/dist/tool/ustar.d.ts +5 -0
- package/dist/tool/ustar.js +220 -0
- package/dist/tool/ustar.js.map +1 -0
- package/package.json +6 -5
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
# Pushbullet
|
|
2
|
+
|
|
3
|
+
> The io.b3os/pushbullet pack: 2 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/pushbullet.md
|
|
6
|
+
|
|
7
|
+
<a id="pushbullet"></a>
|
|
8
|
+
|
|
9
|
+
`io.b3os/pushbullet` 1.0.0 · `notifications`, `messaging`, `mobile` · MIT
|
|
10
|
+
|
|
11
|
+
Push notifications to your own phones and browsers through Pushbullet with your Pushbullet access token: send a note or a link to all devices or one device, and list devices to find their identifiers.
|
|
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
|
+
`pushbullet`, type `api_key`: Pushbullet access token.
|
|
18
|
+
|
|
19
|
+
An access token from pushbullet.com/#settings/account, sent as the Access-Token header to api.pushbullet.com only.
|
|
20
|
+
|
|
21
|
+
How to get one: [docs.pushbullet.com](https://docs.pushbullet.com/#http).
|
|
22
|
+
|
|
23
|
+
The credential is sent only to `api.pushbullet.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: `api.pushbullet.com`.
|
|
28
|
+
|
|
29
|
+
## Actions
|
|
30
|
+
|
|
31
|
+
| Action | Effect | MCP tool | Title |
|
|
32
|
+
|---|---|---|---|
|
|
33
|
+
| [`send-push`](https://docs.beta.b3os.org/actions/catalog/pushbullet#pushbullet-send-push) | irreversible | `pushbullet__send-push` | Send push |
|
|
34
|
+
| [`list-devices`](https://docs.beta.b3os.org/actions/catalog/pushbullet#pushbullet-list-devices) | read | `pushbullet__list-devices` | List devices |
|
|
35
|
+
|
|
36
|
+
<h3 id="pushbullet-send-push"><code>send-push</code></h3>
|
|
37
|
+
|
|
38
|
+
**Send push.** Send a note, or a link with a URL, to every device on the account or to one device (deviceIden from list-devices). Returns the push identifier.
|
|
39
|
+
|
|
40
|
+
Ref `io.b3os/pushbullet/send-push@1.0.0` · effect `irreversible` · connection `pushbullet` · MCP tool `pushbullet__send-push`
|
|
41
|
+
|
|
42
|
+
**curl**
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
curl -s https://beta-api.b3os.org/v1/actions/call \
|
|
46
|
+
-H "Authorization: Bearer $B3OS_API_KEY" \
|
|
47
|
+
-H "Idempotency-Key: 7c1e2f6a-1d43-4a8e-b2a5-3f0c9d5e8b11" \
|
|
48
|
+
-H "Content-Type: application/json" \
|
|
49
|
+
-d '{
|
|
50
|
+
"ref": "io.b3os/pushbullet/send-push@1",
|
|
51
|
+
"input": {
|
|
52
|
+
"type": "link",
|
|
53
|
+
"title": "Deploy finished",
|
|
54
|
+
"body": "v2.4.1 is live",
|
|
55
|
+
"url": "https://status.acme.example/deploys/241"
|
|
56
|
+
},
|
|
57
|
+
"connections": {"pushbullet": "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/pushbullet/send-push@1",
|
|
68
|
+
input: {
|
|
69
|
+
type: "link",
|
|
70
|
+
title: "Deploy finished",
|
|
71
|
+
body: "v2.4.1 is live",
|
|
72
|
+
url: "https://status.acme.example/deploys/241",
|
|
73
|
+
},
|
|
74
|
+
connections: { pushbullet: "conn_01m5t6cbgdjs1ketgcqwa2sne8" },
|
|
75
|
+
}, { idempotencyKey: crypto.randomUUID() });
|
|
76
|
+
console.log(result.output);
|
|
77
|
+
```
|
|
78
|
+
**Python**
|
|
79
|
+
|
|
80
|
+
```python
|
|
81
|
+
import uuid
|
|
82
|
+
from b3os import B3OS
|
|
83
|
+
|
|
84
|
+
b3os = B3OS()
|
|
85
|
+
result = b3os.actions.call({
|
|
86
|
+
"ref": "io.b3os/pushbullet/send-push@1",
|
|
87
|
+
"input": {
|
|
88
|
+
"type": "link",
|
|
89
|
+
"title": "Deploy finished",
|
|
90
|
+
"body": "v2.4.1 is live",
|
|
91
|
+
"url": "https://status.acme.example/deploys/241",
|
|
92
|
+
},
|
|
93
|
+
"connections": {"pushbullet": "conn_01m5t6cbgdjs1ketgcqwa2sne8"},
|
|
94
|
+
}, idempotency_key=str(uuid.uuid4()))
|
|
95
|
+
print(result["output"])
|
|
96
|
+
```
|
|
97
|
+
**MCP**
|
|
98
|
+
|
|
99
|
+
```json
|
|
100
|
+
{
|
|
101
|
+
"method": "tools/call",
|
|
102
|
+
"params": {
|
|
103
|
+
"name": "pushbullet__send-push",
|
|
104
|
+
"arguments": {
|
|
105
|
+
"type": "link",
|
|
106
|
+
"title": "Deploy finished",
|
|
107
|
+
"body": "v2.4.1 is live",
|
|
108
|
+
"url": "https://status.acme.example/deploys/241"
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Expose the pack as tools with `--packs pushbullet` on the local server or `?packs=pushbullet` on the remote URL, and the agent calls `pushbullet__send-push` 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`.
|
|
115
|
+
|
|
116
|
+
Output, labeled `fixture`: Send push (documented response shape, example values). From the bundle's `fixtures/send-push.json`, not a live call.
|
|
117
|
+
|
|
118
|
+
```json
|
|
119
|
+
{"iden": "ujpah72o0sjAoRtnM0jc", "active": true}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
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:
|
|
123
|
+
|
|
124
|
+
| `pack_error.code` | Service status | Retryable | Message |
|
|
125
|
+
|---|---|---|---|
|
|
126
|
+
| `invalid_request` | 400 | no | built from the service's response |
|
|
127
|
+
| `not_found` | 404 | no | No such Pushbullet device. |
|
|
128
|
+
| `connection_unauthorized` | 401 | no | Pushbullet rejected the access token; check the connection. |
|
|
129
|
+
| `forbidden` | 403 | no | Pushbullet refused the request for this account. |
|
|
130
|
+
| `rate_limited` | 429 | yes | Pushbullet rate limit reached for this account; retry later. |
|
|
131
|
+
|
|
132
|
+
<h3 id="pushbullet-list-devices"><code>list-devices</code></h3>
|
|
133
|
+
|
|
134
|
+
**List devices.** Active devices on the Pushbullet account with identifier, nickname, type (android, ios, chrome, firefox, ...) and whether they can receive pushes.
|
|
135
|
+
|
|
136
|
+
Ref `io.b3os/pushbullet/list-devices@1.0.0` · effect `read` · connection `pushbullet` · MCP tool `pushbullet__list-devices`
|
|
137
|
+
|
|
138
|
+
**curl**
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
curl -s https://beta-api.b3os.org/v1/actions/call \
|
|
142
|
+
-H "Authorization: Bearer $B3OS_API_KEY" \
|
|
143
|
+
-H "Content-Type: application/json" \
|
|
144
|
+
-d '{
|
|
145
|
+
"ref": "io.b3os/pushbullet/list-devices@1",
|
|
146
|
+
"input": {},
|
|
147
|
+
"connections": {"pushbullet": "conn_01m5t6cbgdjs1ketgcqwa2sne8"}
|
|
148
|
+
}'
|
|
149
|
+
```
|
|
150
|
+
**TypeScript**
|
|
151
|
+
|
|
152
|
+
```ts
|
|
153
|
+
import { B3OS } from "@b3os/sdk";
|
|
154
|
+
|
|
155
|
+
const b3os = new B3OS();
|
|
156
|
+
const result = await b3os.actions.call({
|
|
157
|
+
ref: "io.b3os/pushbullet/list-devices@1",
|
|
158
|
+
input: {},
|
|
159
|
+
connections: { pushbullet: "conn_01m5t6cbgdjs1ketgcqwa2sne8" },
|
|
160
|
+
});
|
|
161
|
+
console.log(result.output);
|
|
162
|
+
```
|
|
163
|
+
**Python**
|
|
164
|
+
|
|
165
|
+
```python
|
|
166
|
+
from b3os import B3OS
|
|
167
|
+
|
|
168
|
+
b3os = B3OS()
|
|
169
|
+
result = b3os.actions.call({
|
|
170
|
+
"ref": "io.b3os/pushbullet/list-devices@1",
|
|
171
|
+
"input": {},
|
|
172
|
+
"connections": {"pushbullet": "conn_01m5t6cbgdjs1ketgcqwa2sne8"},
|
|
173
|
+
})
|
|
174
|
+
print(result["output"])
|
|
175
|
+
```
|
|
176
|
+
**MCP**
|
|
177
|
+
|
|
178
|
+
```json
|
|
179
|
+
{
|
|
180
|
+
"method": "tools/call",
|
|
181
|
+
"params": {"name": "pushbullet__list-devices", "arguments": {}}
|
|
182
|
+
}
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
Expose the pack as tools with `--packs pushbullet` on the local server or `?packs=pushbullet` on the remote URL, and the agent calls `pushbullet__list-devices` 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`.
|
|
186
|
+
|
|
187
|
+
Output, labeled `fixture`: List devices (documented response shape, example values). From the bundle's `fixtures/list-devices.json`, not a live call.
|
|
188
|
+
|
|
189
|
+
```json
|
|
190
|
+
{
|
|
191
|
+
"devices": [
|
|
192
|
+
{
|
|
193
|
+
"iden": "ujpah72o0sjAoRtnM0jc",
|
|
194
|
+
"nickname": "Pixel 9",
|
|
195
|
+
"type": "android",
|
|
196
|
+
"manufacturer": "Google",
|
|
197
|
+
"model": "Pixel 9",
|
|
198
|
+
"pushable": true
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"iden": "ujpah72o0sjAsoeMFETtJs",
|
|
202
|
+
"nickname": "Chrome",
|
|
203
|
+
"type": "chrome",
|
|
204
|
+
"manufacturer": null,
|
|
205
|
+
"model": null,
|
|
206
|
+
"pushable": true
|
|
207
|
+
}
|
|
208
|
+
]
|
|
209
|
+
}
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
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:
|
|
213
|
+
|
|
214
|
+
| `pack_error.code` | Service status | Retryable | Message |
|
|
215
|
+
|---|---|---|---|
|
|
216
|
+
| `invalid_request` | 400 | no | built from the service's response |
|
|
217
|
+
| `not_found` | 404 | no | No such Pushbullet device. |
|
|
218
|
+
| `connection_unauthorized` | 401 | no | Pushbullet rejected the access token; check the connection. |
|
|
219
|
+
| `forbidden` | 403 | no | Pushbullet refused the request for this account. |
|
|
220
|
+
| `rate_limited` | 429 | yes | Pushbullet rate limit reached for this account; retry later. |
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
# Resend
|
|
2
|
+
|
|
3
|
+
> The io.b3os/resend pack: 3 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/resend.md
|
|
6
|
+
|
|
7
|
+
<a id="resend"></a>
|
|
8
|
+
|
|
9
|
+
`io.b3os/resend` 1.0.0 · `email`, `messaging`, `notifications` · MIT
|
|
10
|
+
|
|
11
|
+
Send transactional email through Resend with your own Resend API key and a domain you verified in Resend: plain text or HTML, cc, bcc and reply-to, idempotent retries with an idempotency key. Also check an email's delivery status and list your sending domains.
|
|
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
|
+
`resend`, type `bearer`: Resend API key.
|
|
18
|
+
|
|
19
|
+
A Resend API key (re_...) with sending access, from resend.com/api-keys.
|
|
20
|
+
|
|
21
|
+
How to get one: [resend.com](https://resend.com/docs/api-reference/introduction).
|
|
22
|
+
|
|
23
|
+
The credential is sent only to `api.resend.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: `api.resend.com`.
|
|
28
|
+
|
|
29
|
+
## Actions
|
|
30
|
+
|
|
31
|
+
| Action | Effect | MCP tool | Title |
|
|
32
|
+
|---|---|---|---|
|
|
33
|
+
| [`send-email`](https://docs.beta.b3os.org/actions/catalog/resend#resend-send-email) | irreversible | `resend__send-email` | Send email |
|
|
34
|
+
| [`get-email`](https://docs.beta.b3os.org/actions/catalog/resend#resend-get-email) | read | `resend__get-email` | Get email status |
|
|
35
|
+
| [`list-domains`](https://docs.beta.b3os.org/actions/catalog/resend#resend-list-domains) | read | `resend__list-domains` | List sending domains |
|
|
36
|
+
|
|
37
|
+
<h3 id="resend-send-email"><code>send-email</code></h3>
|
|
38
|
+
|
|
39
|
+
**Send email.** Send one email from an address on a domain verified in your Resend account, as HTML, plain text or both. to, cc and bcc take one address or an array. Pass an idempotency key so a retry does not send twice. Returns the Resend email ID.
|
|
40
|
+
|
|
41
|
+
Ref `io.b3os/resend/send-email@1.0.0` · effect `irreversible` · connection `resend` · MCP tool `resend__send-email`
|
|
42
|
+
|
|
43
|
+
**curl**
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
curl -s https://beta-api.b3os.org/v1/actions/call \
|
|
47
|
+
-H "Authorization: Bearer $B3OS_API_KEY" \
|
|
48
|
+
-H "Idempotency-Key: 7c1e2f6a-1d43-4a8e-b2a5-3f0c9d5e8b11" \
|
|
49
|
+
-H "Content-Type: application/json" \
|
|
50
|
+
-d '{
|
|
51
|
+
"ref": "io.b3os/resend/send-email@1",
|
|
52
|
+
"input": {
|
|
53
|
+
"from": "Acme Billing <billing@acme.example>",
|
|
54
|
+
"to": ["ada@example.com"],
|
|
55
|
+
"subject": "Your October invoice",
|
|
56
|
+
"text": "Hi Ada, your invoice for October is attached in the portal.",
|
|
57
|
+
"replyTo": "support@acme.example"
|
|
58
|
+
},
|
|
59
|
+
"connections": {"resend": "conn_01m5t6cbgdjs1ketgcqwa2sne8"}
|
|
60
|
+
}'
|
|
61
|
+
```
|
|
62
|
+
**TypeScript**
|
|
63
|
+
|
|
64
|
+
```ts
|
|
65
|
+
import { B3OS } from "@b3os/sdk";
|
|
66
|
+
|
|
67
|
+
const b3os = new B3OS();
|
|
68
|
+
const result = await b3os.actions.call({
|
|
69
|
+
ref: "io.b3os/resend/send-email@1",
|
|
70
|
+
input: {
|
|
71
|
+
from: "Acme Billing <billing@acme.example>",
|
|
72
|
+
to: ["ada@example.com"],
|
|
73
|
+
subject: "Your October invoice",
|
|
74
|
+
text: "Hi Ada, your invoice for October is attached in the portal.",
|
|
75
|
+
replyTo: "support@acme.example",
|
|
76
|
+
},
|
|
77
|
+
connections: { resend: "conn_01m5t6cbgdjs1ketgcqwa2sne8" },
|
|
78
|
+
}, { idempotencyKey: crypto.randomUUID() });
|
|
79
|
+
console.log(result.output);
|
|
80
|
+
```
|
|
81
|
+
**Python**
|
|
82
|
+
|
|
83
|
+
```python
|
|
84
|
+
import uuid
|
|
85
|
+
from b3os import B3OS
|
|
86
|
+
|
|
87
|
+
b3os = B3OS()
|
|
88
|
+
result = b3os.actions.call({
|
|
89
|
+
"ref": "io.b3os/resend/send-email@1",
|
|
90
|
+
"input": {
|
|
91
|
+
"from": "Acme Billing <billing@acme.example>",
|
|
92
|
+
"to": ["ada@example.com"],
|
|
93
|
+
"subject": "Your October invoice",
|
|
94
|
+
"text": "Hi Ada, your invoice for October is attached in the portal.",
|
|
95
|
+
"replyTo": "support@acme.example",
|
|
96
|
+
},
|
|
97
|
+
"connections": {"resend": "conn_01m5t6cbgdjs1ketgcqwa2sne8"},
|
|
98
|
+
}, idempotency_key=str(uuid.uuid4()))
|
|
99
|
+
print(result["output"])
|
|
100
|
+
```
|
|
101
|
+
**MCP**
|
|
102
|
+
|
|
103
|
+
```json
|
|
104
|
+
{
|
|
105
|
+
"method": "tools/call",
|
|
106
|
+
"params": {
|
|
107
|
+
"name": "resend__send-email",
|
|
108
|
+
"arguments": {
|
|
109
|
+
"from": "Acme Billing <billing@acme.example>",
|
|
110
|
+
"to": ["ada@example.com"],
|
|
111
|
+
"subject": "Your October invoice",
|
|
112
|
+
"text": "Hi Ada, your invoice for October is attached in the portal.",
|
|
113
|
+
"replyTo": "support@acme.example"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Expose the pack as tools with `--packs resend` on the local server or `?packs=resend` on the remote URL, and the agent calls `resend__send-email` 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`.
|
|
120
|
+
|
|
121
|
+
Output, labeled `fixture`: Send email (documented response shape, example values). From the bundle's `fixtures/send-email.json`, not a live call.
|
|
122
|
+
|
|
123
|
+
```json
|
|
124
|
+
{"id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794", "status": "success"}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
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:
|
|
128
|
+
|
|
129
|
+
| `pack_error.code` | Service status | Retryable | Message |
|
|
130
|
+
|---|---|---|---|
|
|
131
|
+
| `connection_unauthorized` | 401 | no | Resend rejected the API key; check the connection. |
|
|
132
|
+
| `forbidden` | 403 | no | built from the service's response |
|
|
133
|
+
| `not_found` | 404 | no | built from the service's response |
|
|
134
|
+
| `rate_limited` | 429 | yes | built from the service's response |
|
|
135
|
+
| `invalid_request` | 400, 422 | no | built from the service's response |
|
|
136
|
+
| `conflict` | 409 | no | built from the service's response |
|
|
137
|
+
|
|
138
|
+
<h3 id="resend-get-email"><code>get-email</code></h3>
|
|
139
|
+
|
|
140
|
+
**Get email status.** One sent email by Resend ID: sender, recipients, subject, creation time and its last delivery event (sent, delivered, delivery_delayed, bounced, complained, opened, clicked, ...).
|
|
141
|
+
|
|
142
|
+
Ref `io.b3os/resend/get-email@1.0.0` · effect `read` · connection `resend` · MCP tool `resend__get-email`
|
|
143
|
+
|
|
144
|
+
**curl**
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
curl -s https://beta-api.b3os.org/v1/actions/call \
|
|
148
|
+
-H "Authorization: Bearer $B3OS_API_KEY" \
|
|
149
|
+
-H "Content-Type: application/json" \
|
|
150
|
+
-d '{
|
|
151
|
+
"ref": "io.b3os/resend/get-email@1",
|
|
152
|
+
"input": {"id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794"},
|
|
153
|
+
"connections": {"resend": "conn_01m5t6cbgdjs1ketgcqwa2sne8"}
|
|
154
|
+
}'
|
|
155
|
+
```
|
|
156
|
+
**TypeScript**
|
|
157
|
+
|
|
158
|
+
```ts
|
|
159
|
+
import { B3OS } from "@b3os/sdk";
|
|
160
|
+
|
|
161
|
+
const b3os = new B3OS();
|
|
162
|
+
const result = await b3os.actions.call({
|
|
163
|
+
ref: "io.b3os/resend/get-email@1",
|
|
164
|
+
input: { id: "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794" },
|
|
165
|
+
connections: { resend: "conn_01m5t6cbgdjs1ketgcqwa2sne8" },
|
|
166
|
+
});
|
|
167
|
+
console.log(result.output);
|
|
168
|
+
```
|
|
169
|
+
**Python**
|
|
170
|
+
|
|
171
|
+
```python
|
|
172
|
+
from b3os import B3OS
|
|
173
|
+
|
|
174
|
+
b3os = B3OS()
|
|
175
|
+
result = b3os.actions.call({
|
|
176
|
+
"ref": "io.b3os/resend/get-email@1",
|
|
177
|
+
"input": {"id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794"},
|
|
178
|
+
"connections": {"resend": "conn_01m5t6cbgdjs1ketgcqwa2sne8"},
|
|
179
|
+
})
|
|
180
|
+
print(result["output"])
|
|
181
|
+
```
|
|
182
|
+
**MCP**
|
|
183
|
+
|
|
184
|
+
```json
|
|
185
|
+
{
|
|
186
|
+
"method": "tools/call",
|
|
187
|
+
"params": {
|
|
188
|
+
"name": "resend__get-email",
|
|
189
|
+
"arguments": {"id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794"}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Expose the pack as tools with `--packs resend` on the local server or `?packs=resend` on the remote URL, and the agent calls `resend__get-email` 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`.
|
|
195
|
+
|
|
196
|
+
Output, labeled `fixture`: Get email status (documented response shape, example values). From the bundle's `fixtures/get-email.json`, not a live call.
|
|
197
|
+
|
|
198
|
+
```json
|
|
199
|
+
{
|
|
200
|
+
"id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794",
|
|
201
|
+
"from": "Acme Billing <billing@acme.example>",
|
|
202
|
+
"to": ["ada@example.com"],
|
|
203
|
+
"subject": "Your October invoice",
|
|
204
|
+
"created_at": "2026-10-26 09:12:44.123456+00",
|
|
205
|
+
"last_event": "delivered"
|
|
206
|
+
}
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
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:
|
|
210
|
+
|
|
211
|
+
| `pack_error.code` | Service status | Retryable | Message |
|
|
212
|
+
|---|---|---|---|
|
|
213
|
+
| `connection_unauthorized` | 401 | no | Resend rejected the API key; check the connection. |
|
|
214
|
+
| `forbidden` | 403 | no | built from the service's response |
|
|
215
|
+
| `not_found` | 404 | no | built from the service's response |
|
|
216
|
+
| `rate_limited` | 429 | yes | built from the service's response |
|
|
217
|
+
| `invalid_request` | 400, 422 | no | built from the service's response |
|
|
218
|
+
| `conflict` | 409 | no | built from the service's response |
|
|
219
|
+
|
|
220
|
+
<h3 id="resend-list-domains"><code>list-domains</code></h3>
|
|
221
|
+
|
|
222
|
+
**List sending domains.** Domains in the Resend account with their verification status (verified, pending, failed, ...) and region. send-email only works from verified domains.
|
|
223
|
+
|
|
224
|
+
Ref `io.b3os/resend/list-domains@1.0.0` · effect `read` · connection `resend` · MCP tool `resend__list-domains`
|
|
225
|
+
|
|
226
|
+
**curl**
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
curl -s https://beta-api.b3os.org/v1/actions/call \
|
|
230
|
+
-H "Authorization: Bearer $B3OS_API_KEY" \
|
|
231
|
+
-H "Content-Type: application/json" \
|
|
232
|
+
-d '{
|
|
233
|
+
"ref": "io.b3os/resend/list-domains@1",
|
|
234
|
+
"input": {},
|
|
235
|
+
"connections": {"resend": "conn_01m5t6cbgdjs1ketgcqwa2sne8"}
|
|
236
|
+
}'
|
|
237
|
+
```
|
|
238
|
+
**TypeScript**
|
|
239
|
+
|
|
240
|
+
```ts
|
|
241
|
+
import { B3OS } from "@b3os/sdk";
|
|
242
|
+
|
|
243
|
+
const b3os = new B3OS();
|
|
244
|
+
const result = await b3os.actions.call({
|
|
245
|
+
ref: "io.b3os/resend/list-domains@1",
|
|
246
|
+
input: {},
|
|
247
|
+
connections: { resend: "conn_01m5t6cbgdjs1ketgcqwa2sne8" },
|
|
248
|
+
});
|
|
249
|
+
console.log(result.output);
|
|
250
|
+
```
|
|
251
|
+
**Python**
|
|
252
|
+
|
|
253
|
+
```python
|
|
254
|
+
from b3os import B3OS
|
|
255
|
+
|
|
256
|
+
b3os = B3OS()
|
|
257
|
+
result = b3os.actions.call({
|
|
258
|
+
"ref": "io.b3os/resend/list-domains@1",
|
|
259
|
+
"input": {},
|
|
260
|
+
"connections": {"resend": "conn_01m5t6cbgdjs1ketgcqwa2sne8"},
|
|
261
|
+
})
|
|
262
|
+
print(result["output"])
|
|
263
|
+
```
|
|
264
|
+
**MCP**
|
|
265
|
+
|
|
266
|
+
```json
|
|
267
|
+
{
|
|
268
|
+
"method": "tools/call",
|
|
269
|
+
"params": {"name": "resend__list-domains", "arguments": {}}
|
|
270
|
+
}
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
Expose the pack as tools with `--packs resend` on the local server or `?packs=resend` on the remote URL, and the agent calls `resend__list-domains` 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`.
|
|
274
|
+
|
|
275
|
+
Output, labeled `fixture`: List sending domains (documented response shape, example values). From the bundle's `fixtures/list-domains.json`, not a live call.
|
|
276
|
+
|
|
277
|
+
```json
|
|
278
|
+
{
|
|
279
|
+
"domains": [
|
|
280
|
+
{
|
|
281
|
+
"id": "d91cd9bd-1176-453e-8fc1-35364d380206",
|
|
282
|
+
"name": "acme.example",
|
|
283
|
+
"status": "verified",
|
|
284
|
+
"region": "us-east-1",
|
|
285
|
+
"created_at": "2026-04-26 20:21:26.347412+00"
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"id": "1c7b4b2a-6a51-4b5e-9a35-1f0f2b5d7c11",
|
|
289
|
+
"name": "mail.acme.example",
|
|
290
|
+
"status": "pending",
|
|
291
|
+
"region": "eu-west-1",
|
|
292
|
+
"created_at": "2026-10-20 10:02:11.000000+00"
|
|
293
|
+
}
|
|
294
|
+
]
|
|
295
|
+
}
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
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:
|
|
299
|
+
|
|
300
|
+
| `pack_error.code` | Service status | Retryable | Message |
|
|
301
|
+
|---|---|---|---|
|
|
302
|
+
| `connection_unauthorized` | 401 | no | Resend rejected the API key; check the connection. |
|
|
303
|
+
| `forbidden` | 403 | no | built from the service's response |
|
|
304
|
+
| `not_found` | 404 | no | built from the service's response |
|
|
305
|
+
| `rate_limited` | 429 | yes | built from the service's response |
|
|
306
|
+
| `invalid_request` | 400, 422 | no | built from the service's response |
|
|
307
|
+
| `conflict` | 409 | no | built from the service's response |
|