feat(appservice): Matrix Application Service core library (M4a) #530

Merged
jason.woltje merged 1 commits from feat/mosaic-as-m4a into main 2026-06-10 21:23:26 +00:00
Owner

Phase M4a of the Matrix agent-comms roadmap (mosaicstack/agent-comms#9, design doc: agent-comms docs/design/M4-MOSAIC-AS.md). New zero-dep package @mosaicstack/appservice: AS transactions handling, virtual-user intent (@agent-* namespace), Synapse registration builder, bridge DTOs. 14 vitest tests; build/lint/typecheck/format green. Security review applied: timing-safe hs_token compare, YAML injection hardening, uuid txn ids, DTO slug validation. Next phases: apps/appservice daemon host + Synapse registration rollout (M4a deploy), daemon bridge integration (M4b).

Phase M4a of the Matrix agent-comms roadmap (mosaicstack/agent-comms#9, design doc: agent-comms docs/design/M4-MOSAIC-AS.md). New zero-dep package @mosaicstack/appservice: AS transactions handling, virtual-user intent (@agent-* namespace), Synapse registration builder, bridge DTOs. 14 vitest tests; build/lint/typecheck/format green. Security review applied: timing-safe hs_token compare, YAML injection hardening, uuid txn ids, DTO slug validation. Next phases: apps/appservice daemon host + Synapse registration rollout (M4a deploy), daemon bridge integration (M4b).
jason.woltje added 1 commit 2026-06-10 21:09:30 +00:00
feat(appservice): @mosaicstack/appservice — Matrix AS core (M4a, agent-comms#9)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
8b9d19347f
First phase of mosaic-as per agent-comms docs/design/M4-MOSAIC-AS.md:
- TransactionHandler: AS transactions endpoint logic with timing-safe
  hs_token verification (Bearer + legacy access_token), bounded txnId
  dedupe (documented at-least-once limitation), handler error isolation
- AppserviceIntent: virtual user registration (m.login.application_service),
  user_id impersonation, invite-then-join fallback, thread-aware sends
  (m.thread + is_falling_back), typing, display names, uuid txn ids
- Registration builder + hardened YAML serializer (control-char rejection,
  quote escaping) for the Synapse mosaic-as.yaml
- bridge.dto.ts validators for the agent-comms daemon bridge API
Zero runtime deps; strict ESM/NodeNext; 14 vitest tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
jason.woltje merged commit 8f09c910a9 into main 2026-06-10 21:23:26 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#530