@statewavedev/connectors-core
v0.1.0
Published
Core types and utilities for Statewave connectors
Maintainers
Readme
@statewavedev/connectors-core
Shared TypeScript types and utilities used by every Statewave connector.
Part of the Statewave Connectors ecosystem. You probably want a specific connector (e.g.
@statewavedev/connectors-github) — this package is the contract they all share.
What's here
StatewaveConnector— the interface every connector implementsStatewaveEpisode— the single normalized event shapeEpisodeBuilder— ergonomic helper for assembling episodes with sane defaultsidempotencyKey,summarizeEpisodes— small helperswithRetry— exponential-backoff retry with jitter and abort signalsredact/RedactionRule— best-effort scrubbing for emails, phones, common API key shapesMemorySourceStateStore/FileSourceStateStore— pluggable cursor persistenceConnectorError— typed errors withcode,hint,retryable
Episode shape
interface StatewaveEpisode {
subject: string;
kind: string;
text: string;
occurred_at: string;
source: { type: string; id: string; url?: string };
metadata?: Record<string, unknown>;
idempotency_key: string;
}Status
v0.1.0 preview — see the release notes and connector contract.
