(function(){const a=window.KIND_REGISTRY||(window.KIND_REGISTRY={}),t=[{id:"run-4827",run_id:"run-4827",run_label:"#4827",agent_id:"ap-reconciliation",agent_name_de:"AP-Reconciliation",owner_uid:"u-alex",owner_email:"demo-contact-redacted.company-x.example",status:"ok",statusLabel:"erfolgreich",started_at:"28.05.2026 17:42",ended_at:"28.05.2026 17:42",total_duration_ms:12400,total_duration_label:"12,4 s",total_cost_eur:"0,042",total_tokens_in:4180,total_tokens_out:2640,step_count:14,decision_count:3,trace_schema_version:"v1",retention_until:"04.06.2026",tier:"Business"},{id:"run-4826",run_id:"run-4826",run_label:"#4826",agent_id:"meeting-prep",agent_name_de:"Meeting-Prep",owner_uid:"u-alex",owner_email:"demo-contact-redacted.company-x.example",status:"warn",statusLabel:"1 Retry",started_at:"28.05.2026 16:12",ended_at:"28.05.2026 16:12",total_duration_ms:3100,total_duration_label:"3,1 s",total_cost_eur:"0,008",total_tokens_in:1100,total_tokens_out:480,step_count:5,decision_count:0,trace_schema_version:"v1",retention_until:"04.06.2026",tier:"Business"},{id:"run-4825",run_id:"run-4825",run_label:"#4825",agent_id:"headshot-pack",agent_name_de:"Headshot-Pack",owner_uid:"u-jane",owner_email:"demo-contact-redacted.company-x.example",status:"ok",statusLabel:"erfolgreich",started_at:"28.05.2026 14:08",ended_at:"28.05.2026 14:10",total_duration_ms:87200,total_duration_label:"1 min 27 s",total_cost_eur:"0,184",total_tokens_in:12640,total_tokens_out:4820,step_count:41,decision_count:2,trace_schema_version:"v1",retention_until:"04.06.2026",tier:"Pro"},{id:"run-4824",run_id:"run-4824",run_label:"#4824",agent_id:"crm-enrich",agent_name_de:"CRM-Enrich",owner_uid:"u-acme",owner_email:"demo-contact-redacted.company-x.example",status:"fail",statusLabel:"Fehler \xB7 Tool-Timeout",started_at:"28.05.2026 11:24",ended_at:"28.05.2026 11:24",total_duration_ms:8400,total_duration_label:"8,4 s",total_cost_eur:"0,011",total_tokens_in:880,total_tokens_out:240,step_count:7,decision_count:1,trace_schema_version:"v1",retention_until:"27.06.2026",tier:"Business"},{id:"run-4823",run_id:"run-4823",run_label:"#4823",agent_id:"podcast-brief",agent_name_de:"Podcast-Brief",owner_uid:"u-reyes",owner_email:"demo-contact-redacted.company-x.example",status:"ok",statusLabel:"erfolgreich",started_at:"28.05.2026 09:00",ended_at:"28.05.2026 09:00",total_duration_ms:14800,total_duration_label:"14,8 s",total_cost_eur:"0,038",total_tokens_in:3640,total_tokens_out:1880,step_count:18,decision_count:4,trace_schema_version:"v1",retention_until:"27.06.2026",tier:"Pro"},{id:"run-4822",run_id:"run-4822",run_label:"#4822",agent_id:"invoice-route",agent_name_de:"Invoice-Router",owner_uid:"u-alex",owner_email:"demo-contact-redacted.company-x.example",status:"running",statusLabel:"running \xB7 24 / ~30 steps",started_at:"28.05.2026 17:46",ended_at:null,total_duration_ms:6800,total_duration_label:"6.8 s \xB7 running",total_cost_eur:"0,019",total_tokens_in:2100,total_tokens_out:980,step_count:24,decision_count:2,trace_schema_version:"v1",retention_until:"04.06.2026",tier:"Business"}],n=[{step_id:"s01",parent_step_id:null,step_type:"plan",kind:"plan",label:"Plan \xB7 5 Strategien erwogen",ts:1,durationMs:800,cost_eur:"0,001",status:"ok",summary_de:"Agent skizziert m\xF6gliche Match-Strategien anhand der letzten 30 Tage Reconciliation-Daten.",attributes:{sample_size:312}},{step_id:"s02",parent_step_id:"s01",step_type:"llm_call",kind:"llm_call",label:"LLM \xB7 gemini-2.5-flash",ts:2,durationMs:1200,cost_eur:"0,003",tokens:{in:412,out:289,cached:0},model:{provider:"google",name:"gemini-2.5-flash",params:{temperature:.2}},status:"ok",summary_de:"Classifies incoming invoices by structural pattern.",preview_in:"You are the AP-Reconciliation agent. Classify these 12 invoices \u2026",preview_out:'{ "structure_hint": "tabular", "currency": "EUR", "candidates": 12 }'},{step_id:"s03",parent_step_id:"s01",step_type:"tool_call",kind:"tool_call",label:'Tool \xB7 db_query("invoices WHERE status\u2026")',ts:3,durationMs:400,cost_eur:"0,000",status:"ok",summary_de:"Holt 12 offene Rechnungen aus der DB.",preview_in:"SELECT * FROM invoices WHERE status IN ('ISSUED','OVERDUE') LIMIT 50",preview_out:"[ \u2026 12 rows \u2026 ]"},{step_id:"s04",parent_step_id:"s01",step_type:"decision_branch",kind:"decision_branch",label:"Decision \xB7 pick match strategy",ts:4,durationMs:100,cost_eur:"0,000",status:"ok",confidence:.87,chosen_option:"fuzzy_match",alternates_considered:[{label:"fuzzy_match",score:.87,reasoning_de:"12 Kandidaten gefunden, Toleranz 0,8. Skaliert linear, akzeptable Genauigkeit f\xFCr diesen Datensatz."},{label:"exact_match",score:.12,reasoning_de:"Strikte \xDCbereinstimmung \u2014 schnellster Pfad falls Daten sauber sind.",why_rejected_de:"Strikte \xDCbereinstimmung lieferte 0 Treffer im Test gegen den letzten Monat."},{label:"embedding_similarity",score:.71,reasoning_de:"Semantische \xDCbereinstimmung \xFCber Vektor\xE4hnlichkeit \u2014 robust gegen Tippfehler.",why_rejected_de:"Hohe Genauigkeit, aber 8\xD7 teurer als fuzzy_match bei vergleichbarem Recall."}]},{step_id:"s05",parent_step_id:"s04",step_type:"tool_call",kind:"tool_call",label:"Tool \xB7 write_match_results",ts:5,durationMs:300,cost_eur:"0,000",status:"ok",summary_de:"Schreibt 12 Matches zur\xFCck in die DB.",preview_out:"OK \xB7 12 rows updated"},{step_id:"s06",parent_step_id:"s05",step_type:"self_critique",kind:"self_critique",label:"Self-critique \xB7 round 1",ts:6,durationMs:1100,cost_eur:"0,002",status:"ok",critique:{round:1,before:"Processing complete. 12 invoices matched.",critique_de:'Output too short \u2014 customer expects per-match reasoning. Expand to "why this match".',after:"Processing complete. 12 invoices matched. Per-match reasoning appended.",accepted:!0}},{step_id:"s07",parent_step_id:"s06",step_type:"llm_call",kind:"llm_call",label:"LLM \xB7 gemini-2.5-flash (refinement)",ts:7,durationMs:1800,cost_eur:"0,004",tokens:{in:612,out:488},model:{provider:"google",name:"gemini-2.5-flash"},status:"ok",summary_de:"Generates extended reasoning for the 12 matches."},{step_id:"s08",parent_step_id:"s07",step_type:"decision_branch",kind:"decision_branch",label:"Decision \xB7 delivery channel",ts:8,durationMs:60,cost_eur:"0,000",status:"ok",confidence:.94,chosen_option:"email_summary",alternates_considered:[{label:"email_summary",score:.94,reasoning_de:"Kunde hat in den letzten 30 Tagen 87 % der Berichte per E-Mail gelesen."},{label:"canvas_only",score:.42,reasoning_de:"Keine E-Mail-Belastung.",why_rejected_de:"Versuche der letzten 14 Tage: 3 von 5 Canvas-Updates blieben ungelesen."}]},{step_id:"s09",parent_step_id:"s08",step_type:"tool_call",kind:"tool_call",label:'Tool \xB7 send_email("demo-contact-redacted.company-x.example")',ts:9,durationMs:240,cost_eur:"0,000",status:"ok",summary_de:"E-Mail mit Match-Bericht versandt.",preview_out:"202 Accepted \xB7 resend_id=msg_28a1f"},{step_id:"s10",parent_step_id:"s08",step_type:"tool_call",kind:"tool_call",label:'Tool \xB7 canvas_update(threadId, "AP-Discovery \u2713")',ts:10,durationMs:180,cost_eur:"0,000",status:"ok",summary_de:"Canvas-Thread aktualisiert mit Status-Tile."},{step_id:"s11",parent_step_id:"s10",step_type:"decision_branch",kind:"decision_branch",label:"Decision \xB7 suggest follow-up?",ts:11,durationMs:80,cost_eur:"0,000",status:"ok",confidence:.61,chosen_option:"no_followup",alternates_considered:[{label:"no_followup",score:.61,reasoning_de:"All 12 invoices matched without conflicts."},{label:"schedule_review",score:.39,reasoning_de:"Routine review after 7 days.",why_rejected_de:"Auto-follow-up threshold (>10 invoices with low confidence) not reached."}]},{step_id:"s12",parent_step_id:"s11",step_type:"phase",kind:"deliver",label:"Deliver",ts:12,durationMs:200,cost_eur:"0,001",status:"ok",summary_de:"Lieferung abgeschlossen. Run beendet."}];a["streamOverview-select"]={id:"streamOverview-select",label:"Select \xB7 Overview",workspaceLabel:"Select",workspaceIcon:"memory",description:"Agent runs \xB7 decisions \xB7 transparency. Each run shows what the agent did AND what it considered.",defaultView:"dashboard",defaultDetail:"none",agentTreatment:"implicit",primaryAction:{label:"Open Runs list",kind:"primary",icon:"list"},secondaryActions:[{label:"Open public ZUI link",icon:"open_in_new"}],heroKpis:[{label:"Runs \xB7 24 h",value:"247",delta:"+18",trend:"up"},{label:"Decisions \xB7 24 h",value:"612",delta:"+42",trend:"up"},{label:"Cost \xB7 24 h",value:"\u20AC 4,82",delta:"+\u20AC0,7",trend:"up"},{label:"Avg duration",value:"8,4 s",delta:"\u22120,3 s",trend:"up"},{label:"Error rate",value:"1,2 %",delta:"\u22120,4 %",trend:"up"},{label:"Retention default",value:"7 d / 30 d",trend:"flat"}],mockItems:[{id:"card-runs",title:"247 runs today",subtitle:"across 12 agent kinds",status:"ok",kpi:"\u20AC 4,82",sub:"Gemini-flash \xB7 71 %",linkOpens:"select.runs"},{id:"card-decisions",title:"612 decisions",subtitle:"visible in the Decision Timeline",status:"ok",kpi:"2,5/run",sub:"avg per run",linkOpens:"select.runs"},{id:"card-running",title:"1 run in progress",subtitle:"Invoice-Router \xB7 6.8 s / ~10 s",status:"warn",kpi:"24/30",sub:"steps \xB7 live",linkOpens:"select.run-detail"},{id:"card-trace",title:"aaas-trace-v1 active",subtitle:"superset of v0 \xB7 LangSmith export ready",status:"ok",kpi:"v1",sub:"OpenInference subset",linkOpens:"select.agents"},{id:"card-pii",title:"PII redaction",subtitle:"email \xB7 phone \xB7 IBAN \xB7 CC",status:"ok",kpi:"AUTO",sub:"at write-time",linkOpens:"select.agents"},{id:"card-replay",title:"Replay-from-step",subtitle:"Phase 2 \xB7 Q3 2026",status:"idle",kpi:"soon",sub:"stubbed in v1",linkOpens:"select.replays"}]},a.selectRuns={id:"selectRuns",label:"Agent Runs",workspaceLabel:"Select",workspaceIcon:"list",description:"Every agent run. Click \u2192 opens the Run detail with the Decision-Timeline.",defaultView:"table",defaultDetail:"split",agentTreatment:"provenance",primaryAction:{label:"Open public ZUI link",kind:"secondary",icon:"open_in_new"},secondaryActions:[{label:"Export OpenInference JSONL",icon:"download"},{label:"Filter month",icon:"filter_list"}],heroKpis:[{label:"All",value:"247",delta:"+18",trend:"up"},{label:"Running",value:"1",delta:"",trend:"flat"},{label:"OK",value:"241",delta:"+18",trend:"up"},{label:"Warn",value:"4",delta:"+1",trend:"down"},{label:"Error",value:"1",delta:"0",trend:"flat"},{label:"Decisions",value:"612",delta:"+42",trend:"up"}],schema:[{key:"run_label",label:"#",mono:!0},{key:"agent_name_de",label:"Agent",wide:!0},{key:"owner_email",label:"Owner"},{key:"started_at",label:"Started",mono:!0},{key:"total_duration_label",label:"Duration",mono:!0,right:!0},{key:"step_count",label:"Steps",mono:!0,right:!0},{key:"decision_count",label:"\u26A1",mono:!0,right:!0},{key:"total_cost_eur",label:"\u20AC",mono:!0,right:!0},{key:"status",label:"Status",kind:"status"}],statusFilters:[{id:"all",label:"All",count:247},{id:"running",label:"Running",count:1},{id:"ok",label:"OK",count:241},{id:"warn",label:"Warn",count:4},{id:"fail",label:"Error",count:1}],mockItems:t.map(e=>({...e,title:`${e.run_label} \xB7 ${e.agent_name_de}`,subtitle:`${e.owner_email} \xB7 ${e.started_at} \xB7 ${e.step_count} Schritte \xB7 ${e.decision_count} Entscheidungen`,preview:`Run       ${e.run_label}
Agent     ${e.agent_name_de}
Owner     ${e.owner_email}
Tier      ${e.tier}
Status    ${e.statusLabel}
Duration  ${e.total_duration_label}
Steps     ${e.step_count}
Decisions ${e.decision_count}
Cost      \u20AC ${e.total_cost_eur}
Tokens    ${e.total_tokens_in} in / ${e.total_tokens_out} out
Schema    aaas-trace-${e.trace_schema_version}
Retention until ${e.retention_until}`,provenance:["agent-executor","tracer"]})),rawRuns:t,moreCount:241,liveData:null},a.selectRunDetail={id:"selectRunDetail",label:"Run detail",workspaceLabel:"Select",workspaceIcon:"timeline",description:"The Zooey core. Decision-Timeline \xB7 Output \xB7 Logs \xB7 Costs. Click a \u26A1 step to expand alternates.",defaultView:"decisionTimeline",defaultDetail:"none",agentTreatment:"provenance",primaryAction:{label:"Open public ZUI link \u2197",kind:"secondary",icon:"open_in_new"},secondaryActions:[{label:"Export JSONL",icon:"download"},{label:"Replay from step (soon)",icon:"replay",disabled:!0},{label:"Purge run",icon:"delete_forever",tone:"fail"}],heroKpis:[{label:"Run",value:t[0].run_label,trend:"flat"},{label:"Agent",value:t[0].agent_name_de,trend:"flat"},{label:"Duration",value:t[0].total_duration_label,trend:"flat"},{label:"Steps",value:String(t[0].step_count),trend:"flat"},{label:"Decisions",value:String(t[0].decision_count),trend:"flat"},{label:"Cost",value:"\u20AC "+t[0].total_cost_eur,trend:"flat"},{label:"Tokens in/out",value:`${t[0].total_tokens_in} / ${t[0].total_tokens_out}`,trend:"flat"}],detailTabs:["Decisions","Output","Logs","Costs"],run:t[0],trace:n,mockItems:[]},a.selectAgents={id:"selectAgents",label:"Agents",workspaceLabel:"Select",workspaceIcon:"smart_toy",description:"Registry of agent kinds emitting traces. Per-agent stats + retention class.",defaultView:"grid",defaultDetail:"drawer",agentTreatment:"implicit",primaryAction:{label:"New agent kind",kind:"primary",icon:"add"},secondaryActions:[{label:"Schema spec",icon:"menu_book"}],heroKpis:[{label:"Agent kinds",value:"12",delta:"+2",trend:"up"},{label:"v1 traces",value:"11",delta:"+2",trend:"up"},{label:"v0 legacy",value:"1",delta:"0",trend:"flat"}],schema:[],mockItems:[{id:"a-ap",title:"AP-Reconciliation",subtitle:"aaas.business \xB7 87 runs / 7 d",status:"ok",statusLabel:"v1 trace",kpi:"\u20AC 0,038/run"},{id:"a-mp",title:"Meeting-Prep",subtitle:"aaas.company \xB7 142 runs / 7 d",status:"ok",statusLabel:"v1 trace",kpi:"\u20AC 0,011/run"},{id:"a-hp",title:"Headshot-Pack",subtitle:"aaas.pics \xB7 18 runs / 7 d",status:"ok",statusLabel:"v1 trace",kpi:"\u20AC 0,184/run"},{id:"a-crm",title:"CRM-Enrich",subtitle:"aaas.business \xB7 64 runs / 7 d",status:"warn",statusLabel:"tool-timeout 4 %",kpi:"\u20AC 0,012/run"},{id:"a-pb",title:"Podcast-Brief",subtitle:"aaas.diy \xB7 31 runs / 7 d",status:"ok",statusLabel:"v1 trace",kpi:"\u20AC 0,028/run"},{id:"a-ir",title:"Invoice-Router",subtitle:"aaas.company \xB7 28 runs / 7 d",status:"ok",statusLabel:"v1 trace",kpi:"\u20AC 0,019/run"},{id:"a-cv",title:"CV-Builder",subtitle:"aaas.quest \xB7 9 runs / 7 d",status:"ok",statusLabel:"v1 trace",kpi:"\u20AC 0,022/run"},{id:"a-th",title:"Threadify (legacy)",subtitle:"aaas.today \xB7 12 runs / 7 d",status:"idle",statusLabel:"v0 phase trace only",kpi:"\u20AC 0,006/run"}],liveData:null},a.selectReplays={id:"selectReplays",label:"Replays",workspaceLabel:"Select",workspaceIcon:"replay",description:"Phase 2 \u2014 replay-from-step. Requires agentExecutor.ts resume support. Stubbed in v1.",defaultView:"placeholder",defaultDetail:"none",agentTreatment:"implicit",primaryAction:{label:"Notify when shipped",kind:"secondary",icon:"notifications"},secondaryActions:[],heroKpis:[{label:"Status",value:"Phase 2",trend:"flat"},{label:"Target",value:"Q3 2026",trend:"flat"},{label:"Dependency",value:"agentExecutor",trend:"flat"}],schema:[],mockItems:[],placeholderHint:"Phase 2 \u2014 once agentExecutor.ts supports resume-from-step, this list shows past replays + their parent runs."},window.SELECT={RUNS:t,TRACE_4827:n}})();
