house-lights 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "house-lights",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "The command behind the house-lights skills: draw a lesson or a pitch, play an incident drill, map a way of working or a customer journey, compare Copilot Studio agents — one offline HTML file each.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -108,40 +108,41 @@ body { margin: 0; }
108
108
  <body>
109
109
  <div class="cl" id="app"></div>
110
110
  <script type="application/json" id="cast">{{CAST}}</script>
111
- <script>(()=>{var B="https://github.com/microsoft/skills-for-copilot-studio/blob/main/patterns",N=[{id:"orchestrator-variables",name:"Orchestrator-Generated Variables",sign:"an OnRecognizedIntent topic with an AutomaticTaskInput that has shouldPromptUser: false"},{id:"rai-error-handling",name:"RAI Error Handling",sign:"the OnError topic reads System.Error.SubCode"},{id:"knowledge-hold-message",name:"Knowledge Hold Message",sign:"an OnKnowledgeRequested topic that sends a message"},{id:"prevent-tool-call-leaks",name:"Prevent Tool Call Leaks",sign:"an OnGeneratedResponse topic that sets System.ContinueResponse"},{id:"dynamic-topic-redirect",name:"Dynamic Topic Redirect",sign:"a BeginDialog whose dialog is a =Switch( expression"},{id:"channel-aware-behavior",name:"Channel-Aware Behavior",sign:"a condition or SetVariable that reads System.Activity.ChannelId (not a tool input)"},{id:"date-context",name:"Date Context",sign:"the instructions use Today() or Now()"},{id:"line-breaks-in-messages",name:"Line Breaks in Messages",sign:"<br /> inside a SendActivity or Question"},{id:"conversation-history-variable",name:"Conversation History Variable"},{id:"chain-of-thought-logging",name:"Chain of Thought Logging"},{id:"deterministic-mcp-calls",name:"Deterministic MCP Calls"},{id:"prevent-child-agent-responses",name:"Prevent Child Agent Responses"},{id:"jit-glossary",name:"JIT Glossary"},{id:"jit-user-context",name:"JIT User Context"},{id:"teams-production-hardening",name:"Teams Production Hardening"}];var R={conversation:{en:"A. Conversation",pt:"A. Conversa"},integrations:{en:"B. Integrations",pt:"B. Integra\xE7\xF5es"},knowledge:{en:"C. Knowledge",pt:"C. Conhecimento"},orchestration:{en:"D. Orchestrator",pt:"D. Orquestrador"},governance:{en:"E. Governance",pt:"E. Governan\xE7a"},microsoft:{en:"Microsoft patterns",pt:"Padr\xF5es Microsoft"},declared:{en:"Declared",pt:"Declarado"}},X={"trigger:OnConversationStart":{dim:"conversation",en:"Greeting",pt:"Boas-vindas"},"trigger:OnUnknownIntent":{dim:"conversation",en:"Fallback (when it does not understand)",pt:"Fallback (quando n\xE3o entende)"},"trigger:OnEscalate":{dim:"conversation",en:"Escalation to a person",pt:"Escalonamento para humano",lacks:{en:["does not escalate to a person","do not escalate to a person"],pt:["n\xE3o escala para humano","n\xE3o escalam para humano"]}},"trigger:OnError":{dim:"conversation",en:"Error handling",pt:"Tratamento de erro",lacks:{en:["does not handle errors","do not handle errors"],pt:["n\xE3o trata erro","n\xE3o tratam erro"]}},"trigger:OnRecognizedIntent":{dim:"conversation",en:"A topic of its own, by intent",pt:"T\xF3pico pr\xF3prio, por inten\xE7\xE3o"},"trigger:OnRedirect":{dim:"orchestration",en:"Takes a call from the orchestrator",pt:"Recebe chamada do orquestrador",lacks:{en:["takes no call from the orchestrator","take no call from the orchestrator"],pt:["n\xE3o recebe chamada do orquestrador","n\xE3o recebem chamada do orquestrador"]}},"trigger:OnSelectIntent":{dim:"conversation",en:"Disambiguation (\xABdid you mean\u2026\xBB)",pt:"Desambigua\xE7\xE3o (\xABvoc\xEA quis dizer\u2026\xBB)"},"trigger:OnSignIn":{dim:"conversation",en:"Sign-in",pt:"Login"},"trigger:OnGeneratedResponse":{dim:"conversation",en:"Reviews the generated answer",pt:"Revisa a resposta gerada"},"trigger:OnKnowledgeRequested":{dim:"knowledge",en:"Before searching knowledge",pt:"Antes de buscar no conhecimento"},"trigger:OnToolSelected":{dim:"orchestration",en:"Child chosen as a tool",pt:"Filho escolhido como ferramenta"},"trigger:OnActivity":{dim:"conversation",en:"On every message",pt:"Em toda mensagem"},"setting:generative=on":{dim:"conversation",en:"Generative orchestration on",pt:"Orquestra\xE7\xE3o generativa ligada"},"setting:generative=off":{dim:"conversation",en:"Generative orchestration off",pt:"Orquestra\xE7\xE3o generativa desligada"},"setting:connectable":{dim:"orchestration",en:"Can be called by an orchestrator",pt:"Pode ser chamado por um orquestrador"},"topics:with-model-description":{dim:"conversation",en:"Topics described for the model",pt:"T\xF3picos descritos para o modelo"},"instructions:present":{dim:"governance",en:"Has instructions",pt:"Tem instru\xE7\xF5es",lacks:{en:["has no instructions","have no instructions"],pt:["n\xE3o tem instru\xE7\xF5es","n\xE3o t\xEAm instru\xE7\xF5es"]}},"node:LogCustomTelemetryEvent":{dim:"governance",en:"Logs telemetry",pt:"Registra telemetria",lacks:{en:["logs no telemetry","log no telemetry"],pt:["n\xE3o registra telemetria","n\xE3o registram telemetria"]}},"node:CSATQuestion":{dim:"governance",en:"Asks for satisfaction (CSAT)",pt:"Pergunta a satisfa\xE7\xE3o (CSAT)",lacks:{en:["does not ask for satisfaction","do not ask for satisfaction"],pt:["n\xE3o pergunta a satisfa\xE7\xE3o","n\xE3o perguntam a satisfa\xE7\xE3o"]}},"node:SearchAndSummarizeContent":{dim:"knowledge",en:"Generative answers from knowledge",pt:"Respostas generativas sobre o conhecimento"},"node:SearchKnowledgeSources":{dim:"knowledge",en:"Searches the knowledge sources",pt:"Busca nas fontes de conhecimento"},"yaml-only:triggerCondition":{dim:"knowledge",en:"Search condition only in YAML (the editor may erase it)",pt:"Condi\xE7\xE3o de busca s\xF3 no YAML (a tela pode apagar)"},"knowledge:SharePointSearchSource":{dim:"knowledge",en:"Knowledge in SharePoint",pt:"Conhecimento no SharePoint"},"declared:kpi":{dim:"declared",en:"KPI declared",pt:"KPI declarado",lacks:{en:["has no KPI declared","have no KPI declared"],pt:["n\xE3o tem KPI declarado","n\xE3o t\xEAm KPI declarado"]}},"declared:owner":{dim:"declared",en:"Owner declared",pt:"Dono declarado",lacks:{en:["has no owner declared","have no owner declared"],pt:["n\xE3o tem dono declarado","n\xE3o t\xEAm dono declarado"]}}},he=Object.fromEntries(N.map(e=>[e.id,e.name])),ge=[["calls:topic:","conversation","Calls the topic","Chama o t\xF3pico"],["trigger:","conversation","Trigger","Gatilho"],["setting:","conversation","Setting","Configura\xE7\xE3o"],["connector:","integrations","Connector","Conector"],["operation:","integrations","Operation","Opera\xE7\xE3o"],["connref:","integrations","Connection reference","Refer\xEAncia de conex\xE3o"],["mcp:","integrations","MCP server","Servidor MCP"],["flow:","integrations","Flow","Fluxo"],["knowledge:","knowledge","Knowledge","Conhecimento"],["node:","governance","Node","N\xF3"],["calls:","orchestration","Calls","Chama"],["child:","orchestration","Child","Filho"],["var-in:","orchestration","Receives from the orchestrator","Recebe do orquestrador"],["var:","orchestration","Global variable","Vari\xE1vel global"],["model:","governance","Model","Modelo"],["auth:","governance","Sign-in","Login"],["ms:","microsoft","Microsoft pattern:","Padr\xE3o Microsoft:"],["declared:","declared","Declared:","Declarado:"]],J=e=>ge.find(([n])=>e.startsWith(n));function A(e){return X[e]?.dim??J(e)?.[1]??"governance"}function j(e,n){let o=X[e];if(o)return o[n];let a=/^knowledge:count=(\d+)$/.exec(e);if(a){let l=Number(a[1]);return n==="pt"?`${l} ${l===1?"fonte":"fontes"} de conhecimento`:`${l} knowledge ${l===1?"source":"sources"}`}let t=J(e);if(!t)return e;let i=e.slice(t[0].length);return t[0]==="ms:"&&(i=he[i]??i),t[0]==="auth:"&&i==="None"?n==="pt"?"Sem login":"No sign-in":`${t[n==="pt"?3:2]} ${i}`}var ue={specialist:{en:["specialist","specialists"],pt:["especialista","especialistas"]},orchestrator:{en:["orchestrator","orchestrators"],pt:["orquestrador","orquestradores"]}},z=(e,n,o)=>ue[e][n][o===1?0:1],U={en:{summary:"Summary",matrix:"Matrix",patterns:"Patterns",off:"Off pattern",gaps:"Gaps",conflicts:"Conflicts",agents:"Cast",evidence:"Evidence",declared:"Declared",unknown:"Not understood",dimension:"Dimension",fact:"Fact",key:"Key",agent:"Who",name:"Name",role:"Role",scope:"Scope",share:"Share",have:"Who has it",lack:"Who lacks it",decision:"Decision",why:"Why",missing:"Missing",accepted:"Accepted pattern",rule:"Rule",says:"Says",notMet:"Who does not meet it",value:"Value",source:"Source",inYaml:"In the YAML",file:"File",line:"Line",facts:"Facts",alone:"Only it has",children:"Children",kind:"Kind",yes:"yes",no:"no",accept:"accepted",reject:"rejected",platform:"platform",specialist:"specialist",orchestrator:"orchestrator",title:"The cast, compared",look:"To look at",nothing:"Nothing to look at",privacy:"This file holds the client\u2019s data: keep it in the client\u2019s environment.",count:{agents:"In the cast",orchestrators:"Orchestrators",specialists:"Specialists",patterns:"Patterns",off:"Off a pattern",gaps:"Rules not met",conflicts:"Conflicts",solos:"Only one has it"},why_:{yaml:"YAML that does not read",empty:"empty",kind:"a kind Copilot Studio does not have",file:"not a Copilot Studio file"}},pt:{summary:"Resumo",matrix:"Matriz",patterns:"Padr\xF5es",off:"Fora do padr\xE3o",gaps:"Lacunas",conflicts:"Conflitos",agents:"Elenco",evidence:"Evid\xEAncias",declared:"Declarado",unknown:"N\xE3o entendeu",dimension:"Dimens\xE3o",fact:"Fato",key:"Chave",agent:"Quem",name:"Nome",role:"Papel",scope:"Escopo",share:"Quantos",have:"Quem tem",lack:"Quem falta",decision:"Decis\xE3o",why:"Por qu\xEA",missing:"Falta",accepted:"Padr\xE3o aceito",rule:"Regra",says:"Diz",notMet:"Quem n\xE3o cumpre",value:"Valor",source:"Fonte",inYaml:"No YAML",file:"Arquivo",line:"Linha",facts:"Fatos",alone:"S\xF3 ele tem",children:"Filhos",kind:"Kind",yes:"sim",no:"n\xE3o",accept:"aceito",reject:"rejeitado",platform:"plataforma",specialist:"especialista",orchestrator:"orquestrador",title:"Elenco comparado",look:"Para olhar",nothing:"Nada para olhar",privacy:"Este arquivo tem dados do cliente: deixe-o no ambiente dele.",count:{agents:"No elenco",orchestrators:"Orquestradores",specialists:"Especialistas",patterns:"Padr\xF5es",off:"Fora do padr\xE3o",gaps:"Regras n\xE3o cumpridas",conflicts:"Conflitos",solos:"S\xF3 um tem"},why_:{yaml:"YAML que n\xE3o se l\xEA",empty:"vazio",kind:"um kind que o Copilot Studio n\xE3o tem",file:"n\xE3o \xE9 arquivo do Copilot Studio"}}};function q(e){let n=o=>o.share===1&&!o.decision&&!e.offPattern.some(a=>a.key===o.key);return{look:e.patterns.filter(o=>!n(o)),everyone:e.patterns.filter(n)}}var Z=new TextEncoder,K=e=>e.replace(/[&<>"]/g,n=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"})[n]).replace(/[\u0000-\u0008\u000B\u000C\u000E-\u001F]/g,""),M=e=>e<26?String.fromCharCode(65+e):M(Math.floor(e/26)-1)+String.fromCharCode(65+e%26),ye=e=>e.replace(/[:\\/?*[\]]/g," ").slice(0,31)||"Sheet";function $e(e){let n=[{}],o=f=>JSON.stringify([f.bold??!1,f.fill??"",f.color??"",f.center??!1,f.wrap??!1]),a=new Map([[o({}),0]]);for(let f of e)for(let y of f.rows)for(let u of y){if(typeof u!="object")continue;let{v:P,...C}=u,L=o(C);a.has(L)||(a.set(L,n.length),n.push(C))}let t=new Map([["|",0]]),i=new Map([["",0]]),l=f=>{let y=`${f.bold?"b":""}|${f.color??""}`;return t.has(y)||t.set(y,t.size),t.get(y)},r=f=>f.fill?(i.has(f.fill)||i.set(f.fill,i.size+1),i.get(f.fill)):0,m=n.map(f=>{let y=f.center||f.wrap?`<alignment${f.center?' horizontal="center"':""}${f.wrap?' wrapText="1"':""} vertical="top"/>`:'<alignment vertical="top"/>';return`<xf numFmtId="0" fontId="${l(f)}" fillId="${r(f)}" borderId="${f.fill||f.bold?1:0}" xfId="0" applyFont="1" applyFill="1" applyBorder="1" applyAlignment="1">${y}</xf>`}),c=[...t.keys()].map(f=>{let[y,u]=f.split("|");return`<font>${y?"<b/>":""}<sz val="11"/>${u?`<color rgb="FF${u}"/>`:""}<name val="Calibri"/><family val="2"/></font>`}),g=['<fill><patternFill patternType="none"/></fill>','<fill><patternFill patternType="gray125"/></fill>',...[...i.keys()].filter(Boolean).map(f=>`<fill><patternFill patternType="solid"><fgColor rgb="FF${f}"/><bgColor indexed="64"/></patternFill></fill>`)];return{xml:`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
111
+ <script>(()=>{var B="https://github.com/microsoft/skills-for-copilot-studio/blob/main/patterns",I=[{id:"orchestrator-variables",name:"Orchestrator-Generated Variables",sign:"an OnRecognizedIntent topic with an AutomaticTaskInput that has shouldPromptUser: false"},{id:"rai-error-handling",name:"RAI Error Handling",sign:"the OnError topic reads System.Error.SubCode"},{id:"knowledge-hold-message",name:"Knowledge Hold Message",sign:"an OnKnowledgeRequested topic that sends a message"},{id:"prevent-tool-call-leaks",name:"Prevent Tool Call Leaks",sign:"an OnGeneratedResponse topic that sets System.ContinueResponse"},{id:"dynamic-topic-redirect",name:"Dynamic Topic Redirect",sign:"a BeginDialog whose dialog is a =Switch( expression"},{id:"channel-aware-behavior",name:"Channel-Aware Behavior",sign:"a condition or SetVariable that reads System.Activity.ChannelId (not a tool input)"},{id:"date-context",name:"Date Context",sign:"the instructions use Today() or Now()"},{id:"line-breaks-in-messages",name:"Line Breaks in Messages",sign:"<br /> inside a SendActivity or Question"},{id:"conversation-history-variable",name:"Conversation History Variable"},{id:"chain-of-thought-logging",name:"Chain of Thought Logging"},{id:"deterministic-mcp-calls",name:"Deterministic MCP Calls"},{id:"prevent-child-agent-responses",name:"Prevent Child Agent Responses"},{id:"jit-glossary",name:"JIT Glossary"},{id:"jit-user-context",name:"JIT User Context"},{id:"teams-production-hardening",name:"Teams Production Hardening"}];var j={conversation:{en:"A. Conversation",pt:"A. Conversa"},integrations:{en:"B. Integrations",pt:"B. Integra\xE7\xF5es"},knowledge:{en:"C. Knowledge",pt:"C. Conhecimento"},orchestration:{en:"D. Orchestrator",pt:"D. Orquestrador"},governance:{en:"E. Governance",pt:"E. Governan\xE7a"},microsoft:{en:"Microsoft patterns",pt:"Padr\xF5es Microsoft"},declared:{en:"Declared",pt:"Declarado"}},Z={"trigger:OnConversationStart":{dim:"conversation",en:"Greeting",pt:"Boas-vindas"},"trigger:OnUnknownIntent":{dim:"conversation",en:"Fallback (when it does not understand)",pt:"Fallback (quando n\xE3o entende)"},"trigger:OnEscalate":{dim:"conversation",en:"Escalation to a person",pt:"Escalonamento para humano",lacks:{en:["does not escalate to a person","do not escalate to a person"],pt:["n\xE3o escala para humano","n\xE3o escalam para humano"]}},"trigger:OnError":{dim:"conversation",en:"Error handling",pt:"Tratamento de erro",lacks:{en:["does not handle errors","do not handle errors"],pt:["n\xE3o trata erro","n\xE3o tratam erro"]}},"trigger:OnRecognizedIntent":{dim:"conversation",en:"A topic of its own, by intent",pt:"T\xF3pico pr\xF3prio, por inten\xE7\xE3o"},"trigger:OnRedirect":{dim:"orchestration",en:"Takes a call from the orchestrator",pt:"Recebe chamada do orquestrador",lacks:{en:["takes no call from the orchestrator","take no call from the orchestrator"],pt:["n\xE3o recebe chamada do orquestrador","n\xE3o recebem chamada do orquestrador"]}},"trigger:OnSelectIntent":{dim:"conversation",en:"Disambiguation (\xABdid you mean\u2026\xBB)",pt:"Desambigua\xE7\xE3o (\xABvoc\xEA quis dizer\u2026\xBB)"},"trigger:OnSignIn":{dim:"conversation",en:"Sign-in",pt:"Login"},"trigger:OnGeneratedResponse":{dim:"conversation",en:"Reviews the generated answer",pt:"Revisa a resposta gerada"},"trigger:OnKnowledgeRequested":{dim:"knowledge",en:"Before searching knowledge",pt:"Antes de buscar no conhecimento"},"trigger:OnToolSelected":{dim:"orchestration",en:"Child chosen as a tool",pt:"Filho escolhido como ferramenta"},"trigger:OnActivity":{dim:"conversation",en:"On every message",pt:"Em toda mensagem"},"setting:generative=on":{dim:"conversation",en:"Generative orchestration on",pt:"Orquestra\xE7\xE3o generativa ligada"},"setting:generative=off":{dim:"conversation",en:"Generative orchestration off",pt:"Orquestra\xE7\xE3o generativa desligada"},"setting:connectable":{dim:"orchestration",en:"Can be called by an orchestrator",pt:"Pode ser chamado por um orquestrador"},"topics:with-model-description":{dim:"conversation",en:"Topics described for the model",pt:"T\xF3picos descritos para o modelo"},"instructions:present":{dim:"governance",en:"Has instructions",pt:"Tem instru\xE7\xF5es",lacks:{en:["has no instructions","have no instructions"],pt:["n\xE3o tem instru\xE7\xF5es","n\xE3o t\xEAm instru\xE7\xF5es"]}},"node:LogCustomTelemetryEvent":{dim:"governance",en:"Logs telemetry",pt:"Registra telemetria",lacks:{en:["logs no telemetry","log no telemetry"],pt:["n\xE3o registra telemetria","n\xE3o registram telemetria"]}},"node:CSATQuestion":{dim:"governance",en:"Asks for satisfaction (CSAT)",pt:"Pergunta a satisfa\xE7\xE3o (CSAT)",lacks:{en:["does not ask for satisfaction","do not ask for satisfaction"],pt:["n\xE3o pergunta a satisfa\xE7\xE3o","n\xE3o perguntam a satisfa\xE7\xE3o"]}},"node:SearchAndSummarizeContent":{dim:"knowledge",en:"Generative answers from knowledge",pt:"Respostas generativas sobre o conhecimento"},"node:SearchKnowledgeSources":{dim:"knowledge",en:"Searches the knowledge sources",pt:"Busca nas fontes de conhecimento"},"yaml-only:triggerCondition":{dim:"knowledge",en:"Search condition only in YAML (the editor may erase it)",pt:"Condi\xE7\xE3o de busca s\xF3 no YAML (a tela pode apagar)"},"knowledge:SharePointSearchSource":{dim:"knowledge",en:"Knowledge in SharePoint",pt:"Conhecimento no SharePoint"},"declared:kpi":{dim:"declared",en:"KPI declared",pt:"KPI declarado",lacks:{en:["has no KPI declared","have no KPI declared"],pt:["n\xE3o tem KPI declarado","n\xE3o t\xEAm KPI declarado"]}},"declared:owner":{dim:"declared",en:"Owner declared",pt:"Dono declarado",lacks:{en:["has no owner declared","have no owner declared"],pt:["n\xE3o tem dono declarado","n\xE3o t\xEAm dono declarado"]}}},ue=Object.fromEntries(I.map(e=>[e.id,e.name])),$e=[["reaches:","conversation","A topic leads to it (part of trigger:<value>)","Um t\xF3pico leva a ele (parte de trigger:<valor>)"],["calls:topic:","conversation","Calls the topic (one not found)","Chama o t\xF3pico (n\xE3o encontrado)"],["trigger:","conversation","Trigger","Gatilho"],["setting:","conversation","Setting","Configura\xE7\xE3o"],["connector:","integrations","Connector","Conector"],["operation:","integrations","Operation","Opera\xE7\xE3o"],["connref:","integrations","Connection reference","Refer\xEAncia de conex\xE3o"],["mcp:","integrations","MCP server","Servidor MCP"],["flow:","integrations","Flow","Fluxo"],["knowledge:","knowledge","Knowledge","Conhecimento"],["node:","governance","Node","N\xF3"],["calls:","orchestration","Calls","Chama"],["child:","orchestration","Child","Filho"],["var-in:","orchestration","Receives from the orchestrator","Recebe do orquestrador"],["var:","orchestration","Global variable","Vari\xE1vel global"],["model:","governance","Model","Modelo"],["auth:","governance","Sign-in","Login"],["ms:","microsoft","Microsoft pattern:","Padr\xE3o Microsoft:"],["declared:","declared","Declared:","Declarado:"]],ee=e=>$e.find(([n])=>e.startsWith(n));function R(e){return e.startsWith("reaches:")?R(`trigger:${e.slice(8)}`):Z[e]?.dim??ee(e)?.[1]??"governance"}var z=e=>e.startsWith("reaches:")?`trigger:${e.slice(8)}`:void 0,J=(e,n)=>n?.[e]??e;function O(e,n,o){let a=Z[e];if(a)return a[n];if(e.startsWith("reaches:")){let r=O(`trigger:${e.slice(8)}`,n);return n==="pt"?`Um t\xF3pico leva a \xAB${r}\xBB`:`A topic leads to \xAB${r}\xBB`}let t=/^knowledge:count=(\d+)$/.exec(e);if(t){let r=Number(t[1]);return n==="pt"?`${r} ${r===1?"fonte":"fontes"} de conhecimento`:`${r} knowledge ${r===1?"source":"sources"}`}let i=ee(e);if(!i)return e;let l=e.slice(i[0].length);if(i[0]==="ms:"&&(l=ue[l]??l),i[0]==="auth:"&&l==="None")return n==="pt"?"Sem login":"No sign-in";if(["connector:","connref:","mcp:","calls:"].includes(i[0])&&(l=J(l,o)),i[0]==="operation:"){let[r,c]=[l.slice(0,l.indexOf("/")),l.slice(l.indexOf("/")+1)];l=`${J(r,o)} \xB7 ${c}`}return`${i[n==="pt"?3:2]} ${l}`}var ye={specialist:{en:["specialist","specialists"],pt:["especialista","especialistas"]},orchestrator:{en:["orchestrator","orchestrators"],pt:["orquestrador","orquestradores"]}},K=(e,n,o)=>ye[e][n][o===1?0:1],U={en:{summary:"Summary",matrix:"Matrix",patterns:"Patterns",off:"Off pattern",gaps:"Gaps",conflicts:"Conflicts",agents:"Cast",evidence:"Evidence",declared:"Declared",unknown:"Not understood",dimension:"Dimension",fact:"Fact",key:"Key",agent:"Who",name:"Name",role:"Role",scope:"Scope",share:"Share",have:"Who has it",lack:"Who lacks it",decision:"Decision",why:"Why",missing:"Missing",accepted:"Accepted pattern",rule:"Rule",says:"Says",notMet:"Who does not meet it",value:"Value",source:"Source",inYaml:"In the YAML",file:"File",line:"Line",facts:"Facts",alone:"Only it has",children:"Children",kind:"Kind",yes:"yes",no:"no",accept:"accepted",reject:"rejected",platform:"platform",specialist:"specialist",orchestrator:"orchestrator",title:"The cast, compared",look:"To look at",nothing:"Nothing to look at",privacy:"This file holds the client\u2019s data: keep it in the client\u2019s environment.",count:{agents:"In the cast",orchestrators:"Orchestrators",specialists:"Specialists",patterns:"Patterns",off:"Off a pattern",gaps:"Rules not met",conflicts:"Conflicts",solos:"Only one has it"},why_:{yaml:"YAML that does not read",empty:"empty",kind:"a kind Copilot Studio does not have",file:"not a Copilot Studio file"}},pt:{summary:"Resumo",matrix:"Matriz",patterns:"Padr\xF5es",off:"Fora do padr\xE3o",gaps:"Lacunas",conflicts:"Conflitos",agents:"Elenco",evidence:"Evid\xEAncias",declared:"Declarado",unknown:"N\xE3o entendeu",dimension:"Dimens\xE3o",fact:"Fato",key:"Chave",agent:"Quem",name:"Nome",role:"Papel",scope:"Escopo",share:"Quantos",have:"Quem tem",lack:"Quem falta",decision:"Decis\xE3o",why:"Por qu\xEA",missing:"Falta",accepted:"Padr\xE3o aceito",rule:"Regra",says:"Diz",notMet:"Quem n\xE3o cumpre",value:"Valor",source:"Fonte",inYaml:"No YAML",file:"Arquivo",line:"Linha",facts:"Fatos",alone:"S\xF3 ele tem",children:"Filhos",kind:"Kind",yes:"sim",no:"n\xE3o",accept:"aceito",reject:"rejeitado",platform:"plataforma",specialist:"especialista",orchestrator:"orquestrador",title:"Elenco comparado",look:"Para olhar",nothing:"Nada para olhar",privacy:"Este arquivo tem dados do cliente: deixe-o no ambiente dele.",count:{agents:"No elenco",orchestrators:"Orquestradores",specialists:"Especialistas",patterns:"Padr\xF5es",off:"Fora do padr\xE3o",gaps:"Regras n\xE3o cumpridas",conflicts:"Conflitos",solos:"S\xF3 um tem"},why_:{yaml:"YAML que n\xE3o se l\xEA",empty:"vazio",kind:"um kind que o Copilot Studio n\xE3o tem",file:"n\xE3o \xE9 arquivo do Copilot Studio"}}};function q(e){let n=t=>e.offPattern.some(i=>i.key===t.key||i.partOf===t.key),o=t=>t.share===1&&!t.decision&&!n(t),a=e.patterns.filter(t=>!t.partOf);return{look:a.filter(t=>!o(t)),everyone:a.filter(o)}}var te=new TextEncoder,Y=e=>e.replace(/[&<>"]/g,n=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"})[n]).replace(/[\u0000-\u0008\u000B\u000C\u000E-\u001F]/g,""),M=e=>e<26?String.fromCharCode(65+e):M(Math.floor(e/26)-1)+String.fromCharCode(65+e%26),ke=e=>e.replace(/[:\\/?*[\]]/g," ").slice(0,31)||"Sheet";function be(e){let n=[{}],o=d=>JSON.stringify([d.bold??!1,d.fill??"",d.color??"",d.center??!1,d.wrap??!1]),a=new Map([[o({}),0]]);for(let d of e)for(let y of d.rows)for(let $ of y){if(typeof $!="object")continue;let{v:P,...D}=$,L=o(D);a.has(L)||(a.set(L,n.length),n.push(D))}let t=new Map([["|",0]]),i=new Map([["",0]]),l=d=>{let y=`${d.bold?"b":""}|${d.color??""}`;return t.has(y)||t.set(y,t.size),t.get(y)},r=d=>d.fill?(i.has(d.fill)||i.set(d.fill,i.size+1),i.get(d.fill)):0,c=n.map(d=>{let y=d.center||d.wrap?`<alignment${d.center?' horizontal="center"':""}${d.wrap?' wrapText="1"':""} vertical="top"/>`:'<alignment vertical="top"/>';return`<xf numFmtId="0" fontId="${l(d)}" fillId="${r(d)}" borderId="${d.fill||d.bold?1:0}" xfId="0" applyFont="1" applyFill="1" applyBorder="1" applyAlignment="1">${y}</xf>`}),h=[...t.keys()].map(d=>{let[y,$]=d.split("|");return`<font>${y?"<b/>":""}<sz val="11"/>${$?`<color rgb="FF${$}"/>`:""}<name val="Calibri"/><family val="2"/></font>`}),p=['<fill><patternFill patternType="none"/></fill>','<fill><patternFill patternType="gray125"/></fill>',...[...i.keys()].filter(Boolean).map(d=>`<fill><patternFill patternType="solid"><fgColor rgb="FF${d}"/><bgColor indexed="64"/></patternFill></fill>`)];return{xml:`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
112
112
  <styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
113
- <fonts count="${c.length}">${c.join("")}</fonts>
114
- <fills count="${g.length}">${g.join("")}</fills>
113
+ <fonts count="${h.length}">${h.join("")}</fonts>
114
+ <fills count="${p.length}">${p.join("")}</fills>
115
115
  <borders count="2"><border><left/><right/><top/><bottom/><diagonal/></border><border><left style="thin"><color rgb="FFD0D7E2"/></left><right style="thin"><color rgb="FFD0D7E2"/></right><top style="thin"><color rgb="FFD0D7E2"/></top><bottom style="thin"><color rgb="FFD0D7E2"/></bottom><diagonal/></border></borders>
116
116
  <cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs>
117
- <cellXfs count="${m.length}">${m.join("")}</cellXfs>
117
+ <cellXfs count="${c.length}">${c.join("")}</cellXfs>
118
118
  <cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles>
119
- </styleSheet>`,styleOf:f=>typeof f=="object"?a.get(o((({v:y,...u})=>u)(f)))??0:0}}function ke(e,n){let o=Math.max(e.columns.length,...e.rows.map(m=>m.length),1),a=e.rows.map((m,c)=>{let g=m.map((k,f)=>{let y=`${M(f)}${c+1}`,u=typeof k=="object"?k.v:k,P=n(k),C=P?` s="${P}"`:"";return u===""||u===void 0||u===null?P?`<c r="${y}"${C}/>`:"":typeof u=="number"?`<c r="${y}"${C}><v>${u}</v></c>`:`<c r="${y}"${C} t="inlineStr"><is><t xml:space="preserve">${K(String(u))}</t></is></c>`}).join("");return`<row r="${c+1}">${g}</row>`}),t=`${M(o-1)}${Math.max(1,e.rows.length)}`,i=e.header?'<pane ySplit="1" topLeftCell="A2" activePane="bottomLeft" state="frozen"/><selection pane="bottomLeft" activeCell="A2" sqref="A2"/>':"",l=e.columns.length?`<cols>${e.columns.map((m,c)=>`<col min="${c+1}" max="${c+1}" width="${m.width}" customWidth="1"/>`).join("")}</cols>`:"",r=e.header&&e.rows.length>1?`<autoFilter ref="A1:${M(Math.max(0,e.columns.length-1))}${e.rows.length}"/>`:"";return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
119
+ </styleSheet>`,styleOf:d=>typeof d=="object"?a.get(o((({v:y,...$})=>$)(d)))??0:0}}function we(e,n){let o=Math.max(e.columns.length,...e.rows.map(c=>c.length),1),a=e.rows.map((c,h)=>{let p=c.map((k,d)=>{let y=`${M(d)}${h+1}`,$=typeof k=="object"?k.v:k,P=n(k),D=P?` s="${P}"`:"";return $===""||$===void 0||$===null?P?`<c r="${y}"${D}/>`:"":typeof $=="number"?`<c r="${y}"${D}><v>${$}</v></c>`:`<c r="${y}"${D} t="inlineStr"><is><t xml:space="preserve">${Y(String($))}</t></is></c>`}).join("");return`<row r="${h+1}">${p}</row>`}),t=`${M(o-1)}${Math.max(1,e.rows.length)}`,i=e.header?'<pane ySplit="1" topLeftCell="A2" activePane="bottomLeft" state="frozen"/><selection pane="bottomLeft" activeCell="A2" sqref="A2"/>':"",l=e.columns.length?`<cols>${e.columns.map((c,h)=>`<col min="${h+1}" max="${h+1}" width="${c.width}" customWidth="1"/>`).join("")}</cols>`:"",r=e.header&&e.rows.length>1?`<autoFilter ref="A1:${M(Math.max(0,e.columns.length-1))}${e.rows.length}"/>`:"";return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
120
120
  <worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">
121
121
  <dimension ref="A1:${t}"/><sheetViews><sheetView workbookViewId="0">${i}</sheetView></sheetViews><sheetFormatPr defaultRowHeight="15"/>${l}<sheetData>${a.join("")}</sheetData>${r}
122
- </worksheet>`}function ee(e){let{xml:n,styleOf:o}=$e(e),a=e.map(l=>ye(l.name)),t=e.map((l,r)=>l.header&&l.rows.length>1?`<definedName name="_xlnm._FilterDatabase" localSheetId="${r}" hidden="1">'${K(a[r]).replace(/'/g,"''")}'!$A$1:$${M(Math.max(0,l.columns.length-1))}$${l.rows.length}</definedName>`:"").join(""),i=[["[Content_Types].xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
122
+ </worksheet>`}function ne(e){let{xml:n,styleOf:o}=be(e),a=e.map(l=>ke(l.name)),t=e.map((l,r)=>l.header&&l.rows.length>1?`<definedName name="_xlnm._FilterDatabase" localSheetId="${r}" hidden="1">'${Y(a[r]).replace(/'/g,"''")}'!$A$1:$${M(Math.max(0,l.columns.length-1))}$${l.rows.length}</definedName>`:"").join(""),i=[["[Content_Types].xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
123
123
  <Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/>${e.map((l,r)=>`<Override PartName="/xl/worksheets/sheet${r+1}.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/>`).join("")}</Types>`],["_rels/.rels",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
124
124
  <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/></Relationships>`],["xl/workbook.xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
125
- <workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><bookViews><workbookView/></bookViews><sheets>${a.map((l,r)=>`<sheet name="${K(l)}" sheetId="${r+1}" r:id="rId${r+1}"/>`).join("")}</sheets>${t?`<definedNames>${t}</definedNames>`:""}</workbook>`],["xl/_rels/workbook.xml.rels",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
126
- <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">${e.map((l,r)=>`<Relationship Id="rId${r+1}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet${r+1}.xml"/>`).join("")}<Relationship Id="rId${e.length+1}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/></Relationships>`],["xl/styles.xml",n],...e.map((l,r)=>[`xl/worksheets/sheet${r+1}.xml`,ke(l,o)])];return ve(i.map(([l,r])=>[l,Z.encode(r)]))}var be=(()=>{let e=new Uint32Array(256);for(let n=0;n<256;n++){let o=n;for(let a=0;a<8;a++)o=o&1?3988292384^o>>>1:o>>>1;e[n]=o>>>0}return e})();function we(e){let n=4294967295;for(let o=0;o<e.length;o++)n=be[(n^e[o])&255]^n>>>8;return(n^4294967295)>>>0}function ve(e){let n=[],o=[],a=0;for(let[c,g]of e){let k=Z.encode(c),f=we(g),y=new DataView(new ArrayBuffer(30));y.setUint32(0,67324752,!0),y.setUint16(4,20,!0),y.setUint16(6,2048,!0),y.setUint16(8,0,!0),y.setUint32(14,f,!0),y.setUint32(18,g.length,!0),y.setUint32(22,g.length,!0),y.setUint16(26,k.length,!0),n.push(new Uint8Array(y.buffer),k,g);let u=new DataView(new ArrayBuffer(46));u.setUint32(0,33639248,!0),u.setUint16(4,20,!0),u.setUint16(6,20,!0),u.setUint16(8,2048,!0),u.setUint32(16,f,!0),u.setUint32(20,g.length,!0),u.setUint32(24,g.length,!0),u.setUint16(28,k.length,!0),u.setUint32(42,a,!0),o.push(new Uint8Array(u.buffer),k),a+=30+k.length+g.length}let t=o.reduce((c,g)=>c+g.length,0),i=new DataView(new ArrayBuffer(22));i.setUint32(0,101010256,!0),i.setUint16(8,e.length,!0),i.setUint16(10,e.length,!0),i.setUint32(12,t,!0),i.setUint32(16,a,!0);let l=[...n,...o,new Uint8Array(i.buffer)],r=new Uint8Array(l.reduce((c,g)=>c+g.length,0)),m=0;for(let c of l)r.set(c,m),m+=c.length;return r}var ne=e=>ee(e),xe={bold:!0,fill:"E8EEF7"},Se={v:"\u25CF",fill:"DDF3E6",center:!0},Oe={v:"\xD7",fill:"FFD5CC",center:!0,bold:!0},Ce={v:"\u25D0",fill:"FFF3C4",center:!0},te=Object.keys(R);function oe(e,n,o,a="en"){let t=U[a],i=(s,h,S)=>({key:s,name:t[s],header:!0,columns:h.map(([D,I])=>({title:D,width:I})),rows:[h.map(([D])=>({v:D,...xe})),...S]}),l=s=>t[e.roles[s]],r=s=>t[s],m=s=>j(s,a),c=[...e.agents].sort((s,h)=>s.role===h.role?s.id.localeCompare(h.id):s.role==="orchestrator"?-1:1),g=[...new Set([...c.flatMap(s=>Object.keys(s.facts)),...e.patterns.map(s=>s.key)])].sort((s,h)=>te.indexOf(A(s))-te.indexOf(A(h))||s.localeCompare(h)),k=new Set(e.offPattern.map(s=>`${s.agent} ${s.key}`)),f=s=>e.agents.filter(h=>h.role===s).length,y={key:"summary",name:t.summary,header:!1,columns:[{title:"",width:28},{title:"",width:100}],rows:[[{v:e.name??t.title,bold:!0},""],[{v:t.privacy,color:"B42318"},""],[t.count.agents,e.agents.length],[t.count.orchestrators,f("orchestrator")],[t.count.specialists,f("specialist")],[t.count.patterns,e.patterns.length],[t.count.off,new Set(e.offPattern.map(s=>s.agent)).size],[t.count.gaps,e.gaps.length],[t.count.conflicts,e.conflicts.length],[t.count.solos,n.filter(s=>s.key==="solo").length],["",""],[{v:n.length?t.look:t.nothing,bold:!0},""],...n.map(s=>["",{v:s[a],wrap:!0}])]},u=i("matrix",[[t.dimension,18],[t.fact,40],[t.key,34],...c.map(s=>[s.id,14])],g.map(s=>[R[A(s)][a],m(s),s,...c.map(h=>s in h.facts?s.startsWith("declared:")?Ce:Se:k.has(`${h.id} ${s}`)?Oe:"")])),{look:P,everyone:C}=q(e),L=i("patterns",[[t.key,34],[t.fact,40],[t.scope,14],[t.role,14],[t.share,10],[t.have,50],[t.lack,40],[t.decision,12],[t.why,50]],[...P,...C].map(s=>{let h=e.offPattern.filter(S=>S.key===s.key).map(S=>S.agent);return[s.key,m(s.key),r(s.scope),t[s.role],`${Math.round(s.share*100)}%`,s.agents.join(", "),h.join(", "),s.decision?t[s.decision.status==="accepted"?"accept":"reject"]:"",s.decision?.why??""]})),le=i("off",[[t.agent,24],[t.role,14],[t.missing,44],[t.key,34],[t.scope,14],[t.accepted,14]],e.offPattern.map(s=>[s.agent,l(s.agent),m(s.key),s.key,r(s.scope),e.patterns.find(h=>h.key===s.key)?.decision?.status==="accepted"?t.yes:""])),ce=i("gaps",[[t.rule,16],[t.says,50],[t.role,14],[t.notMet,60]],e.gaps.map(s=>[s.rule.id,s.rule.says,t[s.rule.role],s.agents.join(", ")])),de=i("conflicts",[[t.agent,24],[t.fact,40],[t.key,34],[t.declared,20],[t.source,40],[t.inYaml,12]],e.conflicts.map(s=>[s.agent,m(s.key),s.key,s.declared,s.source,s.observed?t.yes:t.no])),pe=i("agents",[[t.agent,24],[t.name,32],[t.role,14],[t.facts,8],[t.off,44],[t.alone,44],[t.children,24],[t.unknown,12]],c.map(s=>[s.id,s.displayName??"",t[s.role],Object.keys(s.facts).length,e.offPattern.filter(h=>h.agent===s.id).map(h=>m(h.key)).join("; "),e.solos.filter(h=>h.agents[0]===s.id).map(h=>m(h.key)).join("; "),s.children.map(h=>h.name).join(", "),e.unknown.filter(h=>h.agent===s.id).length||""])),me=i("evidence",[[t.agent,30],[t.fact,40],[t.key,34],[t.file,50],[t.line,8]],c.flatMap(s=>[{who:s.id,facts:s.facts},...s.children.map(h=>({who:`${s.id} \u203A ${h.name}`,facts:h.facts}))]).flatMap(({who:s,facts:h})=>Object.entries(h).sort(([S],[D])=>S.localeCompare(D)).flatMap(([S,D])=>D.map(I=>[s,m(S),S,I.file,I.line??""])))),fe=i("declared",[[t.agent,24],[t.key,34],[t.value,40],[t.source,40]],o.declared.map(s=>[s.agent,s.key,s.value,s.source])),Q=[y,u,L,le,ce,de,pe,me,fe];return e.unknown.length&&Q.push(i("unknown",[[t.agent,24],[t.file,50],[t.why,40],[t.kind,24]],e.unknown.map(s=>[s.agent,s.file,t.why_[s.why],s.kind??""]))),Q}var Te={en:{map:"Map",patterns:"Patterns",cast:"Cast",microsoft:"Microsoft",unknown:e=>`What the analysis did not understand (${e})`,matrix:"Who has what",candidates:"Patterns to decide",everyone:e=>`Everybody already does it (${e})`,all:"All",role:"Role",focus:"Focus",legend:"\u25CF has it (click for the file) \xB7 \xD7 off a pattern of its role \xB7 \u25D0 declared by people",pattern:"pattern",of:(e,n,o)=>`${e} of ${n} ${o}`,who:"Who has it",lacks:"Off it",none:"nobody",decision:"Decision",toDecide:"to decide \u2014 in the workbook or the cast file",alone:"Only one has it: innovation or debt?",orchestratorDoes:"Only the orchestrator does it",sign:"How cast-list knows",follows:"Who follows it",declaredOnly:"only declared",nothingUnknown:"Everything was understood.",facts:"Facts",off:"Off a pattern",solo:"Only it has",children:"Children",close:"Close \u2715",foot:"The facts come from the YAML files; nothing was made up.",summary:(e,n,o,a,t)=>`${e} in the cast \xB7 ${n} patterns \xB7 ${o} off a pattern \xB7 ${a} only one has \xB7 threshold ${t}% of each role`,excel:"\u2B07 Excel",yaml:"\u2B07 cast.yaml",png:"\u2B07 PNG",name:"Name",said:"declared"},pt:{map:"Mapa",patterns:"Padr\xF5es",cast:"Elenco",microsoft:"Microsoft",unknown:e=>`O que a an\xE1lise n\xE3o entendeu (${e})`,matrix:"Quem tem o qu\xEA",candidates:"Padr\xF5es para decidir",everyone:e=>`Todos j\xE1 fazem (${e})`,all:"Todos",role:"Papel",focus:"Foco",legend:"\u25CF tem (clique para ver o arquivo) \xB7 \xD7 fora de um padr\xE3o do seu papel \xB7 \u25D0 declarado por pessoas",pattern:"padr\xE3o",of:(e,n,o)=>`${e} de ${n} ${o}`,who:"Quem tem",lacks:"Fora",none:"ningu\xE9m",decision:"Decis\xE3o",toDecide:"a decidir \u2014 na planilha ou no cast.yaml",alone:"S\xF3 um tem: inova\xE7\xE3o ou d\xEDvida?",orchestratorDoes:"S\xF3 o orquestrador faz",sign:"Como a cast-list sabe",follows:"Quem segue",declaredOnly:"s\xF3 declarado",nothingUnknown:"Tudo foi entendido.",facts:"Fatos",off:"Fora do padr\xE3o",solo:"S\xF3 ele tem",children:"Filhos",close:"Fechar \u2715",foot:"Os fatos v\xEAm dos arquivos YAML; nada foi inventado.",summary:(e,n,o,a,t)=>`${e} no elenco \xB7 ${n} padr\xF5es \xB7 ${o} fora do padr\xE3o \xB7 ${a} s\xF3 um tem \xB7 limite ${t}% de cada papel`,excel:"\u2B07 Excel",yaml:"\u2B07 cast.yaml",png:"\u2B07 PNG",name:"Nome",said:"declarado"}},b=JSON.parse(document.getElementById("cast").textContent),{result:$,lang:x,looks:F}=b,d=Te[x],v=U[x],Y=oe($,F,b.cast,x);document.documentElement.lang=x==="pt"?"pt-BR":"en";document.title=$.name??b.id;var p=e=>String(e??"").replace(/[&<>"']/g,n=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[n]),T=e=>p(j(e,x)),se=[...$.agents].sort((e,n)=>e.role===n.role?e.id.localeCompare(n.id):e.role==="orchestrator"?-1:1),G=e=>$.patterns.find(n=>n.key===e),ae=e=>$.offPattern.filter(n=>n.key===e).map(n=>n.agent),H=e=>{let n=G(e);if(!n)return"";let o=n.decision?`<span class="cl-badge ${n.decision.status}">${p(v[n.decision.status==="accepted"?"accept":"reject"])}</span>`:"";return`<span class="cl-badge ${n.scope}">${d.pattern} \xB7 ${p(v[n.scope])}</span>${o}`},O="map",w,E="all",_,V=document.getElementById("app");function re(){let e=[["map",d.map],["patterns",d.patterns],["cast",d.cast],["microsoft",d.microsoft],["unknown",d.unknown($.unknown.length)]],n=new Set($.offPattern.map(o=>o.agent)).size;V.innerHTML=`<div class="cl-wrap">
127
- <header><h1 class="cl-title">${p($.name??b.id)}</h1><p class="cl-sub">${d.summary($.agents.length,$.patterns.length,n,F.filter(o=>o.key==="solo").length,Math.round(b.threshold*100))}</p><p class="cl-private">${p(v.privacy)}</p></header>
128
- <div class="cl-bar" role="tablist">${e.map(([o,a])=>`<button class="cl-tab" role="tab" aria-selected="${o===O}" data-tab="${o}">${p(a)}</button>`).join("")}
129
- <span class="cl-space"></span><button class="cl-get" data-get="xlsx">${d.excel}</button><button class="cl-get" data-get="yaml">${d.yaml}</button>${O==="map"?`<button class="cl-get" data-get="png">${d.png}</button>`:""}</div>
130
- ${O==="map"?De():O==="patterns"?ie(Y.find(o=>o.key==="patterns")):O==="cast"?Pe():O==="microsoft"?Ee():Me()}
131
- <p class="cl-foot">${d.foot}</p>
132
- </div>`}function De(){return`${F.length?`<section class="cl-look"><h2>${p(v.look)}</h2><ul>${F.map((n,o)=>`<li><button data-look="${o}">${p(n[x])}</button></li>`).join("")}</ul></section>`:""}<div class="cl-body${w?" with-detail":""}"><div class="cl-wrap" style="gap:16px">${Re()}${Ae()}</div>${w?`<aside class="cl-card cl-detail" aria-live="polite">${je()}</aside>`:""}</div>`}function Re(){let e=se.filter(r=>E==="all"||r.role===E),n=b.focusAreas.find(r=>r.id===_),o=[...new Set([...$.agents.flatMap(r=>Object.keys(r.facts)),...$.patterns.map(r=>r.key)])].filter(r=>!n||n.facts.includes(r)),a=new Set($.offPattern.map(r=>`${r.agent} ${r.key}`)),t=(r,m,c,g)=>`<button class="cl-chip" ${r}="${p(m)}" aria-pressed="${c}">${p(g)}</button>`,i=`<div class="cl-filters">${d.role}: ${t("data-role","all",E==="all",d.all)}${t("data-role","specialist",E==="specialist",v.specialist)}${t("data-role","orchestrator",E==="orchestrator",v.orchestrator)}
133
- ${b.focusAreas.length?`<span style="margin-left:10px">${d.focus}:</span> ${t("data-focus","",!_,d.all)}${b.focusAreas.map(r=>t("data-focus",r.id,_===r.id,r.name)).join("")}`:""}</div>`,l="";for(let r of Object.keys(R)){let m=o.filter(c=>A(c)===r).sort((c,g)=>j(c,x).localeCompare(j(g,x)));m.length&&(l+=`<tr class="cl-dim"><td colspan="${e.length+1}">${p(R[r][x])}</td></tr>`,l+=m.map(c=>`<tr><th scope="row" style="text-align:left;font-weight:400"><button class="cl-fact${w?.key===c&&!w.agent?" picked":""}" data-key="${p(c)}">${T(c)}</button>${H(c)}</th>${e.map(g=>{let k=c in g.facts?c.startsWith("declared:")?["said","\u25D0"]:["has","\u25CF"]:a.has(`${g.id} ${c}`)?["off","\xD7"]:void 0;return`<td class="cl-mark${k?` ${k[0]}`:""}">${k?`<button data-key="${p(c)}" data-agent="${p(g.id)}" aria-label="${p(g.id)}: ${T(c)}">${k[1]}</button>`:""}</td>`}).join("")}</tr>`).join(""))}return`<section class="cl-card"><h2>${d.matrix}</h2>${i}<div class="cl-scroll"><table class="cl-matrix"><thead><tr><th></th>${e.map(r=>`<th scope="col">${p(r.id)}<small>${p(v[r.role])}</small></th>`).join("")}</tr></thead><tbody>${l}</tbody></table></div><p class="cl-legend">${d.legend}</p></section>`}function Ae(){let{look:e,everyone:n}=q($),o=a=>{let t=G(a),i=$.agents.filter(r=>r.role===t.role).length,l=ae(a);return`<button class="cl-pattern${w?.key===a?" picked":""}" data-pattern="${p(a)}"><b>${T(a)}</b><span>${H(a)} ${d.of(t.agents.filter(r=>$.roles[r]===t.role).length,i,z(t.role,x,i))}</span>
134
- ${l.length?`<span class="cl-lack">${d.lacks}: ${p(l.join(", "))}</span>`:""}<span>${d.decision}: ${t.decision?`${p(v[t.decision.status==="accepted"?"accept":"reject"])}${t.decision.why?` \u2014 ${p(t.decision.why)}`:""}`:`<i>${d.toDecide}</i>`}</span></button>`};return`<section class="cl-card"><h2>${d.candidates}</h2>${e.length?`<div class="cl-cards">${e.map(a=>o(a.key)).join("")}</div>`:'<p class="cl-empty">\u2014</p>'}
135
- ${n.length?`<details class="cl-everyone"><summary>${d.everyone(n.length)}</summary><ul>${n.map(a=>`<li><button class="cl-fact" data-pattern="${p(a.key)}">${T(a.key)}</button> <span class="cl-badge ${a.scope}">${p(v[a.scope])}</span></li>`).join("")}</ul></details>`:""}</section>`}function je(){let{key:e,agent:n}=w,o=G(e),t=$.agents.filter(m=>e in m.facts&&(!n||m.id===n)).map(m=>`<li><b>${p(m.id)}</b>${m.facts[e].map(c=>`<div class="cl-file">${p(c.file)}${c.line?`:${c.line}`:""}</div>`).join("")}</li>`).join(""),i=ae(e).filter(m=>!n||m===n),l=$.solos.some(m=>m.key===e),r=$.orchestratorDoes.some(m=>m.key===e);return`<button class="cl-close" data-close="1">${d.close}</button><span class="cl-kicker">${p(R[A(e)][x])}</span><h3>${T(e)}</h3><code>${p(e)}</code>
136
- ${o?`<div>${H(e)}</div><div>${d.decision}: ${o.decision?`${p(v[o.decision.status==="accepted"?"accept":"reject"])}${o.decision.why?` \u2014 ${p(o.decision.why)}`:""}`:`<i>${d.toDecide}</i>`}</div>`:""}
137
- ${l?`<div>${d.alone}</div>`:r?`<div>${d.orchestratorDoes}</div>`:""}
138
- <div><b>${d.who}</b>${t?`<ul>${t}</ul>`:` \u2014 ${d.none}`}</div>
139
- ${i.length?`<div><b>${d.lacks}</b>: <span style="color:var(--off)">${p(i.join(", "))}</span></div>`:""}`}function Pe(){return`<div class="cl-agents">${se.map(e=>{let n=$.offPattern.filter(t=>t.agent===e.id),o=$.solos.filter(t=>t.agents[0]===e.id),a=$.unknown.filter(t=>t.agent===e.id);return`<section class="cl-card cl-agent"><span class="cl-kicker">${p(v[e.role])}</span><h3>${p(e.id)}</h3>${e.displayName?`<code>${p(e.displayName)}</code>`:""}<dl>
140
- <dt>${d.facts}</dt><dd>${Object.keys(e.facts).length}</dd>
141
- ${n.length?`<dt>${d.off}</dt><dd class="cl-lack">${n.map(t=>T(t.key)).join("<br>")}</dd>`:""}
142
- ${o.length?`<dt>${d.solo}</dt><dd>${o.map(t=>T(t.key)).join("<br>")}</dd>`:""}
143
- ${e.children.length?`<dt>${d.children}</dt><dd>${e.children.map(t=>`${p(t.name)} <span class="cl-sub">(${Object.keys(t.facts).map(T).join(", ")})</span>`).join("<br>")}</dd>`:""}
144
- ${a.length?`<dt>${p(v.unknown)}</dt><dd>${a.map(t=>p(t.file)).join("<br>")}</dd>`:""}</dl></section>`}).join("")}</div>`}function Ee(){let e=N.map(n=>{let o=$.agents.filter(a=>`ms:${n.id}`in a.facts||`declared:ms:${n.id}`in a.facts).map(a=>a.id);return`<tr><td><a href="${B}/${n.id}.md" target="_blank" rel="noopener">${p(n.name)}</a></td><td>${p(n.sign??d.declaredOnly)}</td><td>${o.length?p(o.join(", ")):`<span class="cl-sub">${d.none}</span>`}</td></tr>`}).join("");return`<section class="cl-card cl-table"><table><thead><tr><th>${d.microsoft}</th><th>${d.sign}</th><th>${d.follows}</th></tr></thead><tbody>${e}</tbody></table></section>`}function Me(){let e=Y.find(n=>n.key==="unknown");return e?ie(e):`<section class="cl-card"><p class="cl-empty">${d.nothingUnknown}</p></section>`}function ie(e){let n=(t,i)=>{let l=typeof t=="object"&&t?t:{v:t},r=i?"th":"td";return`<${r}${l.fill&&!i?` style="background:#${l.fill};color:#1d2330"`:""}>${p(l.v)}</${r}>`},[o,...a]=e.rows;return`<section class="cl-card cl-table" role="tabpanel"><table><thead><tr>${o.map(t=>n(t,!0)).join("")}</tr></thead><tbody>${a.map(t=>`<tr>${t.map(i=>n(i,!1)).join("")}</tr>`).join("")}</tbody></table></section>`}function W(e,n){let o=document.createElement("a");o.href=URL.createObjectURL(e),o.download=n,o.click(),setTimeout(()=>URL.revokeObjectURL(o.href),1e3)}async function Fe(){let e=V.querySelector(".cl-matrix"),[n,o]=[e.scrollWidth+32,e.scrollHeight+32],a=new XMLSerializer().serializeToString(e).replace(/ picked/g,""),t=`<svg xmlns="http://www.w3.org/2000/svg" width="${n}" height="${o}"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml" class="cl light" style="min-height:0;padding:16px;background:#fff;width:${n}px"><style>/* The cast map: tokens on .cl (not :root) so the PNG, drawn apart, carries them too. */
125
+ <workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><bookViews><workbookView/></bookViews><sheets>${a.map((l,r)=>`<sheet name="${Y(l)}" sheetId="${r+1}" r:id="rId${r+1}"/>`).join("")}</sheets>${t?`<definedNames>${t}</definedNames>`:""}</workbook>`],["xl/_rels/workbook.xml.rels",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
126
+ <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">${e.map((l,r)=>`<Relationship Id="rId${r+1}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet${r+1}.xml"/>`).join("")}<Relationship Id="rId${e.length+1}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/></Relationships>`],["xl/styles.xml",n],...e.map((l,r)=>[`xl/worksheets/sheet${r+1}.xml`,we(l,o)])];return Se(i.map(([l,r])=>[l,te.encode(r)]))}var ve=(()=>{let e=new Uint32Array(256);for(let n=0;n<256;n++){let o=n;for(let a=0;a<8;a++)o=o&1?3988292384^o>>>1:o>>>1;e[n]=o>>>0}return e})();function xe(e){let n=4294967295;for(let o=0;o<e.length;o++)n=ve[(n^e[o])&255]^n>>>8;return(n^4294967295)>>>0}function Se(e){let n=[],o=[],a=0;for(let[h,p]of e){let k=te.encode(h),d=xe(p),y=new DataView(new ArrayBuffer(30));y.setUint32(0,67324752,!0),y.setUint16(4,20,!0),y.setUint16(6,2048,!0),y.setUint16(8,0,!0),y.setUint32(14,d,!0),y.setUint32(18,p.length,!0),y.setUint32(22,p.length,!0),y.setUint16(26,k.length,!0),n.push(new Uint8Array(y.buffer),k,p);let $=new DataView(new ArrayBuffer(46));$.setUint32(0,33639248,!0),$.setUint16(4,20,!0),$.setUint16(6,20,!0),$.setUint16(8,2048,!0),$.setUint32(16,d,!0),$.setUint32(20,p.length,!0),$.setUint32(24,p.length,!0),$.setUint16(28,k.length,!0),$.setUint32(42,a,!0),o.push(new Uint8Array($.buffer),k),a+=30+k.length+p.length}let t=o.reduce((h,p)=>h+p.length,0),i=new DataView(new ArrayBuffer(22));i.setUint32(0,101010256,!0),i.setUint16(8,e.length,!0),i.setUint16(10,e.length,!0),i.setUint32(12,t,!0),i.setUint32(16,a,!0);let l=[...n,...o,new Uint8Array(i.buffer)],r=new Uint8Array(l.reduce((h,p)=>h+p.length,0)),c=0;for(let h of l)r.set(h,c),c+=h.length;return r}var se=e=>ne(e),Oe={bold:!0,fill:"E8EEF7"},Ce={v:"\u25CF",fill:"DDF3E6",center:!0},Te={v:"\xD7",fill:"FFD5CC",center:!0,bold:!0},De={v:"\u25D0",fill:"FFF3C4",center:!0},oe=Object.keys(j);function ae(e,n,o,a="en"){let t=U[a],i=(s,g,S)=>({key:s,name:t[s],header:!0,columns:g.map(([A,N])=>({title:A,width:N})),rows:[g.map(([A])=>({v:A,...Oe})),...S]}),l=s=>t[e.roles[s]],r=s=>t[s],c=s=>O(s,a,e.names),h=[...e.agents].sort((s,g)=>s.role===g.role?s.id.localeCompare(g.id):s.role==="orchestrator"?-1:1),p=[...new Set([...h.flatMap(s=>Object.keys(s.facts)),...e.patterns.map(s=>s.key)])].sort((s,g)=>oe.indexOf(R(s))-oe.indexOf(R(g))||s.localeCompare(g)),k=new Set(e.offPattern.map(s=>`${s.agent} ${s.key}`)),d=s=>e.agents.filter(g=>g.role===s).length,y={key:"summary",name:t.summary,header:!1,columns:[{title:"",width:28},{title:"",width:100}],rows:[[{v:e.name??t.title,bold:!0},""],[{v:t.privacy,color:"B42318"},""],[t.count.agents,e.agents.length],[t.count.orchestrators,d("orchestrator")],[t.count.specialists,d("specialist")],[t.count.patterns,e.patterns.length],[t.count.off,new Set(e.offPattern.map(s=>s.agent)).size],[t.count.gaps,e.gaps.length],[t.count.conflicts,e.conflicts.length],[t.count.solos,n.filter(s=>s.key==="solo").length],["",""],[{v:n.length?t.look:t.nothing,bold:!0},""],...n.map(s=>["",{v:s[a],wrap:!0}])]},$=i("matrix",[[t.dimension,18],[t.fact,40],[t.key,34],...h.map(s=>[s.id,14])],p.map(s=>[j[R(s)][a],c(s),s,...h.map(g=>s in g.facts?s.startsWith("declared:")?De:Ce:k.has(`${g.id} ${s}`)?Te:"")])),{look:P,everyone:D}=q(e),L=i("patterns",[[t.key,34],[t.fact,40],[t.scope,14],[t.role,14],[t.share,10],[t.have,50],[t.lack,40],[t.decision,12],[t.why,50]],[...P,...D].map(s=>{let g=e.offPattern.filter(S=>S.key===s.key).map(S=>S.agent);return[s.key,c(s.key),r(s.scope),t[s.role],`${Math.round(s.share*100)}%`,s.agents.join(", "),g.join(", "),s.decision?t[s.decision.status==="accepted"?"accept":"reject"]:"",s.decision?.why??""]})),de=i("off",[[t.agent,24],[t.role,14],[t.missing,44],[t.key,34],[t.scope,14],[t.accepted,14]],e.offPattern.map(s=>[s.agent,l(s.agent),c(s.key),s.key,r(s.scope),e.patterns.find(g=>g.key===s.key)?.decision?.status==="accepted"?t.yes:""])),pe=i("gaps",[[t.rule,16],[t.says,50],[t.role,14],[t.notMet,60]],e.gaps.map(s=>[s.rule.id,s.rule.says,t[s.rule.role],s.agents.join(", ")])),me=i("conflicts",[[t.agent,24],[t.fact,40],[t.key,34],[t.declared,20],[t.source,40],[t.inYaml,12]],e.conflicts.map(s=>[s.agent,c(s.key),s.key,s.declared,s.source,s.observed?t.yes:t.no])),fe=i("agents",[[t.agent,24],[t.name,32],[t.role,14],[t.facts,8],[t.off,44],[t.alone,44],[t.children,24],[t.unknown,12]],h.map(s=>[s.id,s.displayName??"",t[s.role],Object.keys(s.facts).length,e.offPattern.filter(g=>g.agent===s.id).map(g=>c(g.key)).join("; "),e.solos.filter(g=>g.agents[0]===s.id).map(g=>c(g.key)).join("; "),s.children.map(g=>g.name).join(", "),e.unknown.filter(g=>g.agent===s.id).length||""])),he=i("evidence",[[t.agent,30],[t.fact,40],[t.key,34],[t.file,50],[t.line,8]],h.flatMap(s=>[{who:s.id,facts:s.facts},...s.children.map(g=>({who:`${s.id} \u203A ${g.name}`,facts:g.facts}))]).flatMap(({who:s,facts:g})=>Object.entries(g).sort(([S],[A])=>S.localeCompare(A)).flatMap(([S,A])=>A.map(N=>[s,c(S),S,N.file,N.line??""])))),ge=i("declared",[[t.agent,24],[t.key,34],[t.value,40],[t.source,40]],o.declared.map(s=>[s.agent,s.key,s.value,s.source])),X=[y,$,L,de,pe,me,fe,he,ge];return e.unknown.length&&X.push(i("unknown",[[t.agent,24],[t.file,50],[t.why,40],[t.kind,24]],e.unknown.map(s=>[s.agent,s.file,t.why_[s.why],s.kind??""]))),X}var Re={en:{map:"Map",patterns:"Patterns",cast:"Cast",microsoft:"Microsoft",unknown:e=>`What the analysis did not understand (${e})`,matrix:"Who has what",candidates:"Patterns to decide",everyone:e=>`Everybody already does it (${e})`,all:"All",role:"Role",focus:"Focus",legend:"\u25CF has it (click for the file) \xB7 \xD7 off a pattern of its role \xB7 \u25D0 declared by people",pattern:"pattern",of:(e,n,o)=>`${e} of ${n} ${o}`,who:"Who has it",lacks:"Off it",none:"nobody",decision:"Decision",toDecide:"to decide \u2014 in the workbook or the cast file",alone:"Only one has it: innovation or debt?",orchestratorDoes:"Only the orchestrator does it",sign:"How cast-list knows",follows:"Who follows it",declaredOnly:"only declared",nothingUnknown:"Everything was understood.",facts:"Facts",off:"Off a pattern",solo:"Only it has",children:"Children",close:"Close \u2715",foot:"The facts come from the YAML files; nothing was made up.",summary:(e,n,o,a,t)=>`${e} in the cast \xB7 ${n} patterns \xB7 ${o} off a pattern \xB7 ${a} only one has \xB7 threshold ${t}% of each role`,excel:"\u2B07 Excel",yaml:"\u2B07 cast.yaml",png:"\u2B07 PNG",name:"Name",said:"declared"},pt:{map:"Mapa",patterns:"Padr\xF5es",cast:"Elenco",microsoft:"Microsoft",unknown:e=>`O que a an\xE1lise n\xE3o entendeu (${e})`,matrix:"Quem tem o qu\xEA",candidates:"Padr\xF5es para decidir",everyone:e=>`Todos j\xE1 fazem (${e})`,all:"Todos",role:"Papel",focus:"Foco",legend:"\u25CF tem (clique para ver o arquivo) \xB7 \xD7 fora de um padr\xE3o do seu papel \xB7 \u25D0 declarado por pessoas",pattern:"padr\xE3o",of:(e,n,o)=>`${e} de ${n} ${o}`,who:"Quem tem",lacks:"Fora",none:"ningu\xE9m",decision:"Decis\xE3o",toDecide:"a decidir \u2014 na planilha ou no cast.yaml",alone:"S\xF3 um tem: inova\xE7\xE3o ou d\xEDvida?",orchestratorDoes:"S\xF3 o orquestrador faz",sign:"Como a cast-list sabe",follows:"Quem segue",declaredOnly:"s\xF3 declarado",nothingUnknown:"Tudo foi entendido.",facts:"Fatos",off:"Fora do padr\xE3o",solo:"S\xF3 ele tem",children:"Filhos",close:"Fechar \u2715",foot:"Os fatos v\xEAm dos arquivos YAML; nada foi inventado.",summary:(e,n,o,a,t)=>`${e} no elenco \xB7 ${n} padr\xF5es \xB7 ${o} fora do padr\xE3o \xB7 ${a} s\xF3 um tem \xB7 limite ${t}% de cada papel`,excel:"\u2B07 Excel",yaml:"\u2B07 cast.yaml",png:"\u2B07 PNG",name:"Nome",said:"declarado"}},b=JSON.parse(document.getElementById("cast").textContent),{result:u,lang:v,looks:F}=b,m=Re[v],x=U[v],G=ae(u,F,b.cast,v);document.documentElement.lang=v==="pt"?"pt-BR":"en";document.title=u.name??b.id;var f=e=>String(e??"").replace(/[&<>"']/g,n=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[n]),T=e=>f(O(e,v,u.names)),re=[...u.agents].sort((e,n)=>e.role===n.role?e.id.localeCompare(n.id):e.role==="orchestrator"?-1:1),H=e=>u.patterns.find(n=>n.key===e),ie=e=>[...new Set(u.offPattern.filter(n=>n.key===e||n.partOf===e).map(n=>n.agent))],Q=e=>{let n=H(e);if(!n)return"";let o=n.decision?`<span class="cl-badge ${n.decision.status}">${f(x[n.decision.status==="accepted"?"accept":"reject"])}</span>`:"";return`<span class="cl-badge ${n.scope}">${m.pattern} \xB7 ${f(x[n.scope])}</span>${o}`},C="map",w,E="all",_,W=document.getElementById("app");function le(){let e=[["map",m.map],["patterns",m.patterns],["cast",m.cast],["microsoft",m.microsoft],["unknown",m.unknown(u.unknown.length)]],n=new Set(u.offPattern.map(o=>o.agent)).size;W.innerHTML=`<div class="cl-wrap">
127
+ <header><h1 class="cl-title">${f(u.name??b.id)}</h1><p class="cl-sub">${m.summary(u.agents.length,u.patterns.length,n,F.filter(o=>o.key==="solo").length,Math.round(b.threshold*100))}</p><p class="cl-private">${f(x.privacy)}</p></header>
128
+ <div class="cl-bar" role="tablist">${e.map(([o,a])=>`<button class="cl-tab" role="tab" aria-selected="${o===C}" data-tab="${o}">${f(a)}</button>`).join("")}
129
+ <span class="cl-space"></span><button class="cl-get" data-get="xlsx">${m.excel}</button><button class="cl-get" data-get="yaml">${m.yaml}</button>${C==="map"?`<button class="cl-get" data-get="png">${m.png}</button>`:""}</div>
130
+ ${C==="map"?Ae():C==="patterns"?ce(G.find(o=>o.key==="patterns")):C==="cast"?Me():C==="microsoft"?Fe():Le()}
131
+ <p class="cl-foot">${m.foot}</p>
132
+ </div>`}function Ae(){return`${F.length?`<section class="cl-look"><h2>${f(x.look)}</h2><ul>${F.map((n,o)=>`<li><button data-look="${o}">${f(n[v])}</button></li>`).join("")}</ul></section>`:""}<div class="cl-body${w?" with-detail":""}"><div class="cl-wrap" style="gap:16px">${je()}${Pe()}</div>${w?`<aside class="cl-card cl-detail" aria-live="polite">${Ee()}</aside>`:""}</div>`}function je(){let e=re.filter(r=>E==="all"||r.role===E),n=b.focusAreas.find(r=>r.id===_),o=[...new Set([...u.agents.flatMap(r=>Object.keys(r.facts)),...u.patterns.map(r=>r.key)])].filter(r=>!n||n.facts.includes(r)),a=new Set(u.offPattern.map(r=>`${r.agent} ${r.key}`)),t=(r,c,h,p)=>`<button class="cl-chip" ${r}="${f(c)}" aria-pressed="${h}">${f(p)}</button>`,i=`<div class="cl-filters">${m.role}: ${t("data-role","all",E==="all",m.all)}${t("data-role","specialist",E==="specialist",x.specialist)}${t("data-role","orchestrator",E==="orchestrator",x.orchestrator)}
133
+ ${b.focusAreas.length?`<span style="margin-left:10px">${m.focus}:</span> ${t("data-focus","",!_,m.all)}${b.focusAreas.map(r=>t("data-focus",r.id,_===r.id,r.name)).join("")}`:""}</div>`,l="";for(let r of Object.keys(j)){let c=p=>z(p)?`${O(z(p),v,u.names)}${O(p,v,u.names)}`:O(p,v,u.names),h=o.filter(p=>R(p)===r).sort((p,k)=>c(p).localeCompare(c(k)));h.length&&(l+=`<tr class="cl-dim"><td colspan="${e.length+1}">${f(j[r][v])}</td></tr>`,l+=h.map(p=>`<tr><th scope="row" style="text-align:left;font-weight:400"><button class="cl-fact${w?.key===p&&!w.agent?" picked":""}" data-key="${f(p)}">${T(p)}</button>${Q(p)}</th>${e.map(k=>{let d=p in k.facts?p.startsWith("declared:")?["said","\u25D0"]:["has","\u25CF"]:a.has(`${k.id} ${p}`)?["off","\xD7"]:void 0;return`<td class="cl-mark${d?` ${d[0]}`:""}">${d?`<button data-key="${f(p)}" data-agent="${f(k.id)}" aria-label="${f(k.id)}: ${T(p)}">${d[1]}</button>`:""}</td>`}).join("")}</tr>`).join(""))}return`<section class="cl-card"><h2>${m.matrix}</h2>${i}<div class="cl-scroll"><table class="cl-matrix"><thead><tr><th></th>${e.map(r=>`<th scope="col">${f(r.id)}<small>${f(x[r.role])}</small></th>`).join("")}</tr></thead><tbody>${l}</tbody></table></div><p class="cl-legend">${m.legend}</p></section>`}function Pe(){let{look:e,everyone:n}=q(u),o=a=>{let t=H(a),i=u.agents.filter(r=>r.role===t.role).length,l=ie(a);return`<button class="cl-pattern${w?.key===a?" picked":""}" data-pattern="${f(a)}"><b>${T(a)}</b><span>${Q(a)} ${m.of(t.agents.filter(r=>u.roles[r]===t.role).length,i,K(t.role,v,i))}</span>
134
+ ${l.length?`<span class="cl-lack">${m.lacks}: ${f(l.join(", "))}</span>`:""}<span>${m.decision}: ${t.decision?`${f(x[t.decision.status==="accepted"?"accept":"reject"])}${t.decision.why?` \u2014 ${f(t.decision.why)}`:""}`:`<i>${m.toDecide}</i>`}</span></button>`};return`<section class="cl-card"><h2>${m.candidates}</h2>${e.length?`<div class="cl-cards">${e.map(a=>o(a.key)).join("")}</div>`:'<p class="cl-empty">\u2014</p>'}
135
+ ${n.length?`<details class="cl-everyone"><summary>${m.everyone(n.length)}</summary><ul>${n.map(a=>`<li><button class="cl-fact" data-pattern="${f(a.key)}">${T(a.key)}</button> <span class="cl-badge ${a.scope}">${f(x[a.scope])}</span></li>`).join("")}</ul></details>`:""}</section>`}function Ee(){let{key:e,agent:n}=w,o=H(e),t=u.agents.filter(c=>e in c.facts&&(!n||c.id===n)).map(c=>`<li><b>${f(c.id)}</b>${c.facts[e].map(h=>`<div class="cl-file">${f(h.file)}${h.line?`:${h.line}`:""}</div>`).join("")}</li>`).join(""),i=ie(e).filter(c=>!n||c===n),l=u.solos.some(c=>c.key===e),r=u.orchestratorDoes.some(c=>c.key===e);return`<button class="cl-close" data-close="1">${m.close}</button><span class="cl-kicker">${f(j[R(e)][v])}</span><h3>${T(e)}</h3><code>${f(e)}</code>
136
+ ${o?`<div>${Q(e)}</div><div>${m.decision}: ${o.decision?`${f(x[o.decision.status==="accepted"?"accept":"reject"])}${o.decision.why?` \u2014 ${f(o.decision.why)}`:""}`:`<i>${m.toDecide}</i>`}</div>`:""}
137
+ ${l?`<div>${m.alone}</div>`:r?`<div>${m.orchestratorDoes}</div>`:""}
138
+ <div><b>${m.who}</b>${t?`<ul>${t}</ul>`:` \u2014 ${m.none}`}</div>
139
+ ${u.patterns.filter(c=>c.partOf===e).map(c=>{let h=u.offPattern.filter(p=>p.key===c.key).map(p=>p.agent);return`<div><b>${T(c.key)}</b> \u2014 ${h.length?`<span style="color:var(--off)">${m.lacks}: ${f(h.join(", "))}</span>`:`${m.who}: ${c.agents.length}`}</div>`}).join("")}
140
+ ${i.length?`<div><b>${m.lacks}</b>: <span style="color:var(--off)">${f(i.join(", "))}</span></div>`:""}`}function Me(){return`<div class="cl-agents">${re.map(e=>{let n=u.offPattern.filter(t=>t.agent===e.id),o=u.solos.filter(t=>t.agents[0]===e.id),a=u.unknown.filter(t=>t.agent===e.id);return`<section class="cl-card cl-agent"><span class="cl-kicker">${f(x[e.role])}</span><h3>${f(e.id)}</h3>${e.displayName?`<code>${f(e.displayName)}</code>`:""}<dl>
141
+ <dt>${m.facts}</dt><dd>${Object.keys(e.facts).length}</dd>
142
+ ${n.length?`<dt>${m.off}</dt><dd class="cl-lack">${n.map(t=>T(t.key)).join("<br>")}</dd>`:""}
143
+ ${o.length?`<dt>${m.solo}</dt><dd>${o.map(t=>T(t.key)).join("<br>")}</dd>`:""}
144
+ ${e.children.length?`<dt>${m.children}</dt><dd>${e.children.map(t=>`${f(t.name)} <span class="cl-sub">(${Object.keys(t.facts).map(T).join(", ")})</span>`).join("<br>")}</dd>`:""}
145
+ ${a.length?`<dt>${f(x.unknown)}</dt><dd>${a.map(t=>f(t.file)).join("<br>")}</dd>`:""}</dl></section>`}).join("")}</div>`}function Fe(){let e=I.map(n=>{let o=u.agents.filter(a=>`ms:${n.id}`in a.facts||`declared:ms:${n.id}`in a.facts).map(a=>a.id);return`<tr><td><a href="${B}/${n.id}.md" target="_blank" rel="noopener">${f(n.name)}</a></td><td>${f(n.sign??m.declaredOnly)}</td><td>${o.length?f(o.join(", ")):`<span class="cl-sub">${m.none}</span>`}</td></tr>`}).join("");return`<section class="cl-card cl-table"><table><thead><tr><th>${m.microsoft}</th><th>${m.sign}</th><th>${m.follows}</th></tr></thead><tbody>${e}</tbody></table></section>`}function Le(){let e=G.find(n=>n.key==="unknown");return e?ce(e):`<section class="cl-card"><p class="cl-empty">${m.nothingUnknown}</p></section>`}function ce(e){let n=(t,i)=>{let l=typeof t=="object"&&t?t:{v:t},r=i?"th":"td";return`<${r}${l.fill&&!i?` style="background:#${l.fill};color:#1d2330"`:""}>${f(l.v)}</${r}>`},[o,...a]=e.rows;return`<section class="cl-card cl-table" role="tabpanel"><table><thead><tr>${o.map(t=>n(t,!0)).join("")}</tr></thead><tbody>${a.map(t=>`<tr>${t.map(i=>n(i,!1)).join("")}</tr>`).join("")}</tbody></table></section>`}function V(e,n){let o=document.createElement("a");o.href=URL.createObjectURL(e),o.download=n,o.click(),setTimeout(()=>URL.revokeObjectURL(o.href),1e3)}async function Ne(){let e=W.querySelector(".cl-matrix"),[n,o]=[e.scrollWidth+32,e.scrollHeight+32],a=new XMLSerializer().serializeToString(e).replace(/ picked/g,""),t=`<svg xmlns="http://www.w3.org/2000/svg" width="${n}" height="${o}"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml" class="cl light" style="min-height:0;padding:16px;background:#fff;width:${n}px"><style>/* The cast map: tokens on .cl (not :root) so the PNG, drawn apart, carries them too. */
145
146
  .cl {
146
147
  --bg: #f6f6f3; --card: #ffffff; --ink: #1d2330; --muted: #5f6878; --line: #e2e4e8; --soft: #f3f4f1;
147
148
  --has: #2e7d55; --off: #c8442c; --off-bg: #fde8e3; --said: #b7791f;
@@ -238,7 +239,7 @@ body { margin: 0; }
238
239
  .cl-table a { color: var(--focus); }
239
240
  .cl-empty { color: var(--muted); font-style: italic; margin: 0; }
240
241
  .cl-foot { font-size: 12px; color: var(--muted); margin: 0; }
241
- </style>${a}</div></foreignObject></svg>`;try{let i=new Image;i.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`,await i.decode();let l=document.createElement("canvas");l.width=n*2,l.height=o*2;let r=l.getContext("2d");r.scale(2,2),r.drawImage(i,0,0);let m=await new Promise(c=>l.toBlob(c,"image/png"));if(!m)throw new Error("no PNG");W(m,`${b.id}.png`)}catch{W(new Blob([t],{type:"image/svg+xml"}),`${b.id}.svg`)}}V.addEventListener("click",e=>{let n=e.target.closest("button");if(!n)return;let o=n.dataset;if(o.tab)O=o.tab;else if(o.role)E=o.role;else if(o.focus!==void 0)_=o.focus||void 0;else if(o.key)w={key:o.key,...o.agent?{agent:o.agent}:{}};else if(o.pattern)w={key:o.pattern};else if(o.close)w=void 0;else if(o.look){let a=F[Number(o.look)];O="map",a.fact&&(w={key:a.fact,...a.agents.length===1?{agent:a.agents[0]}:{}}),(a.key==="off"||a.key==="gap"||a.key==="conflict")&&(w=a.fact?{key:a.fact}:w),a.key==="unknown"&&(O="unknown")}else{if(o.get==="xlsx")return W(new Blob([ne(Y)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),`${b.id}.xlsx`);if(o.get==="yaml")return W(new Blob([b.castYaml],{type:"text/yaml"}),`${b.id}.cast.yaml`);if(o.get==="png")return void Fe()}re(),(o.key||o.pattern||o.look)&&V.querySelector(".cl-detail")?.scrollIntoView({block:"nearest"})});re();})();
242
+ </style>${a}</div></foreignObject></svg>`;try{let i=new Image;i.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`,await i.decode();let l=document.createElement("canvas");l.width=n*2,l.height=o*2;let r=l.getContext("2d");r.scale(2,2),r.drawImage(i,0,0);let c=await new Promise(h=>l.toBlob(h,"image/png"));if(!c)throw new Error("no PNG");V(c,`${b.id}.png`)}catch{V(new Blob([t],{type:"image/svg+xml"}),`${b.id}.svg`)}}W.addEventListener("click",e=>{let n=e.target.closest("button");if(!n)return;let o=n.dataset;if(o.tab)C=o.tab;else if(o.role)E=o.role;else if(o.focus!==void 0)_=o.focus||void 0;else if(o.key)w={key:o.key,...o.agent?{agent:o.agent}:{}};else if(o.pattern)w={key:o.pattern};else if(o.close)w=void 0;else if(o.look){let a=F[Number(o.look)];C="map",a.fact&&(w={key:a.fact,...a.agents.length===1?{agent:a.agents[0]}:{}}),(a.key==="off"||a.key==="gap"||a.key==="conflict")&&(w=a.fact?{key:a.fact}:w),a.key==="unknown"&&(C="unknown")}else{if(o.get==="xlsx")return V(new Blob([se(G)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),`${b.id}.xlsx`);if(o.get==="yaml")return V(new Blob([b.castYaml],{type:"text/yaml"}),`${b.id}.cast.yaml`);if(o.get==="png")return void Ne()}le(),(o.key||o.pattern||o.look)&&W.querySelector(".cl-detail")?.scrollIntoView({block:"nearest"})});le();})();
242
243
  </script>
243
244
  </body>
244
245
  </html>
@@ -21,7 +21,8 @@ Every fact cast-list finds is a key. The keys below have a name; any other key k
21
21
  | `setting:generative=on` | Generative orchestration on | Orquestração generativa ligada |
22
22
  | `setting:generative=off` | Generative orchestration off | Orquestração generativa desligada |
23
23
  | `topics:with-model-description` | Topics described for the model | Tópicos descritos para o modelo |
24
- | `calls:topic:<value>` | Calls the topic <value> | Chama o tópico <valor> |
24
+ | `reaches:<value>` | A topic leads to it (part of trigger:<value>) <value> | Um tópico leva a ele (parte de trigger:<valor>) <valor> |
25
+ | `calls:topic:<value>` | Calls the topic (one not found) <value> | Chama o tópico (não encontrado) <valor> |
25
26
  | `trigger:<value>` | Trigger <value> | Gatilho <valor> |
26
27
  | `setting:<value>` | Setting <value> | Configuração <valor> |
27
28