// devicemesh.go: pure data type for "call a device mesh tool" actions. // // The runtime decides which agent has which tool registry (user vs sudo). // The decision layer only describes *what* to call; the runner in // shell/effects/ resolves the registry and dispatches. package decision // DeviceMeshAction describes an invocation of a registered devicemesh tool. // It is a pure value — no client, no registry, just the name + input. // // Fields: // // - Tool: the registered tool name in the agent's devicemesh.ToolRegistry // (ex "exec", "fs.read", "fs.write"). // - Input: LLM-supplied arguments. Will be validated by the registry // before reaching the network. // - ResultKey: optional. The runtime stores the tool result under this key // in the conversation state so the LLM can refer to it later. Empty // string means "do not store, just send back as a tool message". type DeviceMeshAction struct { Tool string Input map[string]any ResultKey string }