initial: HarborForge plugin for Plexum (port of OpenclawPlugin)
Plugin id `harbor-forge` mirrors the OpenClaw counterpart's runtime
surface on top of the Plexum SDK:
* eager activation — Monitor bridge + Calendar scheduler boot at
host start, before any agent turn fires
* monitor bridge: HTTP 127.0.0.1:<monitor_port> serving /telemetry
+ /health for HarborForge.Monitor
* calendar scheduler: heartbeats <backendUrl>/calendar/agent/
heartbeat, dispatches returned slots via HostAPI.WakeAgent
(state-aware queue, depth-1 replace-newest), tracks active slot
state in-memory, terminal status pushed back to backend
* 9 harborforge_* tools (status / telemetry / monitor_telemetry /
calendar_{status,complete,abort,pause,resume} / restart_status)
Key differences from OpenClaw equivalent:
* api.spawn → HostAPI.WakeAgent (new SDK primitive)
* api.getAgentStatus → HostAPI.ReadAgentState (existing)
* --install-monitor / --install-cli not included; Monitor + hf CLI
deploy via the HangmanLab.Server.T3 docker compose layer
Initial drop. TODO before v1 ship:
* tool ctx → calling-agent-id: SDK doesn't currently expose; v1
falls back to a single-active-slot heuristic in
main.bestEffortAgentID
* tests for the bridge + scheduler
This commit is contained in:
28
Makefile
Normal file
28
Makefile
Normal file
@@ -0,0 +1,28 @@
|
||||
VERSION := $(shell git describe --tags --always --dirty 2>/dev/null || echo dev)
|
||||
GO_ENV := CGO_ENABLED=0
|
||||
|
||||
.PHONY: build install clean help
|
||||
|
||||
help:
|
||||
@echo "HarborForge.PlexumPlugin build targets:"
|
||||
@echo " build - compile binary + bundle manifest into dist/"
|
||||
@echo " install - copy binary + manifest into ~/.plexum/plugins/harbor-forge/"
|
||||
@echo " clean - rm -rf dist/"
|
||||
|
||||
build:
|
||||
mkdir -p dist
|
||||
$(GO_ENV) go build -ldflags="-X main.Version=$(VERSION)" \
|
||||
-o dist/plexum-harborforge-plugin ./cmd/plexum-harborforge-plugin
|
||||
cp manifest.json dist/manifest.json
|
||||
@echo "Built to dist/ (version=$(VERSION))"
|
||||
|
||||
install: build
|
||||
mkdir -p ~/.plexum/plugins/harbor-forge
|
||||
cp dist/plexum-harborforge-plugin ~/.plexum/plugins/harbor-forge/
|
||||
cp dist/manifest.json ~/.plexum/plugins/harbor-forge/
|
||||
@echo "Installed to ~/.plexum/plugins/harbor-forge/"
|
||||
@echo "Add to ~/.plexum/plexum.json .plugins.allow: 'harbor-forge'"
|
||||
@echo "Config goes at ~/.plexum/plugins/harbor-forge/config.json (see README)"
|
||||
|
||||
clean:
|
||||
rm -rf dist/
|
||||
Reference in New Issue
Block a user