Commit 7a995d0
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
- .changeset
- apps
- pythinker-code/dist-web
- assets
- pythinker-web
- src
- api
- daemon
- composables
- lib
- test
- packages
- agent-core-v2
- docs
- src
- agent/tools/agent
- features/dynamic_workflow
- session
- tools/agent-dynamic_workflow
- session/subagent
- test
- features/dynamic_workflow
- session/subagent
- state
- tool
- agent-gateway
- src
- protocol
- routes
- transport/ws/v1
- test
- protocol/src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments