Files
deepseek-harness/packages/subagent/README.zh.md
Tianyi Cui 34aabc4183 test(sdk): snapshot suite over the SDK path; docs for the SDK stack
- examples/jsonrpc-agent gains its first snapshot suite (sdk.snapshot.ts):
  the real dsh-jsonrpc-agent runtime driven through the real dsh-sdk-client,
  keyless llm-replay behind a new cordis.snapshot.yml overlay; three recorded
  scenarios (text turn, bash tool, spawn subagent) pin the notification
  stream, the SDK turn result, and the persisted parent+child session logs.
- Bilingual READMEs for dsh-sdk-protocol / dsh-sdk-client / dsh-subagent-sdk;
  sdk/ and subagent/ group tables extended; dsh-jsonrpc README points at the
  extracted protocol package; Agent Note (en+zh) owns the decision.
- The proposed make-jsonrpc-directional note is updated for the transport's
  new home and its second (client) consumer.
- Model Experience sentence allowlist entries for the two client-side
  packages; module graph + config catalog regenerated; i18n pairings
  recorded. doc-sync passes 24/24.
2026-07-27 04:37:23 +08:00

2.3 KiB
Raw Blame History

subagent/subagent 能力族

English | 中文

subagent seam 允许 agent智能体把工作委派给子 agent。与 bashllm 能力族一样,这也是一种能力 seam能力 seam),但有一个关键差异:多个提供方实现在同一上下文中共存,并按名称注册,而不是采用 bash 的单实现形态。该注册表仿照 LLM大语言模型适配器注册表。

角色 ctx 键
subagent/ 抽象 subagent seam具名提供方注册表与词汇 ctx.subagents
subagent-inprocess/ 共享进程内运行驱动器(不提供提供方;每次运行使用一个清理 effect
subagent-spawn/ 进程内后端:全新的子 agent (注册到 ctx.subagents
subagent-fork/ 进程内后端:以父 agent 已完成轮次的前缀作为初始内容的子 agent (注册到 ctx.subagents
subagent-subprocess/ 共享进程外机制环境变量清理、dispose资源释放阶梯、cwd 解析、隔离配置目录(纯库;不注册任何内容)
subagent-acp/ 进程外后端:在派生子进程中运行并通过 ACPAgent Client Protocol驱动的子 agent (注册到 ctx.subagents
subagent-sdk/ 进程外后端:在派生子进程中运行的子 harness 运行时,经 TypeScript SDK 客户端走 stdio JSON-RPC 驱动 (注册到 ctx.subagents
tool-subagent/ 面向模型的 subagent 委派工具,基于 ctx.subagents (注册到 ctx.tools

接口位于 subagent/subagent/。进程内 subagent-spawn / subagent-fork 后端共享 subagent-inprocess 驱动器(一个自身不提供提供方的库:两者都依赖它,彼此不依赖),进程外 subagent-acp / subagent-sdk 后端则构建于 subagent-subprocess 库之上凭据环境变量清理、dispose 阶梯、子进程 cwd 解析、隔离配置目录)。测试只用包内 fixture测试前置数据替换子 agent 边界。

提案与设计理由见 .agents/notes/implemented/feature/2026-06-21-subagent-capability-seam.md