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

@weave_protocol/adapter-qoder

v0.1.2

Published

Weave Protocol adapter for Qoder CLI - enforces WARD.md policies via Qoder CLI's PreToolUse hook

Readme

🛡️ @weave_protocol/adapter-qoder

Enforce WARD.md in Qoder CLI, Alibaba's Qoder coding agent, in the terminal, with its PreToolUse hook. Every tool call the agent makes is checked against your policy before it runs.

npm

This adapter is for Qoder CLI only. The same WARD.md works in every Weave adapter.

Quick start

npm i -g @weave_protocol/adapter-qoder
weave-qoder init          # adds the hook to ~/.qoder/settings.json
weave-qoder status        # hook installed? which WARD.md is active?

Then restart Qoder CLI. Add a WARD.md to your project (npx @weave_protocol/ward init), or a user-wide one at ~/.qoder/WARD.md.

What it checks

The hook uses Ward's shared evaluator, so the rules match the other adapters exactly. That includes session and spend limits, the payment guard, outbound-data checks, model endpoints by jurisdiction, signed policies and decision receipts.

  • Capability: the tool's WARD capability (Bash → shell_exec, Read → file_read, Write/Edit → file_write, …) or its raw name. The Qoder IDE and JetBrains plugin's native names map to the same capabilities (run_in_terminal → shell_exec, search_replace/create_file/edit_file → file_write, delete_file → file_delete, read_file, grep_code, list_dir, fetch_content, …), so a rule holds whichever name the IDE reports.
  • Arguments: every path and URL argument, with .. and ~ normalized.
  • Shell commands: every URL and every absolute or ~ path in Bash.
  • MCP tools (mcp__<server>__<tool>): by name, plus their path and URL arguments.

A WARD deny holds even in Qoder's bypass_permissions mode.

Decisions

| WARD decision | What Qoder CLI sees | |---|---| | allow | nothing ({}): Qoder CLI's own permission rules and prompts still apply | | deny | permissionDecision: "deny" with the reason; the agent gets it as the tool result | | require_approval | permissionDecision: "ask": you're asked to confirm |

Qoder CLI lets a call through if a hook crashes, times out or exits with anything but 2. So this hook never exits non-zero; every outcome is an explicit decision:

  • An invalid or unreadable WARD.md always denies, so a typo can't silently switch enforcement off.
  • No WARD.md anywhere means no enforcement.
  • Malformed payloads and evaluator errors allow by default, like Weave's other adapters. weave-qoder init --fail-closed makes them deny.

WARD.md is looked up in this order:

  1. $WEAVE_WARD_PATH
  2. <project>/WARD.md
  3. <project>/.qoder/WARD.md
  4. <project>/.weave/WARD.md
  5. ~/.qoder/WARD.md

Commands

weave-qoder init [--matcher=REGEX] [--timeout=SECONDS] [--fail-closed]
weave-qoder disable
weave-qoder status
weave-qoder test Read --input='{"file_path":"secrets/key"}'   # dry run
weave-qoder hook pre-tool-use                                   # what Qoder CLI runs

init backs up the config file and edits it atomically. It finds its own entry by its command, so your other hooks and settings are untouched. The default timeout is 10 seconds.

Dashboard

Set WEAVE_DASHBOARD_URL (and WEAVE_API_KEY) where you run the agent, and each decision is reported to a local Weave API dashboard as qoder. Only the decision and the tool name are sent, never command or argument contents. Reporting never changes a decision and gives up after 250 ms.

Verified

Built against Qoder CLI's hooks guide and reference.

Live-checked in Qoder CLI 1.1.83, signed in to a Qoder account with a real model, in a throwaway workspace with its own WARD.md and a project-level hook. Every decision was confirmed by Ward's signed receipts (4 verified: 2 allow, 2 deny):

  • an allowed Read went through, and a Read of secrets/key was blocked with the WARD reason;
  • with a user rule in .qoder/settings.json allowing Bash(curl:*), Ward still blocked curl to an unlisted host and allowed it to a listed one.

Also live-checked in the Qoder desktop app 0.5.11, signed in, with Auto approve on, using the same project hook. The app reads the hooks in .qoder/settings.json and sends the same tool names as the CLI (Read, Bash). Ward blocked a Read of secrets/key, a curl to an unlisted host, and the agent's attempt to read the policy file, and allowed the rest. The receipt chain verified.

Two things we learned in the app:

  • It runs each new chat in an empty folder of its own (~/Documents/Qoder/…), where your project's .qoder/settings.json and WARD.md aren't present. Add the project with Workspaces > + and start tasks inside it, or install the hook user-wide with weave-qoder init. Restart the app after any hook change.
  • The agent reads WARD.md and holds back on its own. That's good, but it means a test where the agent can read the policy proves nothing about Ward. For the curl check, we kept the policy outside the workspace with WEAVE_WARD_PATH, so only Ward could stop the call.

Qoder IDE and JetBrains plugin: fixed in 0.1.2. Their hooks don't always use the names Qoder's hooks docs list. The docs give native names (run_in_terminal, search_replace) and Claude Code-compatible ones (Bash, Edit), but a live check in the IDE showed it sending SearchReplace for an edit. 0.1.0 mapped neither native name, and two policies failed open:

  • run_in_terminal escaped a deny: shell_exec capability rule;
  • an edit (search_replace / SearchReplace) was checked as a read, so it could change files that only had read access.

0.1.1 mapped the documented native names but not SearchReplace, and the live check still got an edit through. 0.1.2 matches tool names ignoring case, _ and - (MCP tools excepted), and Ward 0.3.16 treats any unmapped tool named for replacing, patching or updating as a write. Path, URL and shell-command checks were never affected. Live-checked in the Qoder IDE: a shell command was denied (Bash), reads were allowed (Read), and the edit is re-checked after this release. Advisory: GHSA-83gf-j63m-v8h5.

🕸️ Part of Weave Protocol

One WARD.md policy for every agent you run, locally or at scale, plus the tools around it.

| Package | What it does | |---|---| | Ward | The WARD.md policy standard and the tool-call evaluator every adapter shares | | Mund | Scans content for prompt injection (English and Chinese), secrets, PII and exfiltration | | Hord | Encrypted vaults, PII tokenization, sandboxes, capability tokens, attestations | | Dōmere | Audit threads, compliance checkpoints, GDPR and CCPA records, anchoring | | Witan | Multi-agent consensus and spending caps | | Hundredmen | MCP proxy that enforces WARD.md on tool calls | | Tollere | Supply-chain checks: typosquats, CVEs, suspicious version diffs | | Browser | WARD.md and injection scanning for Playwright browser agents | | Adapters | WARD.md in Claude Code, Antigravity, MSAF, Gemini CLI, Codex, OpenCode, Cursor, Qwen Code, CodeBuddy Code, Qoder and TRAE | | Adversary · AgentSecBench | Red-team engine and locked benchmark | | API · CLI · LangChain | REST API and dashboard, setup CLI, LangChain.js integration | | full | Every defensive package in one install | | Yoxallismus | Post-quantum hybrid cipher (experimental beta) |


License

Apache-2.0