• v1.4.0 b2f8eab3b9

    v1.4.0
    Some checks failed
    CI / build-and-test (push) Failing after 15s
    CI / docker-build (push) Successful in 19s
    Stable

    joeyr released this 2026-07-13 12:54:03 -05:00 | 20 commits to main since this release

    Executes P4-1 (fuller plugin decomposition): query, lol, and d2 all implement a real Plugin contract and AufhockerBot becomes a thin host (~1100 → ~440 lines). Structural refactor — the command surface and responses are unchanged, with one deliberate security tightening (make-public expiry, below).

    Added

    • Plugin contract + registry (src/plugins/Plugin.ts, documented in docs/PLUGINS.md): plugins own their command surface (buildCommands on the /aufhocker root), slash/button routing, and lifecycle; the host owns infra, interaction wrapping, and dispatch. Lifecycle semantics preserved from the old inline wiring: init() always runs (so disabled plugins answer "feature disabled") and errors are fatal; start() runs only when enabled and errors leave the plugin degraded. One host-owned priority-3 shutdown hook stops all enabled plugins (replacing the per-poller hooks).
    • Make-public security tests. The per-user publish authorization and the 1-hour expiry are now covered by tests (previously only the public-header formatting was), plus registry dispatch/lifecycle tests.

    Changed

    • query extracted into src/plugins/query/. The query-chat command definition moved out of DiscordClient (core now defines only the bare /aufhocker root); the Claude query flow, the make-public button flow (pendingResponses + handler + sweep), and Claude credential validation (still startup-fatal on a rejected key) moved into the plugin. src/plugins/{lol,d2emu}/plugin.ts wrap the existing services behind the same contract.
    • Make-public expiry enforced at click time. The 1-hour TTL was only swept lazily when the next query ran, so an expired response stayed publishable in between. The button handler now age-checks the response id and rejects (and removes) expired entries — the one behavior change in the refactor, and it only tightens.

    Removed

    • SubcommandGroupBuilder and registerCommands' group parameter (dead once every plugin contributes via buildCommands), and D2EmuPollingService.registerShutdown (superseded by the host hook).
    • docs/PLUGIN_DECOMPOSITION_PLAN.md — folded into docs/PLUGINS.md; WHATS_LEFT.md's P4-1 item is closed.
    Downloads