/* eslint-disable */
const D4 = window.PERSONA_DATA;
// ---------- Chat Runtime ----------
const PageChat = ({ persona, go }) => {
const p = persona || D4.personas[0];
const [devMode, setDevMode] = useState(true);
const [input, setInput] = useState("");
const [thinking, setThinking] = useState(false);
const [msgs, setMsgs] = useState([
{ who:"user", text:"Selam Mert. Bugün dükkânda ne var?" },
{ who:"persona", text:"Pek bir şey. Bir adam Hesse soruyordu, gitti. Bu saatte camdan iki dilim ışık geçer, onu seyretmek bedava.", model:"sonnet-4-5", tokens:38, lat:0.9, cost:0.0024 },
{ who:"user", text:"Akademiyi özlüyor musun hâlâ?" },
{ who:"persona", text:"Özlemek doğru kelime değil. Bazen yatağa girerken, bir cümlenin sonunu unutmuş gibi hissediyorum. Sadece o.", model:"sonnet-4-5", tokens:42, lat:1.1, cost:0.0028 },
]);
const send = () => {
if (!input.trim()) return;
const u = input;
setMsgs(m => [...m, {who:"user",text:u}]);
setInput("");
setThinking(true);
setTimeout(()=>{
setMsgs(m => [...m, {who:"persona", text:"Belki. Dükkânın arkasında küçük bir avlu var, oraya çıkıyorum. Bir kediyi taklit ediyorum: yavaş, şüpheli, kibirli. İşe yarıyor.", model:"sonnet-4-5", tokens:36, lat:1.0, cost:0.0023}]);
setThinking(false);
}, 1600);
};
return (
Active
{I("plus",12)} New
{[
["Mert Kavaklı","portrait-soul","Akademiyi özlüyor musun…","2m"],
["Aysel Hanım","portrait-mask","Çayın hâlâ ocakta…","1h"],
["Leyla Demir","portrait-plum","O kaynak güvenilmez…","yesterday"],
["Renée Mercier","portrait-strip","Le beurre, toujours…","2d"],
].map(([nm,cls,prev,when],i)=>(
))}
Channels
{I("globe",14)}OpenAI-compatible API
{I("globe",14)}MCP server
{I("chat",14)}Web playground
{p.name}
v3 · sonnet-4-5 · memory: long-term on
{I("check",12)} drift 0.21 · in tolerance
Dev mode
setDevMode(!devMode)}/>
{I("gear")}
{msgs.map((m,i)=>(
{m.who==="user"?"you":p.name}
{m.text}
{devMode && m.who==="persona" && (
model: {m.model}
tokens: {m.tokens}
latency: {m.lat}s
cost: ${m.cost.toFixed(4)}
req: req_8x21_{i}
)}
))}
{thinking && (
)}
Memory: 142 short-term · 38 long-term embeddings · 4.2k tokens of context
⌘↵ send · ⇧↵ newline · ⌘/ slash menu
Drift over conversation
cosine distance from baseline voice fingerprint · — threshold 0.32
Last response · audit
In-character 0.94
Voice match 0.91
Refusal needed no
Tool calls none
Memory · long-term
{[
"Conversed with Zeki 4× in last 7 days",
"Knows: Zeki teaches comp lit at Bilgi",
"Earlier said: 'Tarkovsky'i izlerken uyumak ayıp değil'",
"Refused: dark roleplay (1 attempt, 2 days ago)",
"Visited topics: Hesse, Pamuk, kediler, Beyoğlu",
].map((t,i)=>(
•
{t}
))}
Quick guards
);
};
// ---------- Lineage ----------
const PageLineage = () => {
const [tab, setTab] = useState("lineage");
// Simple tree layout
const nodes = [
{ id:"t0", name:"Yalnız Akademisyen", kind:"template", x:140, y:60 },
{ id:"v1", name:"Mert v1", kind:"persona", x:140, y:160 },
{ id:"v2", name:"Mert v2", kind:"persona", x:60, y:260 },
{ id:"v3", name:"Mert v3 (current)", kind:"current", x:60, y:360 },
{ id:"f1", name:"Erhan v1 (fork)", kind:"fork", x:240, y:260 },
{ id:"f2", name:"Erhan v2", kind:"persona", x:240, y:360 },
{ id:"f3", name:"Aysel Hanım (refork)", kind:"persona", x:380, y:260 },
];
const edges = [["t0","v1"],["v1","v2"],["v2","v3"],["v1","f1"],["f1","f2"],["v1","f3"]];
return (
Mert Kavaklı · ancestry
Lineage
Forks branch from any version. Every edit is auditable; every version is restorable.
setTab("lineage")}>Lineage tree
setTab("diff")}>Diff (v2 → v3)
{tab==="lineage" && (
{edges.map(([a,b],i)=>{
const A = nodes.find(n=>n.id===a), B = nodes.find(n=>n.id===b);
const mid = (A.y+B.y)/2;
return ;
})}
{nodes.map(n=>{
const fill = n.kind==="current"?"var(--ember)":n.kind==="template"?"var(--bg-3)":n.kind==="fork"?"var(--plum)":"var(--bg-2)";
const stroke = n.kind==="current"?"var(--ember)":"var(--line-2)";
const tcolor = n.kind==="current"?"#1a0d04":"var(--ink)";
return (
{n.name}
{n.kind.toUpperCase()}
);
})}
)}
{tab==="diff" && (
Mert · v2 → v3
{`Soul.coreFear:
- "Bir gün okumayı bitirememek."
+ "Bir gün okumayı sevmediğini fark etmek."
Self.bigFive.E:
- 31
+ 24
Mask.voice:
- "Az kelimeli ama sıcak."
+ "Az kelimeli, virgülsüz, kuru bir mizah."
Surface.appearance: (unchanged)`}
Cascade summary. 2 Soul edits cascaded into 4 Self changes and 1 Mask change. Surface untouched.
Audit verdict on v3
pass
coherence improved 4.4 → 4.6
Restore v2
Approve & lock v3
)}
);
};
// ---------- Marketplace ----------
const MARKETPLACE = [
{ id:"m1", name:"The Gentle Therapist", creator:"@gulin", price:"Free", downloads:"4.2k", rating:4.7, cls:"portrait-mask", arch:"Healer", tags:["en","tr"]},
{ id:"m2", name:"Skeptical Detective", creator:"@noir.studio", price:"$9", downloads:"2.1k", rating:4.5, cls:"portrait-strip", arch:"Witness", tags:["en"]},
{ id:"m3", name:"Babaanne Selma", creator:"@persona.team", price:"Free", downloads:"8.4k", rating:4.9, cls:"portrait-ruby", arch:"Caregiver", tags:["tr"]},
{ id:"m4", name:"The Reluctant Mentor", creator:"@oguz", price:"$12", downloads:"890", rating:4.4, cls:"portrait-self", arch:"Sage", tags:["en","de"]},
{ id:"m5", name:"Dockworker w/ a poem habit", creator:"@kentish", price:"$5", downloads:"1.3k", rating:4.6, cls:"portrait-plum", arch:"Witness", tags:["en"]},
{ id:"m6", name:"Aikido Sensei (Kyoto)", creator:"@hanshi", price:"$19", downloads:"540", rating:4.8, cls:"portrait-soul", arch:"Sage", tags:["ja","en"]},
{ id:"m7", name:"Paranoid Sysadmin", creator:"@root.fm", price:"Free", downloads:"3.7k", rating:4.3, cls:"portrait-sky", arch:"Witness", tags:["en"]},
{ id:"m8", name:"Sufi Hat Sokağı Tüccarı", creator:"@persona.team", price:"$7", downloads:"720", rating:4.7, cls:"portrait-mask", arch:"Trickster", tags:["tr"]},
];
const PageMarket = ({ go }) => (
Marketplace · 1,840 personas
Borrow a soul. Or sell yours.
Curated by humans, audited by Persona. Creators keep 70% of revenue. Every persona ships with its full Soul→Surface; nothing hidden.
Browse all
Become a creator
Trending this week
All Free Paid New Staff picks
{MARKETPLACE.map(m=>(
[ portrait ]
{m.name}
{m.arch}
{m.price}
{m.downloads} downloads · {m.tags.join(", ")}
))}
);
window.PageChat = PageChat;
window.PageLineage = PageLineage;
window.PageMarket = PageMarket;