Repository navigation
Replies: 3 comments
|
四条断言我逐条核了,全部成立,而且 master 上一处未改。但你的实现建议里有一个坑你没提到 —— 它会决定这个改动是"加一个可选字段"还是"一次有意的版本升级"。 1. 四条断言逐条成立(a)
/** One managed child execution and its result delivery policy. */
export interface SubagentActivationSpec {
…
/** Parent delivery notifies the model; caller delivery only returns the result. … */
readonly delivery: 'parent' | 'caller' // :43
}而 descriptor 的键集里没有它: (b)
delivery: inputs.delivery ?? 'parent', // :930descriptor 的 provider / model / effort / persona / toolFilter 都还原了,唯独 delivery 没有。你说的这个不对称,完全准确。 (c)
private notifySettlement(activation: Activation, terminal: SubagentResult): void {
if (!activation.announced || activation.delivery === 'caller') return(d) caller 只覆盖第一段驻留
你引的 README 也准: 2. ⭐ 你没提到的坑:descriptor 会拒绝未知字段这是我最想让你先知道的一条。 function assertKnownKeys(value, keys, path) {
const unknown = Object.keys(value).find(key => !keys.has(key))
if (unknown !== undefined) throw new Error(`persisted subagent descriptor ${path} has unknown field "${unknown}"`)
}调用点
⇒ 只把
而且代价是明确的: 3. 关于你引用的"按 persona / toolFilter 的方式持久化"方向对,但这三个字段不平权:
所以如果按你说的方式加,字段名与位置都还合理;但如果你愿意听一个建议:另一个正交方案是在同一次版本升级里加一个 4. 版本你写 顺带确认了你说的"由 activation 重构引入": 5. 短期 workaround 的一条提醒如果你要维持本地 patch,务必同时抬高 |
|
Thanks — the strict known-key validation and versioning cost are important points. I checked our local compatibility patch. It does not add the field to descriptor v3. It introduces a versioned durable policy named So our current implementation is closer to the orthogonal I have also added an explicit fresh-runtime regression: create a silent continuable child, let it settle, dispose the entire Context, boot a new Context against the same persistence root, resume the parent, cold-resume the child with another prompt, and verify that the child runs while the parent still receives no settlement notice. The focused patched continuation suite now passes 161/161. I agree that an upstream implementation should treat this as a deliberate descriptor version change and document that an older runtime will not resume children carrying the new descriptor version. |
|
After thinking through the consumer semantics, I would now prefer the orthogonal durable notice policy over persisting
Our actual Host use case is different: every activation's business result is delivered through a Host-owned channel, so the durable child must opt out of automatic parent settlement notices across resumes. A descriptor-versioned field such as I would therefore rank the options as:
The original observation remains valid either way: today |
Uh oh!
There was an error while loading. Please reload this page.
Version:
@deepseek-ai/dsh-subagent0.2.1-alpha.2 (introduced in the activation refactor,3d852a1cea/390fbe8852)Observation
SubagentActivationSpec.delivery: 'caller'suppresses the parent settlement notice (manager.ts,notifySettlement:if (!activation.announced || activation.delivery === 'caller') return). The choice is only held on the in-memoryActivation, though:provider / label / agentProvider / agentModel / agentReasoningEffort / persona / toolFilter, but notdelivery;coldResumecallsmaterializewithoutdelivery, which then defaults toinputs.delivery ?? 'parent'.A local continuable child naturally settles (and is released) whenever it goes idle with an empty inbox and no owned children. So for a long-lived child,
callercovers only the first residency. Every later turn, whether after a follow-up or a Host restart, settles with a notice to the parent.Upstream scenario
The README says completed local workflow children "remain discoverable and can be opened or continued". If a user continues such a child from the browser, the prompt goes
prompt → deliverToChild → coldResumeand the activation becomes'parent'. When that turn ends, a settlement notice is queued or steered into the session that ran the workflow, even though the workflow explicitly chosecallerfor this child. Is that intended?Host scenario
A host owns several continuable children whose results go to their real audience through a channel the host owns (a chat surface). The parent is a long-lived session a human is working in. After the first turn, every child settlement is steered into whatever turn that session is running.
Ask
Persist the delivery policy for local continuable children the same way
personaandtoolFilterare persisted: writedeliveryinto the descriptor when it is'caller', and restore it incoldResume. Absent the field, the behavior stays'parent', so existing children are unchanged.If the intent is instead that a resumed child has no caller and therefore must report to its parent, then a separate durable opt-out such as "notice: none", distinct from "who awaits the result", would serve the host scenario. Either answer would help; we're currently carrying a local patch that persists exactly this field.
All reactions