Sync vault notes: April-November 2026 sessions, projects, and architecture
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
fe4fe656be
commit
994c7ae577
379 files changed
+55216
-107
No files matched your search
+313
@@ -0,0 +1,313 @@
|
||||
---
|
||||
title: art0 DeepSeek Harness model providers, routing, and credentials
|
||||
date: 2026-08-23
|
||||
status: operational
|
||||
server: art0
|
||||
tags:
|
||||
- deepseek-harness
|
||||
- dsh
|
||||
- art0
|
||||
- model-routing
|
||||
- llm-providers
|
||||
- credentials
|
||||
---
|
||||
|
||||
# art0 DeepSeek Harness model providers, routing, and credentials
|
||||
|
||||
## Executive summary
|
||||
|
||||
DeepSeek Harness (DSH) on `art0` currently has four configured model-provider routes: DeepSeek Official, OpenAI, Anthropic, and Moonshot/Kimi. The DSH model picker exposes 66 catalog entries across those routes. OpenAI, Anthropic, and Moonshot credentials were validated directly against their model-list APIs. DeepSeek already had a stored credential, but it was not revalidated during this work.
|
||||
|
||||
The provider configuration is active through DSH hot reload. The DSH process was not restarted and is still the process started on August 21. Automatic cost/quality routing, cross-provider fallback, and role routing are not installed. New sessions default to DeepSeek V4 Flash, while users can manually select any configured provider/model in the model picker.
|
||||
|
||||
No API key values are recorded in this note.
|
||||
|
||||
## Live runtime
|
||||
|
||||
| Item | Value |
|
||||
|---|---|
|
||||
| Server | `art0` (`104.190.60.129`, SSH port `2222`) |
|
||||
| DSH version | `0.1.1-rc.2` |
|
||||
| Source checkout | `/home/garfield/IdeaProjects/deepseek-harness` |
|
||||
| Global launcher | `/home/garfield/.npm-global/bin/dsh` |
|
||||
| Command | `dsh web --no-open` |
|
||||
| Listener | `127.0.0.1:3080` |
|
||||
| Live PID observed | `678037` |
|
||||
| Process start | 2026-08-21 18:02 EDT |
|
||||
| Profile | `web` |
|
||||
| Profile bundles | `@deepseek-ai/dsh-base`, `@deepseek-ai/dsh-web-app` |
|
||||
| Service manager | None detected; the process is parented by a Codex app-server process, not a systemd user service |
|
||||
|
||||
DSH is in developer preview and explicitly warns that compatibility-breaking changes should be expected.
|
||||
|
||||
## Configured vendors and models
|
||||
|
||||
| DSH route | Vendor | DSH catalog models | Upstream validation | Credential reference |
|
||||
|---|---|---:|---|---|
|
||||
| `deepseek-official` | DeepSeek | 3 | Stored credential present; not revalidated in this session | `DEEPSEEK_API_KEY` |
|
||||
| `openai` | OpenAI | 38 | HTTP 200; upstream returned 126 models | `OPENAI_API_KEY` |
|
||||
| `anthropic` | Anthropic/Claude | 15 | HTTP 200; upstream returned 10 models available to this account | `ANTHROPIC_API_KEY` |
|
||||
| `moonshotai` | Moonshot/Kimi global endpoint | 10 | HTTP 200; upstream returned 12 models | `MOONSHOT_API_KEY` |
|
||||
| **Total** | **4 vendors** | **66 DSH catalog entries** | | |
|
||||
|
||||
The upstream model count and DSH picker count are intentionally different. DSH uses the catalog bundled with its installed `pi-ai` version. A catalog entry may require account entitlements that the key does not have, while an upstream API may return models that the installed DSH catalog does not yet expose.
|
||||
|
||||
### DeepSeek models
|
||||
|
||||
- `deepseek-v4-flash`
|
||||
- `deepseek-v4-pro`
|
||||
- `deepseek-v4-flash-vision-exp`
|
||||
|
||||
### Kimi models in the DSH global Moonshot catalog
|
||||
|
||||
- `kimi-k2-0711-preview`
|
||||
- `kimi-k2-0905-preview`
|
||||
- `kimi-k2-thinking`
|
||||
- `kimi-k2-thinking-turbo`
|
||||
- `kimi-k2-turbo-preview`
|
||||
- `kimi-k2.5`
|
||||
- `kimi-k2.6`
|
||||
- `kimi-k2.7-code`
|
||||
- `kimi-k2.7-code-highspeed`
|
||||
- `kimi-k3`
|
||||
|
||||
DSH also ships two additional dormant Kimi-related catalogs:
|
||||
|
||||
- `moonshotai-cn`: the same 10-model family through the China endpoint. It is not enabled because the global `moonshotai` route is configured.
|
||||
- `kimi-coding`: four entries (`k3`, `k3-256k`, `kimi-for-coding`, and `kimi-for-coding-highspeed`). It is not enabled and may require Kimi Coding-specific authentication rather than a Moonshot API key.
|
||||
|
||||
## Credential storage and provider configuration
|
||||
|
||||
### Managed DSH credential store
|
||||
|
||||
DSH credentials are stored in:
|
||||
|
||||
`/home/garfield/.dsh/.credentials.yaml`
|
||||
|
||||
Observed properties:
|
||||
|
||||
- Format version: `1`
|
||||
- Permissions: `0600`
|
||||
- Stored references: `ANTHROPIC_API_KEY`, `DEEPSEEK_API_KEY`, `MOONSHOT_API_KEY`, and `OPENAI_API_KEY`
|
||||
- Existing DeepSeek data was preserved while the other references were added.
|
||||
- Secret values were never printed during verification.
|
||||
|
||||
This managed file has higher precedence than project and user `.env` files. DSH watches it and hot-publishes credential changes. The model UI is designed to expose only redacted descriptors, never the literal values.
|
||||
|
||||
### Provider settings
|
||||
|
||||
Provider routes are declared in:
|
||||
|
||||
`/home/garfield/.dsh/settings.yaml`
|
||||
|
||||
Effective non-secret structure:
|
||||
|
||||
```yaml
|
||||
llm-pi-ai:
|
||||
providers:
|
||||
openai:
|
||||
apiKeyEnv: OPENAI_API_KEY
|
||||
anthropic:
|
||||
apiKeyEnv: ANTHROPIC_API_KEY
|
||||
moonshotai:
|
||||
apiKeyEnv: MOONSHOT_API_KEY
|
||||
```
|
||||
|
||||
DeepSeek Official is supplied by the stock DSH base bundle rather than this `llm-pi-ai` settings section.
|
||||
|
||||
### Other credential locations found on art0
|
||||
|
||||
These are historical/project-level locations, not the DSH managed store:
|
||||
|
||||
| File | Relevant entries observed |
|
||||
|---|---|
|
||||
| `/home/garfield/hermes-mcp/.env` | `ANTHROPIC_API_KEY` |
|
||||
| `/home/garfield/deer-flow/.env` | `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `MOONSHOT_API_KEY`, and other provider keys |
|
||||
| `/home/garfield/aiScripts/.env` | A separate `OPENAI_API_KEY` |
|
||||
| `/home/garfield/.dsh/.env` | `HERMES_MCP_TOKEN`; no model-provider keys |
|
||||
| `/home/garfield/.env` | `GODADDY_API_KEY` and `GODADDY_API_SECRET`; no DSH model-provider keys |
|
||||
|
||||
The Anthropic values previously found in `hermes-mcp/.env` and `deer-flow/.env` were identical. The two historical OpenAI keys in `aiScripts/.env` and `deer-flow/.env` were different. The newly supplied DSH credentials are managed independently in `.credentials.yaml`.
|
||||
|
||||
The home-level `/home/garfield/.env` exists and was last observed with mode `0600`.
|
||||
|
||||
## Current routing behavior
|
||||
|
||||
```text
|
||||
New DSH session
|
||||
-> deepseek-official / deepseek-v4-flash
|
||||
|
||||
Manual model selection in a session
|
||||
-> DeepSeek model
|
||||
-> OpenAI model
|
||||
-> Anthropic/Claude model
|
||||
-> Moonshot/Kimi model
|
||||
|
||||
Provider/model request fails
|
||||
-> normal retry policy for that provider/model
|
||||
-> final error if retries are exhausted
|
||||
```
|
||||
|
||||
Important semantics:
|
||||
|
||||
- The process-wide default remains `deepseek-official/deepseek-v4-flash`.
|
||||
- Selecting a model in the DSH model picker also makes it the default for subsequent new sessions.
|
||||
- A session that has already sent a model request retains the provider/model recorded in its session log.
|
||||
- Model changes apply to the next request; they do not split a request already being assembled.
|
||||
- There is no automatic simple-versus-complex classification.
|
||||
- There is no automatic Quick answer/Main model prompt.
|
||||
- There is no cross-provider failover.
|
||||
- There is no plan-mode, coding-role, or subagent-specific model route.
|
||||
|
||||
## Restart and hot-reload status
|
||||
|
||||
The DSH process was not restarted while OpenAI, Anthropic, and Moonshot were configured. It remained PID `678037`, started on August 21. This is expected:
|
||||
|
||||
- `.credentials.yaml` is watched and hot-reloaded.
|
||||
- `settings.yaml` is watched and provider registrations are replaced dynamically.
|
||||
- Direct model-list requests for OpenAI, Anthropic, and Moonshot returned HTTP 200 after configuration.
|
||||
- No credential, adapter, settings, or reload errors appeared in the recent DSH log.
|
||||
|
||||
A restart is required after installing a new bundle that contributes host/client plugin modules. The current process has no detected systemd service, so a future plugin rollout needs a deliberate stop/start procedure or a user-level service first.
|
||||
|
||||
## Routing plugins investigated but not installed
|
||||
|
||||
### `dsh-model-router`
|
||||
|
||||
The plugin matching the requested Quick answer behavior is `tianji-qingtian/dsh-model-router`, reviewed at release `v0.8.1`.
|
||||
|
||||
Claimed and source-confirmed behavior:
|
||||
|
||||
- A zero-prefix cheap-model judge returns `SIMPLE` or `AGENTIC`.
|
||||
- Clearly heavy prompts bypass the judge and continue to the primary model.
|
||||
- A `SIMPLE` decision asks the user to choose Quick answer or Main model.
|
||||
- Quick answers use a zero-prefix one-shot call and do not touch the main model's prefix cache.
|
||||
- Transient errors can degrade one turn to the cheap model.
|
||||
- It projects token, cache, and estimated-cost data into a composer panel.
|
||||
|
||||
Important constraints:
|
||||
|
||||
- It chooses the cheap model from the current provider's own catalog; it does not route from a DeepSeek/Claude primary to an unrelated Ollama or Moonshot provider.
|
||||
- Cheap-model discovery uses a hard-coded model-ID match such as `flash`, `chat`, `mini`, `turbo`, `haiku`, `lite`, `air`, or `nano`.
|
||||
- `qwen/qwen3.5-27b` does not match that rule.
|
||||
- The plugin's most DSH-coupled behavior writes a synthetic step envelope into the session log for direct Quick answers. This deserves regression testing after DSH upgrades.
|
||||
- The release ships built artifacts and does not need a source build during installation.
|
||||
|
||||
Proposed pinned installation, not executed:
|
||||
|
||||
```bash
|
||||
dsh plugin --profile web add "github:tianji-qingtian/dsh-model-router#v0.8.1"
|
||||
```
|
||||
|
||||
After installation, DSH Web must be restarted so the new host and client modules load.
|
||||
|
||||
### `dsh-llm-fallbacks`
|
||||
|
||||
`dsh-llm-fallbacks` version `0.3.4` has peer dependencies matching DSH `0.1.1-rc.2`. It can walk cross-provider chains for rate limits, exhausted retries, authentication failures, quota failures, and provider errors.
|
||||
|
||||
Constraints and interaction:
|
||||
|
||||
- It is disabled by default until a valid `fallbacks:` settings section is saved.
|
||||
- Its root chain currently requires the final entry to be an official DeepSeek V4 Flash or Pro model.
|
||||
- It overlaps with `dsh-model-router` on transient request errors. With both installed, the model router may first retry on a cheap model inside the same provider before the fallback plugin moves to another provider. That adds latency during provider-wide outages.
|
||||
- Install and validate the model router first, then decide whether cross-provider resilience justifies the additional layer or whether the router should be modified to disable its internal fallback.
|
||||
|
||||
### `dsh-role-router`
|
||||
|
||||
`@snowamberx/dsh-role-router` routes three roles: normal/default, planner while plan mode is active, and in-process subagents.
|
||||
|
||||
It is not a general coding-task classifier. Out-of-process providers such as Codex do not pass through its in-process request hook, so installing it alone would not implement "send coding work to Codex."
|
||||
|
||||
## Recommended rollout options
|
||||
|
||||
### Option A: keep manual routing
|
||||
|
||||
This is the current and lowest-risk state. Keep DeepSeek V4 Flash as the default and manually choose Claude, OpenAI, Kimi, or DeepSeek Pro for demanding work.
|
||||
|
||||
### Option B: low-risk automatic cost/quality routing
|
||||
|
||||
1. Change the default to `deepseek-official/deepseek-v4-pro`.
|
||||
2. Install the pinned `dsh-model-router` release.
|
||||
3. Let its same-provider discovery pair V4 Pro with V4 Flash.
|
||||
4. Test short self-contained questions, context-dependent follow-ups, code/file work, session resume, and a simulated transient failure.
|
||||
5. Add `dsh-llm-fallbacks` only after the router behavior is stable.
|
||||
|
||||
This is the configuration the existing model router supports most directly.
|
||||
|
||||
### Option C: explicit cross-vendor judge and primary
|
||||
|
||||
Fork or patch `dsh-model-router` to add explicit settings such as `cheapProvider`, `cheapModel`, `primaryProvider`, `primaryModel`, and an independent toggle for transient fallback. This is required to use Kimi or a local Ollama model as the judge while keeping Claude, OpenAI, or DeepSeek as the primary.
|
||||
|
||||
An alternative is to expose the primary and a regex-matching cheap model under one OpenRouter route, but model discovery order would need to be constrained and verified.
|
||||
|
||||
## Local Ollama feasibility on art0
|
||||
|
||||
Observed state:
|
||||
|
||||
- Ollama binary installed at `/usr/local/bin/ollama`
|
||||
- No Ollama API listening on `127.0.0.1:11434`
|
||||
- Intel Core i7-10700F, 8 cores / 16 threads
|
||||
- 62 GiB RAM, about 29 GiB available during inspection
|
||||
- 8 GiB swap almost fully consumed during inspection
|
||||
- NVIDIA tooling could not communicate with a GPU driver
|
||||
|
||||
Running a 27B judge model locally is not recommended on this host in its current state. A small CPU model could be tested later, but it would still require either a router modification for cross-provider selection or use as both the current and cheap model under one route.
|
||||
|
||||
## Security findings and follow-ups
|
||||
|
||||
1. The API keys supplied during this setup were pasted into an AI conversation. Rotate them if conversation retention is a concern, then update the managed DSH credential references.
|
||||
2. Project `.env` files previously had permissive modes (`0644` or `0664`). Restrict secret-bearing files to `0600` unless a documented group consumer requires access.
|
||||
3. A plaintext Azure OpenAI subscription key was found in a historical vault conversation and its mobile mirror:
|
||||
- `Claude Conversations/fetcherpay-web-apps-marketing/2026-03-19-Caveat-The-messages-below-were-generated-by-the-us-73b14970.md`
|
||||
- `mobile/S22/Claude Conversations/fetcherpay-web-apps-marketing/2026-03-19-Caveat-The-messages-below-were-generated-by-the-us-73b14970.md`
|
||||
4. Rotate that Azure key before redacting both note copies. Do not merely delete the text and leave the credential valid.
|
||||
5. DSH's `0600` credential file protects against other OS users, not against tools running as the same `garfield` user. A model with filesystem access could deliberately read the file if given or able to discover the path.
|
||||
6. The Obsidian compose file expects `./vaults:/vaults`, but the expected host directory under the infrastructure checkout was absent and the `obsidian` container was not available during inspection. This note was saved to the workstation's synced vault at `/Users/garfieldheron/obsidian-vault`.
|
||||
|
||||
## Verification commands
|
||||
|
||||
These commands report configuration metadata without printing secrets:
|
||||
|
||||
```bash
|
||||
# Running DSH process and listener
|
||||
pgrep -af 'dsh web --no-open'
|
||||
ss -ltnp | grep ':3080'
|
||||
|
||||
# Profile bundles
|
||||
node -e 'const p=require("/home/garfield/.dsh/profiles/web/package.json"); console.log(p.dsh.profile.bundles)'
|
||||
|
||||
# Default model
|
||||
dsh --profile web --dump-config | sed -n '/id: agent-default-model/,+6p'
|
||||
|
||||
# Credential reference names only
|
||||
node -e '
|
||||
const fs=require("fs");
|
||||
const yaml=require("/home/garfield/.npm-global/lib/node_modules/@deepseek-ai/dsh/node_modules/js-yaml");
|
||||
const d=yaml.load(fs.readFileSync("/home/garfield/.dsh/.credentials.yaml", "utf8"));
|
||||
console.log(Object.keys(d.refs || {}).sort());
|
||||
'
|
||||
|
||||
# Provider routes and credential reference names only
|
||||
node -e '
|
||||
const fs=require("fs");
|
||||
const yaml=require("/home/garfield/.npm-global/lib/node_modules/@deepseek-ai/dsh/node_modules/js-yaml");
|
||||
const d=yaml.load(fs.readFileSync("/home/garfield/.dsh/settings.yaml", "utf8"));
|
||||
for (const [provider, config] of Object.entries(d["llm-pi-ai"]?.providers || {})) {
|
||||
console.log(provider, config.apiKeyEnv);
|
||||
}
|
||||
'
|
||||
```
|
||||
|
||||
Never print or commit `.credentials.yaml`, project `.env` files, or live TLS material.
|
||||
|
||||
## Change record
|
||||
|
||||
| Date | Change |
|
||||
|---|---|
|
||||
| 2026-08-23 | Inspected DSH `0.1.1-rc.2`, plugin architecture, provider configuration, host capacity, and live process. |
|
||||
| 2026-08-23 | Added and validated OpenAI credential; enabled `openai` route. |
|
||||
| 2026-08-23 | Added and validated Anthropic credential; enabled `anthropic` route. |
|
||||
| 2026-08-23 | Added and validated Moonshot credential; enabled global `moonshotai` route. |
|
||||
| 2026-08-23 | Confirmed four configured vendors and 66 DSH catalog entries. |
|
||||
| 2026-08-23 | Confirmed provider hot reload succeeded without restarting DSH. |
|
||||
| 2026-08-23 | Documented automatic-router, fallback, role-router, Ollama, and security findings; no routing plugin installed. |
|
||||
+365
@@ -0,0 +1,365 @@
|
||||
---
|
||||
title: art0 DSH passkey-protected remote access implementation handoff
|
||||
date: 2026-08-23
|
||||
status: proposed
|
||||
server: art0
|
||||
tags:
|
||||
- deepseek-harness
|
||||
- dsh
|
||||
- art0
|
||||
- passkeys
|
||||
- pocket-id
|
||||
- oauth2-proxy
|
||||
- traefik
|
||||
- kubernetes
|
||||
- security
|
||||
---
|
||||
|
||||
# art0 DSH passkey-protected remote access implementation handoff
|
||||
|
||||
## Objective
|
||||
|
||||
Make the DeepSeek Harness Web UI on `art0` reachable securely from a browser outside the local network, protected by a real login and passkey authentication.
|
||||
|
||||
The deployment must preserve DSH's loopback-only posture, protect HTTP APIs and WebSocket streams, fit the existing Traefik-to-Kubernetes architecture, survive reboots, and avoid exposing model-provider credentials.
|
||||
|
||||
No remote-access implementation was deployed during the investigation documented here.
|
||||
|
||||
## Recommended design
|
||||
|
||||
Use Pocket ID as a passkey-only OpenID Connect identity provider and OAuth2 Proxy as the authenticated reverse proxy in front of DSH.
|
||||
|
||||
```text
|
||||
Browser
|
||||
|
|
||||
| HTTPS
|
||||
v
|
||||
Traefik on art0
|
||||
|
|
||||
| Host: dsh.fetcherpay.com
|
||||
v
|
||||
K8s ClusterIP: dsh-access
|
||||
|
|
||||
v
|
||||
OAuth2 Proxy pod (hostNetwork: true)
|
||||
| \
|
||||
| authenticated request \ OIDC redirect
|
||||
v v
|
||||
127.0.0.1:3080 Pocket ID
|
||||
DeepSeek Harness auth.fetcherpay.com
|
||||
```
|
||||
|
||||
Recommended public names:
|
||||
|
||||
- `dsh.fetcherpay.com` — protected DSH application
|
||||
- `auth.fetcherpay.com` — Pocket ID login and passkey enrollment
|
||||
|
||||
Pocket ID is a small, passkey-only OIDC provider. OAuth2 Proxy supports generic OIDC discovery and authenticated WebSocket proxying, both of which are required for the DSH browser transport.
|
||||
|
||||
## Why this design fits art0
|
||||
|
||||
- Traefik already owns public ports 80 and 443.
|
||||
- Public routing remains in `/home/garfield/letsencrypt/manual/tls.yml`.
|
||||
- Traefik will route to a Kubernetes Service ClusterIP, not a Docker container IP.
|
||||
- DSH remains bound to `127.0.0.1:3080` and is never directly exposed.
|
||||
- A `hostNetwork: true` access-proxy pod can reach the host's loopback DSH listener.
|
||||
- Pocket ID can run as a normal Kubernetes workload with persistent storage.
|
||||
- OAuth2 Proxy handles HTTP requests, cookies, OIDC redirects, authorization, and WebSocket upgrades.
|
||||
|
||||
Do not enable the Traefik Docker provider as part of this work.
|
||||
|
||||
## Current state observed on 2026-08-23
|
||||
|
||||
| Item | Current state |
|
||||
|---|---|
|
||||
| DSH version | `0.1.1-rc.2` |
|
||||
| DSH source checkout | `/home/garfield/IdeaProjects/deepseek-harness` |
|
||||
| DSH launcher | `/home/garfield/.npm-global/bin/dsh` |
|
||||
| DSH listener | `127.0.0.1:3080` |
|
||||
| Observed command | `dsh web --no-open` |
|
||||
| Observed PID | `678037` |
|
||||
| Process start | 2026-08-21 18:02 EDT |
|
||||
| Process supervision | None; parented by a Codex app-server process |
|
||||
| User systemd | Available and running |
|
||||
| User lingering | Enabled for `garfield` |
|
||||
| Public DSH route | None |
|
||||
| Authentication service | None found in Docker or MicroK8s |
|
||||
| `dsh.fetcherpay.com` DNS | No A record found |
|
||||
| `auth.fetcherpay.com` DNS | No A record found |
|
||||
| DNS provider | GoDaddy nameservers (`ns65.domaincontrol.com`, `ns66.domaincontrol.com`) |
|
||||
| art0 public address | `104.190.60.129` |
|
||||
| Available memory | Approximately 28 GiB at investigation time |
|
||||
|
||||
The model-provider configuration is documented separately in [[2026-08-23-art0-dsh-model-providers-routing-and-credentials]]. Do not copy API keys into this note, Kubernetes manifests, Git, shell history, or Traefik configuration.
|
||||
|
||||
## Critical DSH security boundary
|
||||
|
||||
DSH's `--trusted-host` setting is not authentication. It is a Host/Origin and DNS-rebinding fence.
|
||||
|
||||
The DSH CLI intentionally refuses a normal `--host 0.0.0.0` launch because the Web UI exposes an agent control plane capable of running shell commands, reading and editing files, and spending configured provider credentials.
|
||||
|
||||
The browser transport uses:
|
||||
|
||||
- HTTP POST requests under `/api`
|
||||
- WebSocket downlinks at `/api/events.mux` and `/api/events.host`
|
||||
- Web UI assets and plugin bundles
|
||||
|
||||
Authentication must protect all of these paths. Protecting only the HTML landing page is insufficient.
|
||||
|
||||
### Privileged API limitation
|
||||
|
||||
Even when `dsh.fetcherpay.com` is supplied through `--trusted-host`, current DSH source pins several methods to a loopback Host authority:
|
||||
|
||||
- settings read/write operations
|
||||
- credential description and mutation
|
||||
- model discovery using draft credentials
|
||||
- agent-preset authoring operations
|
||||
- native directory/path actions
|
||||
|
||||
Ordinary model selection, session creation, prompts, tools, shell execution, filesystem work, and WebSocket event delivery can be made available through a trusted public authority. The privileged configuration plane remains blocked unless a real DSH-side authentication bridge presents the authenticated request to the core in a loopback-trusted form.
|
||||
|
||||
This creates two valid implementation levels.
|
||||
|
||||
## Implementation level 1: protected remote agent access
|
||||
|
||||
Recommended first release.
|
||||
|
||||
Capabilities:
|
||||
|
||||
- Passkey-only login
|
||||
- Protected Web UI, plugin bundles, APIs, and WebSockets
|
||||
- Create and use DSH sessions remotely
|
||||
- Use configured models and agent tools
|
||||
- DSH remains loopback-only
|
||||
- Provider settings and credentials continue to be managed through SSH/local access
|
||||
|
||||
Advantages:
|
||||
|
||||
- No custom DSH security plugin
|
||||
- Smaller attack surface
|
||||
- Easier to validate and maintain while DSH is in developer preview
|
||||
- Estimated implementation and testing time: 2–4 hours after DNS is available
|
||||
|
||||
## Implementation level 2: full remote Settings support
|
||||
|
||||
Add only after level 1 is stable.
|
||||
|
||||
This requires a small, auditable DSH-side authentication bridge that:
|
||||
|
||||
1. Accepts an identity assertion only from the local OAuth2 Proxy connection.
|
||||
2. Authenticates the assertion cryptographically or with a high-entropy shared secret.
|
||||
3. Fails closed when the expected DSH route structure changes.
|
||||
4. Protects HTTP, plugin assets, APIs, and WebSocket upgrades.
|
||||
5. Presents already-authenticated privileged RPC calls to the DSH core using its loopback authority path.
|
||||
6. Never accepts client-supplied forwarded identity headers directly from the Internet.
|
||||
|
||||
The community `dsh-webui-auth` plugin demonstrates runtime route gating and authenticated loopback-shaped dispatch. It currently implements password authentication, not passkeys. Treat it as a design reference requiring source review and a pinned commit, not as a package to install blindly.
|
||||
|
||||
Estimated implementation and testing time for levels 1 and 2 together: 4–8 hours. Allow more time if a clean upstream-compatible plugin must be written and tested from scratch.
|
||||
|
||||
## Required implementation work
|
||||
|
||||
### 1. DNS
|
||||
|
||||
Create the following GoDaddy A records:
|
||||
|
||||
| Name | Type | Value |
|
||||
|---|---|---|
|
||||
| `dsh.fetcherpay.com` | A | `104.190.60.129` |
|
||||
| `auth.fetcherpay.com` | A | `104.190.60.129` |
|
||||
|
||||
Confirm both names resolve before requesting certificates.
|
||||
|
||||
### 2. Pocket ID
|
||||
|
||||
Deploy Pocket ID in MicroK8s with:
|
||||
|
||||
- Namespace consistent with the existing infrastructure policy, preferably `fetcherpay`
|
||||
- ClusterIP Service
|
||||
- PersistentVolumeClaim for its database and uploaded data
|
||||
- `APP_URL=https://auth.fetcherpay.com`
|
||||
- Encryption key supplied from a Kubernetes Secret or mounted secret file
|
||||
- `ALLOW_INSECURE_CALLBACK_URLS=false`
|
||||
- A narrowly scoped `TRUST_PROXY` value for the direct Traefik/proxy source
|
||||
- Readiness and liveness probes
|
||||
- Resource requests and limits
|
||||
- A documented backup and restore procedure
|
||||
|
||||
Create the administrator only after HTTPS is working. Enroll at least two passkeys:
|
||||
|
||||
- Primary synced or platform passkey
|
||||
- Recovery passkey, preferably a separate hardware security key
|
||||
|
||||
Do not rely on a single phone or laptop as the only authenticator.
|
||||
|
||||
### 3. Pocket ID OIDC client
|
||||
|
||||
Create a dedicated OIDC client for DSH access:
|
||||
|
||||
- Redirect URI: `https://dsh.fetcherpay.com/oauth2/callback`
|
||||
- Scopes: `openid profile email`
|
||||
- PKCE: S256
|
||||
- Exact redirect URI matching
|
||||
- No insecure callback URLs
|
||||
|
||||
Store the OIDC client secret in a Kubernetes Secret, not in a checked-in manifest.
|
||||
|
||||
### 4. OAuth2 Proxy
|
||||
|
||||
Deploy OAuth2 Proxy with:
|
||||
|
||||
- Generic OIDC provider
|
||||
- Issuer URL `https://auth.fetcherpay.com`
|
||||
- Upstream `http://127.0.0.1:3080`
|
||||
- `hostNetwork: true`
|
||||
- A non-conflicting local listen port
|
||||
- WebSocket proxying enabled
|
||||
- Reverse-proxy mode enabled
|
||||
- Trusted proxy CIDRs set explicitly
|
||||
- Secure, HttpOnly cookies
|
||||
- A narrow cookie domain scoped to `dsh.fetcherpay.com`
|
||||
- PKCE S256
|
||||
- A specific email, subject, or group allowlist
|
||||
- No IP-based authentication bypass
|
||||
- Authentication required for every DSH route except OAuth2 Proxy's own callback and health endpoints
|
||||
- A random cookie secret stored in a Kubernetes Secret
|
||||
- Readiness and liveness probes
|
||||
- Resource requests and limits
|
||||
|
||||
The Kubernetes Service for this pod should be ClusterIP. Traefik should route only to that Service.
|
||||
|
||||
### 5. Persistent DSH service
|
||||
|
||||
Replace the current ad hoc process with a systemd user service for `garfield`.
|
||||
|
||||
The unit should:
|
||||
|
||||
- Use `/home/garfield/IdeaProjects/deepseek-harness` as the working directory
|
||||
- Start `/home/garfield/.npm-global/bin/dsh web --no-open --trusted-host dsh.fetcherpay.com`
|
||||
- Preserve the existing `DSH_HOME` behavior
|
||||
- Restart on failure with bounded backoff
|
||||
- Send logs to journald or the existing protected DSH log
|
||||
- Load credentials without placing secret values in the unit file or command line
|
||||
- Set a conservative umask
|
||||
|
||||
User lingering is already enabled, so the service can survive logout and start at boot.
|
||||
|
||||
Before switching processes, confirm no active DSH session will be interrupted unexpectedly.
|
||||
|
||||
### 6. Traefik routing
|
||||
|
||||
Update `/home/garfield/letsencrypt/manual/tls.yml` with two HTTPS routers:
|
||||
|
||||
- `dsh.fetcherpay.com` to the OAuth2 Proxy ClusterIP Service
|
||||
- `auth.fetcherpay.com` to the Pocket ID ClusterIP Service
|
||||
|
||||
Requirements:
|
||||
|
||||
- Use the existing certificate resolver pattern
|
||||
- Route to Kubernetes Service ClusterIPs
|
||||
- Preserve `Host`, `X-Forwarded-Proto`, `X-Forwarded-Host`, and client-address forwarding correctly
|
||||
- Support WebSocket upgrades
|
||||
- Add appropriate security headers without breaking Pocket ID WebAuthn or DSH WebSockets
|
||||
- Do not add API keys, OIDC client secrets, cookie secrets, or encryption keys to `tls.yml`
|
||||
|
||||
Validate the Traefik dynamic configuration before and after the change.
|
||||
|
||||
### 7. Optional DSH authentication bridge
|
||||
|
||||
Required only for implementation level 2.
|
||||
|
||||
Before installation:
|
||||
|
||||
- Audit every dependency and installation script
|
||||
- Pin the exact package version or Git commit
|
||||
- Confirm fail-closed behavior if route wrapping fails
|
||||
- Confirm identity headers are ignored unless the socket peer is the local proxy
|
||||
- Confirm logout or session revocation closes or invalidates WebSocket access
|
||||
- Test against the installed DSH version, not only the latest upstream branch
|
||||
- Document the upgrade test required before every DSH version change
|
||||
|
||||
## Acceptance tests
|
||||
|
||||
### Network exposure
|
||||
|
||||
- `127.0.0.1:3080` remains the only DSH listener.
|
||||
- Port 3080 is unreachable from an external machine.
|
||||
- Traefik is the only public entry point.
|
||||
- The public route targets a K8s ClusterIP.
|
||||
|
||||
### Authentication
|
||||
|
||||
- An unauthenticated request to `/` redirects to login.
|
||||
- Unauthenticated assets and plugin bundles cannot be loaded.
|
||||
- Unauthenticated `/api` requests return 401/403 and never reach DSH.
|
||||
- Unauthenticated WebSocket handshakes are rejected.
|
||||
- A registered passkey completes login successfully.
|
||||
- An unknown Pocket ID user cannot access DSH.
|
||||
- Logout invalidates subsequent HTTP calls and WebSocket reconnects.
|
||||
- Expired sessions require a new passkey authentication.
|
||||
|
||||
### DSH behavior
|
||||
|
||||
- The workspace list loads.
|
||||
- A session can be created.
|
||||
- Each configured model vendor can be selected.
|
||||
- A prompt streams to completion.
|
||||
- Tool approvals and results appear over the WebSocket connection.
|
||||
- Refresh and browser reconnection recover correctly.
|
||||
- Level 1: privileged settings calls remain blocked and are managed locally.
|
||||
- Level 2: settings and credential operations work only after authentication.
|
||||
|
||||
### Resilience
|
||||
|
||||
- DSH restarts automatically after a forced process failure.
|
||||
- DSH, Pocket ID, and OAuth2 Proxy return after an `art0` reboot.
|
||||
- Pocket ID data survives pod replacement.
|
||||
- A tested backup can restore Pocket ID identity and OIDC configuration.
|
||||
- Traefik fails closed when OAuth2 Proxy or Pocket ID is unavailable.
|
||||
|
||||
### Browser/device coverage
|
||||
|
||||
- Desktop Chrome or Safari
|
||||
- Mobile browser over cellular data
|
||||
- Incognito/private window
|
||||
- At least two separately stored passkeys
|
||||
|
||||
## Rollback plan
|
||||
|
||||
Rollback should not require exposing DSH directly.
|
||||
|
||||
1. Remove or disable the two Traefik routers.
|
||||
2. Confirm the public hostnames no longer reach DSH or Pocket ID.
|
||||
3. Keep DSH on `127.0.0.1:3080` for SSH-port-forwarded/local use.
|
||||
4. Stop the OAuth2 Proxy and Pocket ID workloads if necessary.
|
||||
5. Preserve Pocket ID persistent data and secrets for diagnosis unless compromise is suspected.
|
||||
6. If a DSH bridge was installed, remove it from the Web profile and restart DSH using the last known-good pinned profile.
|
||||
|
||||
Do not roll back by binding DSH to `0.0.0.0` or forwarding port 3080 publicly.
|
||||
|
||||
## Operational cautions
|
||||
|
||||
- Treat public access to DSH as access to a remote shell. A DSH session can run commands, alter files, and consume paid model APIs.
|
||||
- DSH is in developer preview and may change internal Web routes without compatibility guarantees.
|
||||
- Pin versions for Pocket ID, OAuth2 Proxy, and any DSH authentication bridge.
|
||||
- Review authentication after every DSH upgrade before restoring the public route.
|
||||
- Back up Pocket ID data and retain a second passkey before depending on it for access.
|
||||
- Never put provider API keys into documentation, Git, Kubernetes ConfigMaps, Traefik files, or command-line flags.
|
||||
|
||||
## Source references
|
||||
|
||||
- [DeepSeek Harness repository and developer-preview warning](https://github.com/deepseek-ai/deepseek-harness)
|
||||
- [DSH CLI Web and trusted-host reference](https://github.com/deepseek-ai/deepseek-harness/blob/master/apps/cli/reference/README.md)
|
||||
- [Pocket ID introduction](https://pocket-id.org/docs/introduction)
|
||||
- [Pocket ID installation](https://pocket-id.org/docs/setup/installation)
|
||||
- [Pocket ID environment variables](https://pocket-id.org/docs/configuration/environment-variables)
|
||||
- [Pocket ID user and passkey management](https://pocket-id.org/docs/setup/user-management)
|
||||
- [OAuth2 Proxy configuration](https://oauth2-proxy.github.io/oauth2-proxy/configuration/overview/)
|
||||
- [OAuth2 Proxy endpoints](https://oauth2-proxy.github.io/oauth2-proxy/features/endpoints/)
|
||||
- [Community dsh-webui-auth reference implementation](https://github.com/Yuuz12/dsh-webui-auth)
|
||||
|
||||
## Recommended handoff decision
|
||||
|
||||
Proceed with implementation level 1 using `dsh.fetcherpay.com` and `auth.fetcherpay.com`. Validate passkey login, DSH sessions, WebSockets, reboot behavior, and external network isolation. Keep settings and provider credentials local initially.
|
||||
|
||||
After level 1 has operated successfully, separately review and approve the DSH authentication bridge required for full remote Settings support.
|
||||
@@ -0,0 +1,167 @@
|
||||
---
|
||||
title: art0 DSH restart and Hermes MCP authentication failure
|
||||
date: 2026-08-23
|
||||
status: operational-degraded
|
||||
server: art0
|
||||
tags:
|
||||
- deepseek-harness
|
||||
- dsh
|
||||
- art0
|
||||
- restart
|
||||
- hermes-mcp
|
||||
- authentication
|
||||
- incident
|
||||
---
|
||||
|
||||
# art0 DSH restart and Hermes MCP authentication failure
|
||||
|
||||
## Executive summary
|
||||
|
||||
DeepSeek Harness on `art0` was restarted on August 23, 2026. The original process stopped cleanly, but the first two replacement processes failed during plugin-tree startup because the configured Hermes MCP bearer token was rejected by `https://hermes.squaremcp.com/mcp`.
|
||||
|
||||
DSH is running again and its Web UI is healthy on `127.0.0.1:3080`. To restore the main application without waiting for a new Hermes token, the Hermes MCP plugin's `failOnStartupError` setting was changed from `true` to `false`. DSH and its configured model providers are available, but the Hermes MCP integration remains unavailable until its bearer token is refreshed or reauthorized.
|
||||
|
||||
No token or API-key values are recorded in this note.
|
||||
|
||||
## Current runtime
|
||||
|
||||
| Item | Current value |
|
||||
|---|---|
|
||||
| Server | `art0` (`104.190.60.129`, SSH port `2222`) |
|
||||
| DSH version | `0.1.1-rc.2` |
|
||||
| Working directory | `/home/garfield/IdeaProjects/deepseek-harness` |
|
||||
| Launcher | `/home/garfield/.npm-global/bin/dsh` |
|
||||
| Command | `dsh web --no-open` |
|
||||
| New PID | `3569499` |
|
||||
| Process parent | PID 1; detached with `nohup` |
|
||||
| Start time | 2026-08-23 21:12:39 EDT |
|
||||
| Listener | `127.0.0.1:3080` |
|
||||
| Web health check | HTTP 200 |
|
||||
| Hermes MCP | Unavailable: bearer token rejected |
|
||||
| Model providers | Existing DeepSeek, OpenAI, Anthropic, and Moonshot/Kimi configuration retained |
|
||||
|
||||
This process is detached but is still not managed by systemd. A future maintenance task should replace the ad hoc launch with the systemd user service described in [[2026-08-23-art0-dsh-passkey-remote-access-implementation-handoff]].
|
||||
|
||||
## Restart sequence
|
||||
|
||||
The original DSH process was:
|
||||
|
||||
| Item | Value |
|
||||
|---|---|
|
||||
| PID | `678037` |
|
||||
| Start time | 2026-08-21 18:02:00 EDT |
|
||||
| Working directory | `/home/garfield/IdeaProjects/deepseek-harness` |
|
||||
| Command | `node /home/garfield/.npm-global/bin/dsh web --no-open` |
|
||||
|
||||
The old process received `SIGTERM` and stopped cleanly. No force kill was required.
|
||||
|
||||
The first replacement launch did not inherit `HERMES_MCP_TOKEN`, so DSH failed while loading the mandatory Hermes MCP client. A second launch explicitly loaded `/home/garfield/.dsh/.env`, but the Hermes endpoint returned the same 401 response. This confirmed that the stored token was present but was no longer accepted; the problem was not only a missing environment import.
|
||||
|
||||
The endpoint response was:
|
||||
|
||||
```text
|
||||
Unauthorized — bearer token is missing, expired, revoked, or invalid; reauthorize or refresh the token
|
||||
```
|
||||
|
||||
Because the MCP plugin was configured with `failOnStartupError: true`, this single integration failure prevented the entire DSH plugin tree and Web UI from starting.
|
||||
|
||||
## Temporary recovery change
|
||||
|
||||
File changed:
|
||||
|
||||
```text
|
||||
/home/garfield/.dsh/cordis.patch.yml
|
||||
```
|
||||
|
||||
Change:
|
||||
|
||||
```yaml
|
||||
failOnStartupError: true
|
||||
```
|
||||
|
||||
became:
|
||||
|
||||
```yaml
|
||||
failOnStartupError: false
|
||||
```
|
||||
|
||||
The original configuration was backed up before modification:
|
||||
|
||||
```text
|
||||
/home/garfield/.dsh/cordis.patch.yml.before-hermes-auth-failure-20260823
|
||||
```
|
||||
|
||||
With startup failure made non-fatal, DSH started successfully and returned HTTP 200 from `http://127.0.0.1:3080/`.
|
||||
|
||||
The Hermes MCP plugin retains its configured reconnect behavior, but it will not reconnect successfully until a valid token is supplied.
|
||||
|
||||
## Impact
|
||||
|
||||
Available:
|
||||
|
||||
- DSH Web UI on the host loopback interface
|
||||
- Existing workspaces and sessions
|
||||
- Configured model providers and manual model selection
|
||||
- DeepSeek, OpenAI, Anthropic/Claude, and Moonshot/Kimi routes
|
||||
- Normal DSH agent and tool functionality not dependent on Hermes MCP
|
||||
|
||||
Unavailable or degraded:
|
||||
|
||||
- Tools supplied by `hermes-mcp`
|
||||
- Any workflow depending specifically on the Hermes MCP connection
|
||||
- Mandatory startup validation of that integration
|
||||
|
||||
Automatic model routing remains a separate issue: `dsh-model-router`, `dsh-llm-fallbacks`, and `dsh-role-router` were not installed at the time of this restart.
|
||||
|
||||
## Required remediation
|
||||
|
||||
1. Sign in to the SquareMCP dashboard at `https://app.squaremcp.com`.
|
||||
2. Use **Connect MCP Client** or the appropriate reauthorization flow to issue a new bearer token bound to the correct customer account.
|
||||
3. Replace only the value of `HERMES_MCP_TOKEN` in `/home/garfield/.dsh/.env`.
|
||||
4. Keep `/home/garfield/.dsh/.env` mode `0600`.
|
||||
5. Test the new token against the Hermes MCP endpoint without printing it to the terminal, logs, shell history, or vault.
|
||||
6. Restart DSH while explicitly loading its protected environment file.
|
||||
7. Confirm Hermes MCP completes its initial tool synchronization.
|
||||
8. Change `failOnStartupError` back to `true` if Hermes MCP should once again be mandatory for DSH availability.
|
||||
9. Restart and confirm HTTP health, WebSocket behavior, model availability, and Hermes tools.
|
||||
|
||||
Do not paste the replacement token into this note, Git, Traefik configuration, Kubernetes ConfigMaps, or command-line arguments.
|
||||
|
||||
## Recommended permanent service behavior
|
||||
|
||||
The future systemd user unit should load secrets through a protected environment file rather than relying on the interactive shell or a parent process to supply them.
|
||||
|
||||
The unit should include the equivalent of:
|
||||
|
||||
```ini
|
||||
WorkingDirectory=/home/garfield/IdeaProjects/deepseek-harness
|
||||
EnvironmentFile=/home/garfield/.dsh/.env
|
||||
ExecStart=/home/garfield/.npm-global/bin/dsh web --no-open
|
||||
Restart=on-failure
|
||||
```
|
||||
|
||||
The real unit should also set a conservative umask and restart backoff. Do not place secret values directly in the unit file.
|
||||
|
||||
Whether Hermes MCP should be fatal at startup is an operational policy decision:
|
||||
|
||||
- `true` guarantees DSH never starts without Hermes, but one expired integration token takes down the whole Web UI.
|
||||
- `false` preserves DSH availability while clearly logging that Hermes is unavailable.
|
||||
|
||||
For general DSH availability, the recommended steady-state setting is `false`, combined with monitoring or an alert for MCP connection failure. Use `true` only when operating without Hermes would be unsafe or misleading.
|
||||
|
||||
## Verification performed
|
||||
|
||||
- Confirmed old PID and exact command before stopping it.
|
||||
- Confirmed the old process terminated after `SIGTERM`.
|
||||
- Confirmed the protected DSH environment file contains a non-empty Hermes token reference without displaying its value.
|
||||
- Confirmed the endpoint rejected the stored token after it was explicitly loaded.
|
||||
- Preserved a backup of the pre-recovery patch file.
|
||||
- Confirmed the new process remains alive.
|
||||
- Confirmed `127.0.0.1:3080` is listening under the new PID.
|
||||
- Confirmed the Web root returns HTTP 200.
|
||||
- Confirmed DSH remains bound only to loopback.
|
||||
|
||||
## Related notes
|
||||
|
||||
- [[2026-08-23-art0-dsh-model-providers-routing-and-credentials]]
|
||||
- [[2026-08-23-art0-dsh-passkey-remote-access-implementation-handoff]]
|
||||
Reference in new issue
Block a user