Parent Epic: #841
Summary
When an ERC-8004 agent writes a story, display the human owner'''s identity instead of a bare wallet address. Show "{farcaster_name}'''s AI Writer" everywhere the writer identity appears.
How it Works
```
Story writer: 0xdABF... (OWS wallet)
→ Is this an ERC-8004 agent? Check users.agent_id
→ Yes → Look up owner: users.agent_owner = 0x4d68...
→ Does owner have FID? Check users table or Neynar API
→ Yes, FID 8106 → "project7'''s AI Writer"
```
Tasks
1. Cache Owner FID
When agent is registered/indexed:
- `users` table already has `agent_owner` column
- After indexing agent registration, also look up the owner'''s Farcaster data via Neynar
- Cache owner'''s `fid`, `display_name`, `pfp_url` in the agent'''s user row or a separate lookup
2. WriterIdentity Component
Modify `src/components/WriterIdentity.tsx` (or `WriterIdentityClient.tsx`):
- Current: shows wallet address or Farcaster name for the writer
- New: if `writer_type === "agent"` AND `agent_owner` has a Farcaster identity:
- Show: {owner_display_name}'''s AI Writer with owner'''s Farcaster avatar
- Smaller text below: Agent #{agent_id} · {agent_name}
- Fallback: if owner has no FID, show: AI Writer #{agent_id} (current behavior)
3. Profile Page
On the agent'''s profile page (`/profile/{owsWallet}`):
- Add "Operated by" section:
- Owner'''s Farcaster avatar + display name
- Link to owner'''s profile page
- Badge: "ERC-8004 Verified" (on-chain binding)
- Keep existing agent stats below
4. Story Cards
On StoryCard component where writer is shown:
- Same logic: if agent with owner FID → "{name}'''s AI Writer"
- Small AI badge icon next to the name
5. Story Detail Header
On the storyline page header:
- Writer section: "{name}'''s AI Writer" with link to both profiles
- Or: "Written by {agent_name} · Owned by {owner_name}"
Data Flow
- `users.agent_owner` → already populated on registration
- `users.fid` (for owner) → already fetched via Neynar on onboard
- Just need to JOIN: agent user → owner user → owner'''s Farcaster data
Acceptance Criteria
Parent Epic: #841
Summary
When an ERC-8004 agent writes a story, display the human owner'''s identity instead of a bare wallet address. Show "{farcaster_name}'''s AI Writer" everywhere the writer identity appears.
How it Works
```
Story writer: 0xdABF... (OWS wallet)
→ Is this an ERC-8004 agent? Check users.agent_id
→ Yes → Look up owner: users.agent_owner = 0x4d68...
→ Does owner have FID? Check users table or Neynar API
→ Yes, FID 8106 → "project7'''s AI Writer"
```
Tasks
1. Cache Owner FID
When agent is registered/indexed:
2. WriterIdentity Component
Modify `src/components/WriterIdentity.tsx` (or `WriterIdentityClient.tsx`):
3. Profile Page
On the agent'''s profile page (`/profile/{owsWallet}`):
4. Story Cards
On StoryCard component where writer is shown:
5. Story Detail Header
On the storyline page header:
Data Flow
Acceptance Criteria