(()=>{const o=window.KIND_REGISTRY;if(!o)return;const r={LIVE:12,BUILT:9,SCAFFOLDED:6,PLANNED:3,ABSENT:0},l={LIVE:"ok",BUILT:"running",SCAFFOLDED:"warn",PLANNED:"idle",ABSENT:"fail"};function d(e){return"o".repeat(e)+"\xB7".repeat(12-e)}const t=[{id:"as-1",name:"Neon Postgres (CRM+Canvas+identity, ~40 tables)",layer:"gcp",domain:"Data backbone",maturity:"LIVE",mapsTo:"doc 05",path:"infra/neon",note:"Primary system of record."},{id:"as-2",name:"control_panel_configs (10-section business context)",layer:"gcp",domain:"Data backbone",maturity:"LIVE",mapsTo:"doc 01",path:"db/control_panel_configs",note:"Business context source."},{id:"as-3",name:"kg_entities/edges/proposals (graph + HITL approval)",layer:"gcp",domain:"Data backbone",maturity:"SCAFFOLDED",mapsTo:"doc 01/05",path:"db/kg_*",note:"Approval queue exists; graph traversal thin."},{id:"as-4",name:"Firestore\u2192Postgres outbox",layer:"gcp",domain:"Data backbone",maturity:"PLANNED",mapsTo:"doc 05",path:"infra/outbox",note:"Not started."},{id:"as-5",name:"WorkOS AuthKit",layer:"gcp",domain:"Compute+Identity",maturity:"SCAFFOLDED",mapsTo:"identity",path:"auth/workos",note:"Wired, dormant \u2014 not on critical path yet."},{id:"as-6",name:"contextPipeline (5-step enrich)",layer:"gcp",domain:"Compute+Identity",maturity:"LIVE",mapsTo:"doc 01/03",path:"services/context-pipeline",note:"Runs on every intake."},{id:"as-7",name:"registry/shell (kinds/views/streams)",layer:"gcp",domain:"Canvas 2.0",maturity:"BUILT",mapsTo:"presentation",path:"packages/ui/src/canvas",note:"Flag-gated rollout."},{id:"as-8",name:"11 entity collections + Pinecone + 44 agents",layer:"gcp",domain:"aaas.blog",maturity:"LIVE",mapsTo:"doc 02 seed",path:"apps/blog",note:"Full content engine."},{id:"as-9",name:"classify\u2192DAG\u2192gate\u2192HMAC audit",layer:"docker",domain:"aaa engine",maturity:"LIVE",mapsTo:"doc 00",path:"aaa/engine",note:"Core execution loop."},{id:"as-10",name:"per_node_skill_selector (keyword)",layer:"docker",domain:"aaa engine",maturity:"BUILT",mapsTo:"doc 04",path:"aaa/engine/skill-selector",note:"Keyword match only \u2014 no embeddings yet."},{id:"as-11",name:"context_engine (cache+breakers, no graph)",layer:"docker",domain:"harness",maturity:"LIVE",mapsTo:"doc 03",path:"harness/context-engine",note:"Circuit breakers in prod."},{id:"as-12",name:"40 MCP servers",layer:"docker",domain:"harness",maturity:"LIVE",mapsTo:"doc 02",path:"harness/mcp",note:"Full roster connected."},{id:"as-13",name:"GSM operator path + leak-block",layer:"docker",domain:"secrets/IAM",maturity:"LIVE",mapsTo:"secrets",path:"infra/gsm",note:"Enforced at CI."},{id:"as-14",name:"Multi-client isolation",layer:"docker",domain:"secrets/IAM",maturity:"ABSENT",mapsTo:"secrets",path:"\u2014",note:"Single-tenant assumption throughout."},{id:"as-15",name:"Approval-gated self-provisioning",layer:"docker",domain:"secrets/IAM",maturity:"ABSENT",mapsTo:"onboarding",path:"\u2014",note:"Manual provisioning only."}],s=t.reduce((e,a)=>(e[a.maturity]=(e[a.maturity]||0)+1,e),{}),c=Math.round(100*t.filter(e=>e.maturity==="ABSENT"||e.maturity==="PLANNED").length/t.length);o.systemInventory={id:"systemInventory",label:"System inventory",workspaceLabel:"System & Asset Inventory",workspaceIcon:"inventory_2",description:"Everything that exists in the AaaS ecosystem \u2014 GCP/platform side + Docker execution layer \u2014 tagged by maturity and mapped to a requirement. Legend: LIVE \xB7 BUILT \xB7 SCAFFOLDED \xB7 PLANNED \xB7 ABSENT.",defaultView:"swimlanes",defaultDetail:"split",agentTreatment:"none",primaryAction:{label:"Table view",kind:"secondary",icon:"table_rows"},secondaryActions:[],heroKpis:[{label:"LIVE",value:String(s.LIVE||0),delta:"",trend:"up"},{label:"BUILT",value:String(s.BUILT||0),delta:"",trend:"flat"},{label:"SCAFFOLDED",value:String(s.SCAFFOLDED||0),delta:"",trend:"flat"},{label:"PLANNED / ABSENT",value:String((s.PLANNED||0)+(s.ABSENT||0)),delta:"",trend:"down"},{label:"% greenfield",value:c+"%",delta:"",trend:"flat"}],schema:[{key:"name",label:"Asset",wide:!0},{key:"layer",label:"Layer",mono:!0},{key:"domain",label:"Domain"},{key:"maturity",label:"Maturity",kind:"status"},{key:"mapsTo",label:"Maps to",mono:!0},{key:"path",label:"Path",mono:!0},{key:"note",label:"Note",wide:!0}],collections:[{id:"Data backbone",label:"Data backbone",tint:"cy",count:t.filter(e=>e.domain==="Data backbone").length},{id:"Compute+Identity",label:"Compute+Identity",tint:"lav",count:t.filter(e=>e.domain==="Compute+Identity").length},{id:"Canvas 2.0",label:"Canvas 2.0",tint:"gd",count:t.filter(e=>e.domain==="Canvas 2.0").length},{id:"aaas.blog",label:"aaas.blog",tint:"tl",count:t.filter(e=>e.domain==="aaas.blog").length},{id:"aaa engine",label:"aaa engine",tint:"cy",count:t.filter(e=>e.domain==="aaa engine").length},{id:"harness",label:"harness",tint:"lav",count:t.filter(e=>e.domain==="harness").length},{id:"secrets/IAM",label:"secrets/IAM",tint:"red",count:t.filter(e=>e.domain==="secrets/IAM").length}],nodes:(()=>{const e={"Data backbone":[18,22],"Compute+Identity":[42,20],"Canvas 2.0":[68,18],"aaas.blog":[88,30],"aaa engine":[20,72],harness:[50,78],"secrets/IAM":[80,72]};return t.map((a,n)=>{const[u,m]=e[a.domain]||[50,50],p=n%3*6-6;return{id:a.id,label:a.name.split(" (")[0],collection:a.domain,x:u+p,y:m+n%4*5,edges:2+n%5}})})(),edges:[{src:"as-1",tgt:"as-2",confidence:.95},{src:"as-1",tgt:"as-3",confidence:.7},{src:"as-6",tgt:"as-2",confidence:.9},{src:"as-7",tgt:"as-1",confidence:.8},{src:"as-9",tgt:"as-11",confidence:.92},{src:"as-10",tgt:"as-9",confidence:.85},{src:"as-11",tgt:"as-12",confidence:.88},{src:"as-13",tgt:"as-9",confidence:.6},{src:"as-14",tgt:"as-13",confidence:.4},{src:"as-15",tgt:"as-13",confidence:.4}],mockItems:t.map(e=>({id:e.id,name:e.name,status:l[e.maturity],statusLabel:e.maturity,layer:e.layer.toUpperCase(),domain:e.domain,maturity:e.maturity,mapsTo:e.mapsTo,path:e.path,note:e.note,stages:[e.layer.toUpperCase(),e.domain],lastRuns:d(r[e.maturity]),runsToday:e.layer.toUpperCase(),last:e.mapsTo})),dataContract:"PARTIAL \u2014 live source should be a generated feed from IMPLEMENTATION-STATUS.md (or a system_assets table). Seed items above stand in for layout review only."},o.sendConsole={id:"sendConsole",label:"Send Console",workspaceLabel:"A9 \xB7 Send Console",workspaceIcon:"send",description:"Warmup ramp, throughput headroom, and the raw send log.",defaultView:"dashboard",defaultDetail:"drawer",agentTreatment:"provenance",primaryAction:{label:"Send log",kind:"secondary",icon:"table_rows"},secondaryActions:[],heroKpis:[{label:"inboxes warming",value:"6",delta:"",trend:"flat"},{label:"sends today",value:"2.140",delta:"+310",trend:"up"},{label:"bounce rate",value:"0,8 %",delta:"-0,1",trend:"up"},{label:"throughput cap",value:"78 % used",delta:"+6",trend:"down"}],schema:[{key:"title",label:"Send",wide:!0},{key:"status",label:"Status",kind:"status"},{key:"inbox",label:"Inbox",mono:!0},{key:"sentAt",label:"Sent",mono:!0},{key:"bounce",label:"Bounce",mono:!0,right:!0}],mockItems:[{id:"sc-1",status:"ok",title:"Inbox 1 \u2014 warmup day 12",kpi:"82 % ramp",sub:"target day 21",subtitle:"on schedule",inbox:"demo-contact-redacted.company-x.example",sentAt:"07:02",bounce:"0,4 %"},{id:"sc-2",status:"ok",title:"Inbox 2 \u2014 warmup day 9",kpi:"61 % ramp",sub:"target day 21",subtitle:"on schedule",inbox:"demo-contact-redacted.company-x.example",sentAt:"07:04",bounce:"0,6 %"},{id:"sc-3",status:"warn",title:"Inbox 3 \u2014 throughput near cap",kpi:"92 % of cap",sub:"daily send cap",subtitle:"slow down recommended",inbox:"demo-contact-redacted.company-x.example",sentAt:"07:11",bounce:"1,2 %"},{id:"sc-4",status:"fail",title:"Inbox 4 \u2014 bounce spike",kpi:"3,4 % bounce",sub:"threshold 2 %",subtitle:"pause + investigate",inbox:"demo-contact-redacted.company-x.example",sentAt:"07:15",bounce:"3,4 %",error:"Bounce threshold exceeded"}],dataContract:"PARTIAL \u2014 warmup/throughput from growthSendEvents; send_log table for the table-view rows."},o.contentCalendar={id:"contentCalendar",label:"Content Calendar",workspaceLabel:"A11 \xB7 Content Calendar",workspaceIcon:"calendar_month",description:"Scheduled content across the fleet, and the review-gate queue before anything sends.",defaultView:"calendar",defaultDetail:"drawer",agentTreatment:"provenance",primaryAction:{label:"Review gate",kind:"secondary",icon:"view_kanban"},secondaryActions:[],boardColumns:["Drafted","In review","Approved","Sent"],heroKpis:[{label:"scheduled this week",value:"24",delta:"+6",trend:"up"},{label:"awaiting review",value:"5",delta:"",trend:"flat"},{label:"approved today",value:"9",delta:"+3",trend:"up"},{label:"rejected this week",value:"1",delta:"",trend:"flat"}],schema:[{key:"title",label:"Piece",wide:!0},{key:"status",label:"Status",kind:"status"},{key:"agent",label:"Agent"},{key:"dateIso",label:"Date",mono:!0}],mockItems:[{id:"cc-1",stageIdx:1,dateIso:"2026-07-13",title:"Cold outreach \u2014 batch 14",status:"warn",statusLabel:"in review",agent:"cold-email-personalizer",subtitle:"Awaiting reviewer"},{id:"cc-2",stageIdx:2,dateIso:"2026-07-13",title:"Follow-up sequence \u2014 SaaS ICP",status:"ok",statusLabel:"approved",agent:"sequence-writer",subtitle:"Sends at 09:00"},{id:"cc-3",stageIdx:0,dateIso:"2026-07-14",title:"LinkedIn post \u2014 case study",status:"idle",statusLabel:"drafted",agent:"content-writer",subtitle:"Not yet submitted"},{id:"cc-4",stageIdx:3,dateIso:"2026-07-12",title:"Cold outreach \u2014 batch 13",status:"ok",statusLabel:"sent",agent:"cold-email-personalizer",subtitle:"Delivered 07:02"},{id:"cc-5",stageIdx:1,dateIso:"2026-07-15",title:"Newsletter \u2014 weekly roundup",status:"warn",statusLabel:"in review",agent:"newsletter-agent",subtitle:"Flagged: tone check"}],dataContract:"PARTIAL \u2014 content-pipeline tile source + review-gate approvals table; mark HAVE/PARTIAL per row."},o.experimentRatchet={id:"experimentRatchet",label:"Experiment Ratchet",workspaceLabel:"A17 \xB7 Experiment Ratchet",workspaceIcon:"science",description:"The decision trace behind each Lighthouse/variant promotion, and the diff between the current and challenger variant.",defaultView:"decisionTimeline",defaultDetail:"tab",agentTreatment:"provenance",primaryAction:{label:"Variant diff",kind:"secondary",icon:"difference"},secondaryActions:[],heroKpis:[{label:"active experiments",value:"3",delta:"",trend:"flat"},{label:"promoted this month",value:"2",delta:"+1",trend:"up"},{label:"avg lift",value:"+6,4 %",delta:"",trend:"up"},{label:"Lighthouse score",value:"96",delta:"+4",trend:"up"}],schema:[],run:{total_duration_label:"9.8 s"},detailTabs:["Decisions","Output","Logs","Costs"],trace:[{step_id:"s1",step_type:"phase",label:"Phase \xB7 Collect variant metrics",ts:0,durationMs:900,cost_eur:"0,000",status:"ok",summary_de:"Lighthouse + conversion pulled for control and challenger."},{step_id:"s2",step_type:"plan",label:"Plan \xB7 Compare against ratchet threshold",ts:1,durationMs:400,cost_eur:"0,000",status:"ok",summary_de:"Threshold: +3% conversion, no Lighthouse regression."},{step_id:"s3",step_type:"decision_branch",label:"Decision \xB7 Promote challenger variant",ts:2,durationMs:1200,cost_eur:"0,004",status:"ok",summary_de:"Challenger +6,4% conversion, Lighthouse 96 (was 92). Promote.",alternates_considered:["Hold \u2014 insufficient sample size","Roll back \u2014 regression risk"]},{step_id:"s4",step_type:"tool_call",label:"Tool \xB7 promote_variant(challenger)",ts:3,durationMs:2200,cost_eur:"0,001",status:"ok",summary_de:"Challenger variant set as new control."},{step_id:"s5",step_type:"self_critique",label:"Self-critique \xB7 Confidence check",ts:4,durationMs:700,cost_eur:"0,000",status:"ok",summary_de:"Sample size adequate (n=2,140). No confounds detected in send-time distribution.",critique:"Recommend a 48h monitoring window before closing the ratchet."}],diff:{from:"v1.4 (control)",to:"v1.5 (challenger)",added:6,removed:2,left:`Subject: Quick question about {{company}}
Hi {{first_name}},
Saw your recent post about scaling ops.
Worth a 15-min chat?`,right:`Subject: {{first_name}}, one question about {{company}}
Hi {{first_name}},
Saw your recent post about scaling ops \u2014 the part on {{pain_point}} stood out.
Worth a 15-min chat this week?
P.S. \u2014 happy to send a 2-min loom instead.`},mockItems:[],dataContract:"PARTIAL \u2014 decision trace from the ratchet job (aaas-trace-v1 schema); variant diff from the content-variant store."};const i=window.STREAMS&&window.STREAMS.fleet;i&&Array.isArray(i.subPages)&&[{id:"inventory",label:"System Inventory",kind:"systemInventory",note:"\xA71."},{id:"send",label:"Send Console",kind:"sendConsole",note:"A9."},{id:"calendar",label:"Content Calendar",kind:"contentCalendar",note:"A11."},{id:"experiments",label:"Experiment Ratchet",kind:"experimentRatchet",note:"A17."}].forEach(a=>{i.subPages.some(n=>n&&n.id===a.id)||i.subPages.push(a)})})();
