Modernize Mastodon client for Nim 2 #1

Merged
lost-rob0t merged 11 commits from agent/modernize-nim2 into master 2026-08-04 21:03:10 +00:00
lost-rob0t commented 2026-07-31 00:30:39 +00:00 (Migrated from github.com)

What changed

  • require Nim 2 and remove the obsolete macro/jsony dependency stack
  • normalize hosts and URL joining consistently
  • fix malformed status endpoints and add multi-status lookup
  • URL-encode account lookups and WebFinger resources
  • preserve Mastodon string cursors instead of coercing IDs to integers
  • keep shared HTTP clients alive until explicit shutdown
  • retain response headers and expose typed, catchable API errors
  • preserve non-JSON error bodies and parse retry/rate-limit metadata safely
  • update instance, rules, account, followers, status, context, and public-timeline APIs
  • add focused unit tests and Nim 2.2.10 CI

Why

fediWatch depends on this client. The previous implementation was pinned to Nim 1.6-era behavior and contained request lifecycle, URL, query, cursor, and rate-limit defects that blocked a reliable StarIntel 0.9 migration.

Validation

GitHub Actions passes the full unit-test suite on Nim 2.2.10.

## What changed - require Nim 2 and remove the obsolete macro/jsony dependency stack - normalize hosts and URL joining consistently - fix malformed status endpoints and add multi-status lookup - URL-encode account lookups and WebFinger resources - preserve Mastodon string cursors instead of coercing IDs to integers - keep shared HTTP clients alive until explicit shutdown - retain response headers and expose typed, catchable API errors - preserve non-JSON error bodies and parse retry/rate-limit metadata safely - update instance, rules, account, followers, status, context, and public-timeline APIs - add focused unit tests and Nim 2.2.10 CI ## Why fediWatch depends on this client. The previous implementation was pinned to Nim 1.6-era behavior and contained request lifecycle, URL, query, cursor, and rate-limit defects that blocked a reliable StarIntel 0.9 migration. ## Validation GitHub Actions passes the full unit-test suite on Nim 2.2.10.
Sign in to join this conversation.
No description provided.