How zarazhangrui/lark-coding-agent-bridge works
Lark Channel Bridge connects Feishu/Lark conversations to local Claude Code or Codex CLI processes. The primary flow is message intake, access/workspace/session handling, agent execution, then streamed or final card replies; files and queued turns extend that interaction. The product also manages profiles and background services, a browser-based setup console, and optional meeting participation with transcript-driven agent responses. Edges reflect README-described behavior or relationships visible in the supplied source index and excerpts; several implementation paths were not sampled, so their internal links are omitted.
Main entry points: channel.ts Message channel · index.ts Chat commands · manager.ts Meeting manager · run-flow.ts Run flow
Components 25
Chat interaction
- Message channel
src/bot/channel.ts - Chat commands
src/commands/index.ts - Run flow
src/bot/run-flow.ts - Cards and replies
src/card/run-renderer.ts - Media attachments
src/media/attachment.ts
Agent execution
- Agent adapters
src/agent/claude/adapter.ts - Agent capabilities
src/agent/capability.ts - Run executor
src/runtime/run-executor.ts - Access and run policy
src/policy/run-policy.ts
Profiles and state
- Session catalog
src/session/catalog.ts - Workspace store
src/workspace/store.ts - Profile configuration
src/config/profile-store.ts - Application paths
src/config/app-paths.ts - Local profile data
Meeting assistant
- Meeting manager
src/meeting/manager.ts - Meeting API
src/meeting/api.ts - Meeting session
src/meeting/session.ts - Meeting orchestration
src/meeting/orchestrator.ts
Setup and operations
- Host CLI
src/cli/index.ts - Service commands
src/cli/commands/service.ts - OS service adapter
src/daemon/service-adapter.ts - Setup web server
src/ui/server.ts - Browser console
web/src/App.tsx
Other components
- Chat user
- Feishu / Lark
Connections 23
- Chat user → Feishu / Lark: sends messages
- Feishu / Lark → Message channel: delivers events
- Message channel → Chat commands: dispatches commands
- Message channel → Run flow: starts turns
- Run flow → Run executor: executes run
- Run executor → Agent adapters: runs locally
- Agent adapters → Cards and replies: streams results
- Cards and replies → Feishu / Lark: updates reply
- Message channel → Media attachments: downloads files
- Chat commands → Session catalog: resolves session
src/bot/session-catalog-identity.ts - Chat commands → Workspace store: uses workspace
src/bot/session-catalog-identity.ts - Chat commands → Access and run policy: checks access
src/bot/session-catalog-identity.ts - Agent capabilities → Profile configuration: reads permissions
src/agent/capability.ts - Profile configuration → Application paths: resolves files
src/config/profile-store.ts - Application paths → Local profile data: locates state
src/config/app-paths.ts - Meeting manager → Meeting API: joins meeting
src/meeting/manager.ts - Meeting manager → Meeting session: creates session
src/meeting/manager.ts - Meeting manager → Meeting session: ingests activity
src/meeting/manager.ts - Meeting orchestration → Run flow: starts agent run
src/meeting/orchestrator.ts - Host CLI → Service commands: routes service
src/cli/index.ts - Service commands → OS service adapter: installs service
src/cli/commands/service.ts - Host CLI → Setup web server: starts console
- Browser console → Setup web server: calls API