feat: stabilize HarborForge monitor sidecar plugin #2

Merged
hzhang merged 10 commits from feat/telemetry-sidecar-v2 into main 2026-03-20 09:18:37 +00:00
Owner

Summary

  • switch plugin to OpenClaw api.pluginConfig / api.config style like dirigent
  • fix gateway lifecycle hooks to gateway_start / gateway_stop
  • fix installed telemetry path resolution
  • report openclaw_version and plugin_version separately
  • read agents from openclaw agents list --json with fallback discovery
  • clean docs to API key-only flow

Validation

  • plugin builds successfully
  • reinstalled on t1
  • sidecar starts with gateway
  • telemetry reaches backend on t1 real environment
## Summary - switch plugin to OpenClaw `api.pluginConfig` / `api.config` style like dirigent - fix gateway lifecycle hooks to `gateway_start` / `gateway_stop` - fix installed telemetry path resolution - report `openclaw_version` and `plugin_version` separately - read agents from `openclaw agents list --json` with fallback discovery - clean docs to API key-only flow ## Validation - plugin builds successfully - reinstalled on t1 - sidecar starts with gateway - telemetry reaches backend on t1 real environment
zhi added 10 commits 2026-03-20 09:16:03 +00:00
- Update openclaw.plugin.json: replace challengeUuid with apiKey (optional)
- Fix tsconfig: use CommonJS module to avoid import.meta.url issues
- Fix plugin/index.ts: remove ESM-specific code, use __dirname
- Fix telemetry.mjs:
  - Add loadavg to os imports, remove require() call
  - Replace challengeUuid with apiKey in config
  - Update endpoint to heartbeat-v2
  - Add X-API-Key header when apiKey is configured
  - Fix payload field names: agents, load_avg (array), uptime_seconds
  - Change missing apiKey from error to warning
- Resolve telemetry.mjs relative to installed plugin root
- Update installer messaging from challengeUuid to apiKey
- Document correct OpenClaw plugin entry config structure
- Accept flat config, nested entry.config, or missing config
- Treat plugin as enabled unless explicitly disabled
- Log resolved runtime config for gateway diagnostics
- Mirror dirigent plugin registration pattern
- Read base config from api.pluginConfig
- Read live config from api.config.plugins.entries.harborforge-monitor.config
- Support gateway_start/gateway_stop lifecycle only
- Compile nested plugin/core files
- Report remote OpenClaw CLI version as openclaw_version
- Report harborforge-monitor plugin version as plugin_version
- Pass plugin version from plugin runtime to sidecar
- Read live config via api.pluginConfig/api.config helper
- Fallback to agent directory discovery when agents.json is absent
- Count configured agent workspaces (excluding main)
- Rewrite plugin docs to API key-only flow
{
    "id": "main",
    "identityName": "霓光 (Neon)",
    "identityEmoji": "",
    "identitySource": "identity",
    "workspace": "/root/.openclaw/workspace",
    "agentDir": "/root/.openclaw/agents/main/agent",
    "model": "minimax-portal/MiniMax-M2.5",
    "bindings": 1,
    "isDefault": true,
    "routes": [
      "default (no explicit rules)"
    ]
  },
  {
    "id": "developer",
    "name": "developer",
    "identityName": "小智 (Zhi)",
    "identityEmoji": "👋",
    "identitySource": "identity",
    "workspace": "/root/.openclaw/workspace/workspace-developer",
    "agentDir": "/root/.openclaw/agents/developer/agent",
    "model": "anthropic/claude-opus-4-6",
    "bindings": 1,
    "isDefault": false
  },
  {
    "id": "dispatcher",
    "name": "dispatcher",
    "workspace": "/root/.openclaw/workspace/workspace-dispatcher",
    "agentDir": "/root/.openclaw/agents/dispatcher/agent",
    "model": "minimax-portal/MiniMax-M2.5",
    "bindings": 0,
    "isDefault": false
  },
  {
    "id": "operator",
    "name": "operator",
    "identityName": "晨曦 (Orion)",
    "identityEmoji": "",
    "identitySource": "identity",
    "workspace": "/root/.openclaw/workspace/workspace-operator",
    "agentDir": "/root/.openclaw/agents/operator/agent",
    "model": "openai-codex/gpt-5.2-codex",
    "bindings": 1,
    "isDefault": false
  },
  {
    "id": "manager",
    "name": "manager",
    "identityName": "指南(Nav)",
    "identityEmoji": "🧭",
    "identitySource": "identity",
    "workspace": "/root/.openclaw/workspace/workspace-manager",
    "agentDir": "/root/.openclaw/agents/manager/agent",
    "model": "openai-codex/gpt-5.2-codex",
    "bindings": 1,
    "isDefault": false
  },
  {
    "id": "mentor",
    "name": "mentor",
    "identityName": "霖 (Lyn)",
    "identityEmoji": "🪶",
    "identitySource": "identity",
    "workspace": "/root/.openclaw/workspace/workspace-mentor",
    "agentDir": "/root/.openclaw/agents/mentor/agent",
    "model": "minimax-portal/MiniMax-M2.1",
    "bindings": 1,
    "isDefault": false
  },
  {
    "id": "recruiter",
    "name": "recruiter",
    "identityName": "沐川(Evan)",
    "identityEmoji": "🧩",
    "identitySource": "identity",
    "workspace": "/root/.openclaw/workspace/workspace-recruiter",
    "agentDir": "/root/.openclaw/agents/recruiter/agent",
    "model": "minimax-portal/MiniMax-M2.5",
    "bindings": 0,
    "isDefault": false
  },
  {
    "id": "administrative-secretary",
    "name": "administrative-secretary",
    "identityName": "映秘(Mirror)",
    "identityEmoji": "🪞",
    "identitySource": "identity",
    "workspace": "/root/.openclaw/workspace/workspace-administrative-secretary",
    "agentDir": "/root/.openclaw/agents/administrative-secretary/agent",
    "model": "minimax-portal/MiniMax-M2.5",
    "bindings": 1,
    "isDefault": false
  },
  {
    "id": "agent-resource-director",
    "name": "agent-resource-director",
    "identityName": "影织(Sherlock)",
    "identityEmoji": "🕸️",
    "identitySource": "identity",
    "workspace": "/root/.openclaw/workspace/workspace-agent-resource-director",
    "agentDir": "/root/.openclaw/agents/agent-resource-director/agent",
    "model": "kimi-coding/kimi-k2-thinking",
    "bindings": 1,
    "isDefault": false
  }
]
[plugins] memory-lancedb-pro@1.1.0-beta.6: plugin registered (db: /root/.openclaw/memory/lancedb-pro, model: jina-embeddings-v5-text-small)
[plugins] memory-lancedb-pro: diagnostic build tag loaded (memory-lancedb-pro-diag-20260308-0058)
[plugins] self-improvement: integrated hooks registered (agent:bootstrap, command:new, command:reset)
[plugins] session-strategy: using systemSessionMemory (plugin memory-reflection hooks disabled)
[plugins] PaddedCell plugin initializing...
[plugins] PaddedCell plugin initialized
[plugins] dirigent: pluginDir resolved from import.meta.url: /root/.openclaw/plugins/dirigent
[plugins] hook runner initialized with 3 registered hooks
[plugins] hook runner initialized with 3 registered hooks
[plugins] hook runner initialized with 3 registered hooks
[plugins] hook runner initialized with 3 registered hooks

- Prefer OpenClaw CLI as source of truth for agent list
- Parse JSON prefix defensively when plugin logs trail output
- Keep file/directory discovery only as fallback
hzhang merged commit afdbc469ad into main 2026-03-20 09:18:37 +00:00
hzhang deleted branch feat/telemetry-sidecar-v2 2026-03-20 09:18:37 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: zhi/HarborForge.OpenclawPlugin#2