feat: add remote config and host metadata

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-02 14:27:39 +08:00
parent 1e7efd9c3b
commit 1e33bfa4bc
4 changed files with 99 additions and 3 deletions
+13 -1
View File
@@ -12,6 +12,7 @@ type Config struct {
Events Events `toml:"events"`
Notify Notify `toml:"notify"`
Inbox Inbox `toml:"inbox"`
Remote Remote `toml:"remote"`
}
type Events struct {
@@ -38,6 +39,13 @@ type Inbox struct {
TimeoutMS int `toml:"timeout_ms"`
}
type Remote struct {
Enabled bool `toml:"enabled"`
URL string `toml:"url"`
Token string `toml:"token"`
TimeoutMS int `toml:"timeout_ms"`
}
func Default() Config {
return Config{
Events: Events{Stop: true, Response: true, Idle: false, Tool: false},
@@ -49,13 +57,17 @@ func Default() Config {
BodyTool: "工具执行完成",
},
Inbox: Inbox{
Enabled: true,
Enabled: false,
Socket: DefaultInboxSocket(),
RemoteSocket: DefaultInboxRemoteSocket(),
Addr: "127.0.0.1:17777",
FallbackLocal: true,
TimeoutMS: 500,
},
Remote: Remote{
Enabled: false,
TimeoutMS: 2000,
},
}
}