Skip to content

v0.3.0 — one gateway, and a lighter engine

Latest

Choose a tag to compare

@wangkant wangkant released this 04 Sep 07:24
· 2 commits to master since this release

AstrBot is the platform now: QQ enters through the same gateway as every other adapter, the three model settings are named for the protocol instead of a vendor, and the package is 1,300 lines lighter after a debugging pass and a simplification pass.

For people who want to leave it in a group

  • A platform from one token. The AstrBot step of the wizard (and --platform telegram --token ...; also discord, slack, kook, lark) writes the adapter entry into AstrBot's own config, so a bot token becomes a persona in a chat with one wizard run and one AstrBot restart.
  • The forwarder adapts at the platform edges, with each platform's own mechanisms: AstrBot's typing indicator for the whole round-trip, Discord mention and emoji markup unfolded into names, Slack links unfolded and mentions in Slack's own mrkdwn, and videos, files and voice messages arriving as a note the persona can react to.
  • python quickstart.py connects AstrBot. It asks for AstrBot's data directory, copies the forwarder plugin, generates the shared token once and writes it to both .env and the plugin config, writes the allowlists you give it, and sets GATEWAY_NATIVE_PLATFORMS=aiocqhttp when QQ is included. --astrbot <data dir> [--qq] does it without prompts; re-running keeps the token.
  • @<BOT_NAME> what have you learned / 你学到了什么. Answers in chat with that room's memory count, the promoted replies and "not this, this" pairs in effect, proposals still waiting for a second voice, and the recent self-scores. No model call.
  • Editing the persona no longer orphans what the bot has learned. Every revision under one PERSONA_VERSION is the same character (runtime/persona_lineage.json); a new PERSONA_VERSION or BOT_NAME is still a clean slate. tools/candidates_admin.py lineage shows the lineage, lineage adopt <hash> folds in rows from before it existed.

Breaking

  • DEEPSEEK_API_KEY, DEEPSEEK_BASE_URL, DEEPSEEK_MODEL are now LLM_API_KEY, LLM_BASE_URL, LLM_MODEL. The old names are not honoured; the startup preflight reports both the missing new key and each leftover old one.

Deprecated

  • The direct OneBot ingress (/webhook/qq fed by the client's own webhook) and launch.vbs. Still served and tested, warned about once on first use; removal in a later release. No feature is lost on the AstrBot path: BOT_QQ, QQ_GROUPS and the OneBot HTTP API (NAPCAT_API) keep carrying identity and the QQ-only background actions.

Added

  • Startup config preflight (also the first section of tools/healthcheck.py): missing required settings, an empty BOT_NAME, a bad AGENT_HOME, a BOM on .env, and any key .env.example does not list. .env.example is test-enforced as the authority on key names.
  • GATEWAY_NATIVE_PLATFORMS, a proactive turn over the gateway ("proactive": true), and MAX_INFLIGHT_GATEWAY.

Security

  • The gateway envelope's HMAC signature is tested against bad signatures; a rejected rewrite no longer expires; fullwidth and compatibility twins of refused characters are refused too; memory-deletion authority fails closed; the OneBot bridge is never proxied.

Fixed

  • what do you remember is delivered again: a memory tagged with who it is about used square brackets, which the output policy refuses, so the whole list was silently dropped. Both memory commands are now tested to survive the character policy verbatim.
  • Thirty-odd reproduced bugs across dedup, learning scope, promotion, proactive cooldowns, log rotation on Windows, the terminal trial's validator, persona-path resolution under AGENT_HOME, and more. Each has a test that fails without the fix.

Changed

  • Simplification pass with no behaviour change: one implementation per mechanism, dead code removed, comments cut to the "why". agent.py 3,896 → 3,363 lines, prompts.py 1,296 → 874, transport.py 554 → 439.
  • Both READMEs rewritten around the AstrBot path; the architecture diagram redrawn with every arrow labelled; the demo animation grown to four scenes.

Full details, item by item, in CHANGELOG.md.