mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-09-22 18:08:04 +00:00
feat(cli): /runtime 接上(runtime 本就经 KernelStatus 对内部插件开放)
纠正上一轮的判断:runtime 不是“SDK 未暴露”。s.Status().GetKernelStatus() 里的 Scheduler / Residents / Channels / InputChannels 就是 WebUI /runtime 的数据源,内部插件同样拿得到——CLI 只是漏接了这条命令。 - CLI 插件新增 /runtime,输出与 GET /api/v1/runtime 同口径。 - waiter 侧 /runtime 在 local(发 CLI 插件)与 remote(走 REST)两条路都接上,/help 补齐。
This commit is contained in:
@ -46,6 +46,7 @@ Server commands (local 与 remote 行为一致):
|
||||
/adapters list loaded Lua adapters
|
||||
/adapters remove <name> remove a Lua adapter
|
||||
/network network status + LLM endpoints
|
||||
/runtime scheduler / residents / channel topology
|
||||
/agents list agents
|
||||
/chat <text> send to agent
|
||||
|
||||
@ -329,6 +330,15 @@ Any other text is sent to the agent directly.`)
|
||||
}
|
||||
return true
|
||||
|
||||
case cmd == "/runtime":
|
||||
if rc := state.RemoteConn(); rc != nil {
|
||||
d, _ := rc.DoAPI("GET", "/api/v1/runtime", "")
|
||||
printJSON(out, d)
|
||||
} else {
|
||||
state.Send("/runtime")
|
||||
}
|
||||
return true
|
||||
|
||||
case cmd == "/network":
|
||||
if rc := state.RemoteConn(); rc != nil {
|
||||
d, _ := rc.DoAPI("GET", "/api/v1/network", "")
|
||||
|
||||
Reference in New Issue
Block a user