Skip to content

Close AXI gaps: home view, --version, minimal fields, truncation, session hooks, fail-loud flags (v0.2.0) - #8

Merged
tangentus merged 4 commits into
mainfrom
feat/axi-gaps
Oct 2, 2026
Merged

tangentus merged 4 commits into
mainfrom
feat/axi-gaps

Conversation

@tangentus

Copy link
Copy Markdown
Contributor

Closes the AXI gaps listed in docs/listing.md and bumps hey-axi to 0.2.0. Not merged. The repo stays private. Nothing was submitted externally, and there's no license, npm publish or topics.

Stacking: this branch is cut from main (acc5679) with #6 (benchmark) and #7 (agent skill) merged in. It needs both: it reruns #6's benchmark and updates #7's SKILL.md and docs/listing.md. The only conflict was the package.json scripts block, resolved by keeping both. Either merge #6 → #7 → this (the diff here then shrinks to the AXI work, commit feat/axi-gaps HEAD), or merge this alone and close #6/#7 as superseded.

What changed, per gap

Gap Change
8 Content first hey-axi with no args prints bin, description, the Imbox summary, the 10 newest threads (id,topic_id,from,subject,seen,at) and help lines with next commands. A missing hey / signed-out / failing HEY prints status: plus the fix, and still exits 0 so a session hook stays useful (src/home.js).
10 --version -v, -V, --version print the bare version through axi-sdk-js/fast-path and a leaf src/version.js, before the CLI graph loads. A test keeps this near the bare node startup time. hey-axi version prints hey_axi, hey and hey_commit.
2 Minimal schemas src/shape.js LIST_FIELDS defines 3–6 default columns for about 35 list commands. They're based on HEY's own --styled table columns and the hey-sdk schema, with fallbacks (from=creator.name|sender.name). Lists without a declared schema use a heuristic. --fields id,subject,creator.email_address takes aliases or dotted paths, --fields all keeps everything, and an unknown field exits 2 listing what's available. The defaults show in each command's --help.
3 Truncation Strings over 1000 chars (120 in list cells) are cut with … (truncated, N chars total), and a Run \… --full`help line appears only when something was cut.thread read keeps the sender, email, to/cc, date and body, and drops URLs, avatars and the duplicated summary. **--full` returns HEY's envelope untouched.**
4 Aggregates count: N of T total when HEY reports meta.total_count.
5 Empty states empty: 0 results for `hey-axi …` ; the home view says the Imbox is empty.
6 Fail loud / errors Unknown flags and missing (required) flags are rejected before HEY runs (exit 2), listing the command's valid flags, the global ones and the usage line. --help and globals always pass. Errors get a help next step per exit code when HEY gives no hint, and HEY's hints, breadcrumbs and notes are rewritten from hey … to hey-axi ….
7 Session hook hey-axi setup hooks [--project] [--status | --remove] installs a SessionStart hook for Claude Code and Codex (it also sets [features].hooks = true in ~/.codex/config.toml, as the SDK does) and a managed plugin for OpenCode, all through axi-sdk-js. It's explicit opt-in only, idempotent ("already up to date"), repairs the path when hey-axi moves, and --remove touches only hey-axi's entries. Other setup … subcommands still go to HEY.
9 Disclosure HEY's breadcrumbs become help: Run \hey-axi …` to …`.
10 Help Per-command --help now shows usage, flag descriptions and defaults, 3 examples and HEY's agent notes, all offline. refresh-manifest now also parses hey <cmd> --help (still no login and no network); the manifest grows from 37 KB to 104 KB.
Skill SKILL.md's home block is generated from src/guide.js, the same text the home view prints. npm run skill:gen regenerates it, and npm run skill:check runs in CI. SKILL.md, references (now with default fields), README (hook vs skill: you only need one), AGENTS.md and the docs/listing.md gap table are all updated.

New runtime dependency: axi-sdk-js@^0.1.12 (MIT, by the AXI author). It's used only for fast-path and the hook installer, and it pulls in @toon-format/toon@2 alongside our v4.

Benchmark (synthetic captures, o200k_base; full tables in docs/benchmarks.md)

Output Before (0.1.0) After (0.2.0)
hey-axi default 30,229 4,471 (−85.2%)
hey-axi --json 29,445 5,206
vs hey --json (39,256) −23.0% −88.6%
vs hey --styled (4,122) +633% +8.5%
  • Per command: box view imbox 15,591 → 1,059; search 5,024 → 701; event week 4,629 → 706; thread read 2,409 → 1,183 (the bodies are 1,500 chars, so the truncation is mild).
  • Errors grow 21 → 49 tokens because of the new help line.
  • --full reproduces the old default (30,257, which is 30,229 plus the error help line).

Tests

  • 103/103 locally. That includes the new test/axi.test.js and the updated routing tests (they pass required flags, and --limit only where it exists).
  • npm run skill:check passes.
  • The skill validates with agentskills validate and is found by npx skills add ./ --list.
  • Hook tests use a temporary HOME and cwd.

Remaining AXI gaps (see docs/listing.md)

  • Aggregates: totals only where HEY provides them. Mailbox lists keep HEY's "More available" notice.
  • Hook scope: not directory-scoped (a mailbox isn't per-repo), and there's no session-end capture.
  • Validation: idempotency of mutations is up to HEY, and positional arguments are validated by HEY, not hey-axi.
  • Unverified defaults: default fields for less common lists (screener history, account list, clip list, timetrack list) haven't been checked against real responses. Missing fields drop out automatically.
  • Skill examples: they can't use npx -y hey-axi until it's on npm.
  • Breadcrumbs: HEY's breadcrumbs still suggest forward, which hey-axi refuses without --allow-send.
  • Privacy: the session hook puts Imbox senders and subjects into every session (documented; --project narrows it).

- bench/generate-api-fixtures.mjs: SYNTHETIC HEY API responses generated
  from basecamp/hey-sdk openapi.json (go/v0.31.1, the SDK behind hey 1.7.0)
- bench/capture.mjs: runs the real hey binary against a local read-only
  mock API (or, with --real, read-only commands against your own account;
  output gitignored) and records --json and --styled output
- bench/tokens.mjs (npm run bench:tokens): counts tokens with js-tiktoken
  o200k_base and cl100k_base for hey --json, hey --styled, hey-axi TOON
  and hey-axi --json; --write refreshes docs/benchmarks.md
- docs/benchmarks.md: results, methodology, limitations, rerun guide
- test/bench.test.js: allowlist, mock is GET-only, bench runs, docs in sync
- skills/hey-axi/SKILL.md (Agent Skills spec; discovered by npx skills / gh skill)
- skills/hey-axi/references/commands.md generated from the manifest + policy
  (scripts/gen-skill-reference.js, npm run skill:reference)
- test/skill.test.js: spec rules, example commands resolve, reference is current
- README 'Agent skill' section; AGENTS.md code map
- package.json listing metadata (keywords, repository, homepage, bugs, author, files)
- docs/listing.md: axi.md / skills.sh / other directory steps + draft catalog entry
  (no LICENSE added: owner decision)
…ation, session hooks, fail-loud flags (v0.2.0)

- no-args home view (bin, description, 10 newest Imbox threads, next commands; status+fix when hey is missing/signed out)
- -v/-V/--version fast path via axi-sdk-js/fast-path + leaf src/version.js; `hey-axi version` shows both versions
- src/shape.js: default list fields per command, --fields a,b|dotted|all, truncation (1000 detail / 120 cells) with sizes and --full hint, empty/count lines, breadcrumbs -> help in hey-axi terms
- --full returns HEY's untouched envelope
- unknown flags and missing (required) flags rejected before HEY runs (exit 2, valid flags listed)
- per-command --help: usage, flag descriptions/defaults, examples, notes (manifest now includes hey <cmd> --help data)
- hey-axi setup hooks [--project|--status|--remove]: Claude Code, Codex, OpenCode session-start hooks via axi-sdk-js
- errors get a help next step per exit code; hints name hey-axi
- SKILL.md home block generated from src/guide.js; skill:gen / skill:check (CI)
- benchmark: default 30,229 -> 4,471 o200k tokens (-85%; -88.6% vs hey --json)
@tangentus
tangentus merged commit 421fd57 into main Oct 2, 2026
3 checks passed
@tangentus
tangentus deleted the feat/axi-gaps branch October 6, 2026 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant