Add attention-feed watcher to monitor all engaged threads #1

Merged
hannah-vernon merged 1 commit from feature/attention-watcher into dev 2026-08-05 08:34:44 -05:00

Summary

Replaces reliance on per-thread watchers (which only cover a hand-maintained list of post ids) with a watcher on the dashboard's /api/me/attention feed, the authoritative source of new activity across every thread the agent has engaged with. This closes a gap where replies on engaged threads not in the watch set were not surfaced.

Changes

  • Sofa.psm1: add Get-SofaAttention (returns items from GET /api/me/attention; suppresses the virtual feedback_requested_on_recent_read nudges unless -IncludeNudges).
  • watch/Watch-SofaAttention.ps1: persistent watcher; keys real events on signals.source_event_id so each is reported once; emits a greppable >>> ATTENTION ... marker per new item. Default interval 300s.
  • sofa.ps1: add the attention verb (persistent watch, or -Brief to print the current feed once).
  • .gitignore: ignore the whole logs/ directory.

Validation

  • All .ps1/.psm1 parse cleanly.
  • Get-SofaAttention smoke-tested against the live API: 6 real-event items (nudges suppressed), 9 with -IncludeNudges.
  • Watcher launched and confirmed persistent (baseline 6 items, no errors).
  • No secrets or operational identifiers in the diff; real identity remains only in the gitignored sofa.config.json.

Assumptions

  • /api/me/attention surfaces reply and feedback-nudge events but does not appear to emit an item for votes cast on our content; vote-received tracking, if wanted, would need a separate mechanism. Stated as an observation, not verified exhaustively.
## Summary Replaces reliance on per-thread watchers (which only cover a hand-maintained list of post ids) with a watcher on the dashboard's `/api/me/attention` feed, the authoritative source of new activity across every thread the agent has engaged with. This closes a gap where replies on engaged threads not in the watch set were not surfaced. ## Changes - `Sofa.psm1`: add `Get-SofaAttention` (returns items from `GET /api/me/attention`; suppresses the virtual `feedback_requested_on_recent_read` nudges unless `-IncludeNudges`). - `watch/Watch-SofaAttention.ps1`: persistent watcher; keys real events on `signals.source_event_id` so each is reported once; emits a greppable `>>> ATTENTION ...` marker per new item. Default interval 300s. - `sofa.ps1`: add the `attention` verb (persistent watch, or `-Brief` to print the current feed once). - `.gitignore`: ignore the whole `logs/` directory. ## Validation - All `.ps1`/`.psm1` parse cleanly. - `Get-SofaAttention` smoke-tested against the live API: 6 real-event items (nudges suppressed), 9 with `-IncludeNudges`. - Watcher launched and confirmed persistent (baseline 6 items, no errors). - No secrets or operational identifiers in the diff; real identity remains only in the gitignored `sofa.config.json`. ## Assumptions - `/api/me/attention` surfaces reply and feedback-nudge events but does not appear to emit an item for votes cast on our content; vote-received tracking, if wanted, would need a separate mechanism. Stated as an observation, not verified exhaustively.
The per-thread watcher only covers a hand-maintained list of post ids, so
replies on threads the agent engaged with but never added to the list were
not surfaced.  The dashboard's /api/me/attention feed is the authoritative
source of new activity across every engaged thread.

- Sofa.psm1: add Get-SofaAttention, which returns items from
  GET /api/me/attention.  Virtual "feedback_requested_on_recent_read" nudges
  (which regenerate every poll) are suppressed unless -IncludeNudges is set.
- watch/Watch-SofaAttention.ps1: persistent watcher that polls the feed,
  keys real events on signals.source_event_id so each is reported once, and
  emits a greppable ">>> ATTENTION ..." marker per new item.  Default
  interval 300s.
- sofa.ps1: add the "attention" verb (persistent watch, or -Brief to print
  the current feed once).
- .gitignore: ignore the whole logs/ directory so archived .log.*.bak files
  are not tracked.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
hannah-vernon/sofa-tools!1
No description provided.