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

@retailcrm/embed-ui-v1-contexts

v0.9.26

Published

Reactive contexts for RetailCRM JS API

Readme

@retailcrm/embed-ui-v1-contexts

npm version

Логика реактивного контекста, используемого в JS-расширениях RetailCRM

Установка

npm:

npm i --save @retailcrm/embed-ui-v1-contexts

yarn:

yarn add @retailcrm/embed-ui-v1-contexts

AI-friendly profiles

Пакет генерирует AI-friendly profiles для predefined contexts, action scopes и custom contexts. Они собираются из typed source metadata, а не редактируются вручную.

Generated profiles появляются в пакетных docs при сборке:

  • docs/contexts/*.yml — profiles predefined contexts, например order/card;
  • docs/actions/*.yml — profiles action scopes, например order/card;
  • docs/custom-contexts/*.yml — profiles custom context entities, например order;
  • docs/*/index.json — индексы generated resources.

Пакет также поставляет MCP stdio server embed-ui-v1-contexts-mcp, который отдает generated profiles как MCP resources:

  • embed-ui-v1-contexts://contexts;
  • embed-ui-v1-contexts://contexts/<encoded-context>;
  • embed-ui-v1-contexts://actions;
  • embed-ui-v1-contexts://actions/<encoded-scope>;
  • embed-ui-v1-contexts://custom-contexts;
  • embed-ui-v1-contexts://custom-contexts/<encoded-entity>.

Пример Codex project-level MCP config:

[mcp_servers.v1-contexts]
command = "embed-ui-v1-contexts-mcp"

AI и инициализация AGENTS.md

Чтобы агент понимал, когда использовать MCP-сервер и generated profiles пакета, можно добавить в целевой проект секцию с инструкциями:

npx @retailcrm/embed-ui-v1-contexts init-agents

Если AGENTS.md ещё нет, команда создаст файл. Если файл уже есть, команда допишет в конец английский блок для @retailcrm/embed-ui-v1-contexts, если такого блока там ещё нет. С --force можно обновить уже существующий блок пакета.

Для project-level skills можно создать .agents/skills/embed-ui-v1-contexts-usage/SKILL.md:

npx @retailcrm/embed-ui-v1-contexts init-skills

Skill описывает повторяемый workflow применения контекстов в коде: проверку доступности контекста в target, выбор public import, readonly/writable семантику, actions и fallback на generated YAML profiles, если MCP недоступен.

Инициализация MCP-конфига

Пакет также может сам добавить project-level MCP-настройки в целевой проект:

npx @retailcrm/embed-ui-v1-contexts init-config

Команда создаёт или дополняет корневой .mcp.json, добавляет заметку в README.md и не дублирует уже существующую настройку. Клиентские project-level конфиги создаются только явно:

npx @retailcrm/embed-ui-v1-contexts init-config --mcp-client-configs codex,cursor,junie,vscode

Корневой .mcp.json рассчитан на Claude Code project scope и использует ${CLAUDE_PROJECT_DIR:-.}/node_modules/.bin/embed-ui-v1-contexts-mcp. Для Cursor и VS Code генерируются client-specific project configs с ${workspaceFolder}.

С --force можно обновить уже существующие управляемые записи. Команда обновляет только запись retailcrm-embed-ui-v1-contexts, а остальные серверы и пользовательские настройки клиентских конфигов оставляет без изменений.

Локальная генерация:

yarn workspace @retailcrm/embed-ui-v1-contexts run build:docs

Полная сборка workspace тоже запускает генерацию:

yarn workspace @retailcrm/embed-ui-v1-contexts run build

Release workflow перед публикацией выполняет yarn workspaces foreach -A --topological-dev run build, поэтому profiles генерируются в CI и попадают в published package вместе с docs.