Releases: OpenBST/a2a
Releases · OpenBST/a2a
v0.1.0 — initial public release
Install (Windows x86_64)
Download a2a-v0.1.0-windows-x86_64.exe from the assets below. Rename it to a2a.exe and either:
- Place it on a directory already on your PATH and run
a2ato launch the welcome wizard, or - Place it anywhere and double-click / run it once — the welcome wizard offers to add its directory to your user PATH (Windows: HKCU\Environment\Path; Unix: prints a manual recipe).
Then run a2a (welcome wizard) → cd <project> → a2a init → a2a auth add ... to register your first Cursor API key.
For full instructions see GUIDE.en_us.md / GUIDE.zh_cn.md.
What's in v0.1.0
CLI
- Subcommands:
init,ask,auth,doctor,list,clean,status,models,reset. - No-subcommand entry points:
a2a(typed in a terminal or double-clicked from Explorer) → welcome wizard. Detects whether the binary's directory is on user PATH, optionally appends it (HKCU\Environment\Path on Windows, manual recipe on Unix), and detects thecursor-agentCLI. Stale a2a directories on PATH (other locations whosea2a.exediffers from the running binary) are flagged and removable in one Y/n.a2a --agent→ structured health report ([health]block ofkey: valuelines an AI agent can regex-parse) plus an[next-step for you, the agent]block worded as direct imperatives. Never pauses, never prompts for Y/n — safe to capture stdout in a single read from Cursor's terminal tool.
- Non-interactive credential entry via
--from-stdinona2a auth add/a2a auth update: the API key is read from stdin's first non-empty line, with UTF-8 BOM stripped (PowerShell pipe-safe). Tokens never appear in shell history.
Storage (single SQLite file, no on-disk config)
~/.a2a/credentials.db(Unix 0600 / Windows user-private ACL):profilestable — plaintext API keys (per the trust-the-local-user threat model; no encryption / KDF / master password).metatable — currently onlydefault_profile.model_aliasestable — user-global model alias registry, shared across all a2a projects on this machine.
- No project-level
.a2a/config.toml, no bundleddefault-config.toml, no--config/A2A_CONFIGoverride. Every value that pre-r20 lived in[defaults]is now a build-time constant incrate::defaults.
Consultation (ask)
- Parallel
cursor-agentsubprocesses (one per model alias), each launched with the resolved profile's API key viaCURSOR_API_KEY. - Workspace isolation via
readonly_mirroronly: a temp dir containing only the prompt frontmatter'scontext_files. There is noscratchmode and no--scratchflag. - Per-call profile chain via
--profiles a,b,c(comma-separated, ordered, deduped). When omitted, a single-element chain is used (resolved default profile). There is no--profile(singular) and no--no-fallbackflag — pass--profiles <single>for the equivalent. - Three-class error routing (hard-coded keyword match against
cursor-agentstderr; no regex config file): KeyDead (401 / billing / quota / etc.) deletes the profile and advances the chain; ModelUnavailable / Unknown skips the alias entirely; Transient (rate-limit / TLS / DNS / timeout) retries the same profile up to 3× with 1 s / 3 s / 10 s back-off, using--resume <session_id>to keep the same Cursor backend chat. - Cross-account
--resumeis never issued — Cursor backend silently drops history on cross-account resume but reports success, so the KeyDead profile-switch path always sends a fresh prompt with a continuation prefix. - Hard 15-minute timeout per
cursor-agentinvocation (covers wedged HTTP/2 streams / TLS half-open). Timeout preserves anysession_idand stderr captured so far via sharedArc<Mutex>slots. - "Store drained" guard: when KeyDead deletes the last profile, every in-flight alias bails immediately and the orchestrator prints a recovery banner instead of letting peer aliases waste more cursor-agent calls.
- Raw-answer audit: every consultation persists each model's markdown answer plus a
meta.toml(alias, cursor_model, mode, profile_used, fallback_chain, success, elapsed_ms, session_ids[], last_session_id, fallback_attempts[], optional[models.budget]from--log-budget).
Templates / Cursor IDE integration
a2a init [--path <project>] [--force]writes five templates to two locations each:<project>/.a2a/template/<stage_rel>— staged audit copy.<project>/<dst_rel>— live copy under.cursor/skills/{a2a,a2a-operator,a2a-setup-guide}/SKILL.md,.cursor/rules/40-a2a-protocol.mdc, and.cursor/templates/a2a-prompt-template.md.
- All templates are baked into the binary via
include_str!(no on-disk install dir, notool_install_dir()walk). A{{A2A_VERSION}}placeholder is substituted at install time. - The three skills together cover the agent flow:
a2a-multi-ai-consult— when to consult multiple models, how to synthesize, the AskQuestion-or-bust rule.a2a-operator— natural-language → CLI translation for everyday operations, with confidentiality rules around tokens.a2a-setup-guide— first-time-setup wizard triggered by the literal user messagea2a_guide.
a2a init --forceis the single-shot way to refresh installed templates after upgrading the binary. There is noa2a syncsubcommand.
Per-command stderr nudge
- When
cursor-agentis missing from PATH, every subcommand exceptdoctor/status/ no-subcommand emits a one-line stderr warning pointing at https://cursor.com/cli.doctorand the welcome wizard print their own dedicated reachability block, so the warning is suppressed there.
Housekeeping
a2a list/a2a clean [--older-than <duration>] [--yes]for consultation-history hygiene. Eachaskalso kicks off a detached, best-effort 7-day prune of stale consultation dirs.a2a reset models [--yes]wipes the SQLitemodel_aliasestable;a2a reset credentials [--yes]deletes~/.a2a/credentials.dbentirely.
Known limitations
- No streaming output forwarded to the user — raw answer files are written after each
cursor-agentsubprocess exits. Per-alias progress lines (received first response (streaming...),still receiving... +N chars,still alive (...)) are printed during the run. - Budget estimation is character-count-based (proxy for tokens); per-model token-aware estimation is not implemented.
- Tested primarily on Windows. macOS / Linux paths are written cross-platform but have had less wall-clock testing.
License: MIT OR Apache-2.0