Commit Graph

17 Commits

Author SHA1 Message Date
zhi
78a61e0fb2 Integrate plugin with local monitor bridge 2026-03-21 16:07:01 +00:00
zhi
9f649e2b39 feat: rename plugin to harbor-forge, remove sidecar, add --install-cli
Major changes:
- Renamed plugin id from harborforge-monitor to harbor-forge (TODO 4.1)
- Removed sidecar server/ directory and spawn logic (TODO 4.2)
- Added monitorPort to plugin config schema (TODO 4.3)
- Added --install-cli flag to installer for building hf CLI (TODO 4.4)
- skills/hf/ only deployed when --install-cli is present (TODO 4.5)
- Plugin now serves telemetry data directly via tools
- Installer handles migration from old plugin name
- Bumped version to 0.2.0
2026-03-21 15:24:50 +00:00
zhi
94eca82fc7 feat: add skills/hf/SKILL.md for hf CLI agent integration
Adds the SKILL.md that teaches agents how to use the hf CLI.
Gated behind --install-cli in the installer (per plan).
2026-03-21 13:50:41 +00:00
afdbc469ad Merge pull request 'feat: stabilize HarborForge monitor sidecar plugin' (#2) from feat/telemetry-sidecar-v2 into main
Reviewed-on: #2
2026-03-20 09:18:36 +00:00
zhi
14ed887ce3 refactor(telemetry): read agents via [
{
    "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
2026-03-20 08:12:58 +00:00
zhi
ab42936408 fix(telemetry): discover agents from ~/.openclaw/agents and clean docs
- Fallback to agent directory discovery when agents.json is absent
- Count configured agent workspaces (excluding main)
- Rewrite plugin docs to API key-only flow
2026-03-20 08:02:19 +00:00
zhi
040cde8cad feat(telemetry): report openclaw and plugin versions separately
- 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
2026-03-20 07:23:18 +00:00
zhi
006784db63 refactor(plugin): read config via api.pluginConfig and api.config
- 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
2026-03-20 07:13:12 +00:00
zhi
de4ef87491 refactor(plugin): remove fallback sidecar autostart 2026-03-20 06:42:45 +00:00
zhi
55b17e35ea fix(plugin): use OpenClaw gateway_start/gateway_stop hooks 2026-03-20 06:36:20 +00:00
zhi
8ebc76931f fix(plugin): normalize OpenClaw plugin config shapes
- Accept flat config, nested entry.config, or missing config
- Treat plugin as enabled unless explicitly disabled
- Log resolved runtime config for gateway diagnostics
2026-03-20 06:27:46 +00:00
zhi
eb43434e48 fix(plugin): correct telemetry server path for installed plugin
- Resolve telemetry.mjs relative to installed plugin root
- Update installer messaging from challengeUuid to apiKey
- Document correct OpenClaw plugin entry config structure
2026-03-20 06:24:40 +00:00
zhi
6d6d00437d chore: add .gitignore for build artifacts 2026-03-19 18:20:43 +00:00
zhi
0dc824549a feat: fix API Key authentication and payload alignment
- 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
2026-03-19 18:20:29 +00:00
zhi
0debe835b4 feat: reorganize to standard OpenClaw plugin structure
New structure:
├── package.json                 # Root package
├── README.md                    # Documentation
├── plugin/                      # OpenClaw plugin
│   ├── openclaw.plugin.json     # Plugin manifest
│   ├── index.ts                 # Plugin entry (TypeScript)
│   ├── package.json
│   └── tsconfig.json
├── server/                      # Telemetry sidecar
│   └── telemetry.mjs
├── skills/                      # OpenClaw skills
└── scripts/
    └── install.mjs              # Installation script

Matches PaddedCell project structure.
Provides install.mjs with build/install/configure/uninstall commands.
2026-03-19 13:51:19 +00:00
zhi
a148c11e50 feat: implement HarborForge Monitor OpenClaw Plugin
Architecture:
- openclaw.plugin.json: Plugin manifest with config schema
- index.mjs: Plugin entry, lifecycle hooks (gateway:start/stop)
- sidecar/server.mjs: Independent Node process for telemetry

Features:
- Collects system metrics (CPU, memory, disk, load, uptime)
- Collects OpenClaw status (version, agents)
- HTTP heartbeat to HarborForge Monitor
- Config via ~/.openclaw/openclaw.json
- Sidecar auto-starts/stops with Gateway

Config options:
- enabled, backendUrl, identifier
- challengeUuid (required, from Monitor registration)
- reportIntervalSec, httpFallbackIntervalSec
- logLevel

Provides tool: harborforge_monitor_status
2026-03-19 13:37:11 +00:00
zhi
c8681af0ac docs: add server connector plan 2026-03-11 21:35:28 +00:00