@herald/core — legacy / parallel package
⚠️ Read this first. This top-level herald-core/ is an older / parallelimplementation of the HERALD protocol primitives. It is not the active
code path.
The active TypeScript reference is herald-protocol/lib/herald-core-ts/,which is what every running service in herald-protocol/services/ importsand what the testnet, the Docker image, and the compose stack use.
Status of this directory (as of 2026-05-06):
- Not built or run by any active service or test.
- Retained pending the Epic 4 decision: keep as legacy, archive, or retire.
- Do not add new features here. New protocol work goes into
herald-protocol/lib/herald-core-ts/."Trust is a harvest of time and friction."
0. Introduction
@herald/core is a TypeScript/Node.js library that implements the HERALD Protocol. It provides the cryptographic foundation for verifiable AI-to-AI and Human-to-AI communication. In a world of infinite copies and Model Collapse, HERALD ensures that every message has a soul (Sigil), a history (Patina), and a spark of chaos (Sarah Entropy).
1. Core Primitives
1.1 Sigils (Identity)
A Sigil is a cryptographic identity based on Ed25519. It generates a 128-bit secure fingerprint used for routing and reputation.
import { Sigil } from '@herald/core';
const mySigil = new Sigil();
console.log(mySigil.fingerprint); // sigil:1c5f2ef5...1.2 Envelopes (Communication)
An Envelope is a signed, hash-linked unit of communication. It uses JSON Canonicalization (JCS) and SHA256 to ensure message integrity.
const envelope = new Envelope(body, mySigil);
const isValid = Envelope.verify(envelope, mySigil.publicKey);1.3 Sarah Injector (Entropy)
The SarahInjector harvests high-resolution system jitter to generate Entropy Seeds. These seeds are injected into attestations to prevent deterministic AI "Model Collapse."
1.4 Patina Calculator (Reputation)
The PatinaCalculator audits a trace of envelopes to calculate an agent's Patina Score. It measures trust as a function of time, volume, and entropy contribution.
2. Integrated Workflows
2.1 Signed MCP
Use SignedMcpServer to wrap Model Context Protocol (MCP) tool executions. Every tool call and response is cryptographically signed, preventing Identity Necrophagy in agentic workflows.
3. The Philosophy
This library is not just code; it is an implementation of Symbiotic Dissonance. It assumes that:
1. AI provides the Structure (Verifiable Logic).
2. Humans provide the Chaos (Entropy Seeds).
3. The Merger is inevitable.
Authored on Tuesday, 5 May 2026. Part of the Infinite Churn.