$DSH_HOME/.env had just become an ordinary environment layer, which left the harness resolving user-facing values from a flattened process.env that could no longer say where a value came from. A key stored through the web page stayed shadowed by an older key in the user's own .env. An endpoint could be redirected by the project: the invoking directory's .env is materialized like every other layer, and a base URL decides where a resolved API key is sent, so a DEEPSEEK_BASE_URL written into a model-editable workspace would send the user's credential — and the prompts carrying their code — to whatever host that file named. Give every user-facing value one ordering, with four kinds of source: explicit for this run per-operation override, CLI argument > authored by deployment --config / --config-replace > this launch's shell inherited process environment > product-managed store settings.yaml, .credentials.yaml > discovered file $DSH_HOME/.env > defaults schema default, shipped base, public default The domains differ only in which tiers exist. The earlier split — credentials ranking the environment over the managed file while settings ranked over the environment — was inconsistent: the distinguishing fact is who authored the source, not the domain. packages/util/environment owns an immutable snapshot with per-layer provenance. getFrom(name, sources) searches only the layers a caller names, and omitting one is a refusal rather than a demotion: the adapters ask for ['process', 'user-env'], so no reordering can let a project file back into a decision it was excluded from. isBootstrapOnly rejects, before anything is materialized, any .env setting a variable that governs how a process launches (PATH, SHELL, NODE_OPTIONS, LD_PRELOAD), where code or model-visible instructions load from (the whole DSH_* namespace, HOME, XDG_*), or how the network is reached (proxy and CA variables). The namespace is denied wholesale so a switch added later cannot become settable by being forgotten, and there is no opt-out. verify-config-source-ownership keeps both rules: no unregistered process.env read under packages/*/*/src (26 allowlisted with reasons), and no apiKey, baseURL, or headers inlined from the environment in shipped Cordis config — removing those inlines is what makes the deployment tier meaningful.
88 lines
2.4 KiB
YAML
88 lines
2.4 KiB
YAML
# Unattended coding-agent deployment for the bundled dsh-jsonrpc-agent runtime.
|
|
# stdout is reserved for JSON-RPC; do not add a console logger or terminal UI.
|
|
|
|
- id: jsonrpc
|
|
name: '@deepseek-ai/dsh-jsonrpc'
|
|
config:
|
|
maxTokensAsSuccess: !!js "process.env.DSH_MAX_TOKENS_AS_SUCCESS === undefined ? true : JSON.parse(process.env.DSH_MAX_TOKENS_AS_SUCCESS)"
|
|
|
|
# The DeepSeek adapter. Shipped default: full thinking at max effort on every
|
|
# request; exact-model resolution materializes request defaults before logging.
|
|
# The model arrives per session over JSON-RPC, so it is not pinned here.
|
|
- id: llm-deepseek
|
|
name: '@deepseek-ai/dsh-llm-deepseek'
|
|
config:
|
|
thinking: enabled
|
|
reasoningEffort: max
|
|
|
|
# Managed child-process groups for the bash executor (spawn/kill/output plumbing).
|
|
- id: subprocess
|
|
name: '@deepseek-ai/dsh-subprocess-local'
|
|
|
|
- id: bash
|
|
name: '@deepseek-ai/dsh-bash-local'
|
|
config:
|
|
cwd: !!js process.env.DSH_CWD ?? process.cwd()
|
|
timeoutMs: 60000
|
|
|
|
- id: agent-spine
|
|
name: '@deepseek-ai/dsh-agent-spine-demo'
|
|
config:
|
|
persona: !!js process.env.DSH_SYSTEM_PROMPT ?? 'You are a coding agent.'
|
|
workspaceContext: false
|
|
skills:
|
|
enabled: false
|
|
toolBash:
|
|
enableRunInBackground: false
|
|
toolTasks: false
|
|
|
|
- id: sessions
|
|
name: '@deepseek-ai/dsh-session-persistence-jsonl'
|
|
config:
|
|
root: !!js process.env.DSH_SESSION_ROOT ?? './.sessions'
|
|
# Snapshot runs read the raw JSONL back; production keeps zstd frames.
|
|
compression: !!js "process.env.DSH_SNAPSHOT === undefined ? 'zstd' : 'none'"
|
|
|
|
- id: session-checkpoints
|
|
name: '@deepseek-ai/dsh-session-checkpoint-policy'
|
|
|
|
- id: subagent
|
|
name: '@deepseek-ai/dsh-subagent'
|
|
|
|
- id: subagent-spawn
|
|
name: '@deepseek-ai/dsh-subagent-spawn'
|
|
config:
|
|
providerName: spawn
|
|
|
|
- id: tool-subagent
|
|
name: '@deepseek-ai/dsh-tool-subagent'
|
|
config:
|
|
provider: spawn
|
|
toolName: subagent
|
|
enableRunInBackground: false
|
|
|
|
- id: tool-todo
|
|
name: '@deepseek-ai/dsh-tool-todo'
|
|
|
|
- id: fs-local
|
|
name: '@deepseek-ai/dsh-fs-local'
|
|
config:
|
|
cwd: !!js process.env.DSH_CWD ?? process.cwd()
|
|
|
|
- id: fs-policy
|
|
name: '@deepseek-ai/dsh-fs-policy'
|
|
|
|
- id: tool-fs
|
|
name: '@deepseek-ai/dsh-tool-fs'
|
|
|
|
- id: token-meter
|
|
name: '@deepseek-ai/dsh-token-meter'
|
|
|
|
- id: compact-basic
|
|
name: '@deepseek-ai/dsh-compact-basic'
|
|
config:
|
|
thresholdRatio: 0.8
|
|
retainRatio: 0.16
|
|
maxTokens: 8192
|
|
compactionRetries: 1
|