-
Notifications
You must be signed in to change notification settings - Fork 1
Global OpenClaw Support #5
Description
OpenClaw's hook support can be added quite simply without breaking the policy paradigm too much. before_tool_call
Approach:
Add a global policy mode for agents that operate outside of a single repository scope. Currently Cordon assumes a workspace context with policy stored at .cordon/policy.db. Global mode would store policy at ~/.cordon/policy.db and support agents like OpenClaw/NemoClaw that aren't scoped to a repo.
Key considerations:
cordon hook --global reads from user-level policy, cordon hook (default) reads from workspace policy
CLI commands should fall back to global policy if no .cordon/ directory is found in the current workspace
Global zones need to handle path semantics (absolute paths, cross-repo patterns like *.env)
OpenClaw uses TypeScript plugins, so integration would be a thin TS wrapper calling the Cordon binary
Policy.db schema should work for both modes without changes