@vettly/openclaw-adapter
v0.1.2
Published
Fail-closed in-path OpenClaw guardrails adapter for Vettly.
Maintainers
Readme
@vettly/openclaw-adapter
Fail-closed in-path adapter for OpenClaw guardrails with Vettly.
Why teams use this
- Stops risky agent actions before execution, not after incident review.
- Fails closed during guardrail outages so safety controls are not bypassed.
- Adds approval hooks for sensitive operations (
warn/flag/blockpaths). - Gives platform and security teams a consistent in-path enforcement layer.
Get a free API key at vettly.dev.
Install
npm install @vettly/openclaw-adapterQuick start
import { VettlyOpenClawAdapter } from '@vettly/openclaw-adapter';
const adapter = new VettlyOpenClawAdapter({
apiUrl: process.env.VETTLY_API_URL!,
token: process.env.VETTLY_TOKEN!,
projectId: process.env.VETTLY_PROJECT_ID!,
failClosed: true,
timeoutMs: 1500,
onApprovalRequired: async ({ decision }) => {
// Route this to your approval queue UI/workflow.
return false;
},
});
const auth = await adapter.authorizeExec('npm test');
if (!auth.allowed) {
throw new Error(auth.reason);
}Actions
authorizeAction(request)authorizeExec(command, options?)authorizeFileRead(path, options?)authorizeFileWrite(path, options?)authorizeNetwork(domain, options?)authorizeEnvAccess(variableName, options?)vetSkill(request)guardAction(request, fn)
Fail-closed behavior
When failClosed is true (default), any timeout/API error denies execution.
When failClosed is false, guardrail outages allow execution (fail-open) and return mode fail_open.
