Commit Graph
1 Commits
Author SHA1 Message Date
Omar SobhandClaude Opus 4.8 9765a08a5a Agents: real ClawBrainHub integration (list + pull brains → trading cards)
CI / policy (push) Has been cancelled
CI / backend (push) Has been cancelled
CI / profile (push) Has been cancelled
CI / mobile (push) Has been cancelled
Backend:
- brainhub.rs: BrainHubClient trait + HttpBrainHubClient (public discovery API,
  optional Bearer token) + FakeBrainHubClient. Lists the user's brains
  (CLAWBRAINHUB_OWNER, default "omar") + redclawsystems reference brains, and
  pulls a .brain JSON, parsing identity/skills/tools into card fields
  (tagline, skills, tools, capabilities). 2 parser unit tests.
- Routes GET /v1/brainhub/brains + /v1/brainhub/pull (rate-limited); wired into
  AppState + main (HttpBrainHubClient) + test harness (FakeBrainHubClient).

Mobile:
- src/api/brainhub.ts (listBrains/pullBrain), draftStore.pendingAgentBrain.
- app/pick-brain.tsx: pick a brain → pull → hand to the agent-card editor.
- Agents "+ New agent" now opens the brain picker; demo.tsx adopts the pulled
  brain (name, tagline, skill bars, tools, capabilities) for the flip side.

Verified live against clawbrainhub.com (omar's brains + reference brains list;
general-assistant pull yields real skills). Token stays server-side/env only.
Gate: mobile 28, backend 123.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-06 00:50:16 -05:00