relay-core

Validate contract.toml schemas and security primitives for Rust event relay pipelines.

2|1|Updated Mar 3, 2026
One-click install
npx skills add https://github.com/heyAyushh/hook --skill relay-core
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: relay-core
Source: https://github.com/heyAyushh/hook/tree/main/crates/relay-core
Command: npx skills add https://github.com/heyAyushh/hook --skill relay-core

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

relay-core centralizes contract schema, validation, envelope models, and security primitives so teams can safely ingest, route, and deliver webhook events without runtime surprises or silent failures.

Core Features & Use Cases

  • Shared contract schema with deny_unknown_fields to prevent misconfiguration and drift across serve, relay, smash, and runtime components.
  • Active-profile fail-closed validation that rejects unsupported active adapters, enforces required adapter keys, and verifies transport references.
  • Envelope and metadata compatibility helpers, HMAC signature verification, payload sanitization with injection detection, timestamp replay protection, and Kafka core configuration loading and validation.
  • Use Case: Validate a contract.toml in CI to catch missing adapters, unknown keys, or security-critical misconfigurations before deployment.

Quick Start

Run validation and tests for the relay-core library to ensure contract schema, adapter schemas, signature checks, and sanitization behavior are correct.

Frequently Asked Questions about relay-core

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

FAQPage Schema
How do I validate a contract.toml file to catch misconfigured webhook adapters before deployment?

To validate a contract.toml file, apply active-profile fail-closed validation that rejects unsupported adapters, enforces required adapter keys, and verifies transport references. This schema validation uses deny_unknown_fields to prevent misconfiguration and silent failures across event relay pipeline components.

How does HMAC signature verification and payload sanitization work for Rust event relay pipelines?

HMAC signature verification and payload sanitization work by applying centralized security primitives to event envelopes. The system detects injection attempts during payload sanitization and verifies HMAC signatures to ensure safe ingestion and routing of webhook events without runtime surprises.

Can I use this to enforce Kafka core configuration validation alongside envelope compatibility checks?

Yes, you can enforce Kafka core configuration validation alongside envelope and metadata compatibility helpers. The system loads and validates Kafka core configurations while simultaneously checking envelope compatibility to ensure safe transport configurations for event delivery.

What is the best way to prevent schema drift across serve, relay, smash, and runtime components in Rust?

The best way to prevent schema drift is enforcing shared contract schemas with deny_unknown_fields across serve, relay, smash, and runtime components. This centralized validation ensures contract.toml correctness and adapter schema conformity throughout development, CI, and runtime.

Why does timestamp replay protection matter when securing webhook event pipelines?

Timestamp replay protection matters because it prevents malicious replay of previously valid webhook events. Combined with HMAC signature verification and payload sanitization, it ensures deterministic transport configurations and safe event delivery without runtime vulnerabilities.