@kenkaiiii/error-mom-protocol
v0.1.3
Published
Shared event protocol for Error Mom
Downloads
798
Readme
@kenkaiiii/error-mom-protocol
Shared Zod schemas, TypeScript types, and credential redaction used by Error Mom collectors and SDKs. Most applications should install @kenkaiiii/error-mom instead.
Install
npm install @kenkaiiii/error-mom-protocolValidate event batches
import { eventBatchSchema } from "@kenkaiiii/error-mom-protocol";
const result = eventBatchSchema.safeParse(input);
if (!result.success) {
console.error(result.error.issues);
}Exported schemas:
breadcrumbSchemaerrorEventSchemaeventBatchSchema
Exported types:
BreadcrumbErrorEventEventBatchProjectSummaryIssueStatus(observed,open,regressed, orresolved)IssueSummaryIssueSampleIssueDetail
Redact credentials in text
import { redactStringCredentials } from "@kenkaiiii/error-mom-protocol";
const safeMessage = redactStringCredentials(unsafeMessage);The helper preserves useful route context while redacting emails, query credentials, URL userinfo, Telegram bot tokens, Discord and Slack webhook credentials, and explicitly labeled credential paths such as /token/<value> and /api-key/<value>.
Object traversal and secret-key detection belong in the SDK or collector; this helper handles one string.
See the repository README for deployment, SDK, CLI, MCP, and security instructions.
