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

@mrc2204/opencode-bridge

v0.1.6

Published

OpenClaw ↔ OpenCode bridge plugin for hybrid routing, callback orchestration, and multi-project-safe runtime control.

Readme

@mrc2204/opencode-bridge

English README: README.en.md

opencode-bridge là cầu nối giữa OpenClaw và OpenCode theo hướng hybrid execution, callback orchestration và runtime control an toàn cho nhiều project.

Package này làm gì

Package này nối 2 phía runtime:

  • OpenClaw side: routing theo project, run state, serve management, observability, callback policy
  • OpenCode side: plugin callback bắt event terminal bên trong OpenCode runtime

Mục tiêu thực dụng:

  • execution theo project rõ ràng
  • callback quay về OpenClaw qua /hooks/agent
  • artifact OpenCode-side cài được theo project hoặc global
  • multi-project-safe boundary

Cài đặt

1) OpenClaw side

openclaw plugins install @mrc2204/openclaw-opencode-bridge

2) OpenCode side — cài theo project

npm run materialize:opencode-plugin:project

Project mode sẽ materialize plugin theo namespace clean:

  • .opencode/plugins/openclaw-bridge/openclaw-bridge-callback.js
  • .opencode/plugins/openclaw-bridge/config.json

và auto patch plugin entry trong .opencode/opencode.json thành:

{ "plugin": ["./plugins/openclaw-bridge/openclaw-bridge-callback.js"] }

3) OpenCode side — cài global

npm run materialize:opencode-plugin:global

Global mode sẽ materialize plugin theo namespace clean:

  • ~/.config/opencode/plugins/openclaw-bridge/openclaw-bridge-callback.js
  • ~/.config/opencode/plugins/openclaw-bridge/config.json

và auto patch ~/.config/opencode/opencode.json khi file này tồn tại thành plugin entry dạng:

{ "plugin": ["./plugins/openclaw-bridge/openclaw-bridge-callback.js"] }

4) Một lệnh cài

Project mode:

npm run install:bridge:project

Global mode:

npm run install:bridge:global

Environment callback tối thiểu

OpenCode-side callback plugin cần:

  • OPENCLAW_HOOK_BASE_URL
  • OPENCLAW_HOOK_TOKEN

Optional:

  • OPENCLAW_BRIDGE_AUDIT_DIR
  • OPENCLAW_BRIDGE_OPENCLAW_AUDIT_PATH

Mô hình runtime

Hybrid execution strategy

opencode-bridge hỗ trợ 2 lane thực dụng:

  • CLI-direct: execution nhẹ cho task đơn giản
  • serve/plugin mode: đường canonical cho callback, observability và event-driven lifecycle

Multi-project safety

Contract hiện tại giả định:

  • 1 project = 1 OpenCode serve bind đúng repo
  • chỉ reuse serve khi runtime introspection xác nhận đúng repo_root
  • session tag phải giữ đủ callback identity theo run/session

Build và verify

npm install
npm run build
npm test -- --runInBand

Cấu trúc artifact

openclaw-opencode-bridge/
├── src/                 # OpenClaw-side runtime
├── opencode-plugin/     # canonical OpenCode-side plugin source
├── scripts/             # materialize/install helpers
├── dist/                # built artifacts
├── docs/                # install / architecture / contracts
└── skills/              # bridge-related skills/docs

Tài liệu liên quan

  • docs/install/quick-start-2026-03-22.md
  • docs/install/production-ish-install-2026-03-22.md
  • docs/contracts/multi-project-contract-draft-2026-03-22.md
  • docs/architecture/hybrid-execution-strategy-2026-03-22.md

Ghi chú: local debug/dev notes được tách khỏi README public-facing. Xem:

  • docs/install/developer-local-debug-2026-03-22.md

Trạng thái

Hiện tại package đã ở mức functional + productized usable, với hardening/test/docs đã đi khá xa.