From 210b715a6f34eaaac7a71760304423993fb1df32 Mon Sep 17 00:00:00 2001 From: Codex Date: Tue, 22 Sep 2026 20:18:00 -0400 Subject: [PATCH] Share admin dashboard views through isolated read-only visitor access --- app/globals.css | 2 + app/page.tsx | 37 +++++++-------- app/visitor/page.tsx | 3 ++ docs/spectator-monitor.md | 25 +++++++++- scripts/spectator-server.py | 91 +++++++++++++++++++++++++++++++++++-- scripts/test-spectator.py | 20 ++++++-- 6 files changed, 152 insertions(+), 26 deletions(-) create mode 100644 app/visitor/page.tsx diff --git a/app/globals.css b/app/globals.css index 99802d5..2bc31c3 100644 --- a/app/globals.css +++ b/app/globals.css @@ -6,3 +6,5 @@ *{box-sizing:border-box}body{margin:0;background:var(--background);color:var(--foreground);font-family:Arial,Helvetica,sans-serif;font-size:16px}button,input,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed}h1,h2,h3,p{margin:0}h1{font:500 34px Georgia,serif;letter-spacing:.01em}h2{font-size:17px;font-weight:600}h3{font-size:16px;font-weight:600}small{font-size:13px;color:var(--muted)}svg{flex-shrink:0}.app-main{flex:1;min-width:0}.brand{display:flex;align-items:center;gap:12px;padding:27px 22px 25px}.brand-mark{font:38px Georgia,serif;color:#e3bb70}.brand strong{font:26px Georgia,serif;color:#e3bb70}.brand small{display:block;letter-spacing:2px;font-size:10px;margin-top:6px}.nav-section{color:#6f829b;letter-spacing:1.8px;font-size:11px;padding:24px 16px 10px}.nav-button{height:45px!important;margin-bottom:4px;padding:0 14px!important;font-size:14px!important}.nav-button svg{width:18px!important;height:18px!important}.sidebar-bottom{border-top:1px solid var(--border);padding:20px;margin:16px 8px 0;line-height:1.6;font-size:13px;color:var(--muted)}.topbar{height:65px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--border);padding:0 32px;background:#0d1622}.crumb{color:var(--muted);font-size:14px;display:flex;align-items:center;gap:12px}.top-right{display:flex;align-items:center;gap:16px;font-size:13px}.sim-badge{color:#e3bb70;border:1px solid #715b30;background:#30271b;padding:5px 10px;border-radius:5px;font-size:12px;white-space:nowrap}.content{padding:30px 32px;max-width:1800px;margin:auto}.page-heading{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:26px}.eyebrow{font-size:11px;letter-spacing:2px;color:#c7a667;text-transform:uppercase;margin-bottom:9px}.subtitle{color:var(--muted);font-size:14px;margin-top:9px;line-height:1.6}.actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.panel{background:linear-gradient(125deg,#121e2d,#0e1824);border:1px solid var(--border);border-radius:8px;overflow:hidden}.panel-head{padding:18px 21px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--border)}.panel-head h2{display:flex;gap:10px;align-items:center}.panel-head svg{color:#93a9c8;width:18px}.panel-body{padding:21px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:23px}.stat{padding:21px;position:relative}.stat-label{font-size:14px;color:var(--muted);display:flex;align-items:center;justify-content:space-between}.stat-value{font-size:32px;font-weight:600;margin:13px 0 7px;font-variant-numeric:tabular-nums}.stat small{font-size:12px}.stat svg{color:#7aa4df;width:20px}.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(280px,1fr);gap:22px}.span-all{grid-column:1/-1}.director-strip{background:linear-gradient(110deg,#243143,#141f2c);border-color:#526072;display:flex;justify-content:space-between;align-items:center;gap:20px;padding:24px;margin-bottom:23px}.director-strip h2{font:22px Georgia,serif;margin-bottom:9px}.director-strip p{font-size:14px;line-height:1.6;color:#b0bfd1}.director-icon{width:48px;height:48px;color:#e3bb70;flex-shrink:0}.director-content{display:flex;align-items:center;gap:20px}.tag{display:inline-block;border:1px solid #314a67;border-radius:4px;padding:3px 7px;font-size:12px;color:#9cbdee;background:#192b42}.tag.online{color:#80d9af;border-color:#285e49;background:#15372d}.tag.paused{color:#e0bf78;border-color:#5a4c2d;background:#302a1f}.tag.offline,.tag.retired{color:#a1aec1;background:#202937;border-color:#394251}.event-row{display:grid;grid-template-columns:51px 77px 1fr;gap:12px;align-items:start;font-size:14px;line-height:1.5;padding:15px 20px;border-bottom:1px solid #202d3c}.event-row:last-child{border:0}.event-time{font:12px monospace;color:#788da6;padding-top:4px}.event-kind{font-size:11px;line-height:24px;color:#98b9ef;text-transform:capitalize}.event-kind.error{color:#fb8994}.event-kind.memory{color:#b8a5e8}.event-kind.lifecycle{color:#7ec9aa}.bot-name{display:flex;align-items:center;gap:12px}.avatar{width:37px;height:40px;border:1px solid #526084;border-radius:7px;display:grid;place-items:center;font:20px Georgia,serif;color:#c7b7ee;background:linear-gradient(140deg,#333555,#19263b)}.avatar.Warrior,.avatar.Paladin{color:#e3bb70;border-color:#786040;background:linear-gradient(140deg,#453a2b,#282b32)}.avatar.Rogue{color:#88cba9;border-color:#3b715e}.bot-name strong{font-size:14px}.bot-name small{display:block;margin-top:4px;font-size:12px}.data-table th{font-size:11px;text-transform:uppercase;letter-spacing:1px;color:#8297b1;padding:14px 20px}.data-table td{padding:15px 20px;font-size:14px}.data-table tbody tr{cursor:pointer}.data-table tbody tr:hover{background:#192738}.recipe-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:18px}.recipe-card{padding:22px;cursor:pointer;text-align:left;width:100%;transition:border-color .2s}.recipe-card:hover{border-color:#7093c5}.recipe-card h3{margin:14px 0 10px}.recipe-card p{color:var(--muted);font-size:14px;line-height:1.6;min-height:46px}.recipe-card .tags{margin-top:18px;display:flex;gap:6px;flex-wrap:wrap}.recipe-symbol{width:40px;height:40px;border:1px solid #4b5674;background:#202c40;display:grid;place-items:center;border-radius:8px;color:#b5c9eb}.section-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:17px}.field{display:flex;flex-direction:column;gap:8px;font-size:14px}.field.full{grid-column:1/-1}.field input,.field textarea{background:#0b1420;border:1px solid #35465c;border-radius:5px;padding:10px;width:100%;color:#e1e9f4}.field textarea{min-height:84px;resize:vertical}.field [data-slot=select-trigger]{width:100%;height:42px;background:#0b1420}.form-footer{display:flex;justify-content:flex-end;gap:10px;margin-top:23px}.range-label{display:flex;justify-content:space-between;font-size:14px;margin-bottom:13px}.range-row{margin:18px 0}.choice-row{display:flex;align-items:center;gap:10px;font-size:14px}.choices{display:grid;grid-template-columns:1fr 1fr;gap:14px}.detail-header{padding:24px 0;display:flex;gap:16px;align-items:center}.detail-header .avatar{width:57px;height:63px;font-size:30px}.detail-header h2{font:27px Georgia,serif}.detail-block{padding:20px 0;border-bottom:1px solid var(--border)}.detail-block h3{margin-bottom:13px}.detail-block p{font-size:14px;color:#b1bfd0;line-height:1.7}.memory{padding:13px;background:#0c1622;border-left:2px solid #8c79b5;margin:12px 0}.memory small{display:block;margin-top:7px}.list-muted{color:var(--muted);font-size:14px;line-height:1.7}.zone-row{display:flex;align-items:center;gap:15px;font-size:14px;margin-bottom:20px}.zone-row .bar{flex:1;height:5px;background:#243449;border-radius:5px}.zone-row .bar i{display:block;height:100%;background:#759acc;border-radius:5px}.zone-row .zone-label{width:116px}.engine-box{display:flex;gap:14px;padding:18px;border:1px solid var(--border);border-radius:6px;margin-bottom:15px}.engine-box svg{color:#d2af73}.engine-box p{font-size:14px;color:var(--muted);line-height:1.6;margin-top:6px}.notice{padding:15px 18px;background:#1e2939;border:1px solid #3b506a;border-radius:6px;font-size:14px;line-height:1.6;color:#b7c8df;margin-bottom:20px}.empty-note{padding:32px;text-align:center;color:var(--muted)}.toolbar{display:flex;gap:12px;align-items:center;margin-bottom:20px}.toolbar input{max-width:330px}.health-row{display:flex;justify-content:space-between;padding:12px 0;font-size:14px;border-bottom:1px solid var(--border)}.health-row span{color:var(--muted)}.status-message{margin-top:15px;color:#b7c8df;font-size:14px}.fineprint{font-size:12px;line-height:1.7;color:#8296b0;margin-top:16px}.mobile-trigger{display:none}.screen-loading{padding:40px}.mobile-zone{display:none}@media(max-width:1100px){.content{padding:24px}.dashboard-grid{grid-template-columns:1fr}.stats{gap:10px}.stat{padding:16px}.section-grid{grid-template-columns:1fr}.director-strip{align-items:flex-start}.topbar{padding:0 24px}}@media(max-width:767px){.mobile-trigger{display:inline-flex}.content{padding:20px 15px}.topbar{padding:0 15px}.top-right>span:last-child{display:none}.page-heading{align-items:flex-start;flex-direction:column;gap:15px}h1{font-size:29px}.stats{grid-template-columns:1fr 1fr}.stat-value{font-size:27px}.director-strip{flex-direction:column;padding:18px}.director-icon{display:none}.recipe-grid,.form-grid{grid-template-columns:1fr}.field.full{grid-column:auto}.event-row{grid-template-columns:42px 1fr;gap:8px}.event-kind{display:none}.recipe-card p{min-height:0}.topbar .crumb{font-size:12px}.panel-head{padding:16px}.panel-body{padding:17px}} .gm-preview{font-family:monospace;font-size:13px;line-height:1.8;margin:20px 0;padding:16px;background:#080e17;border-left:2px solid #688ee3}.gm-preview span{color:#79a9ff}.gm-preview code{color:#b7bfce}.console-output{min-height:390px;max-height:570px;overflow:auto;background:#060c14;padding:25px;font:14px/1.7 monospace}.console-welcome{color:#79a7f5;letter-spacing:1px;margin-bottom:20px}.console-welcome span{color:#a0adc1;font-size:12px;letter-spacing:0}.console-muted{color:#788ba6;margin-bottom:20px}.console-entry{border-top:1px solid #1c2737;padding:14px 0;color:#9ccef2}.console-entry pre{white-space:pre-wrap;overflow-wrap:anywhere;font:13px/1.7 monospace;margin-top:8px}.console-error{color:#ec8e9c}.console-input{display:flex;gap:10px;align-items:center;padding:16px;background:#101b29}.console-input>span{color:#83adf8;font:20px monospace}.console-input input{font-family:monospace}.gm-shortcut{display:flex;justify-content:space-between;gap:15px;border:1px solid #2b3a4e;border-radius:5px;padding:12px;width:100%;margin-bottom:10px;font-size:14px;text-align:left}.gm-shortcut:hover{background:#203047}.gm-shortcut code{font-size:12px;color:#8eafe4} *,::before,::after{border-color:var(--border)} + +.readonly-fieldset{border:0;padding:0;margin:0;min-width:0}fieldset[disabled] button,fieldset[disabled] input,fieldset[disabled] textarea{cursor:default} diff --git a/app/page.tsx b/app/page.tsx index 036810e..3704a6e 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -24,45 +24,46 @@ const options=(items:string[])=>items.map(value=>({value,label:value})); function Avatar({bot}:{bot:Bot}){return } function Panel({title,icon:Icon,children,action,className=''}:any){return

{Icon&&}{title}

{action}
{children}
} function Events({events}:{events:RealmEvent[]}){return
{events.length?[...events].reverse().map(e=>
{new Date(e.at).toLocaleTimeString([],{hour:'2-digit',minute:'2-digit'})}{e.kind}{e.message}
):
No events match this filter.
}
} -export default function Home(){ +export default function Home({readOnly=false}:{readOnly?:boolean}){ const [state,setState]=useState(null),[page,setPage]=useState('Dashboard'),[error,setError]=useState(''),[busy,setBusy]=useState(false),[query,setQuery]=useState(''),[filter,setFilter]=useState('all'),[botId,setBotId]=useState(null),[createOpen,setCreateOpen]=useState(false),[recipe,setRecipe]=useState(null),[recipeOpen,setRecipeOpen]=useState(false),[confirm,setConfirm]=useState<{title:string;description:string;action:any}|null>(null),[capabilities,setCapabilities]=useState({}),[monitor,setMonitor]=useState(null); const refresh=useCallback(async()=>{try{const r=await fetch('/api/state');const d:any=await r.json();if(!r.ok)throw new Error(d.error);setState(d);setError('');}catch(e){setError(e instanceof Error?e.message:'Could not load realm');}},[]); useEffect(()=>{void refresh();void fetch('/api/health').then(r=>r.json()).then(setCapabilities).catch(()=>{});const timer=setInterval(refresh,5000);return()=>clearInterval(timer);},[refresh]); useEffect(()=>{if(page!=='World Monitor')return;let cancelled=false;const load=async()=>{try{const r=await fetch('/api/world-monitor');const d=await r.json();if(!cancelled)setMonitor(d);}catch{if(!cancelled)setMonitor(null);}};void load();const timer=setInterval(load,3000);return()=>{cancelled=true;clearInterval(timer);};},[page]); - const act=useCallback(async(action:any)=>{setBusy(true);try{const r=await fetch('/api/actions',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify(action)});const d:any=await r.json();if(!r.ok)throw new Error(d.error);await refresh();return d;}catch(e){toast.error(e instanceof Error?e.message:'Action failed');await refresh();throw e;}finally{setBusy(false);}},[refresh]); + const act=useCallback(async(action:any)=>{if(readOnly)throw new Error('Visitor access is read-only');setBusy(true);try{const r=await fetch('/api/actions',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify(action)});const d:any=await r.json();if(!r.ok)throw new Error(d.error);await refresh();return d;}catch(e){toast.error(e instanceof Error?e.message:'Action failed');await refresh();throw e;}finally{setBusy(false);}},[refresh,readOnly]); const perform=(action:any)=>{void act(action).catch(()=>{});}; - useEffect(()=>{const context=(document as any).modelContext;if(!context?.registerTool)return;const controller=new AbortController();const register=(tool:any)=>{try{Promise.resolve(context.registerTool(tool,{signal:controller.signal})).catch(()=>{});}catch{}}; + useEffect(()=>{if(readOnly)return;const context=(document as any).modelContext;if(!context?.registerTool)return;const controller=new AbortController();const register=(tool:any)=>{try{Promise.resolve(context.registerTool(tool,{signal:controller.signal})).catch(()=>{});}catch{}}; register({name:'azerothai_read_realm',description:'Read current bot identities, recipes, director settings and recent events.',inputSchema:{type:'object',properties:{},additionalProperties:false},annotations:{readOnlyHint:true},execute:async()=>{const r=await fetch('/api/state');if(!r.ok)throw new Error('Realm unavailable');return r.json();}}); - register({name:'azerothai_create_bot',description:'Create an offline bot identity; does not spawn it in game.',inputSchema:{type:'object',properties:{name:{type:'string'},role:{type:'string'},race:{type:'string'},recipeId:{type:'string'},goal:{type:'string'}},required:['name','role','race','recipeId','goal'],additionalProperties:false},annotations:{readOnlyHint:false},execute:async(input:any)=>act({...input,type:'createBot'})});return()=>controller.abort();},[act]); + register({name:'azerothai_create_bot',description:'Create an offline bot identity; does not spawn it in game.',inputSchema:{type:'object',properties:{name:{type:'string'},role:{type:'string'},race:{type:'string'},recipeId:{type:'string'},goal:{type:'string'}},required:['name','role','race','recipeId','goal'],additionalProperties:false},annotations:{readOnlyHint:false},execute:async(input:any)=>act({...input,type:'createBot'})});return()=>controller.abort();},[act,readOnly]); function nav(p:string){setPage(p);setQuery('');setFilter('all');} const selected=state?.bots.find(b=>b.id===botId); const visible=state?.bots.filter(b=>(`${b.name} ${b.role} ${b.zone}`.toLowerCase().includes(query.toLowerCase()))&&(filter==='all'||b.status===filter))??[]; function botTable(bots:Bot[]){return CharacterStatusLocationRecipe{bots.map(b=>setBotId(b.id)}>
Lv. {b.level} · {b.race} {b.role}
{b.status}{b.zone}{b.personality.name.replace('The ','')}
)}
} - return
A
AzerothAIYOUR WORLD. ALIVE.
REALM MANAGEMENT
{NAV.map(([name,Icon])=>nav(name)}>{name})}

Realm administrator

Prototype 0.1 · Private realm

“What if Azeroth never felt empty?”

Living Realm / {page}
{capabilities.aleActiveRecently?'AZEROTHCORE LIVE':state?.settings.connector==='azerothcore'?'AzerothCore bridge':'SIMULATION REALM'}GM workspace
-
{page==='GM Console'?'THE WORLD IS YOUR SANDBOX':'AZEROTHAI CONTROL PLANE'}

{page==='Dashboard'?'Your realm, alive.':page}

{({'Dashboard':'The people, personalities, and stories that make your world.','World Monitor':'Watch Azeroth breathe: population, activity, systems, and the lives unfolding right now.','Realm Director':'Shape the adventure around you. Let your characters bring it to life.','World & Housing':'Homes, routines, simulation bands, and believable population flow.','Bots':'Give every character a purpose, then let their story unfold.','Bot Recipes':'Same model. Different personalities. A world of possibilities.','Memory & Bonds':'A shared history makes the next encounter matter.','Event Stream':'Follow the decisions and changes happening across your realm.','GM Console':'Pull up a chair. Put on the blue robe. Run your world.','Server & Models':'Connect the game engine and the minds behind your characters.'} as any)[page]}

{page==='Bot Recipes'?:<>}
+ return
A
AzerothAIYOUR WORLD. ALIVE.
REALM MANAGEMENT
{NAV.map(([name,Icon])=>nav(name)}>{name})}

{readOnly?'Realm visitor · Read only':'Realm administrator'}

{readOnly?'Live realm monitor':'Prototype 0.1 · Private realm'}

“What if Azeroth never felt empty?”

Living Realm / {page}
{capabilities.aleActiveRecently?'AZEROTHCORE LIVE':state?.settings.connector==='azerothcore'?'AzerothCore bridge':'SIMULATION REALM'}{readOnly?'Visitor · Read only':'GM workspace'}
+
{page==='GM Console'?'THE WORLD IS YOUR SANDBOX':'AZEROTHAI CONTROL PLANE'}

{page==='Dashboard'?'Your realm, alive.':page}

{({'Dashboard':'The people, personalities, and stories that make your world.','World Monitor':'Watch Azeroth breathe: population, activity, systems, and the lives unfolding right now.','Realm Director':'Shape the adventure around you. Let your characters bring it to life.','World & Housing':'Homes, routines, simulation bands, and believable population flow.','Bots':'Give every character a purpose, then let their story unfold.','Bot Recipes':'Same model. Different personalities. A world of possibilities.','Memory & Bonds':'A shared history makes the next encounter matter.','Event Stream':'Follow the decisions and changes happening across your realm.','GM Console':'Pull up a chair. Put on the blue robe. Run your world.','Server & Models':'Connect the game engine and the minds behind your characters.'} as any)[page]}

{readOnly?:page==='Bot Recipes'?:<>}
{error&&
{error}
} {!state?
{[1,2,3,4].map(n=>)}
:<> - {page==='Dashboard'&&<>
{[[Users,'Active bots',state.bots.filter(b=>b.status==='online'&&(state.settings.connector==='simulation'||b.autonomy?.managed)).length,'Online in the simulation'],[BookOpen,'Bot recipes',state.recipes.length,'Distinct ways to experience the world'],[Brain,'Memories',state.bots.reduce((n,b)=>n+b.memories.length,0),'Stories carried into future decisions'],[Network,'Relationships',state.bots.reduce((n,b)=>n+b.relationships.length,0),'Directed bonds between characters']].map(([Icon,label,value,note]:any)=>
{label}
{value}
{label==='Active bots'&&state.settings.connector!=='simulation'?'Acknowledged by the game bridge':note}
)}
YOUR NEXT ADVENTURE

{state.director.experience}

{state.director.zone} · {state.director.brief}

nav('Bots')}>Manage bots }>{botTable(state.bots.slice(0,5))}
{Array.from(new Set(state.bots.filter(b=>b.status==='online').map(b=>b.zone))).map(zone=>{const n=state.bots.filter(b=>b.status==='online'&&b.zone===zone).length;return
{zone}b.status==='online').length)*100}%`}}/>{n}
})}

Bot locations from the selected connector. Simulation locations are illustrative.

{state.settings.provider==='deterministic'?'Personality simulator':state.settings.model}

{state.settings.provider==='deterministic'?'No model required. Try a decision from any online bot.':'Local model selected. Each decision includes identity and memories.'}

nav('Event Stream')}>View stream }>{}

Set the scene. Announce a gathering. Move a character to the next chapter of their story.

<GM> AzerothAI

Welcome to your world.

.announce An adventure awaits...
} + {page==='Dashboard'&&<>
{[[Users,'Active bots',state.bots.filter(b=>b.status==='online'&&(state.settings.connector==='simulation'||b.autonomy?.managed)).length,'Online in the simulation'],[BookOpen,'Bot recipes',state.recipes.length,'Distinct ways to experience the world'],[Brain,'Memories',state.bots.reduce((n,b)=>n+b.memories.length,0),'Stories carried into future decisions'],[Network,'Relationships',state.bots.reduce((n,b)=>n+b.relationships.length,0),'Directed bonds between characters']].map(([Icon,label,value,note]:any)=>
{label}
{value}
{label==='Active bots'&&state.settings.connector!=='simulation'?'Acknowledged by the game bridge':note}
)}
YOUR NEXT ADVENTURE

{state.director.experience}

{state.director.zone} · {state.director.brief}

nav('Bots')}>{readOnly?'View bots':'Manage bots'} }>{botTable(state.bots.slice(0,5))}
{Array.from(new Set(state.bots.filter(b=>b.status==='online').map(b=>b.zone))).map(zone=>{const n=state.bots.filter(b=>b.status==='online'&&b.zone===zone).length;return
{zone}b.status==='online').length)*100}%`}}/>{n}
})}

Bot locations from the selected connector. Simulation locations are illustrative.

{state.settings.provider==='deterministic'?'Personality simulator':state.settings.model}

{state.settings.provider==='deterministic'?'No model required. Try a decision from any online bot.':'Local model selected. Each decision includes identity and memories.'}

nav('Event Stream')}>View stream }>{}

Set the scene. Announce a gathering. Move a character to the next chapter of their story.

<GM> AzerothAI

Welcome to your world.

.announce An adventure awaits...
} {page==='World Monitor'&&} {page==='Bots'&&<>
setQuery(e.target.value)}/>{visible.length} characters
{visible.length?botTable(visible):
No matching bots. Create a character or adjust your filters.
}
} - {page==='Bot Recipes'&&<>
Recipes are versioned. Saving a recipe preserves existing bots’ personalities until you explicitly apply the new version.
{state.recipes.map((r,i)=>)}
} - {page==='Realm Director'&&} + {page==='Bot Recipes'&&<>
Recipes are versioned. Saving a recipe preserves existing bots’ personalities until you explicitly apply the new version.
{state.recipes.map((r,i)=>)}
} + {page==='Realm Director'&&
} + {page==='World & Housing'&&
} {page==='Memory & Bonds'&&
{state.bots.map(b=>setBotId(b.id)}>Open profile}>

{b.memories.length} memories · {b.relationships.length} relationships

{b.memories.at(-1)?.text??'No memories yet.'}

{b.relationships.map(r=>

{state.bots.find(x=>x.id===r.targetId)?.name} · {r.affinity>0?'+':''}{r.affinity} affinity
{r.note}

)}
)}
} - {page==='Social Life'&&} - {page==='System Health'&&} - {page==='Event Stream'&&} - {page==='Server & Models'&&} - {page==='GM Console'&&} + {page==='Social Life'&&} + {page==='System Health'&&} + {page==='Event Stream'&&} + {page==='Server & Models'&&
} + {page==='GM Console'&&
} }

AzerothAI shapes identity and intent. AzerothCore owns the rules of the world.

Create a characterStart with an identity and recipe. Spawn when you’re ready.{state&&setCreateOpen(false)}/>} - {recipe?'Edit bot recipe':'Create bot recipe'}Traits guide high-level decisions. They never override game rules.setRecipeOpen(false)}/> - {if(!o)setBotId(null)}}>Bot profileIdentity, intent, and the story so far.{selected&&state&&} + {readOnly?'Bot recipe':recipe?'Edit bot recipe':'Create bot recipe'}Traits guide high-level decisions. They never override game rules.
setRecipeOpen(false)}/>
+ {if(!o)setBotId(null)}}>Bot profileIdentity, intent, and the story so far.{selected&&state&&} {if(!o)setConfirm(null)}}>{confirm?.title}{confirm?.description}Cancel{if(confirm)perform(confirm.action);setConfirm(null)}}>Confirm
; } function CreateBot({state,act,busy,close}:any){const [name,setName]=useState(''),[role,setRole]=useState('Priest'),[race,setRace]=useState('Human'),[recipeId,setRecipeId]=useState(state.recipes[0].id),[goal,setGoal]=useState(`Support ${state.director.experience.toLowerCase()} in ${state.director.zone}`);return
{e.preventDefault();try{await act({type:'createBot',name,role,race,recipeId,goal});toast.success('Character created');close();}catch{}}}>