Files
Claude 5f8c5d07eb refactor(cli): move amy's note loading into commons; two-relay routing harness
The lookup and loading logic amy still carried moves to commons
`relayClient/oneshot`, behind a small port (`OneShotRelayAccess`: store query,
one-shot fetch, bootstrap and index relays):

- EventRef + EventLocator: event references and outbox-model lookup
- ProfileLoader: kind:0s for rendering, capped relay fetch
- OneShotNoteCache: the store-backed EventCache feeder (deletions first,
  batched relay-list fetch, composer tagging)
- ThreadLoader: the thread screen's filters settled from the store, then
  relay rounds, laid out by ThreadFeedFilter
- NotificationsLoader: subscription filter, own-target check, classify

amy keeps the Context adapter, the planner's account inputs and the JSON
output. Commons gains unit tests over an in-memory port.

notes-headless.sh gains a routing section: two `amy serve --db` relays on a
non-private IPv4 (auto-detected or --routing-host; skipped otherwise),
asserting inbox routing for reply/react/repost/mention, deletions on both
relays, the NIP-25 reaction-to-reply notification, and that a reply deleted
while a relay was down stays out of the thread.

The harness exposed that Context.bootstrapRelays() left out the account's
NIP-65 read relays, so a bare event id was never looked up on our own inbox.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmDZGXB7n5dLuegMARB1Rh
2026-10-06 16:33:08 +00:00
..