trellis
Version:
Agentic State Engine — event-sourced causal graph with branching, decision traces, and realtime sync for AI-native applications
38 lines • 1.67 kB
TypeScript
export interface PeerRecord {
/** did:key identity of the person. */
did: string;
/** Entity id (`identity:<did>`) — the repo `owner` value. */
entityId: string;
/** Ed25519 public key (base64) — used to verify the genesis attestation. */
publicKey: string;
/** Sprite endpoints that host this person's repos. */
spriteUrls: string[];
/** Optional human name for display. */
displayName?: string;
/**
* Keys that must never resolve for this peer (ADR 0036 §2). A key here is
* filtered out of every resolution path; if `publicKey` itself is listed,
* the record resolves to no keys — the identity is effectively unknown.
* Local-scoped trust fact: propagates socially, not via a directory.
*/
revokedKeys?: string[];
}
export type PeersFile = Record<string, PeerRecord>;
export declare function peersPath(): string;
export declare function loadPeers(): PeersFile;
export declare function savePeers(peers: PeersFile): void;
/** Add or replace a peer by name and persist. */
export declare function addPeer(name: string, record: PeerRecord): PeerRecord;
/** Remove a peer by name; returns true when it existed. */
export declare function removePeer(name: string): boolean;
/**
* Resolve a `{peer}` reference to a known person. Accepts a registered name,
* a bare `did:key:…`, or an `identity:<did>` entity id.
*/
export declare function resolvePeer(ref: string): PeerRecord | null;
/** Split a `{peer}/{repo}` project reference into its two parts. */
export declare function parseProjectRef(ref: string): {
peer: string;
repo: string;
};
//# sourceMappingURL=peer-resolver.d.ts.map