@baselineos/integrity
v1.6.1
Published
BaselineOS Context Integrity Engine — context health, drift detection, expungement, rewriting
Readme
@baselineos/integrity — Content Integrity & Verification
Hash chains, digital signatures, and tamper-evident provenance for AI-generated artifacts.
What It Does
The Integrity layer ensures every artifact produced by BaselineOS can be verified:
- SHA-256 provenance — Every output is hashed and linked to its inputs
- Digital signatures — Ed25519 signatures for non-repudiation
- Tamper detection — Any modification to stored artifacts is detectable
- Evidence bundles — Exportable, self-describing proof packages for auditors
API
import { IntegrityEngine, createProvenance } from '@baselineos/integrity';
const engine = new IntegrityEngine({ algorithm: 'sha256' });
const provenance = createProvenance({
artifact: reportContent,
inputs: [taskDescription, contextData],
agentId: 'analyst-1',
});
// Verify nothing has changed
const valid = engine.verify(provenance);Package Boundary
This package owns:
- Hash algorithms and chain integrity
- Digital signature creation and verification
- Provenance serialization formats
- Evidence bundle assembly
It does not own:
- Storage backends (Studio layer)
- Trust scoring (Autonomy layer)
- Audit log formatting (Govern layer)
License
Apache-2.0
