Commit Graph

25 Commits

Author SHA1 Message Date
operator
e4ac7b7af3 fix: disable periodic openclaw agents list subprocess
Spawning a full openclaw CLI process every 30s to list agents is too
heavy — each invocation loads all plugins (~16s) and hangs until killed.
Return empty array for now until a lighter mechanism is available.
2026-04-16 15:26:55 +00:00
operator
2088cd12b4 fix: use OPENCLAW_SERVICE_VERSION for real version and increase agent list timeout
api.version returns plugin API version (0.2.0), not the openclaw release
version. Use OPENCLAW_SERVICE_VERSION env var set by the gateway instead.
Also increase listOpenClawAgents timeout from 15s to 30s since plugin
loading takes ~16s on T2.
2026-04-16 15:12:35 +00:00
b81125db0d fix: use patch for calendar slot agent updates 2026-04-04 18:29:50 +00:00
7f86073fe7 fix: send calendar heartbeat as post 2026-04-04 17:58:59 +00:00
bcd47d8b39 feat: populate monitor agents from openclaw list 2026-04-04 08:55:00 +00:00
3f8859424c refactor: remove monitor legacy compatibility 2026-04-04 08:05:50 +00:00
2262f32a0b feat: pass config overrides to managed monitor 2026-04-04 07:54:07 +00:00
038862ef8c refactor: manage monitor via gateway hooks 2026-04-04 00:44:33 +00:00
zhi
3b0ea0ad12 PLG-CAL-004: Implement ScheduledGatewayRestart handling in plugin
- Add state persistence (persistState/restoreState) for recovery after restart
- Add handleScheduledGatewayRestart method that:
  - Persists current scheduler state to disk
  - Sends final heartbeat to backend before shutdown
  - Stops the calendar scheduler (pauses scheduled tasks)
- Add isRestartPending flag to prevent new slot processing during restart
- Add isScheduledGatewayRestart helper to detect restart events
- Update scheduler to detect and handle ScheduledGatewayRestart events
- Add new tools: harborforge_restart_status, harborforge_calendar_pause/resume
- Export isRestartPending and getStateFilePath methods
- Bump plugin version to 0.3.1
2026-04-01 09:41:02 +00:00
zhi
24c4a7ad14 PLG-CAL-003 fix deferred slot replanning 2026-04-01 08:52:11 +00:00
zhi
97021f97c0 PLG-CAL-002: Implement calendar scheduler for agent slot wakeup
- Add CalendarScheduler class to manage periodic heartbeat and slot execution
- Implement agent wakeup logic when Idle and slots are pending
- Handle slot status transitions (attended, ongoing, deferred)
- Support both real and virtual slot materialization
- Add task context building for different event types (job, system, entertainment)
- Integrate scheduler into main plugin index.ts
- Add new plugin tools: harborforge_calendar_status, complete, abort
2026-04-01 08:45:05 +00:00
zhi
55d7d11a52 feat(plugin): PLG-CAL-001 - define Calendar heartbeat request/response format
- Add plugin/calendar/types.ts: TypeScript interfaces for heartbeat
  request/response (CalendarHeartbeatRequest/Response, CalendarSlotResponse,
  SlotAgentUpdate, all enums: SlotType, SlotStatus, EventType)
- Add plugin/calendar/calendar-bridge.ts: CalendarBridgeClient HTTP client
  with heartbeat(), updateSlot(), updateVirtualSlot(), reportAgentStatus()
- Add plugin/calendar/index.ts: module entry point exporting all public types
- Add docs/PLG-CAL-001-calendar-heartbeat-format.md: full specification
  documenting claw_identifier and agent_id determination, request/response
  shapes, error handling, and endpoint summary
- Update plugin/openclaw.plugin.json: add calendarEnabled,
  calendarHeartbeatIntervalSec, calendarApiKey config options; clarify
  identifier description as claw_identifier

Refs: HarborForge.NEXT_WAVE_DEV_DIRECTION.md §6, BE-AGT-001
2026-04-01 07:51:39 +00:00
zhi
e7ba982128 feat: push OpenClaw metadata to Monitor bridge periodically
- MonitorBridgeClient gains pushOpenClawMeta() method for POST /openclaw
- OpenClawMeta interface defines version/plugin_version/agents payload
- Plugin pushes metadata on gateway_start (delayed 2s) and periodically
- Interval aligns with reportIntervalSec (default 30s)
- Pushes are non-fatal — plugin continues if Monitor is unreachable
- Interval cleanup on gateway_stop
- Updated monitor-server-connector-plan.md with new architecture
2026-03-22 01:37:21 +00:00
zhi
27b8b74d39 Align plugin monitor_port config 2026-03-21 19:22:57 +00:00
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
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