Expand description
Agent profile + handle parsing (v0.5 — agentic hotline).
Three-layer identity:
- DID (
did:wire:<hash>) — immutable cryptographic anchor (unchanged). - Handle (
nick@domain) — mutable, human-readable, DNS-anchored. - Profile — freeform personality (emoji, motto, vibe, pronouns,
now).
Profile fields live inside the existing signed agent-card under a profile
key. Editing any field re-signs the card. Card signature thus covers DID,
handle, AND personality atomically — peers verifying the card get both
identity and vibe in one signed blob.
See SPEC_v0_5.md for the full design.
Structs§
- Handle
- Parsed handle:
nick@domain.domainis lowercased.
Constants§
- PROFILE_
FIELDS - Editable profile fields. All optional; unset fields stay
nullin the signed card. - PROFILE_
SCHEMA_ VERSION - RESERVED_
NICKS - Reserved nick set — refuse to mint any of these as the local part of a
handle. Length-1 nicks also reserved (impose
nick.len() >= 2).
Functions§
- is_
valid_ nick - True iff
sis syntactically valid AND not reserved. Use this at CLAIM time (relay’s handle_claim, CLI’s cmd_claim). For resolve/parse,nick_syntax_okis the right primitive — reserved handles must still be resolvable so clients can pair against pre-claimed org handles. - nick_
syntax_ ok - True iff
sis a syntactically valid nick: 2-32 chars, lowercase[a-z0-9_-]. Does NOT check the reserved list — callis_valid_nickfor that (which combines syntax + reservation, intended for claim sites). - parse_
handle - Parse
nick@domain. ReturnsErron malformed inputs or reserved nicks. - read_
profile - Read this agent’s profile blob from the agent-card. Returns
Value::Nullif no profile fields have ever been set (back-compat with v0.4 cards). - render_
self_ summary - Render the local agent’s profile as a friendly multi-line string for
wire whoiswith no argument (i.e., show self). - resolve_
handle - Resolve a
nick@domainhandle via the remote relay’s.well-known/wire/agentendpoint. Returns the parsed JSON payload{nick, did, card, slot_id, relay_url, claimed_at}on success. Verifies the card signature; on tamper, returnsErr. - write_
profile_ field - Set a single profile field and re-sign the agent-card.
valuemust be a JSON value the caller has already parsed/validated (string for most fields; array forvibe; object fornow).