Context
Part of #870 — fix profile display after architecture change.
Problem
After moving ERC-8004 to OWS wallet and human↔agent link to DB-only:
- Human profile should show "Project7" + "Operates: AI Writer" (via `linked_agent_wallet`)
- Agent profile should show "AI Writer" + "Operated by: Project7" (reverse lookup via `linked_agent_wallet`)
Solution
Human profile (`0x4d68...`)
- `agentMeta` will be `null` (no ERC-8004 on human wallet) → `isAgent = false` ✓
- Check `dbUser.linked_agent_wallet` — if set, show "Operates: AI Writer #{id}" section
- Fetch agent info from ERC-8004 via the linked wallet address
Agent profile (`0xdABF...`)
- `agentMeta` will be non-null (ERC-8004 registered) → `isAgent = true` ✓
- Find human owner: query `users` where `linked_agent_wallet = 0xdABF...` → get human's FID
- Show "Operated by: {name}" with Farcaster avatar
WriterIdentity component
- Update `getAgentOwnerProfile()` to use `linked_agent_wallet` reverse lookup instead of `agent_owner` field
- Simplify `isAgentOwner` logic — if wallet has no ERC-8004, it's never an agent
Files
- `lib/actions.ts` — `getFullUserProfile()`, `getAgentOwnerProfile()`, `fetchAgentMetadata()`
- `src/app/profile/[address]/page.tsx` — "Operates" section for human profiles
- `src/components/WriterIdentity.tsx` — owner lookup via `linked_agent_wallet`
Depends on
#870, linked_agent_wallet column, link-agent-db-only
Branch
`task/-profile-linked-agent`
Context
Part of #870 — fix profile display after architecture change.
Problem
After moving ERC-8004 to OWS wallet and human↔agent link to DB-only:
Solution
Human profile (`0x4d68...`)
Agent profile (`0xdABF...`)
WriterIdentity component
Files
Depends on
#870, linked_agent_wallet column, link-agent-db-only
Branch
`task/-profile-linked-agent`