house-lights 1.9.2 → 1.9.3

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.9.2",
3
+ "version": "1.9.3",
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": {
@@ -134,7 +134,7 @@ a.cl-get { color: var(--ink); text-decoration: none; font-weight: 600; }
134
134
  <body>
135
135
  <div class="cl" id="app"></div>
136
136
  <script type="application/json" id="cast">{{CAST}}</script>
137
- <script>(()=>{var ve="https://github.com/microsoft/skills-for-copilot-studio/blob/main/patterns",ee=[{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 G={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"},text:{en:"F. Text",pt:"F. Texto"},microsoft:{en:"Microsoft patterns",pt:"Padr\xF5es Microsoft"},declared:{en:"Declared",pt:"Declarado"}},ke={"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",phrase:!0,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",phrase:!0,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:model-knowledge=on":{dim:"governance",en:"The model's general knowledge on",pt:"Conhecimento geral do modelo ligado"},"setting:model-knowledge=off":{dim:"governance",en:"The model's general knowledge off",pt:"Conhecimento geral do modelo desligado"},"setting:semantic-search=on":{dim:"knowledge",en:"Semantic search on",pt:"Busca sem\xE2ntica ligada"},"setting:semantic-search=off":{dim:"knowledge",en:"Semantic search off",pt:"Busca sem\xE2ntica desligada"},"setting:web-browsing=on":{dim:"knowledge",en:"Web browsing on",pt:"Navega\xE7\xE3o na web ligada"},"setting:web-browsing=off":{dim:"knowledge",en:"Web browsing off",pt:"Navega\xE7\xE3o na web desligada"},"setting:connectable":{dim:"orchestration",phrase:!0,en:"Can be called by an orchestrator",pt:"Pode ser chamado por um orquestrador"},"called-with:history":{dim:"orchestration",phrase:!0,en:"Receives the conversation history",pt:"Recebe o hist\xF3rico da conversa",lacks:{en:["does not receive the conversation history from the orchestrator","do not receive the conversation history from the orchestrator"],pt:["n\xE3o recebe o hist\xF3rico da conversa do orquestrador","n\xE3o recebem o hist\xF3rico da conversa do orquestrador"]}},"routing:described":{dim:"orchestration",phrase:!0,en:"Has a routing description",pt:"Tem descri\xE7\xE3o de roteamento",lacks:{en:["has no routing description","have no routing description"],pt:["n\xE3o tem descri\xE7\xE3o de roteamento","n\xE3o t\xEAm descri\xE7\xE3o de roteamento"]}},"flow-returns":{dim:"integrations",phrase:!0,en:"The flow returns an answer",pt:"O fluxo devolve uma resposta",lacks:{en:["has a flow that returns nothing","have a flow that returns nothing"],pt:["tem fluxo que n\xE3o devolve nada","t\xEAm fluxo que n\xE3o devolve nada"]}},"flow-uses:child-flow":{dim:"integrations",phrase:!0,en:"The flow calls another flow",pt:"O fluxo chama outro fluxo"},"topics:with-model-description":{dim:"conversation",en:"Topics described for the model",pt:"T\xF3picos descritos para o modelo"},"instructions:present":{dim:"governance",phrase:!0,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",phrase:!0,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",phrase:!0,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",phrase:!0,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"]}},"eval:run":{dim:"governance",phrase:!0,en:"Passed through an evaluation",pt:"Passou por uma avalia\xE7\xE3o",lacks:{en:["has no evaluation","have no evaluation"],pt:["n\xE3o tem avalia\xE7\xE3o","n\xE3o t\xEAm avalia\xE7\xE3o"]}},"declared:team":{dim:"declared",en:"Team declared",pt:"Equipe declarada",lacks:{en:["has no team declared","have no team declared"],pt:["n\xE3o tem equipe declarada","n\xE3o t\xEAm equipe declarada"]}},"declared:owner":{dim:"declared",en:"Owner declared",pt:"Respons\xE1vel declarado",lacks:{en:["has no owner declared","have no owner declared"],pt:["n\xE3o tem respons\xE1vel declarado","n\xE3o t\xEAm respons\xE1vel declarado"]}}},Be=Object.fromEntries(ee.map(e=>[e.id,e.name])),Ke=[["called-with:input:","orchestration","Receives <value> from the orchestrator","Recebe <valor> do orquestrador"],["flow-uses:http:","integrations","Flow calls","Fluxo chama"],["flow-uses:connector:","integrations","Flow uses the connector","Fluxo usa o conector"],["flow-uses:operation:","integrations","Flow uses the operation","Fluxo usa a opera\xE7\xE3o"],["orphan:topic:","governance","Topic nobody calls","T\xF3pico que ningu\xE9m chama"],["orphan:action:","governance","Tool nobody can choose","Ferramenta que ningu\xE9m escolhe"],["orphan:variable:","governance","Variable nobody uses","Vari\xE1vel que ningu\xE9m usa"],["orphan:flow:","governance","Flow nobody calls","Fluxo que ningu\xE9m chama"],["disabled:node:","governance","Switched-off node","N\xF3 desligado"],["telemetry:event:","governance","Logs the event","Registra o evento"],["telemetry:field:","governance","The event carries the field (<event>/<field>)","O evento leva o campo (<evento>/<campo>)"],["disabled:","governance","Switched off","Desligado"],["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:"],["text:","text","Text:","Texto:"],["declared:","declared","Declared:","Declarado:"]],Pe=e=>Ke.find(([n])=>e.startsWith(n));function _(e){return e.startsWith("reaches:")?_(`trigger:${e.slice(8)}`):ke[e]?.dim??Pe(e)?.[1]??"governance"}var je=80;function we(e){if(e.startsWith("reaches:"))return`trigger:${e.slice(8)}`;if(e.startsWith("telemetry:event:"))return"node:LogCustomTelemetryEvent";if(e.startsWith("telemetry:field:"))return`telemetry:event:${e.slice(16,e.lastIndexOf("/"))}`}var E=(e,n)=>e.split("{agent}").join(n==="pt"?"\u2039nome\u203A":"\u2039name\u203A"),Ye=e=>({form:e.slice(16,e.lastIndexOf("/")),field:e.slice(e.lastIndexOf("/")+1)}),Qe={shared_commondataserviceforapps:"Microsoft Dataverse",shared_sharepointonline:"SharePoint",shared_office365:"Office 365 Outlook",shared_office365users:"Office 365 Users",shared_teams:"Microsoft Teams",shared_approvals:"Approvals",shared_onedriveforbusiness:"OneDrive for Business",shared_excelonlinebusiness:"Excel Online (Business)",shared_sql:"SQL Server",shared_azureblob:"Azure Blob Storage",shared_planner:"Planner",shared_outlook:"Outlook.com",shared_webcontents:"HTTP with Microsoft Entra ID",shared_servicenow:"ServiceNow",shared_salesforce:"Salesforce"},Ce=(e,n)=>n?.[e]??Qe[e]??e,Xe=["called-with:input:","telemetry:event:","telemetry:field:","flow-uses:","var-in:","reaches:"],Ne=e=>!!ke[e]?.phrase||Xe.some(n=>e.startsWith(n));function T(e,n,a){let r=ke[e];if(r)return r[n];if(e.startsWith("text:block:")){let c=e.endsWith("~variant"),m=c?e.slice(0,-8):e,h=a?.[m]??m.slice(11);return c?`${h} (${n==="pt"?"varia\xE7\xE3o":"variation"})`:h}if(e.startsWith("text:link-domain:"))return`${n==="pt"?"Link para":"Link to"} ${e.slice(17)}`;if(e==="text:email")return n==="pt"?"Cita um e-mail":"Mentions an e-mail";if(e.startsWith("text:")){let[c,m]=[e.slice(5).split("=")[0],e.includes("=")?e.slice(e.indexOf("=")+1):void 0],h=a?.[`text:${c}`]??c;return m===void 0?h:`${h} = ${m}`}if(e.startsWith("reaches:")){let c=T(`trigger:${e.slice(8)}`,n);return n==="pt"?`Um t\xF3pico leva a \xAB${c}\xBB`:`A topic leads to \xAB${c}\xBB`}if(e.startsWith("called-with:input:"))return n==="pt"?`Recebe \xAB${e.slice(18)}\xBB do orquestrador`:`Receives \xAB${e.slice(18)}\xBB from the orchestrator`;if(e.startsWith("telemetry:event:"))return n==="pt"?`Registra o evento \xAB${E(e.slice(16),n)}\xBB`:`Logs the event \xAB${E(e.slice(16),n)}\xBB`;if(e.startsWith("telemetry:field:")){let{form:c,field:m}=Ye(e),h=E(c,n);return n==="pt"?`\xAB${h}\xBB leva \xAB${m}\xBB`:`\xAB${h}\xBB carries \xAB${m}\xBB`}let t=/^knowledge:count=(\d+)$/.exec(e);if(t){let c=Number(t[1]);return n==="pt"?`${c} ${c===1?"fonte":"fontes"} de conhecimento`:`${c} knowledge ${c===1?"source":"sources"}`}let s=Pe(e);if(!s)return e;let l=e.slice(s[0].length);if(s[0]==="ms:"&&(l=Be[l]??l),s[0]==="auth:"&&l==="None")return n==="pt"?"Sem login":"No sign-in";if(e.startsWith("setting:moderation="))return n==="pt"?`Modera\xE7\xE3o de conte\xFAdo: ${e.slice(19)}`:`Content moderation: ${e.slice(19)}`;if(["connector:","connref:","mcp:","calls:","flow:","flow-uses:connector:","orphan:flow:"].includes(s[0])&&(l=Ce(l,a)),s[0]==="disabled:"&&(l=l.replace(":"," ")),s[0]==="operation:"||s[0]==="flow-uses:operation:"){let[c,m]=[l.slice(0,l.indexOf("/")),l.slice(l.indexOf("/")+1)];l=`${Ce(c,a)} \xB7 ${m}`}return`${s[n==="pt"?3:2]} ${l}`}var Je={specialist:{en:["specialist","specialists"],pt:["especialista","especialistas"]},orchestrator:{en:["orchestrator","orchestrators"],pt:["orquestrador","orquestradores"]}},be=(e,n,a)=>Je[e][n][a===1?0:1],te={en:{summary:"Summary",matrix:"Matrix",patterns:"Patterns",text:"Text",off:"Off pattern",gaps:"Gaps",conflicts:"Conflicts",agents:"Cast",evidence:"Evidence",declared:"Declared",unknown:"Not understood",routing:"Routing",unused:"Unused",telemetry:"Telemetry",written:"As written",form:"Form",fields:"Fields",fired:e=>`Fired (${e} days)`,notRead:"not read",caller:"Caller",called:"Called",history:"History",inputs:"Inputs",routingText:"Routing description",chars:"Characters",notInFolder:"not in the folder",what:"What",how:"How",thing:{topic:"topic",action:"tool",variable:"variable",flow:"flow",node:"node",knowledge:"knowledge source"},orphan:"nobody uses it",disabled:"switched off",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",types:"Types",id:"Id",label:"Label",body:"Text",variant:"Variation",official:"Official",type:"type",yes:"yes",no:"no",accept:"accepted",reject:"rejected",platform:"platform",specialist:"specialist",orchestrator:"orchestrator",staff:"Staff",pdi:"Development plan",situation_:"Situation",manager:"Manager",teamCol:"Team",ownerCol:"Owner",hired:"Hired",publishedCol:"Published",items:"Plan items",item:"Item",group:"Group",situation:{hiring:"being hired",noOwner:"no owner",neverPublished:"never published",noEval:"no evaluation",pdi:"in a plan",ok:"in good standing"},pdiGroup:{contradictions:"contradiction",contract:"contract",off:"off pattern",rules:"rule",text:"text",telemetry:"telemetry",cleanup:"cleanup"},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",unused:"Unused or switched off"},why_:{yaml:"YAML that does not read",empty:"empty",kind:"a kind Copilot Studio does not have",file:"not a Copilot Studio file",json:"JSON that does not read",flow:"a flow in a shape the analysis does not know",telemetry:"a telemetry event whose name is a formula"}},pt:{summary:"Resumo",matrix:"Matriz",patterns:"Padr\xF5es",text:"Texto",off:"Fora do padr\xE3o",gaps:"Lacunas",conflicts:"Conflitos",agents:"Elenco",evidence:"Evid\xEAncias",declared:"Declarado",unknown:"N\xE3o entendeu",routing:"Roteamento",unused:"Sem uso",telemetry:"Telemetria",written:"Como est\xE1 escrito",form:"Forma",fields:"Campos",fired:e=>`Disparou (${e} dias)`,notRead:"n\xE3o lido",caller:"Quem chama",called:"Chamado",history:"Hist\xF3rico",inputs:"Entradas",routingText:"Descri\xE7\xE3o de roteamento",chars:"Caracteres",notInFolder:"n\xE3o est\xE1 na pasta",what:"O qu\xEA",how:"Como",thing:{topic:"t\xF3pico",action:"ferramenta",variable:"vari\xE1vel",flow:"fluxo",node:"n\xF3",knowledge:"fonte de conhecimento"},orphan:"ningu\xE9m usa",disabled:"desligado",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",types:"Tipos",id:"Id",label:"R\xF3tulo",body:"Texto",variant:"Varia\xE7\xE3o",official:"Oficial",type:"tipo",yes:"sim",no:"n\xE3o",accept:"aceito",reject:"rejeitado",platform:"plataforma",specialist:"especialista",orchestrator:"orquestrador",staff:"Quadro de pessoal",pdi:"PDI",situation_:"Situa\xE7\xE3o",manager:"Gestor",teamCol:"Equipe",ownerCol:"Respons\xE1vel",hired:"Admiss\xE3o",publishedCol:"Publica\xE7\xE3o",items:"Itens de PDI",item:"Item",group:"Grupo",situation:{hiring:"em admiss\xE3o",noOwner:"sem respons\xE1vel",neverPublished:"nunca publicado",noEval:"sem avalia\xE7\xE3o",pdi:"em PDI",ok:"em dia"},pdiGroup:{contradictions:"contradi\xE7\xE3o",contract:"contrato",off:"fora do padr\xE3o",rules:"regra",text:"texto",telemetry:"telemetria",cleanup:"limpeza"},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",unused:"Sem uso ou desligado"},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",json:"JSON que n\xE3o se l\xEA",flow:"um fluxo num formato que a an\xE1lise n\xE3o conhece",telemetry:"um evento de telemetria com o nome em f\xF3rmula"}}};var Fe=[{key:"contradictions",en:"Contradictions",pt:"Contradi\xE7\xF5es",keys:["conflict","contradiction"]},{key:"contract",en:"Contract and telemetry",pt:"Contrato e telemetria",keys:["spelling","contract","flow","telemetry"]},{key:"off",en:"Off pattern",pt:"Fora do padr\xE3o",keys:["off","values","twice","type"]},{key:"rules",en:"Rules",pt:"Regras",keys:["gap"]},{key:"solo",en:"Only one has it",pt:"S\xF3 um tem",keys:["solo"],folded:!0},{key:"unused",en:"Unused",pt:"Sem uso",keys:["unused"],folded:!0},{key:"unknown",en:"Not understood",pt:"N\xE3o entendeu",keys:["unknown","unmatched"]}],Wt=Fe.flatMap(e=>e.keys);function ne(e){return Fe.map(n=>({key:n.key,en:n.en,pt:n.pt,folded:!!n.folded,looks:e.flatMap((a,r)=>n.keys.includes(a.key)?[{look:a,at:r}]:[])})).filter(n=>n.looks.length)}function oe(e){let n=t=>e.offPattern.some(s=>s.key===t.key||s.partOf===t.key),a=t=>t.share===1&&!t.decision&&!n(t),r=e.patterns.filter(t=>!t.partOf);return{look:r.filter(t=>!a(t)),everyone:r.filter(a)}}var Ie=new TextEncoder,xe=e=>e.replace(/[&<>"]/g,n=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"})[n]).replace(/[\u0000-\u0008\u000B\u000C\u000E-\u001F]/g,""),Q=e=>e<26?String.fromCharCode(65+e):Q(Math.floor(e/26)-1)+String.fromCharCode(65+e%26),Ze=e=>e.replace(/[:\\/?*[\]]/g," ").slice(0,31)||"Sheet";function et(e){let n=[{}],a=d=>JSON.stringify([d.bold??!1,d.fill??"",d.color??"",d.center??!1,d.wrap??!1]),r=new Map([[a({}),0]]);for(let d of e)for(let p of d.rows)for(let k of p){if(typeof k!="object")continue;let{v:j,...P}=k,W=a(P);r.has(W)||(r.set(W,n.length),n.push(P))}let t=new Map([["|",0]]),s=new Map([["",0]]),l=d=>{let p=`${d.bold?"b":""}|${d.color??""}`;return t.has(p)||t.set(p,t.size),t.get(p)},c=d=>d.fill?(s.has(d.fill)||s.set(d.fill,s.size+1),s.get(d.fill)):0,m=n.map(d=>{let p=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="${c(d)}" borderId="${d.fill||d.bold?1:0}" xfId="0" applyFont="1" applyFill="1" applyBorder="1" applyAlignment="1">${p}</xf>`}),h=[...t.keys()].map(d=>{let[p,k]=d.split("|");return`<font>${p?"<b/>":""}<sz val="11"/>${k?`<color rgb="FF${k}"/>`:""}<name val="Calibri"/><family val="2"/></font>`}),f=['<fill><patternFill patternType="none"/></fill>','<fill><patternFill patternType="gray125"/></fill>',...[...s.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"?>
137
+ <script>(()=>{var ve="https://github.com/microsoft/skills-for-copilot-studio/blob/main/patterns",ee=[{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 G={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"},text:{en:"F. Text",pt:"F. Texto"},microsoft:{en:"Microsoft patterns",pt:"Padr\xF5es Microsoft"},declared:{en:"Declared",pt:"Declarado"}},ke={"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",phrase:!0,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",phrase:!0,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:model-knowledge=on":{dim:"governance",en:"The model's general knowledge on",pt:"Conhecimento geral do modelo ligado"},"setting:model-knowledge=off":{dim:"governance",en:"The model's general knowledge off",pt:"Conhecimento geral do modelo desligado"},"setting:semantic-search=on":{dim:"knowledge",en:"Semantic search on",pt:"Busca sem\xE2ntica ligada"},"setting:semantic-search=off":{dim:"knowledge",en:"Semantic search off",pt:"Busca sem\xE2ntica desligada"},"setting:web-browsing=on":{dim:"knowledge",en:"Web browsing on",pt:"Navega\xE7\xE3o na web ligada"},"setting:web-browsing=off":{dim:"knowledge",en:"Web browsing off",pt:"Navega\xE7\xE3o na web desligada"},"setting:connectable":{dim:"orchestration",phrase:!0,en:"Can be called by an orchestrator",pt:"Pode ser chamado por um orquestrador"},"called-with:history":{dim:"orchestration",phrase:!0,en:"Receives the conversation history",pt:"Recebe o hist\xF3rico da conversa",lacks:{en:["does not receive the conversation history from the orchestrator","do not receive the conversation history from the orchestrator"],pt:["n\xE3o recebe o hist\xF3rico da conversa do orquestrador","n\xE3o recebem o hist\xF3rico da conversa do orquestrador"]}},"routing:described":{dim:"orchestration",phrase:!0,en:"Has a routing description",pt:"Tem descri\xE7\xE3o de roteamento",lacks:{en:["has no routing description","have no routing description"],pt:["n\xE3o tem descri\xE7\xE3o de roteamento","n\xE3o t\xEAm descri\xE7\xE3o de roteamento"]}},"flow-returns":{dim:"integrations",phrase:!0,en:"The flow returns an answer",pt:"O fluxo devolve uma resposta",lacks:{en:["has a flow that returns nothing","have a flow that returns nothing"],pt:["tem fluxo que n\xE3o devolve nada","t\xEAm fluxo que n\xE3o devolve nada"]}},"flow-uses:child-flow":{dim:"integrations",phrase:!0,en:"The flow calls another flow",pt:"O fluxo chama outro fluxo"},"topics:with-model-description":{dim:"conversation",en:"Topics described for the model",pt:"T\xF3picos descritos para o modelo"},"instructions:present":{dim:"governance",phrase:!0,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",phrase:!0,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",phrase:!0,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",phrase:!0,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"]}},"eval:run":{dim:"governance",phrase:!0,en:"Passed through an evaluation",pt:"Passou por uma avalia\xE7\xE3o",lacks:{en:["has no evaluation","have no evaluation"],pt:["n\xE3o tem avalia\xE7\xE3o","n\xE3o t\xEAm avalia\xE7\xE3o"]}},"declared:team":{dim:"declared",en:"Team declared",pt:"Equipe declarada",lacks:{en:["has no team declared","have no team declared"],pt:["n\xE3o tem equipe declarada","n\xE3o t\xEAm equipe declarada"]}},"declared:owner":{dim:"declared",en:"Owner declared",pt:"Respons\xE1vel declarado",lacks:{en:["has no owner declared","have no owner declared"],pt:["n\xE3o tem respons\xE1vel declarado","n\xE3o t\xEAm respons\xE1vel declarado"]}}},Be=Object.fromEntries(ee.map(e=>[e.id,e.name])),Ke=[["called-with:input:","orchestration","Receives <value> from the orchestrator","Recebe <valor> do orquestrador"],["flow-uses:http:","integrations","Flow calls","Fluxo chama"],["flow-uses:connector:","integrations","Flow uses the connector","Fluxo usa o conector"],["flow-uses:operation:","integrations","Flow uses the operation","Fluxo usa a opera\xE7\xE3o"],["orphan:topic:","governance","Topic nobody calls","T\xF3pico que ningu\xE9m chama"],["orphan:action:","governance","Tool nobody can choose","Ferramenta que ningu\xE9m escolhe"],["orphan:variable:","governance","Variable nobody uses","Vari\xE1vel que ningu\xE9m usa"],["orphan:flow:","governance","Flow nobody calls","Fluxo que ningu\xE9m chama"],["disabled:node:","governance","Switched-off node","N\xF3 desligado"],["telemetry:event:","governance","Logs the event","Registra o evento"],["telemetry:field:","governance","The event carries the field (<event>/<field>)","O evento leva o campo (<evento>/<campo>)"],["disabled:","governance","Switched off","Desligado"],["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:"],["text:","text","Text:","Texto:"],["declared:","declared","Declared:","Declarado:"]],Pe=e=>Ke.find(([n])=>e.startsWith(n));function _(e){return e.startsWith("reaches:")?_(`trigger:${e.slice(8)}`):ke[e]?.dim??Pe(e)?.[1]??"governance"}var je=80;function we(e){if(e.startsWith("reaches:"))return`trigger:${e.slice(8)}`;if(e.startsWith("telemetry:event:"))return"node:LogCustomTelemetryEvent";if(e.startsWith("telemetry:field:"))return`telemetry:event:${e.slice(16,e.lastIndexOf("/"))}`}var E=(e,n)=>e.split("{agent}").join(n==="pt"?"\u2039nome\u203A":"\u2039name\u203A"),Ye=e=>({form:e.slice(16,e.lastIndexOf("/")),field:e.slice(e.lastIndexOf("/")+1)}),Qe={shared_commondataserviceforapps:"Microsoft Dataverse",shared_sharepointonline:"SharePoint",shared_office365:"Office 365 Outlook",shared_office365users:"Office 365 Users",shared_teams:"Microsoft Teams",shared_approvals:"Approvals",shared_onedriveforbusiness:"OneDrive for Business",shared_excelonlinebusiness:"Excel Online (Business)",shared_sql:"SQL Server",shared_azureblob:"Azure Blob Storage",shared_planner:"Planner",shared_outlook:"Outlook.com",shared_webcontents:"HTTP with Microsoft Entra ID",shared_servicenow:"ServiceNow",shared_salesforce:"Salesforce"},Ce=(e,n)=>n?.[e]??Qe[e]??e,Xe=["called-with:input:","telemetry:event:","telemetry:field:","flow-uses:","var-in:","reaches:"],Ne=e=>!!ke[e]?.phrase||Xe.some(n=>e.startsWith(n));function T(e,n,a){let r=ke[e];if(r)return r[n];if(e.startsWith("text:block:")){let c=e.endsWith("~variant"),m=c?e.slice(0,-8):e,h=a?.[m]??m.slice(11);return c?`${h} (${n==="pt"?"varia\xE7\xE3o":"variation"})`:h}if(e.startsWith("text:link-domain:"))return`${n==="pt"?"Link para":"Link to"} ${e.slice(17)}`;if(e==="text:email")return n==="pt"?"Cita um e-mail":"Mentions an e-mail";if(e.startsWith("text:")){let[c,m]=[e.slice(5).split("=")[0],e.includes("=")?e.slice(e.indexOf("=")+1):void 0],h=a?.[`text:${c}`]??c;return m===void 0?h:`${h} = ${m}`}if(e.startsWith("reaches:")){let c=T(`trigger:${e.slice(8)}`,n);return n==="pt"?`Um t\xF3pico leva a \xAB${c}\xBB`:`A topic leads to \xAB${c}\xBB`}if(e.startsWith("called-with:input:"))return n==="pt"?`Recebe \xAB${e.slice(18)}\xBB do orquestrador`:`Receives \xAB${e.slice(18)}\xBB from the orchestrator`;if(e.startsWith("telemetry:event:"))return n==="pt"?`Registra o evento \xAB${E(e.slice(16),n)}\xBB`:`Logs the event \xAB${E(e.slice(16),n)}\xBB`;if(e.startsWith("telemetry:field:")){let{form:c,field:m}=Ye(e),h=E(c,n);return n==="pt"?`\xAB${h}\xBB leva \xAB${m}\xBB`:`\xAB${h}\xBB carries \xAB${m}\xBB`}let t=/^knowledge:count=(\d+)$/.exec(e);if(t){let c=Number(t[1]);return n==="pt"?`${c} ${c===1?"fonte":"fontes"} de conhecimento`:`${c} knowledge ${c===1?"source":"sources"}`}let s=Pe(e);if(!s)return e;let l=e.slice(s[0].length);if(s[0]==="ms:"&&(l=Be[l]??l),s[0]==="auth:"&&l==="None")return n==="pt"?"Sem login":"No sign-in";if(e.startsWith("setting:moderation="))return n==="pt"?`Modera\xE7\xE3o de conte\xFAdo: ${e.slice(19)}`:`Content moderation: ${e.slice(19)}`;if(["connector:","connref:","mcp:","calls:","flow:","flow-uses:connector:","orphan:flow:"].includes(s[0])&&(l=Ce(l,a)),s[0]==="disabled:"&&(l=l.replace(":"," ")),s[0]==="operation:"||s[0]==="flow-uses:operation:"){let[c,m]=[l.slice(0,l.indexOf("/")),l.slice(l.indexOf("/")+1)];l=`${Ce(c,a)} \xB7 ${m}`}return`${s[n==="pt"?3:2]} ${l}`}var Je={specialist:{en:["specialist","specialists"],pt:["especialista","especialistas"]},orchestrator:{en:["orchestrator","orchestrators"],pt:["orquestrador","orquestradores"]}},be=(e,n,a)=>Je[e][n][a===1?0:1],te={en:{summary:"Summary",matrix:"Matrix",patterns:"Patterns",text:"Text",off:"Off pattern",gaps:"Gaps",conflicts:"Conflicts",agents:"Cast",evidence:"Evidence",declared:"Declared",unknown:"Not understood",routing:"Routing",unused:"Unused",telemetry:"Telemetry",written:"As written",form:"Form",fields:"Fields",fired:e=>`Fired (${e} days)`,notRead:"not read",caller:"Caller",called:"Called",history:"History",inputs:"Inputs",routingText:"Routing description",chars:"Characters",notInFolder:"not in the folder",what:"What",how:"How",thing:{topic:"topic",action:"tool",variable:"variable",flow:"flow",node:"node",knowledge:"knowledge source"},orphan:"nobody uses it",disabled:"switched off",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",types:"Types",id:"Id",label:"Label",body:"Text",variant:"Variation",official:"Official",type:"type",yes:"yes",no:"no",accept:"accepted",reject:"rejected",platform:"platform",specialist:"specialist",orchestrator:"orchestrator",staff:"Staff",pdi:"Development plan",situation_:"Situation",manager:"Manager",teamCol:"Team",ownerCol:"Owner",hired:"Hired",publishedCol:"Published",items:"Plan items",item:"Item",group:"Group",situation:{hiring:"being hired",noOwner:"no owner",neverPublished:"never published",noEval:"no evaluation",pdi:"in a plan",ok:"in good standing"},pdiGroup:{contradictions:"contradiction",contract:"contract",off:"off pattern",rules:"rule",text:"text",telemetry:"telemetry",cleanup:"cleanup"},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",unused:"Unused or switched off"},why_:{yaml:"YAML that does not read",empty:"empty",kind:"a kind Copilot Studio does not have",file:"not a Copilot Studio file",json:"JSON that does not read",flow:"a flow in a shape the analysis does not know",telemetry:"a telemetry event whose name is a formula"}},pt:{summary:"Resumo",matrix:"Matriz",patterns:"Padr\xF5es",text:"Texto",off:"Fora do padr\xE3o",gaps:"Lacunas",conflicts:"Conflitos",agents:"Elenco",evidence:"Evid\xEAncias",declared:"Declarado",unknown:"N\xE3o entendeu",routing:"Roteamento",unused:"Sem uso",telemetry:"Telemetria",written:"Como est\xE1 escrito",form:"Forma",fields:"Campos",fired:e=>`Disparou (${e} dias)`,notRead:"n\xE3o lido",caller:"Quem chama",called:"Chamado",history:"Hist\xF3rico",inputs:"Entradas",routingText:"Descri\xE7\xE3o de roteamento",chars:"Caracteres",notInFolder:"n\xE3o est\xE1 na pasta",what:"O qu\xEA",how:"Como",thing:{topic:"t\xF3pico",action:"ferramenta",variable:"vari\xE1vel",flow:"fluxo",node:"n\xF3",knowledge:"fonte de conhecimento"},orphan:"ningu\xE9m usa",disabled:"desligado",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",types:"Tipos",id:"Id",label:"R\xF3tulo",body:"Texto",variant:"Varia\xE7\xE3o",official:"Oficial",type:"tipo",yes:"sim",no:"n\xE3o",accept:"aceito",reject:"rejeitado",platform:"plataforma",specialist:"especialista",orchestrator:"orquestrador",staff:"Quadro de pessoal",pdi:"PDI",situation_:"Situa\xE7\xE3o",manager:"Gestor",teamCol:"Equipe",ownerCol:"Respons\xE1vel",hired:"Admiss\xE3o",publishedCol:"Publica\xE7\xE3o",items:"Itens de PDI",item:"Item",group:"Grupo",situation:{hiring:"em admiss\xE3o",noOwner:"sem respons\xE1vel",neverPublished:"nunca publicado",noEval:"sem avalia\xE7\xE3o",pdi:"em PDI",ok:"em dia"},pdiGroup:{contradictions:"contradi\xE7\xE3o",contract:"contrato",off:"fora do padr\xE3o",rules:"regra",text:"texto",telemetry:"telemetria",cleanup:"limpeza"},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",unused:"Sem uso ou desligado"},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",json:"JSON que n\xE3o se l\xEA",flow:"um fluxo num formato que a an\xE1lise n\xE3o conhece",telemetry:"um evento de telemetria com o nome em f\xF3rmula"}}};var Fe=[{key:"contradictions",en:"Contradictions",pt:"Contradi\xE7\xF5es",keys:["conflict","contradiction"]},{key:"contract",en:"Contract and telemetry",pt:"Contrato e telemetria",keys:["spelling","contract","flow","telemetry"]},{key:"off",en:"Off pattern",pt:"Fora do padr\xE3o",keys:["off","values","twice","type"]},{key:"rules",en:"Rules",pt:"Regras",keys:["gap"]},{key:"solo",en:"Only one has it",pt:"S\xF3 um tem",keys:["solo"],folded:!0},{key:"unused",en:"Unused",pt:"Sem uso",keys:["unused"],folded:!0},{key:"unknown",en:"Not understood",pt:"N\xE3o entendeu",keys:["unknown","unmatched"]}],Ut=Fe.flatMap(e=>e.keys);function ne(e){return Fe.map(n=>({key:n.key,en:n.en,pt:n.pt,folded:!!n.folded,looks:e.flatMap((a,r)=>n.keys.includes(a.key)?[{look:a,at:r}]:[])})).filter(n=>n.looks.length)}function oe(e){let n=t=>e.offPattern.some(s=>s.key===t.key||s.partOf===t.key),a=t=>t.share===1&&!t.decision&&!n(t),r=e.patterns.filter(t=>!t.partOf);return{look:r.filter(t=>!a(t)),everyone:r.filter(a)}}var Ie=new TextEncoder,xe=e=>e.replace(/[&<>"]/g,n=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"})[n]).replace(/[\u0000-\u0008\u000B\u000C\u000E-\u001F]/g,""),Q=e=>e<26?String.fromCharCode(65+e):Q(Math.floor(e/26)-1)+String.fromCharCode(65+e%26),Ze=e=>e.replace(/[:\\/?*[\]]/g," ").slice(0,31)||"Sheet";function et(e){let n=[{}],a=d=>JSON.stringify([d.bold??!1,d.fill??"",d.color??"",d.center??!1,d.wrap??!1]),r=new Map([[a({}),0]]);for(let d of e)for(let p of d.rows)for(let k of p){if(typeof k!="object")continue;let{v:j,...P}=k,U=a(P);r.has(U)||(r.set(U,n.length),n.push(P))}let t=new Map([["|",0]]),s=new Map([["",0]]),l=d=>{let p=`${d.bold?"b":""}|${d.color??""}`;return t.has(p)||t.set(p,t.size),t.get(p)},c=d=>d.fill?(s.has(d.fill)||s.set(d.fill,s.size+1),s.get(d.fill)):0,m=n.map(d=>{let p=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="${c(d)}" borderId="${d.fill||d.bold?1:0}" xfId="0" applyFont="1" applyFill="1" applyBorder="1" applyAlignment="1">${p}</xf>`}),h=[...t.keys()].map(d=>{let[p,k]=d.split("|");return`<font>${p?"<b/>":""}<sz val="11"/>${k?`<color rgb="FF${k}"/>`:""}<name val="Calibri"/><family val="2"/></font>`}),f=['<fill><patternFill patternType="none"/></fill>','<fill><patternFill patternType="gray125"/></fill>',...[...s.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"?>
138
138
  <styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
139
139
  <fonts count="${h.length}">${h.join("")}</fonts>
140
140
  <fills count="${f.length}">${f.join("")}</fills>
@@ -151,7 +151,7 @@ a.cl-get { color: var(--ink); text-decoration: none; font-weight: 600; }
151
151
  <workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><bookViews><workbookView/></bookViews><sheets>${r.map((l,c)=>`<sheet name="${xe(l)}" sheetId="${c+1}" r:id="rId${c+1}"/>`).join("")}</sheets>${t?`<definedNames>${t}</definedNames>`:""}</workbook>`],["xl/_rels/workbook.xml.rels",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
152
152
  <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">${e.map((l,c)=>`<Relationship Id="rId${c+1}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet${c+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,c)=>[`xl/worksheets/sheet${c+1}.xml`,tt(l,a)])];return st(s.map(([l,c])=>[l,Ie.encode(c)]))}var nt=(()=>{let e=new Uint32Array(256);for(let n=0;n<256;n++){let a=n;for(let r=0;r<8;r++)a=a&1?3988292384^a>>>1:a>>>1;e[n]=a>>>0}return e})();function ot(e){let n=4294967295;for(let a=0;a<e.length;a++)n=nt[(n^e[a])&255]^n>>>8;return(n^4294967295)>>>0}function st(e){let n=[],a=[],r=0;for(let[h,f]of e){let b=Ie.encode(h),d=ot(f),p=new DataView(new ArrayBuffer(30));p.setUint32(0,67324752,!0),p.setUint16(4,20,!0),p.setUint16(6,2048,!0),p.setUint16(8,0,!0),p.setUint32(14,d,!0),p.setUint32(18,f.length,!0),p.setUint32(22,f.length,!0),p.setUint16(26,b.length,!0),n.push(new Uint8Array(p.buffer),b,f);let k=new DataView(new ArrayBuffer(46));k.setUint32(0,33639248,!0),k.setUint16(4,20,!0),k.setUint16(6,20,!0),k.setUint16(8,2048,!0),k.setUint32(16,d,!0),k.setUint32(20,f.length,!0),k.setUint32(24,f.length,!0),k.setUint16(28,b.length,!0),k.setUint32(42,r,!0),a.push(new Uint8Array(k.buffer),b),r+=30+b.length+f.length}let t=a.reduce((h,f)=>h+f.length,0),s=new DataView(new ArrayBuffer(22));s.setUint32(0,101010256,!0),s.setUint16(8,e.length,!0),s.setUint16(10,e.length,!0),s.setUint32(12,t,!0),s.setUint32(16,r,!0);let l=[...n,...a,new Uint8Array(s.buffer)],c=new Uint8Array(l.reduce((h,f)=>h+f.length,0)),m=0;for(let h of l)c.set(h,m),m+=h.length;return c}var Le=["contradictions","contract","off","rules","text","telemetry","cleanup"],at=e=>e.key==="spelling"||e.key==="telemetry"||!!e.fact?.startsWith("telemetry:")||e.fact==="node:LogCustomTelemetryEvent";function rt(e){if(e.key==="conflict"||e.key==="contradiction")return"contradictions";if(at(e))return"telemetry";if(e.key==="contract"||e.key==="flow"||e.key==="off"&&e.fact?.startsWith("called-with:"))return"contract";if(e.key==="off")return"off";if(e.key==="gap")return"rules";if(e.key==="twice")return"text";if(e.key==="unused")return"cleanup"}var se=e=>/«([^»]*)»/.exec(e)?.[1]??"";function it(e,n,a){let r=s=>T(e.fact??"",s,a.names),t=e.fact??"";if(t==="trigger:OnEscalate")return{en:"Learn to hand over to a person",pt:"Aprender a encaminhar para uma pessoa"};if(e.key==="contradiction")return{en:`Remove \xAB${r("en")}\xBB`,pt:`Tirar \xAB${r("pt")}\xBB`};if(e.key==="contract"&&t.startsWith("calls:")){let s=se(e.en);return{en:`Bring \xAB${s}\xBB into the folder, or remove the call`,pt:`Trazer \xAB${s}\xBB para a pasta, ou tirar a chamada`}}if(t==="routing:described")return{en:"Write the routing description: what it solves",pt:"Escrever a descri\xE7\xE3o de roteamento: o que ele resolve"};if(e.key==="flow"){let s=se(e.en);return{en:`Make the flow \xAB${s}\xBB return its result`,pt:`Fazer o fluxo \xAB${s}\xBB devolver o resultado`}}if(e.key==="spelling")return{en:`Name the event like the others: \xAB${E(t.slice(16),"en")}\xBB`,pt:`Chamar o evento como os outros: \xAB${E(t.slice(16),"pt")}\xBB`};if(e.key==="telemetry"&&!t)return{en:"Connect the telemetry to Application Insights",pt:"Ligar a telemetria ao Application Insights"};if(e.key==="telemetry"){let s=se(e.en);return{en:`Check that the event \xAB${s}\xBB fires`,pt:`Conferir se o evento \xAB${s}\xBB dispara`}}if(t.startsWith("telemetry:field:")){let[s,l]=t.slice(16).split("/");return{en:`Log \xAB${l}\xBB in the event \xAB${E(s,"en")}\xBB`,pt:`Registrar \xAB${l}\xBB no evento \xAB${E(s,"pt")}\xBB`}}if(t==="node:LogCustomTelemetryEvent")return{en:"Log telemetry",pt:"Registrar telemetria"};if(t.startsWith("text:block:")&&a.offPattern.some(s=>s.agent===n&&s.key===t&&s.variant))return{en:`Align the official block \xAB${r("en")}\xBB`,pt:`Alinhar o bloco oficial \xAB${r("pt")}\xBB`};if(t.startsWith("text:block:"))return{en:`Use the official block \xAB${r("en")}\xBB`,pt:`Usar o bloco oficial \xAB${r("pt")}\xBB`};if(t==="declared:kpi")return{en:"Declare a goal (KPI)",pt:"Declarar uma meta (KPI)"};if(e.key==="twice")return{en:`Settle on one \xAB${r("en")}\xBB`,pt:`Escolher um s\xF3 \xAB${r("pt")}\xBB`};if(e.key==="unused"){let s=a.unused.find(f=>f.agent===n&&f.key===t);if(s?.how==="disabled"&&t.startsWith("disabled:node:")){let f=(s.sources[0]?.file??"").replace(/(\.topic)?\.mcs\.ya?ml$/,"");return{en:`Remove the switched-off node in \xAB${f}\xBB`,pt:`Remover o n\xF3 desligado em \xAB${f}\xBB`}}let l=t.split(":")[1],c=s?.name??se(e.en);if(l==="variable")return{en:`Remove the variable \xAB${c}\xBB`,pt:`Remover a vari\xE1vel \xAB${c}\xBB`};let h={flow:{en:"the flow",pt:"o fluxo"},topic:{en:"the topic",pt:"o t\xF3pico"},action:{en:"the tool",pt:"a ferramenta"},knowledge:{en:"the knowledge source",pt:"a fonte de conhecimento"}}[l]??{en:"",pt:""};return{en:`Remove or switch on ${h.en} \xAB${c}\xBB`.replace(" "," "),pt:`Remover ou ligar ${h.pt} \xAB${c}\xBB`.replace(" "," ")}}return e.key==="conflict"?{en:`Check \xAB${r("en")}\xBB against what was declared`,pt:`Conferir \xAB${r("pt")}\xBB com o declarado`}:{en:`Have \xAB${r("en")}\xBB`,pt:`Ter \xAB${r("pt")}\xBB`}}function ae(e,n){let a=[];for(let t of e){let s=rt(t);if(s)for(let l of t.agents){let c=a.filter(m=>m.agent===l);if(!(t.fact&&c.some(m=>m.keys.includes(t.fact)))){if(t.fact?.startsWith("called-with:")){let m=c.find(d=>d.keys.some(p=>p.startsWith("called-with:"))),h=m??{agent:l,group:s,keys:[],en:"",pt:"",why:{en:"",pt:""}};m||a.push(h),h.keys.push(t.fact);let f=h.keys.map(d=>d==="called-with:history"?{en:"the conversation history",pt:"o hist\xF3rico da conversa"}:{en:`\xAB${d.slice(18)}\xBB`,pt:`\xAB${d.slice(18)}\xBB`}),b=d=>f.map(p=>p[d]).join(d==="pt"?" e ":" and ");h.en=`Receive ${b("en")} from the orchestrator`,h.pt=`Receber do gestor ${b("pt")}`,h.why={en:`${h.why.en} ${t.en}`.trim(),pt:`${h.why.pt} ${t.pt}`.trim()};continue}a.push({agent:l,group:s,keys:t.fact?[t.fact]:[],...it(t,l,n),why:{en:t.en,pt:t.pt}})}}}let r=[...new Set(n.agents.map(t=>t.id))];return a.sort((t,s)=>r.indexOf(t.agent)-r.indexOf(s.agent)||Le.indexOf(t.group)-Le.indexOf(s.group))}function lt(e){let n=new Map,a=/^(connector|operation|mcp|flow-uses):/;for(let t of Object.keys(e.typeNames)){let s=e.agents.filter(c=>c.role==="specialist"&&(e.types[c.id]??[]).includes(t));if(s.length<2)continue;let l=[...new Set(s.flatMap(c=>Object.keys(c.facts).filter(m=>a.test(m))))].sort();for(let c of l){let m=s.filter(b=>c in b.facts);if(m.length!==1)continue;let h=`${m[0].id} ${c}`,f=n.get(h)??{agent:m[0].id,key:c,types:[]};f.types.push(t),n.set(h,f)}}return[...n.values()].filter(t=>!(t.key.startsWith("operation:")&&n.has(`${t.agent} connector:${t.key.slice(10,t.key.indexOf("/"))}`))).map(t=>{let s=t.types.map(m=>e.typeNames[m]??m),l=m=>T(t.key,m,e.names),c=m=>s.map(h=>`\xAB${h}\xBB`).join(m==="pt"?" e ":" and ");return{agent:t.agent,types:t.types,typeNames:s,key:t.key,en:`\xAB${l("en")}\xBB \u2014 only it has this in ${s.length>1?"the types":"the type"} ${c("en")}: does the post need it?`,pt:`\xAB${l("pt")}\xBB \u2014 s\xF3 ele tem ${s.length>1?"nos tipos":"no tipo"} ${c("pt")}: o cargo precisa?`}})}var ct={"trigger:OnEscalate":{en:"Hands over to a person (escalation)",pt:"Sabe encaminhar para uma pessoa (escalonamento)"},"called-with:history":{en:"Gets the conversation history from the orchestrator",pt:"Recebe do gestor o hist\xF3rico da conversa"},"node:LogCustomTelemetryEvent":{en:"Logs its own errors (telemetry)",pt:"Registra os pr\xF3prios erros (telemetria)"},"declared:kpi":{en:"Has a goal (KPI)",pt:"Tem uma meta (KPI)"},"declared:owner":{en:"Has an owner",pt:"Tem um respons\xE1vel"},"declared:team":{en:"Has a team",pt:"Tem uma equipe"}},Ae=(e,n,a={})=>ct[e]?.[n]??(Ne(e)?T(e,n,a):n==="pt"?`Tem \xAB${T(e,n,a)}\xBB`:`Has \xAB${T(e,n,a)}\xBB`);var dt=["owner","environment","created-on","last-published"],pt=e=>/^\s*([^\n]*?[.!?])(\s|$)/.exec(e)?.[1].trim()??e.split(`
153
153
  `)[0].trim(),mt=e=>{let n=e.split(`
154
- `),a=n.findIndex(t=>/^\s*([-*•]|\d+[.)])\s+/.test(t));if(a<0)return[];let r=[];for(let t of n.slice(a)){let s=/^\s*(?:[-*•]|\d+[.)])\s+(.*)$/.exec(t);if(!s)break;r.push(s[1].trim())}return r.slice(0,5)};function De(e,n,a,r,t,s,l){let c=i=>e.agents.find(w=>w.id===i)?.displayName??i,m=(i,w)=>{let S=r.declared.find(R=>R.agent===i&&R.key===w);return S&&{value:S.value,source:S.source}},h=r.declared.some(i=>dt.includes(i.key)),f=r.declared.some(i=>i.key==="team"||i.key==="kpi"),b=lt(e),d=[...ae(n,e),...b.flatMap(i=>{let w=r.decisions.find(R=>R.key===i.key&&R.status==="rejected"&&i.types.some(A=>R.scope===`type:${A}`)),S=w?e.typeNames[w.scope.slice(5)]??w.scope.slice(5):"";return w?[{agent:i.agent,group:"cleanup",keys:[i.key],en:`Remove the access \xAB${T(i.key,"en",e.names)}\xBB`,pt:`Tirar o acesso \xAB${T(i.key,"pt",e.names)}\xBB`,why:{en:`The team decided the post \xAB${S}\xBB does not need it.`,pt:`O time decidiu que o cargo \xAB${S}\xBB n\xE3o precisa.`}}]:[]})],p=e.contract.missing.map(i=>({id:i.calls,name:i.name??i.calls,caller:i.caller})),k=e.agents.map(i=>m(i.id,"environment")?.value).filter(i=>!!i),j=[...new Set(k)].sort((i,w)=>k.filter(S=>S===w).length-k.filter(S=>S===i).length)[0],P=i=>{let w=[],S=m(i,"environment")?.value;return S&&j&&S!==j&&w.push("hiring"),h&&!m(i,"owner")&&w.push("noOwner"),h&&m(i,"created-on")&&!m(i,"last-published")&&w.push("neverPublished"),l&&!l.some(R=>R.agent===i)&&w.push("noEval"),w.push(d.some(R=>R.agent===i&&R.group!=="cleanup")?"pdi":"ok"),w},W=i=>({id:i,name:c(i),situation:P(i)}),D=e.agents.map(i=>i.id),M=i=>i.map(w=>({id:w,name:c(w)})),fe=p.map(i=>({id:i.id,name:i.name})),ue=[{key:"cast",people:M(D)},{key:"hiring",people:[...fe,...M(D.filter(i=>P(i).includes("hiring")))]},...h?[{key:"noOwner",people:M(D.filter(i=>P(i).includes("noOwner")))},{key:"neverPublished",people:M(D.filter(i=>P(i).includes("neverPublished")))}]:[],...l?[{key:"noEval",people:M(D.filter(i=>P(i).includes("noEval")))}]:[],{key:"pdi",people:M(D.filter(i=>P(i).includes("pdi")))},{key:"ok",people:M(D.filter(i=>P(i).includes("ok")))}],X=e.agents.filter(i=>i.role==="orchestrator").map(i=>W(i.id)),H=e.agents.filter(i=>i.role==="specialist"),J=[...new Set(H.flatMap(i=>e.types[i.id]??[]))],he=[...J.map(i=>({id:i,name:e.typeNames[i]??i,people:H.filter(w=>(e.types[w.id]??[])[0]===i).map(w=>({...W(w.id),...(e.types[w.id]??[]).length>1?{alsoIn:(e.types[w.id]??[]).slice(1).map(S=>e.typeNames[S]??S)}:{}}))})).filter(i=>i.people.length),...H.some(i=>!(e.types[i.id]??[]).length)?[{id:"",name:"",people:H.filter(i=>!(e.types[i.id]??[]).length).map(i=>W(i.id))}]:[]],Y=(i,w)=>({key:i,en:Ae(i,"en",e.names),pt:Ae(i,"pt",e.names),proposal:w}),V=(i,w,S)=>{let R=e.patterns.filter(x=>!x.partOf&&(x.scope===i||i!=="platform"&&x.scope==="platform")),A=R.filter(x=>x.decision?.status==="accepted"),o=new Set(e.offPattern.map(x=>x.key)),y=A.length?A.map(x=>Y(x.key,!1)):R.filter(x=>o.has(x.key)).map(x=>Y(x.key,!0)),O=t.filter(x=>x.has&&(!x.role||x.role===S)&&!y.some(q=>q.key===x.has)).map(x=>Y(x.has,!1));return{scope:i,name:w,requirements:[...y,...O]}},ge=[V("specialist",{en:"Specialist",pt:"Especialista"},"specialist"),...J.map(i=>V(`type:${i}`,{en:`Specialist \xB7 ${e.typeNames[i]??i}`,pt:`Especialista \xB7 ${e.typeNames[i]??i}`},"specialist")),...X.length?[V("orchestrator",{en:"Orchestrator",pt:"Orquestrador"},"orchestrator")]:[]],ye=e.agents.map(i=>{let S=a.find($=>$.id===i.id)?.texts.find($=>$.source==="instructions")?.text??"",R=Object.keys(i.facts),A=$=>({en:T($,"en",e.names),pt:T($,"pt",e.names)}),o=R.filter($=>/^(operation|mcp|flow-uses|knowledge):/.test($)&&!$.startsWith("knowledge:count")).map(A),y=R.filter($=>$.startsWith("text:")&&!$.endsWith("~variant")).map(A),O=e.contract.routes.find($=>$.agent===i.id)?.caller,x=e.telemetry.events.filter($=>$.agent===i.id),q=s&&{days:s.days,starts:s.rows.filter($=>$.agent===i.id&&$.event==="TopicStart").reduce(($,$e)=>$+$e.count,0),errors:x.reduce(($,$e)=>$+($e.fired??0),0),notFired:e.telemetry.notFired.filter($=>$.agent===i.id).map($=>$.name),silent:e.telemetry.silent.includes(i.id)},ze=[...new Set(["YAML",...s?[s.file]:[],...(l??[]).filter($=>$.agent===i.id).map($=>$.file),...r.declared.filter($=>$.agent===i.id).map($=>$.source.split(" \u203A ")[0])])],Re=d.filter($=>$.agent===i.id);return{id:i.id,name:c(i.id),role:i.role==="orchestrator"?"orchestrator":"specialist",types:(e.types[i.id]??[]).map($=>e.typeNames[$]??$),...S?{title:pt(S)}:{},...O?{manager:c(O)}:{},...m(i.id,"team")?{team:m(i.id,"team")}:{},...m(i.id,"owner")?{owner:m(i.id,"owner")}:{},...m(i.id,"created-on")?{created:m(i.id,"created-on")}:{},...m(i.id,"last-published")?{published:m(i.id,"last-published")}:{},...i.schemaName?{schemaName:i.schemaName}:{},...m(i.id,"environment")?{environment:m(i.id,"environment")}:{},summary:mt(S),tools:o,conduct:y,...m(i.id,"kpi")?{goal:m(i.id,"kpi")}:{},...q?{performance:q}:{},...l?{certifications:l.filter($=>$.agent===i.id)}:{},access:b.filter($=>$.agent===i.id),pdi:Re,sources:ze,seal:Re.some($=>$.group!=="cleanup")?"pdi":"ok"}}),Z=[...h?[]:["inventory"],...f?[]:["team"],...s?[]:["telemetry"]];return{...e.name?{name:e.name}:{},staff:ue,missing:Z,org:{orchestrators:X,types:he,ghosts:p},posts:ge,resumes:ye}}var qe=e=>Ee(e),ft={bold:!0,fill:"E8EEF7"},ut={v:"\u25CF",fill:"DDF3E6",center:!0},ht={v:"\xD7",fill:"FFD5CC",center:!0,bold:!0},gt={v:"\u25D0",fill:"FFF3C4",center:!0},yt={v:"\u2248",fill:"FFF6DC",center:!0,bold:!0},Me=Object.keys(G);function Ue(e,n,a,r="en"){let t=te[r],s=(o,y,O)=>({key:o,name:t[o],header:!0,columns:y.map(([x,q])=>({title:x,width:q})),rows:[y.map(([x])=>({v:x,...ft})),...O]}),l=o=>t[e.roles[o]],c=o=>o.startsWith("type:")?`${t.type}:${e.typeNames[o.slice(5)]??o.slice(5)}`:t[o],m=o=>(e.types[o]??[]).map(y=>e.typeNames[y]??y).join(" \xB7 "),h=o=>T(o,r,e.names),f=[...e.agents].sort((o,y)=>o.role===y.role?o.id.localeCompare(y.id):o.role==="orchestrator"?-1:1),b=[...new Set([...f.flatMap(o=>Object.keys(o.facts)),...e.patterns.map(o=>o.key)])].filter(o=>!o.endsWith("~variant")).sort((o,y)=>Me.indexOf(_(o))-Me.indexOf(_(y))||o.localeCompare(y)),d=new Set(e.offPattern.map(o=>`${o.agent} ${o.key}`)),p=o=>e.agents.filter(y=>y.role===o).length,k={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,p("orchestrator")],[t.count.specialists,p("specialist")],[t.count.patterns,e.patterns.length],[t.count.off,new Set(e.offPattern.map(o=>o.agent)).size],[t.count.gaps,e.gaps.length],[t.count.conflicts,e.conflicts.length],[t.count.solos,n.filter(o=>o.key==="solo").length],[t.count.unused,e.unused.length],["",""],[{v:n.length?t.look:t.nothing,bold:!0},""],...ne(n).flatMap(o=>[[{v:`${o[r]} \xB7 ${o.looks.length}`,bold:!0},""],...o.looks.map(({look:y})=>["",{v:y[r],wrap:!0}])])]},j=s("matrix",[[t.dimension,18],[t.fact,40],[t.key,34],...f.map(o=>[o.id,14])],b.map(o=>[G[_(o)][r],h(o),o,...f.map(y=>o in y.facts?o.startsWith("declared:")?gt:ut:`${o}~variant`in y.facts?yt:d.has(`${y.id} ${o}`)?ht:"")])),{look:P,everyone:W}=oe(e),D=s("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,...W].map(o=>{let y=e.offPattern.filter(O=>O.key===o.key).map(O=>O.agent);return[o.key,h(o.key),c(o.scope),t[o.role],`${Math.round(o.share*100)}%`,o.agents.join(", "),y.join(", "),o.decision?t[o.decision.status==="accepted"?"accept":"reject"]:"",o.decision?.why??""]})),M=s("off",[[t.agent,24],[t.role,14],[t.missing,44],[t.key,34],[t.scope,14],[t.accepted,14]],e.offPattern.map(o=>[o.agent,l(o.agent),h(o.key),o.key,c(o.scope),e.patterns.find(y=>y.key===o.key)?.decision?.status==="accepted"?t.yes:""])),fe=s("gaps",[[t.rule,16],[t.says,50],[t.role,14],[t.notMet,60]],e.gaps.map(o=>[o.rule.id,o.rule.says,o.rule.role?t[o.rule.role]:"",o.agents.join(", ")])),ue=s("conflicts",[[t.agent,24],[t.fact,40],[t.key,34],[t.declared,20],[t.source,40],[t.inYaml,12]],e.conflicts.map(o=>[o.agent,h(o.key),o.key,o.declared,o.source,o.observed?t.yes:t.no])),X=s("agents",[[t.agent,24],[t.name,32],[t.role,14],[t.types,24],[t.facts,8],[t.off,44],[t.alone,44],[t.children,24],[t.unknown,12]],f.map(o=>[o.id,o.displayName??"",t[o.role],m(o.id),Object.keys(o.facts).length,e.offPattern.filter(y=>y.agent===o.id).map(y=>h(y.key)).join("; "),e.solos.filter(y=>y.agents[0]===o.id).map(y=>h(y.key)).join("; "),o.children.map(y=>y.name).join(", "),e.unknown.filter(y=>y.agent===o.id).length||""])),H=s("evidence",[[t.agent,30],[t.fact,40],[t.key,34],[t.file,50],[t.line,8]],f.flatMap(o=>[{who:o.id,facts:o.facts},...o.children.map(y=>({who:`${o.id} \u203A ${y.name}`,facts:y.facts}))]).flatMap(({who:o,facts:y})=>Object.entries(y).sort(([O],[x])=>O.localeCompare(x)).flatMap(([O,x])=>x.map(q=>[o,h(O),O,q.file,q.line??""])))),J=s("declared",[[t.agent,24],[t.key,34],[t.value,40],[t.source,40]],a.declared.map(o=>[o.agent,o.key,o.value,o.source])),he=s("text",[[t.id,28],[t.label,36],[t.body,70],[t.have,50],[t.variant,40],[t.official,10]],e.blocks.map(o=>[o.id,o.official??o.label,{v:o.text,wrap:!0},Object.keys(o.holders).sort().join(", "),Object.entries(o.variants).sort(([y],[O])=>y.localeCompare(O)).map(([y,O])=>`${y} (${Math.round(O.similarity*100)}%)`).join(", "),o.official?t.yes:""])),Y=s("routing",[[t.caller,24],[t.called,30],[t.history,10],[t.inputs,30],[t.routingText,70],[t.chars,10],[t.file,44]],e.contract.routes.map(o=>[o.caller,o.agent??`${o.name??o.calls} (${t.notInFolder})`,o.history?t.yes:t.no,o.inputs.join(", "),{v:o.description,wrap:!0},o.description.length,`${o.file}${o.line?`:${o.line}`:""}`])),V=e.telemetry.days,ge=s("telemetry",[[t.agent,24],[t.written,30],[t.form,28],[t.fields,50],[t.file,44],...V?[[t.fired(V),16]]:[]],e.telemetry.events.map(o=>[o.agent,o.name,E(o.as,r),o.fields?o.fields.join(", "):t.notRead,`${o.file}${o.line?`:${o.line}`:""}`,...V?[o.fired===void 0||e.telemetry.silent.includes(o.agent)?"\u2014":o.fired===0?{v:0,color:"B42318",bold:!0}:o.fired]:[]])),ye=s("unused",[[t.agent,24],[t.what,16],[t.name,30],[t.how,14],[t.file,50]],e.unused.flatMap(o=>o.sources.map(y=>[o.agent,t.thing[o.what]??o.what,e.names[o.name]??o.name,t[o.how],`${y.file}${y.line?`:${y.line}`:""}`]))),Z=De(e,n,[],a,[]),i=o=>Z.staff.filter(y=>y.key!=="cast"&&y.people.some(O=>O.id===o)).map(y=>t.situation[y.key]).join(", "),w=ae(n,e),S=s("staff",[[t.agent,24],[t.name,32],[t.situation_,34],[t.manager,24],[t.teamCol,22],[t.ownerCol,30],[t.hired,14],[t.publishedCol,14],[t.items,10]],Z.resumes.map(o=>[o.id,o.name,i(o.id),o.manager??"",o.team?.value??"",o.owner?.value??"",o.created?.value??"",o.published?.value??"",w.filter(y=>y.agent===o.id).length||""])),R=s("pdi",[[t.agent,24],[t.item,60],[t.why,70],[t.key,40],[t.group,18]],w.map(o=>[o.agent,o[r],{v:o.why[r],wrap:!0},o.keys.join(", "),t.pdiGroup[o.group]])),A=[k,j,D,...e.blocks.length?[he]:[],...e.contract.routes.length?[Y]:[],...e.telemetry.events.length?[ge]:[],M,fe,ue,...e.unused.length?[ye]:[],X,S,...w.length?[R]:[],H,J];return e.unknown.length&&A.push(s("unknown",[[t.agent,24],[t.file,50],[t.why,40],[t.kind,24]],e.unknown.map(o=>[o.agent,o.file,t.why_[o.why],o.kind??""]))),A}var $t={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 or type \xB7 \u2248 a variation of the block \xB7 \u25D0 declared by people",pattern:"pattern",type:"Type",noType:"no type",alsoIn:"also in",official:"official block",variation:"Variation",alike:"alike",text:"The text",types:"Types",of:(e,n,a)=>`${e} of ${n} ${a}`,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,a,r,t)=>`${e} in the cast \xB7 ${n} patterns \xB7 ${a} off a pattern \xB7 ${r} only one has \xB7 threshold ${t}% of each role`,excel:"\u2B07 Excel",yaml:"\u2B07 cast.yaml",png:"\u2B07 PNG",playbill:"The cast\u2019s HR \u2192",plot:"Stage \u2192",name:"Name",said:"declared",unused:e=>`Unused (${e})`,nothingUnused:"Everything is used, nothing is switched off.",flows:"Flows",returnsNothing:"returns nothing",otherFlow:"another flow",telemetry:"Telemetry",times:(e,n)=>`${e} ${e===1?"time":"times"} in ${n} days`,notFired:"did not fire",noLine:"no line in the telemetry",routing:"Routing",called:"Called",history:"History",inputs:"Inputs",description:"Description",notInFolder:"not in the folder",chars:e=>`${e} characters`},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 ou tipo \xB7 \u2248 tem uma varia\xE7\xE3o do bloco \xB7 \u25D0 declarado por pessoas",pattern:"padr\xE3o",type:"Tipo",noType:"sem tipo",alsoIn:"tamb\xE9m em",official:"bloco oficial",variation:"Varia\xE7\xE3o",alike:"parecido",text:"O texto",types:"Tipos",of:(e,n,a)=>`${e} de ${n} ${a}`,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,a,r,t)=>`${e} no elenco \xB7 ${n} padr\xF5es \xB7 ${a} fora do padr\xE3o \xB7 ${r} s\xF3 um tem \xB7 limite ${t}% de cada papel`,excel:"\u2B07 Excel",yaml:"\u2B07 cast.yaml",png:"\u2B07 PNG",playbill:"RH do elenco \u2192",plot:"Palco \u2192",name:"Nome",said:"declarado",unused:e=>`Sem uso (${e})`,nothingUnused:"Tudo \xE9 usado, nada est\xE1 desligado.",flows:"Fluxos",returnsNothing:"n\xE3o devolve nada",otherFlow:"outro fluxo",telemetry:"Telemetria",times:(e,n)=>`${e} ${e===1?"vez":"vezes"} em ${n} dias`,notFired:"n\xE3o disparou",noLine:"nenhuma linha na telemetria",routing:"Roteamento",called:"Chamado",history:"Hist\xF3rico",inputs:"Entradas",description:"Descri\xE7\xE3o",notInFolder:"n\xE3o est\xE1 na pasta",chars:e=>`${e} caracteres`}},C=JSON.parse(document.getElementById("cast").textContent),{result:v,lang:F,looks:K}=C,u=$t[F],N=te[F],me=Ue(v,K,C.cast,F);document.documentElement.lang=F==="pt"?"pt-BR":"en";document.title=v.name??C.id;var g=e=>String(e??"").replace(/[&<>"']/g,n=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[n]),U=e=>g(T(e,F,v.names)),re=[...v.agents].sort((e,n)=>e.role===n.role?e.id.localeCompare(n.id):e.role==="orchestrator"?-1:1),Se=e=>v.patterns.find(n=>n.key===e),We=e=>[...new Set(v.offPattern.filter(n=>n.key===e||n.partOf===e).map(n=>n.agent))],_e=e=>e.startsWith("type:")?v.typeNames[e.slice(5)]??e.slice(5):N[e],Ve=e=>e.startsWith("type:")?"type":e,ce=Object.keys(v.typeNames),vt=e=>e.startsWith("text:block:")?v.blocks.find(n=>`text:block:${n.id}`===e):void 0,Oe=e=>{let n=Se(e);if(!n)return"";let a=n.decision?`<span class="cl-badge ${n.decision.status}">${g(N[n.decision.status==="accepted"?"accept":"reject"])}</span>`:"";return`${n.official?`<span class="cl-badge official">${u.official}</span>`:""}<span class="cl-badge ${Ve(n.scope)}">${u.pattern} \xB7 ${g(_e(n.scope))}</span>${a}`},L="map",I,z="all",ie,B,de=document.getElementById("app"),Ge=ne(K),le=new Set(Ge.filter(e=>!e.folded).map(e=>e.key));function He(){let e=[["map",u.map],["patterns",u.patterns],["cast",u.cast],["microsoft",u.microsoft],["unused",u.unused(v.unused.length)],["unknown",u.unknown(v.unknown.length)]],n=new Set(v.offPattern.map(a=>a.agent)).size;de.innerHTML=`<div class="cl-wrap">
154
+ `),a=n.findIndex(t=>/^\s*([-*•]|\d+[.)])\s+/.test(t));if(a<0)return[];let r=[];for(let t of n.slice(a)){let s=/^\s*(?:[-*•]|\d+[.)])\s+(.*)$/.exec(t);if(!s)break;r.push(s[1].trim())}return r.slice(0,5)};function De(e,n,a,r,t,s,l){let c=i=>e.agents.find(w=>w.id===i)?.displayName??i,m=(i,w)=>{let S=r.declared.find(R=>R.agent===i&&R.key===w);return S&&{value:S.value,source:S.source}},h=r.declared.some(i=>dt.includes(i.key)),f=r.declared.some(i=>i.key==="team"||i.key==="kpi"),b=lt(e),d=[...ae(n,e),...b.flatMap(i=>{let w=r.decisions.find(R=>R.key===i.key&&R.status==="rejected"&&i.types.some(A=>R.scope===`type:${A}`)),S=w?e.typeNames[w.scope.slice(5)]??w.scope.slice(5):"";return w?[{agent:i.agent,group:"cleanup",keys:[i.key],en:`Remove the access \xAB${T(i.key,"en",e.names)}\xBB`,pt:`Tirar o acesso \xAB${T(i.key,"pt",e.names)}\xBB`,why:{en:`The team decided the post \xAB${S}\xBB does not need it.`,pt:`O time decidiu que o cargo \xAB${S}\xBB n\xE3o precisa.`}}]:[]})],p=e.contract.missing.map(i=>({id:i.calls,name:i.name??i.calls,caller:i.caller})),k=e.agents.map(i=>m(i.id,"environment")?.value).filter(i=>!!i),j=[...new Set(k)].sort((i,w)=>k.filter(S=>S===w).length-k.filter(S=>S===i).length)[0],P=i=>{let w=[],S=m(i,"environment")?.value;return S&&j&&S!==j&&w.push("hiring"),h&&!m(i,"owner")&&w.push("noOwner"),h&&m(i,"created-on")&&!m(i,"last-published")&&w.push("neverPublished"),l&&!l.some(R=>R.agent===i)&&w.push("noEval"),w.push(d.some(R=>R.agent===i&&R.group!=="cleanup")?"pdi":"ok"),w},U=i=>({id:i,name:c(i),situation:P(i)}),D=e.agents.map(i=>i.id),M=i=>i.map(w=>({id:w,name:c(w)})),fe=p.map(i=>({id:i.id,name:i.name})),ue=[{key:"cast",people:M(D)},{key:"hiring",people:[...fe,...M(D.filter(i=>P(i).includes("hiring")))]},...h?[{key:"noOwner",people:M(D.filter(i=>P(i).includes("noOwner")))},{key:"neverPublished",people:M(D.filter(i=>P(i).includes("neverPublished")))}]:[],...l?[{key:"noEval",people:M(D.filter(i=>P(i).includes("noEval")))}]:[],{key:"pdi",people:M(D.filter(i=>P(i).includes("pdi")))},{key:"ok",people:M(D.filter(i=>P(i).includes("ok")))}],X=e.agents.filter(i=>i.role==="orchestrator").map(i=>U(i.id)),H=e.agents.filter(i=>i.role==="specialist"),J=[...new Set(H.flatMap(i=>e.types[i.id]??[]))],he=[...J.map(i=>({id:i,name:e.typeNames[i]??i,people:H.filter(w=>(e.types[w.id]??[])[0]===i).map(w=>({...U(w.id),...(e.types[w.id]??[]).length>1?{alsoIn:(e.types[w.id]??[]).slice(1).map(S=>e.typeNames[S]??S)}:{}}))})).filter(i=>i.people.length),...H.some(i=>!(e.types[i.id]??[]).length)?[{id:"",name:"",people:H.filter(i=>!(e.types[i.id]??[]).length).map(i=>U(i.id))}]:[]],Y=(i,w)=>({key:i,en:Ae(i,"en",e.names),pt:Ae(i,"pt",e.names),proposal:w}),V=(i,w,S)=>{let R=e.patterns.filter(x=>!x.partOf&&(x.scope===i||i!=="platform"&&x.scope==="platform")),A=R.filter(x=>x.decision?.status==="accepted"),o=new Set(e.offPattern.map(x=>x.key)),y=A.length?A.map(x=>Y(x.key,!1)):R.filter(x=>o.has(x.key)).map(x=>Y(x.key,!0)),O=t.filter(x=>x.has&&(!x.role||x.role===S)&&!y.some(W=>W.key===x.has)).map(x=>Y(x.has,!1));return{scope:i,name:w,requirements:[...y,...O]}},ge=[V("specialist",{en:"Specialist",pt:"Especialista"},"specialist"),...J.map(i=>V(`type:${i}`,{en:`Specialist \xB7 ${e.typeNames[i]??i}`,pt:`Especialista \xB7 ${e.typeNames[i]??i}`},"specialist")),...X.length?[V("orchestrator",{en:"Orchestrator",pt:"Orquestrador"},"orchestrator")]:[]],ye=e.agents.map(i=>{let S=a.find($=>$.id===i.id)?.texts.find($=>$.source==="instructions")?.text??"",R=Object.keys(i.facts),A=$=>({en:T($,"en",e.names),pt:T($,"pt",e.names)}),o=R.filter($=>/^(operation|mcp|flow-uses|knowledge):/.test($)&&!$.startsWith("knowledge:count")).map(A),y=R.filter($=>$.startsWith("text:")&&!$.endsWith("~variant")).map(A),O=e.contract.routes.find($=>$.agent===i.id)?.caller,x=e.telemetry.events.filter($=>$.agent===i.id),W=s&&{days:s.days,starts:s.rows.filter($=>$.agent===i.id&&$.event==="TopicStart").reduce(($,$e)=>$+$e.count,0),errors:x.reduce(($,$e)=>$+($e.fired??0),0),notFired:e.telemetry.notFired.filter($=>$.agent===i.id).map($=>$.name),silent:e.telemetry.silent.includes(i.id)},ze=[...new Set(["YAML",...s?[s.file]:[],...(l??[]).filter($=>$.agent===i.id).map($=>$.file),...r.declared.filter($=>$.agent===i.id).map($=>$.source.split(" \u203A ")[0])])],Re=d.filter($=>$.agent===i.id);return{id:i.id,name:c(i.id),role:i.role==="orchestrator"?"orchestrator":"specialist",types:(e.types[i.id]??[]).map($=>e.typeNames[$]??$),...S?{title:pt(S)}:{},...O?{manager:c(O)}:{},...m(i.id,"team")?{team:m(i.id,"team")}:{},...m(i.id,"owner")?{owner:m(i.id,"owner")}:{},...m(i.id,"created-on")?{created:m(i.id,"created-on")}:{},...m(i.id,"last-published")?{published:m(i.id,"last-published")}:{},...i.schemaName?{schemaName:i.schemaName}:{},...m(i.id,"environment")?{environment:m(i.id,"environment")}:{},summary:mt(S),tools:o,conduct:y,...m(i.id,"kpi")?{goal:m(i.id,"kpi")}:{},...W?{performance:W}:{},...l?{certifications:l.filter($=>$.agent===i.id)}:{},access:b.filter($=>$.agent===i.id),pdi:Re,sources:ze,seal:Re.some($=>$.group!=="cleanup")?"pdi":"ok"}}),Z=[...h?[]:["inventory"],...f?[]:["team"],...s?[]:["telemetry"]];return{...e.name?{name:e.name}:{},staff:ue,missing:Z,org:{orchestrators:X,types:he,ghosts:p},posts:ge,resumes:ye}}var We=e=>Ee(e),ft={bold:!0,fill:"E8EEF7"},ut={v:"\u25CF",fill:"DDF3E6",center:!0},ht={v:"\xD7",fill:"FFD5CC",center:!0,bold:!0},gt={v:"\u25D0",fill:"FFF3C4",center:!0},yt={v:"\u2248",fill:"FFF6DC",center:!0,bold:!0},Me=Object.keys(G);function qe(e,n,a,r="en"){let t=te[r],s=(o,y,O)=>({key:o,name:t[o],header:!0,columns:y.map(([x,W])=>({title:x,width:W})),rows:[y.map(([x])=>({v:x,...ft})),...O]}),l=o=>t[e.roles[o]],c=o=>o.startsWith("type:")?`${t.type}:${e.typeNames[o.slice(5)]??o.slice(5)}`:t[o],m=o=>(e.types[o]??[]).map(y=>e.typeNames[y]??y).join(" \xB7 "),h=o=>T(o,r,e.names),f=[...e.agents].sort((o,y)=>o.role===y.role?o.id.localeCompare(y.id):o.role==="orchestrator"?-1:1),b=[...new Set([...f.flatMap(o=>Object.keys(o.facts)),...e.patterns.map(o=>o.key)])].filter(o=>!o.endsWith("~variant")).sort((o,y)=>Me.indexOf(_(o))-Me.indexOf(_(y))||o.localeCompare(y)),d=new Set(e.offPattern.map(o=>`${o.agent} ${o.key}`)),p=o=>e.agents.filter(y=>y.role===o).length,k={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,p("orchestrator")],[t.count.specialists,p("specialist")],[t.count.patterns,e.patterns.length],[t.count.off,new Set(e.offPattern.map(o=>o.agent)).size],[t.count.gaps,e.gaps.length],[t.count.conflicts,e.conflicts.length],[t.count.solos,n.filter(o=>o.key==="solo").length],[t.count.unused,e.unused.length],["",""],[{v:n.length?t.look:t.nothing,bold:!0},""],...ne(n).flatMap(o=>[[{v:`${o[r]} \xB7 ${o.looks.length}`,bold:!0},""],...o.looks.map(({look:y})=>["",{v:y[r],wrap:!0}])])]},j=s("matrix",[[t.dimension,18],[t.fact,40],[t.key,34],...f.map(o=>[o.id,14])],b.map(o=>[G[_(o)][r],h(o),o,...f.map(y=>o in y.facts?o.startsWith("declared:")?gt:ut:`${o}~variant`in y.facts?yt:d.has(`${y.id} ${o}`)?ht:"")])),{look:P,everyone:U}=oe(e),D=s("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,...U].map(o=>{let y=e.offPattern.filter(O=>O.key===o.key).map(O=>O.agent);return[o.key,h(o.key),c(o.scope),t[o.role],`${Math.round(o.share*100)}%`,o.agents.join(", "),y.join(", "),o.decision?t[o.decision.status==="accepted"?"accept":"reject"]:"",o.decision?.why??""]})),M=s("off",[[t.agent,24],[t.role,14],[t.missing,44],[t.key,34],[t.scope,14],[t.accepted,14]],e.offPattern.map(o=>[o.agent,l(o.agent),h(o.key),o.key,c(o.scope),e.patterns.find(y=>y.key===o.key)?.decision?.status==="accepted"?t.yes:""])),fe=s("gaps",[[t.rule,16],[t.says,50],[t.role,14],[t.notMet,60]],e.gaps.map(o=>[o.rule.id,o.rule.says,o.rule.role?t[o.rule.role]:"",o.agents.join(", ")])),ue=s("conflicts",[[t.agent,24],[t.fact,40],[t.key,34],[t.declared,20],[t.source,40],[t.inYaml,12]],e.conflicts.map(o=>[o.agent,h(o.key),o.key,o.declared,o.source,o.observed?t.yes:t.no])),X=s("agents",[[t.agent,24],[t.name,32],[t.role,14],[t.types,24],[t.facts,8],[t.off,44],[t.alone,44],[t.children,24],[t.unknown,12]],f.map(o=>[o.id,o.displayName??"",t[o.role],m(o.id),Object.keys(o.facts).length,e.offPattern.filter(y=>y.agent===o.id).map(y=>h(y.key)).join("; "),e.solos.filter(y=>y.agents[0]===o.id).map(y=>h(y.key)).join("; "),o.children.map(y=>y.name).join(", "),e.unknown.filter(y=>y.agent===o.id).length||""])),H=s("evidence",[[t.agent,30],[t.fact,40],[t.key,34],[t.file,50],[t.line,8]],f.flatMap(o=>[{who:o.id,facts:o.facts},...o.children.map(y=>({who:`${o.id} \u203A ${y.name}`,facts:y.facts}))]).flatMap(({who:o,facts:y})=>Object.entries(y).sort(([O],[x])=>O.localeCompare(x)).flatMap(([O,x])=>x.map(W=>[o,h(O),O,W.file,W.line??""])))),J=s("declared",[[t.agent,24],[t.key,34],[t.value,40],[t.source,40]],a.declared.map(o=>[o.agent,o.key,o.value,o.source])),he=s("text",[[t.id,28],[t.label,36],[t.body,70],[t.have,50],[t.variant,40],[t.official,10]],e.blocks.map(o=>[o.id,o.official??o.label,{v:o.text,wrap:!0},Object.keys(o.holders).sort().join(", "),Object.entries(o.variants).sort(([y],[O])=>y.localeCompare(O)).map(([y,O])=>`${y} (${Math.round(O.similarity*100)}%)`).join(", "),o.official?t.yes:""])),Y=s("routing",[[t.caller,24],[t.called,30],[t.history,10],[t.inputs,30],[t.routingText,70],[t.chars,10],[t.file,44]],e.contract.routes.map(o=>[o.caller,o.agent??`${o.name??o.calls} (${t.notInFolder})`,o.history?t.yes:t.no,o.inputs.join(", "),{v:o.description,wrap:!0},o.description.length,`${o.file}${o.line?`:${o.line}`:""}`])),V=e.telemetry.days,ge=s("telemetry",[[t.agent,24],[t.written,30],[t.form,28],[t.fields,50],[t.file,44],...V?[[t.fired(V),16]]:[]],e.telemetry.events.map(o=>[o.agent,o.name,E(o.as,r),o.fields?o.fields.join(", "):t.notRead,`${o.file}${o.line?`:${o.line}`:""}`,...V?[o.fired===void 0||e.telemetry.silent.includes(o.agent)?"\u2014":o.fired===0?{v:0,color:"B42318",bold:!0}:o.fired]:[]])),ye=s("unused",[[t.agent,24],[t.what,16],[t.name,30],[t.how,14],[t.file,50]],e.unused.flatMap(o=>o.sources.map(y=>[o.agent,t.thing[o.what]??o.what,e.names[o.name]??o.name,t[o.how],`${y.file}${y.line?`:${y.line}`:""}`]))),Z=De(e,n,[],a,[]),i=o=>Z.staff.filter(y=>y.key!=="cast"&&y.people.some(O=>O.id===o)).map(y=>t.situation[y.key]).join(", "),w=ae(n,e),S=s("staff",[[t.agent,24],[t.name,32],[t.situation_,34],[t.manager,24],[t.teamCol,22],[t.ownerCol,30],[t.hired,14],[t.publishedCol,14],[t.items,10]],Z.resumes.map(o=>[o.id,o.name,i(o.id),o.manager??"",o.team?.value??"",o.owner?.value??"",o.created?.value??"",o.published?.value??"",w.filter(y=>y.agent===o.id).length||""])),R=s("pdi",[[t.agent,24],[t.item,60],[t.why,70],[t.key,40],[t.group,18]],w.map(o=>[o.agent,o[r],{v:o.why[r],wrap:!0},o.keys.join(", "),t.pdiGroup[o.group]])),A=[k,j,D,...e.blocks.length?[he]:[],...e.contract.routes.length?[Y]:[],...e.telemetry.events.length?[ge]:[],M,fe,ue,...e.unused.length?[ye]:[],X,S,...w.length?[R]:[],H,J];return e.unknown.length&&A.push(s("unknown",[[t.agent,24],[t.file,50],[t.why,40],[t.kind,24]],e.unknown.map(o=>[o.agent,o.file,t.why_[o.why],o.kind??""]))),A}var $t={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 or type \xB7 \u2248 a variation of the block \xB7 \u25D0 declared by people",pattern:"pattern",type:"Type",noType:"no type",alsoIn:"also in",official:"official block",variation:"Variation",alike:"alike",text:"The text",types:"Types",of:(e,n,a)=>`${e} of ${n} ${a}`,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,a,r,t)=>`${e} in the cast \xB7 ${n} patterns \xB7 ${a} off a pattern \xB7 ${r} only one has \xB7 threshold ${t}% of each role`,excel:"\u2B07 Excel",yaml:"\u2B07 cast.yaml",png:"\u2B07 PNG",playbill:"The cast\u2019s HR \u2192",plot:"Stage \u2192",name:"Name",said:"declared",unused:e=>`Unused (${e})`,nothingUnused:"Everything is used, nothing is switched off.",flows:"Flows",returnsNothing:"returns nothing",otherFlow:"another flow",telemetry:"Telemetry",times:(e,n)=>`${e} ${e===1?"time":"times"} in ${n} days`,notFired:"did not fire",noLine:"no line in the telemetry",routing:"Routing",called:"Called",history:"History",inputs:"Inputs",description:"Description",notInFolder:"not in the folder",chars:e=>`${e} characters`},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 ou tipo \xB7 \u2248 tem uma varia\xE7\xE3o do bloco \xB7 \u25D0 declarado por pessoas",pattern:"padr\xE3o",type:"Tipo",noType:"sem tipo",alsoIn:"tamb\xE9m em",official:"bloco oficial",variation:"Varia\xE7\xE3o",alike:"parecido",text:"O texto",types:"Tipos",of:(e,n,a)=>`${e} de ${n} ${a}`,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,a,r,t)=>`${e} no elenco \xB7 ${n} padr\xF5es \xB7 ${a} fora do padr\xE3o \xB7 ${r} s\xF3 um tem \xB7 limite ${t}% de cada papel`,excel:"\u2B07 Excel",yaml:"\u2B07 cast.yaml",png:"\u2B07 PNG",playbill:"RH do elenco \u2192",plot:"Palco \u2192",name:"Nome",said:"declarado",unused:e=>`Sem uso (${e})`,nothingUnused:"Tudo \xE9 usado, nada est\xE1 desligado.",flows:"Fluxos",returnsNothing:"n\xE3o devolve nada",otherFlow:"outro fluxo",telemetry:"Telemetria",times:(e,n)=>`${e} ${e===1?"vez":"vezes"} em ${n} dias`,notFired:"n\xE3o disparou",noLine:"nenhuma linha na telemetria",routing:"Roteamento",called:"Chamado",history:"Hist\xF3rico",inputs:"Entradas",description:"Descri\xE7\xE3o",notInFolder:"n\xE3o est\xE1 na pasta",chars:e=>`${e} caracteres`}},C=JSON.parse(document.getElementById("cast").textContent),{result:v,lang:F,looks:K}=C,u=$t[F],N=te[F],me=qe(v,K,C.cast,F);document.documentElement.lang=F==="pt"?"pt-BR":"en";document.title=v.name??C.id;var g=e=>String(e??"").replace(/[&<>"']/g,n=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[n]),q=e=>g(T(e,F,v.names)),re=[...v.agents].sort((e,n)=>e.role===n.role?e.id.localeCompare(n.id):e.role==="orchestrator"?-1:1),Se=e=>v.patterns.find(n=>n.key===e),Ue=e=>[...new Set(v.offPattern.filter(n=>n.key===e||n.partOf===e).map(n=>n.agent))],_e=e=>e.startsWith("type:")?v.typeNames[e.slice(5)]??e.slice(5):N[e],Ve=e=>e.startsWith("type:")?"type":e,ce=Object.keys(v.typeNames),vt=e=>e.startsWith("text:block:")?v.blocks.find(n=>`text:block:${n.id}`===e):void 0,Oe=e=>{let n=Se(e);if(!n)return"";let a=n.decision?`<span class="cl-badge ${n.decision.status}">${g(N[n.decision.status==="accepted"?"accept":"reject"])}</span>`:"";return`${n.official?`<span class="cl-badge official">${u.official}</span>`:""}<span class="cl-badge ${Ve(n.scope)}">${u.pattern} \xB7 ${g(_e(n.scope))}</span>${a}`},L="map",I,z="all",ie,B,de=document.getElementById("app"),Ge=ne(K),le=new Set(Ge.filter(e=>!e.folded).map(e=>e.key));function He(){let e=[["map",u.map],["patterns",u.patterns],["cast",u.cast],["microsoft",u.microsoft],["unused",u.unused(v.unused.length)],["unknown",u.unknown(v.unknown.length)]],n=new Set(v.offPattern.map(a=>a.agent)).size;de.innerHTML=`<div class="cl-wrap">
155
155
  <header><h1 class="cl-title">${g(v.name??C.id)}</h1><p class="cl-sub">${u.summary(v.agents.length,v.patterns.length,n,K.filter(a=>a.key==="solo").length,Math.round(C.threshold*100))}</p><p class="cl-private">${g(N.privacy)}</p></header>
156
156
  <div class="cl-bar" role="tablist">${e.map(([a,r])=>`<button class="cl-tab" role="tab" aria-selected="${a===L}" data-tab="${a}">${g(r)}</button>`).join("")}
157
157
  <span class="cl-space"></span>${C.plot?`<a class="cl-get" href="${g(C.plot)}">${g(u.plot)}</a>`:""}${C.playbill?`<a class="cl-get" href="${g(C.playbill)}">${g(u.playbill)}</a>`:""}<button class="cl-get" data-get="xlsx">${u.excel}</button><button class="cl-get" data-get="yaml">${u.yaml}</button>${L==="map"?`<button class="cl-get" data-get="png">${u.png}</button>`:""}</div>
@@ -159,23 +159,23 @@ a.cl-get { color: var(--ink); text-decoration: none; font-weight: 600; }
159
159
  <p class="cl-foot">${u.foot}</p>
160
160
  </div>`}function kt(){let e=a=>{let r=le.has(a.key),t=r?`<ul id="cl-group-${a.key}">${a.looks.map(({look:s,at:l})=>`<li><button data-look="${l}">${g(s[F])}</button></li>`).join("")}</ul>`:"";return`<div class="cl-group"><button class="cl-group-head" data-group="${a.key}" aria-expanded="${r}" aria-controls="cl-group-${a.key}"><span class="cl-caret">${r?"\u25BE":"\u25B8"}</span>${g(a[F])} <span class="cl-count">${a.looks.length}</span></button>${t}</div>`};return`${K.length?`<section class="cl-look"><h2>${g(N.look)} \xB7 ${K.length}</h2>${Ge.map(e).join("")}</section>`:""}<div class="cl-body${I?" with-detail":""}"><div class="cl-wrap" style="gap:16px">${bt()}${xt()}</div>${I?`<aside class="cl-card cl-detail" aria-live="polite">${St()}</aside>`:""}</div>`}function wt(){let e=t=>z==="all"||t.role===z;if(!ce.length)return[{id:"",name:"",cols:re.filter(e).map(t=>({a:t,also:[]}))}];let n=t=>v.types[t]??[],a=re.filter(t=>t.role==="specialist"&&e(t));return[{id:"orchestrator",name:N.orchestrator,cols:re.filter(t=>t.role==="orchestrator"&&e(t)).map(t=>({a:t,also:[]}))},...ce.map(t=>({id:t,name:v.typeNames[t],cols:a.filter(s=>n(s.id).includes(t)).map(s=>({a:s,also:n(s.id).filter(l=>l!==t).map(l=>v.typeNames[l]??l)}))})),{id:"-",name:u.noType,cols:a.filter(t=>!n(t.id).length).map(t=>({a:t,also:[]}))}].filter(t=>t.cols.length&&(!B||t.id===B))}function bt(){let e=wt(),n=e.flatMap(f=>f.cols),a=C.focusAreas.find(f=>f.id===ie),r=[...new Set([...v.agents.flatMap(f=>Object.keys(f.facts)),...v.patterns.map(f=>f.key)])].filter(f=>!f.endsWith("~variant")&&(!a||a.facts.includes(f))),t=new Set(v.offPattern.map(f=>`${f.agent} ${f.key}`)),s=(f,b,d,p)=>`<button class="cl-chip" ${f}="${g(b)}" aria-pressed="${d}">${g(p)}</button>`,l=`<div class="cl-filters">${u.role}: ${s("data-role","all",z==="all",u.all)}${s("data-role","specialist",z==="specialist",N.specialist)}${s("data-role","orchestrator",z==="orchestrator",N.orchestrator)}
161
161
  ${ce.length?`<span style="margin-left:10px">${u.type}:</span> ${s("data-type","",!B,u.all)}${ce.map(f=>s("data-type",f,B===f,v.typeNames[f])).join("")}${s("data-type","-",B==="-",u.noType)}`:""}
162
- ${C.focusAreas.length?`<span style="margin-left:10px">${u.focus}:</span> ${s("data-focus","",!ie,u.all)}${C.focusAreas.map(f=>s("data-focus",f.id,ie===f.id,f.name)).join("")}`:""}</div>`,c="";for(let f of Object.keys(G)){let b=p=>we(p)?`${T(we(p),F,v.names)}${T(p,F,v.names)}`:T(p,F,v.names),d=r.filter(p=>_(p)===f).sort((p,k)=>b(p).localeCompare(b(k)));d.length&&(c+=`<tr class="cl-dim"><td colspan="${n.length+1}">${g(G[f][F])}</td></tr>`,c+=d.map(p=>`<tr><th scope="row" style="text-align:left;font-weight:400"><button class="cl-fact${I?.key===p&&!I.agent?" picked":""}" data-key="${g(p)}">${U(p)}</button>${Oe(p)}</th>${n.map(({a:k})=>{let j=p in k.facts?p.startsWith("declared:")?["said","\u25D0"]:["has","\u25CF"]:`${p}~variant`in k.facts?["var","\u2248"]:t.has(`${k.id} ${p}`)?["off","\xD7"]:void 0;return`<td class="cl-mark${j?` ${j[0]}`:""}">${j?`<button data-key="${g(p)}" data-agent="${g(k.id)}" aria-label="${g(k.id)}: ${U(p)}">${j[1]}</button>`:""}</td>`}).join("")}</tr>`).join(""))}let m=e.some(f=>f.name)?`<tr class="cl-groups"><th></th>${e.map(f=>`<th colspan="${f.cols.length}" class="${f.id==="orchestrator"?"":"typed"}">${g(f.name)}</th>`).join("")}</tr>`:"",h=n.map(({a:f,also:b})=>`<th scope="col">${g(f.id)}<small>${g(b.length?`${u.alsoIn} ${b.join(", ")}`:N[f.role])}</small></th>`).join("");return`<section class="cl-card"><h2>${u.matrix}</h2>${l}<div class="cl-scroll"><table class="cl-matrix"><thead>${m}<tr><th></th>${h}</tr></thead><tbody>${c}</tbody></table></div><p class="cl-legend">${u.legend}</p></section>`}function xt(){let{look:e,everyone:n}=oe(v),a=r=>{let t=Se(r),s=v.agents.filter(c=>c.role===t.role).length,l=We(r);return`<button class="cl-pattern${I?.key===r?" picked":""}" data-pattern="${g(r)}"><b>${U(r)}</b><span>${Oe(r)} ${u.of(t.agents.filter(c=>v.roles[c]===t.role).length,s,be(t.role,F,s))}</span>
162
+ ${C.focusAreas.length?`<span style="margin-left:10px">${u.focus}:</span> ${s("data-focus","",!ie,u.all)}${C.focusAreas.map(f=>s("data-focus",f.id,ie===f.id,f.name)).join("")}`:""}</div>`,c="";for(let f of Object.keys(G)){let b=p=>we(p)?`${T(we(p),F,v.names)}${T(p,F,v.names)}`:T(p,F,v.names),d=r.filter(p=>_(p)===f).sort((p,k)=>b(p).localeCompare(b(k)));d.length&&(c+=`<tr class="cl-dim"><td colspan="${n.length+1}">${g(G[f][F])}</td></tr>`,c+=d.map(p=>`<tr><th scope="row" style="text-align:left;font-weight:400"><button class="cl-fact${I?.key===p&&!I.agent?" picked":""}" data-key="${g(p)}">${q(p)}</button>${Oe(p)}</th>${n.map(({a:k})=>{let j=p in k.facts?p.startsWith("declared:")?["said","\u25D0"]:["has","\u25CF"]:`${p}~variant`in k.facts?["var","\u2248"]:t.has(`${k.id} ${p}`)?["off","\xD7"]:void 0;return`<td class="cl-mark${j?` ${j[0]}`:""}">${j?`<button data-key="${g(p)}" data-agent="${g(k.id)}" aria-label="${g(k.id)}: ${q(p)}">${j[1]}</button>`:""}</td>`}).join("")}</tr>`).join(""))}let m=e.some(f=>f.name)?`<tr class="cl-groups"><th></th>${e.map(f=>`<th colspan="${f.cols.length}" class="${f.id==="orchestrator"?"":"typed"}">${g(f.name)}</th>`).join("")}</tr>`:"",h=n.map(({a:f,also:b})=>`<th scope="col">${g(f.id)}<small>${g(b.length?`${u.alsoIn} ${b.join(", ")}`:N[f.role])}</small></th>`).join("");return`<section class="cl-card"><h2>${u.matrix}</h2>${l}<div class="cl-scroll"><table class="cl-matrix"><thead>${m}<tr><th></th>${h}</tr></thead><tbody>${c}</tbody></table></div><p class="cl-legend">${u.legend}</p></section>`}function xt(){let{look:e,everyone:n}=oe(v),a=r=>{let t=Se(r),s=v.agents.filter(c=>c.role===t.role).length,l=Ue(r);return`<button class="cl-pattern${I?.key===r?" picked":""}" data-pattern="${g(r)}"><b>${q(r)}</b><span>${Oe(r)} ${u.of(t.agents.filter(c=>v.roles[c]===t.role).length,s,be(t.role,F,s))}</span>
163
163
  ${l.length?`<span class="cl-lack">${u.lacks}: ${g(l.join(", "))}</span>`:""}<span>${u.decision}: ${t.decision?`${g(N[t.decision.status==="accepted"?"accept":"reject"])}${t.decision.why?` \u2014 ${g(t.decision.why)}`:""}`:`<i>${u.toDecide}</i>`}</span></button>`};return`<section class="cl-card"><h2>${u.candidates}</h2>${e.length?`<div class="cl-cards">${e.map(r=>a(r.key)).join("")}</div>`:'<p class="cl-empty">\u2014</p>'}
164
- ${n.length?`<details class="cl-everyone"><summary>${u.everyone(n.length)}</summary><ul>${n.map(r=>`<li><button class="cl-fact" data-pattern="${g(r.key)}">${U(r.key)}</button> <span class="cl-badge ${Ve(r.scope)}">${g(_e(r.scope))}</span></li>`).join("")}</ul></details>`:""}</section>`}function St(){let{key:e,agent:n}=I,a=Se(e),t=v.agents.filter(d=>e in d.facts&&(!n||d.id===n)).map(d=>`<li><b>${g(d.id)}</b>${d.facts[e].map(p=>`<div class="cl-file">${g(p.file)}${p.line?`:${p.line}`:""}</div>`).join("")}</li>`).join(""),s=We(e).filter(d=>!n||d===n),l=v.solos.some(d=>d.key===e),c=v.orchestratorDoes.some(d=>d.key===e),m=vt(e),h=d=>d.map(p=>p.op==="same"?g(p.text):`<span class="cl-${p.op}">${g(p.text)}</span>`).join(" "),f=m?Object.entries(m.variants).filter(([d])=>!n||d===n):[],b=m?`<div><b>${u.text}</b><pre class="cl-text">${g(m.text)}</pre></div>
165
- ${f.map(([d,p])=>`<div class="cl-variant"><b>${g(d)}</b> <span class="cl-file">${g(p.source.file)}${p.source.line?`:${p.source.line}`:""} \xB7 ${Math.round(p.similarity*100)}% ${u.alike}</span><div class="cl-diff">${h(p.diff)}</div></div>`).join("")}`:"";return`<button class="cl-close" data-close="1">${u.close}</button><span class="cl-kicker">${g(G[_(e)][F])}</span><h3>${U(e)}</h3><code>${g(e)}</code>
164
+ ${n.length?`<details class="cl-everyone"><summary>${u.everyone(n.length)}</summary><ul>${n.map(r=>`<li><button class="cl-fact" data-pattern="${g(r.key)}">${q(r.key)}</button> <span class="cl-badge ${Ve(r.scope)}">${g(_e(r.scope))}</span></li>`).join("")}</ul></details>`:""}</section>`}function St(){let{key:e,agent:n}=I,a=Se(e),t=v.agents.filter(d=>e in d.facts&&(!n||d.id===n)).map(d=>`<li><b>${g(d.id)}</b>${d.facts[e].map(p=>`<div class="cl-file">${g(p.file)}${p.line?`:${p.line}`:""}</div>`).join("")}</li>`).join(""),s=Ue(e).filter(d=>!n||d===n),l=v.solos.some(d=>d.key===e),c=v.orchestratorDoes.some(d=>d.key===e),m=vt(e),h=d=>d.map(p=>p.op==="same"?g(p.text):`<span class="cl-${p.op}">${g(p.text)}</span>`).join(" "),f=m?Object.entries(m.variants).filter(([d])=>!n||d===n):[],b=m?`<div><b>${u.text}</b><pre class="cl-text">${g(m.text)}</pre></div>
165
+ ${f.map(([d,p])=>`<div class="cl-variant"><b>${g(d)}</b> <span class="cl-file">${g(p.source.file)}${p.source.line?`:${p.source.line}`:""} \xB7 ${Math.round(p.similarity*100)}% ${u.alike}</span><div class="cl-diff">${h(p.diff)}</div></div>`).join("")}`:"";return`<button class="cl-close" data-close="1">${u.close}</button><span class="cl-kicker">${g(G[_(e)][F])}</span><h3>${q(e)}</h3><code>${g(e)}</code>
166
166
  ${a?`<div>${Oe(e)}</div><div>${u.decision}: ${a.decision?`${g(N[a.decision.status==="accepted"?"accept":"reject"])}${a.decision.why?` \u2014 ${g(a.decision.why)}`:""}`:`<i>${u.toDecide}</i>`}</div>`:""}
167
167
  ${l?`<div>${u.alone}</div>`:c?`<div>${u.orchestratorDoes}</div>`:""}
168
168
  ${b}
169
169
  <div><b>${u.who}</b>${t?`<ul>${t}</ul>`:` \u2014 ${u.none}`}</div>
170
- ${v.patterns.filter(d=>d.partOf===e).map(d=>{let p=v.offPattern.filter(k=>k.key===d.key).map(k=>k.agent);return`<div><b>${U(d.key)}</b> \u2014 ${p.length?`<span style="color:var(--off)">${u.lacks}: ${g(p.join(", "))}</span>`:`${u.who}: ${d.agents.length}`}</div>`}).join("")}
170
+ ${v.patterns.filter(d=>d.partOf===e).map(d=>{let p=v.offPattern.filter(k=>k.key===d.key).map(k=>k.agent);return`<div><b>${q(d.key)}</b> \u2014 ${p.length?`<span style="color:var(--off)">${u.lacks}: ${g(p.join(", "))}</span>`:`${u.who}: ${d.agents.length}`}</div>`}).join("")}
171
171
  ${s.length?`<div><b>${u.lacks}</b>: <span style="color:var(--off)">${g(s.join(", "))}</span></div>`:""}`}function Ot(){return`<div class="cl-agents">${re.map(e=>{let n=v.offPattern.filter(s=>s.agent===e.id),a=v.solos.filter(s=>s.agents[0]===e.id),r=v.unknown.filter(s=>s.agent===e.id),t=Ct(e.id);return`<section class="cl-card cl-agent${t?" wide":""}"><span class="cl-kicker">${g(N[e.role])}</span><h3>${g(e.id)}</h3>${e.displayName?`<code>${g(e.displayName)}</code>`:""}<dl>
172
172
  ${(v.types[e.id]??[]).length?`<dt>${u.types}</dt><dd>${g(v.types[e.id].map(s=>v.typeNames[s]??s).join(" \xB7 "))}</dd>`:""}
173
173
  <dt>${u.facts}</dt><dd>${Object.keys(e.facts).length}</dd>
174
- ${n.length?`<dt>${u.off}</dt><dd class="cl-lack">${n.map(s=>U(s.key)).join("<br>")}</dd>`:""}
175
- ${a.length?`<dt>${u.solo}</dt><dd>${a.map(s=>U(s.key)).join("<br>")}</dd>`:""}
174
+ ${n.length?`<dt>${u.off}</dt><dd class="cl-lack">${n.map(s=>q(s.key)).join("<br>")}</dd>`:""}
175
+ ${a.length?`<dt>${u.solo}</dt><dd>${a.map(s=>q(s.key)).join("<br>")}</dd>`:""}
176
176
  ${Tt(e.id,e.displayName??e.id)}
177
177
  ${Rt(e.id)}
178
- ${e.children.length?`<dt>${u.children}</dt><dd>${e.children.map(s=>`${g(s.name)} <span class="cl-sub">(${Object.keys(s.facts).map(U).join(", ")})</span>`).join("<br>")}</dd>`:""}
178
+ ${e.children.length?`<dt>${u.children}</dt><dd>${e.children.map(s=>`${g(s.name)} <span class="cl-sub">(${Object.keys(s.facts).map(q).join(", ")})</span>`).join("<br>")}</dd>`:""}
179
179
  ${r.length?`<dt>${g(N.unknown)}</dt><dd>${r.map(s=>g(s.file)).join("<br>")}</dd>`:""}</dl>${t}</section>`}).join("")}</div>`}function Tt(e,n){let a=v.flows.filter(s=>s.agent===e&&s.called);if(!a.length)return"";let r=s=>s==="child-flow"?u.otherFlow:s.startsWith("http:")?s.slice(5):s.startsWith("connector:")?v.names[s.slice(10)]??s.slice(10):void 0,t=s=>{let l=s.uses.map(r).filter(c=>!!c);return`<div class="cl-chain">${[n,s.name,...l.length?[l.join(", ")]:[]].map(g).join(' <span aria-hidden="true">\u2192</span> ')}${s.returns?"":` <span class="cl-silent">\u2014 ${u.returnsNothing}</span>`}</div>`};return`<dt>${u.flows}</dt><dd>${a.map(t).join("")}</dd>`}function Rt(e){let n=v.telemetry.events.filter(s=>s.agent===e),a=v.telemetry.days,r=v.telemetry.silent.includes(e);if(!n.length&&!r)return"";let t=s=>`<div class="cl-event"><code>${g(s.name)}</code>${!a||r?"":s.fired?` <span class="cl-sub">\u2014 ${g(u.times(s.fired,a))}</span>`:` <span class="cl-silent">\u2014 ${u.notFired}</span>`}</div>`;return`<dt>${u.telemetry}</dt><dd class="cl-events">${n.map(t).join("")}${r?`<div class="cl-silent">${u.noLine}</div>`:""}</dd>`}function Ct(e){let n=v.contract.routes.filter(r=>r.caller===e);if(!n.length)return"";let a=n.map(r=>{let t=r.description.length<je;return`<tr><td>${r.agent?g(r.agent):`<span class="cl-silent">${g(r.name??r.calls)} \u2014 ${u.notInFolder}</span>`}</td>
180
180
  <td${r.history?"":' class="cl-silent"'}>${r.history?N.yes:N.no}</td><td>${r.inputs.length?g(r.inputs.join(", ")):'<span class="cl-silent">\u2014</span>'}</td>
181
181
  <td${t?' class="cl-silent"':""} title="${g(r.description)}">${g(u.chars(r.description.length))}</td></tr>`}).join("");return`<div class="cl-route"><h4>${u.routing}</h4><table class="cl-routing"><thead><tr><th>${u.called}</th><th>${u.history}</th><th>${u.inputs}</th><th>${u.description}</th></tr></thead><tbody>${a}</tbody></table></div>`}function Pt(){let e=me.find(n=>n.key==="unused");return e?Te(e):`<section class="cl-card"><p class="cl-empty">${u.nothingUnused}</p></section>`}function jt(){let e=ee.map(n=>{let a=v.agents.filter(r=>`ms:${n.id}`in r.facts||`declared:ms:${n.id}`in r.facts).map(r=>r.id);return`<tr><td><a href="${ve}/${n.id}.md" target="_blank" rel="noopener">${g(n.name)}</a></td><td>${g(n.sign??u.declaredOnly)}</td><td>${a.length?g(a.join(", ")):`<span class="cl-sub">${u.none}</span>`}</td></tr>`}).join("");return`<section class="cl-card cl-table"><table><thead><tr><th>${u.microsoft}</th><th>${u.sign}</th><th>${u.follows}</th></tr></thead><tbody>${e}</tbody></table></section>`}function Nt(){let e=me.find(n=>n.key==="unknown");return e?Te(e):`<section class="cl-card"><p class="cl-empty">${u.nothingUnknown}</p></section>`}function Te(e){let n=(t,s)=>{let l=typeof t=="object"&&t?t:{v:t},c=s?"th":"td";return`<${c}${l.fill&&!s?` style="background:#${l.fill};color:#1d2330"`:""}>${g(l.v)}</${c}>`},[a,...r]=e.rows;return`<section class="cl-card cl-table" role="tabpanel"><table><thead><tr>${a.map(t=>n(t,!0)).join("")}</tr></thead><tbody>${r.map(t=>`<tr>${t.map(s=>n(s,!1)).join("")}</tr>`).join("")}</tbody></table></section>`}function pe(e,n){let a=document.createElement("a");a.href=URL.createObjectURL(e),a.download=n,a.click(),setTimeout(()=>URL.revokeObjectURL(a.href),1e3)}async function Ft(){let e=de.querySelector(".cl-matrix"),[n,a]=[e.scrollWidth+32,e.scrollHeight+32],r=new XMLSerializer().serializeToString(e).replace(/ picked/g,""),t=`<svg xmlns="http://www.w3.org/2000/svg" width="${n}" height="${a}"><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. */
@@ -301,7 +301,7 @@ body { margin: 0; }
301
301
  .cl-route { overflow-x: auto; }
302
302
  .cl-route h4 { margin: 6px 0 4px; font-size: 13px; color: var(--muted); }
303
303
  a.cl-get { color: var(--ink); text-decoration: none; font-weight: 600; }
304
- </style>${r}</div></foreignObject></svg>`;try{let s=new Image;s.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`,await s.decode();let l=document.createElement("canvas");l.width=n*2,l.height=a*2;let c=l.getContext("2d");c.scale(2,2),c.drawImage(s,0,0);let m=await new Promise(h=>l.toBlob(h,"image/png"));if(!m)throw new Error("no PNG");pe(m,`${C.id}.png`)}catch{pe(new Blob([t],{type:"image/svg+xml"}),`${C.id}.svg`)}}de.addEventListener("click",e=>{let n=e.target.closest("button");if(!n)return;let a=n.dataset;if(a.tab)L=a.tab;else if(a.role)z=a.role;else if(a.focus!==void 0)ie=a.focus||void 0;else if(a.type!==void 0)B=a.type||void 0;else if(a.key)I={key:a.key,...a.agent?{agent:a.agent}:{}};else if(a.pattern)I={key:a.pattern};else if(a.close)I=void 0;else if(a.group)le.has(a.group)?le.delete(a.group):le.add(a.group);else if(a.look){let r=K[Number(a.look)];L="map",r.fact&&(I={key:r.fact,...r.agents.length===1?{agent:r.agents[0]}:{}}),(r.key==="off"||r.key==="gap"||r.key==="conflict")&&(I=r.fact?{key:r.fact}:I),r.key==="unknown"&&(L="unknown"),r.key==="unused"&&(L="unused")}else{if(a.get==="xlsx")return pe(new Blob([qe(me)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),`${C.id}.xlsx`);if(a.get==="yaml")return pe(new Blob([C.castYaml],{type:"text/yaml"}),`${C.id}.cast.yaml`);if(a.get==="png")return void Ft()}He(),(a.key||a.pattern||a.look)&&de.querySelector(".cl-detail")?.scrollIntoView({block:"nearest"})});He();})();
304
+ </style>${r}</div></foreignObject></svg>`;try{let s=new Image;s.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`,await s.decode();let l=document.createElement("canvas");l.width=n*2,l.height=a*2;let c=l.getContext("2d");c.scale(2,2),c.drawImage(s,0,0);let m=await new Promise(h=>l.toBlob(h,"image/png"));if(!m)throw new Error("no PNG");pe(m,`${C.id}.png`)}catch{pe(new Blob([t],{type:"image/svg+xml"}),`${C.id}.svg`)}}de.addEventListener("click",e=>{let n=e.target.closest("button");if(!n)return;let a=n.dataset;if(a.tab)L=a.tab;else if(a.role)z=a.role;else if(a.focus!==void 0)ie=a.focus||void 0;else if(a.type!==void 0)B=a.type||void 0;else if(a.key)I={key:a.key,...a.agent?{agent:a.agent}:{}};else if(a.pattern)I={key:a.pattern};else if(a.close)I=void 0;else if(a.group)le.has(a.group)?le.delete(a.group):le.add(a.group);else if(a.look){let r=K[Number(a.look)];L="map",r.fact&&(I={key:r.fact,...r.agents.length===1?{agent:r.agents[0]}:{}}),(r.key==="off"||r.key==="gap"||r.key==="conflict")&&(I=r.fact?{key:r.fact}:I),r.key==="unknown"&&(L="unknown"),r.key==="unused"&&(L="unused")}else{if(a.get==="xlsx")return pe(new Blob([We(me)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),`${C.id}.xlsx`);if(a.get==="yaml")return pe(new Blob([C.castYaml],{type:"text/yaml"}),`${C.id}.cast.yaml`);if(a.get==="png")return void Ft()}He(),(a.key||a.pattern||a.look)&&de.querySelector(".cl-detail")?.scrollIntoView({block:"nearest"})});He();})();
305
305
  </script>
306
306
  </body>
307
307
  </html>
@@ -98,30 +98,32 @@ body { margin: 0; }
98
98
  .pb-cv .pb-perf div { background: var(--chip-bg); }
99
99
  .pb-cv .pb-seal { font-family: Georgia, "Times New Roman", serif; transform: rotate(-4deg); }
100
100
  @media (max-width: 520px) { .pb-cv .pb-facts { grid-template-columns: 1fr; } .pb-av { width: 48px; height: 48px; } }
101
+ .pb-under { display: block; font-size: 11px; font-weight: 400; line-height: 1.3; }
102
+ .pb-cv .pb-facts div { align-items: baseline; }
101
103
  </style>
102
104
  </head>
103
105
  <body>
104
106
  <div class="cl" id="app"></div>
105
107
  <script type="application/json" id="cast">{{CAST}}</script>
106
- <script>(()=>{var C={en:{title:"The cast\u2019s HR",sub:"The same cast, as people: staff board, org chart, post, r\xE9sum\xE9 and development plan. Everything comes from the files, the telemetry and the team\u2019s spreadsheets.",privacy:"This file holds the client\u2019s data: keep it in the client\u2019s environment.",staff:{cast:"on the staff",hiring:"being hired",noOwner:"with no owner",neverPublished:"never published",noEval:"with no evaluation",pdi:"with a development plan",ok:"in good standing"},tag:{hiring:"being hired",noOwner:"no owner",neverPublished:"never published",noEval:"no evaluation",pdi:"plan",ok:"in good standing"},missing:{inventory:"the admin center\u2019s inventory (owner, environment, published)",team:"the team\u2019s spreadsheet (team, goal)",telemetry:"the export of Application Insights (performance)"},more:"More with",org:"Org chart",also:e=>`also ${e.join(", ")}`,client:"Customer",clientSub:"who is served",manager:"manager",ghost:"called, not in the folder",noType:"no type",post:"The post",postNote:"The post is the accepted pattern of the role and type, and the profile\u2019s rules. A newcomer is \xABhired\xBB when they meet it.",proposal:"proposal \u2014 no decision yet",manager_:"Manager",team:"Team",owner:"Owner",created:"Hired",published:"Last published",schema:"Badge",env:"Unit",nobody:"nobody calls it",summary:"Summary",tools:"Tools and access",conduct:"Languages and conduct",goal:"Goal",noGoal:"no goal declared",perf:e=>`Performance \xB7 ${e} days`,starts:"topic starts",errors:"errors logged",notFired:"did not fire",measured:"goal measured",noLine:"no line in the telemetry",noPerf:"The performance comes with the export of Application Insights (--telemetry).",certs:"Certifications",certsNone:"No evaluation in the folder of --evals.",passed:(e,t)=>`${e} of ${t} passed`,access:"Access only it has in its type",views:"How to see it",cv:"R\xE9sum\xE9",sheet:"Sheet",pdi:"Development plan",nothing:"Nothing to develop.",sources:"Sources",seal:{ok:"IN GOOD STANDING",pdi:"PLAN"},orchestrator:"Orchestrator",specialist:"Specialist",map:"\u2190 Map",foot:"cast-list \xB7 no model: what is here is what the files and tables say."},pt:{title:"RH do elenco",sub:"O mesmo elenco, visto como pessoas: quadro de pessoal, organograma, vaga, curr\xEDculo e plano de desenvolvimento. Tudo sai dos arquivos, da telemetria e das planilhas do time.",privacy:"Este arquivo tem dados do cliente: deixe-o no ambiente dele.",staff:{cast:"no quadro",hiring:"em admiss\xE3o",noOwner:"sem respons\xE1vel",neverPublished:"nunca publicado",noEval:"sem avalia\xE7\xE3o",pdi:"em PDI",ok:"em dia"},tag:{hiring:"em admiss\xE3o",noOwner:"sem respons\xE1vel",neverPublished:"nunca publicado",noEval:"sem avalia\xE7\xE3o",pdi:"PDI",ok:"em dia"},missing:{inventory:"o invent\xE1rio do admin center (respons\xE1vel, ambiente, publica\xE7\xE3o)",team:"a planilha do time (equipe, meta)",telemetry:"a exporta\xE7\xE3o do Application Insights (desempenho)"},more:"Mais com",org:"Organograma",also:e=>`tamb\xE9m ${e.join(", ")}`,client:"Cliente",clientSub:"quem \xE9 atendido",manager:"gestor",ghost:"chamado, fora da pasta",noType:"sem tipo",post:"A vaga",postNote:"A vaga \xE9 o padr\xE3o aceito do papel e do tipo, mais as regras do perfil. Quem chega \xE9 \xABcontratado\xBB quando cumpre a vaga.",proposal:"proposta \u2014 sem decis\xE3o ainda",manager_:"Gestor",team:"Equipe",owner:"Respons\xE1vel",created:"Admiss\xE3o",published:"\xDAltima publica\xE7\xE3o",schema:"Matr\xEDcula",env:"Lota\xE7\xE3o",nobody:"ningu\xE9m chama",summary:"Resumo",tools:"Ferramentas e acessos",conduct:"Idiomas e conduta",goal:"Meta",noGoal:"sem meta declarada",perf:e=>`Desempenho \xB7 ${e} dias`,starts:"in\xEDcios de t\xF3pico",errors:"erros registrados",notFired:"n\xE3o disparou",measured:"meta medida",noLine:"nenhuma linha na telemetria",noPerf:"O desempenho aparece com a exporta\xE7\xE3o do Application Insights (--telemetry).",certs:"Certifica\xE7\xF5es",certsNone:"Nenhuma avalia\xE7\xE3o na pasta do --evals.",passed:(e,t)=>`${e} de ${t} aprovados`,access:"Acessos que s\xF3 ele tem no tipo",views:"Como ver",cv:"Curr\xEDculo",sheet:"Ficha",pdi:"Plano de desenvolvimento",nothing:"Nada a desenvolver.",sources:"Fontes",seal:{ok:"EM DIA",pdi:"PDI"},orchestrator:"Orquestrador",specialist:"Especialista",map:"\u2190 Mapa",foot:"cast-list \xB7 sem modelo: o que est\xE1 aqui \xE9 o que os arquivos e as planilhas dizem."}},h=JSON.parse(document.getElementById("cast").textContent),{playbill:i,lang:d}=h,a=C[d];document.documentElement.lang=d==="pt"?"pt-BR":"en";document.title=`${a.title} \xB7 ${i.name??h.id}`;var s=e=>String(e??"").replace(/[&<>"']/g,t=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[t]),b=document.getElementById("app"),y=[...i.org.orchestrators,...i.org.types.flatMap(e=>e.people)].map(e=>e.name),w=y.length>1?y.reduce((e,t)=>{let o=0;for(;o<e.length&&e[o]===t[o];)o++;return e.slice(0,o)}):"",v=/[-–·:]\s*$/.test(w)?w:"",u=e=>v&&e.startsWith(v)?e.slice(v.length):e,E=e=>[...i.org.orchestrators,...i.org.types.flatMap(t=>t.people)].find(t=>t.id===e)?.situation??[],S=decodeURIComponent(location.hash.slice(1)),g=(i.resumes.find(e=>e.id===S)??i.resumes.find(e=>e.seal==="pdi"&&e.role==="specialist")??i.resumes[0])?.id,q=i.posts[0]?.scope,f="cv",M={cast:"",hiring:"warn",noOwner:"bad",neverPublished:"warn",noEval:"warn",pdi:"bad",ok:"good"};function L(){let e=i.staff.map(o=>`<div class="pb-count ${M[o.key]}"><b>${o.people.length}</b><span>${s(a.staff[o.key])}${o.key!=="cast"&&o.people.length?` \u2014 ${s(o.people.map(n=>u(n.name)).join(", "))}`:""}</span></div>`).join(""),t=i.missing.length?`<p class="pb-missing">${s(a.more)}: ${i.missing.map(o=>s(a.missing[o])).join(" \xB7 ")}</p>`:"";return`<section class="pb-staff" aria-label="${s(a.title)}">${e}</section>${t}`}var I=e=>e.filter(t=>t!=="ok"||e.length===1).map(t=>`<span class="pb-tag ${t}">${s(a.tag[t])}</span>`).join(" "),D=(e,t,o)=>`<button class="pb-node" data-who="${s(e)}" aria-pressed="${e===g}"><span>${s(u(t))}${o?.length?` <small class="pb-also">${s(a.also(o))}</small>`:""}</span>${I(E(e))}</button>`;function F(){let e=i.org.orchestrators.map(n=>`<button class="pb-node manager" data-who="${s(n.id)}" aria-pressed="${n.id===g}"><span>${s(u(n.name))}<br><small>${s(a.manager)}</small></span>${I(n.situation)}</button>`).join(""),t=i.org.types.map(n=>`<p class="pb-type">${s(n.name||a.noType)}</p>${n.people.map(r=>D(r.id,r.name,r.alsoIn)).join("")}`).join(""),o=i.org.ghosts.map(n=>`<div class="pb-node ghost"><span>${s(u(n.name))}</span><span class="pb-tag hiring">${s(a.ghost)}</span></div>`).join("");return`<section class="cl-card"><h2>${s(a.org)}</h2><div class="pb-org"><div class="pb-node ghost" style="justify-content:center"><span>${s(a.client)} \xB7 <small>${s(a.clientSub)}</small></span></div>${e}${t}${o}</div></section>`}function x(){let e=i.posts.find(n=>n.scope===q)??i.posts[0];if(!e)return"";let t=i.posts.map(n=>`<button data-post="${s(n.scope)}" aria-pressed="${n.scope===e.scope}">${s(n.name[d])}</button>`).join(""),o=e.requirements.map(n=>`<li class="${n.proposal?"proposal":""}">${s(n[d])}${n.proposal?` <span class="pb-src">(${s(a.proposal)})</span>`:""}</li>`).join("");return`<section class="cl-card"><h2>${s(a.post)}</h2><div class="pb-posts">${t}</div><ul class="pb-req">${o}</ul><p class="pb-note">${s(a.postNote)}</p></section>`}var j=e=>e?`${s(e.value)} <span class="pb-src">(${s(e.source)})</span>`:"\u2014",m=(e,t)=>`<div><dt>${s(e)}</dt><dd>${t}</dd></div>`,G=e=>e?s(e.value):"\u2014",B='<svg viewBox="0 0 40 40" width="34" height="34" aria-hidden="true"><rect x="9" y="13" width="22" height="17" rx="5" fill="none" stroke="currentColor" stroke-width="2.2"/><line x1="20" y1="13" x2="20" y2="8" stroke="currentColor" stroke-width="2.2"/><circle cx="20" cy="7" r="2" fill="currentColor"/><circle cx="16" cy="21" r="2" fill="currentColor"/><circle cx="24" cy="21" r="2" fill="currentColor"/><path d="M16 26 q4 2.5 8 0" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>',c=(e,t)=>`<div class="pb-section"><h3>${s(e)}</h3>${t}</div>`,k=(e,t=!1)=>e.length?`<div class="pb-chips">${e.map(o=>`<span class="pb-chip${t?" pb-quote":""}">${s(o[d])}</span>`).join("")}</div>`:'<p class="pb-empty">\u2014</p>';function H(e){let t=e.role==="orchestrator"?a.orchestrator:a.specialist,o=[e.title??"",`${t}${e.types.length?` \xB7 ${e.types.join(" \xB7 ")}`:""}`].filter(Boolean),n=f==="cv",r=n?G:j,O=[m(a.manager_,e.manager?s(e.manager):e.role==="orchestrator"?"\u2014":s(a.nobody)),m(a.team,r(e.team)),m(a.owner,r(e.owner)),m(a.created,r(e.created)),m(a.published,r(e.published)),m(a.schema,s(e.schemaName??"\u2014")),m(a.env,r(e.environment))].join(""),p=e.performance,R=p?p.silent?`<p class="pb-empty">${s(a.noLine)}</p>`:`<div class="pb-perf"><div><b>${p.starts}</b><span>${s(a.starts)}</span></div><div class="${p.notFired.length?"bad":""}"><b>${p.errors}</b><span>${s(a.errors)}${p.notFired.length?` \u2014 ${s(p.notFired.join(", "))} ${s(a.notFired)}`:""}</span></div><div><b>\u2014</b><span>${s(a.measured)}</span></div></div>`:`<p class="pb-empty">${s(a.noPerf)}</p>`,T=e.pdi.length?`<ol class="pb-pdi">${e.pdi.map(l=>`<li class="${l.group}"><span>${s(l[d])}<small>${s(l.why[d])}</small></span></li>`).join("")}</ol>`:`<p class="pb-empty">${s(a.nothing)}</p>`,A=n?`<div class="pb-head"><span class="pb-av">${B}</span><div class="pb-who"><h2>${s(e.name)}</h2>${e.title?`<p class="pb-quote">${s(e.title)}</p>`:""}<p>${s(o[o.length-1])}</p></div><span class="pb-seal ${e.seal}">${s(a.seal[e.seal])}</span></div>`:`<div class="pb-head"><div><h2>${s(e.name)}</h2>${e.title?`<p class="pb-quote">${s(e.title)}</p>`:""}<p>${s(o[o.length-1])}</p></div><span class="pb-seal ${e.seal}">${s(a.seal[e.seal])}</span></div>`,P=`<div class="pb-views" role="group" aria-label="${s(a.views)}">${["cv","sheet"].map(l=>`<button data-view="${l}" aria-pressed="${l===f}">${s(a[l])}</button>`).join("")}</div>`;return`<article class="cl-card pb-resume${n?" pb-cv":""}" aria-live="polite">
107
- ${P}
108
- ${A}
109
- <dl class="pb-facts">${O}</dl>
110
- ${e.summary.length?c(a.summary,`<ul class="pb-quote">${e.summary.map(l=>`<li>${s(l)}</li>`).join("")}</ul>`):""}
111
- ${c(a.tools,k(e.tools))}
112
- ${c(a.conduct,k(e.conduct,!0))}
113
- ${c(a.goal,e.goal?`<p>${j(e.goal)}</p>`:`<p class="pb-empty">${s(a.noGoal)}</p>`)}
114
- ${c(p?a.perf(p.days):a.perf(0).replace(/ · .*/,""),R)}
115
- ${e.certifications?c(a.certs,e.certifications.length?`<ul>${e.certifications.map(l=>`<li><b>${s(a.passed(l.passed,l.total))}</b>${l.date?` \xB7 ${s(l.date)}`:""} <span class="pb-src">(${s(l.methods.map($=>`${$.name} ${$.passed}/${$.total}`).join(" \xB7 "))} \u2014 ${s(l.file)})</span></li>`).join("")}</ul>`:`<p class="pb-empty">${s(a.certsNone)}</p>`):""}
116
- ${e.access.length?c(a.access,`<ul>${e.access.map(l=>`<li>${s(l[d])}</li>`).join("")}</ul>`):""}
117
- ${c(a.pdi,T)}
118
- <p class="pb-note">${s(a.sources)}: ${s(e.sources.join(", "))}</p>
119
- </article>`}function N(){let e=i.resumes.find(t=>t.id===g)??i.resumes[0];b.innerHTML=`<div class="cl-wrap">
120
- <header>${h.map?`<p class="cl-sub"><a href="${s(h.map)}">${s(a.map)}</a></p>`:""}<h1 class="cl-title">${s(a.title)} \xB7 ${s(i.name??h.id)}</h1><p class="cl-sub">${s(a.sub)}</p><p class="cl-private">${s(a.privacy)}</p></header>
121
- ${L()}
122
- <div class="pb-body"><div class="pb-side">${F()}${x()}</div>${e?H(e):""}</div>
123
- <p class="cl-foot">${s(a.foot)}</p>
124
- </div>`}b.addEventListener("click",e=>{let t=e.target.closest("button");if(t){if(t.dataset.who)g=t.dataset.who;else if(t.dataset.post)q=t.dataset.post;else if(t.dataset.view)f=t.dataset.view;else return;N(),t.dataset.who&&b.querySelector(".pb-resume")?.scrollIntoView({block:"nearest"})}});N();})();
108
+ <script>(()=>{var w=[{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 U=Object.fromEntries(w.map(e=>[e.id,e.name]));function y(e){let n=e.length>1?e.reduce((s,c)=>{let m=0;for(;m<s.length&&s[m]===c[m];)m++;return s.slice(0,m)}):"",a=/[-–·:]\s*$/.test(n)?n:"";return s=>a&&s.startsWith(a)&&s.length>a.length?s.slice(a.length):s}var P={en:{title:"The cast\u2019s HR",sub:"The same cast, as people: staff board, org chart, post, r\xE9sum\xE9 and development plan. Everything comes from the files, the telemetry and the team\u2019s spreadsheets.",privacy:"This file holds the client\u2019s data: keep it in the client\u2019s environment.",staff:{cast:"on the staff",hiring:"being hired",noOwner:"with no owner",neverPublished:"never published",noEval:"with no evaluation",pdi:"with a development plan",ok:"in good standing"},tag:{hiring:"being hired",noOwner:"no owner",neverPublished:"never published",noEval:"no evaluation",pdi:"plan",ok:"in good standing"},missing:{inventory:"the admin center\u2019s inventory (owner, environment, published)",team:"the team\u2019s spreadsheet (team, goal)",telemetry:"the export of Application Insights (performance)"},more:"More with",org:"Org chart",also:e=>`also ${e.join(", ")}`,client:"Customer",clientSub:"who is served",manager:"manager",ghost:"called, not in the folder",noType:"no type",post:"The post",postNote:"The post is the accepted pattern of the role and type, and the profile\u2019s rules. A newcomer is \xABhired\xBB when they meet it.",proposal:"proposal \u2014 no decision yet",manager_:"Manager",team:"Team",owner:"Owner",created:"Hired",published:"Last published",schema:"Badge",env:"Unit",nobody:"nobody calls it",summary:"Summary",tools:"Tools and access",conduct:"Languages and conduct",goal:"Goal",noGoal:"no goal declared",perf:e=>`Performance \xB7 ${e} days`,starts:"topic starts",errors:"errors logged",notFired:"did not fire",measured:"goal measured",noLine:"no line in the telemetry",noPerf:"The performance comes with the export of Application Insights (--telemetry).",certs:"Certifications",certsNone:"No evaluation in the folder of --evals.",passed:(e,n)=>`${e} of ${n} passed`,access:"Access only it has in its type",views:"How to see it",cv:"R\xE9sum\xE9",sheet:"Sheet",pdi:"Development plan",nothing:"Nothing to develop.",sources:"Sources",seal:{ok:"IN GOOD STANDING",pdi:"PLAN"},orchestrator:"Orchestrator",specialist:"Specialist",map:"\u2190 Map",foot:"cast-list \xB7 no model: what is here is what the files and tables say."},pt:{title:"RH do elenco",sub:"O mesmo elenco, visto como pessoas: quadro de pessoal, organograma, vaga, curr\xEDculo e plano de desenvolvimento. Tudo sai dos arquivos, da telemetria e das planilhas do time.",privacy:"Este arquivo tem dados do cliente: deixe-o no ambiente dele.",staff:{cast:"no quadro",hiring:"em admiss\xE3o",noOwner:"sem respons\xE1vel",neverPublished:"nunca publicado",noEval:"sem avalia\xE7\xE3o",pdi:"em PDI",ok:"em dia"},tag:{hiring:"em admiss\xE3o",noOwner:"sem respons\xE1vel",neverPublished:"nunca publicado",noEval:"sem avalia\xE7\xE3o",pdi:"PDI",ok:"em dia"},missing:{inventory:"o invent\xE1rio do admin center (respons\xE1vel, ambiente, publica\xE7\xE3o)",team:"a planilha do time (equipe, meta)",telemetry:"a exporta\xE7\xE3o do Application Insights (desempenho)"},more:"Mais com",org:"Organograma",also:e=>`tamb\xE9m ${e.join(", ")}`,client:"Cliente",clientSub:"quem \xE9 atendido",manager:"gestor",ghost:"chamado, fora da pasta",noType:"sem tipo",post:"A vaga",postNote:"A vaga \xE9 o padr\xE3o aceito do papel e do tipo, mais as regras do perfil. Quem chega \xE9 \xABcontratado\xBB quando cumpre a vaga.",proposal:"proposta \u2014 sem decis\xE3o ainda",manager_:"Gestor",team:"Equipe",owner:"Respons\xE1vel",created:"Admiss\xE3o",published:"\xDAltima publica\xE7\xE3o",schema:"Matr\xEDcula",env:"Lota\xE7\xE3o",nobody:"ningu\xE9m chama",summary:"Resumo",tools:"Ferramentas e acessos",conduct:"Idiomas e conduta",goal:"Meta",noGoal:"sem meta declarada",perf:e=>`Desempenho \xB7 ${e} dias`,starts:"in\xEDcios de t\xF3pico",errors:"erros registrados",notFired:"n\xE3o disparou",measured:"meta medida",noLine:"nenhuma linha na telemetria",noPerf:"O desempenho aparece com a exporta\xE7\xE3o do Application Insights (--telemetry).",certs:"Certifica\xE7\xF5es",certsNone:"Nenhuma avalia\xE7\xE3o na pasta do --evals.",passed:(e,n)=>`${e} de ${n} aprovados`,access:"Acessos que s\xF3 ele tem no tipo",views:"Como ver",cv:"Curr\xEDculo",sheet:"Ficha",pdi:"Plano de desenvolvimento",nothing:"Nada a desenvolver.",sources:"Fontes",seal:{ok:"EM DIA",pdi:"PDI"},orchestrator:"Orquestrador",specialist:"Especialista",map:"\u2190 Mapa",foot:"cast-list \xB7 sem modelo: o que est\xE1 aqui \xE9 o que os arquivos e as planilhas dizem."}},g=JSON.parse(document.getElementById("cast").textContent),{playbill:r,lang:p}=g,o=P[p];document.documentElement.lang=p==="pt"?"pt-BR":"en";document.title=`${o.title} \xB7 ${r.name??g.id}`;var t=e=>String(e??"").replace(/[&<>"']/g,n=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[n]),$=document.getElementById("app"),A=[...r.org.orchestrators,...r.org.types.flatMap(e=>e.people)].map(e=>e.name),u=y(A),E=e=>[...r.org.orchestrators,...r.org.types.flatMap(n=>n.people)].find(n=>n.id===e)?.situation??[],I=decodeURIComponent(location.hash.slice(1)),v=(r.resumes.find(e=>e.id===I)??r.resumes.find(e=>e.seal==="pdi"&&e.role==="specialist")??r.resumes[0])?.id,T=r.posts[0]?.scope,b="cv",M={cast:"",hiring:"warn",noOwner:"bad",neverPublished:"warn",noEval:"warn",pdi:"bad",ok:"good"};function D(){let e=r.staff.map(a=>`<div class="pb-count ${M[a.key]}"><b>${a.people.length}</b><span>${t(o.staff[a.key])}${a.key!=="cast"&&a.people.length?` \u2014 ${t(a.people.map(s=>u(s.name)).join(", "))}`:""}</span></div>`).join(""),n=r.missing.length?`<p class="pb-missing">${t(o.more)}: ${r.missing.map(a=>t(o.missing[a])).join(" \xB7 ")}</p>`:"";return`<section class="pb-staff" aria-label="${t(o.title)}">${e}</section>${n}`}var x=e=>e.filter(n=>n!=="ok"||e.length===1).map(n=>`<span class="pb-tag ${n}">${t(o.tag[n])}</span>`).join(" "),L=(e,n,a)=>`<button class="pb-node" data-who="${t(e)}" aria-pressed="${e===v}"><span>${t(u(n))}${a?.length?` <small class="pb-also">${t(o.also(a))}</small>`:""}</span>${x(E(e))}</button>`;function j(){let e=r.org.orchestrators.map(s=>`<button class="pb-node manager" data-who="${t(s.id)}" aria-pressed="${s.id===v}"><span>${t(u(s.name))}<br><small>${t(o.manager)}</small></span>${x(s.situation)}</button>`).join(""),n=r.org.types.map(s=>`<p class="pb-type">${t(s.name||o.noType)}</p>${s.people.map(c=>L(c.id,c.name,c.alsoIn)).join("")}`).join(""),a=r.org.ghosts.map(s=>`<div class="pb-node ghost"><span>${t(u(s.name))}</span><span class="pb-tag hiring">${t(o.ghost)}</span></div>`).join("");return`<section class="cl-card"><h2>${t(o.org)}</h2><div class="pb-org"><div class="pb-node ghost" style="justify-content:center"><span>${t(o.client)} \xB7 <small>${t(o.clientSub)}</small></span></div>${e}${n}${a}</div></section>`}function F(){let e=r.posts.find(s=>s.scope===T)??r.posts[0];if(!e)return"";let n=r.posts.map(s=>`<button data-post="${t(s.scope)}" aria-pressed="${s.scope===e.scope}">${t(s.name[p])}</button>`).join(""),a=e.requirements.map(s=>`<li class="${s.proposal?"proposal":""}">${t(s[p])}${s.proposal?` <span class="pb-src">(${t(o.proposal)})</span>`:""}</li>`).join("");return`<section class="cl-card"><h2>${t(o.post)}</h2><div class="pb-posts">${n}</div><ul class="pb-req">${a}</ul><p class="pb-note">${t(o.postNote)}</p></section>`}var O=e=>e?`${t(e.value)} <span class="pb-src">(${t(e.source)})</span>`:"\u2014",h=(e,n)=>`<div><dt>${t(e)}</dt><dd>${n}</dd></div>`,W=e=>e?`${t(e.value)}<span class="pb-src pb-under">${t(e.source)}</span>`:"\u2014",_='<svg viewBox="0 0 40 40" width="34" height="34" aria-hidden="true"><rect x="9" y="13" width="22" height="17" rx="5" fill="none" stroke="currentColor" stroke-width="2.2"/><line x1="20" y1="13" x2="20" y2="8" stroke="currentColor" stroke-width="2.2"/><circle cx="20" cy="7" r="2" fill="currentColor"/><circle cx="16" cy="21" r="2" fill="currentColor"/><circle cx="24" cy="21" r="2" fill="currentColor"/><path d="M16 26 q4 2.5 8 0" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>',d=(e,n)=>`<div class="pb-section"><h3>${t(e)}</h3>${n}</div>`,S=(e,n=!1)=>e.length?`<div class="pb-chips">${e.map(a=>`<span class="pb-chip${n?" pb-quote":""}">${t(a[p])}</span>`).join("")}</div>`:'<p class="pb-empty">\u2014</p>';function G(e){let n=e.role==="orchestrator"?o.orchestrator:o.specialist,a=[e.title??"",`${n}${e.types.length?` \xB7 ${e.types.join(" \xB7 ")}`:""}`].filter(Boolean),s=b==="cv",c=s?W:O,m=[h(o.manager_,e.manager?t(e.manager):e.role==="orchestrator"?"\u2014":t(o.nobody)),h(o.team,c(e.team)),h(o.owner,c(e.owner)),h(o.created,c(e.created)),h(o.published,c(e.published)),h(o.schema,t(e.schemaName??"\u2014")),h(o.env,c(e.environment))].join(""),l=e.performance,R=l?l.silent?`<p class="pb-empty">${t(o.noLine)}</p>`:`<div class="pb-perf"><div><b>${l.starts}</b><span>${t(o.starts)}</span></div><div class="${l.notFired.length?"bad":""}"><b>${l.errors}</b><span>${t(o.errors)}${l.notFired.length?` \u2014 ${t(l.notFired.join(", "))} ${t(o.notFired)}`:""}</span></div><div><b>\u2014</b><span>${t(o.measured)}</span></div></div>`:`<p class="pb-empty">${t(o.noPerf)}</p>`,N=e.pdi.length?`<ol class="pb-pdi">${e.pdi.map(i=>`<li class="${i.group}"><span>${t(i[p])}<small>${t(i.why[p])}</small></span></li>`).join("")}</ol>`:`<p class="pb-empty">${t(o.nothing)}</p>`,k=s?`<div class="pb-head"><span class="pb-av">${_}</span><div class="pb-who"><h2>${t(e.name)}</h2>${e.title?`<p class="pb-quote">${t(e.title)}</p>`:""}<p>${t(a[a.length-1])}</p></div><span class="pb-seal ${e.seal}">${t(o.seal[e.seal])}</span></div>`:`<div class="pb-head"><div><h2>${t(e.name)}</h2>${e.title?`<p class="pb-quote">${t(e.title)}</p>`:""}<p>${t(a[a.length-1])}</p></div><span class="pb-seal ${e.seal}">${t(o.seal[e.seal])}</span></div>`,q=`<div class="pb-views" role="group" aria-label="${t(o.views)}">${["cv","sheet"].map(i=>`<button data-view="${i}" aria-pressed="${i===b}">${t(o[i])}</button>`).join("")}</div>`;return`<article class="cl-card pb-resume${s?" pb-cv":""}" aria-live="polite">
109
+ ${q}
110
+ ${k}
111
+ <dl class="pb-facts">${m}</dl>
112
+ ${e.summary.length?d(o.summary,`<ul class="pb-quote">${e.summary.map(i=>`<li>${t(i)}</li>`).join("")}</ul>`):""}
113
+ ${d(o.tools,S(e.tools))}
114
+ ${d(o.conduct,S(e.conduct,!0))}
115
+ ${d(o.goal,e.goal?`<p>${O(e.goal)}</p>`:`<p class="pb-empty">${t(o.noGoal)}</p>`)}
116
+ ${d(l?o.perf(l.days):o.perf(0).replace(/ · .*/,""),R)}
117
+ ${e.certifications?d(o.certs,e.certifications.length?`<ul>${e.certifications.map(i=>`<li><b>${t(o.passed(i.passed,i.total))}</b>${i.date?` \xB7 ${t(i.date)}`:""} <span class="pb-src">(${t(i.methods.map(f=>`${f.name} ${f.passed}/${f.total}`).join(" \xB7 "))} \u2014 ${t(i.file)})</span></li>`).join("")}</ul>`:`<p class="pb-empty">${t(o.certsNone)}</p>`):""}
118
+ ${e.access.length?d(o.access,`<ul>${e.access.map(i=>`<li>${t(i[p])}</li>`).join("")}</ul>`):""}
119
+ ${d(o.pdi,N)}
120
+ <p class="pb-note">${t(o.sources)}: ${t(e.sources.join(", "))}</p>
121
+ </article>`}function C(){let e=r.resumes.find(n=>n.id===v)??r.resumes[0];$.innerHTML=`<div class="cl-wrap">
122
+ <header>${g.map?`<p class="cl-sub"><a href="${t(g.map)}">${t(o.map)}</a></p>`:""}<h1 class="cl-title">${t(o.title)} \xB7 ${t(r.name??g.id)}</h1><p class="cl-sub">${t(o.sub)}</p><p class="cl-private">${t(o.privacy)}</p></header>
123
+ ${D()}
124
+ <div class="pb-body"><div class="pb-side">${j()}${F()}</div>${e?G(e):""}</div>
125
+ <p class="cl-foot">${t(o.foot)}</p>
126
+ </div>`}$.addEventListener("click",e=>{let n=e.target.closest("button");if(n){if(n.dataset.who)v=n.dataset.who;else if(n.dataset.post)T=n.dataset.post;else if(n.dataset.view)b=n.dataset.view;else return;C(),n.dataset.who&&$.querySelector(".pb-resume")?.scrollIntoView({block:"nearest"})}});C();})();
125
127
  </script>
126
128
  </body>
127
129
  </html>