house-lights 1.4.0 → 1.5.0
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 +1 -1
- package/skills/cast-list/assets/map.html +38 -37
- package/skills/cast-list/examples/agents/bodega-cupons/topics/OnError.topic.mcs.yml +2 -2
- package/skills/cast-list/examples/equipe.csv +7 -0
- package/skills/cast-list/examples/inventario.csv +10 -0
- package/skills/cast-list/examples/telemetria.csv +10 -0
- package/skills/cast-list/references/format.md +15 -0
- package/skills/cast-list/references/keys.md +2 -0
- package/skills/cast-list/references/telemetry.md +39 -0
- package/skills/cast-list/scripts/build.mjs +90 -23
- package/skills/cast-list/scripts/engine.mjs +112 -110
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "house-lights",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
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": {
|
|
@@ -114,7 +114,7 @@ body { margin: 0; }
|
|
|
114
114
|
.cl-diff { font: 12.5px/1.6 ui-monospace, Menlo, monospace; }
|
|
115
115
|
.cl-del { background: var(--off-bg); color: var(--off); text-decoration: line-through; border-radius: 3px; padding: 0 2px; }
|
|
116
116
|
.cl-add { background: var(--platform-bg); color: var(--platform); border-radius: 3px; padding: 0 2px; }
|
|
117
|
-
.cl-chain { margin: 0 0 4px; }
|
|
117
|
+
.cl-chain, .cl-event { margin: 0 0 4px; }
|
|
118
118
|
.cl-silent { color: var(--off); font-weight: 600; }
|
|
119
119
|
.cl-routing { border-collapse: collapse; font-size: 12px; width: 100%; }
|
|
120
120
|
.cl-routing th, .cl-routing td { text-align: left; padding: 3px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
|
|
@@ -128,48 +128,49 @@ body { margin: 0; }
|
|
|
128
128
|
<body>
|
|
129
129
|
<div class="cl" id="app"></div>
|
|
130
130
|
<script type="application/json" id="cast">{{CAST}}</script>
|
|
131
|
-
<script>(()=>{var G="https://github.com/microsoft/skills-for-copilot-studio/blob/main/patterns",U=[{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 D={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"}},oe={"trigger:OnConversationStart":{dim:"conversation",en:"Greeting",pt:"Boas-vindas"},"trigger:OnUnknownIntent":{dim:"conversation",en:"Fallback (when it does not understand)",pt:"Fallback (quando n\xE3o entende)"},"trigger:OnEscalate":{dim:"conversation",en:"Escalation to a person",pt:"Escalonamento para humano",lacks:{en:["does not escalate to a person","do not escalate to a person"],pt:["n\xE3o escala para humano","n\xE3o escalam para humano"]}},"trigger:OnError":{dim:"conversation",en:"Error handling",pt:"Tratamento de erro",lacks:{en:["does not handle errors","do not handle errors"],pt:["n\xE3o trata erro","n\xE3o tratam erro"]}},"trigger:OnRecognizedIntent":{dim:"conversation",en:"A topic of its own, by intent",pt:"T\xF3pico pr\xF3prio, por inten\xE7\xE3o"},"trigger:OnRedirect":{dim:"orchestration",en:"Takes a call from the orchestrator",pt:"Recebe chamada do orquestrador",lacks:{en:["takes no call from the orchestrator","take no call from the orchestrator"],pt:["n\xE3o recebe chamada do orquestrador","n\xE3o recebem chamada do orquestrador"]}},"trigger:OnSelectIntent":{dim:"conversation",en:"Disambiguation (\xABdid you mean\u2026\xBB)",pt:"Desambigua\xE7\xE3o (\xABvoc\xEA quis dizer\u2026\xBB)"},"trigger:OnSignIn":{dim:"conversation",en:"Sign-in",pt:"Login"},"trigger:OnGeneratedResponse":{dim:"conversation",en:"Reviews the generated answer",pt:"Revisa a resposta gerada"},"trigger:OnKnowledgeRequested":{dim:"knowledge",en:"Before searching knowledge",pt:"Antes de buscar no conhecimento"},"trigger:OnToolSelected":{dim:"orchestration",en:"Child chosen as a tool",pt:"Filho escolhido como ferramenta"},"trigger:OnActivity":{dim:"conversation",en:"On every message",pt:"Em toda mensagem"},"setting:generative=on":{dim:"conversation",en:"Generative orchestration on",pt:"Orquestra\xE7\xE3o generativa ligada"},"setting:generative=off":{dim:"conversation",en:"Generative orchestration off",pt:"Orquestra\xE7\xE3o generativa desligada"},"setting: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",en:"Can be called by an orchestrator",pt:"Pode ser chamado por um orquestrador"},"called-with:history":{dim:"orchestration",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",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",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",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",en:"Has instructions",pt:"Tem instru\xE7\xF5es",lacks:{en:["has no instructions","have no instructions"],pt:["n\xE3o tem instru\xE7\xF5es","n\xE3o t\xEAm instru\xE7\xF5es"]}},"node:LogCustomTelemetryEvent":{dim:"governance",en:"Logs telemetry",pt:"Registra telemetria",lacks:{en:["logs no telemetry","log no telemetry"],pt:["n\xE3o registra telemetria","n\xE3o registram telemetria"]}},"node:CSATQuestion":{dim:"governance",en:"Asks for satisfaction (CSAT)",pt:"Pergunta a satisfa\xE7\xE3o (CSAT)",lacks:{en:["does not ask for satisfaction","do not ask for satisfaction"],pt:["n\xE3o pergunta a satisfa\xE7\xE3o","n\xE3o perguntam a satisfa\xE7\xE3o"]}},"node:SearchAndSummarizeContent":{dim:"knowledge",en:"Generative answers from knowledge",pt:"Respostas generativas sobre o conhecimento"},"node:SearchKnowledgeSources":{dim:"knowledge",en:"Searches the knowledge sources",pt:"Busca nas fontes de conhecimento"},"yaml-only:triggerCondition":{dim:"knowledge",en:"Search condition only in YAML (the editor may erase it)",pt:"Condi\xE7\xE3o de busca s\xF3 no YAML (a tela pode apagar)"},"knowledge:SharePointSearchSource":{dim:"knowledge",en:"Knowledge in SharePoint",pt:"Conhecimento no SharePoint"},"declared:kpi":{dim:"declared",en:"KPI declared",pt:"KPI declarado",lacks:{en:["has no KPI declared","have no KPI declared"],pt:["n\xE3o tem KPI declarado","n\xE3o t\xEAm KPI declarado"]}},"declared:owner":{dim:"declared",en:"Owner declared",pt:"Dono declarado",lacks:{en:["has no owner declared","have no owner declared"],pt:["n\xE3o tem dono declarado","n\xE3o t\xEAm dono declarado"]}}},Oe=Object.fromEntries(U.map(e=>[e.id,e.name])),Te=[["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"],["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:"]],se=e=>Te.find(([o])=>e.startsWith(o));function F(e){return e.startsWith("reaches:")?F(`trigger:${e.slice(8)}`):oe[e]?.dim??se(e)?.[1]??"governance"}var ae=80,Y=e=>e.startsWith("reaches:")?`trigger:${e.slice(8)}`:void 0,ne=(e,o)=>o?.[e]??e;function C(e,o,s){let r=oe[e];if(r)return r[o];if(e.startsWith("text:block:")){let m=e.endsWith("~variant"),y=m?e.slice(0,-8):e,$=s?.[y]??y.slice(11);return m?`${$} (${o==="pt"?"varia\xE7\xE3o":"variation"})`:$}if(e.startsWith("text:link-domain:"))return`${o==="pt"?"Link para":"Link to"} ${e.slice(17)}`;if(e==="text:email")return o==="pt"?"Cita um e-mail":"Mentions an e-mail";if(e.startsWith("text:")){let[m,y]=[e.slice(5).split("=")[0],e.includes("=")?e.slice(e.indexOf("=")+1):void 0],$=s?.[`text:${m}`]??m;return y===void 0?$:`${$} = ${y}`}if(e.startsWith("reaches:")){let m=C(`trigger:${e.slice(8)}`,o);return o==="pt"?`Um t\xF3pico leva a \xAB${m}\xBB`:`A topic leads to \xAB${m}\xBB`}if(e.startsWith("called-with:input:"))return o==="pt"?`Recebe \xAB${e.slice(18)}\xBB do orquestrador`:`Receives \xAB${e.slice(18)}\xBB from the orchestrator`;let t=/^knowledge:count=(\d+)$/.exec(e);if(t){let m=Number(t[1]);return o==="pt"?`${m} ${m===1?"fonte":"fontes"} de conhecimento`:`${m} knowledge ${m===1?"source":"sources"}`}let a=se(e);if(!a)return e;let d=e.slice(a[0].length);if(a[0]==="ms:"&&(d=Oe[d]??d),a[0]==="auth:"&&d==="None")return o==="pt"?"Sem login":"No sign-in";if(e.startsWith("setting:moderation="))return o==="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(a[0])&&(d=ne(d,s)),a[0]==="disabled:"&&(d=d.replace(":"," ")),a[0]==="operation:"||a[0]==="flow-uses:operation:"){let[m,y]=[d.slice(0,d.indexOf("/")),d.slice(d.indexOf("/")+1)];d=`${ne(m,s)} \xB7 ${y}`}return`${a[o==="pt"?3:2]} ${d}`}var Ce={specialist:{en:["specialist","specialists"],pt:["especialista","especialistas"]},orchestrator:{en:["orchestrator","orchestrators"],pt:["orquestrador","orquestradores"]}},Q=(e,o,s)=>Ce[e][o][s===1?0:1],q={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",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",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"}},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",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",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"}}};function W(e){let o=t=>e.offPattern.some(a=>a.key===t.key||a.partOf===t.key),s=t=>t.share===1&&!t.decision&&!o(t),r=e.patterns.filter(t=>!t.partOf);return{look:r.filter(t=>!s(t)),everyone:r.filter(s)}}var re=new TextEncoder,X=e=>e.replace(/[&<>"]/g,o=>({"&":"&","<":"<",">":">",'"':"""})[o]).replace(/[\u0000-\u0008\u000B\u000C\u000E-\u001F]/g,""),E=e=>e<26?String.fromCharCode(65+e):E(Math.floor(e/26)-1)+String.fromCharCode(65+e%26),je=e=>e.replace(/[:\\/?*[\]]/g," ").slice(0,31)||"Sheet";function Re(e){let o=[{}],s=i=>JSON.stringify([i.bold??!1,i.fill??"",i.color??"",i.center??!1,i.wrap??!1]),r=new Map([[s({}),0]]);for(let i of e)for(let l of i.rows)for(let g of l){if(typeof g!="object")continue;let{v:O,...R}=g,P=s(R);r.has(P)||(r.set(P,o.length),o.push(R))}let t=new Map([["|",0]]),a=new Map([["",0]]),d=i=>{let l=`${i.bold?"b":""}|${i.color??""}`;return t.has(l)||t.set(l,t.size),t.get(l)},m=i=>i.fill?(a.has(i.fill)||a.set(i.fill,a.size+1),a.get(i.fill)):0,y=o.map(i=>{let l=i.center||i.wrap?`<alignment${i.center?' horizontal="center"':""}${i.wrap?' wrapText="1"':""} vertical="top"/>`:'<alignment vertical="top"/>';return`<xf numFmtId="0" fontId="${d(i)}" fillId="${m(i)}" borderId="${i.fill||i.bold?1:0}" xfId="0" applyFont="1" applyFill="1" applyBorder="1" applyAlignment="1">${l}</xf>`}),$=[...t.keys()].map(i=>{let[l,g]=i.split("|");return`<font>${l?"<b/>":""}<sz val="11"/>${g?`<color rgb="FF${g}"/>`:""}<name val="Calibri"/><family val="2"/></font>`}),p=['<fill><patternFill patternType="none"/></fill>','<fill><patternFill patternType="gray125"/></fill>',...[...a.keys()].filter(Boolean).map(i=>`<fill><patternFill patternType="solid"><fgColor rgb="FF${i}"/><bgColor indexed="64"/></patternFill></fill>`)];return{xml:`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
131
|
+
<script>(()=>{var Q="https://github.com/microsoft/skills-for-copilot-studio/blob/main/patterns",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 N={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"}},ae={"trigger:OnConversationStart":{dim:"conversation",en:"Greeting",pt:"Boas-vindas"},"trigger:OnUnknownIntent":{dim:"conversation",en:"Fallback (when it does not understand)",pt:"Fallback (quando n\xE3o entende)"},"trigger:OnEscalate":{dim:"conversation",en:"Escalation to a person",pt:"Escalonamento para humano",lacks:{en:["does not escalate to a person","do not escalate to a person"],pt:["n\xE3o escala para humano","n\xE3o escalam para humano"]}},"trigger:OnError":{dim:"conversation",en:"Error handling",pt:"Tratamento de erro",lacks:{en:["does not handle errors","do not handle errors"],pt:["n\xE3o trata erro","n\xE3o tratam erro"]}},"trigger:OnRecognizedIntent":{dim:"conversation",en:"A topic of its own, by intent",pt:"T\xF3pico pr\xF3prio, por inten\xE7\xE3o"},"trigger:OnRedirect":{dim:"orchestration",en:"Takes a call from the orchestrator",pt:"Recebe chamada do orquestrador",lacks:{en:["takes no call from the orchestrator","take no call from the orchestrator"],pt:["n\xE3o recebe chamada do orquestrador","n\xE3o recebem chamada do orquestrador"]}},"trigger:OnSelectIntent":{dim:"conversation",en:"Disambiguation (\xABdid you mean\u2026\xBB)",pt:"Desambigua\xE7\xE3o (\xABvoc\xEA quis dizer\u2026\xBB)"},"trigger:OnSignIn":{dim:"conversation",en:"Sign-in",pt:"Login"},"trigger:OnGeneratedResponse":{dim:"conversation",en:"Reviews the generated answer",pt:"Revisa a resposta gerada"},"trigger:OnKnowledgeRequested":{dim:"knowledge",en:"Before searching knowledge",pt:"Antes de buscar no conhecimento"},"trigger:OnToolSelected":{dim:"orchestration",en:"Child chosen as a tool",pt:"Filho escolhido como ferramenta"},"trigger:OnActivity":{dim:"conversation",en:"On every message",pt:"Em toda mensagem"},"setting:generative=on":{dim:"conversation",en:"Generative orchestration on",pt:"Orquestra\xE7\xE3o generativa ligada"},"setting:generative=off":{dim:"conversation",en:"Generative orchestration off",pt:"Orquestra\xE7\xE3o generativa desligada"},"setting: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",en:"Can be called by an orchestrator",pt:"Pode ser chamado por um orquestrador"},"called-with:history":{dim:"orchestration",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",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",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",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",en:"Has instructions",pt:"Tem instru\xE7\xF5es",lacks:{en:["has no instructions","have no instructions"],pt:["n\xE3o tem instru\xE7\xF5es","n\xE3o t\xEAm instru\xE7\xF5es"]}},"node:LogCustomTelemetryEvent":{dim:"governance",en:"Logs telemetry",pt:"Registra telemetria",lacks:{en:["logs no telemetry","log no telemetry"],pt:["n\xE3o registra telemetria","n\xE3o registram telemetria"]}},"node:CSATQuestion":{dim:"governance",en:"Asks for satisfaction (CSAT)",pt:"Pergunta a satisfa\xE7\xE3o (CSAT)",lacks:{en:["does not ask for satisfaction","do not ask for satisfaction"],pt:["n\xE3o pergunta a satisfa\xE7\xE3o","n\xE3o perguntam a satisfa\xE7\xE3o"]}},"node:SearchAndSummarizeContent":{dim:"knowledge",en:"Generative answers from knowledge",pt:"Respostas generativas sobre o conhecimento"},"node:SearchKnowledgeSources":{dim:"knowledge",en:"Searches the knowledge sources",pt:"Busca nas fontes de conhecimento"},"yaml-only:triggerCondition":{dim:"knowledge",en:"Search condition only in YAML (the editor may erase it)",pt:"Condi\xE7\xE3o de busca s\xF3 no YAML (a tela pode apagar)"},"knowledge:SharePointSearchSource":{dim:"knowledge",en:"Knowledge in SharePoint",pt:"Conhecimento no SharePoint"},"declared:kpi":{dim:"declared",en:"KPI declared",pt:"KPI declarado",lacks:{en:["has no KPI declared","have no KPI declared"],pt:["n\xE3o tem KPI declarado","n\xE3o t\xEAm KPI declarado"]}},"declared:owner":{dim:"declared",en:"Owner declared",pt:"Dono declarado",lacks:{en:["has no owner declared","have no owner declared"],pt:["n\xE3o tem dono declarado","n\xE3o t\xEAm dono declarado"]}}},je=Object.fromEntries(W.map(e=>[e.id,e.name])),Re=[["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:"]],re=e=>Re.find(([o])=>e.startsWith(o));function F(e){return e.startsWith("reaches:")?F(`trigger:${e.slice(8)}`):ae[e]?.dim??re(e)?.[1]??"governance"}var ie=80;function X(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 A=(e,o)=>e.split("{agent}").join(o==="pt"?"\u2039nome\u203A":"\u2039name\u203A"),Fe=e=>({form:e.slice(16,e.lastIndexOf("/")),field:e.slice(e.lastIndexOf("/")+1)}),se=(e,o)=>o?.[e]??e;function C(e,o,s){let r=ae[e];if(r)return r[o];if(e.startsWith("text:block:")){let p=e.endsWith("~variant"),y=p?e.slice(0,-8):e,g=s?.[y]??y.slice(11);return p?`${g} (${o==="pt"?"varia\xE7\xE3o":"variation"})`:g}if(e.startsWith("text:link-domain:"))return`${o==="pt"?"Link para":"Link to"} ${e.slice(17)}`;if(e==="text:email")return o==="pt"?"Cita um e-mail":"Mentions an e-mail";if(e.startsWith("text:")){let[p,y]=[e.slice(5).split("=")[0],e.includes("=")?e.slice(e.indexOf("=")+1):void 0],g=s?.[`text:${p}`]??p;return y===void 0?g:`${g} = ${y}`}if(e.startsWith("reaches:")){let p=C(`trigger:${e.slice(8)}`,o);return o==="pt"?`Um t\xF3pico leva a \xAB${p}\xBB`:`A topic leads to \xAB${p}\xBB`}if(e.startsWith("called-with:input:"))return o==="pt"?`Recebe \xAB${e.slice(18)}\xBB do orquestrador`:`Receives \xAB${e.slice(18)}\xBB from the orchestrator`;if(e.startsWith("telemetry:event:"))return o==="pt"?`Registra o evento \xAB${A(e.slice(16),o)}\xBB`:`Logs the event \xAB${A(e.slice(16),o)}\xBB`;if(e.startsWith("telemetry:field:")){let{form:p,field:y}=Fe(e),g=A(p,o);return o==="pt"?`\xAB${g}\xBB leva \xAB${y}\xBB`:`\xAB${g}\xBB carries \xAB${y}\xBB`}let t=/^knowledge:count=(\d+)$/.exec(e);if(t){let p=Number(t[1]);return o==="pt"?`${p} ${p===1?"fonte":"fontes"} de conhecimento`:`${p} knowledge ${p===1?"source":"sources"}`}let a=re(e);if(!a)return e;let d=e.slice(a[0].length);if(a[0]==="ms:"&&(d=je[d]??d),a[0]==="auth:"&&d==="None")return o==="pt"?"Sem login":"No sign-in";if(e.startsWith("setting:moderation="))return o==="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(a[0])&&(d=se(d,s)),a[0]==="disabled:"&&(d=d.replace(":"," ")),a[0]==="operation:"||a[0]==="flow-uses:operation:"){let[p,y]=[d.slice(0,d.indexOf("/")),d.slice(d.indexOf("/")+1)];d=`${se(p,s)} \xB7 ${y}`}return`${a[o==="pt"?3:2]} ${d}`}var De={specialist:{en:["specialist","specialists"],pt:["especialista","especialistas"]},orchestrator:{en:["orchestrator","orchestrators"],pt:["orquestrador","orquestradores"]}},J=(e,o,s)=>De[e][o][s===1?0:1],q={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",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",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"}}};function _(e){let o=t=>e.offPattern.some(a=>a.key===t.key||a.partOf===t.key),s=t=>t.share===1&&!t.decision&&!o(t),r=e.patterns.filter(t=>!t.partOf);return{look:r.filter(t=>!s(t)),everyone:r.filter(s)}}var le=new TextEncoder,Z=e=>e.replace(/[&<>"]/g,o=>({"&":"&","<":"<",">":">",'"':"""})[o]).replace(/[\u0000-\u0008\u000B\u000C\u000E-\u001F]/g,""),E=e=>e<26?String.fromCharCode(65+e):E(Math.floor(e/26)-1)+String.fromCharCode(65+e%26),Ne=e=>e.replace(/[:\\/?*[\]]/g," ").slice(0,31)||"Sheet";function Ae(e){let o=[{}],s=l=>JSON.stringify([l.bold??!1,l.fill??"",l.color??"",l.center??!1,l.wrap??!1]),r=new Map([[s({}),0]]);for(let l of e)for(let c of l.rows)for(let $ of c){if(typeof $!="object")continue;let{v:S,...R}=$,L=s(R);r.has(L)||(r.set(L,o.length),o.push(R))}let t=new Map([["|",0]]),a=new Map([["",0]]),d=l=>{let c=`${l.bold?"b":""}|${l.color??""}`;return t.has(c)||t.set(c,t.size),t.get(c)},p=l=>l.fill?(a.has(l.fill)||a.set(l.fill,a.size+1),a.get(l.fill)):0,y=o.map(l=>{let c=l.center||l.wrap?`<alignment${l.center?' horizontal="center"':""}${l.wrap?' wrapText="1"':""} vertical="top"/>`:'<alignment vertical="top"/>';return`<xf numFmtId="0" fontId="${d(l)}" fillId="${p(l)}" borderId="${l.fill||l.bold?1:0}" xfId="0" applyFont="1" applyFill="1" applyBorder="1" applyAlignment="1">${c}</xf>`}),g=[...t.keys()].map(l=>{let[c,$]=l.split("|");return`<font>${c?"<b/>":""}<sz val="11"/>${$?`<color rgb="FF${$}"/>`:""}<name val="Calibri"/><family val="2"/></font>`}),m=['<fill><patternFill patternType="none"/></fill>','<fill><patternFill patternType="gray125"/></fill>',...[...a.keys()].filter(Boolean).map(l=>`<fill><patternFill patternType="solid"><fgColor rgb="FF${l}"/><bgColor indexed="64"/></patternFill></fill>`)];return{xml:`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
132
132
|
<styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
|
|
133
|
-
<fonts count="${
|
|
134
|
-
<fills count="${
|
|
133
|
+
<fonts count="${g.length}">${g.join("")}</fonts>
|
|
134
|
+
<fills count="${m.length}">${m.join("")}</fills>
|
|
135
135
|
<borders count="2"><border><left/><right/><top/><bottom/><diagonal/></border><border><left style="thin"><color rgb="FFD0D7E2"/></left><right style="thin"><color rgb="FFD0D7E2"/></right><top style="thin"><color rgb="FFD0D7E2"/></top><bottom style="thin"><color rgb="FFD0D7E2"/></bottom><diagonal/></border></borders>
|
|
136
136
|
<cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs>
|
|
137
137
|
<cellXfs count="${y.length}">${y.join("")}</cellXfs>
|
|
138
138
|
<cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles>
|
|
139
|
-
</styleSheet>`,styleOf:
|
|
139
|
+
</styleSheet>`,styleOf:l=>typeof l=="object"?r.get(s((({v:c,...$})=>$)(l)))??0:0}}function Ie(e,o){let s=Math.max(e.columns.length,...e.rows.map(y=>y.length),1),r=e.rows.map((y,g)=>{let m=y.map((v,l)=>{let c=`${E(l)}${g+1}`,$=typeof v=="object"?v.v:v,S=o(v),R=S?` s="${S}"`:"";return $===""||$===void 0||$===null?S?`<c r="${c}"${R}/>`:"":typeof $=="number"?`<c r="${c}"${R}><v>${$}</v></c>`:`<c r="${c}"${R} t="inlineStr"><is><t xml:space="preserve">${Z(String($))}</t></is></c>`}).join("");return`<row r="${g+1}">${m}</row>`}),t=`${E(s-1)}${Math.max(1,e.rows.length)}`,a=e.header?'<pane ySplit="1" topLeftCell="A2" activePane="bottomLeft" state="frozen"/><selection pane="bottomLeft" activeCell="A2" sqref="A2"/>':"",d=e.columns.length?`<cols>${e.columns.map((y,g)=>`<col min="${g+1}" max="${g+1}" width="${y.width}" customWidth="1"/>`).join("")}</cols>`:"",p=e.header&&e.rows.length>1?`<autoFilter ref="A1:${E(Math.max(0,e.columns.length-1))}${e.rows.length}"/>`:"";return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
140
140
|
<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">
|
|
141
|
-
<dimension ref="A1:${t}"/><sheetViews><sheetView workbookViewId="0">${a}</sheetView></sheetViews><sheetFormatPr defaultRowHeight="15"/>${d}<sheetData>${r.join("")}</sheetData>${
|
|
142
|
-
</worksheet>`}function
|
|
143
|
-
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/>${e.map((d,
|
|
141
|
+
<dimension ref="A1:${t}"/><sheetViews><sheetView workbookViewId="0">${a}</sheetView></sheetViews><sheetFormatPr defaultRowHeight="15"/>${d}<sheetData>${r.join("")}</sheetData>${p}
|
|
142
|
+
</worksheet>`}function ce(e){let{xml:o,styleOf:s}=Ae(e),r=e.map(d=>Ne(d.name)),t=e.map((d,p)=>d.header&&d.rows.length>1?`<definedName name="_xlnm._FilterDatabase" localSheetId="${p}" hidden="1">'${Z(r[p]).replace(/'/g,"''")}'!$A$1:$${E(Math.max(0,d.columns.length-1))}$${d.rows.length}</definedName>`:"").join(""),a=[["[Content_Types].xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
143
|
+
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/>${e.map((d,p)=>`<Override PartName="/xl/worksheets/sheet${p+1}.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/>`).join("")}</Types>`],["_rels/.rels",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
144
144
|
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/></Relationships>`],["xl/workbook.xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
145
|
-
<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><bookViews><workbookView/></bookViews><sheets>${r.map((d,
|
|
146
|
-
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">${e.map((d,m)=>`<Relationship Id="rId${m+1}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet${m+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",o],...e.map((d,m)=>[`xl/worksheets/sheet${m+1}.xml`,Fe(d,s)])];return Ae(a.map(([d,m])=>[d,re.encode(m)]))}var Ne=(()=>{let e=new Uint32Array(256);for(let o=0;o<256;o++){let s=o;for(let r=0;r<8;r++)s=s&1?3988292384^s>>>1:s>>>1;e[o]=s>>>0}return e})();function De(e){let o=4294967295;for(let s=0;s<e.length;s++)o=Ne[(o^e[s])&255]^o>>>8;return(o^4294967295)>>>0}function Ae(e){let o=[],s=[],r=0;for(let[$,p]of e){let w=re.encode($),i=De(p),l=new DataView(new ArrayBuffer(30));l.setUint32(0,67324752,!0),l.setUint16(4,20,!0),l.setUint16(6,2048,!0),l.setUint16(8,0,!0),l.setUint32(14,i,!0),l.setUint32(18,p.length,!0),l.setUint32(22,p.length,!0),l.setUint16(26,w.length,!0),o.push(new Uint8Array(l.buffer),w,p);let g=new DataView(new ArrayBuffer(46));g.setUint32(0,33639248,!0),g.setUint16(4,20,!0),g.setUint16(6,20,!0),g.setUint16(8,2048,!0),g.setUint32(16,i,!0),g.setUint32(20,p.length,!0),g.setUint32(24,p.length,!0),g.setUint16(28,w.length,!0),g.setUint32(42,r,!0),s.push(new Uint8Array(g.buffer),w),r+=30+w.length+p.length}let t=s.reduce(($,p)=>$+p.length,0),a=new DataView(new ArrayBuffer(22));a.setUint32(0,101010256,!0),a.setUint16(8,e.length,!0),a.setUint16(10,e.length,!0),a.setUint32(12,t,!0),a.setUint32(16,r,!0);let d=[...o,...s,new Uint8Array(a.buffer)],m=new Uint8Array(d.reduce(($,p)=>$+p.length,0)),y=0;for(let $ of d)m.set($,y),y+=$.length;return m}var ce=e=>ie(e),Me={bold:!0,fill:"E8EEF7"},Ee={v:"\u25CF",fill:"DDF3E6",center:!0},Ie={v:"\xD7",fill:"FFD5CC",center:!0,bold:!0},Pe={v:"\u25D0",fill:"FFF3C4",center:!0},Le={v:"\u2248",fill:"FFF6DC",center:!0,bold:!0},le=Object.keys(D);function de(e,o,s,r="en"){let t=q[r],a=(n,h,b)=>({key:n,name:t[n],header:!0,columns:h.map(([N,L])=>({title:N,width:L})),rows:[h.map(([N])=>({v:N,...Me})),...b]}),d=n=>t[e.roles[n]],m=n=>n.startsWith("type:")?`${t.type}:${e.typeNames[n.slice(5)]??n.slice(5)}`:t[n],y=n=>(e.types[n]??[]).map(h=>e.typeNames[h]??h).join(" \xB7 "),$=n=>C(n,r,e.names),p=[...e.agents].sort((n,h)=>n.role===h.role?n.id.localeCompare(h.id):n.role==="orchestrator"?-1:1),w=[...new Set([...p.flatMap(n=>Object.keys(n.facts)),...e.patterns.map(n=>n.key)])].filter(n=>!n.endsWith("~variant")).sort((n,h)=>le.indexOf(F(n))-le.indexOf(F(h))||n.localeCompare(h)),i=new Set(e.offPattern.map(n=>`${n.agent} ${n.key}`)),l=n=>e.agents.filter(h=>h.role===n).length,g={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,l("orchestrator")],[t.count.specialists,l("specialist")],[t.count.patterns,e.patterns.length],[t.count.off,new Set(e.offPattern.map(n=>n.agent)).size],[t.count.gaps,e.gaps.length],[t.count.conflicts,e.conflicts.length],[t.count.solos,o.filter(n=>n.key==="solo").length],[t.count.unused,e.unused.length],["",""],[{v:o.length?t.look:t.nothing,bold:!0},""],...o.map(n=>["",{v:n[r],wrap:!0}])]},O=a("matrix",[[t.dimension,18],[t.fact,40],[t.key,34],...p.map(n=>[n.id,14])],w.map(n=>[D[F(n)][r],$(n),n,...p.map(h=>n in h.facts?n.startsWith("declared:")?Pe:Ee:`${n}~variant`in h.facts?Le:i.has(`${h.id} ${n}`)?Ie:"")])),{look:R,everyone:P}=W(e),ue=a("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]],[...R,...P].map(n=>{let h=e.offPattern.filter(b=>b.key===n.key).map(b=>b.agent);return[n.key,$(n.key),m(n.scope),t[n.role],`${Math.round(n.share*100)}%`,n.agents.join(", "),h.join(", "),n.decision?t[n.decision.status==="accepted"?"accept":"reject"]:"",n.decision?.why??""]})),ge=a("off",[[t.agent,24],[t.role,14],[t.missing,44],[t.key,34],[t.scope,14],[t.accepted,14]],e.offPattern.map(n=>[n.agent,d(n.agent),$(n.key),n.key,m(n.scope),e.patterns.find(h=>h.key===n.key)?.decision?.status==="accepted"?t.yes:""])),$e=a("gaps",[[t.rule,16],[t.says,50],[t.role,14],[t.notMet,60]],e.gaps.map(n=>[n.rule.id,n.rule.says,n.rule.role?t[n.rule.role]:"",n.agents.join(", ")])),ye=a("conflicts",[[t.agent,24],[t.fact,40],[t.key,34],[t.declared,20],[t.source,40],[t.inYaml,12]],e.conflicts.map(n=>[n.agent,$(n.key),n.key,n.declared,n.source,n.observed?t.yes:t.no])),we=a("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]],p.map(n=>[n.id,n.displayName??"",t[n.role],y(n.id),Object.keys(n.facts).length,e.offPattern.filter(h=>h.agent===n.id).map(h=>$(h.key)).join("; "),e.solos.filter(h=>h.agents[0]===n.id).map(h=>$(h.key)).join("; "),n.children.map(h=>h.name).join(", "),e.unknown.filter(h=>h.agent===n.id).length||""])),be=a("evidence",[[t.agent,30],[t.fact,40],[t.key,34],[t.file,50],[t.line,8]],p.flatMap(n=>[{who:n.id,facts:n.facts},...n.children.map(h=>({who:`${n.id} \u203A ${h.name}`,facts:h.facts}))]).flatMap(({who:n,facts:h})=>Object.entries(h).sort(([b],[N])=>b.localeCompare(N)).flatMap(([b,N])=>N.map(L=>[n,$(b),b,L.file,L.line??""])))),ve=a("declared",[[t.agent,24],[t.key,34],[t.value,40],[t.source,40]],s.declared.map(n=>[n.agent,n.key,n.value,n.source])),ke=a("text",[[t.id,28],[t.label,36],[t.body,70],[t.have,50],[t.variant,40],[t.official,10]],e.blocks.map(n=>[n.id,n.official??n.label,{v:n.text,wrap:!0},Object.keys(n.holders).sort().join(", "),Object.entries(n.variants).sort(([h],[b])=>h.localeCompare(b)).map(([h,b])=>`${h} (${Math.round(b.similarity*100)}%)`).join(", "),n.official?t.yes:""])),xe=a("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(n=>[n.caller,n.agent??`${n.name??n.calls} (${t.notInFolder})`,n.history?t.yes:t.no,n.inputs.join(", "),{v:n.description,wrap:!0},n.description.length,`${n.file}${n.line?`:${n.line}`:""}`])),Se=a("unused",[[t.agent,24],[t.what,16],[t.name,30],[t.how,14],[t.file,50]],e.unused.flatMap(n=>n.sources.map(h=>[n.agent,t.thing[n.what]??n.what,e.names[n.name]??n.name,t[n.how],`${h.file}${h.line?`:${h.line}`:""}`]))),te=[g,O,ue,...e.blocks.length?[ke]:[],...e.contract.routes.length?[xe]:[],ge,$e,ye,...e.unused.length?[Se]:[],we,be,ve];return e.unknown.length&&te.push(a("unknown",[[t.agent,24],[t.file,50],[t.why,40],[t.kind,24]],e.unknown.map(n=>[n.agent,n.file,t.why_[n.why],n.kind??""]))),te}var Ue={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,o,s)=>`${e} of ${o} ${s}`,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,o,s,r,t)=>`${e} in the cast \xB7 ${o} patterns \xB7 ${s} off a pattern \xB7 ${r} only one has \xB7 threshold ${t}% of each role`,excel:"\u2B07 Excel",yaml:"\u2B07 cast.yaml",png:"\u2B07 PNG",name:"Name",said:"declared",unused:e=>`Unused (${e})`,nothingUnused:"Everything is used, nothing is switched off.",flows:"Flows",returnsNothing:"returns nothing",otherFlow:"another flow",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,o,s)=>`${e} de ${o} ${s}`,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,o,s,r,t)=>`${e} no elenco \xB7 ${o} padr\xF5es \xB7 ${s} 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",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",routing:"Roteamento",called:"Chamado",history:"Hist\xF3rico",inputs:"Entradas",description:"Descri\xE7\xE3o",notInFolder:"n\xE3o est\xE1 na pasta",chars:e=>`${e} caracteres`}},k=JSON.parse(document.getElementById("cast").textContent),{result:u,lang:S,looks:I}=k,c=Ue[S],v=q[S],K=de(u,I,k.cast,S);document.documentElement.lang=S==="pt"?"pt-BR":"en";document.title=u.name??k.id;var f=e=>String(e??"").replace(/[&<>"']/g,o=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[o]),j=e=>f(C(e,S,u.names)),_=[...u.agents].sort((e,o)=>e.role===o.role?e.id.localeCompare(o.id):e.role==="orchestrator"?-1:1),J=e=>u.patterns.find(o=>o.key===e),pe=e=>[...new Set(u.offPattern.filter(o=>o.key===e||o.partOf===e).map(o=>o.agent))],me=e=>e.startsWith("type:")?u.typeNames[e.slice(5)]??e.slice(5):v[e],fe=e=>e.startsWith("type:")?"type":e,B=Object.keys(u.typeNames),qe=e=>e.startsWith("text:block:")?u.blocks.find(o=>`text:block:${o.id}`===e):void 0,Z=e=>{let o=J(e);if(!o)return"";let s=o.decision?`<span class="cl-badge ${o.decision.status}">${f(v[o.decision.status==="accepted"?"accept":"reject"])}</span>`:"";return`${o.official?`<span class="cl-badge official">${c.official}</span>`:""}<span class="cl-badge ${fe(o.scope)}">${c.pattern} \xB7 ${f(me(o.scope))}</span>${s}`},T="map",x,A="all",V,M,z=document.getElementById("app");function he(){let e=[["map",c.map],["patterns",c.patterns],["cast",c.cast],["microsoft",c.microsoft],["unused",c.unused(u.unused.length)],["unknown",c.unknown(u.unknown.length)]],o=new Set(u.offPattern.map(s=>s.agent)).size;z.innerHTML=`<div class="cl-wrap">
|
|
147
|
-
<header><h1 class="cl-title">${f(
|
|
145
|
+
<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><bookViews><workbookView/></bookViews><sheets>${r.map((d,p)=>`<sheet name="${Z(d)}" sheetId="${p+1}" r:id="rId${p+1}"/>`).join("")}</sheets>${t?`<definedNames>${t}</definedNames>`:""}</workbook>`],["xl/_rels/workbook.xml.rels",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
146
|
+
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">${e.map((d,p)=>`<Relationship Id="rId${p+1}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet${p+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",o],...e.map((d,p)=>[`xl/worksheets/sheet${p+1}.xml`,Ie(d,s)])];return Pe(a.map(([d,p])=>[d,le.encode(p)]))}var Me=(()=>{let e=new Uint32Array(256);for(let o=0;o<256;o++){let s=o;for(let r=0;r<8;r++)s=s&1?3988292384^s>>>1:s>>>1;e[o]=s>>>0}return e})();function Ee(e){let o=4294967295;for(let s=0;s<e.length;s++)o=Me[(o^e[s])&255]^o>>>8;return(o^4294967295)>>>0}function Pe(e){let o=[],s=[],r=0;for(let[g,m]of e){let v=le.encode(g),l=Ee(m),c=new DataView(new ArrayBuffer(30));c.setUint32(0,67324752,!0),c.setUint16(4,20,!0),c.setUint16(6,2048,!0),c.setUint16(8,0,!0),c.setUint32(14,l,!0),c.setUint32(18,m.length,!0),c.setUint32(22,m.length,!0),c.setUint16(26,v.length,!0),o.push(new Uint8Array(c.buffer),v,m);let $=new DataView(new ArrayBuffer(46));$.setUint32(0,33639248,!0),$.setUint16(4,20,!0),$.setUint16(6,20,!0),$.setUint16(8,2048,!0),$.setUint32(16,l,!0),$.setUint32(20,m.length,!0),$.setUint32(24,m.length,!0),$.setUint16(28,v.length,!0),$.setUint32(42,r,!0),s.push(new Uint8Array($.buffer),v),r+=30+v.length+m.length}let t=s.reduce((g,m)=>g+m.length,0),a=new DataView(new ArrayBuffer(22));a.setUint32(0,101010256,!0),a.setUint16(8,e.length,!0),a.setUint16(10,e.length,!0),a.setUint32(12,t,!0),a.setUint32(16,r,!0);let d=[...o,...s,new Uint8Array(a.buffer)],p=new Uint8Array(d.reduce((g,m)=>g+m.length,0)),y=0;for(let g of d)p.set(g,y),y+=g.length;return p}var pe=e=>ce(e),Le={bold:!0,fill:"E8EEF7"},Ue={v:"\u25CF",fill:"DDF3E6",center:!0},We={v:"\xD7",fill:"FFD5CC",center:!0,bold:!0},qe={v:"\u25D0",fill:"FFF3C4",center:!0},_e={v:"\u2248",fill:"FFF6DC",center:!0,bold:!0},de=Object.keys(N);function me(e,o,s,r="en"){let t=q[r],a=(n,u,w)=>({key:n,name:t[n],header:!0,columns:u.map(([D,U])=>({title:D,width:U})),rows:[u.map(([D])=>({v:D,...Le})),...w]}),d=n=>t[e.roles[n]],p=n=>n.startsWith("type:")?`${t.type}:${e.typeNames[n.slice(5)]??n.slice(5)}`:t[n],y=n=>(e.types[n]??[]).map(u=>e.typeNames[u]??u).join(" \xB7 "),g=n=>C(n,r,e.names),m=[...e.agents].sort((n,u)=>n.role===u.role?n.id.localeCompare(u.id):n.role==="orchestrator"?-1:1),v=[...new Set([...m.flatMap(n=>Object.keys(n.facts)),...e.patterns.map(n=>n.key)])].filter(n=>!n.endsWith("~variant")).sort((n,u)=>de.indexOf(F(n))-de.indexOf(F(u))||n.localeCompare(u)),l=new Set(e.offPattern.map(n=>`${n.agent} ${n.key}`)),c=n=>e.agents.filter(u=>u.role===n).length,$={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,c("orchestrator")],[t.count.specialists,c("specialist")],[t.count.patterns,e.patterns.length],[t.count.off,new Set(e.offPattern.map(n=>n.agent)).size],[t.count.gaps,e.gaps.length],[t.count.conflicts,e.conflicts.length],[t.count.solos,o.filter(n=>n.key==="solo").length],[t.count.unused,e.unused.length],["",""],[{v:o.length?t.look:t.nothing,bold:!0},""],...o.map(n=>["",{v:n[r],wrap:!0}])]},S=a("matrix",[[t.dimension,18],[t.fact,40],[t.key,34],...m.map(n=>[n.id,14])],v.map(n=>[N[F(n)][r],g(n),n,...m.map(u=>n in u.facts?n.startsWith("declared:")?qe:Ue:`${n}~variant`in u.facts?_e:l.has(`${u.id} ${n}`)?We:"")])),{look:R,everyone:L}=_(e),$e=a("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]],[...R,...L].map(n=>{let u=e.offPattern.filter(w=>w.key===n.key).map(w=>w.agent);return[n.key,g(n.key),p(n.scope),t[n.role],`${Math.round(n.share*100)}%`,n.agents.join(", "),u.join(", "),n.decision?t[n.decision.status==="accepted"?"accept":"reject"]:"",n.decision?.why??""]})),ye=a("off",[[t.agent,24],[t.role,14],[t.missing,44],[t.key,34],[t.scope,14],[t.accepted,14]],e.offPattern.map(n=>[n.agent,d(n.agent),g(n.key),n.key,p(n.scope),e.patterns.find(u=>u.key===n.key)?.decision?.status==="accepted"?t.yes:""])),ve=a("gaps",[[t.rule,16],[t.says,50],[t.role,14],[t.notMet,60]],e.gaps.map(n=>[n.rule.id,n.rule.says,n.rule.role?t[n.rule.role]:"",n.agents.join(", ")])),we=a("conflicts",[[t.agent,24],[t.fact,40],[t.key,34],[t.declared,20],[t.source,40],[t.inYaml,12]],e.conflicts.map(n=>[n.agent,g(n.key),n.key,n.declared,n.source,n.observed?t.yes:t.no])),be=a("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]],m.map(n=>[n.id,n.displayName??"",t[n.role],y(n.id),Object.keys(n.facts).length,e.offPattern.filter(u=>u.agent===n.id).map(u=>g(u.key)).join("; "),e.solos.filter(u=>u.agents[0]===n.id).map(u=>g(u.key)).join("; "),n.children.map(u=>u.name).join(", "),e.unknown.filter(u=>u.agent===n.id).length||""])),ke=a("evidence",[[t.agent,30],[t.fact,40],[t.key,34],[t.file,50],[t.line,8]],m.flatMap(n=>[{who:n.id,facts:n.facts},...n.children.map(u=>({who:`${n.id} \u203A ${u.name}`,facts:u.facts}))]).flatMap(({who:n,facts:u})=>Object.entries(u).sort(([w],[D])=>w.localeCompare(D)).flatMap(([w,D])=>D.map(U=>[n,g(w),w,U.file,U.line??""])))),xe=a("declared",[[t.agent,24],[t.key,34],[t.value,40],[t.source,40]],s.declared.map(n=>[n.agent,n.key,n.value,n.source])),Oe=a("text",[[t.id,28],[t.label,36],[t.body,70],[t.have,50],[t.variant,40],[t.official,10]],e.blocks.map(n=>[n.id,n.official??n.label,{v:n.text,wrap:!0},Object.keys(n.holders).sort().join(", "),Object.entries(n.variants).sort(([u],[w])=>u.localeCompare(w)).map(([u,w])=>`${u} (${Math.round(w.similarity*100)}%)`).join(", "),n.official?t.yes:""])),Se=a("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(n=>[n.caller,n.agent??`${n.name??n.calls} (${t.notInFolder})`,n.history?t.yes:t.no,n.inputs.join(", "),{v:n.description,wrap:!0},n.description.length,`${n.file}${n.line?`:${n.line}`:""}`])),Y=e.telemetry.days,Te=a("telemetry",[[t.agent,24],[t.written,30],[t.form,28],[t.fields,50],[t.file,44],...Y?[[t.fired(Y),16]]:[]],e.telemetry.events.map(n=>[n.agent,n.name,A(n.as,r),n.fields?n.fields.join(", "):t.notRead,`${n.file}${n.line?`:${n.line}`:""}`,...Y?[n.fired===void 0||e.telemetry.silent.includes(n.agent)?"\u2014":n.fired===0?{v:0,color:"B42318",bold:!0}:n.fired]:[]])),Ce=a("unused",[[t.agent,24],[t.what,16],[t.name,30],[t.how,14],[t.file,50]],e.unused.flatMap(n=>n.sources.map(u=>[n.agent,t.thing[n.what]??n.what,e.names[n.name]??n.name,t[n.how],`${u.file}${u.line?`:${u.line}`:""}`]))),oe=[$,S,$e,...e.blocks.length?[Oe]:[],...e.contract.routes.length?[Se]:[],...e.telemetry.events.length?[Te]:[],ye,ve,we,...e.unused.length?[Ce]:[],be,ke,xe];return e.unknown.length&&oe.push(a("unknown",[[t.agent,24],[t.file,50],[t.why,40],[t.kind,24]],e.unknown.map(n=>[n.agent,n.file,t.why_[n.why],n.kind??""]))),oe}var Ve={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,o,s)=>`${e} of ${o} ${s}`,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,o,s,r,t)=>`${e} in the cast \xB7 ${o} patterns \xB7 ${s} off a pattern \xB7 ${r} only one has \xB7 threshold ${t}% of each role`,excel:"\u2B07 Excel",yaml:"\u2B07 cast.yaml",png:"\u2B07 PNG",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,o)=>`${e} ${e===1?"time":"times"} in ${o} 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,o,s)=>`${e} de ${o} ${s}`,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,o,s,r,t)=>`${e} no elenco \xB7 ${o} padr\xF5es \xB7 ${s} 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",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,o)=>`${e} ${e===1?"vez":"vezes"} em ${o} 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`}},k=JSON.parse(document.getElementById("cast").textContent),{result:h,lang:O,looks:P}=k,i=Ve[O],b=q[O],G=me(h,P,k.cast,O);document.documentElement.lang=O==="pt"?"pt-BR":"en";document.title=h.name??k.id;var f=e=>String(e??"").replace(/[&<>"']/g,o=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[o]),j=e=>f(C(e,O,h.names)),V=[...h.agents].sort((e,o)=>e.role===o.role?e.id.localeCompare(o.id):e.role==="orchestrator"?-1:1),ee=e=>h.patterns.find(o=>o.key===e),fe=e=>[...new Set(h.offPattern.filter(o=>o.key===e||o.partOf===e).map(o=>o.agent))],ue=e=>e.startsWith("type:")?h.typeNames[e.slice(5)]??e.slice(5):b[e],he=e=>e.startsWith("type:")?"type":e,z=Object.keys(h.typeNames),Be=e=>e.startsWith("text:block:")?h.blocks.find(o=>`text:block:${o.id}`===e):void 0,te=e=>{let o=ee(e);if(!o)return"";let s=o.decision?`<span class="cl-badge ${o.decision.status}">${f(b[o.decision.status==="accepted"?"accept":"reject"])}</span>`:"";return`${o.official?`<span class="cl-badge official">${i.official}</span>`:""}<span class="cl-badge ${he(o.scope)}">${i.pattern} \xB7 ${f(ue(o.scope))}</span>${s}`},T="map",x,I="all",B,M,H=document.getElementById("app");function ge(){let e=[["map",i.map],["patterns",i.patterns],["cast",i.cast],["microsoft",i.microsoft],["unused",i.unused(h.unused.length)],["unknown",i.unknown(h.unknown.length)]],o=new Set(h.offPattern.map(s=>s.agent)).size;H.innerHTML=`<div class="cl-wrap">
|
|
147
|
+
<header><h1 class="cl-title">${f(h.name??k.id)}</h1><p class="cl-sub">${i.summary(h.agents.length,h.patterns.length,o,P.filter(s=>s.key==="solo").length,Math.round(k.threshold*100))}</p><p class="cl-private">${f(b.privacy)}</p></header>
|
|
148
148
|
<div class="cl-bar" role="tablist">${e.map(([s,r])=>`<button class="cl-tab" role="tab" aria-selected="${s===T}" data-tab="${s}">${f(r)}</button>`).join("")}
|
|
149
|
-
<span class="cl-space"></span><button class="cl-get" data-get="xlsx">${
|
|
150
|
-
${T==="map"?
|
|
151
|
-
<p class="cl-foot">${
|
|
152
|
-
</div>`}function
|
|
153
|
-
${
|
|
154
|
-
${k.focusAreas.length?`<span style="margin-left:10px">${
|
|
155
|
-
${d.length?`<span class="cl-lack">${
|
|
156
|
-
${o.length?`<details class="cl-everyone"><summary>${
|
|
157
|
-
${
|
|
158
|
-
${s?`<div>${
|
|
159
|
-
${d?`<div>${
|
|
160
|
-
${
|
|
161
|
-
<div><b>${
|
|
162
|
-
${
|
|
163
|
-
${a.length?`<div><b>${
|
|
164
|
-
${(
|
|
165
|
-
<dt>${
|
|
166
|
-
${o.length?`<dt>${
|
|
167
|
-
${s.length?`<dt>${
|
|
168
|
-
${
|
|
169
|
-
${e.
|
|
170
|
-
${
|
|
171
|
-
|
|
172
|
-
<td${
|
|
149
|
+
<span class="cl-space"></span><button class="cl-get" data-get="xlsx">${i.excel}</button><button class="cl-get" data-get="yaml">${i.yaml}</button>${T==="map"?`<button class="cl-get" data-get="png">${i.png}</button>`:""}</div>
|
|
150
|
+
${T==="map"?ze():T==="patterns"?ne(G.find(s=>s.key==="patterns")):T==="cast"?Qe():T==="microsoft"?tt():T==="unused"?et():nt()}
|
|
151
|
+
<p class="cl-foot">${i.foot}</p>
|
|
152
|
+
</div>`}function ze(){return`${P.length?`<section class="cl-look"><h2>${f(b.look)}</h2><ul>${P.map((o,s)=>`<li><button data-look="${s}">${f(o[O])}</button></li>`).join("")}</ul></section>`:""}<div class="cl-body${x?" with-detail":""}"><div class="cl-wrap" style="gap:16px">${Ke()}${Ge()}</div>${x?`<aside class="cl-card cl-detail" aria-live="polite">${Ye()}</aside>`:""}</div>`}function He(){let e=t=>I==="all"||t.role===I;if(!z.length)return[{id:"",name:"",cols:V.filter(e).map(t=>({a:t,also:[]}))}];let o=t=>h.types[t]??[],s=V.filter(t=>t.role==="specialist"&&e(t));return[{id:"orchestrator",name:b.orchestrator,cols:V.filter(t=>t.role==="orchestrator"&&e(t)).map(t=>({a:t,also:[]}))},...z.map(t=>({id:t,name:h.typeNames[t],cols:s.filter(a=>o(a.id).includes(t)).map(a=>({a,also:o(a.id).filter(d=>d!==t).map(d=>h.typeNames[d]??d)}))})),{id:"-",name:i.noType,cols:s.filter(t=>!o(t.id).length).map(t=>({a:t,also:[]}))}].filter(t=>t.cols.length&&(!M||t.id===M))}function Ke(){let e=He(),o=e.flatMap(m=>m.cols),s=k.focusAreas.find(m=>m.id===B),r=[...new Set([...h.agents.flatMap(m=>Object.keys(m.facts)),...h.patterns.map(m=>m.key)])].filter(m=>!m.endsWith("~variant")&&(!s||s.facts.includes(m))),t=new Set(h.offPattern.map(m=>`${m.agent} ${m.key}`)),a=(m,v,l,c)=>`<button class="cl-chip" ${m}="${f(v)}" aria-pressed="${l}">${f(c)}</button>`,d=`<div class="cl-filters">${i.role}: ${a("data-role","all",I==="all",i.all)}${a("data-role","specialist",I==="specialist",b.specialist)}${a("data-role","orchestrator",I==="orchestrator",b.orchestrator)}
|
|
153
|
+
${z.length?`<span style="margin-left:10px">${i.type}:</span> ${a("data-type","",!M,i.all)}${z.map(m=>a("data-type",m,M===m,h.typeNames[m])).join("")}${a("data-type","-",M==="-",i.noType)}`:""}
|
|
154
|
+
${k.focusAreas.length?`<span style="margin-left:10px">${i.focus}:</span> ${a("data-focus","",!B,i.all)}${k.focusAreas.map(m=>a("data-focus",m.id,B===m.id,m.name)).join("")}`:""}</div>`,p="";for(let m of Object.keys(N)){let v=c=>X(c)?`${C(X(c),O,h.names)}${C(c,O,h.names)}`:C(c,O,h.names),l=r.filter(c=>F(c)===m).sort((c,$)=>v(c).localeCompare(v($)));l.length&&(p+=`<tr class="cl-dim"><td colspan="${o.length+1}">${f(N[m][O])}</td></tr>`,p+=l.map(c=>`<tr><th scope="row" style="text-align:left;font-weight:400"><button class="cl-fact${x?.key===c&&!x.agent?" picked":""}" data-key="${f(c)}">${j(c)}</button>${te(c)}</th>${o.map(({a:$})=>{let S=c in $.facts?c.startsWith("declared:")?["said","\u25D0"]:["has","\u25CF"]:`${c}~variant`in $.facts?["var","\u2248"]:t.has(`${$.id} ${c}`)?["off","\xD7"]:void 0;return`<td class="cl-mark${S?` ${S[0]}`:""}">${S?`<button data-key="${f(c)}" data-agent="${f($.id)}" aria-label="${f($.id)}: ${j(c)}">${S[1]}</button>`:""}</td>`}).join("")}</tr>`).join(""))}let y=e.some(m=>m.name)?`<tr class="cl-groups"><th></th>${e.map(m=>`<th colspan="${m.cols.length}" class="${m.id==="orchestrator"?"":"typed"}">${f(m.name)}</th>`).join("")}</tr>`:"",g=o.map(({a:m,also:v})=>`<th scope="col">${f(m.id)}<small>${f(v.length?`${i.alsoIn} ${v.join(", ")}`:b[m.role])}</small></th>`).join("");return`<section class="cl-card"><h2>${i.matrix}</h2>${d}<div class="cl-scroll"><table class="cl-matrix"><thead>${y}<tr><th></th>${g}</tr></thead><tbody>${p}</tbody></table></div><p class="cl-legend">${i.legend}</p></section>`}function Ge(){let{look:e,everyone:o}=_(h),s=r=>{let t=ee(r),a=h.agents.filter(p=>p.role===t.role).length,d=fe(r);return`<button class="cl-pattern${x?.key===r?" picked":""}" data-pattern="${f(r)}"><b>${j(r)}</b><span>${te(r)} ${i.of(t.agents.filter(p=>h.roles[p]===t.role).length,a,J(t.role,O,a))}</span>
|
|
155
|
+
${d.length?`<span class="cl-lack">${i.lacks}: ${f(d.join(", "))}</span>`:""}<span>${i.decision}: ${t.decision?`${f(b[t.decision.status==="accepted"?"accept":"reject"])}${t.decision.why?` \u2014 ${f(t.decision.why)}`:""}`:`<i>${i.toDecide}</i>`}</span></button>`};return`<section class="cl-card"><h2>${i.candidates}</h2>${e.length?`<div class="cl-cards">${e.map(r=>s(r.key)).join("")}</div>`:'<p class="cl-empty">\u2014</p>'}
|
|
156
|
+
${o.length?`<details class="cl-everyone"><summary>${i.everyone(o.length)}</summary><ul>${o.map(r=>`<li><button class="cl-fact" data-pattern="${f(r.key)}">${j(r.key)}</button> <span class="cl-badge ${he(r.scope)}">${f(ue(r.scope))}</span></li>`).join("")}</ul></details>`:""}</section>`}function Ye(){let{key:e,agent:o}=x,s=ee(e),t=h.agents.filter(l=>e in l.facts&&(!o||l.id===o)).map(l=>`<li><b>${f(l.id)}</b>${l.facts[e].map(c=>`<div class="cl-file">${f(c.file)}${c.line?`:${c.line}`:""}</div>`).join("")}</li>`).join(""),a=fe(e).filter(l=>!o||l===o),d=h.solos.some(l=>l.key===e),p=h.orchestratorDoes.some(l=>l.key===e),y=Be(e),g=l=>l.map(c=>c.op==="same"?f(c.text):`<span class="cl-${c.op}">${f(c.text)}</span>`).join(" "),m=y?Object.entries(y.variants).filter(([l])=>!o||l===o):[],v=y?`<div><b>${i.text}</b><pre class="cl-text">${f(y.text)}</pre></div>
|
|
157
|
+
${m.map(([l,c])=>`<div class="cl-variant"><b>${f(l)}</b> <span class="cl-file">${f(c.source.file)}${c.source.line?`:${c.source.line}`:""} \xB7 ${Math.round(c.similarity*100)}% ${i.alike}</span><div class="cl-diff">${g(c.diff)}</div></div>`).join("")}`:"";return`<button class="cl-close" data-close="1">${i.close}</button><span class="cl-kicker">${f(N[F(e)][O])}</span><h3>${j(e)}</h3><code>${f(e)}</code>
|
|
158
|
+
${s?`<div>${te(e)}</div><div>${i.decision}: ${s.decision?`${f(b[s.decision.status==="accepted"?"accept":"reject"])}${s.decision.why?` \u2014 ${f(s.decision.why)}`:""}`:`<i>${i.toDecide}</i>`}</div>`:""}
|
|
159
|
+
${d?`<div>${i.alone}</div>`:p?`<div>${i.orchestratorDoes}</div>`:""}
|
|
160
|
+
${v}
|
|
161
|
+
<div><b>${i.who}</b>${t?`<ul>${t}</ul>`:` \u2014 ${i.none}`}</div>
|
|
162
|
+
${h.patterns.filter(l=>l.partOf===e).map(l=>{let c=h.offPattern.filter($=>$.key===l.key).map($=>$.agent);return`<div><b>${j(l.key)}</b> \u2014 ${c.length?`<span style="color:var(--off)">${i.lacks}: ${f(c.join(", "))}</span>`:`${i.who}: ${l.agents.length}`}</div>`}).join("")}
|
|
163
|
+
${a.length?`<div><b>${i.lacks}</b>: <span style="color:var(--off)">${f(a.join(", "))}</span></div>`:""}`}function Qe(){return`<div class="cl-agents">${V.map(e=>{let o=h.offPattern.filter(a=>a.agent===e.id),s=h.solos.filter(a=>a.agents[0]===e.id),r=h.unknown.filter(a=>a.agent===e.id),t=Ze(e.id);return`<section class="cl-card cl-agent${t?" wide":""}"><span class="cl-kicker">${f(b[e.role])}</span><h3>${f(e.id)}</h3>${e.displayName?`<code>${f(e.displayName)}</code>`:""}<dl>
|
|
164
|
+
${(h.types[e.id]??[]).length?`<dt>${i.types}</dt><dd>${f(h.types[e.id].map(a=>h.typeNames[a]??a).join(" \xB7 "))}</dd>`:""}
|
|
165
|
+
<dt>${i.facts}</dt><dd>${Object.keys(e.facts).length}</dd>
|
|
166
|
+
${o.length?`<dt>${i.off}</dt><dd class="cl-lack">${o.map(a=>j(a.key)).join("<br>")}</dd>`:""}
|
|
167
|
+
${s.length?`<dt>${i.solo}</dt><dd>${s.map(a=>j(a.key)).join("<br>")}</dd>`:""}
|
|
168
|
+
${Xe(e.id,e.displayName??e.id)}
|
|
169
|
+
${Je(e.id)}
|
|
170
|
+
${e.children.length?`<dt>${i.children}</dt><dd>${e.children.map(a=>`${f(a.name)} <span class="cl-sub">(${Object.keys(a.facts).map(j).join(", ")})</span>`).join("<br>")}</dd>`:""}
|
|
171
|
+
${r.length?`<dt>${f(b.unknown)}</dt><dd>${r.map(a=>f(a.file)).join("<br>")}</dd>`:""}</dl>${t}</section>`}).join("")}</div>`}function Xe(e,o){let s=h.flows.filter(a=>a.agent===e&&a.called);if(!s.length)return"";let r=a=>a==="child-flow"?i.otherFlow:a.startsWith("http:")?a.slice(5):a.startsWith("connector:")?h.names[a.slice(10)]??a.slice(10):void 0,t=a=>{let d=a.uses.map(r).filter(p=>!!p);return`<div class="cl-chain">${[o,a.name,...d.length?[d.join(", ")]:[]].map(f).join(' <span aria-hidden="true">\u2192</span> ')}${a.returns?"":` <span class="cl-silent">\u2014 ${i.returnsNothing}</span>`}</div>`};return`<dt>${i.flows}</dt><dd>${s.map(t).join("")}</dd>`}function Je(e){let o=h.telemetry.events.filter(a=>a.agent===e),s=h.telemetry.days,r=h.telemetry.silent.includes(e);if(!o.length&&!r)return"";let t=a=>`<div class="cl-event"><code>${f(a.name)}</code>${!s||r?"":a.fired?` <span class="cl-sub">\u2014 ${f(i.times(a.fired,s))}</span>`:` <span class="cl-silent">\u2014 ${i.notFired}</span>`}</div>`;return`<dt>${i.telemetry}</dt><dd class="cl-events">${o.map(t).join("")}${r?`<div class="cl-silent">${i.noLine}</div>`:""}</dd>`}function Ze(e){let o=h.contract.routes.filter(r=>r.caller===e);if(!o.length)return"";let s=o.map(r=>{let t=r.description.length<ie;return`<tr><td>${r.agent?f(r.agent):`<span class="cl-silent">${f(r.name??r.calls)} \u2014 ${i.notInFolder}</span>`}</td>
|
|
172
|
+
<td${r.history?"":' class="cl-silent"'}>${r.history?b.yes:b.no}</td><td>${r.inputs.length?f(r.inputs.join(", ")):'<span class="cl-silent">\u2014</span>'}</td>
|
|
173
|
+
<td${t?' class="cl-silent"':""} title="${f(r.description)}">${f(i.chars(r.description.length))}</td></tr>`}).join("");return`<div class="cl-route"><h4>${i.routing}</h4><table class="cl-routing"><thead><tr><th>${i.called}</th><th>${i.history}</th><th>${i.inputs}</th><th>${i.description}</th></tr></thead><tbody>${s}</tbody></table></div>`}function et(){let e=G.find(o=>o.key==="unused");return e?ne(e):`<section class="cl-card"><p class="cl-empty">${i.nothingUnused}</p></section>`}function tt(){let e=W.map(o=>{let s=h.agents.filter(r=>`ms:${o.id}`in r.facts||`declared:ms:${o.id}`in r.facts).map(r=>r.id);return`<tr><td><a href="${Q}/${o.id}.md" target="_blank" rel="noopener">${f(o.name)}</a></td><td>${f(o.sign??i.declaredOnly)}</td><td>${s.length?f(s.join(", ")):`<span class="cl-sub">${i.none}</span>`}</td></tr>`}).join("");return`<section class="cl-card cl-table"><table><thead><tr><th>${i.microsoft}</th><th>${i.sign}</th><th>${i.follows}</th></tr></thead><tbody>${e}</tbody></table></section>`}function nt(){let e=G.find(o=>o.key==="unknown");return e?ne(e):`<section class="cl-card"><p class="cl-empty">${i.nothingUnknown}</p></section>`}function ne(e){let o=(t,a)=>{let d=typeof t=="object"&&t?t:{v:t},p=a?"th":"td";return`<${p}${d.fill&&!a?` style="background:#${d.fill};color:#1d2330"`:""}>${f(d.v)}</${p}>`},[s,...r]=e.rows;return`<section class="cl-card cl-table" role="tabpanel"><table><thead><tr>${s.map(t=>o(t,!0)).join("")}</tr></thead><tbody>${r.map(t=>`<tr>${t.map(a=>o(a,!1)).join("")}</tr>`).join("")}</tbody></table></section>`}function K(e,o){let s=document.createElement("a");s.href=URL.createObjectURL(e),s.download=o,s.click(),setTimeout(()=>URL.revokeObjectURL(s.href),1e3)}async function ot(){let e=H.querySelector(".cl-matrix"),[o,s]=[e.scrollWidth+32,e.scrollHeight+32],r=new XMLSerializer().serializeToString(e).replace(/ picked/g,""),t=`<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${s}"><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:${o}px"><style>/* The cast map: tokens on .cl (not :root) so the PNG, drawn apart, carries them too. */
|
|
173
174
|
.cl {
|
|
174
175
|
--bg: #f6f6f3; --card: #ffffff; --ink: #1d2330; --muted: #5f6878; --line: #e2e4e8; --soft: #f3f4f1;
|
|
175
176
|
--has: #2e7d55; --off: #c8442c; --off-bg: #fde8e3; --said: #b7791f;
|
|
@@ -277,7 +278,7 @@ body { margin: 0; }
|
|
|
277
278
|
.cl-diff { font: 12.5px/1.6 ui-monospace, Menlo, monospace; }
|
|
278
279
|
.cl-del { background: var(--off-bg); color: var(--off); text-decoration: line-through; border-radius: 3px; padding: 0 2px; }
|
|
279
280
|
.cl-add { background: var(--platform-bg); color: var(--platform); border-radius: 3px; padding: 0 2px; }
|
|
280
|
-
.cl-chain { margin: 0 0 4px; }
|
|
281
|
+
.cl-chain, .cl-event { margin: 0 0 4px; }
|
|
281
282
|
.cl-silent { color: var(--off); font-weight: 600; }
|
|
282
283
|
.cl-routing { border-collapse: collapse; font-size: 12px; width: 100%; }
|
|
283
284
|
.cl-routing th, .cl-routing td { text-align: left; padding: 3px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
|
|
@@ -286,7 +287,7 @@ body { margin: 0; }
|
|
|
286
287
|
@media (max-width: 680px) { .cl-agent.wide { grid-column: auto; } }
|
|
287
288
|
.cl-route { overflow-x: auto; }
|
|
288
289
|
.cl-route h4 { margin: 6px 0 4px; font-size: 13px; color: var(--muted); }
|
|
289
|
-
</style>${r}</div></foreignObject></svg>`;try{let a=new Image;a.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`,await a.decode();let d=document.createElement("canvas");d.width=o*2,d.height=s*2;let
|
|
290
|
+
</style>${r}</div></foreignObject></svg>`;try{let a=new Image;a.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`,await a.decode();let d=document.createElement("canvas");d.width=o*2,d.height=s*2;let p=d.getContext("2d");p.scale(2,2),p.drawImage(a,0,0);let y=await new Promise(g=>d.toBlob(g,"image/png"));if(!y)throw new Error("no PNG");K(y,`${k.id}.png`)}catch{K(new Blob([t],{type:"image/svg+xml"}),`${k.id}.svg`)}}H.addEventListener("click",e=>{let o=e.target.closest("button");if(!o)return;let s=o.dataset;if(s.tab)T=s.tab;else if(s.role)I=s.role;else if(s.focus!==void 0)B=s.focus||void 0;else if(s.type!==void 0)M=s.type||void 0;else if(s.key)x={key:s.key,...s.agent?{agent:s.agent}:{}};else if(s.pattern)x={key:s.pattern};else if(s.close)x=void 0;else if(s.look){let r=P[Number(s.look)];T="map",r.fact&&(x={key:r.fact,...r.agents.length===1?{agent:r.agents[0]}:{}}),(r.key==="off"||r.key==="gap"||r.key==="conflict")&&(x=r.fact?{key:r.fact}:x),r.key==="unknown"&&(T="unknown"),r.key==="unused"&&(T="unused")}else{if(s.get==="xlsx")return K(new Blob([pe(G)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),`${k.id}.xlsx`);if(s.get==="yaml")return K(new Blob([k.castYaml],{type:"text/yaml"}),`${k.id}.cast.yaml`);if(s.get==="png")return void ot()}ge(),(s.key||s.pattern||s.look)&&H.querySelector(".cl-detail")?.scrollIntoView({block:"nearest"})});ge();})();
|
|
290
291
|
</script>
|
|
291
292
|
</body>
|
|
292
293
|
</html>
|
|
@@ -41,8 +41,8 @@ beginDialog:
|
|
|
41
41
|
|
|
42
42
|
- kind: LogCustomTelemetryEvent
|
|
43
43
|
id: logTelemetry_PcfoEN
|
|
44
|
-
eventName:
|
|
45
|
-
properties: "={Agente: \"bodega-cupons\", ErrorMessage: System.Error.Message, ErrorCode: System.Error.Code, TimeUTC: Topic.CurrentTime
|
|
44
|
+
eventName: bodega_cupons_onerror
|
|
45
|
+
properties: "={Agente: \"bodega-cupons\", ErrorMessage: System.Error.Message, ErrorCode: System.Error.Code, TimeUTC: Topic.CurrentTime}"
|
|
46
46
|
|
|
47
47
|
- kind: CancelAllDialogs
|
|
48
48
|
id: cancelAllDialogs_7DG56T
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Agente;KPI;Dono
|
|
2
|
+
Bodega Azul - Pedidos;pedido localizado em até 2 trocas de mensagem;Squad Pedidos
|
|
3
|
+
Bodega Azul - Devoluções;troca aberta sem atendente em 80% dos casos;Squad Pós-venda
|
|
4
|
+
Bodega Azul - Frete;cotação em menos de 5 s;Squad Logística
|
|
5
|
+
Bodega Azul - Cupons;cupom validado na primeira tentativa;Squad Promoções
|
|
6
|
+
Bodega Azul - Loja Física;;Squad Lojas
|
|
7
|
+
Sobre a Bodega Azul;respostas gerais sem encaminhar;Squad Atendimento
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Item name,Item type,Schema name,Owner,Environment,Created on,Last published
|
|
2
|
+
Bodega Azul - Orquestrador,Agent,cr7b2_bodegaOrquestrador,atendimento@bodegaazul.example,Bodega Azul (Produção),2026-03-02,2026-10-28
|
|
3
|
+
Bodega Azul - Pedidos,Agent,cr7b2_bodegaPedidos,pedidos@bodegaazul.example,Bodega Azul (Produção),2026-03-05,2026-10-21
|
|
4
|
+
Bodega Azul - Devoluções,Agent,cr7b2_bodegaDevolucoes,trocas@bodegaazul.example,Bodega Azul (Produção),2026-03-05,2026-10-14
|
|
5
|
+
Bodega Azul - Frete,Agent,cr7b2_bodegaFrete,frete@bodegaazul.example,Bodega Azul (Produção),2026-03-09,2026-09-30
|
|
6
|
+
Bodega Azul - Cupons,Agent,cr7b2_bodegaCupons,,Bodega Azul (Produção),2026-03-12,2026-10-02
|
|
7
|
+
Bodega Azul - Loja Física,Agent,cr7b2_bodegaLojaFisica,loja@bodegaazul.example,Bodega Azul (Produção),2026-04-01,
|
|
8
|
+
Bodega Azul - Fidelidade,Agent,cr7b2_bodegaFidelidade,fidelidade@bodegaazul.example,Bodega Azul (Testes),2026-08-20,
|
|
9
|
+
Painel de Pedidos,Canvas app,,pedidos@bodegaazul.example,Bodega Azul (Produção),2026-02-11,
|
|
10
|
+
Abrir chamado no ERP,Agent flow,,pedidos@bodegaazul.example,Bodega Azul (Produção),2026-03-05,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
agente,evento,vezes
|
|
2
|
+
Bodega Azul - Orquestrador,TopicStart,1840
|
|
3
|
+
Bodega Azul - Orquestrador,BodegaOrquestrador_OnError,12
|
|
4
|
+
Bodega Azul - Pedidos,TopicStart,610
|
|
5
|
+
Bodega Azul - Pedidos,BodegaPedidos_OnError,7
|
|
6
|
+
Bodega Azul - Devoluções,TopicStart,402
|
|
7
|
+
Bodega Azul - Devoluções,BodegaDevolucoes_OnError,3
|
|
8
|
+
Bodega Azul - Frete,TopicStart,355
|
|
9
|
+
Bodega Azul - Cupons,TopicStart,290
|
|
10
|
+
Bodega Azul - Cupons,bodega_cupons_onerror,5
|
|
@@ -35,6 +35,15 @@ decisions: # what the team decided about a pattern
|
|
|
35
35
|
|
|
36
36
|
## The workbook back
|
|
37
37
|
|
|
38
|
+
## A spreadsheet from outside
|
|
39
|
+
|
|
40
|
+
`--declared <table.csv|.xlsx>` (more than once is fine) reads a table the team already has — the admin center's
|
|
41
|
+
inventory download, the team's list — and proposes a `declared:` line per agent and column, with the source
|
|
42
|
+
`<file> › line <n>` (`<file> › <sheet> › line <n>` for an .xlsx). The agent's column is found by its values; the key is
|
|
43
|
+
the column's title in lower case with `-` (`Linha de base` → `linha-de-base`; `Dono`/`Owner` → `owner`, `KPI`/`Indicador`
|
|
44
|
+
→ `kpi`). Listed with keys (`d1`…), written with `--take`, like the workbook below. Two tables saying the same key of
|
|
45
|
+
the same agent: the later one holds.
|
|
46
|
+
|
|
38
47
|
In Excel, fill the **Declared** sheet (who, key, value, source) and the **Decision** column of **Patterns** (`accepted` /
|
|
39
48
|
`aceito`, `rejected` / `rejeitado`; **Scope** and **Why** beside it). Then:
|
|
40
49
|
|
|
@@ -73,5 +82,11 @@ routing description), `file` and `line` — and every agent has `flows`: `id` (t
|
|
|
73
82
|
| `orphan:topic:<name>`, `orphan:action:<name>`, `orphan:variable:<name>`, `orphan:flow:<name>` | the one that has it | nothing can reach it (see SKILL.md, step 2) |
|
|
74
83
|
| `disabled:node:<kind>`, `disabled:<topic\|action\|variable\|knowledge>:<name>` | the one that has it | `disabled: true` on a node; `state` or `status: Inactive` on a component |
|
|
75
84
|
|
|
85
|
+
| `telemetry:event:<form>` | the one that logs it | a `LogCustomTelemetryEvent` node; the form is its `eventName` with the agent's own name as `{agent}` (part of `node:LogCustomTelemetryEvent`) |
|
|
86
|
+
| `telemetry:field:<form>/<field>` | the same | each field of the node's `properties` record (part of its event) |
|
|
87
|
+
|
|
88
|
+
Every agent also has `telemetry` in `<id>.facts.json`: `name` (as written), `form`, `fields` (absent when the record is
|
|
89
|
+
a formula), `file` and `line`. An event spelt another way counts as the most common form in the comparison.
|
|
90
|
+
|
|
76
91
|
The contract's facts cite the orchestrator's file (`<orchestrator>/actions/X.mcs.yml`). `orphan:` and `disabled:` are
|
|
77
92
|
never a pattern nor a solo, and what an unused flow calls is not a fact.
|
|
@@ -85,6 +85,8 @@ Every fact cast-list finds is a key. The keys below have a name; any other key k
|
|
|
85
85
|
| `orphan:variable:<value>` | Variable nobody uses <value> | Variável que ninguém usa <valor> |
|
|
86
86
|
| `orphan:flow:<value>` | Flow nobody calls <value> | Fluxo que ninguém chama <valor> |
|
|
87
87
|
| `disabled:node:<value>` | Switched-off node <value> | Nó desligado <valor> |
|
|
88
|
+
| `telemetry:event:<value>` | Logs the event <value> | Registra o evento <valor> |
|
|
89
|
+
| `telemetry:field:<value>` | The event carries the field (<event>/<field>) <value> | O evento leva o campo (<evento>/<campo>) <valor> |
|
|
88
90
|
| `disabled:<value>` | Switched off <value> | Desligado <valor> |
|
|
89
91
|
| `node:<value>` | Node <value> | Nó <valor> |
|
|
90
92
|
| `model:<value>` | Model <value> | Modelo <valor> |
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# What fired: the export of Application Insights
|
|
2
|
+
|
|
3
|
+
The YAML shows what an agent **should** log (`LogCustomTelemetryEvent`). What it **does** log is in Application
|
|
4
|
+
Insights, when the agent is connected to it (Copilot Studio › Settings › Advanced › Application Insights). cast-list
|
|
5
|
+
never reads it over the network: the person runs one query and exports the result, and the analysis reads the file.
|
|
6
|
+
|
|
7
|
+
## The query
|
|
8
|
+
|
|
9
|
+
In the Application Insights resource, open **Logs**, paste this, and export the result (**Export › CSV**):
|
|
10
|
+
|
|
11
|
+
```kusto
|
|
12
|
+
customEvents
|
|
13
|
+
| where timestamp > ago(30d)
|
|
14
|
+
| where tostring(customDimensions['designMode']) == "False"
|
|
15
|
+
| summarize vezes = count() by agente = cloud_RoleInstance, evento = name
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
- `designMode` leaves out the conversations of the test panel.
|
|
19
|
+
- `cloud_RoleInstance` is the agent's name in the default telemetry. When the team puts the agent's name in a field of
|
|
20
|
+
its own events (such as `Agente`), use that instead: `agente = tostring(customDimensions['Agente'])`. cast-list finds
|
|
21
|
+
the agent's column by its values (the schema name, the folder or the display name), not by its title.
|
|
22
|
+
- Change `30d` to the period you want, and pass the same number with `--telemetry-days`.
|
|
23
|
+
- **Export only these three columns.** Never add `text`, `fromName`, `user_Id` or any other column with what people
|
|
24
|
+
said or who they are: cast-list reads only the agent, the event and the times, and the rest has no place in the file.
|
|
25
|
+
|
|
26
|
+
## Run
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
node scripts/build.mjs <agents-folder> --all --telemetry eventos.csv [--telemetry-days 30] [--lang pt]
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
The file is read on this run only (it is not kept in the cast file): pass it again on the next one.
|
|
33
|
+
|
|
34
|
+
- «O evento «X» de y não disparou em 30 dias» — the event is in y's YAML, y has lines in the export, and none is X.
|
|
35
|
+
- «y não tem nenhuma linha na telemetria: está ligado ao Application Insights?» — y is not in the export at all.
|
|
36
|
+
- An event of the export that no YAML has — Copilot Studio's own (`TopicStart`, `BotMessageReceived`…) — is left out.
|
|
37
|
+
|
|
38
|
+
The map's Cast tab shows each agent's events with the times they fired, and the workbook's **Telemetry** sheet has a
|
|
39
|
+
column with the times.
|