ankr-asip
v1.0.0
Published
ANKR Service Identity Protocol — 7-layer composable protocol for machine-readable service identity. Compute ASIP addresses, find core nodes, validate codex.json against all schemas.
Maintainers
Readme
ankr-asip
ANKR Service Identity Protocol (ASIP) — 7-layer composable protocol for machine-readable service identity.
Built for service universes at scale. At 200+ services, interpretation equals hallucination. The only solution is binary truth.
Install
npm install ankr-asipThe 7 Layers
| Layer | Name | Schema | Question |
|-------|------|--------|----------|
| L0 | Declaration | forja-protocol | Does the service self-declare? |
| L1 | Manifest | codex.json | Can a machine read its capabilities? |
| L2 | Capability | ankr-32bit-v1 | What can it provably do? |
| L3 | Knowledge | ankr-prajna-8bit-v1 | How completely is it known? |
| L4 | Compliance | claw-design-16bit-v1 | Is its architecture structurally sound? |
| L5 | Design Laws | claude-ankr-5bit-v1 | Does it follow the 5 CA design laws? |
| L6 | Gap Taxonomy | ankr-gap-class-v1 | Which gaps are neural vs structural? |
Every service maps to a 7-bit ASIP address. [1,1,1,1,1,1,1] = core node.
Usage
Compute a service's ASIP address
import { computeAddress, isCoreNode } from 'ankr-asip';
const address = computeAddress(codex);
// → [1, 1, 1, 0, 1, 1, 1]
console.log(isCoreNode(address)); // false — L3 (k_mask) missingFind core nodes across a fleet
import { analyseUniverse, printSummary } from 'ankr-asip';
const result = analyseUniverse(allCodexFiles);
printSummary(result);
// ASIP Universe Analysis
// ══════════════════════
// Services mapped : 120
// Unique addresses : 14 / 128 (10.9% occupied)
// Core nodes [all 7] : 59
// ...Classify gaps
import { computeGapClassification, isSafeToExpose } from 'ankr-asip';
const gaps = computeGapClassification(codex.claw_mask);
// {
// schema: 'ankr-gap-class-v1',
// cgin_gaps: [11, 13], // neural gaps — no customer impact
// structural_gaps: [5, 10], // fix before external exposure
// }
console.log(isSafeToExpose(codex)); // false if structural gaps existGap Classification
Two types of gaps:
CodeGapInternalNeural (CGIN) — service is product-complete, customer-safe. Other services in the platform cannot sense events. No customer impact. Platform intelligence backlog.
CodeGapStructural — may affect customer, security, or platform stability. Resolve before external exposure.
import { CGIN_BITS, STRUCTURAL_BITS, classifyBit } from 'ankr-asip';
classifyBit(11); // 'cgin' — fanOut missing, platform silent
classifyBit(5); // 'structural' — no preHandler, auth gapThe Core Node Hypothesis
In a K-layer orthogonal identity protocol, services that adopt all K layers first are the load-bearing nodes of the distributed brain. Protocol completeness is a proxy for network centrality.
Empirical result (ANKR, 2026): 120 services → 14 unique ASIP addresses → 59 core nodes identified. Cross-validated against known architectural dependency graph.
See companion papers:
- ASIP Protocol Specification (DOI pending)
- The Core Node Hypothesis (DOI pending)
Related packages
ankr-forja— wire L0 (Declaration layer) into any Fastify serviceankr-trust-constants— L2 (Capability) bit constants
License
Apache-2.0
