sec0-sdk/integrations/openclaw exports three integration helpers:
createMoltbotHooks(...)createMoltbotPlugin(...)createMoltbotEscalationManager(...)
createEscalationManager(...) from sec0-sdk/escalation directly. createMoltbotEscalationManager(...) is now a thin OpenClaw adapter over that shared approvals lifecycle.
Minimal Plugin
Manual Hook Wiring
UsecreateMoltbotHooks(...) when you want full control over how the runtime registers handlers:
Control-Plane Policy
You can load policy from the Sec0 control plane instead of a local file:policyControlPlaneSource when you need a specific level, scope, or node override.
Configuration
Required
| Option | Description |
|---|---|
policyPath or policyYaml or policyObject | Policy source |
auditDir | Directory for audit logs |
signingKeyPath | Path to Ed25519 key |
tenant | Tenant identifier |
serverName | Server identity (name@version) |
mode | "observe" or "enforce" |
Common Optional Fields
| Option | Description |
|---|---|
allowlist | Override policy.tools.allowlist |
policyFromControlPlane | Fetch policy from the control plane |
policyControlPlaneSource | Override control-plane level, scope, node, and fallback settings |
policyRefreshMs | Policy refresh TTL in milliseconds |
agentGuard | Agent Guard options or false |
skills | See Skills Hooks for resolver and scan hook configuration |
compliance | NL or regex compliance configuration |
onDecision | Decision callback |
onAuditError | Audit error callback |
gatewayTool | Register a bridge-backed tool that routes through callToolViaGateway(...) |
messages | Govern inbound or outbound messages in addition to tool calls |
Skills Hooks
Skill resolver and scanning behavior has moved to Skills Hooks. Use that section forskills.resolve, skills.onScan, and policy reason mapping.
Message Governance
Enable inbound or outbound message scanning alongside tool calls:Escalation Manager
Use the built-in OpenClaw escalation adapter instead of hand-writing create, poll, and resolve logic in your app:human, auto-approve, auto-reject, and off.
Pass reporter and resolver directly if you want custom backends. Pass manager when you want one shared escalation lifecycle reused across OpenClaw hooks and the rest of your application.
Gateway Tool Registration
gatewayTool registers a bridge-backed tool inside the host runtime:
Human Escalation Policy
Route high-risk actions to approval instead of hard-blocking:OpenTelemetry
sec0-sdk/otel provides helpers for bootstrapping tracing: