Skip to content

Global OpenClaw Support #5

@tom-nash

Description

@tom-nash

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions