feat: add POST /openclaw endpoint and enrich heartbeats with OpenClaw metadata
- Bridge server now accepts POST /openclaw from OpenClaw plugin - OpenClawMeta struct stores version, plugin_version, and agents - Heartbeat sendOnce() enriches payload with plugin metadata when available - Telemetry Payload adds optional openclaw_version field - README updated to document /openclaw endpoint and metadata enrichment - All communication remains optional — Monitor functions without plugin data
This commit is contained in:
@@ -73,6 +73,19 @@ func main() {
|
||||
// Update bridge with latest telemetry
|
||||
if bridgeSrv != nil {
|
||||
bridgeSrv.UpdatePayload(payload)
|
||||
|
||||
// Enrich payload with OpenClaw metadata if available
|
||||
if meta := bridgeSrv.GetOpenClawMeta(); meta != nil {
|
||||
if meta.Version != "" {
|
||||
payload.OpenClawVersion = meta.Version
|
||||
}
|
||||
if meta.PluginVersion != "" {
|
||||
payload.PluginVersion = meta.PluginVersion
|
||||
}
|
||||
if len(meta.Agents) > 0 {
|
||||
payload.Agents = meta.Agents
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if printPayload || dryRun {
|
||||
|
||||
Reference in New Issue
Block a user