# dsh-remote-local-plugin host bundle.
#
# One row owns the host registry, SSH tunnels, plugin-owned remote
# provisioning, the local model credential proxy, and the authenticated host
# API. Its browser half registers the Settings page and remote chat drawer.
# The terminal-controller fork is bundled with this package; this patch disables
# the stock row and mounts the fork so mirrored Sessions use SSH PTYs.
- id: terminal-controller
  disabled: true
- insert:
    - id: terminal-controller-remote
      name: dsh-remote-terminal-controller
    - id: dsh-remote-local
      name: dsh-remote-local-plugin
      config:
        # Empty means $DSH_HOME/remote.
        stateDir: ''
        sshBinary: ssh
        # Empty means <remoteDshHome>/remote-agent/agent.json.
        remoteStateFile: ''
        probeTimeoutMs: 10000
        connectTimeoutMs: 15000
        healthIntervalMs: 15000
        reconnect: true
        maxReconnectDelayMs: 30000
        strictHostKeyChecking: accept-new

        # One-click remote provisioning.
        autoProvision: true
        remoteDshHome: ~/.dsh
        remoteInstallDir: ~/.local/share/dsh-remote
        remoteDshVersion: 0.2.1-rc.2
        remotePnpmVersion: 11.21.0
        remoteStart: systemd
        provisionTimeoutMs: 600000
        # Remote-visible HTTP(S) proxy. Empty means inspect the account login shell.
        remoteInstallProxy: ''
        remoteInstallNoProxy: 127.0.0.1,localhost

        # Default: copy the locally resolved key into the remote service env.
        credentialProxy: false
        copyModelKey: true
        remoteModelBaseUrl: https://api.deepseek.com/anthropic

        # Optional: keep the key local and proxy through a reverse SSH tunnel.
        credentialProxyUpstream: https://api.deepseek.com/anthropic
        credentialProxyRemotePort: 47821
        modelCredentialRef: DEEPSEEK_API_KEY

        # Mirror remote workspaces/sessions into the ordinary local UI.
        mirrorSessions: true
        mirrorPollMs: 1500
        mirrorMaxEvents: 2000
