# dsh-lark-bot runtime configuration. # # This file is a template only. Never commit real credentials. # At runtime the bot reads DSH_LARK_* variables and merges them with # ~/.dsh-lark/config.json. # Feishu / Lark application credentials. Prefer first-run QR binding; these # variables are optional overrides for automated deployment. # DSH_LARK_APP_ID= # DSH_LARK_APP_SECRET= # Feishu (default) or Lark international tenant. DSH_LARK_TENANT=feishu # Root directory for local state. Defaults to ~/.dsh-lark. # DSH_LARK_HOME= # Default working directory for new sessions. # DSH_LARK_WORKSPACE= # Optional DeepSeek Harness overrides. The CLI auto-discovers installed dsh # installations such as ~/.dsh/profiles/node_modules/@deepseek-ai/dsh. # Set these only when you need an explicit launcher or custom profile. # DSH_LARK_DSH_COMMAND= # DSH_LARK_DSH_ARGS= # Agent backend mode: sdk (default, official dsh-sdk-client), acp (approval # cards via ACP session/request_permission), headless (legacy fallback), or # web (drive the local dsh web agent as the single writer of every session). DSH_LARK_ADAPTER=sdk # Update reminder in `doctor`: 0 disables the npm latest-version probe. # DSH_LARK_UPGRADE_CHECK=1 # Bridge new-version check interval in ms (0 disables; default 6h). # DSH_LARK_UPGRADE_CHECK_INTERVAL_MS=21600000 # Push a Feishu notification when a newer version is found (default: log-only). # DSH_LARK_UPGRADE_NOTIFY=false # DSH_LARK_UPGRADE_NOTIFY_CHAT= # Provider/model route for the dsh agent. DSH_LARK_PROVIDER=deepseek-official DSH_LARK_MODEL=deepseek-v4-flash # Optional per-request output token cap for SDK-created agents. # DSH_LARK_MAX_TOKENS=49152 # web adapter: base URL of the local dsh web agent, and whether web-GUI turn # completions are pushed to Feishu with the chat mapping auto-switched (0 off). # DSH_LARK_WEB_URL=http://127.0.0.1:3080 # DSH_LARK_WEB_PUSH=1 # Security: reject DM traffic when no allowlist is configured (1) or keep the # onboarding-friendly open default (0). DSH_LARK_ACCESS_DEFAULT_DENY=0 # Reject message events older than this window (ms). 0 disables the check. DSH_LARK_EVENT_FRESHNESS_MS=600000 # Optional idle timeout for a single agent run, in milliseconds. A run is # stopped only after it has been silent (no streaming events / tool activity) # for this long; actively working runs are never cut short. DSH_LARK_RUN_TIMEOUT_MS=300000 # Grace period allowed after SIGTERM before SIGKILL, in milliseconds. DSH_LARK_STOP_GRACE_MS=5000 # Max agent runs allowed concurrently within one scope (chat/topic). # Default 2 lets PM / dev / docs roles work in parallel; set 1 for strictly # serial per-scope execution, or use /concurrency in chat to override. DSH_LARK_SCOPE_CONCURRENCY=2 # Installed as a dsh profile bundle: the plugin starts the bridge engine # in-process when the profile boots. Set this to 1 to keep the engine stopped # while the plugin stays loaded as a standard dsh plugin. # DSH_LARK_DISABLED=0 # Session / task archival: live messages kept per scope before overflow is # archived (0 keeps everything), max archives retained per scope, and the # max age of an archive in days (0 disables pruning). DSH_LARK_RETENTION_MSGS=40 DSH_LARK_ARCHIVE_MAX=50 DSH_LARK_ARCHIVE_MAX_AGE_DAYS=90 # Safety-net guardian (issue #6): a minimal process independent of dsh that # keeps the Feishu rescue entrance alive after dsh goes down. Installed by # default via `dsh-lark-bot setup` (or standalone `dsh-lark-bot guardian # install`); skip it with `dsh-lark-bot setup --no-guardian`. # Bridge engine heartbeat write interval (guardian liveness signal). DSH_LARK_HEARTBEAT_MS=5000 # Set to 1 to keep the guardian process stopped (service stays installed). # DSH_LARK_GUARDIAN_DISABLED=0 # dsh profile the guardian watches / relaunches. Persisted on install; the # env value is used as the default when no state file exists yet. # DSH_LARK_GUARDIAN_PROFILE=dsh-lark # Bridge state profile that provides the Feishu credentials and allowlists. # DSH_LARK_GUARDIAN_BRIDGE_PROFILE=default # Guardian watchdog poll interval and heartbeat staleness threshold. DSH_LARK_GUARDIAN_POLL_MS=2000 DSH_LARK_GUARDIAN_STALE_MS=15000 # If a dsh process survives but the bridge heartbeat stays stale for this # long, the engine is treated as dead and the guardian takes over. DSH_LARK_GUARDIAN_ENGINE_DEAD_MS=120000 # Safe-mode engine selection: `auto` tries the official SDK JSON-RPC runtime # first (real-time thinking / tool calls / typewriter text on the card) and # falls back to headless (final output only, but the card still shows live # activity/elapsed time) when provisioning fails; `sdk` requires the SDK # runtime; `headless` skips provisioning entirely. # DSH_LARK_GUARDIAN_SAFE_ADAPTER=auto # Safe-mode task idle timeout: the guardian stops the run and renders a # timeout card only after the task has been silent for this long. DSH_LARK_GUARDIAN_SAFE_TIMEOUT_MS=600000 # Card density for safe-mode run cards (compact | standard | detailed). # `detailed` shows reasoning, tool input/output and token usage. DSH_LARK_GUARDIAN_CARD_DENSITY=detailed # One-command upgrade (issue #10): npm registry used by `dsh-lark-bot upgrade` # to discover the latest published version. Defaults to the official npm # registry; set to a mirror when the default is unreachable from your network. # DSH_LARK_UPGRADE_REGISTRY=https://registry.npmjs.org