add child-model agent_task flow with node model capability and stricter device contracts

This commit is contained in:
DBT
2026-02-25 01:37:52 +00:00
parent a21237c1e4
commit 50a515af60
8 changed files with 29 additions and 5 deletions

View File

@@ -137,6 +137,8 @@ func (m *Manager) SupportsAction(nodeID, action string) bool {
switch action {
case "run":
return n.Capabilities.Run
case "agent_task":
return n.Capabilities.Model
case "camera_snap", "camera_clip":
return n.Capabilities.Camera
case "screen_record", "screen_snapshot":
@@ -162,6 +164,10 @@ func (m *Manager) PickFor(action string) (NodeInfo, bool) {
if n.Capabilities.Run {
return n, true
}
case "agent_task":
if n.Capabilities.Model {
return n, true
}
case "camera_snap", "camera_clip":
if n.Capabilities.Camera {
return n, true

View File

@@ -75,6 +75,8 @@ func actionHTTPPath(action string) string {
return "/run"
case "invoke":
return "/invoke"
case "agent_task":
return "/agent/task"
case "camera_snap":
return "/camera/snap"
case "camera_clip":

View File

@@ -6,6 +6,7 @@ import "time"
type Capabilities struct {
Run bool `json:"run"`
Invoke bool `json:"invoke"`
Model bool `json:"model"`
Camera bool `json:"camera"`
Screen bool `json:"screen"`
Location bool `json:"location"`
@@ -23,6 +24,7 @@ type NodeInfo struct {
Token string `json:"token,omitempty"`
Capabilities Capabilities `json:"capabilities"`
Actions []string `json:"actions,omitempty"`
Models []string `json:"models,omitempty"`
RegisteredAt time.Time `json:"registered_at,omitempty"`
LastSeenAt time.Time `json:"last_seen_at"`
Online bool `json:"online"`
@@ -32,6 +34,8 @@ type NodeInfo struct {
type Request struct {
Action string `json:"action"`
Node string `json:"node,omitempty"`
Task string `json:"task,omitempty"`
Model string `json:"model,omitempty"`
Args map[string]interface{} `json:"args,omitempty"`
}