dsh-um-proxy-ondemand

Manages the lifecycle of the local UM GenAI proxy (127.0.0.1:8788) that DSH's um-genai provider talks to: wakes it on demand for llm/stream calls, stops it after an idle period, and reports health plus a read-only status endpoint. Also ships a DSH settings page for port, always-on mode, idle minutes, interpreter and paths, plus the UM account and proxy API key, and a button that writes the providers.um-genai entry into the profile patch and fills in its model list, since a fresh profile has no provider and the model picker would otherwise stay empty. A renewal watchdog logs in to the campus gateway on a hidden Windows desktop when the upstream token expires. The proxy itself is um_opencode_setup.py, a single-file tool distributed by the University of Macau; a copy is vendored in vendor/ so a fresh install works out of the box, while a copy in ~/.um-opencode/ takes precedence when present. The plugin still does not produce tokens: those come from logging in to the campus gateway. Requires Windows (process discovery and idle shutdown use netstat/taskkill; renewal uses PowerShell and a hidden desktop), Python 3.10+ and a University of Macau account.

Overview

Manages the lifecycle of the local UM GenAI proxy (127.0.0.1:8788) that DSH's um-genai provider talks to: wakes it on demand for llm/stream calls, stops it after an idle period, and reports health plus a read-only status endpoint. Also ships a DSH settings page for port, always-on mode, idle minutes, interpreter and paths, plus the UM account and proxy API key, and a button that writes the providers.um-genai entry into the profile patch and fills in its model list, since a fresh profile has no provider and the model picker would otherwise stay empty. A renewal watchdog logs in to the campus gateway on a hidden Windows desktop when the upstream token expires. The proxy itself is um_opencode_setup.py, a single-file tool distributed by the University of Macau; a copy is vendored in vendor/ so a fresh install works out of the box, while a copy in ~/.um-opencode/ takes precedence when present. The plugin still does not produce tokens: those come from logging in to the campus gateway. Requires Windows (process discovery and idle shutdown use netstat/taskkill; renewal uses PowerShell and a hidden desktop), Python 3.10+ and a University of Macau account.

Installation

Install from npm

dsh plugin --profile web add dsh-um-proxy-ondemand

Resolves a published tarball rather than cloning the repository, and installs without any extra setup. Swap `web` for your profile name if you run another one.

Install from GitHub

dsh plugin --profile web add github:TINGOD2006/dsh-um-proxy-ondemand

Installing from GitHub runs the project's build script, which pnpm blocks until you allowlist it — run the command once and pnpm prints the exact key to add under `allowBuilds` in ~/.dsh/profiles/web/pnpm-workspace.yaml.

Version compatibility

Compatibility is unconfirmed. Check the project documentation for supported versions.

Installation notes

  • May run terminal commands
  • May require credentials