Skip to content

Commit 7a995d0

Browse files
committed
feat(subagent): single routing resolver with persisted binding provenance
Model selection for a new subagent lived in planSpawn() and in the config-section helper, and nothing recorded why a child was bound the way it was, so a resumed child that kept an older model looked like a bug. - resolveSubagentModelRoute() is the only authority that binds a model (inherit | default | pool | force, primary override, force rejects any explicit choice); resolveSubagentBinding() and the new SessionSubagentRoutingService both delegate to it. planSpawn() is a facade over the routing service and every plan carries RoutingProvenance: operation, profile/model source, policy mode and source, feature source, the ambient routingEnvironmentRevision and the request-level routeDecisionFingerprint. - SubagentBindingProvenance is persisted once on the child (durable agent event + replayable state key) when it is created from a plan. Resume reads it back: modelSource/profileSource become resume-existing, the original revision is kept, and the caller's current revision is reported alongside, never written into the child. - SubagentTaskInfo, the subagent.spawned event, REST /tasks, the WS roster and the session snapshot carry the provenance and the current revision; the protocol package and the web client map it into AppTask, DynamicWorkflowMember and the card rows. - The Dynamic Workflow result writes durable <subagent> attributes (profile, model, thinking, provenance ids, started_at, completed_at) through the attribute escaper; the web parser reads them and older results without them still parse.
1 parent 382154c commit 7a995d0

137 files changed

Lines changed: 2123 additions & 505 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@pymodel/pythinker-code": minor
3+
---
4+
5+
Subagent tasks and Dynamic Workflow results now record the profile, model, and routing source of each subagent, and a resumed subagent keeps the binding it was created with.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"sourceHash": "fd8373670e82925e4ab4b518d59498b2f1c18bfe495af7e88c946db7ce1e9b65",
2+
"sourceHash": "e91c68ea648ad04740fb566377c1367d8118619bee85841fd8d2e9877e6c3c1d",
33
"sourceFileCount": 405
44
}

apps/pythinker-code/dist-web/assets/CodeBlockNode-DXDu9S6c.js renamed to apps/pythinker-code/dist-web/assets/CodeBlockNode-B8tqGPGb.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/pythinker-code/dist-web/assets/DesignSystemView-qqwU00qB.js renamed to apps/pythinker-code/dist-web/assets/DesignSystemView-B-HZb7ZV.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/pythinker-code/dist-web/assets/Tooltip-CFlik3gJ.js renamed to apps/pythinker-code/dist-web/assets/Tooltip-Csd47GyG.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-YnqV4nF9.js renamed to apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-0hUdHyJx.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/pythinker-code/dist-web/assets/arc-BecLuNUa.js renamed to apps/pythinker-code/dist-web/assets/arc-4YKTmj7X.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/pythinker-code/dist-web/assets/architectureDiagram-5GKGNRK7-CbFJt4Ma.js renamed to apps/pythinker-code/dist-web/assets/architectureDiagram-5GKGNRK7-BM657Zyi.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)