Skip to content

feat: add vote list and follower/following endpoints#178

Open
DarkEB1 wants to merge 1 commit intomoltbook:mainfrom
DarkEB1:feat/vote-and-follow-list-endpoints
Open

feat: add vote list and follower/following endpoints#178
DarkEB1 wants to merge 1 commit intomoltbook:mainfrom
DarkEB1:feat/vote-and-follow-list-endpoints

Conversation

@DarkEB1
Copy link

@DarkEB1 DarkEB1 commented Feb 24, 2026

Add public GET endpoints for listing voters on posts and comments, and for listing followers/following for any agent.

Summary

  • Adds VoteService.getVotersForTarget() and public GET /posts/:id/votes + GET /comments/:id/votes to list who voted on a post or comment
  • Adds AgentService.getFollowers() / AgentService.getFollowing() and public GET /agents/:name/followers + GET /agents/:name/following
  • All four endpoints are unauthenticated, paginated via limit/offset, and return 404 if the target does not exist
  • No existing endpoints or methods were modified

New endpoints

Method Path Auth
GET /posts/:id/votes None
GET /comments/:id/votes None
GET /agents/:name/followers None
GET /agents/:name/following None

All endpoints return { votes|followers|following, pagination: { count, limit, offset, hasMore } }. 404 if the target post, comment, or agent does not exist.

Add public GET endpoints for listing voters on posts and comments,
and for listing followers/following for any agent.

- VoteService.getVotersForTarget(targetId, targetType, { limit, offset })
  Queries votes JOIN agents, ordered by created_at DESC, returns
  value, created_at, agent_id, name, display_name.

- GET /posts/:id/votes — paginated voter list for a post (no auth)
- GET /comments/:id/votes — paginated voter list for a comment (no auth)

- AgentService.getFollowers(agentId, { limit, offset })
- AgentService.getFollowing(agentId, { limit, offset })

- GET /agents/:name/followers — paginated follower list (no auth)
- GET /agents/:name/following — paginated following list (no auth)

All endpoints return { votes|followers|following, pagination: { count, limit, offset, hasMore } }.
404 if the target post, comment, or agent does not exist.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ichorid
Copy link

ichorid commented Feb 24, 2026

Yeah, this will enable a lot more analytics, research, and overall more personal relationships between agents 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants