mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-09-21 17:38:10 +00:00
- docs/zh/架构迁移评估.md: C ABI→子进程+共享内存完整迁移论证(1621行) - docs/zh/experiments/: 18项可复跑可行性实验(架构评估的所有数字来源) - plan.md §11: 11.1~11.9 插件架构缺陷修复清单(唯一权威编号) - main 保持干净,本批次为 update 特性分支的整改起点
13 lines
518 B
Go
13 lines
518 B
Go
//go:build ignore
|
|
package main
|
|
import ("bufio";"encoding/json";"os")
|
|
type Req struct{ ID int `json:"id"`; Method string `json:"method"`; Args json.RawMessage `json:"args"` }
|
|
type Res struct{ ID int `json:"id"`; Result string `json:"result"` }
|
|
func main(){
|
|
dec:=json.NewDecoder(bufio.NewReader(os.Stdin))
|
|
w:=bufio.NewWriter(os.Stdout); enc:=json.NewEncoder(w)
|
|
for { var q Req
|
|
if err:=dec.Decode(&q); err!=nil {return}
|
|
enc.Encode(Res{ID:q.ID, Result:`{"ok":true,"data":"` + string(q.Args) + `"}`}); w.Flush() }
|
|
}
|