DSH / Atlas
2026-10-25implementedbug-fix

Shared preset delegation tools

预设共享委派工具

Agents sharing a preset need the same delegation definitions immediately after a preset switch. Installing identical tools separately for each Agent introduces an asynchronous visibility gap and places those definitions in the Agent's own registration layer, which is exempt from inherited-tool restrictions.

English

Problem

Agents sharing a preset need the same delegation definitions immediately after a preset switch. Installing identical tools separately for each Agent introduces an asynchronous visibility gap and places those definitions in the Agent's own registration layer, which is exempt from inherited-tool restrictions.

Decision

Each tool-subagent instance registers its definition in its owning composition. Agents sharing a preset revision inherit that registration. Switching presets changes ancestry; it requires no per-Agent installation or tool-change reconciliation. Provider availability and the owning composition's disposal control registration lifetime.

Tool configuration validates its own fields, allowlist consistency, required services and provider capabilities. Candidate preset documents are not read during registration, for either Host-mounted or preset-mounted tools. The delegation executor validates the model's selection against the allowlist; child startup resolves the selected id against the current registry. A later declaration can therefore satisfy a previously unavailable target without reinstalling the tool. Independent selection and restoration retain the spawn preset semantics.

The schema contains preset ids and default or inheritance guidance without candidate descriptions. This keeps shared definitions independent of other presets' declaration order and avoids retaining document text that can become stale. Awaited Agent initialization remains necessary for other asynchronous contributions.

Alternatives considered

Reinstall tools for each Agent. Identical definitions gain extra installation, disposal and reconciliation work, and Agent-local ownership prevents inherited-tool restrictions from applying.

Validate every target at tool registration. A target declared later is rejected even though it can be available when used. An early successful lookup also cannot guarantee availability after registry changes.

Retain candidate descriptions in shared schemas. Reading descriptions during registration makes the result depend on declaration order. Keeping those descriptions current requires additional update coordination; the tool exposes ids instead.

Consequences

Unknown or unloadable targets fail the selected delegation without leaving a child Agent or Session. An unused invalid reference remains undetected. Agent restrictions and restored historical filters apply to inherited delegation schemas, execution and guidance; sibling Agents retain their tools.

Focused preset-selection tests cover immediate switch visibility, shared ownership and disposal, restrictions, missing targets and retry after declaration. The Web Loader cases cover shipped composition compatibility, and the headless preset snapshot pins model-visible choices. The historical-filter tests exercise child composition directly; they do not establish cold-resume coverage.

中文

问题

共享预设的 Agent(智能体)需要在预设切换完成后立即取得相同的委派定义。为每个 Agent 分别安装相同工具会产生异步可见性缺口,并将定义放在 Agent 自身的注册层,而该层不受继承工具限制约束。

决策

每个 tool-subagent 实例在所属组装中注册定义。共享同一预设代际的 Agent 继承该注册。切换预设只改变祖先关系,无须按 Agent 安装或协调工具变更。提供方可用性及所属组装的 dispose(资源释放)决定注册的生命周期。

工具配置校验自身字段、白名单一致性、必需服务及提供方能力。Host 挂载和预设内挂载的工具都不在注册时读取候选预设文档。委派执行器按白名单校验模型选择,子级启动时再从当前注册表解析所选 id。因此,后续声明能够使原先不可用的目标变得可用,无须重新安装工具。独立选择与恢复保留 spawn 预设语义。

schema 包含预设 id 及默认或继承提示,不包含候选描述。这使共享定义不依赖其他预设的声明顺序,也避免保留可能陈旧的文档文本。其他异步贡献仍需要等待 Agent 初始化。

考虑过的替代方案

为每个 Agent 重新安装工具。 相同定义需要额外的安装、释放与协调工作,Agent 本地所有权还会阻止继承工具限制生效。

在工具注册时校验所有目标。 后声明的目标即使在使用时可用,也会被拒绝。提前查找成功同样无法保证注册表变更后的可用性。

在共享 schema 中保留候选描述。 注册时读取描述会使结果依赖声明顺序。保持描述同步需要额外的更新协调;工具选择公开 id。

后果

未知或无法加载的目标会使选中它的委派失败,不残留子 Agent 或 Session。未使用的无效引用仍不会被发现。Agent 限制及恢复的历史过滤器约束继承的委派 schema、执行与指导文本;同级 Agent 保留各自的工具。

针对性预设选择测试覆盖切换完成时的即时可见性、共享所有权与释放、限制、缺失目标及补声明后重试。Web Loader 用例覆盖 shipped 组装兼容性,headless 预设快照固定模型可见选项。历史过滤器测试直接执行子级组装,不证明冷恢复覆盖。