Openclaw mirror of HarborForge.PlexumPlugin's Phase 2 work. Same tool
names + input schemas + return shapes + storage path layout so a
single ClawSkills workflow text works on both runtimes.
plugin/openclaw.plugin.json:
- 5 new dynamic-kb-* contracts.tools entries
plugin/tools/kbblock.ts (new):
- TS class mirror of Plexum internal/kbblock package
- Storage at <OPENCLAW_PATH>/agents/<agentId>/sessions/<sessionId>/
plugins/harbor-forge/kb-block.json
- Entry shape + Render emit <kb-fact id=N kb=<code>
source=topic:<slug>>...</kb-fact> identical to Plexum side
- Insert-order rendering (§9 #4), no fade in v1 (§9 #3 placeholder)
plugin/tools/kbclient.ts (new):
- TS HTTP client for HF backend KB routes:
GET /knowledge-bases[?project=<code>], /knowledge-bases/{id}/topics,
/knowledge-bases/{id}/tree, /knowledge-facts/{id}
- ListFacts flattens the tree client-side filtered by topic ids
- Bearer auth via plugin-level apiKey (per-agent hf-token resolution
deferred — TODO matching Plexum side)
plugin/tools/dynamic-kb.ts (new):
- 5 tool factories (createListKBs/Topics/Facts/Cache/Evict)
- Each accepts ctx in execute so cache/evict resolve sessionID
- KBDeps bundle wires client + token-for + makeClient + turn-for
plugin/index.ts:
- Register 5 KB tools via the existing wrapped api.registerTool
(already handles MCP content shape + PaddedCell tools-cache gate)
- before_prompt_build hook: when block non-empty, returns
appendSystemContext = <dynamic-block><kb-block>...</kb-block>
</dynamic-block>. Empty block → no append. Limitation: append
only (can't replace openclaw's baked-in static sys-msg content);
the dynamic-block lands at the end rather than slotted into
System[1] like on Plexum
No tests yet — sim verification on dind-t2 next (requires HF backend
container rebuild to expose /knowledge-* routes; current image
predates the KB module).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
89 lines
3.1 KiB
JSON
89 lines
3.1 KiB
JSON
{
|
|
"id": "harbor-forge",
|
|
"name": "HarborForge",
|
|
"description": "HarborForge plugin for OpenClaw - project management, monitoring, and CLI integration",
|
|
"activation": {
|
|
"onStartup": true
|
|
},
|
|
"contracts": {
|
|
"tools": [
|
|
"harborforge_status",
|
|
"harborforge_telemetry",
|
|
"harborforge_monitor_telemetry",
|
|
"harborforge_calendar_status",
|
|
"harborforge_calendar_complete",
|
|
"harborforge_calendar_abort",
|
|
"harborforge_calendar_pause",
|
|
"harborforge_calendar_resume",
|
|
"harborforge_restart_status",
|
|
"dynamic-kb-list-kbs",
|
|
"dynamic-kb-list-topics",
|
|
"dynamic-kb-list-facts",
|
|
"dynamic-kb-cache",
|
|
"dynamic-kb-evict"
|
|
]
|
|
},
|
|
"configSchema": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"enabled": {
|
|
"type": "boolean",
|
|
"default": true,
|
|
"description": "Enable the HarborForge plugin"
|
|
},
|
|
"backendUrl": {
|
|
"type": "string",
|
|
"default": "https://monitor.hangman-lab.top",
|
|
"description": "HarborForge backend base URL (shared by Monitor and Calendar API)"
|
|
},
|
|
"identifier": {
|
|
"type": "string",
|
|
"description": "Server/claw identifier. Used as claw_identifier in Calendar heartbeat and as MonitoredServer.identifier. Auto-detected from hostname if not set."
|
|
},
|
|
"apiKey": {
|
|
"type": "string",
|
|
"description": "API Key from HarborForge Monitor admin panel (optional but required for Monitor authentication)"
|
|
},
|
|
"monitor_port": {
|
|
"type": "number",
|
|
"description": "Local port for communication between HarborForge Monitor and this plugin"
|
|
},
|
|
"reportIntervalSec": {
|
|
"type": "number",
|
|
"default": 30,
|
|
"description": "How often to report metrics (seconds)"
|
|
},
|
|
"httpFallbackIntervalSec": {
|
|
"type": "number",
|
|
"default": 60,
|
|
"description": "HTTP heartbeat interval when WS unavailable"
|
|
},
|
|
"logLevel": {
|
|
"type": "string",
|
|
"enum": ["debug", "info", "warn", "error"],
|
|
"default": "info",
|
|
"description": "Logging level"
|
|
},
|
|
"calendarEnabled": {
|
|
"type": "boolean",
|
|
"default": true,
|
|
"description": "Enable Calendar heartbeat integration (PLG-CAL-001). When enabled, plugin sends periodic heartbeat to /calendar/agent/heartbeat to receive pending TimeSlots."
|
|
},
|
|
"calendarHeartbeatIntervalSec": {
|
|
"type": "number",
|
|
"default": 60,
|
|
"description": "How often to send Calendar heartbeat to backend (seconds). Defaults to 60s (1 minute)."
|
|
},
|
|
"calendarApiKey": {
|
|
"type": "string",
|
|
"description": "API key for Calendar API authentication. If not set, uses apiKey or plugin auto-authentication via X-Agent-ID header."
|
|
},
|
|
"managedMonitor": {
|
|
"type": "string",
|
|
"description": "Absolute path to an installed HarborForge.Monitor binary managed by this plugin installer. If set, gateway_start/gateway_stop hooks will start/stop the monitor process automatically."
|
|
}
|
|
}
|
|
}
|
|
}
|