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
21 lines
353 B
Go
21 lines
353 B
Go
package telemetry
|
|
|
|
import "syscall"
|
|
|
|
type diskStat struct {
|
|
blockSize uint64
|
|
blocks uint64
|
|
bavail uint64
|
|
}
|
|
|
|
func statfs(path string, out *diskStat) error {
|
|
var fs syscall.Statfs_t
|
|
if err := syscall.Statfs(path, &fs); err != nil {
|
|
return err
|
|
}
|
|
out.blockSize = uint64(fs.Bsize)
|
|
out.blocks = fs.Blocks
|
|
out.bavail = fs.Bavail
|
|
return nil
|
|
}
|