dsh-tool-subagent-report/packages/subagent/tool-subagent-report官方

175.3kStar19.0kFork0Issue752Watching

为子代理提供返回父代理的报告通道,子代理完成任务时可向启动它的Agent发送结果,适用于需要子代理向上级汇报进度的多代理协作场景

机审证据安装命令仓库已核验dsh-plugin Topic许可证READMEAI 百科

此插件是大仓库 deepseek-ai/deepseek-harness 的子包,星数与活跃度统计的是整个仓库。

语言
TypeScript
License
MIT
分支
master
ai-agentscordisdshdsh-plugin

安装

$ dsh plugin --profile web add npm:@deepseek-ai/dsh-tool-subagent-report

在终端中运行以上命令,通过 dsh CLI 安装此插件。可在右上角切换 Profile。 第一次用 dsh?看这篇新手教程

对话式安装

帮我安装 DeepSeek Harness 插件 deepseek-ai/deepseek-harness/packages/subagent/tool-subagent-report:先查看仓库 https://github.com/deepseek-ai/deepseek-harness 确认安全性,然后执行安装命令并验证插件加载成功。

把这段指令粘贴给 DSH Web GUI 里的助手,由它代你完成安装与验证。

English | 中文

The optional child-scoped report tool is a thin adapter over ctx.subagents.reportFrom(). It gives every continuable in-process child a return channel to the Agent that started it, and installs the prompt section that instructs the child to use it. The package registers a continuable-child setup contribution instead of a global tool, so the tool and its guidance exist only inside those children. Roots, one-shot subagents, remote subagent providers, sibling scopes, and agentless tool execution never present or execute it. Installing this package grants only that child-scoped capability; the parent-to-child direction remains the independent @deepseek-ai/dsh-tool-subagent-control, and continuable mode depends on neither package.

The child-scoped tool:report prompt section instructs the child to call report once before finishing, with a self-contained answer, and earlier whenever a partial finding changes what the parent should do next. The instruction is guidance, not enforcement: the mechanism still accepts zero or many calls in one turn, and no runtime path rejects a child that never reports. A successful call neither concludes the turn, settles the Activation, nor prevents later parent follow-ups, and finishing a turn never reports automatically. The tool accepts no recipient: exec.agent is the sender's exact live Agent and the authority credential, and the service derives the sole recipient from that child's durable parentSession. Success returns the stable MessageId of the parent-accepted message, not a read receipt, an inbox-occurrence id, a parent-log acknowledgement, a turn-completion receipt, or a persistence flush. A parent absent from the registry fails the call with direct parent is not live; report was not delivered — registry presence governs parent resolution, and a registered parent already in host-owned disposal still accepts while its log admits appends. The service performs no injection, parent cold resume, or offline mailbox write; the durable child transcript remains the recovery source, and a failed tool call does not prove non-delivery (a later tools/post-execute veto can fail a call whose report was already accepted).

reportDelivery selects parent scheduling for every accepted report. next-step (the default) uses parent.steer(): a running parent receives the report at its nearest safe step boundary, while an idle parent starts a turn. Reports accepted in sequence share the next-step FIFO, including the later manager-authored settlement notice, so the parent cannot observe settlement before an earlier report; reports waiting together enter one claimed batch. quiet uses parent.inject(), adding the same next-step context without waking a parked parent. This is deployment scheduling policy, so the model-facing schema cannot select or override it per call.

Scope-local registration deliberately survives the child's global toolFilter, so a delegation allow-list cannot remove the only return channel. A deployment that requires a child with no return channel omits this package.

The contribution body is exported as installReportTool(childCtx, ctx, delivery) so inspection consumers can install report and its guidance into a minted child scope, and returns the one disposer revoking both. The generated tool catalog uses that path because the global registry cannot expose a scope-local schema. Production composition still enters through apply(); the subagent seam's contribution registry remains private.

Model Experience

Tool schema

What the model sees

The generated report schema: one required output string. Its description states that the child must report once before finishing, that reporting reaches only the Agent that started the child, and that it does not end the turn. It carries no recipient or delivery-mode parameter. The separate tool:report prompt section repeats the obligation outside the schema, where a child that ignores tool descriptions still reads it.

Token effect

Fixed schema and prompt-section cost per continuable-child request, and none in any other Agent's requests.

KV Cache effect

Prefix-stable within a child; neither the schema nor the section changes at runtime. Removing the package revokes both from resident children, which changes their next request prefix.

Report result

What the model sees

report accepted by the agent that started you as message <messageId> on acceptance; the canonical output carries the stable messageId. A failure from an unauthorized sender, an unavailable parent, or a closing lifecycle is an errored result. The description says a failed call may still have arrived because a later tools/post-execute failure can replace the result after reportFrom() accepted the message.

Token effect

One short acknowledgement per call in the reporting child. The reported content is additionally billed to the parent: next-step delivery joins the next request in an open parent turn or starts a turn for an idle parent, while quiet delivery waits for another input to wake the parent.

KV Cache effect

Append-only in the child. In the parent, the framed report follows existing history and preserves the reusable prefix.

Parent-visible report

What the model sees

One user-role parent message framed as Background subagent <child-id> reported: followed by the child's exact output, with a durable source { kind: 'subagent-report', senderSessionId: <child-id> } that names the child.

Token effect

The child's complete output plus the one-line frame, uncapped by this package.

KV Cache effect

Append-only; the report follows the parent's reusable request prefix. Next-step delivery wakes the parent and may extend its open turn, while quiet delivery does not wake it.

Known Limitations and Deferred Work

  • A parent whose host-owned disposal already started can still acceptAgentHandle.dispose() cancels, awaits quiescence, and only then unwinds the scope and leaves the registry; it exposes no signal for "disposal started." A report accepted in that window is appended to the parent's transcript, but that parent will not act on it in this process. A continuation-manager-owned parent rejects forest teardown through the manager's admission boundary.
  • Acceptance is weaker than durable delivery — there is no durable mailbox, idempotency key, delivery receipt, retry protocol, or exactly-once claim. A process failure after one side recorded acceptance leaves the outcome ambiguous, and an external retry may duplicate the report.
  • A staged quiet report is not immediately reconstructable — acceptance returns its stable MessageId, but the parent Session reconstructs the framed content only after pending context reaches its ordinary log boundary.
  • Granting waits for the next Activation; revocation is immediate — installing this package after a child becomes resident grants report and its guidance only on that child's next Activation, while removing the package revokes both from resident children immediately.
  • Nested reporting reaches exactly one edge upward — a grandchild reports to its direct child parent, never to the top-level coordinator, which must explicitly report a derived update later.
  • No rate limiting — the default next-step mode can amplify model work when nested children report frequently, although reports waiting together share one step; a deployment that accepts unread reports over that amplification selects quiet.

收录徽章

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/deepseek-ai/deepseek-harness/packages/subagent/tool-subagent-report)

把这段 markdown 粘贴到你的 GitHub README,链接回本插件详情页。徽章只声明已被本站收录,不代表安全认证。

返回插件目录