@idriszade/core
v0.6.1
Published
Pipeline-kit orchestration kernel — Source/Store/Process/Serve with Composer + Pipeline factory
Readme
@idriszade/core
Pipeline-kit orchestration kernel — Source/Store/Process/Serve stages, Pipeline composer, Result<T,E>, retry/rate-limit policies, HMAC webhook sign/verify, and OpenTelemetry hooks.
Install
pnpm add @idriszade/coreOptional peer dependencies (install if you wire OTel exporters yourself):
@opentelemetry/api@opentelemetry/sdk-node@opentelemetry/exporter-trace-otlp-http
Usage
import { createPipelineKit, Pipeline, webhooks } from '@idriszade/core';
const kit = createPipelineKit({ apiKey: process.env.PIPELINE_KIT_API_KEY });
// Compose a pipeline (adapters live in sibling packages)
const pipeline = Pipeline.from(source).through(process).to(serve);
const result = await pipeline.run();
// Sign / verify webhook payloads
const sig = webhooks.sign(payload, secret);
const evt = webhooks.verify(rawBody, sigHeader, secret);Environment variables
| Variable | Required | Purpose |
|----------|----------|---------|
| PK_SIGNING_KEY | Yes (for idempotency) | HMAC key for scopedIdempotencyKey; source for HKDF subkey derivation. |
PK_SIGNING_KEY must be set to a high-entropy random value before using scopedIdempotencyKey (signed serve idempotency keys). Generate one with:
openssl rand -hex 32Treat it as a long-lived production secret. Rotating it invalidates all in-flight idempotency keys for in-progress runs — coordinate rotation with a quiesce window.
Reference
Core types and factory: docs/spec-api-surface.md. Adapter list: docs/spec-adapters.md.
