Metadata-Version: 2.5
Name: jupyter-dsh-proxy
Version: 0.1.0
Summary: Jupyter server proxy for the DeepSeek Harness (dsh) web UI
Project-URL: Homepage, https://github.com/dive4dec/jupyter-dsh-proxy
Project-URL: Bug Tracker, https://github.com/dive4dec/jupyter-dsh-proxy/issues
Author-email: Chung Chan <chung.chan@cityu.edu.hk>
License: MIT
Requires-Python: >=3.12
Requires-Dist: jupyter-server-proxy>=4.0
Description-Content-Type: text/markdown

# jupyter-dsh-proxy

A [jupyter-server-proxy](https://jupyter-server-proxy.readthedocs.io/) launcher
entry for the **DeepSeek Harness (dsh) web UI**.

It adds a **"DeepSeek Harness"** tile to the JupyterLab launcher that opens the
dsh web UI in a new tab — **without requiring code-server / VS Code to be
running first**.

## How it works

The dsh web server is started *independently* at pod boot by the
`41-dsh-web` boot hook (in the `divenb` image), which runs `dsh web` on a fixed
loopback port. This package registers a **URL-mode** proxy spec that points at
that already-running server:

```
browser → jupyter-server-proxy (/proxy/<port>/) → dsh web (127.0.0.1:<port>)
```

The **same** dsh web instance is shared with the VS Code extension: the
extension only auto-starts `dsh web` when nothing is already listening at its
`dsh.url`, so a boot-hook-owned instance is used by both entry points.

## Port selection

The launcher resolves the target port in this order:

1. `~/.dsh/web.port` — written by the `41-dsh-web` boot hook (single source of
   truth for a non-default port).
2. `DSH_WEB_PORT` env var — a literal number, or `random` / `auto` / `0` to pick
   a free port (used only if `web.port` is absent).
3. default **3080** — the dsh web default and the VS Code extension default, so
   both entry points agree with no configuration.

The port is a documented `dsh web` flag (`dsh web --port <P>`), not a patched
default, so it survives dsh version bumps.

## Installation

```bash
uv pip install /path/to/jupyter-dsh-proxy
```

The `dsh` entry point is auto-discovered by jupyter-server-proxy; no additional
configuration is required. The launcher tile appears under the **"Other"**
section.
