<< All versions

Skill v1.0.0

currentAutomated scan100/100
codebam/hermes-skills/dsh-config
──Details
PublishedOctober 25, 2026 at 05:12 PM
Content Hashsha256:7e8fdc67a8b8f58f...
Git SHA7ee252ca1d0c
──Files
Files (1 file, 4.6 KB)
SKILL.md4.6 KBactive
SKILL.md · 99 lines · 4.6 KB

name: dsh-config description: Use when changing dsh (DeepSeek Harness) config or keys. version: 1.0.0 author: Hermes Agent license: MIT platforms: [linux] metadata: hermes: tags: [dsh, deepseek-harness, credentials, routes, nixos, agents] related_skills: [declarative-hermes-config, osb-work-nix-builds]


dsh (DeepSeek Harness) configuration — codebam/nixos

When to Use

  • Adding, rotating, or re-pointing model API keys for dsh; changing which

subscription a route uses.

  • Editing llm-pi-ai routes/providers, launchers, or profile patches.
  • After a dsh version bump, when ~/.dsh state behaves unexpectedly

(a "vanished" settings file, profiles, plugins).

Where things live

  • home/agents.nix owns dsh: the settings YAML (dshSettings → merged into

~/.dsh/settings.yaml at activation), the profile patch (dshProfilePatch → rendered into ~/.dsh/profiles/*/cordis.patch.yml), and the launchers.

  • Launchers: dshSandboxed (the desktop dsh), the wrapped dsh used on

laptop/steamdeck, dsh-host-access, and dsh-web-serve (dsh-web's ExecStart). EVERY launch path must source the dsh key loader — a path that sources bare loadKey still gets the first subscription but silently loses OPENCODE_API_KEY_2.

  • loadKey is the shared agent env loader; loadDshKey chains it and adds

the dsh-specific extras (OPENCODE_API_KEY_2 from /run/secrets/opencode-go-api-key-2, exported only when the secret file is present). New dsh launch paths source loadDshKey, never bare loadKey.

  • Secrets flow sops → /run/secrets; settings reference env NAMES only —

never put key values in Nix strings or settings documents.

Credential seam rules (dsh-llm-pi-ai)

  • A route names ONE credential reference (apiKeyEnv: OPENCODE_API_KEY) — a

POSIX-identifier-shaped env var, resolved per operation. There is NO credential pool: no rotation, no failover between subscriptions. When a subscription is spent the route keeps using it until its reference changes; automatic switching would need a custom plugin — do not promise it.

  • Resolution precedence: launch environment first, then a credential stored

through the credentials service, then project/harness-home .env files. Empty string counts as absent. Values supplied via launch env are read-only in the Models UI.

  • Switching a route to the other subscription is a one-line change

(apiKeyEnv: OPENCODE_API_KEY_2). Both refs resolve once the launcher sources loadDshKey.

  • The credential error text ("store it through the credentials service or

export it") is guidance, not a bug — it names the two supported fixes.

Route constraints

  • Routes are keyed by provider: a route cannot borrow another provider's

model catalog (no aliasing); a mixed-protocol catalog dsh cannot hand-declare is served as dedicated single-model routes instead.

  • Opencode-backed routes pair with the dsh-opencode-session plugin in the

profile patch — inspect the profile's plugin list when opencode requests misbehave, before touching routes.

  • dsh --dump-config composes routes/plugins without booting the app — the

runtime verification hook for any config edit.

Settings & profiles (0.2.x)

  • 0.2.x imports a legacy ~/.dsh/settings.yaml into the FIRST-booting

profile and renames it settings.yaml.imported; per-profile settings and routes then live in that profile's cordis.patch.yml. Repo activation rewrites the managed settings file, so a switch re-arms the import — a "disappeared" settings.yaml is the designed cycle, not data loss.

  • Patch targets must be writable render targets: a read-only store symlink

cannot receive the import.

Verify and activate

  • Build targeted derivations (see osb-work-nix-builds) and read the

generated launcher scripts: confirm each sources the dsh loader and the guard exports OPENCODE_API_KEY_2 only when the secret exists.

  • Host-side loader simulation: source the built loader with the real

/run/secrets present; assert both refs are non-empty and distinct — print lengths, never values.

  • Run the repo lint gate before committing; commits are GPG-signed and push

to origin/master per repo convention.

  • Activation is the human's call: nh os switch restarts dsh-web (its

launcher changed) and the TUI picks up env on its next launch. Say this and stop.

Depth — the key-adding pattern, resolution details, route schema notes, and the settings-import mechanism — in references/credentials-and-routes.md.

Building or mounting a custom tool plugin (as opposed to routes/keys): see the dsh-tool-plugins skill.

All versions