core-event-to-web

Add a new Rust core wire event and surface it in the Next.js web frontend.

10|1|Updated Jul 7, 2026
One-click install
npx skills add https://github.com/catalystctl/catcode --skill core-event-to-web-catalystctl
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: core-event-to-web
Source: https://github.com/catalystctl/catcode/tree/main/.catalyst-code/skills/core-event-to-web
Command: npx skills add https://github.com/catalystctl/catcode --skill core-event-to-web-catalystctl

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Wiring a new event from the Rust core through to the Next.js web UI touches four separate layers (emit site, TypeScript types, reducer, component), and a single field-name mismatch between core and web silently breaks the feature. This Skill provides the exact end-to-end pipeline so nothing is missed. ## Core Features & Use Cases - Four-layer pipeline: Guides changes through core event emission (core/src/<module>.rs), web types (web/src/lib/types.ts), the shared reducer (web/src/lib/reducer.ts), and the consuming component (web/src/components/<name>.tsx). - Mismatch prevention: Emphasizes copying exact field names from the Event::new(...).with(...) emit site, the most common silent failure. - Verification gates: Specifies cargo check and npx tsc --noEmit as the authoritative checks, plus known caveats like the pre-existing oauth.rs test breakage. - Use Case: When adding a lifecycle or observability signal (e.g., a per-run progress event) that the web UI should render as a panel or modal, follow the pipeline to emit, type, reduce, and display it without touching the deliberately generic core bridge. ## Quick Start Add a new core event called 'run_progress' emitted from the Rust core and render its payload in the web chat UI following the core-event-to-web pipeline.

Frequently Asked Questions about core-event-to-web

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new core event to the web frontend?

Emit the event in the Rust core with Event::new(...).with(...), add a matching variant to the CoreEvent union in web/src/lib/types.ts, add a case in the shared reduce() function, and consume the new AgentState field in a component. The bridge is generic, so no bridge code changes are needed.

Why is my core event not showing up in the web UI?

The most common cause is a field-name mismatch between what the core emits and what the web reads, which fails silently. Read the actual Event::new(...).with("field", ...) emit site and copy the exact key names into the TypeScript types.

Does adding a core event break the Go TUI?

No. The Go TUI matches on known event types and ignores unknown ones, so new core events are forward-compatible. However, the TUI will not render them unless you also extend tui/handlers.go.

How do I verify core event changes compile correctly?

Run cargo check for the core main binary and npx tsc --noEmit in the web directory; both must pass. Note the core test binary has a pre-existing oauth.rs breakage, so filter test errors with grep -v oauth.rs.

When should I not use this event pipeline?

Do not use it for adding a tool the model can call (use add-core-tool), adding a configuration option (use add-config-knob), or TUI-only rendering (use add-tui-tool-renderer). It is specifically for new core-emitted events consumed by the web UI.