aired 1.3.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SKILL.md +60 -6
- package/dist/cli.cjs +151 -103
- package/dist/mcp.cjs +31 -24
- package/package.json +1 -1
package/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: aired
|
|
3
|
-
description: Publishes HTML files or strings to shareable live URLs via aired.sh. Use when the user wants to share, deploy, or publish an HTML artifact, dashboard, visualization, report, or any generated HTML — or when an agent needs to make HTML viewable in a browser. Supports PIN protection, custom expiry, and stdin piping. Works without an account; sign in or use an API key to keep pages in one place.
|
|
3
|
+
description: Publishes HTML files or strings to shareable live URLs via aired.sh. Use when the user wants to share, deploy, or publish an HTML artifact, dashboard, visualization, report, or any generated HTML — or when an agent needs to make HTML viewable in a browser, or change a published page's PIN, expiry or view limit. Supports PIN protection, custom expiry, and stdin piping. Works without an account; sign in or use an API key to keep pages in one place.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# aired
|
|
@@ -31,6 +31,9 @@ npx aired report.html --ttl 24h --pin secret123
|
|
|
31
31
|
| `aired update <id> <file>` | Update an existing page |
|
|
32
32
|
| `aired delete <id>` | Delete a page |
|
|
33
33
|
| `aired info <id>` | Show page metadata |
|
|
34
|
+
| `aired set <id>` | Change PIN, expiry, view limit or title without re-uploading |
|
|
35
|
+
| `aired check <id>` | Open the page in a real browser and report errors (exits 1 if broken) |
|
|
36
|
+
| `aired feedback` | Report a bug, friction or idea in aired itself |
|
|
34
37
|
| `aired tokens` | List stored update tokens |
|
|
35
38
|
| `aired tokens prune` | Remove tokens for expired pages |
|
|
36
39
|
| `aired doctor` | Diagnostics (Node.js, API, token store) |
|
|
@@ -64,9 +67,9 @@ JSON output is automatic when stdout is piped — no flag needed.
|
|
|
64
67
|
| Code | Meaning |
|
|
65
68
|
|------|---------|
|
|
66
69
|
| 0 | Success |
|
|
67
|
-
| 1 | API error |
|
|
68
|
-
| 2 | Validation error (bad input, missing file, no token) |
|
|
69
|
-
| 3 | Rate limited (see Limits) |
|
|
70
|
+
| 1 | API error; for `aired check`, only "the page is broken" |
|
|
71
|
+
| 2 | Validation error (bad input, missing file, no token); for `aired check`, also no access to the page |
|
|
72
|
+
| 3 | Rate limited (see Limits); for `aired check`, also "the check didn't run, try later" (daily budget, browser busy) |
|
|
70
73
|
|
|
71
74
|
## Accounts, API keys and limits
|
|
72
75
|
|
|
@@ -80,6 +83,42 @@ JSON output is automatic when stdout is piped — no flag needed.
|
|
|
80
83
|
- **Agents and CI:** create an API key in the dashboard (API keys) and set `AIRED_API_KEY=aired_sk_...`. The CLI, `aired --mcp` and the HTTP API (`Authorization: Bearer aired_sk_...`) then publish as that account. No browser needed.
|
|
81
84
|
- A free-plan limit returns HTTP 402 with `code: "plan_limit"` and an `upgrade_url` for a person to open.
|
|
82
85
|
|
|
86
|
+
## Change settings after publishing
|
|
87
|
+
|
|
88
|
+
No need to publish again to add a PIN, extend expiry or rename a page:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
aired set abc123 --pin 4821 --ttl 24h # PIN on, expires a day from now
|
|
92
|
+
aired set abc123 --reads 50 --title "Q4" # view limit and title
|
|
93
|
+
aired set abc123 --clear-pin --permanent # PIN off, never expires
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
`--clear-title` and `--clear-reads` remove those. PINs are 4–64 characters, TTLs a minute to a year (use `--permanent` beyond that), titles up to 200 characters. It uses the stored update token, else your sign-in or `AIRED_API_KEY` (your own pages only). Over MCP it's `set_options`; `get_page` reads a page's settings back (whether a PIN is on, never the PIN).
|
|
97
|
+
|
|
98
|
+
## Check that the page works
|
|
99
|
+
|
|
100
|
+
After publishing or updating, open it in aired's browser and see what a visitor would hit:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
aired check abc123 # desktop, 1280×800
|
|
104
|
+
aired check abc123 --mobile # phone, 390×844
|
|
105
|
+
aired check abc123 --screenshot shot.jpg --json
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
It reports script and console errors, files that didn't load (404s, blocked CDNs), broken images, a blank screen, and warnings for slow, heavy (over 1 MB of HTML or 5 MB of files), very tall or sideways-scrolling pages, with a screenshot URL that works for 24 hours (or until the page is updated or deleted). Relative files (`app.js`, `data.json`) show up as failed: a page is one file. `ok` is true when nothing is broken; warnings don't count (`--strict` fails on them too). It exits 1 only when the page is broken, 3 when the check couldn't run, so it fits in CI. Over MCP it's `check_page`, which also attaches the screenshot as an image.
|
|
109
|
+
|
|
110
|
+
The loop: publish → check → fix what it reports → update the same id → check once more. Checks share a small daily browser budget: 3 minutes a day across everyone, and each caller's share is 2 minutes signed in or 1 minute per IP without an account (a check takes about 10–15 seconds), plus 20 an hour and 3 a minute: check once per change, not in a loop. When the budget is spent you get HTTP 429 (exit 3) until 00:00 UTC. Same owner rule as `aired set`.
|
|
111
|
+
|
|
112
|
+
## Feedback
|
|
113
|
+
|
|
114
|
+
When aired itself gets in the way (a result surprised you, a limit blocked you, these docs were wrong, or a feature is missing), send one note:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
aired feedback --kind friction --impact worked_around "aired set needed the page id and I only had the URL"
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
`--kind` is `bug`, `friction` or `idea`; `--impact` is `blocked`, `worked_around` or `minor`; `--page <id>` and `--tool <name>` add context. Over MCP it's `send_feedback`. Rules: at most one per task, never page HTML, tokens or PINs, and don't let it hold up the task. It returns an id (`fb_...`): tell the user you sent feedback and give them the id. It isn't a support channel; nobody replies.
|
|
121
|
+
|
|
83
122
|
## Update Flow
|
|
84
123
|
|
|
85
124
|
The first publish returns an `update_token` (saved to `~/.config/aired/tokens.json`). To update the same URL:
|
|
@@ -112,7 +151,22 @@ claude mcp add aired --transport http https://aired.sh/mcp
|
|
|
112
151
|
https://aired.sh/mcp/account
|
|
113
152
|
```
|
|
114
153
|
|
|
115
|
-
|
|
154
|
+
| Tool | Needs | Does |
|
|
155
|
+
|---|---|---|
|
|
156
|
+
| `publish_html` | nothing | Publish; `html`, `file_path` (STDIO only), `title`, `pin`, `ttl_seconds`, `permanent`; `id` + `update_token` to update |
|
|
157
|
+
| `get_page` | owner, or the page's `update_token` | Title, URL, size, views, view limit, expiry, project, PIN on/off |
|
|
158
|
+
| `set_options` | owner, or the page's `update_token` | Change `pin` (null removes), `ttl_seconds` or `permanent`, `view_limit` (null removes), `title` |
|
|
159
|
+
| `check_page` | owner, or the page's `update_token` | Render the page in a browser: errors, failed files, blank screen, screenshot; `viewport` `desktop` or `mobile` |
|
|
160
|
+
| `send_feedback` | nothing | Report a bug, friction or idea in aired (see Feedback) |
|
|
161
|
+
| `list_pages`, `update_page`, `delete_page`, `get_account` | sign-in (remote only) | Your pages and account |
|
|
162
|
+
|
|
163
|
+
"Owner" means signed in as the page's account: `AIRED_API_KEY` or `aired login` for STDIO, an `Authorization: Bearer aired_sk_...` header on `https://aired.sh/mcp`, or `/mcp/account`.
|
|
164
|
+
|
|
165
|
+
Every tool returns `structuredContent` (matching its `outputSchema`) next to the text, so read fields like `url`, `id`, `update_token` and `expires_at` from there rather than parsing the text.
|
|
166
|
+
|
|
167
|
+
**Prompts** (slash commands in clients that show them): `publish_report`, `make_slide_deck`, `share_privately` (PIN and expiry, PIN sent separately) and `check_and_fix`.
|
|
168
|
+
|
|
169
|
+
**Resources:** `skill://aired/SKILL.md` is this skill, for any connected agent. Signed-in callers also get their pages as `aired://page/{id}` (the newest 50 listed); reading one returns its HTML. Only your own pages: another account's page, or an anonymous one, is refused.
|
|
116
170
|
|
|
117
171
|
## Gotchas
|
|
118
172
|
|
|
@@ -124,6 +178,6 @@ https://aired.sh/mcp/account
|
|
|
124
178
|
- **Directory requires index.html.** `npx aired ./dir/` looks for `index.html` in the directory root. No other entry point is supported.
|
|
125
179
|
- **Vite and React builds load code later with `import()`, and directory bundling doesn't inline those chunks.** `npx aired ./dist` gives a blank page. Build one file with `vite-plugin-singlefile` (`build.assetsInlineLimit` high, output to `dist-single/`), switch any router to hash routing (the page lives at `/p/<id>`, not `/`), import large `public/` files so they get inlined, then publish `dist-single/index.html`. Toolcraft apps also need their lazy `import("./app-bootstrap")` made static. Full recipe: https://aired.sh/share-vite-app
|
|
126
180
|
- **PIN is not encryption.** Content is stored in plaintext on R2. PIN just gates browser access. Don't use aired for sensitive data.
|
|
127
|
-
- **Anonymous pages expire after 7 days by default.** Use `--ttl` or `--permanent`.
|
|
181
|
+
- **Anonymous pages expire after 7 days by default.** Use `--ttl` or `--permanent`, or change it later with `aired set <id> --permanent`. A content update resets a TTL page to 7 days from then.
|
|
128
182
|
|
|
129
183
|
Existing `tokens.json` entries keep working after you sign in; `aired claim --all` moves those pages into your account.
|