How aronprins/paperclip-desktop works
Paperclip Desktop is an Electron shell for the upstream Paperclip product, not the implementation of its agent, governance, or business features. A user launches the app, chooses embedded local mode or a saved/new remote, and reaches the Paperclip UI in a mode-appropriate window. Remote setup validates the origin and checks health/authentication; local mode manages the embedded server and its health. Profiles preserve connection choices, while the shell adds navigation controls and release updates. Some boot and window details were not excerpted, so only documented or indexed relationships are shown.
Main entry points: main.ts Electron main · preflight.ts Remote preflight · launcher-html.ts Connection chooser · updater.ts Auto-updater
Components 16
Desktop shell
- Electron main
src/main.ts - Connection chooser
src/launcher-html.ts - Renderer preload
src/launcher-preload.ts - Navigation gestures
src/navigation-gestures.ts - Auto-updater
src/updater.ts
Connection management
- Saved profiles
src/connection/profiles.ts - URL validation
src/connection/validate.ts - Remote preflight
src/connection/preflight.ts - Window policy
src/connection/window-policy.ts
Server runtime
- Local health probe
src/connection/local-server-health.ts - Server lifecycle
src/connection/local-server-lifecycle.ts - Data path safety
src/runtime-safety.ts
Paperclip product
- Paperclip server and UI
- Remote Paperclip origin
Other components
- Desktop user
- GitHub Releases
Connections 18
- Desktop user → Connection chooser: chooses connection
README.md - Connection chooser → Electron main: sends launcher actions
README.md - Electron main → Connection chooser: renders chooser
src/main.ts - Electron main → Saved profiles: uses profiles
src/main.ts - Saved profiles → URL validation: normalizes URLs
src/connection/profiles.ts - Electron main → Remote preflight: checks remote
src/main.ts - Remote preflight → URL validation: normalizes origin
src/connection/preflight.ts - Remote preflight → Remote Paperclip origin: checks health and session
src/connection/preflight.ts - Electron main → Window policy: enforces navigation policy
src/main.ts - Electron main → Local health probe: probes local server
src/main.ts - Electron main → Server lifecycle: manages server lifecycle
src/main.ts - Electron main → Data path safety: checks data paths
src/main.ts - Electron main → Paperclip server and UI: starts embedded product
README.md - Paperclip server and UI → Electron main: serves desktop UI
README.md - Electron main → Renderer preload: configures renderer bridge
- Electron main → Navigation gestures: uses gesture handling
src/main.ts - Electron main → Auto-updater: wires updates
src/main.ts - Auto-updater → GitHub Releases: checks and downloads
README.md