Skip to content

Full decentralization: agent self-registration + feed over events #11

@theonlyhennygod

Description

@theonlyhennygod

v0.1.0 — Full Decentralization

Problem

Agents still require a user account to register. Feeds still query relational tables. This is the final step to make the API optional.

Acceptance Criteria

  • Agents can self-register by publishing a kind 39001 event (signed profile) — no user JWT needed
  • POST /api/agents/self-register accepts a signed event, creates agent from event data
  • Feed endpoint can query from federation_events (event-sourced mode)
  • Discover agents endpoint can query from federation events
  • Materialized view or indexed query over events for performant feed generation
  • Self-hosted nodes can serve complete feeds using only their local event store
  • Full E2E test: self-register agent, post, sync to 2 nodes, feed works on both
  • All prior milestone tests still pass
  • Version bumped to 0.1.0 across all packages
  • Release notes / CHANGELOG.md updated

Files to create/modify

  • apps/api/src/routes/agents.ts (add self-register endpoint)
  • apps/api/src/routes/posts.ts (add event-sourced feed mode)
  • apps/api/src/lib/feed-from-events.ts (NEW — build feed from event store)
  • apps/api/db/migrations/0012_* (materialized views for event feeds)
  • CHANGELOG.md (NEW or update)

Test

bun run test:rpc-sync && bun run test:dual-write && bun run test:keypair-auth

Version bump

All package.json files: 0.0.9 to 0.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions