v0.2.0-p2 — bot-ready, plugin version tracking
AHV CLI v0.2.0-p2 — bot-ready, plugin version tracking
Bản này chốt contract cho Telegram bot team integrate + admin CMS auto-track plugin version.
Cài đặt
curl -fsSL https://ahvclaw.com/install.sh | bashPin theo tag (cho bot team & production)
git -C ~/.ahv/src checkout v0.2.0-p2Highlights
Bot adapter (10 subcommand JSONL contract):
ahv --version,ahv auth {status,login,logout} --jsonahv login {status, url PROVIDER, logout PROVIDER} --json(Grok/Codex/Claude OAuth)ahv doctor --json— 9 checks với severity taxonomy (ok/warn/error)ahv models {list, show ID} --json— full harness catalog (subscription + AHV router)ahv sessions {list, show ID, latest} --json— multi-frame zstd decode, real turn/event countsahv run --prompt-file --cwd --output jsonl [--session-id | --resume] --no-color --no-banner
JSONL event taxonomy: session_meta / assistant_delta / tool_status / assistant_final / turn_end / error
Error codes: missing_credential / not_logged_in / quota_limit / rate_limit / network_transient / model_unavailable / context_too_large / permission_denied / tool_error / internal_error
Exit codes: 0 completed / 1 terminal / 2 recoverable / 124 SIGTERM
Plugin version tracking:
- Admin CMS (
/admin) auto-fetch mỗi 6h: pinned vs latest - Badge stale/latest cho từng plugin (10 plugin: 5 workspace + 3 npm + 2 AHV bundle bot adapter)
- Nút "Check phiên bản" trigger refresh thủ công
Subscription plugin: dsh-plugin-subscriptions@0.5.0 — Grok/ChatGPT Codex/Claude Pro OAuth, model catalog auto-mount sau login.
Version reflect chuẩn:
$ ahv --version
ahv v0.2.0-p2 (commit c4b1b07, dsh 0.1.1-rc.1)
Bake vào $FORK/AHV_VERSION khi install/update — không phụ thuộc git command runtime.
Contract fixes since v0.2.0-p0
- No secret leak: grep sweep sk-*/Bearer/token/prefix = 0 leak trên mọi output
- Missing credential: JSONL error + exit 1 (không lãng phí boot dsh)
- Doctor severity: warn (route degraded non-blocking) vs error (blocking)
- Resume error path: turn_end reason=error → emit error event + exit 2
- Session persistence: multi-frame zstd decode → real events count
- Login flow: local
http://127.0.0.1:3080mặc định cho user cuối, override quaAHV_WEB_PUBLIC_URLenv cho server có domain
Non-goals (Phase 2 roadmap)
- OAuth device-code CLI (login không cần browser)
- Realtime streaming assistant_delta cho long turn với tool calls
- Models list caching client-side (mỗi call spawn dsh ~30-60s)
- Auto-bump plugin script khi detect stale
Files chính
packages/bundle/ahv/src/bot-{runner,startup,list-models}.ts— Cordis plugin JSONL streamerpackages/bundle/ahv/cordis.patch.{bot,list-models}.yml— patch overlaysscripts/prod/{ahv-bot.mjs,ahv-wrapper.sh,install.sh,ahv-web.service,ahv-admin-{server.mjs,index.html},landing-index.html}— deployment snapshots
Docs: https://ahvclaw.com/ · Plugin registry: https://ahvclaw.com/admin · Web UI live: https://ahv.ahvclaw.com