events

Reference documentation for the PyWry event system, the message mechanism connecting widgets, components, Python code, and the agent. Events use names such as `namespace:event-name`, and widget IDs identify top-level interface areas.

In plain words
What is it for?
Use it when sending events, requesting component state, handling user messages, exchanging chart data, or interpreting results from PyWry tools.
Why use it?
It explains how requests and responses move through the interface and helps prevent invalid event names or confusion between widget and component identifiers.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/deeleeramone/pywry/events
Any agent
npx skills add deeleeramone/PyWry --skill events
Clone the repo
git clone --depth 1 https://github.com/deeleeramone/PyWry

Made for: Claude Code, Codex.

Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,388 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00034 $0.01388
Opus 5 $0.00017 $0.00694
Sonnet 5 $0.00007 $0.00278
Haiku 4.5 $0.00003 $0.00139

Measured 3d ago against content hash cc5045c47ab9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

events scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

pywry/pywry/mcp/skills/events/SKILL.md · 152 lines

How it starts

The opening of the file, as written. The whole thing — 152 lines — stays where its author put it; the contents beside it link to each section on GitHub.

PyWry Event System — Agent Reference

The event bus is the plumbing underneath every MCP tool. You rarely need to think about it — the typed tools wrap emit + wait + state-poll for you — but when you reach for send_event or interpret tool results, this is how it works.

Event names are namespaced

Every event has the form namespace:event-name, e.g.:

  • tvchart:symbol-search — ask the chart to open symbol search
  • tvchart:state-response — chart's reply with its current state
  • tvchart:data-request — chart asks Python for bars
  • tvchart:data-response — Python delivers bars
  • toolbar:request-state — ask a toolbar component for its value
  • toolbar:state-response — component's reply
  • chat:user-message — user typed something
  • chat:ai-response — model produced a token
  • pywry:update-theme — dark/light mode change

Never emit an event with a name that doesn't match namespace:event-name — the framework rejects it.

Widget IDs vs component IDs

widget_id — identifies the top-level PyWry widget (a chart, a grid, a chat panel, a dashboard). Every MCP tool takes widget_id as an argument because all events route to the widget first.

componentId — identifies a child inside a widget (a specific toolbar button, a marquee ticker slot, a chart pane). Component IDs are scoped to their containing widget.

When you call send_event(widget_id, event_type, data), the widget_id picks the target widget; anything identifying a specific component goes in the data payload (typically as data.componentId or data.chartId).

Request / response pattern

Some events are fire-and-forget (e.g. tvchart:symbol-search — "please do this"). Others are request/response round-trips where the caller wants a reply (e.g. tvchart:request-statetvchart:state-response).

The framework correlates request/response with a context token:

  1. Emitter generates a random context token.
  2. Emitter injects it into the request payload.
  3. Listener sees the request, attaches the same context to its response, and emits the response event.
  4. Emitter sees the matching context on the response and wakes up.

Read the full file on GitHub · 152 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 152 lines · 34 tokens per session scan A cc5045c47ab9

Subscribe to this mod's changes

events is a skill published in the GitHub repository deeleeramone/PyWry (93 stars, last pushed 9d ago), licensed Apache-2.0. It adds 34 tokens to every session and 1,388 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

dashboard-design

Use this skill first when the user wants to design or plan a dashboard, especially Vizro dashboards. Enforces a 3-step workflow (requirements, layout, visualization) before implementation. Activate when the user asks to create, design, or plan a dashboard. For implementation, use the dashboard-build skill after…

mckinsey/vizro · 71 tokens

codex-review-loop

Adversarial PR code review using Codex CLI. Codex review (20-50 min) -> structured findings -> HITL approval -> fix loop.

Soju06/codex-lb · 36 tokens

data-access

A 股零鉴权取数手册。当需要真实的行情 / 市值 / 估值快照、季度报告期累计财务数据、机构一致预期 EPS、PE 历史序列、公告标题、日 K 线、交易日历时使用;只允许运行本 skill 登记的脚本取数(腾讯 / 新浪 / 同花顺 / baostock / 深交所 / 东财),禁止凭模型记忆给数,禁止自造爬虫。概念解释、观点讨论等不需要取数的话题不要加载。.

simonlin1212/Vibe-Research · 127 tokens

industry-chain

产业链下钻与不可替代性判定方法:以龙头为"需求入口"沿供应链逐层下钻(整机 / 龙头 → 部件 → 核心器件 → 材料 → 衬底与设备),用物理 / 材料约束(扩产周期、良率、认证周期、有无替代)当筛子找供给刚性的卡口;给每个标的贴不可替代性标签(techmoat / capacitymoat / both / 待补)并列证据;含"卡口越硬越贵"与预期差四问的校准。当任务涉及产业链位置、上下游、护城河、不可替代性、供给瓶颈、竞争格局时加载;单纯取数、估值计算、财报拆分等不涉及产业链结构的任务不要加载。只产出框架与证据表,不给投资动作建议。.

simonlin1212/Vibe-Research · 212 tokens

verify-changes

Verify a code change in this repo before committing or opening a PR. Use after editing collector (backend), web (frontend), shared package, or the Go agent — picks the minimal sufficient check set per touched area.

foru17/neko-master · 47 tokens

openai-docs

Use when the user asks how to build with OpenAI products or APIs and needs up-to-date official documentation with citations (for example: Codex, Responses API, Chat Completions, Apps SDK, Agents SDK, Realtime, model capabilities or limits); prioritize OpenAI docs MCP tools and restrict any fallback browsing to…

Soju06/codex-lb · 74 tokens