aired 1.8.0 → 1.9.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aired",
3
- "version": "1.8.0",
3
+ "version": "1.9.0",
4
4
  "description": "Publish HTML artifacts to shareable URLs instantly",
5
5
  "type": "module",
6
6
  "bin": {
@@ -17,7 +17,7 @@ echo "<h1>Hi</h1>" | npx aired --json # stdin; JSON is automatic when piped
17
17
  npx aired report.html --pin 4821 --ttl 24h
18
18
  ```
19
19
 
20
- Over MCP it's `publish_html` with `html` or `markdown` (plus `title`, `pin`, `ttl_seconds`, `permanent`). Read `url`, `id` and `update_token` from the result's `structuredContent`, not from the text.
20
+ Over MCP it's `publish_html` with `html` or `markdown` (plus `title`, `pin`, `ttl_seconds`, `permanent`). Read `url`, `id` and `update_token` from the result's `structuredContent`, not from the text. Chat apps with MCP Apps (Claude, ChatGPT, VS Code, Cursor) also show the person a card with the page's screenshot and link; still give the link in your reply.
21
21
 
22
22
  Markdown renders as a readable page in light and dark, with highlighted code, tables and task lists. Front matter `title:` (or the first `# heading`) sets the title. Raw HTML inside Markdown shows as text, so publish an `.html` file when you need custom HTML.
23
23
 
@@ -30,6 +30,19 @@ Markdown renders as a readable page in light and dark, with highlighted code, ta
30
30
 
31
31
  Checks share a small daily browser budget, so check once per change, not in a loop.
32
32
 
33
+ ## Send it as a PDF
34
+
35
+ When the user wants an attachment, a file to email or something to print, make a PDF instead of (or as well as) sending the link:
36
+
37
+ ```bash
38
+ aired pdf <id> # saves q3-update.pdf here (a name from the page title)
39
+ aired pdf <id> -o report.pdf --paper a4
40
+ ```
41
+
42
+ Over MCP it's `export_pdf` with `id` (and `update_token` unless signed in as the owner). It returns a `download_url` that works for 15 minutes: give it to the user or download it. A deck prints one slide per page; a doc or page prints on A4 or Letter with page numbers. Free PDFs carry a small "Made with aired" line; Pro PDFs don't. Asking again for the same version uses no browser time.
43
+
44
+ To let viewers download it themselves, turn on the PDF button: `aired set <id> --allow-pdf`, or `set_options` with `allow_pdf: true`. It doesn't work on a page with a view limit.
45
+
33
46
  ## Load the skill for the job
34
47
 
35
48
  | The user wants | Load | Over MCP |
@@ -72,7 +85,7 @@ aired set <id> --pin 4821 --ttl 24h --reads 50 --title "Q4"
72
85
  aired set <id> --clear-pin --permanent
73
86
  ```
74
87
 
75
- Over MCP it's `set_options`; `get_page` reads the settings back (whether a PIN is on, never the PIN). Every update keeps the old content: `aired versions <id>` and `aired restore <id> <n>` (`list_versions`, `restore_version`). Details in `aired-report`.
88
+ Over MCP it's `set_options`; `get_page` reads the settings back (whether a PIN is on, never the PIN, and `allow_pdf`). Every update keeps the old content: `aired versions <id>` and `aired restore <id> <n>` (`list_versions`, `restore_version`). Details in `aired-report`.
76
89
 
77
90
  ## When aired gets in the way
78
91
 
@@ -13,6 +13,7 @@ Run it with `npx aired` (no install) or install it with `npm install -g aired`.
13
13
  | `aired restore <id> <version>` | Put an earlier version back (it goes live as a new version) |
14
14
  | `aired set <id>` | Change who can open it, its expiry, view limit or title without uploading again |
15
15
  | `aired check <id>` | Open the page in a real browser and report errors (exits 1 if broken) |
16
+ | `aired pdf <id>` | Download the page as a PDF (a deck: one slide per page) |
16
17
  | `aired info <id>` | Title, size, views and expiry |
17
18
  | `aired delete <id>` | Delete a page |
18
19
  | `aired feedback` | Report a bug, friction or idea in aired itself |
@@ -48,7 +49,7 @@ aired set abc123 --only alice@client.com,@client.com # only these people (each
48
49
  aired set abc123 --public # anyone with the link again
49
50
  ```
50
51
 
51
- Also `--clear-title` and `--clear-reads`. 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). `--only` needs sign-in and a page in your account.
52
+ Also `--clear-title` and `--clear-reads`, and `--allow-pdf` / `--no-allow-pdf` to give viewers a Download PDF button or take it away (off by default; not on pages with a view limit). 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). `--only` needs sign-in and a page in your account.
52
53
 
53
54
  ## aired check
54
55
 
@@ -59,7 +60,19 @@ aired check abc123 --screenshot shot.jpg --json
59
60
  aired check abc123 --strict # also fail on warnings
60
61
  ```
61
62
 
62
- It reports script and console errors, files that didn't load, broken images and a blank screen, plus warnings for slow, heavy, very tall or sideways-scrolling pages, with a screenshot URL that works for 24 hours. Checks share a daily browser budget of 3 minutes across everyone; 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. When it's spent you get HTTP 429 (exit 3) until 00:00 UTC.
63
+ It reports script and console errors, files that didn't load, broken images and a blank screen, plus warnings for slow, heavy, very tall or sideways-scrolling pages, with a screenshot URL that works for 24 hours. Checks share a daily browser budget of 10 minutes across everyone; 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. When it's spent you get HTTP 429 (exit 3) until 00:00 UTC.
64
+
65
+ ## aired pdf
66
+
67
+ ```bash
68
+ aired pdf abc123 # saves <page-title>.pdf here
69
+ aired pdf abc123 -o deck.pdf --notes # a deck with a page of speaker notes after each slide
70
+ aired pdf abc123 --paper a4 # a4 or letter
71
+ ```
72
+
73
+ A deck prints one slide per page at 1280×720 (landscape). A doc or page prints on A4 or Letter with margins and page numbers: Letter by default in the US, Canada and a few other Letter countries, A4 elsewhere. `--notes` is for your own decks, signed in; an update token isn't enough. Free PDFs carry a small "Made with aired · aired.sh" line; Pro PDFs have none. It uses the stored update token, else your sign-in or `AIRED_API_KEY`.
74
+
75
+ Each PDF is kept for its page version, so running it again uses no browser time until the page changes. New PDFs share 20 minutes of browser time a day across everyone (a fresh PDF takes about 10 seconds); each caller's share is 3 minutes a day on Free (about 18 PDFs) and 10 minutes on Pro (about 60), plus 60 downloads an hour and 4 new PDFs a minute. When it's spent you get HTTP 429 `pdf_budget` (exit 3) until 00:00 UTC; PDFs made before still download.
63
76
 
64
77
  ## aired feedback
65
78
 
@@ -81,10 +94,10 @@ aired feedback --kind friction --impact worked_around "aired set needed the page
81
94
 
82
95
  | Code | Meaning |
83
96
  |---|---|
84
- | 0 | Success |
97
+ | 0 | Success (for `aired pdf`, the file is saved) |
85
98
  | 1 | API error; for `aired check`, only "the page is broken" |
86
99
  | 2 | Bad input, missing file or no token; for `aired check`, also no access to the page |
87
- | 3 | Rate limited; for `aired check`, also "the check couldn't run, try later" |
100
+ | 3 | Rate limited; for `aired check`, also "the check couldn't run, try later"; for `aired pdf`, also a spent budget or a busy browser |
88
101
 
89
102
  A malformed `AIRED_API_KEY` stops the run with exit 2, so CI never publishes anonymously by mistake.
90
103
 
@@ -17,10 +17,11 @@
17
17
  | `publish_html` | nothing | Publish `html` or `markdown`, with `deck`, `title`, `pin`, `ttl_seconds`, `permanent`; `id` + `update_token` to update (owner: `id` alone); `message` labels the version; `file_path` and `project` on the local server |
18
18
  | `get_template` | nothing | Starters: `deck`, `deck-html`, `report`, `one-pager` (no name lists them) |
19
19
  | `get_page` | owner, or the `update_token` | Title, URL, size, views, view limit, expiry, project, PIN on or off, doc or deck, live `version`; `include_source` adds the Markdown or HTML as published and a deck's notes |
20
- | `set_options` | owner, or the `update_token` | Change `pin` (null removes), `ttl_seconds` or `permanent`, `view_limit` (null removes), `title`; signed in: `access`, `public_results`, `accept_responses` |
20
+ | `set_options` | owner, or the `update_token` | Change `pin` (null removes), `ttl_seconds` or `permanent`, `view_limit` (null removes), `title`, `allow_pdf` (viewers can download a PDF); signed in: `access`, `public_results`, `accept_responses` |
21
21
  | `list_versions` | owner, or the `update_token` | Every version kept, newest first, with who made it, when, size and note |
22
22
  | `restore_version` | owner, or the `update_token` | Put `version` back as a new version; a page with responses needs the owner |
23
23
  | `check_page` | owner, or the `update_token` | Render the page in a browser: errors, failed files, blank screen, screenshot; `viewport` `desktop` or `mobile` |
24
+ | `export_pdf` | owner, or the `update_token`; `notes` needs the owner | Turn the page into a PDF: `download_url` (15 minutes), `filename`, `pages`, `cached`; `paper` `a4` or `letter`; `notes` for a deck's speaker notes |
24
25
  | `send_feedback` | nothing | Report a bug, friction or idea in aired itself |
25
26
  | `get_responses` | owner, signed in | What viewers saved with `aired.collect`; `limit` (up to 200), `cursor`, `format: "csv"` |
26
27
  | `update_data` | owner, signed in | Push JSON a page reads with `aired.data`, without republishing |
@@ -60,4 +61,15 @@ Every caller gets the skills:
60
61
  | `skill://aired/aired-report/SKILL.md` | Reports and private sharing |
61
62
  | `skill://aired/aired-forms/SKILL.md` | Pages that collect answers |
62
63
 
64
+ Every caller also gets the page card, `ui://aired/page-card-v1.html` (below).
65
+
63
66
  Signed-in callers also get their own pages as `aired://page/{id}` (the newest 50 are listed). Reading one returns its HTML, or its Markdown for a Markdown page (a deck's HTML with its notes). Another account's page, or an anonymous one, is refused.
67
+
68
+ ## Page card (MCP Apps)
69
+
70
+ Chat apps that support MCP Apps draw a card under `publish_html`, `get_page`, `update_page` and `restore_version`: the page's screenshot, title and link, views, who can open it and when it expires, with Open and Copy link, and Views and Sharing (in the dashboard) for the signed-in owner. Claude (web, desktop, mobile), ChatGPT, VS Code, Cursor and Goose show it; Claude Code and other text-only clients don't, and get the same text and `structuredContent` as always.
71
+
72
+ - Nothing to call: the tools link to the card themselves (`_meta.ui.resourceUri`).
73
+ - Still give the link in your reply. The card is for the person; not every client shows it.
74
+ - The card never shows the update token, the PIN or the claim link. Pass those on in text as before, when the person needs them.
75
+ - The local server (`npx aired --mcp`) shows the same card in desktop apps that run local servers, on `publish_html`, `get_page` and `restore_version`.
@@ -10,14 +10,17 @@ API errors are JSON: `{ "error": "...", "code": "..." }`. Act on `code`; `error`
10
10
  | 402 `plan_limit` | Free can't do this (a page over 2 MB, too many publishes, more live data) | Give the `upgrade_url` to the person |
11
11
  | 403 `invalid_token` | The update token doesn't match this page | Use the token from this page's publish |
12
12
  | 403 `not_owner` | Signed in, but it's not your page | Use the page's update token |
13
- | 403 `owner_required` | The page has collected responses, so only its owner can replace or restore it | Sign in as the owner (`aired login` or `AIRED_API_KEY`) |
13
+ | 403 `owner_required` | The page has collected responses, so only its owner can replace or restore it; or a PDF asked for speaker notes with only the update token | Sign in as the owner (`aired login` or `AIRED_API_KEY`), or leave out `notes` |
14
14
  | 404 `not_found` | No such page, or it expired | Publish again |
15
15
  | 410 | The page reached its view limit | Raise it with `aired set <id> --reads <n>` or `--clear-reads` |
16
+ | 413 `too_large` | The page is too big to turn into a PDF | Make it smaller |
16
17
  | 413 `payload_too_large` | The request body is too big (21 MB for publish and MCP, 1 MB for other calls; live data has its own limit) | Send less |
17
18
  | 422 `spam_rejected` | It looks like spam or phishing | Don't retry the same content |
18
19
  | 429 `rate_limited` | Too many requests | Wait (CLI exit 3); sign in for higher limits |
19
20
  | 429 `check_budget` | Today's browser time for checks is spent | Try after 00:00 UTC |
20
21
  | 503 `check_busy` / `unavailable` | Busy for a moment | Retry after `Retry-After` |
22
+ | 429 `pdf_budget` | Today's browser time for new PDFs is spent | Try after 00:00 UTC; PDFs made before still download |
23
+ | 503 `pdf_busy` | The PDF browser is busy | Retry after `Retry-After` |
21
24
 
22
25
  ## Common problems
23
26
 
@@ -88,6 +88,20 @@ Over MCP: `publish_html` with `id` and `update_token` (or `id` alone when you ow
88
88
  - Each version records who made it: `owner`, `token` or `agent`, and the note from `-m` / `message`.
89
89
  - Free keeps the last 5 earlier versions; Pro the last 50, each for 90 days (the newest 5 stay however old). Deleting the page deletes its history.
90
90
 
91
+ ## Send it as a PDF
92
+
93
+ Clients often want a file they can forward or keep. Make one from the published report:
94
+
95
+ ```bash
96
+ aired pdf <id> -o acme-november.pdf # A4 or Letter, with page numbers
97
+ ```
98
+
99
+ Over MCP: `export_pdf` with `{ "id": "<id>" }` (add `"paper": "a4"` or `"letter"` to choose; the default follows the caller's country). Attach the file, or send the `download_url`, which works for 15 minutes.
100
+
101
+ Or let the client download it from the page: `aired set <id> --allow-pdf` (`set_options` with `allow_pdf: true`, or "Let viewers download a PDF" on the dashboard's Share screen). The page then shows a PDF button. It works behind a PIN or a people list (only for someone who can open the page right now), but not on a page with a view limit, and it never counts a view.
102
+
103
+ On Free the PDF has a small "Made with aired · aired.sh" footer; on Pro it has none, the same as the badge.
104
+
91
105
  ## Check before sending
92
106
 
93
107
  `aired check <id>` (or `check_page`) opens the page as a visitor would, even behind a PIN or a people list. Fix what it reports and update the same id.
@@ -89,9 +89,24 @@ The result has `kind: "deck"`, `slides`, and a `presenter_url` (the speaker view
89
89
  | `https://aired.sh/p/<id>/presenter` | The speaker view: notes, next slide, a timer, and buttons that move the slides window. Owner only, signed in |
90
90
 
91
91
  - Notes are cut out of the public page when you publish. Only the signed-in owner sees them. An anonymous deck's notes come back only through `get_page` with `include_source` and its update token.
92
- - Print (Save as PDF) gives one slide per page, so the deck exports as a PDF.
93
92
  - Need it private? Add a PIN or share with named people: see `aired-report`.
94
93
 
94
+ ## Export as a PDF
95
+
96
+ For an attachment, a handout or a file to send ahead of the meeting:
97
+
98
+ ```bash
99
+ aired pdf <id> # one slide per page, at 1280×720 (landscape)
100
+ aired pdf <id> --notes # a page of speaker notes after each slide that has notes
101
+ ```
102
+
103
+ Over MCP: `export_pdf` with `{ "id": "<id>" }`, or `{ "id": "<id>", "notes": true }` for the notes version. It returns a `download_url` that works for 15 minutes.
104
+
105
+ - Notes are never in a PDF unless the signed-in owner asks. An update token isn't enough, the same as the speaker view, so publish signed in if you'll want them.
106
+ - To let viewers download the deck as a PDF (never with notes), turn on the button: `aired set <id> --allow-pdf` or `set_options` with `allow_pdf: true`. It shows a PDF button on the aired badge; not on decks with a view limit.
107
+ - Free PDFs carry a small "Made with aired" mark in the corner of each slide; Pro PDFs don't.
108
+ - Printing from the browser (Save as PDF) also gives one slide per page.
109
+
95
110
  ## Check before sharing
96
111
 
97
112
  ```bash