Files
hzhang c5593e3961 initial drop: Dialectic.PlexumPlugin v0.1
Port of Dialectic.OpenclawPlugin to the Plexum SDK. 8 dialectic_*
tools wired to Dialectic.Backend over HTTP:

  list_topics, topic_detail, list_arguments, propose_topic,
  signup, post_argument, submit_verdict, view_verdict

Differences from the OpenClaw port worth noting:

  - Per-agent API key storage: OpenClaw used secret-mgr (one entry
    per agent's keyspace). Plexum has no secret-mgr; v1 stores
    keys directly in plugin config (apiKey + agentKeys map).

  - Agent identity at tool dispatch: OpenClaw framework surfaces
    ctx.agentId; Plexum SDK doesn't yet plumb the calling agent
    through ToolPlugin.CallTool. v1 falls back to
    config.defaultAgentID — same stop-gap HarborForge.PlexumPlugin
    is on. Tracked as upstream SDK work.

  - HF on_call coverage pre-check on signup: stub that always
    returns "skipped", matching OpenClaw v1's behavior (HarborForge
    never shipped the cross-plugin coverage query). pre_validated
    is sent as false so the backend records audit honestly.
    DIALECTIC_PLUGIN_BYPASS_HF=1 env retains parity with OpenClaw.

  - Activation: lazy (no background services, unlike HarborForge's
    eager-spawn for the calendar scheduler + monitor bridge).

Backend client follows the bearer-auth contract OpenClaw's
backend-client.ts established; endpoint shapes are unchanged.
2026-06-03 11:57:24 +01:00

29 lines
987 B
Makefile

VERSION := $(shell git describe --tags --always --dirty 2>/dev/null || echo dev)
GO_ENV := CGO_ENABLED=0
.PHONY: build install clean help
help:
@echo "Dialectic.PlexumPlugin build targets:"
@echo " build - compile binary + bundle manifest into dist/"
@echo " install - copy binary + manifest into ~/.plexum/plugins/dialectic/"
@echo " clean - rm -rf dist/"
build:
mkdir -p dist
$(GO_ENV) go build -ldflags="-X main.Version=$(VERSION)" \
-o dist/plexum-dialectic-plugin ./cmd/plexum-dialectic-plugin
cp manifest.json dist/manifest.json
@echo "Built to dist/ (version=$(VERSION))"
install: build
mkdir -p ~/.plexum/plugins/dialectic
cp dist/plexum-dialectic-plugin ~/.plexum/plugins/dialectic/
cp dist/manifest.json ~/.plexum/plugins/dialectic/
@echo "Installed to ~/.plexum/plugins/dialectic/"
@echo "Add to ~/.plexum/plexum.json .plugins.allow: 'dialectic'"
@echo "Config goes at ~/.plexum/plugins/dialectic/config.json (see README)"
clean:
rm -rf dist/