mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
feat(agent): add TargetAgentID to SubTurnConfig for cross-agent delegation
When TargetAgentID is set, spawnSubTurn resolves the target AgentInstance from the registry and uses it as the base for the child turn. This gives the child turn the target's workspace, model, tools, and system prompt instead of inheriting from the caller. Model validation is relaxed: empty Model is accepted when TargetAgentID provides the model implicitly via the resolved agent instance. Ref: #2148
This commit is contained in:
@@ -30,6 +30,7 @@ type SubTurnConfig struct {
|
||||
ActualSystemPrompt string
|
||||
InitialMessages []providers.Message
|
||||
InitialTokenBudget *atomic.Int64 // Shared token budget for team members; nil if no budget
|
||||
TargetAgentID string // If set, run as this agent (its workspace, model, tools)
|
||||
}
|
||||
|
||||
type SubagentTask struct {
|
||||
|
||||
Reference in New Issue
Block a user