@daihum/persona
v0.2.0
Published
DAIHUM character/agent persona contracts: the canonical seat-neutral Principal identity, pure persona identity data with lossless extensions, and participants. Zero dependencies.
Downloads
179
Maintainers
Readme
@daihum/persona
Pure identity data for characters/agents, and seat-neutral participants. Zero runtime dependencies.
import { createPersona, createParticipant, personaGreeting } from "@daihum/persona";
const ada = createPersona({
id: "ada",
kind: "agent",
name: "Ada",
description: "A historian of computing.",
greetings: ["Shall we begin?", "Where were we?"],
extensions: {}, // any format-specific / unknown fields round-trip here
});
const seat = createParticipant("seat-1", ada); // authorKind defaults to persona.kind
personaGreeting(ada); // "Shall we begin?"
personaGreeting(ada, 1); // "Where were we?"Boundaries
- Zero dependencies. This is the leaf identity contract of the character stack.
extensionsis preserved verbatim — community card importers (@daihum/persona-cards) stash unknown fields here for lossless round-trips.- A
ParticipantstoresparticipantId+authorKind, never a transport "role". Perspective (who isassistantvsuser) is resolved at compile time by@daihum/chat-engine, per speaker.
