# xhr666/dsh-mpkg-wallpaper architecture

> Architecture diagram of the GitHub repository xhr666/dsh-mpkg-wallpaper, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/xhr666/dsh-mpkg-wallpaper
- Repository: https://github.com/xhr666/dsh-mpkg-wallpaper

## Overview

dsh-mpkg-wallpaper is a DeepSeek Harness web plugin that supplies configurable wallpaper backgrounds and related playback, appearance, and library features. The main workflow runs from the user’s settings panel through the client’s wallpaper selection and rendering logic, with host routes supporting media access, persistence, extraction, and integrations. The README documents additional capabilities not verified in sampled source; those are represented at their documented module or directory paths without assuming detailed wiring. Liquid-glass WebGL files are an optional runtime, distinct from the documented CSS/SVG appearance path.

Main entry points: [`lib/client.js`](https://github.com/xhr666/dsh-mpkg-wallpaper/blob/main/lib/client.js) (Settings and wallpaper UI), [`lib/index.js`](https://github.com/xhr666/dsh-mpkg-wallpaper/blob/main/lib/index.js) (Plugin host routes), [`lib/liquid-glass/index.js`](https://github.com/xhr666/dsh-mpkg-wallpaper/blob/main/lib/liquid-glass/index.js) (Glass renderer API), [`lib/media-session.js`](https://github.com/xhr666/dsh-mpkg-wallpaper/blob/main/lib/media-session.js) (System media session)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client experience"]
  node_client["Settings and wallpaper UI<br/>[client.js]"]
  node_interaction["Web interaction<br/>[web-interaction.js]"]
end

subgraph group_wallpaper["Wallpaper sources"]
  node_wallpaper["Wallpaper runtime<br/>[web-wallpaper.js]"]
  node_mpkg["MPKG extraction<br/>[pkg-extract.js]"]
end

subgraph group_host["Host services"]
  node_host["Plugin host routes<br/>[index.js]"]
  node_settings[("Persistent settings<br/>[index.js]")]
  node_audio["Audio bus<br/>[audio-bus.js]"]
end

subgraph group_nowplaying["Now playing"]
  node_session["System media session<br/>[media-session.js]"]
  node_nowplaying["Now-playing controls<br/>[now-playing.js]"]
  node_np_math["Playback calculations"]
end

subgraph group_glass["Liquid glass runtime"]
  node_glass_api["Glass renderer API<br/>[index.js]"]
  node_renderer["WebGL renderer<br/>[renderer.js]"]
  node_geometry["Shape geometry<br/>[geometry.js]"]
  node_material["Glass materials<br/>[material.js]"]
  node_shaders["Glass shaders<br/>[shaders.js]"]
end

node_user(("Plugin user"))
node_system(("Operating system media"))

node_user -->|"configures"| node_client
node_client -->|"selects and applies"| node_wallpaper
node_client -->|"handles interaction"| node_interaction
node_client -->|"requests host services"| node_host
node_host -->|"reads and writes"| node_settings
node_host -->|"extracts scene assets"| node_mpkg
node_host -->|"serves audio data"| node_audio
node_client -->|"displays controls"| node_nowplaying
node_client -->|"requests media routes"| node_session
node_host -->|"dispatches media routes"| node_session
node_session -->|"queries and controls"| node_system
node_nowplaying -->|"calculates playback"| node_np_math
node_glass_api -->|"renders with"| node_renderer
node_glass_api -->|"uses shape operations"| node_geometry
node_glass_api -->|"uses materials"| node_material
node_renderer -->|"compiles shaders"| node_shaders

click node_client "https://github.com/xhr666/dsh-mpkg-wallpaper/blob/main/lib/client.js"
click node_interaction "https://github.com/xhr666/dsh-mpkg-wallpaper/blob/main/lib/web-interaction.js"
click node_wallpaper "https://github.com/xhr666/dsh-mpkg-wallpaper/blob/main/lib/web-wallpaper.js"
click node_mpkg "https://github.com/xhr666/dsh-mpkg-wallpaper/blob/main/lib/pkg-extract.js"
click node_host "https://github.com/xhr666/dsh-mpkg-wallpaper/blob/main/lib/index.js"
click node_settings "https://github.com/xhr666/dsh-mpkg-wallpaper/blob/main/lib/index.js"
click node_audio "https://github.com/xhr666/dsh-mpkg-wallpaper/blob/main/lib/audio-bus.js"
click node_session "https://github.com/xhr666/dsh-mpkg-wallpaper/blob/main/lib/media-session.js"
click node_nowplaying "https://github.com/xhr666/dsh-mpkg-wallpaper/blob/main/lib/now-playing.js"
click node_np_math "https://github.com/xhr666/dsh-mpkg-wallpaper/blob/main/lib/now-playing-math.js"
click node_glass_api "https://github.com/xhr666/dsh-mpkg-wallpaper/blob/main/lib/liquid-glass/index.js"
click node_renderer "https://github.com/xhr666/dsh-mpkg-wallpaper/blob/main/lib/liquid-glass/renderer.js"
click node_geometry "https://github.com/xhr666/dsh-mpkg-wallpaper/blob/main/lib/liquid-glass/geometry.js"
click node_material "https://github.com/xhr666/dsh-mpkg-wallpaper/blob/main/lib/liquid-glass/material.js"
click node_shaders "https://github.com/xhr666/dsh-mpkg-wallpaper/blob/main/lib/liquid-glass/shaders.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_client,node_interaction,node_user toneBlue
class node_wallpaper,node_mpkg toneAmber
class node_host,node_settings,node_audio toneMint
class node_session,node_nowplaying,node_np_math toneRose
class node_glass_api,node_renderer,node_geometry,node_material,node_shaders,node_system toneIndigo
```

## Components

### Client experience

- [Settings and wallpaper UI](https://github.com/xhr666/dsh-mpkg-wallpaper/blob/main/lib/client.js): `lib/client.js`
- [Web interaction](https://github.com/xhr666/dsh-mpkg-wallpaper/blob/main/lib/web-interaction.js): `lib/web-interaction.js`

### Wallpaper sources

- [Wallpaper runtime](https://github.com/xhr666/dsh-mpkg-wallpaper/blob/main/lib/web-wallpaper.js): `lib/web-wallpaper.js`
- [MPKG extraction](https://github.com/xhr666/dsh-mpkg-wallpaper/blob/main/lib/pkg-extract.js): `lib/pkg-extract.js`

### Host services

- [Plugin host routes](https://github.com/xhr666/dsh-mpkg-wallpaper/blob/main/lib/index.js): `lib/index.js`
- [Persistent settings](https://github.com/xhr666/dsh-mpkg-wallpaper/blob/main/lib/index.js): `lib/index.js`
- [Audio bus](https://github.com/xhr666/dsh-mpkg-wallpaper/blob/main/lib/audio-bus.js): `lib/audio-bus.js`

### Now playing

- [System media session](https://github.com/xhr666/dsh-mpkg-wallpaper/blob/main/lib/media-session.js): `lib/media-session.js`
- [Now-playing controls](https://github.com/xhr666/dsh-mpkg-wallpaper/blob/main/lib/now-playing.js): `lib/now-playing.js`
- [Playback calculations](https://github.com/xhr666/dsh-mpkg-wallpaper/blob/main/lib/now-playing-math.js): `lib/now-playing-math.js`

### Liquid glass runtime

- [Glass renderer API](https://github.com/xhr666/dsh-mpkg-wallpaper/blob/main/lib/liquid-glass/index.js): `lib/liquid-glass/index.js`
- [WebGL renderer](https://github.com/xhr666/dsh-mpkg-wallpaper/blob/main/lib/liquid-glass/renderer.js): `lib/liquid-glass/renderer.js`
- [Shape geometry](https://github.com/xhr666/dsh-mpkg-wallpaper/blob/main/lib/liquid-glass/geometry.js): `lib/liquid-glass/geometry.js`
- [Glass materials](https://github.com/xhr666/dsh-mpkg-wallpaper/blob/main/lib/liquid-glass/material.js): `lib/liquid-glass/material.js`
- [Glass shaders](https://github.com/xhr666/dsh-mpkg-wallpaper/blob/main/lib/liquid-glass/shaders.js): `lib/liquid-glass/shaders.js`

### Other components

- **Plugin user**
- **Operating system media**

## Connections

- Plugin user → Settings and wallpaper UI: configures
- Settings and wallpaper UI → Wallpaper runtime: selects and applies
- Settings and wallpaper UI → Web interaction: handles interaction
- Settings and wallpaper UI → Plugin host routes: requests host services
- Plugin host routes → Persistent settings: reads and writes
- Plugin host routes → MPKG extraction: extracts scene assets
- Plugin host routes → Audio bus: serves audio data
- Settings and wallpaper UI → Now-playing controls: displays controls
- Settings and wallpaper UI → System media session: requests media routes
- Plugin host routes → System media session: dispatches media routes
- System media session → Operating system media: queries and controls
- Now-playing controls → Playback calculations: calculates playback
- Glass renderer API → WebGL renderer: renders with
- Glass renderer API → Shape geometry: uses shape operations
- Glass renderer API → Glass materials: uses materials
- WebGL renderer → Glass shaders: compiles shaders
