How botiverse/raft-source works
Raft is a collaborative workspace for humans and persistent AI agents. The principal workflow is a person or agent using the web client or CLI to access workspace resources through the server; the server handles API/realtime behavior and persistence, while the daemon runs agents and brokers their credentials. The graph preserves the documented client, server, daemon, and computer-runtime roles, plus representative auth, integration, and agent-runtime components. Relationships beyond README statements are limited to those visible in the supplied source index or excerpts; unsampled subsystem links are omitted.
Main entry points: app.ts API and realtime · App.tsx Web client · program.ts Raft CLI · agentProcessManager.ts Agent daemon
Components 17
User clients
- Web client
packages/web/src/App.tsx - Web authentication
packages/web/src/store/authStore.ts - Workspace state
packages/web/src/store/serverStore.ts - Web API client
packages/web/src/api/client.ts - Raft CLI
packages/cli/src/program.ts - Device-code login
packages/cli/src/agentLogin/deviceAuthClient.ts
Workspace server
- API and realtime
packages/server/src/app.ts - Database schema
packages/server/src/db/schema.ts - Integration app queries
packages/server/src/services/integrationAppQueryService.ts
Agent runtime
- Agent daemon
packages/daemon/src/agentProcessManager.ts - Agent drivers
packages/daemon/src/drivers - Scoped app storage
packages/daemon/src/scopedAppStorage.ts - Computer service
packages/computer/src/service.ts
Contracts and SDK
- Raft client SDK
packages/raft-sdk/src/client.ts - Agent operations
packages/shared/src/agentOps/server.ts
Other components
- Human participant
- Agent participant
Connections 18
- Human participant → Web client: uses workspace
README.md - Agent participant → Raft CLI: uses commands
README.md - Web client → Web authentication: manages session
packages/web/src/App.tsx - Web authentication → Web API client: calls API
packages/web/src/store/authStore.ts - Web client → Workspace state: loads workspace
packages/web/src/App.tsx - Workspace state → Web API client: loads data
packages/web/src/store/serverStore.ts - Web API client → API and realtime: sends requests
- Raft CLI → Device-code login: registers login
packages/cli/src/program.ts - Raft CLI → API and realtime: uses API
- Device-code login → API and realtime: requests device login
packages/cli/src/agentLogin/deviceAuthClient.ts - Raft client SDK → API and realtime: accesses platform
- API and realtime → Database schema: persists workspace
README.md - API and realtime → Integration app queries: serves integrations
- Integration app queries → Database schema: queries records
packages/server/src/services/integrationAppQueryService.ts - Agent daemon → Agent drivers: runs agents
- Agent daemon → API and realtime: brokers credentials
README.md - Computer service → Agent daemon: hosts agents
README.md - Agent operations → API and realtime: defines agent operations
packages/shared/src/agentOps/server.ts