Fun bot names from persona name pools (#273)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Nahiyan Khan
2026-04-08 16:41:08 -07:00
committed by GitHub
co-authored by Claude Opus 4.6
parent 063ce331dd
commit 68a3d16d9e
23 changed files with 388 additions and 57 deletions
+7
View File
@@ -12,6 +12,7 @@ type RawParsedPersonaPreview = {
avatar_data_url: string | null;
provider: string | null;
model: string | null;
name_pool?: string[];
source_file: string;
};
@@ -32,6 +33,7 @@ export type ParsedPersonaPreview = {
avatarDataUrl: string | null;
provider: string | null;
model: string | null;
namePool: string[];
sourceFile: string;
};
@@ -52,6 +54,7 @@ type RawPersona = {
system_prompt: string;
provider?: string | null;
model?: string | null;
name_pool?: string[];
is_builtin: boolean;
created_at: string;
updated_at: string;
@@ -65,6 +68,7 @@ function fromRawPersona(persona: RawPersona): AgentPersona {
systemPrompt: persona.system_prompt,
provider: persona.provider ?? null,
model: persona.model ?? null,
namePool: persona.name_pool ?? [],
isBuiltIn: persona.is_builtin,
createdAt: persona.created_at,
updatedAt: persona.updated_at,
@@ -86,6 +90,7 @@ export async function createPersona(
systemPrompt: input.systemPrompt,
provider: input.provider,
model: input.model,
namePool: input.namePool ?? [],
},
}),
);
@@ -103,6 +108,7 @@ export async function updatePersona(
systemPrompt: input.systemPrompt,
provider: input.provider,
model: input.model,
namePool: input.namePool ?? [],
},
}),
);
@@ -127,6 +133,7 @@ export async function parsePersonaFiles(
avatarDataUrl: p.avatar_data_url,
provider: p.provider,
model: p.model,
namePool: p.name_pool ?? [],
sourceFile: p.source_file,
})),
skipped: raw.skipped.map((s) => ({
+6
View File
@@ -404,6 +404,7 @@ export type AgentModelInfo = {
};
export type UpdateManagedAgentInput = {
pubkey: string;
name?: string;
model?: string | null;
systemPrompt?: string | null;
};
@@ -416,6 +417,7 @@ export type AgentPersona = {
provider: string | null;
/** Preferred model ID (e.g. "gpt-4o", "claude-sonnet-4-20250514"). */
model: string | null;
namePool: string[];
isBuiltIn: boolean;
createdAt: string;
updatedAt: string;
@@ -427,6 +429,7 @@ export type CreatePersonaInput = {
systemPrompt: string;
provider?: string;
model?: string;
namePool?: string[];
};
export type UpdatePersonaInput = {
@@ -436,7 +439,10 @@ export type UpdatePersonaInput = {
systemPrompt: string;
provider?: string;
model?: string;
namePool?: string[];
};
// ── Team types ────────────────────────────────────────────────────────────────
export type AgentTeam = {
id: string;
name: string;