Skip to content

v0.2.0-p2 — bot-ready, plugin version tracking

Choose a tag to compare

@tranhieu860 tranhieu860 released this 22 Aug 15:43
· 41 commits to master since this release

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 | bash

Pin theo tag (cho bot team & production)

git -C ~/.ahv/src checkout v0.2.0-p2

Highlights

Bot adapter (10 subcommand JSONL contract):

  • ahv --version, ahv auth {status,login,logout} --json
  • ahv 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 counts
  • ahv 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:3080 mặc định cho user cuối, override qua AHV_WEB_PUBLIC_URL env 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 streamer
  • packages/bundle/ahv/cordis.patch.{bot,list-models}.yml — patch overlays
  • scripts/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