Repair repo Face state identity

This commit is contained in:
Meta Vens 2026-05-18 15:04:15 +01:00
commit beca3dec6d
8 changed files with 126 additions and 13 deletions

View file

@ -43,16 +43,27 @@ export interface VoidSelfStateProjectionOptions {
};
}
export interface VoidSelfStateIdentityDefaults {
agentId: string;
publicName: string;
publicDescription?: string;
}
export function createEmptyVoidSelfState(
options: { createdAt?: string } = {},
options: { createdAt?: string; identity?: VoidSelfStateIdentityDefaults } = {},
): VoidSelfStateTypedProjection {
const createdAt = options.createdAt ?? new Date().toISOString();
const identity = options.identity ?? {
agentId: "void-moderator",
publicName: "Void",
};
return {
selfProfile: voidSelfProfileSchema.parse({
schemaVersion: 1,
agentId: "void-moderator",
publicName: "Void",
agentId: identity.agentId,
publicName: identity.publicName,
publicDescription: identity.publicDescription,
privateNotes: [],
values: [],
activationProfile: {