/** * Identity sigil — deterministic visual recognition parameters derived from an * agent's stable identity (its `motebit_id` — itself `SHA-256(pubkey)`-derived). * * Doctrine: `docs/doctrine/agents-as-first-person-trust-graph.md` §4. * * This is a **Ring-1 param primitive, not a renderer.** It maps an identity to * a deterministic, perceptually-spread set of visual parameters; each surface * renders those params natively (Ring 3): SVG/canvas on web, `StyleSheet` on * mobile, a compact glyph on CLI, and a 3D droplet presence in spatial from the * same `geometrySeed`. Emitting pixels here would break the panels pattern and * foreclose the spatial endgame. * * **THE FACE IS RECOGNITION, NOT PROOF.** This derivation is deliberately * NON-CRYPTOGRAPHIC — it exists so a human can recognize a key at a glance, not * to authenticate it. Identity authority is the public key itself and signed * receipts; never a sigil. A near-collision sigil must never be treated as * identity — keep {@link shortFingerprint} (or the full key) primary for any * trust-bearing decision. * * Distinct from `color-presets.ts`: those are the *chosen* creature aesthetic * (self-expression, sRGB pastels). A sigil is a peer's *derived* identity mark — * you cannot choose another agent's sigil because it is a function of their key. * The two coexist on different axes. * * **Distinctness budget** (doctrine §4 bound): entropy is spread across many * orthogonal axes — hue, accent relationship, chroma, lightness, symmetry, * element count, density, rotation, stroke, and a 32-bit geometry seed — so the * perceptually-distinct output space is large. Crucially, distinctness does NOT * rest on hue alone: lightness and the geometric axes (symmetry / count / * density / `geometrySeed`) carry independent entropy and stay discriminable * under color-vision deficiency. * * For a human-comparable recognition aid, {@link wordFingerprint} renders the key * as BIP-39 words (humans compare words far better than abstract shapes) — the * doctrine bound. Both {@link shortFingerprint} and {@link wordFingerprint} are * recognition aids; the full key / signed receipts stay the authority. */ /** A color in the OKLCH perceptually-uniform space. */ export interface OklchColor { /** Lightness, `[0, 1]`. */ l: number; /** Chroma (colorfulness), `[0, ~0.37]`; sigils stay within a vivid in-gamut band. */ c: number; /** Hue angle in degrees, `[0, 360)`. */ h: number; } /** Symmetry class of the generated glyph. A Ring-3 renderer interprets this. */ export type SigilSymmetry = "radial" | "bilateral" | "orbital"; /** * The deterministic visual parameters of an agent's identity sigil. Pure data — * a renderer (Ring 3) turns this into a mark; this module never produces pixels. */ export interface AgentSigil { /** Primary fill/stroke color. */ primary: OklchColor; /** Accent color, in a harmonic relationship to {@link AgentSigil.primary}. */ accent: OklchColor; /** Symmetry class of the mark. */ symmetry: SigilSymmetry; /** Number of repeated elements (petals / orbits / nodes), `3..8`. */ count: number; /** Visual density / fill, `[0, 1)`. */ density: number; /** Base rotation in degrees, `[0, 360)`. */ rotation: number; /** Relative stroke weight, `[0.25, 1)`. */ stroke: number; /** * Opaque deterministic seed (uint32) for the renderer's own geometry * generation, so every surface draws the *same* glyph from the same key * without re-deriving the palette. Ring-3 renderers consume this. */ geometrySeed: number; } /** * Derive an agent's identity sigil parameters from its stable identity string. * Pure, synchronous, deterministic: the same identity always yields the same sigil. * * Pass the agent's `motebit_id` — the canonical identity present at every display * site, itself `UUIDv8(SHA-256(pubkey))` (so still key-derived, one hash removed). * The raw public key works too, but it isn't reliably available client-side (a * known agent's trust record may not carry it), and an agent must show the SAME * face everywhere — so derive from the id that's always present. Doctrine: * `agents-as-first-person-trust-graph.md` §4. * * @param identity - the agent's stable identity (its `motebit_id`, or a public key). * @throws if the input is empty. */ export declare function deriveAgentSigil(identity: string): AgentSigil; /** * Convert an {@link OklchColor} to gamut-clamped sRGB, each channel in `[0, 1]` * (matching the `color-presets.ts` triplet convention). Web surfaces may use * `oklch()` directly; non-CSS surfaces (mobile / spatial) use this. */ export declare function oklchToRgb({ l, c, h }: OklchColor): [number, number, number]; /** * A short, human-comparable rendering of the public key — `head…tail` of the * real key (wallet convention). This is the recognition *authority anchor* that * the doctrine keeps primary; the sigil is only a glance-level aid. * * @param publicKeyHex - 64-char hex Ed25519 public key (case-insensitive). * @param opts.head - leading hex chars to show (default 6). * @param opts.tail - trailing hex chars to show (default 6). * @throws if the input is not a 64-char hex string. */ export declare function shortFingerprint(publicKeyHex: string, opts?: { head?: number; tail?: number; }): string; /** * A human-comparable word fingerprint of the public key — BIP-39 words derived * from the key (e.g. `amber-tide-quiet-orbit`). Humans compare words far better * than abstract shapes or hex, so this is the doctrine's "word-pair" recognition * aid. Like {@link shortFingerprint} it is a recognition aid, never proof — the * full key / signed receipts stay the authority. * * Uses the canonical, SHA-256-verified BIP-39 English wordlist (a frozen public * standard, adopted not minted per the metabolic principle), so the key→words * mapping never drifts. Each word carries 11 bits; the stream is salted distinctly * from the sigil's so the two recognition aids do not correlate. * * @param publicKeyHex - 64-char hex Ed25519 public key (case-insensitive). * @param opts.words - how many words (default 4; the doctrine's "pair" is the * 2-word minimum). * @throws if the input is not a 64-char hex string, or `words` is not in `1..24`. */ export declare function wordFingerprint(publicKeyHex: string, opts?: { words?: number; }): string; //# sourceMappingURL=identity-sigil.d.ts.map