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

@mobcode/openclaw-plugin

v0.1.45

Published

MobCode integration plugin for OpenClaw

Readme

MobCode OpenClaw Plugin

Отдельный plugin-проект для OpenClaw, который можно ставить в уже существующий сервер OpenClaw как локальную папку.

Зачем он нужен

Этот каркас заточен под мобильную интеграцию MobCode и закрывает первую архитектурную основу под такие задачи:

  • получить по RPC redacted snapshot runtime-конфига;
  • получать список провайдеров через MobCode static catalog;
  • получать список моделей конкретного provider через live fetch в upstream API провайдера;
  • иметь отдельное mobile-friendly хранилище сообщений по session key;
  • хранить rich artifacts и открывать их из мобильной истории;
  • маршрутизировать app-surface actions (mobcode_open) в активный MobCode client;
  • связать self-hosted OpenClaw с backend push relay через server/device pairing;
  • подготовить базу под approvals, diff-flow и custom tools.

Что уже есть

Плагин регистрирует:

  • gateway methods:
    • mobcode.capabilities
    • mobcode.config.snapshot
    • mobcode.providers.available
    • mobcode.provider.models.list
    • mobcode.messages.page
    • mobcode.approvals.list
    • mobcode.artifacts.get
    • mobcode.artifacts.resolveBlob
    • mobcode.client.connect
    • mobcode.client.ping
    • mobcode.client.disconnect
    • mobcode.client.bind_session
    • mobcode.client.resolve_action
  • tools:
    • present_artifact
    • mobcode_open
  • bundled skill:
    • mobcode-ui
  • HTTP routes:
    • /plugins/mobcode/health
    • /plugins/mobcode/config
    • /plugins/mobcode/providers
    • /plugins/mobcode/provider-models?providerId=...
    • /plugins/mobcode/messages?sessionKey=...
    • /plugins/mobcode/artifacts?artifactId=...
  • background service, которая:
    • слушает transcript updates;
    • индексирует сообщения в SQLite;
    • делает history backfill через публичный chat.history и вытаскивает artifacts из tool-result history в SQLite;
    • слушает exec.approval.requested/resolved через внутренний gateway approvals client;
    • при включенном push шлёт approval_required и run_finished в backend push relay, если в текущей session нет живого MobCode client.
  • mobcode.messages.page отдает уже нормализованные one-bubble conversation messages с ordered timeline text -> tool -> artifact -> text, а не только raw transcript rows.

Что пока частично или TODO

  • providers.available сейчас отдает MobCode static provider catalog, синхронизированный с мобильным клиентом, а не настоящий OpenClaw onboarding wizard source of truth.
  • provider.models.list получает модели по сети для конкретного provider, используя api.runtime.config.loadConfig() и api.runtime.modelAuth.resolveApiKeyForProvider(...), не отдавая токены в mobileapp.
  • present_artifact и mobcode_open уже зарегистрированы как plugin tools; mobcode_open шлёт realtime request всем живым MobCode clients, привязанным к текущей session, и завершает tool call по первому ответу или timeout.
  • вместе с plugin устанавливается bundled skill mobcode-ui, который подсказывает OpenClaw агенту, когда использовать present_artifact и mobcode_open.
  • push sender теперь вынесен в backend relay; production verification и iOS Live Activity UX еще остаются.
  • file diff flow лучше делать через интеграцию с официальным diffs plugin, а не изобретать свой формат.
  • mobile approvals построены поверх существующих exec.approval.* методов OpenClaw: plugin хранит state/history, а resolve по-прежнему идет через штатный RPC.
  • custom chart tools пока не реализованы, но под них уже есть правильная точка расширения: registerTool.
  • history backfill через chat.history portable, но ограничен 1000 последними сообщениями, потому что это hard-cap самого OpenClaw gateway method.

Установка из папки

На сервере с OpenClaw:

openclaw plugins install @mobcode/openclaw-plugin
openclaw gateway restart

Локальная разработка из папки по-прежнему поддерживается:

openclaw plugins install ./openclaw-mobcode-plugin
openclaw gateway restart

Если хочешь линк для разработки:

openclaw plugins install -l ./openclaw-mobcode-plugin
openclaw gateway restart

Конфиг

Пример plugin config:

{
  "plugins": {
    "entries": {
      "mobcode": {
        "enabled": true,
        "config": {
          "storage": {
            "retainMessages": true,
            "maxMessagesPerSession": 2000,
            "retentionDays": 30,
            "cleanupIntervalMs": 3600000
          },
          "push": {
            "enabled": false,
            "backend": {
              "baseUrl": "https://api.mobcodee.ru/api/v1",
              "requestTimeoutMs": 15000
            }
          },
          "security": {
            "allowSecretMaterialOverGateway": false
          }
        }
      }
    }
  }
}

Следующие шаги

  1. Довести production verification pairing/push relay и retry/token cleanup на backend delivery.
  2. Подключить diff/viewer flow через официальный diffs plugin.
  3. Добавить registerTool для графиков/диаграмм поверх artifact pipeline.
  4. Усилить iOS terminated-app / Live Activity path.

Важный нюанс про portability

Этот plugin больше не зависит от openclaw/src/... для provider/model discovery.

  • mobcode.providers.available работает на своем static catalog.
  • mobcode.provider.models.list работает через публичный plugin runtime (loadConfig + resolveApiKeyForProvider) и сетевой запрос к upstream provider API.

Это делает plugin переносимым для обычной npm/бинарной установки OpenClaw, но означает, что provider catalog пока остается MobCode-owned, а не OpenClaw-owned source of truth.