How corrinehu/dsh-workbuddy-connect works
DSH WorkBuddy Connect registers separate domestic and international model providers that reuse each desktop app’s login, fetch its model catalog, and route chat requests to WorkBuddy. Users can inspect account and credit status, control model visibility, and optionally detect reasoning levels. The README also documents image support, promotions, enterprise credits, and update notices. The map follows relationships visible in the provided excerpts, SOURCE INDEX references, and README; some runtime wiring and unsampled implementations are not shown.
Main entry points: index.ts Provider registration · upstream.ts Upstream client · index.tsx Browser entry · probe-service.ts Probe orchestration
Components 29
Provider runtime
- Provider registration
src/index.ts - Model adapter
src/adapter.ts - Chat shim
src/shim.ts - Local control routes
src/loopback.ts - Status service
src/web-status.ts - Status contracts
src/status-paths.ts - Update route
src/update-route.ts - Host heartbeat
src/host-heartbeat.ts
WorkBuddy integration
- Credential store
src/auth.ts - Client identity
src/client-identity.ts - App version
src/app-version.ts - Upstream client
src/upstream.ts
Model features
- Model catalog
src/catalog.ts - Saved catalog
src/catalog-store.ts - Model visibility
src/visibility-store.ts - Reasoning detection
src/probe.ts - Probe orchestration
src/probe-service.ts - Probe history
src/probe-store.ts - Update metadata
src/update.ts
User interface
- Settings interface
src/client/WorkBuddyPluginCard.tsx - Browser entry
src/client/index.tsx - Probe controls
src/client/WorkBuddyProbeControl.tsx - Configuration page
src/client/WorkBuddyConfigPage.tsx - Update state
src/client/update-store.ts - Update notice
src/client/WorkBuddyUpdateNotice.tsx - Localized copy
src/client/locales.ts
Other components
- DSH user
- DSH host
- WorkBuddy services
Connections 39
- DSH user → DSH host: uses
README.md - DSH host → Provider registration: loads plugin
src/index.ts - Provider registration → Credential store: creates
src/index.ts - Provider registration → Upstream client: creates
src/index.ts - Provider registration → Model adapter: registers provider
src/index.ts - Model adapter → Credential store: reads credentials
src/adapter.ts - Model adapter → Upstream client: sends chat
src/adapter.ts - Provider registration → Model catalog: loads models
src/index.ts - Model catalog → Upstream client: uses promotions
src/catalog.ts - Provider registration → Saved catalog: persists catalog
src/index.ts - Provider registration → Model visibility: loads preferences
src/index.ts - Provider registration → Probe orchestration: creates
src/index.ts - Probe orchestration → Reasoning detection: probes model
src/probe-service.ts - Probe orchestration → Probe history: records results
src/probe-service.ts - Probe orchestration → Model catalog: checks model
src/probe-service.ts - Upstream client → WorkBuddy services: calls APIs
README.md - Upstream client → Client identity: resolves identity
src/upstream.ts - Client identity → App version: reads version
src/client-identity.ts - Provider registration → Chat shim: registers chat shim
src/index.ts - Chat shim → Credential store: authenticates
src/shim.ts - Chat shim → Upstream client: sends requests
src/shim.ts - Provider registration → Status service: serves status
src/index.ts - Status service → Credential store: reads account
src/web-status.ts - Status service → Upstream client: fetches credits
src/web-status.ts - Provider registration → Local control routes: creates routes
src/index.ts - Local control routes → Status contracts: uses contracts
src/probe-route.ts - Browser entry → Settings interface: registers cards
src/client/index.tsx - Browser entry → Configuration page: registers page
src/client/index.tsx - Browser entry → Probe controls: registers controls
src/client/index.tsx - Settings interface → Status contracts: reads status
src/client/WorkBuddyPluginCard.tsx - Probe controls → Status contracts: uses probe route
src/client/WorkBuddyProbeControl.tsx - Provider registration → Update route: registers update route
src/index.ts - Update route → Update metadata: queries metadata
src/update-route.ts - Browser entry → Update state: creates store
src/client/index.tsx - Update state → Update metadata: fetches updates
src/client/update-store.ts - Browser entry → Update notice: renders notice
src/client/index.tsx - Update notice → Update state: uses state
src/client/WorkBuddyUpdateNotice.tsx - Browser entry → Localized copy: registers copy
src/client/index.tsx - Provider registration → Host heartbeat: writes heartbeat
src/index.ts