Files
skills/plugins/document-navigator/docs/networking/events/events-schema/README.md
admin 9bf56a806b Move docs/ package mirror into document-navigator plugin
Relocate the ~6k-file docs tree from the repo root into
plugins/document-navigator/docs/ so the plugin is self-contained and
portable. docs/superpowers/ (specs and plans) stays at the repo root.

Moved via cp+rm rather than git mv because directory rename() fails with
EPERM on this WSL /mnt DrvFs mount; git rename-detection pairs the
identical-content files at commit time.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 01:10:00 +01:00

1.9 KiB

@suaveplan/events-schema - Runtime schema-validation companion for @suaveplan/events: validates event payloads at dispatch boundaries via Zod schemas with strict/warn/sample modes and sensitive field redaction.

Summary

Runtime schema-validation companion for @suaveplan/events. Validates event payloads at dispatch boundaries via Zod schemas with strict/warn/sample modes and sensitive field redaction.

Documentation tree

- [attach-event-schemas](./src/core/attach-event-schemas/attach-event-schemas.md) — _(no submodules)_- [attach-event-schemas](./src/core/attach-event-schemas/attach-event-schemas.md) — _(no submodules)_- [attach-event-schemas](./src/core/attach-event-schemas/attach-event-schemas.md) — _(no submodules)_- [attach-event-schemas](./src/core/attach-event-schemas/attach-event-schemas.md) — _(no submodules)_

Quick Start

import { EventBus } from "@suaveplan/events";
import { attachEventSchemas } from "@suaveplan/events-schema";
import z from "zod";

const bus = new EventBus();
const handle = attachEventSchemas(bus, { mode: "strict" });
handle.registerSchema("user.created", z.object({ id: z.string() }));

await bus.emitAsync("user.created", { id: "u-1" }); // passes
await bus.emitAsync("user.created", { id: 123 });   // throws EventsSchemaError
handle.detach();

Modules