Skip to main content

Create Your Own Transformer

Build custom transformers for validation, enrichment, or redaction.

The transformer interface

Transformers are functions that receive a context object and return a transformer instance:

Loading...

The context contains:

Loading...

The returned instance must implement:

Loading...

Return values

ReturnBehavior
eventContinue chain with modified event
voidContinue chain, event unchanged
falseStop chain, event dropped

Minimal example

Loading...

Push context

The push function receives an event and a push context:

  • config: Transformer configuration
  • env: Environment dependencies
  • logger: Scoped logger for output
  • id: Transformer identifier
  • collector: Access to collector instance
  • ingest: Request metadata from source (optional)
Loading...

Examples

Enrich: add server-side data

Loading...

Validate: custom check

Loading...

Using your transformer

Loading...

Testing

Loading...

Package convention

Every walkerOS package includes machine-readable metadata for tooling and discovery.

walkerOS field in package.json

Loading...
FieldRequiredDescription
walkerOSYesObject with type metadata (and platform for sources/destinations)

Build-time generation

Use buildDev() from the shared tsup config to auto-generate walkerOS.json:

Loading...

This file contains your package's JSON Schemas and examples, enabling MCP tools and the CLI to validate configurations without installing your package.

Publishing checklist

  • walkerOS field in package.json
  • Keywords include walkeros and walkeros-transformer
  • buildDev() in tsup.config.ts
  • dist/walkerOS.json generated on build
  • npm run test passes
  • npm run lint passes

Next steps

💡 Need Professional Support?
Need professional support with your walkerOS implementation? Check out our services.