house-lights 1.5.0 → 1.6.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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "house-lights",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.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": {
|
|
@@ -39,7 +39,12 @@ body { margin: 0; }
|
|
|
39
39
|
.cl-get { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); font-size: 13px; }
|
|
40
40
|
.cl-look { background: var(--amber-bg); border: 1px solid var(--amber-line); border-radius: 12px; padding: 12px 16px; }
|
|
41
41
|
.cl-look h2 { margin: 0 0 6px; font-size: 12px; color: var(--amber); letter-spacing: .06em; text-transform: uppercase; }
|
|
42
|
-
.cl-
|
|
42
|
+
.cl-group + .cl-group { margin-top: 4px; }
|
|
43
|
+
.cl-look .cl-group-head { font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
|
|
44
|
+
.cl-look .cl-group-head:hover { text-decoration: none; color: var(--amber); }
|
|
45
|
+
.cl-caret { width: 1em; color: var(--amber); }
|
|
46
|
+
.cl-count { font-weight: 500; font-size: 12px; color: var(--amber); background: var(--card); border: 1px solid var(--amber-line); border-radius: 999px; padding: 0 7px; }
|
|
47
|
+
.cl-look ul { margin: 2px 0 6px; padding-left: 36px; }
|
|
43
48
|
.cl-look li { padding: 1px 0; }
|
|
44
49
|
.cl-look button { background: none; border: 0; padding: 0; text-align: left; }
|
|
45
50
|
.cl-look button:hover { text-decoration: underline; }
|
|
@@ -128,7 +133,7 @@ body { margin: 0; }
|
|
|
128
133
|
<body>
|
|
129
134
|
<div class="cl" id="app"></div>
|
|
130
135
|
<script type="application/json" id="cast">{{CAST}}</script>
|
|
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"?>
|
|
136
|
+
<script>(()=>{var J="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 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"}},ie={"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"]}}},De=Object.fromEntries(W.map(e=>[e.id,e.name])),Ae=[["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:"]],le=e=>Ae.find(([n])=>e.startsWith(n));function F(e){return e.startsWith("reaches:")?F(`trigger:${e.slice(8)}`):ie[e]?.dim??le(e)?.[1]??"governance"}var ce=80;function Z(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,n)=>e.split("{agent}").join(n==="pt"?"\u2039nome\u203A":"\u2039name\u203A"),Me=e=>({form:e.slice(16,e.lastIndexOf("/")),field:e.slice(e.lastIndexOf("/")+1)}),re=(e,n)=>n?.[e]??e;function C(e,n,s){let r=ie[e];if(r)return r[n];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} (${n==="pt"?"varia\xE7\xE3o":"variation"})`:g}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[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)}`,n);return n==="pt"?`Um t\xF3pico leva a \xAB${p}\xBB`:`A topic leads to \xAB${p}\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${A(e.slice(16),n)}\xBB`:`Logs the event \xAB${A(e.slice(16),n)}\xBB`;if(e.startsWith("telemetry:field:")){let{form:p,field:y}=Me(e),g=A(p,n);return n==="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 n==="pt"?`${p} ${p===1?"fonte":"fontes"} de conhecimento`:`${p} knowledge ${p===1?"source":"sources"}`}let a=le(e);if(!a)return e;let d=e.slice(a[0].length);if(a[0]==="ms:"&&(d=De[d]??d),a[0]==="auth:"&&d==="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(a[0])&&(d=re(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=`${re(p,s)} \xB7 ${y}`}return`${a[n==="pt"?3:2]} ${d}`}var Ie={specialist:{en:["specialist","specialists"],pt:["especialista","especialistas"]},orchestrator:{en:["orchestrator","orchestrators"],pt:["orquestrador","orquestradores"]}},ee=(e,n,s)=>Ie[e][n][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"}}};var de=[{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"]}],gt=de.flatMap(e=>e.keys);function V(e){return de.map(n=>({key:n.key,en:n.en,pt:n.pt,folded:!!n.folded,looks:e.flatMap((s,r)=>n.keys.includes(s.key)?[{look:s,at:r}]:[])})).filter(n=>n.looks.length)}function _(e){let n=t=>e.offPattern.some(a=>a.key===t.key||a.partOf===t.key),s=t=>t.share===1&&!t.decision&&!n(t),r=e.patterns.filter(t=>!t.partOf);return{look:r.filter(t=>!s(t)),everyone:r.filter(s)}}var pe=new TextEncoder,te=e=>e.replace(/[&<>"]/g,n=>({"&":"&","<":"<",">":">",'"':"""})[n]).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),Le=e=>e.replace(/[:\\/?*[\]]/g," ").slice(0,31)||"Sheet";function Ee(e){let n=[{}],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}=$,P=s(R);r.has(P)||(r.set(P,n.length),n.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=n.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
137
|
<styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
|
|
133
138
|
<fonts count="${g.length}">${g.join("")}</fonts>
|
|
134
139
|
<fills count="${m.length}">${m.join("")}</fills>
|
|
@@ -136,41 +141,41 @@ body { margin: 0; }
|
|
|
136
141
|
<cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs>
|
|
137
142
|
<cellXfs count="${y.length}">${y.join("")}</cellXfs>
|
|
138
143
|
<cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles>
|
|
139
|
-
</styleSheet>`,styleOf:l=>typeof l=="object"?r.get(s((({v:c,...$})=>$)(l)))??0:0}}function
|
|
144
|
+
</styleSheet>`,styleOf:l=>typeof l=="object"?r.get(s((({v:c,...$})=>$)(l)))??0:0}}function Pe(e,n){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=n(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">${te(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
145
|
<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">
|
|
141
146
|
<dimension ref="A1:${t}"/><sheetViews><sheetView workbookViewId="0">${a}</sheetView></sheetViews><sheetFormatPr defaultRowHeight="15"/>${d}<sheetData>${r.join("")}</sheetData>${p}
|
|
142
|
-
</worksheet>`}function
|
|
147
|
+
</worksheet>`}function me(e){let{xml:n,styleOf:s}=Ee(e),r=e.map(d=>Le(d.name)),t=e.map((d,p)=>d.header&&d.rows.length>1?`<definedName name="_xlnm._FilterDatabase" localSheetId="${p}" hidden="1">'${te(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
148
|
<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
149
|
<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,p)=>`<sheet name="${
|
|
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??
|
|
150
|
+
<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="${te(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"?>
|
|
151
|
+
<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",n],...e.map((d,p)=>[`xl/worksheets/sheet${p+1}.xml`,Pe(d,s)])];return qe(a.map(([d,p])=>[d,pe.encode(p)]))}var Ue=(()=>{let e=new Uint32Array(256);for(let n=0;n<256;n++){let s=n;for(let r=0;r<8;r++)s=s&1?3988292384^s>>>1:s>>>1;e[n]=s>>>0}return e})();function We(e){let n=4294967295;for(let s=0;s<e.length;s++)n=Ue[(n^e[s])&255]^n>>>8;return(n^4294967295)>>>0}function qe(e){let n=[],s=[],r=0;for(let[g,m]of e){let v=pe.encode(g),l=We(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),n.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=[...n,...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 ue=e=>me(e),Ve={bold:!0,fill:"E8EEF7"},_e={v:"\u25CF",fill:"DDF3E6",center:!0},Be={v:"\xD7",fill:"FFD5CC",center:!0,bold:!0},ze={v:"\u25D0",fill:"FFF3C4",center:!0},Ge={v:"\u2248",fill:"FFF6DC",center:!0,bold:!0},fe=Object.keys(D);function he(e,n,s,r="en"){let t=q[r],a=(o,u,k)=>({key:o,name:t[o],header:!0,columns:u.map(([N,U])=>({title:N,width:U})),rows:[u.map(([N])=>({v:N,...Ve})),...k]}),d=o=>t[e.roles[o]],p=o=>o.startsWith("type:")?`${t.type}:${e.typeNames[o.slice(5)]??o.slice(5)}`:t[o],y=o=>(e.types[o]??[]).map(u=>e.typeNames[u]??u).join(" \xB7 "),g=o=>C(o,r,e.names),m=[...e.agents].sort((o,u)=>o.role===u.role?o.id.localeCompare(u.id):o.role==="orchestrator"?-1:1),v=[...new Set([...m.flatMap(o=>Object.keys(o.facts)),...e.patterns.map(o=>o.key)])].filter(o=>!o.endsWith("~variant")).sort((o,u)=>fe.indexOf(F(o))-fe.indexOf(F(u))||o.localeCompare(u)),l=new Set(e.offPattern.map(o=>`${o.agent} ${o.key}`)),c=o=>e.agents.filter(u=>u.role===o).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(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},""],...V(n).flatMap(o=>[[{v:`${o[r]} \xB7 ${o.looks.length}`,bold:!0},""],...o.looks.map(({look:u})=>["",{v:u[r],wrap:!0}])])]},S=a("matrix",[[t.dimension,18],[t.fact,40],[t.key,34],...m.map(o=>[o.id,14])],v.map(o=>[D[F(o)][r],g(o),o,...m.map(u=>o in u.facts?o.startsWith("declared:")?ze:_e:`${o}~variant`in u.facts?Ge:l.has(`${u.id} ${o}`)?Be:"")])),{look:R,everyone:P}=_(e),we=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(o=>{let u=e.offPattern.filter(k=>k.key===o.key).map(k=>k.agent);return[o.key,g(o.key),p(o.scope),t[o.role],`${Math.round(o.share*100)}%`,o.agents.join(", "),u.join(", "),o.decision?t[o.decision.status==="accepted"?"accept":"reject"]:"",o.decision?.why??""]})),be=a("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,d(o.agent),g(o.key),o.key,p(o.scope),e.patterns.find(u=>u.key===o.key)?.decision?.status==="accepted"?t.yes:""])),xe=a("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(", ")])),Oe=a("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,g(o.key),o.key,o.declared,o.source,o.observed?t.yes:t.no])),Se=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(o=>[o.id,o.displayName??"",t[o.role],y(o.id),Object.keys(o.facts).length,e.offPattern.filter(u=>u.agent===o.id).map(u=>g(u.key)).join("; "),e.solos.filter(u=>u.agents[0]===o.id).map(u=>g(u.key)).join("; "),o.children.map(u=>u.name).join(", "),e.unknown.filter(u=>u.agent===o.id).length||""])),Te=a("evidence",[[t.agent,30],[t.fact,40],[t.key,34],[t.file,50],[t.line,8]],m.flatMap(o=>[{who:o.id,facts:o.facts},...o.children.map(u=>({who:`${o.id} \u203A ${u.name}`,facts:u.facts}))]).flatMap(({who:o,facts:u})=>Object.entries(u).sort(([k],[N])=>k.localeCompare(N)).flatMap(([k,N])=>N.map(U=>[o,g(k),k,U.file,U.line??""])))),Ce=a("declared",[[t.agent,24],[t.key,34],[t.value,40],[t.source,40]],s.declared.map(o=>[o.agent,o.key,o.value,o.source])),je=a("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(([u],[k])=>u.localeCompare(k)).map(([u,k])=>`${u} (${Math.round(k.similarity*100)}%)`).join(", "),o.official?t.yes:""])),Re=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(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}`:""}`])),X=e.telemetry.days,Fe=a("telemetry",[[t.agent,24],[t.written,30],[t.form,28],[t.fields,50],[t.file,44],...X?[[t.fired(X),16]]:[]],e.telemetry.events.map(o=>[o.agent,o.name,A(o.as,r),o.fields?o.fields.join(", "):t.notRead,`${o.file}${o.line?`:${o.line}`:""}`,...X?[o.fired===void 0||e.telemetry.silent.includes(o.agent)?"\u2014":o.fired===0?{v:0,color:"B42318",bold:!0}:o.fired]:[]])),Ne=a("unused",[[t.agent,24],[t.what,16],[t.name,30],[t.how,14],[t.file,50]],e.unused.flatMap(o=>o.sources.map(u=>[o.agent,t.thing[o.what]??o.what,e.names[o.name]??o.name,t[o.how],`${u.file}${u.line?`:${u.line}`:""}`]))),ae=[$,S,we,...e.blocks.length?[je]:[],...e.contract.routes.length?[Re]:[],...e.telemetry.events.length?[Fe]:[],be,xe,Oe,...e.unused.length?[Ne]:[],Se,Te,Ce];return e.unknown.length&&ae.push(a("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??""]))),ae}var He={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,s)=>`${e} of ${n} ${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,n,s,r,t)=>`${e} in the cast \xB7 ${n} 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,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,s)=>`${e} de ${n} ${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,n,s,r,t)=>`${e} no elenco \xB7 ${n} 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,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`}},x=JSON.parse(document.getElementById("cast").textContent),{result:h,lang:b,looks:L}=x,i=He[b],w=q[b],Q=he(h,L,x.cast,b);document.documentElement.lang=b==="pt"?"pt-BR":"en";document.title=h.name??x.id;var f=e=>String(e??"").replace(/[&<>"']/g,n=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[n]),j=e=>f(C(e,b,h.names)),B=[...h.agents].sort((e,n)=>e.role===n.role?e.id.localeCompare(n.id):e.role==="orchestrator"?-1:1),ne=e=>h.patterns.find(n=>n.key===e),ge=e=>[...new Set(h.offPattern.filter(n=>n.key===e||n.partOf===e).map(n=>n.agent))],$e=e=>e.startsWith("type:")?h.typeNames[e.slice(5)]??e.slice(5):w[e],ye=e=>e.startsWith("type:")?"type":e,H=Object.keys(h.typeNames),Ke=e=>e.startsWith("text:block:")?h.blocks.find(n=>`text:block:${n.id}`===e):void 0,oe=e=>{let n=ne(e);if(!n)return"";let s=n.decision?`<span class="cl-badge ${n.decision.status}">${f(w[n.decision.status==="accepted"?"accept":"reject"])}</span>`:"";return`${n.official?`<span class="cl-badge official">${i.official}</span>`:""}<span class="cl-badge ${ye(n.scope)}">${i.pattern} \xB7 ${f($e(n.scope))}</span>${s}`},T="map",O,M="all",z,I,K=document.getElementById("app"),ve=V(L),G=new Set(ve.filter(e=>!e.folded).map(e=>e.key));function ke(){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)]],n=new Set(h.offPattern.map(s=>s.agent)).size;K.innerHTML=`<div class="cl-wrap">
|
|
152
|
+
<header><h1 class="cl-title">${f(h.name??x.id)}</h1><p class="cl-sub">${i.summary(h.agents.length,h.patterns.length,n,L.filter(s=>s.key==="solo").length,Math.round(x.threshold*100))}</p><p class="cl-private">${f(w.privacy)}</p></header>
|
|
148
153
|
<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
154
|
<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"?
|
|
155
|
+
${T==="map"?Ye():T==="patterns"?se(Q.find(s=>s.key==="patterns")):T==="cast"?et():T==="microsoft"?at():T==="unused"?st():rt()}
|
|
151
156
|
<p class="cl-foot">${i.foot}</p>
|
|
152
|
-
</div>`}function
|
|
153
|
-
${
|
|
154
|
-
${
|
|
155
|
-
${d.length?`<span class="cl-lack">${i.lacks}: ${f(d.join(", "))}</span>`:""}<span>${i.decision}: ${t.decision?`${f(
|
|
156
|
-
${
|
|
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(
|
|
158
|
-
${s?`<div>${
|
|
157
|
+
</div>`}function Ye(){let e=s=>{let r=G.has(s.key),t=r?`<ul id="cl-group-${s.key}">${s.looks.map(({look:a,at:d})=>`<li><button data-look="${d}">${f(a[b])}</button></li>`).join("")}</ul>`:"";return`<div class="cl-group"><button class="cl-group-head" data-group="${s.key}" aria-expanded="${r}" aria-controls="cl-group-${s.key}"><span class="cl-caret">${r?"\u25BE":"\u25B8"}</span>${f(s[b])} <span class="cl-count">${s.looks.length}</span></button>${t}</div>`};return`${L.length?`<section class="cl-look"><h2>${f(w.look)} \xB7 ${L.length}</h2>${ve.map(e).join("")}</section>`:""}<div class="cl-body${O?" with-detail":""}"><div class="cl-wrap" style="gap:16px">${Xe()}${Je()}</div>${O?`<aside class="cl-card cl-detail" aria-live="polite">${Ze()}</aside>`:""}</div>`}function Qe(){let e=t=>M==="all"||t.role===M;if(!H.length)return[{id:"",name:"",cols:B.filter(e).map(t=>({a:t,also:[]}))}];let n=t=>h.types[t]??[],s=B.filter(t=>t.role==="specialist"&&e(t));return[{id:"orchestrator",name:w.orchestrator,cols:B.filter(t=>t.role==="orchestrator"&&e(t)).map(t=>({a:t,also:[]}))},...H.map(t=>({id:t,name:h.typeNames[t],cols:s.filter(a=>n(a.id).includes(t)).map(a=>({a,also:n(a.id).filter(d=>d!==t).map(d=>h.typeNames[d]??d)}))})),{id:"-",name:i.noType,cols:s.filter(t=>!n(t.id).length).map(t=>({a:t,also:[]}))}].filter(t=>t.cols.length&&(!I||t.id===I))}function Xe(){let e=Qe(),n=e.flatMap(m=>m.cols),s=x.focusAreas.find(m=>m.id===z),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",M==="all",i.all)}${a("data-role","specialist",M==="specialist",w.specialist)}${a("data-role","orchestrator",M==="orchestrator",w.orchestrator)}
|
|
158
|
+
${H.length?`<span style="margin-left:10px">${i.type}:</span> ${a("data-type","",!I,i.all)}${H.map(m=>a("data-type",m,I===m,h.typeNames[m])).join("")}${a("data-type","-",I==="-",i.noType)}`:""}
|
|
159
|
+
${x.focusAreas.length?`<span style="margin-left:10px">${i.focus}:</span> ${a("data-focus","",!z,i.all)}${x.focusAreas.map(m=>a("data-focus",m.id,z===m.id,m.name)).join("")}`:""}</div>`,p="";for(let m of Object.keys(D)){let v=c=>Z(c)?`${C(Z(c),b,h.names)}${C(c,b,h.names)}`:C(c,b,h.names),l=r.filter(c=>F(c)===m).sort((c,$)=>v(c).localeCompare(v($)));l.length&&(p+=`<tr class="cl-dim"><td colspan="${n.length+1}">${f(D[m][b])}</td></tr>`,p+=l.map(c=>`<tr><th scope="row" style="text-align:left;font-weight:400"><button class="cl-fact${O?.key===c&&!O.agent?" picked":""}" data-key="${f(c)}">${j(c)}</button>${oe(c)}</th>${n.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=n.map(({a:m,also:v})=>`<th scope="col">${f(m.id)}<small>${f(v.length?`${i.alsoIn} ${v.join(", ")}`:w[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 Je(){let{look:e,everyone:n}=_(h),s=r=>{let t=ne(r),a=h.agents.filter(p=>p.role===t.role).length,d=ge(r);return`<button class="cl-pattern${O?.key===r?" picked":""}" data-pattern="${f(r)}"><b>${j(r)}</b><span>${oe(r)} ${i.of(t.agents.filter(p=>h.roles[p]===t.role).length,a,ee(t.role,b,a))}</span>
|
|
160
|
+
${d.length?`<span class="cl-lack">${i.lacks}: ${f(d.join(", "))}</span>`:""}<span>${i.decision}: ${t.decision?`${f(w[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>'}
|
|
161
|
+
${n.length?`<details class="cl-everyone"><summary>${i.everyone(n.length)}</summary><ul>${n.map(r=>`<li><button class="cl-fact" data-pattern="${f(r.key)}">${j(r.key)}</button> <span class="cl-badge ${ye(r.scope)}">${f($e(r.scope))}</span></li>`).join("")}</ul></details>`:""}</section>`}function Ze(){let{key:e,agent:n}=O,s=ne(e),t=h.agents.filter(l=>e in l.facts&&(!n||l.id===n)).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=ge(e).filter(l=>!n||l===n),d=h.solos.some(l=>l.key===e),p=h.orchestratorDoes.some(l=>l.key===e),y=Ke(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])=>!n||l===n):[],v=y?`<div><b>${i.text}</b><pre class="cl-text">${f(y.text)}</pre></div>
|
|
162
|
+
${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(D[F(e)][b])}</span><h3>${j(e)}</h3><code>${f(e)}</code>
|
|
163
|
+
${s?`<div>${oe(e)}</div><div>${i.decision}: ${s.decision?`${f(w[s.decision.status==="accepted"?"accept":"reject"])}${s.decision.why?` \u2014 ${f(s.decision.why)}`:""}`:`<i>${i.toDecide}</i>`}</div>`:""}
|
|
159
164
|
${d?`<div>${i.alone}</div>`:p?`<div>${i.orchestratorDoes}</div>`:""}
|
|
160
165
|
${v}
|
|
161
166
|
<div><b>${i.who}</b>${t?`<ul>${t}</ul>`:` \u2014 ${i.none}`}</div>
|
|
162
167
|
${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
|
|
168
|
+
${a.length?`<div><b>${i.lacks}</b>: <span style="color:var(--off)">${f(a.join(", "))}</span></div>`:""}`}function et(){return`<div class="cl-agents">${B.map(e=>{let n=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=ot(e.id);return`<section class="cl-card cl-agent${t?" wide":""}"><span class="cl-kicker">${f(w[e.role])}</span><h3>${f(e.id)}</h3>${e.displayName?`<code>${f(e.displayName)}</code>`:""}<dl>
|
|
164
169
|
${(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
170
|
<dt>${i.facts}</dt><dd>${Object.keys(e.facts).length}</dd>
|
|
166
|
-
${
|
|
171
|
+
${n.length?`<dt>${i.off}</dt><dd class="cl-lack">${n.map(a=>j(a.key)).join("<br>")}</dd>`:""}
|
|
167
172
|
${s.length?`<dt>${i.solo}</dt><dd>${s.map(a=>j(a.key)).join("<br>")}</dd>`:""}
|
|
168
|
-
${
|
|
169
|
-
${
|
|
173
|
+
${tt(e.id,e.displayName??e.id)}
|
|
174
|
+
${nt(e.id)}
|
|
170
175
|
${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(
|
|
172
|
-
<td${r.history?"":' class="cl-silent"'}>${r.history?
|
|
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
|
|
176
|
+
${r.length?`<dt>${f(w.unknown)}</dt><dd>${r.map(a=>f(a.file)).join("<br>")}</dd>`:""}</dl>${t}</section>`}).join("")}</div>`}function tt(e,n){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">${[n,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 nt(e){let n=h.telemetry.events.filter(a=>a.agent===e),s=h.telemetry.days,r=h.telemetry.silent.includes(e);if(!n.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">${n.map(t).join("")}${r?`<div class="cl-silent">${i.noLine}</div>`:""}</dd>`}function ot(e){let n=h.contract.routes.filter(r=>r.caller===e);if(!n.length)return"";let s=n.map(r=>{let t=r.description.length<ce;return`<tr><td>${r.agent?f(r.agent):`<span class="cl-silent">${f(r.name??r.calls)} \u2014 ${i.notInFolder}</span>`}</td>
|
|
177
|
+
<td${r.history?"":' class="cl-silent"'}>${r.history?w.yes:w.no}</td><td>${r.inputs.length?f(r.inputs.join(", ")):'<span class="cl-silent">\u2014</span>'}</td>
|
|
178
|
+
<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 st(){let e=Q.find(n=>n.key==="unused");return e?se(e):`<section class="cl-card"><p class="cl-empty">${i.nothingUnused}</p></section>`}function at(){let e=W.map(n=>{let s=h.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="${J}/${n.id}.md" target="_blank" rel="noopener">${f(n.name)}</a></td><td>${f(n.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 rt(){let e=Q.find(n=>n.key==="unknown");return e?se(e):`<section class="cl-card"><p class="cl-empty">${i.nothingUnknown}</p></section>`}function se(e){let n=(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=>n(t,!0)).join("")}</tr></thead><tbody>${r.map(t=>`<tr>${t.map(a=>n(a,!1)).join("")}</tr>`).join("")}</tbody></table></section>`}function Y(e,n){let s=document.createElement("a");s.href=URL.createObjectURL(e),s.download=n,s.click(),setTimeout(()=>URL.revokeObjectURL(s.href),1e3)}async function it(){let e=K.querySelector(".cl-matrix"),[n,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="${n}" 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:${n}px"><style>/* The cast map: tokens on .cl (not :root) so the PNG, drawn apart, carries them too. */
|
|
174
179
|
.cl {
|
|
175
180
|
--bg: #f6f6f3; --card: #ffffff; --ink: #1d2330; --muted: #5f6878; --line: #e2e4e8; --soft: #f3f4f1;
|
|
176
181
|
--has: #2e7d55; --off: #c8442c; --off-bg: #fde8e3; --said: #b7791f;
|
|
@@ -203,7 +208,12 @@ body { margin: 0; }
|
|
|
203
208
|
.cl-get { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); font-size: 13px; }
|
|
204
209
|
.cl-look { background: var(--amber-bg); border: 1px solid var(--amber-line); border-radius: 12px; padding: 12px 16px; }
|
|
205
210
|
.cl-look h2 { margin: 0 0 6px; font-size: 12px; color: var(--amber); letter-spacing: .06em; text-transform: uppercase; }
|
|
206
|
-
.cl-
|
|
211
|
+
.cl-group + .cl-group { margin-top: 4px; }
|
|
212
|
+
.cl-look .cl-group-head { font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
|
|
213
|
+
.cl-look .cl-group-head:hover { text-decoration: none; color: var(--amber); }
|
|
214
|
+
.cl-caret { width: 1em; color: var(--amber); }
|
|
215
|
+
.cl-count { font-weight: 500; font-size: 12px; color: var(--amber); background: var(--card); border: 1px solid var(--amber-line); border-radius: 999px; padding: 0 7px; }
|
|
216
|
+
.cl-look ul { margin: 2px 0 6px; padding-left: 36px; }
|
|
207
217
|
.cl-look li { padding: 1px 0; }
|
|
208
218
|
.cl-look button { background: none; border: 0; padding: 0; text-align: left; }
|
|
209
219
|
.cl-look button:hover { text-decoration: underline; }
|
|
@@ -287,7 +297,7 @@ body { margin: 0; }
|
|
|
287
297
|
@media (max-width: 680px) { .cl-agent.wide { grid-column: auto; } }
|
|
288
298
|
.cl-route { overflow-x: auto; }
|
|
289
299
|
.cl-route h4 { margin: 6px 0 4px; font-size: 13px; color: var(--muted); }
|
|
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=
|
|
300
|
+
</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=n*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");Y(y,`${x.id}.png`)}catch{Y(new Blob([t],{type:"image/svg+xml"}),`${x.id}.svg`)}}K.addEventListener("click",e=>{let n=e.target.closest("button");if(!n)return;let s=n.dataset;if(s.tab)T=s.tab;else if(s.role)M=s.role;else if(s.focus!==void 0)z=s.focus||void 0;else if(s.type!==void 0)I=s.type||void 0;else if(s.key)O={key:s.key,...s.agent?{agent:s.agent}:{}};else if(s.pattern)O={key:s.pattern};else if(s.close)O=void 0;else if(s.group)G.has(s.group)?G.delete(s.group):G.add(s.group);else if(s.look){let r=L[Number(s.look)];T="map",r.fact&&(O={key:r.fact,...r.agents.length===1?{agent:r.agents[0]}:{}}),(r.key==="off"||r.key==="gap"||r.key==="conflict")&&(O=r.fact?{key:r.fact}:O),r.key==="unknown"&&(T="unknown"),r.key==="unused"&&(T="unused")}else{if(s.get==="xlsx")return Y(new Blob([ue(Q)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),`${x.id}.xlsx`);if(s.get==="yaml")return Y(new Blob([x.castYaml],{type:"text/yaml"}),`${x.id}.cast.yaml`);if(s.get==="png")return void it()}ke(),(s.key||s.pattern||s.look)&&K.querySelector(".cl-detail")?.scrollIntoView({block:"nearest"})});ke();})();
|
|
291
301
|
</script>
|
|
292
302
|
</body>
|
|
293
303
|
</html>
|
|
@@ -25,7 +25,7 @@ import { existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from 'no
|
|
|
25
25
|
import { basename, dirname, join, resolve } from 'node:path'
|
|
26
26
|
import { fileURLToPath } from 'node:url'
|
|
27
27
|
import { runPage } from './browser.mjs'
|
|
28
|
-
import { agentsIn, applyChanges, compare, declaredFrom, DEFAULT_PROFILE, extractAgent, firedFrom, fromSheets, mergeDeclared, knownKinds, labelOf, lessonOf, problemText, readCast, readCsv, readProfile, reviewCast, validateScene, workbookFile, workbookOf, writeCast } from './engine.mjs'
|
|
28
|
+
import { agentsIn, applyChanges, compare, declaredFrom, DEFAULT_PROFILE, extractAgent, firedFrom, fromSheets, groupLooks, mergeDeclared, knownKinds, labelOf, lessonOf, problemText, readCast, readCsv, readProfile, reviewCast, validateScene, workbookFile, workbookOf, writeCast } from './engine.mjs'
|
|
29
29
|
import { readXlsx } from './read-xlsx.mjs'
|
|
30
30
|
import { fill, inline } from './page.mjs'
|
|
31
31
|
|
|
@@ -204,7 +204,11 @@ const looks = reviewCast(result)
|
|
|
204
204
|
const roles = Object.values(result.roles)
|
|
205
205
|
console.log(T.found(found.length, roles.filter((r) => r === 'orchestrator').length, roles.filter((r) => r === 'specialist').length))
|
|
206
206
|
console.log(T.result(result.patterns.length, new Set(result.offPattern.map((o) => o.agent)).size, looks.filter((l) => l.key === 'solo').length))
|
|
207
|
-
|
|
207
|
+
// in groups, each with how many; every look keeps its own «! to look at» line
|
|
208
|
+
if (looks.length) for (const g of groupLooks(looks)) {
|
|
209
|
+
console.log(`▸ ${g[lang]} · ${g.looks.length}`)
|
|
210
|
+
for (const { look } of g.looks) console.log(`! ${T.look}: ${look[lang]}`)
|
|
211
|
+
}
|
|
208
212
|
else console.log(T.nothing)
|
|
209
213
|
if (argv.includes('--check')) process.exit(0)
|
|
210
214
|
|