hey-axi 0.3.2 → 0.3.3
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 +6 -5
- package/package.json +1 -1
- package/skills/hey-axi/SKILL.md +2 -2
- package/skills/hey-axi/references/commands.md +3 -2
- package/src/errors.js +1 -1
- package/src/manifest.json +28 -6
- package/src/send.js +2 -2
- package/src/version.js +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
An agent-friendly wrapper for [HEY CLI](https://github.com/basecamp/hey-cli) (`hey`), Basecamp's command line for HEY email, calendars, todos, habits, time tracking and journals.
|
|
6
6
|
|
|
7
|
-
hey-axi runs `hey`, asks for its JSON response envelope, and prints it as [TOON](https://github.com/toon-format/toon). It follows the [AXI](https://axi.md) principles: a live home view, minimal default fields, truncated long text, definitive empty states, and unknown flags rejected up front. On our synthetic benchmark that's **~89% fewer tokens than `hey --json`** ([docs/benchmarks.md](docs/benchmarks.md)). It also adds a few safety rails. It covers **every command in HEY CLI v1.
|
|
7
|
+
hey-axi runs `hey`, asks for its JSON response envelope, and prints it as [TOON](https://github.com/toon-format/toon). It follows the [AXI](https://axi.md) principles: a live home view, minimal default fields, truncated long text, definitive empty states, and unknown flags rejected up front. On our synthetic benchmark that's **~89% fewer tokens than `hey --json`** ([docs/benchmarks.md](docs/benchmarks.md)). It also adds a few safety rails. It covers **every command in HEY CLI v1.8.0** (released 2026-10-09; commit `732568e`): 156 runnable command paths, including the `login`/`logout` aliases, plus the `box <id>`-style shortcuts. It routes from a snapshot of HEY's own `hey commands --json` catalog. Commands added since v1.7.0 (`contact deliver`, `event delete --occurrence/--apply-to`, `screener clear`, `thread update`) need HEY v1.8.0 or newer; with an older HEY they fail with `kind: hey_outdated`. See [CHANGELOG.md](CHANGELOG.md) for what changed in each release.
|
|
8
8
|
|
|
9
9
|
## Install
|
|
10
10
|
|
|
@@ -34,6 +34,7 @@ hey-axi thread read 123 # bodies cut at 1000 chars with "(tru
|
|
|
34
34
|
hey-axi thread read 123 --full # HEY's complete, untouched result
|
|
35
35
|
hey-axi box view imbox --fields id,subject,creator.email_address # choose columns (--fields all = every field)
|
|
36
36
|
hey-axi thread read 123 --json # the same shaped output as compact JSON
|
|
37
|
+
hey-axi thread update 123 --name "Kitchen renovation quotes" # rename a thread (nothing is emailed)
|
|
37
38
|
hey-axi box view imbox --quiet # drop HEY's summary/notice/breadcrumbs; keep data, count and hints
|
|
38
39
|
hey-axi reply 123 --message - < note.txt # message body from stdin (saved as a draft)
|
|
39
40
|
hey-axi setup scope --label Acme # per-directory home view (.hey-axi.json)
|
|
@@ -73,10 +74,10 @@ hey-axi move --help # usage, flags, examples, notes (no H
|
|
|
73
74
|
- `forward`, `draft send` and `bulk-reply send` have no draft mode in HEY, so they're refused (exit 2) with the safe alternative (`reply … --to`, `draft show`, `bulk-reply preview`).
|
|
74
75
|
- If you pass `--draft` or `--dry-run` yourself, hey-axi adds and marks nothing.
|
|
75
76
|
- With `--allow-send`, a send HEY confirms is marked `sent: true` (and names the delivered message's `id`/`topic_id` when HEY reports them, as HEY main does). If HEY holds it for Undo Send (`delayed: true`), a `held` line says it hasn't gone out yet and the thread won't show it until it does.
|
|
76
|
-
- If HEY refuses to send and keeps the message as a draft (HEY
|
|
77
|
-
- Recipients HEY would silently drop (no domain or top-level domain, like `bob` or `bob@example`) are refused (exit 2, `sent: false`) before HEY runs, for `compose`, `reply`, `forward` and `draft edit`. HEY
|
|
77
|
+
- If HEY refuses to send and keeps the message as a draft (HEY v1.8.0's `not_delivered`, usually the sending limit), the result is an error with `kind: not_delivered`, `sent: false` and the draft id, and says not to repeat the send. HEY v1.7.0 reports such a send as sent, so it can't be detected there.
|
|
78
|
+
- Recipients HEY would silently drop (no domain or top-level domain, like `bob` or `bob@example`) are refused (exit 2, `sent: false`) before HEY runs, for `compose`, `reply`, `forward` and `draft edit`. HEY v1.8.0's own "not a valid email address" refusal is reported the same way.
|
|
78
79
|
- **Credentials stay out of agent context.** `auth token` needs `--allow-secret` or `HEY_AXI_ALLOW_SECRETS=1`.
|
|
79
|
-
- **Destructive commands need an opt-in.** `screener clear` (HEY
|
|
80
|
+
- **Destructive commands need an opt-in.** `screener clear` (HEY v1.8.0) moves everything waiting in the Screener to Trash, for every sender, and HEY asks for no confirmation. hey-axi refuses it (exit 2, HEY isn't run, nothing changes) unless you pass `--allow-destructive` or set `HEY_AXI_ALLOW_DESTRUCTIVE=1`. The refusal says what it would do and suggests `screener list` and per-sender `screener deny` first.
|
|
80
81
|
- **Content-first.** `compose`, `reply`, `draft edit`, `journal write`, `contact note set` and `bulk-reply send` must be given their content (`--message`, `--message -` for stdin, or a positional) and are refused (exit 2) otherwise, so HEY never opens an editor.
|
|
81
82
|
- hey-axi's own flags (`--allow-send`, `--allow-secret`, `--allow-destructive`, `--interactive`, `--fields`, `--full`) are never forwarded to HEY. Switches take no value: `--draft=false` or `--allow-send=false` is refused (exit 2) rather than guessed at.
|
|
82
83
|
|
|
@@ -124,7 +125,7 @@ See [docs/listing.md](docs/listing.md) for how hey-axi gets listed on skills.sh
|
|
|
124
125
|
|
|
125
126
|
## Keeping up with HEY releases
|
|
126
127
|
|
|
127
|
-
`src/manifest.json` is a snapshot of `hey commands --json` plus usage parsed from `hey <command> --help`. The current snapshot was built from
|
|
128
|
+
`src/manifest.json` is a snapshot of `hey commands --json` plus usage parsed from `hey <command> --help`. The current snapshot was built from basecamp/hey-cli `main` at the v1.8.0 release commit (`732568e`, 2026-10-09), so its `hey_version` reads `1.8.0`. To regenerate it:
|
|
128
129
|
|
|
129
130
|
```bash
|
|
130
131
|
npm run refresh-manifest # from whichever `hey` you have installed (runs only `hey version`, `hey commands`, `hey <command> --help`)
|
package/package.json
CHANGED
package/skills/hey-axi/SKILL.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: hey-axi
|
|
3
3
|
description: Read, triage and draft HEY email (and HEY calendars, todos, habits, journal, time tracking) from the shell through hey-axi, a token-efficient TOON wrapper around Basecamp's HEY CLI that saves outgoing mail as drafts unless sending is explicitly allowed. Use when the user asks you to check, search, read, summarize, sort, label, screen, archive or reply to their HEY (hey.com) email, watch for new mail, or manage HEY todos, events, habits, journal entries or time tracks.
|
|
4
4
|
license: MIT
|
|
5
|
-
compatibility: Requires Node.js 20+ (commands run as `npx -y hey-axi`), the HEY CLI (`hey`, v1.7.0 or newer; `contact deliver
|
|
5
|
+
compatibility: Requires Node.js 20+ (commands run as `npx -y hey-axi`), the HEY CLI (`hey`, v1.7.0 or newer; `contact deliver`, `event delete --occurrence`, `screener clear` and `thread update` need v1.8.0 or newer) signed in to a HEY account, and network access to app.hey.com.
|
|
6
6
|
metadata:
|
|
7
7
|
author: TangentialSolutions
|
|
8
8
|
repository: https://github.com/TangentialSolutions/hey-axi
|
|
@@ -66,7 +66,7 @@ npx -y hey-axi trash <id>... npx -y hey-axi spam <id>... npx -y he
|
|
|
66
66
|
|
|
67
67
|
`screener clear` moves **everything** waiting in the Screener to Trash, for every sender, so hey-axi refuses it (exit 2, nothing changes) unless `--allow-destructive` is passed. Prefer `screener deny <clearance-id>` per sender. Only add `--allow-destructive` after the user has explicitly confirmed clearing the whole Screener.
|
|
68
68
|
|
|
69
|
-
`npx -y hey-axi contact deliver <contact-id> --to imbox|feed|papertrail|screened-out` chooses where a contact's future mail arrives (a contact id from `contact list`). `npx -y hey-axi event delete <series-id> --occurrence <occurrence_id> --apply-to current|future` deletes one day (or that day onward) of a repeating event; the occurrence_id comes from `event day`/`event week`.
|
|
69
|
+
`npx -y hey-axi contact deliver <contact-id> --to imbox|feed|papertrail|screened-out` chooses where a contact's future mail arrives (a contact id from `contact list`). `npx -y hey-axi event delete <series-id> --occurrence <occurrence_id> --apply-to current|future` deletes one day (or that day onward) of a repeating event; the occurrence_id comes from `event day`/`event week`. `npx -y hey-axi thread update <topic_id> --name "New subject"` renames a thread for everyone in the account; nothing is emailed (a collection's discussion thread takes its collection's name: use `collection update`).
|
|
70
70
|
|
|
71
71
|
Mutations are idempotent: when the desired state already holds (already seen, already deleted), the answer is `noop: true` with exit 0, not an error.
|
|
72
72
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# hey-axi command reference
|
|
2
2
|
|
|
3
|
-
<!-- Generated by scripts/gen-skill.js from src/manifest.json (hey 1.
|
|
3
|
+
<!-- Generated by scripts/gen-skill.js from src/manifest.json (hey 1.8.0). Do not edit by hand. -->
|
|
4
4
|
|
|
5
|
-
Every command from HEY CLI v1.
|
|
5
|
+
Every command from HEY CLI v1.8.0: 156 runnable paths, including the `login`/`logout` aliases and shortcut forms such as `box <name>`. Run each as `npx -y hey-axi <command> [args] [flags]` (just `hey-axi …` when it is installed globally).
|
|
6
6
|
`npx -y hey-axi <command> --help` shows usage, arguments, every flag with its default, 2-3 examples and notes, offline.
|
|
7
7
|
Flags every command accepts: `--account <id|all>`, `--json`, `--quiet`, `--fields <a,b|all>`, `--full`, `--ids-only`, `--count`, `--markdown`, `--html`, `--styled`, `--jq <expr>`. Unknown commands, flags and arguments, flags without a value and values of the wrong type are rejected before HEY runs (exit 2).
|
|
8
8
|
|
|
@@ -128,6 +128,7 @@ Flags every command accepts: `--account <id|all>`, `--json`, `--quiet`, `--field
|
|
|
128
128
|
| `spam` | Mark email threads as spam | | |
|
|
129
129
|
| `stop-ignoring` | Stop ignoring email threads | | |
|
|
130
130
|
| `thread read` | Read a thread | `--allow-partial` | fields: id, at, from, email, to, cc, body |
|
|
131
|
+
| `thread update` | Rename a thread | `--name <v>` | |
|
|
131
132
|
| `timetrack categories` | List time track categories | | fields: id, title |
|
|
132
133
|
| `timetrack category create` | Create a time track category | | |
|
|
133
134
|
| `timetrack category delete` | Delete a time track category | | |
|
package/src/errors.js
CHANGED
|
@@ -173,7 +173,7 @@ export function translateFailure(result, context = {}) {
|
|
|
173
173
|
if (usage) failure.kind = "usage";
|
|
174
174
|
// hey-axi checked the command and flags against its catalog before HEY ran, so HEY
|
|
175
175
|
// not knowing one means the installed HEY is older than that catalog (for example
|
|
176
|
-
// v1.7.0 and `contact deliver
|
|
176
|
+
// v1.7.0 and `contact deliver` or `thread update`, which arrived in v1.8.0).
|
|
177
177
|
const unknown = usage && path && failure.error.match(/^unknown (flag|shorthand flag|command)[:\s]+["']?([^"'\s]+)["']?/i);
|
|
178
178
|
if (unknown) {
|
|
179
179
|
const what = /command/i.test(unknown[1]) ? `the command \`${path}\`` : `${unknown[2]} for \`${path}\``;
|
package/src/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"source": "hey commands --json + hey <command> --help (basecamp/hey-cli
|
|
3
|
-
"hey_version": "1.
|
|
4
|
-
"hey_commit": "
|
|
5
|
-
"hey_commit_date": "2026-10-
|
|
2
|
+
"source": "hey commands --json + hey <command> --help (basecamp/hey-cli v1.8.0)",
|
|
3
|
+
"hey_version": "1.8.0",
|
|
4
|
+
"hey_commit": "732568eb9b09b44471e9fb889ba22308f87b4f95",
|
|
5
|
+
"hey_commit_date": "2026-10-09",
|
|
6
6
|
"commands": [
|
|
7
7
|
{
|
|
8
8
|
"name": "account",
|
|
@@ -3279,8 +3279,8 @@
|
|
|
3279
3279
|
{
|
|
3280
3280
|
"name": "thread",
|
|
3281
3281
|
"path": "thread",
|
|
3282
|
-
"short": "Read email threads",
|
|
3283
|
-
"notes": "Subcommands: read. Thread IDs come from hey box view. Use the same ID with hey reply or hey forward.",
|
|
3282
|
+
"short": "Read and rename email threads",
|
|
3283
|
+
"notes": "Subcommands: read, update. Thread IDs come from hey box view. Use the same ID with hey reply or hey forward.",
|
|
3284
3284
|
"subcommands": [
|
|
3285
3285
|
{
|
|
3286
3286
|
"name": "read",
|
|
@@ -3302,6 +3302,28 @@
|
|
|
3302
3302
|
"hey thread read 12345 --json",
|
|
3303
3303
|
"hey thread read 12345 --markdown"
|
|
3304
3304
|
]
|
|
3305
|
+
},
|
|
3306
|
+
{
|
|
3307
|
+
"name": "update",
|
|
3308
|
+
"path": "thread update",
|
|
3309
|
+
"short": "Rename a thread",
|
|
3310
|
+
"notes": "Renames a thread (topic) by its topic_id, as HEY's web app does; nothing is emailed. --name is required, trimmed, and at most 1024 bytes. A thread merged into another is not renamed and the command fails; rename the thread it was merged into instead. A collection's discussion thread shows its collection's name whatever this sets: use hey collection update for it.",
|
|
3311
|
+
"flags": [
|
|
3312
|
+
{
|
|
3313
|
+
"name": "name",
|
|
3314
|
+
"value": true,
|
|
3315
|
+
"type": "string",
|
|
3316
|
+
"desc": "New thread name (required)",
|
|
3317
|
+
"default": ""
|
|
3318
|
+
}
|
|
3319
|
+
],
|
|
3320
|
+
"synopsis": [
|
|
3321
|
+
"hey thread update <thread-id> [flags]"
|
|
3322
|
+
],
|
|
3323
|
+
"examples": [
|
|
3324
|
+
"hey thread update 12345 --name \"Kitchen renovation quotes\"",
|
|
3325
|
+
"hey thread rename 12345 --name \"Flights to Lisbon, May 14\""
|
|
3326
|
+
]
|
|
3305
3327
|
}
|
|
3306
3328
|
],
|
|
3307
3329
|
"synopsis": [
|
package/src/send.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Reading what HEY says about outgoing mail.
|
|
2
2
|
//
|
|
3
|
-
// HEY CLI v1.7.0 answers a send with a summary only. HEY
|
|
4
|
-
//
|
|
3
|
+
// HEY CLI v1.7.0 answers a send with a summary only. HEY v1.8.0 (first on HEY main after
|
|
4
|
+
// v1.7.0) also:
|
|
5
5
|
// - names what went out: data.id (the message), data.topic_id (its thread), subject,
|
|
6
6
|
// and delayed (true while Undo Send holds it back; the thread doesn't show it yet)
|
|
7
7
|
// - fails a send HEY refused (usually the sending limit) with code not_delivered (exit 7),
|
package/src/version.js
CHANGED