How clarklevis1995/dsh-mobile works
DeepSeek Harness Mobile is a native Android/iOS client for remote Harness workspaces and agent sessions. Users pair a device with a Mobile Gateway, browse workspaces and sessions, then send messages and follow streamed replies, tool activity, history, and trajectories; they can also respond to questions or approvals and manage remote files. The platforms share protocol, state, projection, synchronization, and file-state logic, while each owns its UI and system integrations. README documents both platforms’ broader capabilities; the sampled source is partial, so uncertain internal wiring is omitted.
Main entry points: ConversationScreen.kt Android UI · RootView.swift iOS UI · GatewayClient.swift iOS gateway client · SharedConversationStore.kt Conversation stores
Components 23
Native clients
- Android UI
androidApp/src/main/kotlin/com/clarklevis/dsh/android/ui/ConversationScreen.kt - iOS UI
DeepSeekHarnessMobile/Views/RootView.swift - Android app graph
androidApp/src/main/kotlin/com/clarklevis/dsh/android/AndroidAppGraph.kt - iOS shared adapter
DeepSeekHarnessMobile/Core/KMPSharedAdapter.swift - Platform preferences
DeepSeekHarnessMobile/Core/AppPreferences.swift
Gateway connectivity
- Android WebSocket
androidApp/src/main/kotlin/com/clarklevis/dsh/android/platform/OkHttpGatewayTransport.kt - Gateway runtime
shared/src/commonMain/kotlin/com/clarklevis/dsh/shared/gateway/GatewayRuntime.kt - iOS gateway client
DeepSeekHarnessMobile/Core/GatewayClient.swift - iOS frame router
DeepSeekHarnessMobile/Core/GatewayFrameRouter.swift - Wire protocol
shared/src/commonMain/kotlin/com/clarklevis/dsh/shared/protocol/GatewayWireDecoder.kt
Shared business state
- Conversation stores
shared/src/commonMain/kotlin/com/clarklevis/dsh/shared/facade/SharedConversationStore.kt - Conversation projections
shared/src/commonMain/kotlin/com/clarklevis/dsh/shared/projection/ConversationProjection.kt - History synchronization
shared/src/commonMain/kotlin/com/clarklevis/dsh/shared/sync/HistorySyncEngine.kt - Trajectory projection
shared/src/commonMain/kotlin/com/clarklevis/dsh/shared/projection/TrajectoryProjection.kt
Agent interaction
- Session control
shared/src/commonMain/kotlin/com/clarklevis/dsh/shared/domain/SessionControlReducer.kt - Approval and questions
shared/src/commonMain/kotlin/com/clarklevis/dsh/shared/domain/ApprovalReducer.kt - Agent notifications
DeepSeekHarnessMobile/Core/AgentUserNotificationManager.swift - Background execution
DeepSeekHarnessMobile/Core/AgentBackgroundExecutionController.swift
Workspace management
- Workspace file state
shared/src/commonMain/kotlin/com/clarklevis/dsh/shared/facade/SharedWorkspaceFileStore.kt - Code preview support
shared/src/commonMain/kotlin/com/clarklevis/dsh/shared/facade/WorkspaceCodePreviewSupport.kt - Workspace and files UI
androidApp/src/main/kotlin/com/clarklevis/dsh/android/ui/WorkspaceFilesUi.kt
Other components
- Mobile user
- Mobile Gateway
Connections 28
- Mobile user → Android UI: uses
- Mobile user → iOS UI: uses
- Android UI → Android app graph: dispatches actions
- iOS UI → iOS gateway client: initiates requests
- Android app graph → Gateway runtime: uses runtime
- Gateway runtime → Android WebSocket: uses transport
- Android WebSocket → Mobile Gateway: exchanges frames
- iOS gateway client → Mobile Gateway: exchanges frames
- iOS gateway client → iOS frame router: routes frames
- iOS frame router → iOS shared adapter: forwards events
- Gateway runtime → Wire protocol: decodes frames
- iOS frame router → Wire protocol: uses wire types
- Android app graph → Conversation stores: coordinates state
- iOS shared adapter → Conversation stores: adapts shared stores
- Conversation stores → Conversation projections: projects conversation
- Conversation stores → History synchronization: synchronizes history
- Conversation stores → Trajectory projection: projects trajectory
- Android UI → Session control: controls sessions
- iOS UI → Session control: controls sessions
- Android UI → Approval and questions: responds to requests
- iOS UI → Approval and questions: responds to requests
- Android app graph → Agent notifications: notifies agent status
- iOS gateway client → Agent notifications: notifies agent status
- Android UI → Workspace and files UI: browses files
- Workspace and files UI → Workspace file state: manages remote files
- Workspace file state → Code preview support: prepares previews
- iOS UI → Platform preferences: reads settings
- iOS gateway client → Background execution: tracks active work