devtools
@vkma.dev/devtools is devtools for VK Mini Apps: a /__vkma/ panel on your own dev server with a live VK Bridge dialogue (outgoing sends, paired responses, incoming events), a connected-clients registry and an execute bridge.
# Vite:npm install -D @vkma.dev/devtools @vkma.dev/bridge devframe @devframes/vite# Rsbuild (no vite needed):npm install -D @vkma.dev/devtools @vkma.dev/bridge devframeOnly the adapter you use is a hard dependency: vite and @devframes/vite are optional peers (Vite mode), and @rsbuild/core likewise (Rsbuild mode).
import { vkmaDevtools } from "@vkma.dev/devtools";
export default { plugins: [vkmaDevtools()],};One line gives the mini app:
/__vkma/. The panel (SPA + RPC/WebSocket on Vite’s own port, like/__unocssfor UnoCSS).- The bridge alias.
@vkontakte/vk-bridgeimports, dependencies included, are rewritten to@vkma.dev/bridgewith the devtools tap — no app code changes needed. Opt out withalias: false. - The FAB. A floating button on the app page opening the same panel as an overlay. Its initial placement is configurable:
vkmaDevtools({ fabPosition: "bottom-left" })(bottom-left,bottomorbottom-right, defaultbottom-left); a placement picked in the panel is remembered per origin and wins over the configured initial value.
What you get
Section titled “What you get”- Timeline. A ledger of the bridge traffic: each send opens a request group with its paired response nested beneath it (round-trip duration, ok/error mark); unsolicited VK events stand alone. Filterable by type and name; payloads expand into a collapsible JSON tree with copy.
- Execute. Send any bridge event into a chosen connected client from the panel; the round-trip result lands right there.
- Clients. Every connected page script (desktop tab, phone on LAN, iframe, standalone) with UA, platform, launch params.
- Embedded scope. The FAB panel shows only its own page’s traffic (colored client badge in the header); a page reload resets its history.
- MCP for coding agents. Off by default; turn on with the
mcpoption.
- Vite plugin — setup and the
vkmaDevtoolsoptions. - Rsbuild adapter — the same panel without Vite.
- The panel — timeline, execute, clients, the embedded scope.
- MCP — bridge traffic and execute for coding agents.