feat: add remote config and host metadata
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user