How leshm0321/dsh-plugin-local-agent-bridge works
Local Agent Bridge adds a Harness browser panel for driving already-authenticated Claude Code and Codex installations on the Host. The primary flow is: choose a working directory and provider, send a prompt, review streamed/redacted events and any approval requests, then inspect the session and workspace changes. The README also documents native-session continuation, file completion, uploads, repository/diff views, and optional workspace publishing and editing. The graph reflects documented capabilities where implementation was not sampled; wiring is omitted when source excerpts do not establish it.
Main entry points: session-engine.ts Session engine · index.ts Host plugin service · index.tsx Local Agents panel · provider.ts Provider interface
Components 23
Browser panel
- Local Agents panel
src/client/index.tsx - Conversation and views
src/client/index.tsx - Markdown rendering
src/client/markdown.tsx - Privacy controls
src/client/lock.tsx
Bridge API
- Remote client API
src/typert.remote-client.ts - Validated message shapes
src/typert.shared.ts - Host plugin service
src/index.ts
Session runtime
- Session engine
src/core/session-engine.ts - Session persistence
src/core/persistence.ts - Redaction and privacy
src/core/privacy.ts
Provider adapters
- Provider interface
src/core/provider.ts - Claude adapter
src/providers/claude.ts - Codex adapter
src/providers/codex.ts
Workspace services
- File completion
src/core/file-search.ts - Workspace file operations
src/core/workspace-files.ts - Workspace diffs
src/core/workspace-diff.ts - Repository status
src/core/repository.ts - Host directory browsing
src/core/host-browse.ts - Image uploads
src/core/uploads.ts
Other components
- Operator
- DeepSeek Harness
- Claude Code
- Codex app-server
Connections 22
- Operator → Local Agents panel: uses
- DeepSeek Harness → Local Agents panel: hosts panel
- Local Agents panel → Remote client API: sends requests
- Local Agents panel → Conversation and views: renders sessions
- Conversation and views → Markdown rendering: renders text
- Local Agents panel → Privacy controls: offers controls
- Remote client API → Host plugin service: calls remotes
- Host plugin service → Validated message shapes: validates messages
- Host plugin service → Session engine: dispatches sessions
- Session engine → Session persistence: loads and saves
- Session engine → Provider interface: dispatches turns
- Claude adapter → Provider interface: implements
- Codex adapter → Provider interface: implements
- Claude adapter → Claude Code: launches SDK
- Codex adapter → Codex app-server: uses stdio
- Session engine → File completion: searches files
- Session engine → Workspace file operations: writes files
- Session engine → Image uploads: receives images
- Host plugin service → Host directory browsing: lists directories
- Host plugin service → Workspace diffs: reads diffs
- Host plugin service → Repository status: reads status
- Session engine → Redaction and privacy: uses privacy gate