npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@oxdeai/openclaw

v1.0.1

Published

Thin OpenClaw adapter for the OxDeAI universal execution guard

Readme

@oxdeai/openclaw

Thin OpenClaw binding for @oxdeai/guard.

This package connects OpenClaw action/skill calls to the OxDeAI universal execution guard. It contains no authorization logic - all policy evaluation and PEP enforcement is delegated to @oxdeai/guard.


What this package does

OpenClaw actions ({ name, args, step_id, workflow_id }) carry no agent identity and use a different shape from OxDeAI's ProposedAction. This adapter:

  1. Injects agentId from config into every call (action calls carry no agent identity)
  2. Maps action.step_idcontext.intent_id (the per-step identifier)
  3. Carries action.workflow_idcontext.workflow_id (parent workflow context)
  4. Passes the resulting ProposedAction to OxDeAIGuard

Everything else - policy evaluation, authorization verification, state persistence, fail-closed behavior - happens inside @oxdeai/guard.


Installation

pnpm add @oxdeai/openclaw @oxdeai/core

Usage

import { createOpenClawGuard } from "@oxdeai/openclaw";

const guard = createOpenClawGuard({
  engine,      // PolicyEngine from @oxdeai/core
  getState,    // () => State | Promise<State>
  setState,    // (state: State) => void | Promise<void>
  agentId: "gpu-agent-1",
});

// In your OpenClaw action dispatcher:
await guard(
  {
    name: "provision_gpu",
    args: { asset: "a100", region: "us-east-1" },
    step_id: "step-1",
    workflow_id: "openclaw-gpu-demo",
  },
  () => provisionGpu("a100", "us-east-1")
);

The execute callback is only invoked when the policy engine returns ALLOW and the authorization artifact passes verification. On DENY, OxDeAIDenyError is thrown and the callback is never called.


With a custom intent mapper

Use mapActionToIntent when you need full control over how an action maps to an OxDeAI Intent:

const guard = createOpenClawGuard({
  engine,
  getState,
  setState,
  agentId: "gpu-agent-1",
  mapActionToIntent(action) {
    // action.name, action.args, action.context.agent_id,
    // action.context.intent_id (from step_id) and workflow_id are available
    return buildProvisionIntent(action.args.asset as string, action.args.region as string);
  },
});

Error handling

import {
  OxDeAIDenyError,
  OxDeAIAuthorizationError,
  OxDeAINormalizationError,
} from "@oxdeai/openclaw";

try {
  await guard(action, execute);
} catch (err) {
  if (err instanceof OxDeAIDenyError) {
    // Policy denied - err.reasons contains the violation codes
    console.error("denied:", err.reasons);
  } else if (err instanceof OxDeAIAuthorizationError) {
    // Authorization artifact missing or invalid - hard security failure
    throw err;
  }
}

Deterministic boundary semantics

This adapter preserves the same deterministic, offline-verifiable boundary semantics as every other OxDeAI protocol demo:

  • No Authorization = no execution, even on ALLOW
  • DENY blocks the execute callback before it is called
  • State transitions happen only after successful execution
  • Envelope verification remains offline and deterministic

All of this is guaranteed by @oxdeai/guard - this package adds nothing on top.


Architecture boundary

This package is a thin binding only. Do not add:

  • Authorization logic
  • Policy evaluation logic
  • verifyAuthorization calls
  • Runtime security semantics beyond the Action → ProposedAction mapping

All of that lives in @oxdeai/guard.


See also