← Back to AI Insights
Gemini Executive Synthesis

Preset discovery and registration mechanism in DeepSeek Harness, specifically how shared module directories are handled.

Technical Positioning
The system aims for flexible preset management and modularity, but the current implementation creates friction for developers trying to organize shared components without exposing them as full presets.
SaaS Insight & Market Implications
This issue reveals a fundamental design flaw in DeepSeek Harness's preset discovery, where directories intended for shared modules are erroneously registered as selectable presets. The system's logic prioritizes the presence of agent.cordis.yml over preset.yml for registration, leading to 'empty-named' presets that clutter the UI and hinder modular development. This forces developers into unintuitive naming conventions to bypass the system, directly contradicting the 'directory name is preset ID' convention. Such behavior impedes developer workflow, complicates module organization, and indicates a lack of clear separation between shared components and deployable presets. A robust platform requires explicit mechanisms for module declaration versus preset registration, ensuring a clean, predictable developer experience.
Proprietary Technical Taxonomy
~/.dsh/.agent-presets/ preset.yml agent.cordis.yml empty-named preset shared modules preset selection list PRESET_ID scanRoot()

Raw Developer Origin & Technical Request

Source Icon GitHub Issue Aug 15, 2026
Repo: xiaobright/dsh-anchored-standard
[Issue] .agent-presets 下无 preset.yml 的目录仍被注册为空名预设

## 概述(Summary)

在 `~/.dsh/.agent-presets/` 下放置一个**仅作共享模块用途**的目录(内含 `agent.cordis.yml`
与若干 `.mjs` 插件模块,但**没有** `preset.yml`)时,该目录仍会被注册为一个**空名预设**,
出现在新建会话的预设选择列表里。删掉 `preset.yml` **不能**取消注册。

## 环境(Environment)

| 项 | 值 |
|---|---|
| DSH | `0.1.0-rc.6`(`@deepseek-ai/dsh` 全局安装) |
| 相关包 | `@deepseek-ai/dsh-agent-presets` `0.1.0-rc.6`(随 DSH 分发,bundled) |
| OS | Windows 11 |
| Node | v24.14.0 |

## 复现步骤(Steps to Reproduce)

1. 在 `$DSH_HOME/.agent-presets/` 下创建目录 `preset/`(目录名匹配
`PRESET_ID = /^[a-z0-9][a-z0-9-]*$/`)。
2. 目录内放置 `agent.cordis.yml`(合法组合文件)及若干 `.mjs` 插件模块;
**不放** `preset.yml`。
3. 重启 DSH(或依赖热加载)后新建空白会话,查看预设选择列表。
4. 观察:列表中出现一个**显示名为空**的预设选项(其 id 为目录名 `preset`),
且可被选择、可挂载。

## 预期行为(Expected Behavior)

- 没有 `preset.yml` 的目录**不应**注册为可选预设——否则无法用
「共享模块目录 + 相对引用」的方式组织多个预设共用的插件模块,而不污染预设列表;
- 或者:文档明确说明 `preset.yml` 缺失时目录**仍会注册**(只是显示名缺失),
并提供官方的「声明为共享模块、不注册」机制。

## 实际行为(Actual Behavior)

- 目录被注册为预设;`preset.yml` 缺失时显示名为空,仅 id(目录名)可用。
- 现可行的变通方式:目录名必须包含 `PRESET_ID` 正则之外的字符
(如 `preset.modules`,含点号)才能被 `scanRoot` 跳过。该方式依赖目录名
与正则的巧合,不直观、易踩坑,且与「目录名即预设 id」的约定相悖。

## 根因分析(Root Cause)

`lib/types/discovery.js` 的 `scanRoot()` 判定逻辑:

- 目录成为候选的**唯一条件**:`child.isDirectory()` 且 `PRESET_ID.test(child.name)`
(`lib/types/preset.js` 中 `PRESET_ID = /^[a-z0-9][a-z0-9-]*$/`)。
- 注册为预设的**充要条件**:目录内存在 `agent.cordis.yml`(`COMPOSITION_FILE`)
且可加载(`compositionProblem()` 通过)。
- `preset.yml`(`METADATA_FILE`)只是**可选元数据**,提供显示名/描述/排序;
缺失时**不阻止注册**,仅导致显示名为空。

相关源码注释亦确认:目录组成缺失/损坏时是「broken r...

Developer Debate & Comments

No active discussions extracted for this entry yet.

Adjacent Repository Pain Points

Other highly discussed features and pain points extracted from xiaobright/dsh-anchored-standard.

Extracted Positioning
Clarification on the scope of 'minimal mode' and 'full tools' in dsh-anchored-standard's two-phase reasoning.
The dsh-anchored-standard preset is defined by its 'two-phase' approach: 'Minimal-aligned bootstrap, then full Standard tools.' The user seeks clarity on when this transition occurs.
Top Replies
byte-pan • Aug 15, 2026
如果是这样的话,那么长链路来说不是还跟原本的一样吗,如果我浪费掉了第一轮
AHCzyz • Aug 15, 2026
应该是session。AI是没有记忆的,所谓上下文窗口是把每次agent全部记录发回去的(所以缓存才有用),也就是session的首token不会变。不过可能压缩后会受到影响,maybe得把压缩工具也优化下,固定保留首次工具调用...
0liveiraaa • Aug 16, 2026
第一次回复后,tool顶层字段会被注入全量工具,此后的ssession都将共享完整工具,具体方式请参考dsh相关代码实现,感谢您的疑问
Extracted Positioning
Persistent reasoning chain behavior in dsh-anchored-standard across multi-turn conversations.
The 'anchored standard' mode is designed for a 'minimal-aligned bootstrap, then full Standard tools,' implying a sustained advanced reasoning state. The issue questions if this state is maintained.
Top Replies
tyuuu-ux • Aug 15, 2026
经检查,后续出现let me思维链的对话,满足
lscatfish • Aug 15, 2026
请问一下最后输出的效果怎么样,我也遇到过相似的情况,但是最后的效果似乎没有退化
0liveiraaa • Aug 16, 2026
已有类似issue,会在之后的版本中解决,感谢反馈
Extracted Positioning
Proposal for a dsh-anchored-code preset, integrating PTC mode's run_code tool with advanced reasoning chains.
The dsh-anchored-standard preset aims for 'minimal-aligned bootstrap, then full Standard tools.' This proposal extends that concept to specialized code execution, leveraging token efficiency.
Extracted Positioning
The core mechanism of 'anchoring' (achieving desired reasoning chain) in dsh-anchored-standard, specifically the interplay of maxTokens, adapterDefaults, and tool schema.
The dsh-anchored-standard preset aims for a 'minimal-aligned bootstrap, then full Standard tools.' This issue dissects why anchoring fails and identifies tool schema as the critical variable.
Extracted Positioning
Optimizing prompt injection strategy for dsh-anchored-standard to ensure consistent reasoning chains and prevent degradation.
The dsh-anchored-standard preset aims for a 'minimal-aligned bootstrap, then full Standard tools.' This issue proposes a method to achieve a 'pristine' first-round experience, ensuring the desired reasoning style.

Frequently Asked Questions

Market intelligence mapped to Preset discovery and registration mechanism in DeepSeek Harness, specifically how shared module directories are handled..

What is the technical positioning of Preset discovery and registration mechanism in DeepSeek Harness, specifically how shared module directories are handled.?
Based on our AI analysis of the original developer request, its primary technical positioning is: The system aims for flexible preset management and modularity, but the current implementation creates friction for developers trying to organize shared components without exposing them as full presets.
How is the developer community reacting to Preset discovery and registration mechanism in DeepSeek Harness, specifically how shared module directories are handled.?
Yes, we have tracked 1 direct responses and active debates regarding this specific topic originating from GitHub Issue.
Which technical concepts are associated with Preset discovery and registration mechanism in DeepSeek Harness, specifically how shared module directories are handled.?
Our proprietary extraction maps Preset discovery and registration mechanism in DeepSeek Harness, specifically how shared module directories are handled. to adjacent architectural concepts including ~/.dsh/.agent-presets/, preset.yml, agent.cordis.yml, empty-named preset.

Engagement Signals

1
Replies
open
Issue Status

Cross-Market Term Frequency

Quantifies the cross-market adoption of foundational terms like ~/.dsh/.agent-presets/ and preset.yml by tracking occurrence frequency across active SaaS architectures and enterprise developer debates.