house-lights 1.2.1 → 1.4.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.
Files changed (68) hide show
  1. package/package.json +1 -1
  2. package/skills/cast-list/assets/map.html +80 -33
  3. package/skills/cast-list/examples/agents/bodega-cupons/actions/AbrirChamadoERP.mcs.yml +15 -0
  4. package/skills/cast-list/examples/agents/bodega-cupons/actions/ConsultarCuponsAtivos.mcs.yml +1 -1
  5. package/skills/cast-list/examples/agents/bodega-cupons/actions/EnviarCupomEmail.mcs.yml +1 -1
  6. package/skills/cast-list/examples/agents/bodega-cupons/actions/PromocoesMCP.mcs.yml +1 -1
  7. package/skills/cast-list/examples/agents/bodega-cupons/agent.mcs.yml +12 -0
  8. package/skills/cast-list/examples/agents/bodega-cupons/connectionreferences.mcs.yml +7 -7
  9. package/skills/cast-list/examples/agents/bodega-cupons/topics/ConsultarRegulamentoCupons.topic.mcs.yml +3 -3
  10. package/skills/cast-list/examples/agents/bodega-cupons/topics/Escalate.topic.mcs.yml +1 -1
  11. package/skills/cast-list/examples/agents/bodega-cupons/topics/Fallback.topic.mcs.yml +5 -5
  12. package/skills/cast-list/examples/agents/bodega-cupons/topics/Greeting.topic.mcs.yml +1 -1
  13. package/skills/cast-list/examples/agents/bodega-cupons/topics/OnError.topic.mcs.yml +7 -7
  14. package/skills/cast-list/examples/agents/bodega-cupons/topics/RecebimentoOrquestrador.topic.mcs.yml +1 -1
  15. package/skills/cast-list/examples/agents/bodega-cupons/workflows/AbrirChamadoERP-7d1c2a4e/metadata.yml +3 -0
  16. package/skills/cast-list/examples/agents/bodega-cupons/workflows/AbrirChamadoERP-7d1c2a4e/workflow.json +41 -0
  17. package/skills/cast-list/examples/agents/bodega-devolucoes/actions/AbrirChamadoERP.mcs.yml +15 -0
  18. package/skills/cast-list/examples/agents/bodega-devolucoes/actions/AbrirSolicitacaoDevolucao.mcs.yml +1 -1
  19. package/skills/cast-list/examples/agents/bodega-devolucoes/agent.mcs.yml +13 -0
  20. package/skills/cast-list/examples/agents/bodega-devolucoes/connectionreferences.mcs.yml +2 -2
  21. package/skills/cast-list/examples/agents/bodega-devolucoes/topics/ConsultarPoliticaDevolucoes.topic.mcs.yml +3 -3
  22. package/skills/cast-list/examples/agents/bodega-devolucoes/topics/Escalate.topic.mcs.yml +1 -1
  23. package/skills/cast-list/examples/agents/bodega-devolucoes/topics/Fallback.topic.mcs.yml +5 -5
  24. package/skills/cast-list/examples/agents/bodega-devolucoes/topics/Greeting.topic.mcs.yml +1 -1
  25. package/skills/cast-list/examples/agents/bodega-devolucoes/topics/OnError.topic.mcs.yml +7 -7
  26. package/skills/cast-list/examples/agents/bodega-devolucoes/topics/RecebimentoOrquestrador.topic.mcs.yml +1 -1
  27. package/skills/cast-list/examples/agents/bodega-devolucoes/workflows/AbrirChamadoERP-7d1c2a4e/metadata.yml +3 -0
  28. package/skills/cast-list/examples/agents/bodega-devolucoes/workflows/AbrirChamadoERP-7d1c2a4e/workflow.json +56 -0
  29. package/skills/cast-list/examples/agents/bodega-frete/actions/EnviarOpcoesFrete.mcs.yml +1 -1
  30. package/skills/cast-list/examples/agents/bodega-frete/agent.mcs.yml +7 -0
  31. package/skills/cast-list/examples/agents/bodega-frete/connectionreferences.mcs.yml +2 -2
  32. package/skills/cast-list/examples/agents/bodega-frete/topics/ConsultarTabelaFrete.topic.mcs.yml +3 -3
  33. package/skills/cast-list/examples/agents/bodega-frete/topics/Desambiguar.topic.mcs.yml +11 -0
  34. package/skills/cast-list/examples/agents/bodega-frete/topics/Fallback.topic.mcs.yml +5 -5
  35. package/skills/cast-list/examples/agents/bodega-frete/topics/Greeting.topic.mcs.yml +1 -1
  36. package/skills/cast-list/examples/agents/bodega-frete/topics/OnError.topic.mcs.yml +7 -7
  37. package/skills/cast-list/examples/agents/bodega-frete/topics/RecebimentoOrquestrador.topic.mcs.yml +1 -1
  38. package/skills/cast-list/examples/agents/bodega-frete/variables/PreferenciaAntiga.mcs.yml +9 -0
  39. package/skills/cast-list/examples/agents/bodega-loja-fisica/actions/EnviarInstrucoesRetirada.mcs.yml +1 -1
  40. package/skills/cast-list/examples/agents/bodega-loja-fisica/agent.mcs.yml +12 -0
  41. package/skills/cast-list/examples/agents/bodega-loja-fisica/connectionreferences.mcs.yml +2 -2
  42. package/skills/cast-list/examples/agents/bodega-loja-fisica/topics/AvisoAntigo.topic.mcs.yml +12 -0
  43. package/skills/cast-list/examples/agents/bodega-loja-fisica/topics/ConsultarGuiaLojaFisica.topic.mcs.yml +3 -3
  44. package/skills/cast-list/examples/agents/bodega-loja-fisica/topics/Escalate.topic.mcs.yml +1 -1
  45. package/skills/cast-list/examples/agents/bodega-loja-fisica/topics/Fallback.topic.mcs.yml +5 -5
  46. package/skills/cast-list/examples/agents/bodega-loja-fisica/topics/Greeting.topic.mcs.yml +1 -1
  47. package/skills/cast-list/examples/agents/bodega-loja-fisica/topics/OnError.topic.mcs.yml +6 -6
  48. package/skills/cast-list/examples/agents/bodega-loja-fisica/topics/RecebimentoOrquestrador.topic.mcs.yml +1 -1
  49. package/skills/cast-list/examples/agents/bodega-loja-fisica/workflows/ListarLojas-3f2a9c1d/metadata.yml +3 -0
  50. package/skills/cast-list/examples/agents/bodega-loja-fisica/workflows/ListarLojas-3f2a9c1d/workflow.json +56 -0
  51. package/skills/cast-list/examples/agents/bodega-orquestrador/actions/AgenteCupons.mcs.yml +1 -1
  52. package/skills/cast-list/examples/agents/bodega-orquestrador/actions/AgenteFidelidade.mcs.yml +24 -0
  53. package/skills/cast-list/examples/agents/bodega-orquestrador/actions/AgenteFrete.mcs.yml +2 -14
  54. package/skills/cast-list/examples/agents/bodega-orquestrador/agent.mcs.yml +2 -0
  55. package/skills/cast-list/examples/agents/bodega-pedidos/actions/AbrirChamadoERP.mcs.yml +15 -0
  56. package/skills/cast-list/examples/agents/bodega-pedidos/actions/EnviarResumoPedido.mcs.yml +1 -1
  57. package/skills/cast-list/examples/agents/bodega-pedidos/agent.mcs.yml +10 -0
  58. package/skills/cast-list/examples/agents/bodega-pedidos/connectionreferences.mcs.yml +2 -2
  59. package/skills/cast-list/examples/agents/bodega-pedidos/topics/ConsultarPoliticasPedidos Copy.topic.mcs.yml +56 -0
  60. package/skills/cast-list/examples/agents/bodega-pedidos/topics/Escalate.topic.mcs.yml +5 -0
  61. package/skills/cast-list/examples/agents/bodega-pedidos/workflows/AbrirChamadoERP-7d1c2a4e/metadata.yml +3 -0
  62. package/skills/cast-list/examples/agents/bodega-pedidos/workflows/AbrirChamadoERP-7d1c2a4e/workflow.json +56 -0
  63. package/skills/cast-list/examples/profile.cast.yaml +28 -0
  64. package/skills/cast-list/references/format.md +30 -3
  65. package/skills/cast-list/references/keys.md +26 -0
  66. package/skills/cast-list/references/profile.md +35 -0
  67. package/skills/cast-list/scripts/build.mjs +6 -4
  68. package/skills/cast-list/scripts/engine.mjs +128 -124
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "house-lights",
3
- "version": "1.2.1",
3
+ "version": "1.4.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": {
@@ -10,7 +10,7 @@
10
10
  .cl {
11
11
  --bg: #f6f6f3; --card: #ffffff; --ink: #1d2330; --muted: #5f6878; --line: #e2e4e8; --soft: #f3f4f1;
12
12
  --has: #2e7d55; --off: #c8442c; --off-bg: #fde8e3; --said: #b7791f;
13
- --platform: #2e7d55; --platform-bg: #e3f3ea; --specialist: #3b5bdb; --specialist-bg: #e8edff; --orchestrator: #7b4fc9; --orchestrator-bg: #efe8fb;
13
+ --platform: #2e7d55; --platform-bg: #e3f3ea; --specialist: #3b5bdb; --specialist-bg: #e8edff; --orchestrator: #7b4fc9; --orchestrator-bg: #efe8fb; --type: #7b4fc9; --type-bg: #efe8fb;
14
14
  --amber: #8a5a00; --amber-bg: #fff6dc; --amber-line: #f0dca4; --focus: #2f5bea; --active: #1d2330; --on-active: #fff;
15
15
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg);
16
16
  min-height: 100vh; box-sizing: border-box; padding: 24px 16px 40px;
@@ -19,7 +19,7 @@
19
19
  .cl:not(.light) {
20
20
  --bg: #14171c; --card: #1d2129; --ink: #e8ebf0; --muted: #9aa3b2; --line: #313744; --soft: #23272f;
21
21
  --has: #6fcf9a; --off: #ff8a70; --off-bg: #3a221d; --said: #f2c46b;
22
- --platform: #6fcf9a; --platform-bg: #1c3328; --specialist: #9db0ff; --specialist-bg: #232c4a; --orchestrator: #c6a8ff; --orchestrator-bg: #2e2445;
22
+ --platform: #6fcf9a; --platform-bg: #1c3328; --specialist: #9db0ff; --specialist-bg: #232c4a; --orchestrator: #c6a8ff; --orchestrator-bg: #2e2445; --type: #c6a8ff; --type-bg: #2e2445;
23
23
  --amber: #f2c46b; --amber-bg: #2f2716; --amber-line: #5a4a22; --focus: #8fb0ff; --active: #e8ebf0; --on-active: #14171c;
24
24
  }
25
25
  }
@@ -65,10 +65,16 @@ body { margin: 0; }
65
65
  .cl-mark.said button { color: var(--said); }
66
66
  .cl-mark.off { background: var(--off-bg); }
67
67
  .cl-mark.off button { color: var(--off); font-weight: 700; }
68
+ .cl-mark.var { background: var(--amber-bg); }
69
+ .cl-mark.var button { color: var(--amber); font-weight: 700; }
70
+ .cl-matrix .cl-groups th { font-size: 11px; font-weight: 600; color: var(--muted); padding: 4px 8px 2px; text-align: center; }
71
+ .cl-matrix .cl-groups th.typed { color: var(--type); border-bottom: 2px solid var(--type); }
68
72
  .cl-badge { display: inline-block; margin-left: 8px; padding: 0 7px; border-radius: 999px; font-size: 11px; border: 1px solid currentColor; white-space: nowrap; }
69
73
  .cl-badge.platform { color: var(--platform); background: var(--platform-bg); }
70
74
  .cl-badge.specialist { color: var(--specialist); background: var(--specialist-bg); }
71
75
  .cl-badge.orchestrator { color: var(--orchestrator); background: var(--orchestrator-bg); }
76
+ .cl-badge.type { color: var(--type); background: var(--type-bg); }
77
+ .cl-badge.official { color: var(--specialist); background: var(--specialist-bg); }
72
78
  .cl-badge.accepted { color: var(--has); }
73
79
  .cl-badge.rejected { color: var(--muted); text-decoration: line-through; }
74
80
  .cl-legend { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
@@ -103,50 +109,71 @@ body { margin: 0; }
103
109
  .cl-table a { color: var(--focus); }
104
110
  .cl-empty { color: var(--muted); font-style: italic; margin: 0; }
105
111
  .cl-foot { font-size: 12px; color: var(--muted); margin: 0; }
112
+ .cl-text { margin: 4px 0 0; font: 12.5px/1.55 ui-monospace, Menlo, monospace; background: var(--soft); border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; }
113
+ .cl-variant { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; }
114
+ .cl-diff { font: 12.5px/1.6 ui-monospace, Menlo, monospace; }
115
+ .cl-del { background: var(--off-bg); color: var(--off); text-decoration: line-through; border-radius: 3px; padding: 0 2px; }
116
+ .cl-add { background: var(--platform-bg); color: var(--platform); border-radius: 3px; padding: 0 2px; }
117
+ .cl-chain { margin: 0 0 4px; }
118
+ .cl-silent { color: var(--off); font-weight: 600; }
119
+ .cl-routing { border-collapse: collapse; font-size: 12px; width: 100%; }
120
+ .cl-routing th, .cl-routing td { text-align: left; padding: 3px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
121
+ .cl-routing th { color: var(--muted); font-weight: 600; }
122
+ .cl-agent.wide { grid-column: span 2; }
123
+ @media (max-width: 680px) { .cl-agent.wide { grid-column: auto; } }
124
+ .cl-route { overflow-x: auto; }
125
+ .cl-route h4 { margin: 6px 0 4px; font-size: 13px; color: var(--muted); }
106
126
  </style>
107
127
  </head>
108
128
  <body>
109
129
  <div class="cl" id="app"></div>
110
130
  <script type="application/json" id="cast">{{CAST}}</script>
111
- <script>(()=>{var B="https://github.com/microsoft/skills-for-copilot-studio/blob/main/patterns",I=[{id:"orchestrator-variables",name:"Orchestrator-Generated Variables",sign:"an OnRecognizedIntent topic with an AutomaticTaskInput that has shouldPromptUser: false"},{id:"rai-error-handling",name:"RAI Error Handling",sign:"the OnError topic reads System.Error.SubCode"},{id:"knowledge-hold-message",name:"Knowledge Hold Message",sign:"an OnKnowledgeRequested topic that sends a message"},{id:"prevent-tool-call-leaks",name:"Prevent Tool Call Leaks",sign:"an OnGeneratedResponse topic that sets System.ContinueResponse"},{id:"dynamic-topic-redirect",name:"Dynamic Topic Redirect",sign:"a BeginDialog whose dialog is a =Switch( expression"},{id:"channel-aware-behavior",name:"Channel-Aware Behavior",sign:"a condition or SetVariable that reads System.Activity.ChannelId (not a tool input)"},{id:"date-context",name:"Date Context",sign:"the instructions use Today() or Now()"},{id:"line-breaks-in-messages",name:"Line Breaks in Messages",sign:"<br /> inside a SendActivity or Question"},{id:"conversation-history-variable",name:"Conversation History Variable"},{id:"chain-of-thought-logging",name:"Chain of Thought Logging"},{id:"deterministic-mcp-calls",name:"Deterministic MCP Calls"},{id:"prevent-child-agent-responses",name:"Prevent Child Agent Responses"},{id:"jit-glossary",name:"JIT Glossary"},{id:"jit-user-context",name:"JIT User Context"},{id:"teams-production-hardening",name:"Teams Production Hardening"}];var j={conversation:{en:"A. Conversation",pt:"A. Conversa"},integrations:{en:"B. Integrations",pt:"B. Integra\xE7\xF5es"},knowledge:{en:"C. Knowledge",pt:"C. Conhecimento"},orchestration:{en:"D. Orchestrator",pt:"D. Orquestrador"},governance:{en:"E. Governance",pt:"E. Governan\xE7a"},microsoft:{en:"Microsoft patterns",pt:"Padr\xF5es Microsoft"},declared:{en:"Declared",pt:"Declarado"}},Z={"trigger:OnConversationStart":{dim:"conversation",en:"Greeting",pt:"Boas-vindas"},"trigger:OnUnknownIntent":{dim:"conversation",en:"Fallback (when it does not understand)",pt:"Fallback (quando n\xE3o entende)"},"trigger:OnEscalate":{dim:"conversation",en:"Escalation to a person",pt:"Escalonamento para humano",lacks:{en:["does not escalate to a person","do not escalate to a person"],pt:["n\xE3o escala para humano","n\xE3o escalam para humano"]}},"trigger:OnError":{dim:"conversation",en:"Error handling",pt:"Tratamento de erro",lacks:{en:["does not handle errors","do not handle errors"],pt:["n\xE3o trata erro","n\xE3o tratam erro"]}},"trigger:OnRecognizedIntent":{dim:"conversation",en:"A topic of its own, by intent",pt:"T\xF3pico pr\xF3prio, por inten\xE7\xE3o"},"trigger:OnRedirect":{dim:"orchestration",en:"Takes a call from the orchestrator",pt:"Recebe chamada do orquestrador",lacks:{en:["takes no call from the orchestrator","take no call from the orchestrator"],pt:["n\xE3o recebe chamada do orquestrador","n\xE3o recebem chamada do orquestrador"]}},"trigger:OnSelectIntent":{dim:"conversation",en:"Disambiguation (\xABdid you mean\u2026\xBB)",pt:"Desambigua\xE7\xE3o (\xABvoc\xEA quis dizer\u2026\xBB)"},"trigger:OnSignIn":{dim:"conversation",en:"Sign-in",pt:"Login"},"trigger:OnGeneratedResponse":{dim:"conversation",en:"Reviews the generated answer",pt:"Revisa a resposta gerada"},"trigger:OnKnowledgeRequested":{dim:"knowledge",en:"Before searching knowledge",pt:"Antes de buscar no conhecimento"},"trigger:OnToolSelected":{dim:"orchestration",en:"Child chosen as a tool",pt:"Filho escolhido como ferramenta"},"trigger:OnActivity":{dim:"conversation",en:"On every message",pt:"Em toda mensagem"},"setting:generative=on":{dim:"conversation",en:"Generative orchestration on",pt:"Orquestra\xE7\xE3o generativa ligada"},"setting:generative=off":{dim:"conversation",en:"Generative orchestration off",pt:"Orquestra\xE7\xE3o generativa desligada"},"setting:connectable":{dim:"orchestration",en:"Can be called by an orchestrator",pt:"Pode ser chamado por um orquestrador"},"topics:with-model-description":{dim:"conversation",en:"Topics described for the model",pt:"T\xF3picos descritos para o modelo"},"instructions:present":{dim:"governance",en:"Has instructions",pt:"Tem instru\xE7\xF5es",lacks:{en:["has no instructions","have no instructions"],pt:["n\xE3o tem instru\xE7\xF5es","n\xE3o t\xEAm instru\xE7\xF5es"]}},"node:LogCustomTelemetryEvent":{dim:"governance",en:"Logs telemetry",pt:"Registra telemetria",lacks:{en:["logs no telemetry","log no telemetry"],pt:["n\xE3o registra telemetria","n\xE3o registram telemetria"]}},"node:CSATQuestion":{dim:"governance",en:"Asks for satisfaction (CSAT)",pt:"Pergunta a satisfa\xE7\xE3o (CSAT)",lacks:{en:["does not ask for satisfaction","do not ask for satisfaction"],pt:["n\xE3o pergunta a satisfa\xE7\xE3o","n\xE3o perguntam a satisfa\xE7\xE3o"]}},"node:SearchAndSummarizeContent":{dim:"knowledge",en:"Generative answers from knowledge",pt:"Respostas generativas sobre o conhecimento"},"node:SearchKnowledgeSources":{dim:"knowledge",en:"Searches the knowledge sources",pt:"Busca nas fontes de conhecimento"},"yaml-only:triggerCondition":{dim:"knowledge",en:"Search condition only in YAML (the editor may erase it)",pt:"Condi\xE7\xE3o de busca s\xF3 no YAML (a tela pode apagar)"},"knowledge:SharePointSearchSource":{dim:"knowledge",en:"Knowledge in SharePoint",pt:"Conhecimento no SharePoint"},"declared:kpi":{dim:"declared",en:"KPI declared",pt:"KPI declarado",lacks:{en:["has no KPI declared","have no KPI declared"],pt:["n\xE3o tem KPI declarado","n\xE3o t\xEAm KPI declarado"]}},"declared:owner":{dim:"declared",en:"Owner declared",pt:"Dono declarado",lacks:{en:["has no owner declared","have no owner declared"],pt:["n\xE3o tem dono declarado","n\xE3o t\xEAm dono declarado"]}}},ue=Object.fromEntries(I.map(e=>[e.id,e.name])),$e=[["reaches:","conversation","A topic leads to it (part of trigger:<value>)","Um t\xF3pico leva a ele (parte de trigger:<valor>)"],["calls:topic:","conversation","Calls the topic (one not found)","Chama o t\xF3pico (n\xE3o encontrado)"],["trigger:","conversation","Trigger","Gatilho"],["setting:","conversation","Setting","Configura\xE7\xE3o"],["connector:","integrations","Connector","Conector"],["operation:","integrations","Operation","Opera\xE7\xE3o"],["connref:","integrations","Connection reference","Refer\xEAncia de conex\xE3o"],["mcp:","integrations","MCP server","Servidor MCP"],["flow:","integrations","Flow","Fluxo"],["knowledge:","knowledge","Knowledge","Conhecimento"],["node:","governance","Node","N\xF3"],["calls:","orchestration","Calls","Chama"],["child:","orchestration","Child","Filho"],["var-in:","orchestration","Receives from the orchestrator","Recebe do orquestrador"],["var:","orchestration","Global variable","Vari\xE1vel global"],["model:","governance","Model","Modelo"],["auth:","governance","Sign-in","Login"],["ms:","microsoft","Microsoft pattern:","Padr\xE3o Microsoft:"],["declared:","declared","Declared:","Declarado:"]],ee=e=>$e.find(([n])=>e.startsWith(n));function R(e){return e.startsWith("reaches:")?R(`trigger:${e.slice(8)}`):Z[e]?.dim??ee(e)?.[1]??"governance"}var z=e=>e.startsWith("reaches:")?`trigger:${e.slice(8)}`:void 0,J=(e,n)=>n?.[e]??e;function O(e,n,o){let a=Z[e];if(a)return a[n];if(e.startsWith("reaches:")){let r=O(`trigger:${e.slice(8)}`,n);return n==="pt"?`Um t\xF3pico leva a \xAB${r}\xBB`:`A topic leads to \xAB${r}\xBB`}let t=/^knowledge:count=(\d+)$/.exec(e);if(t){let r=Number(t[1]);return n==="pt"?`${r} ${r===1?"fonte":"fontes"} de conhecimento`:`${r} knowledge ${r===1?"source":"sources"}`}let i=ee(e);if(!i)return e;let l=e.slice(i[0].length);if(i[0]==="ms:"&&(l=ue[l]??l),i[0]==="auth:"&&l==="None")return n==="pt"?"Sem login":"No sign-in";if(["connector:","connref:","mcp:","calls:"].includes(i[0])&&(l=J(l,o)),i[0]==="operation:"){let[r,c]=[l.slice(0,l.indexOf("/")),l.slice(l.indexOf("/")+1)];l=`${J(r,o)} \xB7 ${c}`}return`${i[n==="pt"?3:2]} ${l}`}var ye={specialist:{en:["specialist","specialists"],pt:["especialista","especialistas"]},orchestrator:{en:["orchestrator","orchestrators"],pt:["orquestrador","orquestradores"]}},K=(e,n,o)=>ye[e][n][o===1?0:1],U={en:{summary:"Summary",matrix:"Matrix",patterns:"Patterns",off:"Off pattern",gaps:"Gaps",conflicts:"Conflicts",agents:"Cast",evidence:"Evidence",declared:"Declared",unknown:"Not understood",dimension:"Dimension",fact:"Fact",key:"Key",agent:"Who",name:"Name",role:"Role",scope:"Scope",share:"Share",have:"Who has it",lack:"Who lacks it",decision:"Decision",why:"Why",missing:"Missing",accepted:"Accepted pattern",rule:"Rule",says:"Says",notMet:"Who does not meet it",value:"Value",source:"Source",inYaml:"In the YAML",file:"File",line:"Line",facts:"Facts",alone:"Only it has",children:"Children",kind:"Kind",yes:"yes",no:"no",accept:"accepted",reject:"rejected",platform:"platform",specialist:"specialist",orchestrator:"orchestrator",title:"The cast, compared",look:"To look at",nothing:"Nothing to look at",privacy:"This file holds the client\u2019s data: keep it in the client\u2019s environment.",count:{agents:"In the cast",orchestrators:"Orchestrators",specialists:"Specialists",patterns:"Patterns",off:"Off a pattern",gaps:"Rules not met",conflicts:"Conflicts",solos:"Only one has it"},why_:{yaml:"YAML that does not read",empty:"empty",kind:"a kind Copilot Studio does not have",file:"not a Copilot Studio file"}},pt:{summary:"Resumo",matrix:"Matriz",patterns:"Padr\xF5es",off:"Fora do padr\xE3o",gaps:"Lacunas",conflicts:"Conflitos",agents:"Elenco",evidence:"Evid\xEAncias",declared:"Declarado",unknown:"N\xE3o entendeu",dimension:"Dimens\xE3o",fact:"Fato",key:"Chave",agent:"Quem",name:"Nome",role:"Papel",scope:"Escopo",share:"Quantos",have:"Quem tem",lack:"Quem falta",decision:"Decis\xE3o",why:"Por qu\xEA",missing:"Falta",accepted:"Padr\xE3o aceito",rule:"Regra",says:"Diz",notMet:"Quem n\xE3o cumpre",value:"Valor",source:"Fonte",inYaml:"No YAML",file:"Arquivo",line:"Linha",facts:"Fatos",alone:"S\xF3 ele tem",children:"Filhos",kind:"Kind",yes:"sim",no:"n\xE3o",accept:"aceito",reject:"rejeitado",platform:"plataforma",specialist:"especialista",orchestrator:"orquestrador",title:"Elenco comparado",look:"Para olhar",nothing:"Nada para olhar",privacy:"Este arquivo tem dados do cliente: deixe-o no ambiente dele.",count:{agents:"No elenco",orchestrators:"Orquestradores",specialists:"Especialistas",patterns:"Padr\xF5es",off:"Fora do padr\xE3o",gaps:"Regras n\xE3o cumpridas",conflicts:"Conflitos",solos:"S\xF3 um tem"},why_:{yaml:"YAML que n\xE3o se l\xEA",empty:"vazio",kind:"um kind que o Copilot Studio n\xE3o tem",file:"n\xE3o \xE9 arquivo do Copilot Studio"}}};function q(e){let n=t=>e.offPattern.some(i=>i.key===t.key||i.partOf===t.key),o=t=>t.share===1&&!t.decision&&!n(t),a=e.patterns.filter(t=>!t.partOf);return{look:a.filter(t=>!o(t)),everyone:a.filter(o)}}var te=new TextEncoder,Y=e=>e.replace(/[&<>"]/g,n=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"})[n]).replace(/[\u0000-\u0008\u000B\u000C\u000E-\u001F]/g,""),M=e=>e<26?String.fromCharCode(65+e):M(Math.floor(e/26)-1)+String.fromCharCode(65+e%26),ke=e=>e.replace(/[:\\/?*[\]]/g," ").slice(0,31)||"Sheet";function be(e){let n=[{}],o=d=>JSON.stringify([d.bold??!1,d.fill??"",d.color??"",d.center??!1,d.wrap??!1]),a=new Map([[o({}),0]]);for(let d of e)for(let y of d.rows)for(let $ of y){if(typeof $!="object")continue;let{v:P,...D}=$,L=o(D);a.has(L)||(a.set(L,n.length),n.push(D))}let t=new Map([["|",0]]),i=new Map([["",0]]),l=d=>{let y=`${d.bold?"b":""}|${d.color??""}`;return t.has(y)||t.set(y,t.size),t.get(y)},r=d=>d.fill?(i.has(d.fill)||i.set(d.fill,i.size+1),i.get(d.fill)):0,c=n.map(d=>{let y=d.center||d.wrap?`<alignment${d.center?' horizontal="center"':""}${d.wrap?' wrapText="1"':""} vertical="top"/>`:'<alignment vertical="top"/>';return`<xf numFmtId="0" fontId="${l(d)}" fillId="${r(d)}" borderId="${d.fill||d.bold?1:0}" xfId="0" applyFont="1" applyFill="1" applyBorder="1" applyAlignment="1">${y}</xf>`}),h=[...t.keys()].map(d=>{let[y,$]=d.split("|");return`<font>${y?"<b/>":""}<sz val="11"/>${$?`<color rgb="FF${$}"/>`:""}<name val="Calibri"/><family val="2"/></font>`}),p=['<fill><patternFill patternType="none"/></fill>','<fill><patternFill patternType="gray125"/></fill>',...[...i.keys()].filter(Boolean).map(d=>`<fill><patternFill patternType="solid"><fgColor rgb="FF${d}"/><bgColor indexed="64"/></patternFill></fill>`)];return{xml:`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
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=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"})[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"?>
112
132
  <styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
113
- <fonts count="${h.length}">${h.join("")}</fonts>
133
+ <fonts count="${$.length}">${$.join("")}</fonts>
114
134
  <fills count="${p.length}">${p.join("")}</fills>
115
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>
116
136
  <cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs>
117
- <cellXfs count="${c.length}">${c.join("")}</cellXfs>
137
+ <cellXfs count="${y.length}">${y.join("")}</cellXfs>
118
138
  <cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles>
119
- </styleSheet>`,styleOf:d=>typeof d=="object"?a.get(o((({v:y,...$})=>$)(d)))??0:0}}function we(e,n){let o=Math.max(e.columns.length,...e.rows.map(c=>c.length),1),a=e.rows.map((c,h)=>{let p=c.map((k,d)=>{let y=`${M(d)}${h+1}`,$=typeof k=="object"?k.v:k,P=n(k),D=P?` s="${P}"`:"";return $===""||$===void 0||$===null?P?`<c r="${y}"${D}/>`:"":typeof $=="number"?`<c r="${y}"${D}><v>${$}</v></c>`:`<c r="${y}"${D} t="inlineStr"><is><t xml:space="preserve">${Y(String($))}</t></is></c>`}).join("");return`<row r="${h+1}">${p}</row>`}),t=`${M(o-1)}${Math.max(1,e.rows.length)}`,i=e.header?'<pane ySplit="1" topLeftCell="A2" activePane="bottomLeft" state="frozen"/><selection pane="bottomLeft" activeCell="A2" sqref="A2"/>':"",l=e.columns.length?`<cols>${e.columns.map((c,h)=>`<col min="${h+1}" max="${h+1}" width="${c.width}" customWidth="1"/>`).join("")}</cols>`:"",r=e.header&&e.rows.length>1?`<autoFilter ref="A1:${M(Math.max(0,e.columns.length-1))}${e.rows.length}"/>`:"";return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
139
+ </styleSheet>`,styleOf:i=>typeof i=="object"?r.get(s((({v:l,...g})=>g)(i)))??0:0}}function Fe(e,o){let s=Math.max(e.columns.length,...e.rows.map(y=>y.length),1),r=e.rows.map((y,$)=>{let p=y.map((w,i)=>{let l=`${E(i)}${$+1}`,g=typeof w=="object"?w.v:w,O=o(w),R=O?` s="${O}"`:"";return g===""||g===void 0||g===null?O?`<c r="${l}"${R}/>`:"":typeof g=="number"?`<c r="${l}"${R}><v>${g}</v></c>`:`<c r="${l}"${R} t="inlineStr"><is><t xml:space="preserve">${X(String(g))}</t></is></c>`}).join("");return`<row r="${$+1}">${p}</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,$)=>`<col min="${$+1}" max="${$+1}" width="${y.width}" customWidth="1"/>`).join("")}</cols>`:"",m=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"?>
120
140
  <worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">
121
- <dimension ref="A1:${t}"/><sheetViews><sheetView workbookViewId="0">${i}</sheetView></sheetViews><sheetFormatPr defaultRowHeight="15"/>${l}<sheetData>${a.join("")}</sheetData>${r}
122
- </worksheet>`}function ne(e){let{xml:n,styleOf:o}=be(e),a=e.map(l=>ke(l.name)),t=e.map((l,r)=>l.header&&l.rows.length>1?`<definedName name="_xlnm._FilterDatabase" localSheetId="${r}" hidden="1">'${Y(a[r]).replace(/'/g,"''")}'!$A$1:$${M(Math.max(0,l.columns.length-1))}$${l.rows.length}</definedName>`:"").join(""),i=[["[Content_Types].xml",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
123
- <Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/>${e.map((l,r)=>`<Override PartName="/xl/worksheets/sheet${r+1}.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/>`).join("")}</Types>`],["_rels/.rels",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
141
+ <dimension ref="A1:${t}"/><sheetViews><sheetView workbookViewId="0">${a}</sheetView></sheetViews><sheetFormatPr defaultRowHeight="15"/>${d}<sheetData>${r.join("")}</sheetData>${m}
142
+ </worksheet>`}function ie(e){let{xml:o,styleOf:s}=Re(e),r=e.map(d=>je(d.name)),t=e.map((d,m)=>d.header&&d.rows.length>1?`<definedName name="_xlnm._FilterDatabase" localSheetId="${m}" hidden="1">'${X(r[m]).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,m)=>`<Override PartName="/xl/worksheets/sheet${m+1}.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/>`).join("")}</Types>`],["_rels/.rels",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
124
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"?>
125
- <workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><bookViews><workbookView/></bookViews><sheets>${a.map((l,r)=>`<sheet name="${Y(l)}" sheetId="${r+1}" r:id="rId${r+1}"/>`).join("")}</sheets>${t?`<definedNames>${t}</definedNames>`:""}</workbook>`],["xl/_rels/workbook.xml.rels",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
126
- <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">${e.map((l,r)=>`<Relationship Id="rId${r+1}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet${r+1}.xml"/>`).join("")}<Relationship Id="rId${e.length+1}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/></Relationships>`],["xl/styles.xml",n],...e.map((l,r)=>[`xl/worksheets/sheet${r+1}.xml`,we(l,o)])];return Se(i.map(([l,r])=>[l,te.encode(r)]))}var ve=(()=>{let e=new Uint32Array(256);for(let n=0;n<256;n++){let o=n;for(let a=0;a<8;a++)o=o&1?3988292384^o>>>1:o>>>1;e[n]=o>>>0}return e})();function xe(e){let n=4294967295;for(let o=0;o<e.length;o++)n=ve[(n^e[o])&255]^n>>>8;return(n^4294967295)>>>0}function Se(e){let n=[],o=[],a=0;for(let[h,p]of e){let k=te.encode(h),d=xe(p),y=new DataView(new ArrayBuffer(30));y.setUint32(0,67324752,!0),y.setUint16(4,20,!0),y.setUint16(6,2048,!0),y.setUint16(8,0,!0),y.setUint32(14,d,!0),y.setUint32(18,p.length,!0),y.setUint32(22,p.length,!0),y.setUint16(26,k.length,!0),n.push(new Uint8Array(y.buffer),k,p);let $=new DataView(new ArrayBuffer(46));$.setUint32(0,33639248,!0),$.setUint16(4,20,!0),$.setUint16(6,20,!0),$.setUint16(8,2048,!0),$.setUint32(16,d,!0),$.setUint32(20,p.length,!0),$.setUint32(24,p.length,!0),$.setUint16(28,k.length,!0),$.setUint32(42,a,!0),o.push(new Uint8Array($.buffer),k),a+=30+k.length+p.length}let t=o.reduce((h,p)=>h+p.length,0),i=new DataView(new ArrayBuffer(22));i.setUint32(0,101010256,!0),i.setUint16(8,e.length,!0),i.setUint16(10,e.length,!0),i.setUint32(12,t,!0),i.setUint32(16,a,!0);let l=[...n,...o,new Uint8Array(i.buffer)],r=new Uint8Array(l.reduce((h,p)=>h+p.length,0)),c=0;for(let h of l)r.set(h,c),c+=h.length;return r}var se=e=>ne(e),Oe={bold:!0,fill:"E8EEF7"},Ce={v:"\u25CF",fill:"DDF3E6",center:!0},Te={v:"\xD7",fill:"FFD5CC",center:!0,bold:!0},De={v:"\u25D0",fill:"FFF3C4",center:!0},oe=Object.keys(j);function ae(e,n,o,a="en"){let t=U[a],i=(s,g,S)=>({key:s,name:t[s],header:!0,columns:g.map(([A,N])=>({title:A,width:N})),rows:[g.map(([A])=>({v:A,...Oe})),...S]}),l=s=>t[e.roles[s]],r=s=>t[s],c=s=>O(s,a,e.names),h=[...e.agents].sort((s,g)=>s.role===g.role?s.id.localeCompare(g.id):s.role==="orchestrator"?-1:1),p=[...new Set([...h.flatMap(s=>Object.keys(s.facts)),...e.patterns.map(s=>s.key)])].sort((s,g)=>oe.indexOf(R(s))-oe.indexOf(R(g))||s.localeCompare(g)),k=new Set(e.offPattern.map(s=>`${s.agent} ${s.key}`)),d=s=>e.agents.filter(g=>g.role===s).length,y={key:"summary",name:t.summary,header:!1,columns:[{title:"",width:28},{title:"",width:100}],rows:[[{v:e.name??t.title,bold:!0},""],[{v:t.privacy,color:"B42318"},""],[t.count.agents,e.agents.length],[t.count.orchestrators,d("orchestrator")],[t.count.specialists,d("specialist")],[t.count.patterns,e.patterns.length],[t.count.off,new Set(e.offPattern.map(s=>s.agent)).size],[t.count.gaps,e.gaps.length],[t.count.conflicts,e.conflicts.length],[t.count.solos,n.filter(s=>s.key==="solo").length],["",""],[{v:n.length?t.look:t.nothing,bold:!0},""],...n.map(s=>["",{v:s[a],wrap:!0}])]},$=i("matrix",[[t.dimension,18],[t.fact,40],[t.key,34],...h.map(s=>[s.id,14])],p.map(s=>[j[R(s)][a],c(s),s,...h.map(g=>s in g.facts?s.startsWith("declared:")?De:Ce:k.has(`${g.id} ${s}`)?Te:"")])),{look:P,everyone:D}=q(e),L=i("patterns",[[t.key,34],[t.fact,40],[t.scope,14],[t.role,14],[t.share,10],[t.have,50],[t.lack,40],[t.decision,12],[t.why,50]],[...P,...D].map(s=>{let g=e.offPattern.filter(S=>S.key===s.key).map(S=>S.agent);return[s.key,c(s.key),r(s.scope),t[s.role],`${Math.round(s.share*100)}%`,s.agents.join(", "),g.join(", "),s.decision?t[s.decision.status==="accepted"?"accept":"reject"]:"",s.decision?.why??""]})),de=i("off",[[t.agent,24],[t.role,14],[t.missing,44],[t.key,34],[t.scope,14],[t.accepted,14]],e.offPattern.map(s=>[s.agent,l(s.agent),c(s.key),s.key,r(s.scope),e.patterns.find(g=>g.key===s.key)?.decision?.status==="accepted"?t.yes:""])),pe=i("gaps",[[t.rule,16],[t.says,50],[t.role,14],[t.notMet,60]],e.gaps.map(s=>[s.rule.id,s.rule.says,t[s.rule.role],s.agents.join(", ")])),me=i("conflicts",[[t.agent,24],[t.fact,40],[t.key,34],[t.declared,20],[t.source,40],[t.inYaml,12]],e.conflicts.map(s=>[s.agent,c(s.key),s.key,s.declared,s.source,s.observed?t.yes:t.no])),fe=i("agents",[[t.agent,24],[t.name,32],[t.role,14],[t.facts,8],[t.off,44],[t.alone,44],[t.children,24],[t.unknown,12]],h.map(s=>[s.id,s.displayName??"",t[s.role],Object.keys(s.facts).length,e.offPattern.filter(g=>g.agent===s.id).map(g=>c(g.key)).join("; "),e.solos.filter(g=>g.agents[0]===s.id).map(g=>c(g.key)).join("; "),s.children.map(g=>g.name).join(", "),e.unknown.filter(g=>g.agent===s.id).length||""])),he=i("evidence",[[t.agent,30],[t.fact,40],[t.key,34],[t.file,50],[t.line,8]],h.flatMap(s=>[{who:s.id,facts:s.facts},...s.children.map(g=>({who:`${s.id} \u203A ${g.name}`,facts:g.facts}))]).flatMap(({who:s,facts:g})=>Object.entries(g).sort(([S],[A])=>S.localeCompare(A)).flatMap(([S,A])=>A.map(N=>[s,c(S),S,N.file,N.line??""])))),ge=i("declared",[[t.agent,24],[t.key,34],[t.value,40],[t.source,40]],o.declared.map(s=>[s.agent,s.key,s.value,s.source])),X=[y,$,L,de,pe,me,fe,he,ge];return e.unknown.length&&X.push(i("unknown",[[t.agent,24],[t.file,50],[t.why,40],[t.kind,24]],e.unknown.map(s=>[s.agent,s.file,t.why_[s.why],s.kind??""]))),X}var Re={en:{map:"Map",patterns:"Patterns",cast:"Cast",microsoft:"Microsoft",unknown:e=>`What the analysis did not understand (${e})`,matrix:"Who has what",candidates:"Patterns to decide",everyone:e=>`Everybody already does it (${e})`,all:"All",role:"Role",focus:"Focus",legend:"\u25CF has it (click for the file) \xB7 \xD7 off a pattern of its role \xB7 \u25D0 declared by people",pattern:"pattern",of:(e,n,o)=>`${e} of ${n} ${o}`,who:"Who has it",lacks:"Off it",none:"nobody",decision:"Decision",toDecide:"to decide \u2014 in the workbook or the cast file",alone:"Only one has it: innovation or debt?",orchestratorDoes:"Only the orchestrator does it",sign:"How cast-list knows",follows:"Who follows it",declaredOnly:"only declared",nothingUnknown:"Everything was understood.",facts:"Facts",off:"Off a pattern",solo:"Only it has",children:"Children",close:"Close \u2715",foot:"The facts come from the YAML files; nothing was made up.",summary:(e,n,o,a,t)=>`${e} in the cast \xB7 ${n} patterns \xB7 ${o} off a pattern \xB7 ${a} only one has \xB7 threshold ${t}% of each role`,excel:"\u2B07 Excel",yaml:"\u2B07 cast.yaml",png:"\u2B07 PNG",name:"Name",said:"declared"},pt:{map:"Mapa",patterns:"Padr\xF5es",cast:"Elenco",microsoft:"Microsoft",unknown:e=>`O que a an\xE1lise n\xE3o entendeu (${e})`,matrix:"Quem tem o qu\xEA",candidates:"Padr\xF5es para decidir",everyone:e=>`Todos j\xE1 fazem (${e})`,all:"Todos",role:"Papel",focus:"Foco",legend:"\u25CF tem (clique para ver o arquivo) \xB7 \xD7 fora de um padr\xE3o do seu papel \xB7 \u25D0 declarado por pessoas",pattern:"padr\xE3o",of:(e,n,o)=>`${e} de ${n} ${o}`,who:"Quem tem",lacks:"Fora",none:"ningu\xE9m",decision:"Decis\xE3o",toDecide:"a decidir \u2014 na planilha ou no cast.yaml",alone:"S\xF3 um tem: inova\xE7\xE3o ou d\xEDvida?",orchestratorDoes:"S\xF3 o orquestrador faz",sign:"Como a cast-list sabe",follows:"Quem segue",declaredOnly:"s\xF3 declarado",nothingUnknown:"Tudo foi entendido.",facts:"Fatos",off:"Fora do padr\xE3o",solo:"S\xF3 ele tem",children:"Filhos",close:"Fechar \u2715",foot:"Os fatos v\xEAm dos arquivos YAML; nada foi inventado.",summary:(e,n,o,a,t)=>`${e} no elenco \xB7 ${n} padr\xF5es \xB7 ${o} fora do padr\xE3o \xB7 ${a} s\xF3 um tem \xB7 limite ${t}% de cada papel`,excel:"\u2B07 Excel",yaml:"\u2B07 cast.yaml",png:"\u2B07 PNG",name:"Nome",said:"declarado"}},b=JSON.parse(document.getElementById("cast").textContent),{result:u,lang:v,looks:F}=b,m=Re[v],x=U[v],G=ae(u,F,b.cast,v);document.documentElement.lang=v==="pt"?"pt-BR":"en";document.title=u.name??b.id;var f=e=>String(e??"").replace(/[&<>"']/g,n=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[n]),T=e=>f(O(e,v,u.names)),re=[...u.agents].sort((e,n)=>e.role===n.role?e.id.localeCompare(n.id):e.role==="orchestrator"?-1:1),H=e=>u.patterns.find(n=>n.key===e),ie=e=>[...new Set(u.offPattern.filter(n=>n.key===e||n.partOf===e).map(n=>n.agent))],Q=e=>{let n=H(e);if(!n)return"";let o=n.decision?`<span class="cl-badge ${n.decision.status}">${f(x[n.decision.status==="accepted"?"accept":"reject"])}</span>`:"";return`<span class="cl-badge ${n.scope}">${m.pattern} \xB7 ${f(x[n.scope])}</span>${o}`},C="map",w,E="all",_,W=document.getElementById("app");function le(){let e=[["map",m.map],["patterns",m.patterns],["cast",m.cast],["microsoft",m.microsoft],["unknown",m.unknown(u.unknown.length)]],n=new Set(u.offPattern.map(o=>o.agent)).size;W.innerHTML=`<div class="cl-wrap">
127
- <header><h1 class="cl-title">${f(u.name??b.id)}</h1><p class="cl-sub">${m.summary(u.agents.length,u.patterns.length,n,F.filter(o=>o.key==="solo").length,Math.round(b.threshold*100))}</p><p class="cl-private">${f(x.privacy)}</p></header>
128
- <div class="cl-bar" role="tablist">${e.map(([o,a])=>`<button class="cl-tab" role="tab" aria-selected="${o===C}" data-tab="${o}">${f(a)}</button>`).join("")}
129
- <span class="cl-space"></span><button class="cl-get" data-get="xlsx">${m.excel}</button><button class="cl-get" data-get="yaml">${m.yaml}</button>${C==="map"?`<button class="cl-get" data-get="png">${m.png}</button>`:""}</div>
130
- ${C==="map"?Ae():C==="patterns"?ce(G.find(o=>o.key==="patterns")):C==="cast"?Me():C==="microsoft"?Fe():Le()}
131
- <p class="cl-foot">${m.foot}</p>
132
- </div>`}function Ae(){return`${F.length?`<section class="cl-look"><h2>${f(x.look)}</h2><ul>${F.map((n,o)=>`<li><button data-look="${o}">${f(n[v])}</button></li>`).join("")}</ul></section>`:""}<div class="cl-body${w?" with-detail":""}"><div class="cl-wrap" style="gap:16px">${je()}${Pe()}</div>${w?`<aside class="cl-card cl-detail" aria-live="polite">${Ee()}</aside>`:""}</div>`}function je(){let e=re.filter(r=>E==="all"||r.role===E),n=b.focusAreas.find(r=>r.id===_),o=[...new Set([...u.agents.flatMap(r=>Object.keys(r.facts)),...u.patterns.map(r=>r.key)])].filter(r=>!n||n.facts.includes(r)),a=new Set(u.offPattern.map(r=>`${r.agent} ${r.key}`)),t=(r,c,h,p)=>`<button class="cl-chip" ${r}="${f(c)}" aria-pressed="${h}">${f(p)}</button>`,i=`<div class="cl-filters">${m.role}: ${t("data-role","all",E==="all",m.all)}${t("data-role","specialist",E==="specialist",x.specialist)}${t("data-role","orchestrator",E==="orchestrator",x.orchestrator)}
133
- ${b.focusAreas.length?`<span style="margin-left:10px">${m.focus}:</span> ${t("data-focus","",!_,m.all)}${b.focusAreas.map(r=>t("data-focus",r.id,_===r.id,r.name)).join("")}`:""}</div>`,l="";for(let r of Object.keys(j)){let c=p=>z(p)?`${O(z(p),v,u.names)}${O(p,v,u.names)}`:O(p,v,u.names),h=o.filter(p=>R(p)===r).sort((p,k)=>c(p).localeCompare(c(k)));h.length&&(l+=`<tr class="cl-dim"><td colspan="${e.length+1}">${f(j[r][v])}</td></tr>`,l+=h.map(p=>`<tr><th scope="row" style="text-align:left;font-weight:400"><button class="cl-fact${w?.key===p&&!w.agent?" picked":""}" data-key="${f(p)}">${T(p)}</button>${Q(p)}</th>${e.map(k=>{let d=p in k.facts?p.startsWith("declared:")?["said","\u25D0"]:["has","\u25CF"]:a.has(`${k.id} ${p}`)?["off","\xD7"]:void 0;return`<td class="cl-mark${d?` ${d[0]}`:""}">${d?`<button data-key="${f(p)}" data-agent="${f(k.id)}" aria-label="${f(k.id)}: ${T(p)}">${d[1]}</button>`:""}</td>`}).join("")}</tr>`).join(""))}return`<section class="cl-card"><h2>${m.matrix}</h2>${i}<div class="cl-scroll"><table class="cl-matrix"><thead><tr><th></th>${e.map(r=>`<th scope="col">${f(r.id)}<small>${f(x[r.role])}</small></th>`).join("")}</tr></thead><tbody>${l}</tbody></table></div><p class="cl-legend">${m.legend}</p></section>`}function Pe(){let{look:e,everyone:n}=q(u),o=a=>{let t=H(a),i=u.agents.filter(r=>r.role===t.role).length,l=ie(a);return`<button class="cl-pattern${w?.key===a?" picked":""}" data-pattern="${f(a)}"><b>${T(a)}</b><span>${Q(a)} ${m.of(t.agents.filter(r=>u.roles[r]===t.role).length,i,K(t.role,v,i))}</span>
134
- ${l.length?`<span class="cl-lack">${m.lacks}: ${f(l.join(", "))}</span>`:""}<span>${m.decision}: ${t.decision?`${f(x[t.decision.status==="accepted"?"accept":"reject"])}${t.decision.why?` \u2014 ${f(t.decision.why)}`:""}`:`<i>${m.toDecide}</i>`}</span></button>`};return`<section class="cl-card"><h2>${m.candidates}</h2>${e.length?`<div class="cl-cards">${e.map(a=>o(a.key)).join("")}</div>`:'<p class="cl-empty">\u2014</p>'}
135
- ${n.length?`<details class="cl-everyone"><summary>${m.everyone(n.length)}</summary><ul>${n.map(a=>`<li><button class="cl-fact" data-pattern="${f(a.key)}">${T(a.key)}</button> <span class="cl-badge ${a.scope}">${f(x[a.scope])}</span></li>`).join("")}</ul></details>`:""}</section>`}function Ee(){let{key:e,agent:n}=w,o=H(e),t=u.agents.filter(c=>e in c.facts&&(!n||c.id===n)).map(c=>`<li><b>${f(c.id)}</b>${c.facts[e].map(h=>`<div class="cl-file">${f(h.file)}${h.line?`:${h.line}`:""}</div>`).join("")}</li>`).join(""),i=ie(e).filter(c=>!n||c===n),l=u.solos.some(c=>c.key===e),r=u.orchestratorDoes.some(c=>c.key===e);return`<button class="cl-close" data-close="1">${m.close}</button><span class="cl-kicker">${f(j[R(e)][v])}</span><h3>${T(e)}</h3><code>${f(e)}</code>
136
- ${o?`<div>${Q(e)}</div><div>${m.decision}: ${o.decision?`${f(x[o.decision.status==="accepted"?"accept":"reject"])}${o.decision.why?` \u2014 ${f(o.decision.why)}`:""}`:`<i>${m.toDecide}</i>`}</div>`:""}
137
- ${l?`<div>${m.alone}</div>`:r?`<div>${m.orchestratorDoes}</div>`:""}
138
- <div><b>${m.who}</b>${t?`<ul>${t}</ul>`:` \u2014 ${m.none}`}</div>
139
- ${u.patterns.filter(c=>c.partOf===e).map(c=>{let h=u.offPattern.filter(p=>p.key===c.key).map(p=>p.agent);return`<div><b>${T(c.key)}</b> \u2014 ${h.length?`<span style="color:var(--off)">${m.lacks}: ${f(h.join(", "))}</span>`:`${m.who}: ${c.agents.length}`}</div>`}).join("")}
140
- ${i.length?`<div><b>${m.lacks}</b>: <span style="color:var(--off)">${f(i.join(", "))}</span></div>`:""}`}function Me(){return`<div class="cl-agents">${re.map(e=>{let n=u.offPattern.filter(t=>t.agent===e.id),o=u.solos.filter(t=>t.agents[0]===e.id),a=u.unknown.filter(t=>t.agent===e.id);return`<section class="cl-card cl-agent"><span class="cl-kicker">${f(x[e.role])}</span><h3>${f(e.id)}</h3>${e.displayName?`<code>${f(e.displayName)}</code>`:""}<dl>
141
- <dt>${m.facts}</dt><dd>${Object.keys(e.facts).length}</dd>
142
- ${n.length?`<dt>${m.off}</dt><dd class="cl-lack">${n.map(t=>T(t.key)).join("<br>")}</dd>`:""}
143
- ${o.length?`<dt>${m.solo}</dt><dd>${o.map(t=>T(t.key)).join("<br>")}</dd>`:""}
144
- ${e.children.length?`<dt>${m.children}</dt><dd>${e.children.map(t=>`${f(t.name)} <span class="cl-sub">(${Object.keys(t.facts).map(T).join(", ")})</span>`).join("<br>")}</dd>`:""}
145
- ${a.length?`<dt>${f(x.unknown)}</dt><dd>${a.map(t=>f(t.file)).join("<br>")}</dd>`:""}</dl></section>`}).join("")}</div>`}function Fe(){let e=I.map(n=>{let o=u.agents.filter(a=>`ms:${n.id}`in a.facts||`declared:ms:${n.id}`in a.facts).map(a=>a.id);return`<tr><td><a href="${B}/${n.id}.md" target="_blank" rel="noopener">${f(n.name)}</a></td><td>${f(n.sign??m.declaredOnly)}</td><td>${o.length?f(o.join(", ")):`<span class="cl-sub">${m.none}</span>`}</td></tr>`}).join("");return`<section class="cl-card cl-table"><table><thead><tr><th>${m.microsoft}</th><th>${m.sign}</th><th>${m.follows}</th></tr></thead><tbody>${e}</tbody></table></section>`}function Le(){let e=G.find(n=>n.key==="unknown");return e?ce(e):`<section class="cl-card"><p class="cl-empty">${m.nothingUnknown}</p></section>`}function ce(e){let n=(t,i)=>{let l=typeof t=="object"&&t?t:{v:t},r=i?"th":"td";return`<${r}${l.fill&&!i?` style="background:#${l.fill};color:#1d2330"`:""}>${f(l.v)}</${r}>`},[o,...a]=e.rows;return`<section class="cl-card cl-table" role="tabpanel"><table><thead><tr>${o.map(t=>n(t,!0)).join("")}</tr></thead><tbody>${a.map(t=>`<tr>${t.map(i=>n(i,!1)).join("")}</tr>`).join("")}</tbody></table></section>`}function V(e,n){let o=document.createElement("a");o.href=URL.createObjectURL(e),o.download=n,o.click(),setTimeout(()=>URL.revokeObjectURL(o.href),1e3)}async function Ne(){let e=W.querySelector(".cl-matrix"),[n,o]=[e.scrollWidth+32,e.scrollHeight+32],a=new XMLSerializer().serializeToString(e).replace(/ picked/g,""),t=`<svg xmlns="http://www.w3.org/2000/svg" width="${n}" height="${o}"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml" class="cl light" style="min-height:0;padding:16px;background:#fff;width:${n}px"><style>/* The cast map: tokens on .cl (not :root) so the PNG, drawn apart, carries them too. */
145
+ <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,m)=>`<sheet name="${X(d)}" sheetId="${m+1}" r:id="rId${m+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,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=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[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(u.name??k.id)}</h1><p class="cl-sub">${c.summary(u.agents.length,u.patterns.length,o,I.filter(s=>s.key==="solo").length,Math.round(k.threshold*100))}</p><p class="cl-private">${f(v.privacy)}</p></header>
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">${c.excel}</button><button class="cl-get" data-get="yaml">${c.yaml}</button>${T==="map"?`<button class="cl-get" data-get="png">${c.png}</button>`:""}</div>
150
+ ${T==="map"?We():T==="patterns"?ee(K.find(s=>s.key==="patterns")):T==="cast"?He():T==="microsoft"?Qe():T==="unused"?Ye():Xe()}
151
+ <p class="cl-foot">${c.foot}</p>
152
+ </div>`}function We(){return`${I.length?`<section class="cl-look"><h2>${f(v.look)}</h2><ul>${I.map((o,s)=>`<li><button data-look="${s}">${f(o[S])}</button></li>`).join("")}</ul></section>`:""}<div class="cl-body${x?" with-detail":""}"><div class="cl-wrap" style="gap:16px">${Ve()}${Be()}</div>${x?`<aside class="cl-card cl-detail" aria-live="polite">${ze()}</aside>`:""}</div>`}function _e(){let e=t=>A==="all"||t.role===A;if(!B.length)return[{id:"",name:"",cols:_.filter(e).map(t=>({a:t,also:[]}))}];let o=t=>u.types[t]??[],s=_.filter(t=>t.role==="specialist"&&e(t));return[{id:"orchestrator",name:v.orchestrator,cols:_.filter(t=>t.role==="orchestrator"&&e(t)).map(t=>({a:t,also:[]}))},...B.map(t=>({id:t,name:u.typeNames[t],cols:s.filter(a=>o(a.id).includes(t)).map(a=>({a,also:o(a.id).filter(d=>d!==t).map(d=>u.typeNames[d]??d)}))})),{id:"-",name:c.noType,cols:s.filter(t=>!o(t.id).length).map(t=>({a:t,also:[]}))}].filter(t=>t.cols.length&&(!M||t.id===M))}function Ve(){let e=_e(),o=e.flatMap(p=>p.cols),s=k.focusAreas.find(p=>p.id===V),r=[...new Set([...u.agents.flatMap(p=>Object.keys(p.facts)),...u.patterns.map(p=>p.key)])].filter(p=>!p.endsWith("~variant")&&(!s||s.facts.includes(p))),t=new Set(u.offPattern.map(p=>`${p.agent} ${p.key}`)),a=(p,w,i,l)=>`<button class="cl-chip" ${p}="${f(w)}" aria-pressed="${i}">${f(l)}</button>`,d=`<div class="cl-filters">${c.role}: ${a("data-role","all",A==="all",c.all)}${a("data-role","specialist",A==="specialist",v.specialist)}${a("data-role","orchestrator",A==="orchestrator",v.orchestrator)}
153
+ ${B.length?`<span style="margin-left:10px">${c.type}:</span> ${a("data-type","",!M,c.all)}${B.map(p=>a("data-type",p,M===p,u.typeNames[p])).join("")}${a("data-type","-",M==="-",c.noType)}`:""}
154
+ ${k.focusAreas.length?`<span style="margin-left:10px">${c.focus}:</span> ${a("data-focus","",!V,c.all)}${k.focusAreas.map(p=>a("data-focus",p.id,V===p.id,p.name)).join("")}`:""}</div>`,m="";for(let p of Object.keys(D)){let w=l=>Y(l)?`${C(Y(l),S,u.names)}${C(l,S,u.names)}`:C(l,S,u.names),i=r.filter(l=>F(l)===p).sort((l,g)=>w(l).localeCompare(w(g)));i.length&&(m+=`<tr class="cl-dim"><td colspan="${o.length+1}">${f(D[p][S])}</td></tr>`,m+=i.map(l=>`<tr><th scope="row" style="text-align:left;font-weight:400"><button class="cl-fact${x?.key===l&&!x.agent?" picked":""}" data-key="${f(l)}">${j(l)}</button>${Z(l)}</th>${o.map(({a:g})=>{let O=l in g.facts?l.startsWith("declared:")?["said","\u25D0"]:["has","\u25CF"]:`${l}~variant`in g.facts?["var","\u2248"]:t.has(`${g.id} ${l}`)?["off","\xD7"]:void 0;return`<td class="cl-mark${O?` ${O[0]}`:""}">${O?`<button data-key="${f(l)}" data-agent="${f(g.id)}" aria-label="${f(g.id)}: ${j(l)}">${O[1]}</button>`:""}</td>`}).join("")}</tr>`).join(""))}let y=e.some(p=>p.name)?`<tr class="cl-groups"><th></th>${e.map(p=>`<th colspan="${p.cols.length}" class="${p.id==="orchestrator"?"":"typed"}">${f(p.name)}</th>`).join("")}</tr>`:"",$=o.map(({a:p,also:w})=>`<th scope="col">${f(p.id)}<small>${f(w.length?`${c.alsoIn} ${w.join(", ")}`:v[p.role])}</small></th>`).join("");return`<section class="cl-card"><h2>${c.matrix}</h2>${d}<div class="cl-scroll"><table class="cl-matrix"><thead>${y}<tr><th></th>${$}</tr></thead><tbody>${m}</tbody></table></div><p class="cl-legend">${c.legend}</p></section>`}function Be(){let{look:e,everyone:o}=W(u),s=r=>{let t=J(r),a=u.agents.filter(m=>m.role===t.role).length,d=pe(r);return`<button class="cl-pattern${x?.key===r?" picked":""}" data-pattern="${f(r)}"><b>${j(r)}</b><span>${Z(r)} ${c.of(t.agents.filter(m=>u.roles[m]===t.role).length,a,Q(t.role,S,a))}</span>
155
+ ${d.length?`<span class="cl-lack">${c.lacks}: ${f(d.join(", "))}</span>`:""}<span>${c.decision}: ${t.decision?`${f(v[t.decision.status==="accepted"?"accept":"reject"])}${t.decision.why?` \u2014 ${f(t.decision.why)}`:""}`:`<i>${c.toDecide}</i>`}</span></button>`};return`<section class="cl-card"><h2>${c.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>${c.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 ${fe(r.scope)}">${f(me(r.scope))}</span></li>`).join("")}</ul></details>`:""}</section>`}function ze(){let{key:e,agent:o}=x,s=J(e),t=u.agents.filter(i=>e in i.facts&&(!o||i.id===o)).map(i=>`<li><b>${f(i.id)}</b>${i.facts[e].map(l=>`<div class="cl-file">${f(l.file)}${l.line?`:${l.line}`:""}</div>`).join("")}</li>`).join(""),a=pe(e).filter(i=>!o||i===o),d=u.solos.some(i=>i.key===e),m=u.orchestratorDoes.some(i=>i.key===e),y=qe(e),$=i=>i.map(l=>l.op==="same"?f(l.text):`<span class="cl-${l.op}">${f(l.text)}</span>`).join(" "),p=y?Object.entries(y.variants).filter(([i])=>!o||i===o):[],w=y?`<div><b>${c.text}</b><pre class="cl-text">${f(y.text)}</pre></div>
157
+ ${p.map(([i,l])=>`<div class="cl-variant"><b>${f(i)}</b> <span class="cl-file">${f(l.source.file)}${l.source.line?`:${l.source.line}`:""} \xB7 ${Math.round(l.similarity*100)}% ${c.alike}</span><div class="cl-diff">${$(l.diff)}</div></div>`).join("")}`:"";return`<button class="cl-close" data-close="1">${c.close}</button><span class="cl-kicker">${f(D[F(e)][S])}</span><h3>${j(e)}</h3><code>${f(e)}</code>
158
+ ${s?`<div>${Z(e)}</div><div>${c.decision}: ${s.decision?`${f(v[s.decision.status==="accepted"?"accept":"reject"])}${s.decision.why?` \u2014 ${f(s.decision.why)}`:""}`:`<i>${c.toDecide}</i>`}</div>`:""}
159
+ ${d?`<div>${c.alone}</div>`:m?`<div>${c.orchestratorDoes}</div>`:""}
160
+ ${w}
161
+ <div><b>${c.who}</b>${t?`<ul>${t}</ul>`:` \u2014 ${c.none}`}</div>
162
+ ${u.patterns.filter(i=>i.partOf===e).map(i=>{let l=u.offPattern.filter(g=>g.key===i.key).map(g=>g.agent);return`<div><b>${j(i.key)}</b> \u2014 ${l.length?`<span style="color:var(--off)">${c.lacks}: ${f(l.join(", "))}</span>`:`${c.who}: ${i.agents.length}`}</div>`}).join("")}
163
+ ${a.length?`<div><b>${c.lacks}</b>: <span style="color:var(--off)">${f(a.join(", "))}</span></div>`:""}`}function He(){return`<div class="cl-agents">${_.map(e=>{let o=u.offPattern.filter(a=>a.agent===e.id),s=u.solos.filter(a=>a.agents[0]===e.id),r=u.unknown.filter(a=>a.agent===e.id),t=Ge(e.id);return`<section class="cl-card cl-agent${t?" wide":""}"><span class="cl-kicker">${f(v[e.role])}</span><h3>${f(e.id)}</h3>${e.displayName?`<code>${f(e.displayName)}</code>`:""}<dl>
164
+ ${(u.types[e.id]??[]).length?`<dt>${c.types}</dt><dd>${f(u.types[e.id].map(a=>u.typeNames[a]??a).join(" \xB7 "))}</dd>`:""}
165
+ <dt>${c.facts}</dt><dd>${Object.keys(e.facts).length}</dd>
166
+ ${o.length?`<dt>${c.off}</dt><dd class="cl-lack">${o.map(a=>j(a.key)).join("<br>")}</dd>`:""}
167
+ ${s.length?`<dt>${c.solo}</dt><dd>${s.map(a=>j(a.key)).join("<br>")}</dd>`:""}
168
+ ${Ke(e.id,e.displayName??e.id)}
169
+ ${e.children.length?`<dt>${c.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>`:""}
170
+ ${r.length?`<dt>${f(v.unknown)}</dt><dd>${r.map(a=>f(a.file)).join("<br>")}</dd>`:""}</dl>${t}</section>`}).join("")}</div>`}function Ke(e,o){let s=u.flows.filter(a=>a.agent===e&&a.called);if(!s.length)return"";let r=a=>a==="child-flow"?c.otherFlow:a.startsWith("http:")?a.slice(5):a.startsWith("connector:")?u.names[a.slice(10)]??a.slice(10):void 0,t=a=>{let d=a.uses.map(r).filter(m=>!!m);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 ${c.returnsNothing}</span>`}</div>`};return`<dt>${c.flows}</dt><dd>${s.map(t).join("")}</dd>`}function Ge(e){let o=u.contract.routes.filter(r=>r.caller===e);if(!o.length)return"";let s=o.map(r=>{let t=r.description.length<ae;return`<tr><td>${r.agent?f(r.agent):`<span class="cl-silent">${f(r.name??r.calls)} \u2014 ${c.notInFolder}</span>`}</td>
171
+ <td${r.history?"":' class="cl-silent"'}>${r.history?v.yes:v.no}</td><td>${r.inputs.length?f(r.inputs.join(", ")):'<span class="cl-silent">\u2014</span>'}</td>
172
+ <td${t?' class="cl-silent"':""} title="${f(r.description)}">${f(c.chars(r.description.length))}</td></tr>`}).join("");return`<div class="cl-route"><h4>${c.routing}</h4><table class="cl-routing"><thead><tr><th>${c.called}</th><th>${c.history}</th><th>${c.inputs}</th><th>${c.description}</th></tr></thead><tbody>${s}</tbody></table></div>`}function Ye(){let e=K.find(o=>o.key==="unused");return e?ee(e):`<section class="cl-card"><p class="cl-empty">${c.nothingUnused}</p></section>`}function Qe(){let e=U.map(o=>{let s=u.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="${G}/${o.id}.md" target="_blank" rel="noopener">${f(o.name)}</a></td><td>${f(o.sign??c.declaredOnly)}</td><td>${s.length?f(s.join(", ")):`<span class="cl-sub">${c.none}</span>`}</td></tr>`}).join("");return`<section class="cl-card cl-table"><table><thead><tr><th>${c.microsoft}</th><th>${c.sign}</th><th>${c.follows}</th></tr></thead><tbody>${e}</tbody></table></section>`}function Xe(){let e=K.find(o=>o.key==="unknown");return e?ee(e):`<section class="cl-card"><p class="cl-empty">${c.nothingUnknown}</p></section>`}function ee(e){let o=(t,a)=>{let d=typeof t=="object"&&t?t:{v:t},m=a?"th":"td";return`<${m}${d.fill&&!a?` style="background:#${d.fill};color:#1d2330"`:""}>${f(d.v)}</${m}>`},[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 H(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 Je(){let e=z.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. */
146
173
  .cl {
147
174
  --bg: #f6f6f3; --card: #ffffff; --ink: #1d2330; --muted: #5f6878; --line: #e2e4e8; --soft: #f3f4f1;
148
175
  --has: #2e7d55; --off: #c8442c; --off-bg: #fde8e3; --said: #b7791f;
149
- --platform: #2e7d55; --platform-bg: #e3f3ea; --specialist: #3b5bdb; --specialist-bg: #e8edff; --orchestrator: #7b4fc9; --orchestrator-bg: #efe8fb;
176
+ --platform: #2e7d55; --platform-bg: #e3f3ea; --specialist: #3b5bdb; --specialist-bg: #e8edff; --orchestrator: #7b4fc9; --orchestrator-bg: #efe8fb; --type: #7b4fc9; --type-bg: #efe8fb;
150
177
  --amber: #8a5a00; --amber-bg: #fff6dc; --amber-line: #f0dca4; --focus: #2f5bea; --active: #1d2330; --on-active: #fff;
151
178
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg);
152
179
  min-height: 100vh; box-sizing: border-box; padding: 24px 16px 40px;
@@ -155,7 +182,7 @@ body { margin: 0; }
155
182
  .cl:not(.light) {
156
183
  --bg: #14171c; --card: #1d2129; --ink: #e8ebf0; --muted: #9aa3b2; --line: #313744; --soft: #23272f;
157
184
  --has: #6fcf9a; --off: #ff8a70; --off-bg: #3a221d; --said: #f2c46b;
158
- --platform: #6fcf9a; --platform-bg: #1c3328; --specialist: #9db0ff; --specialist-bg: #232c4a; --orchestrator: #c6a8ff; --orchestrator-bg: #2e2445;
185
+ --platform: #6fcf9a; --platform-bg: #1c3328; --specialist: #9db0ff; --specialist-bg: #232c4a; --orchestrator: #c6a8ff; --orchestrator-bg: #2e2445; --type: #c6a8ff; --type-bg: #2e2445;
159
186
  --amber: #f2c46b; --amber-bg: #2f2716; --amber-line: #5a4a22; --focus: #8fb0ff; --active: #e8ebf0; --on-active: #14171c;
160
187
  }
161
188
  }
@@ -201,10 +228,16 @@ body { margin: 0; }
201
228
  .cl-mark.said button { color: var(--said); }
202
229
  .cl-mark.off { background: var(--off-bg); }
203
230
  .cl-mark.off button { color: var(--off); font-weight: 700; }
231
+ .cl-mark.var { background: var(--amber-bg); }
232
+ .cl-mark.var button { color: var(--amber); font-weight: 700; }
233
+ .cl-matrix .cl-groups th { font-size: 11px; font-weight: 600; color: var(--muted); padding: 4px 8px 2px; text-align: center; }
234
+ .cl-matrix .cl-groups th.typed { color: var(--type); border-bottom: 2px solid var(--type); }
204
235
  .cl-badge { display: inline-block; margin-left: 8px; padding: 0 7px; border-radius: 999px; font-size: 11px; border: 1px solid currentColor; white-space: nowrap; }
205
236
  .cl-badge.platform { color: var(--platform); background: var(--platform-bg); }
206
237
  .cl-badge.specialist { color: var(--specialist); background: var(--specialist-bg); }
207
238
  .cl-badge.orchestrator { color: var(--orchestrator); background: var(--orchestrator-bg); }
239
+ .cl-badge.type { color: var(--type); background: var(--type-bg); }
240
+ .cl-badge.official { color: var(--specialist); background: var(--specialist-bg); }
208
241
  .cl-badge.accepted { color: var(--has); }
209
242
  .cl-badge.rejected { color: var(--muted); text-decoration: line-through; }
210
243
  .cl-legend { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
@@ -239,7 +272,21 @@ body { margin: 0; }
239
272
  .cl-table a { color: var(--focus); }
240
273
  .cl-empty { color: var(--muted); font-style: italic; margin: 0; }
241
274
  .cl-foot { font-size: 12px; color: var(--muted); margin: 0; }
242
- </style>${a}</div></foreignObject></svg>`;try{let i=new Image;i.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`,await i.decode();let l=document.createElement("canvas");l.width=n*2,l.height=o*2;let r=l.getContext("2d");r.scale(2,2),r.drawImage(i,0,0);let c=await new Promise(h=>l.toBlob(h,"image/png"));if(!c)throw new Error("no PNG");V(c,`${b.id}.png`)}catch{V(new Blob([t],{type:"image/svg+xml"}),`${b.id}.svg`)}}W.addEventListener("click",e=>{let n=e.target.closest("button");if(!n)return;let o=n.dataset;if(o.tab)C=o.tab;else if(o.role)E=o.role;else if(o.focus!==void 0)_=o.focus||void 0;else if(o.key)w={key:o.key,...o.agent?{agent:o.agent}:{}};else if(o.pattern)w={key:o.pattern};else if(o.close)w=void 0;else if(o.look){let a=F[Number(o.look)];C="map",a.fact&&(w={key:a.fact,...a.agents.length===1?{agent:a.agents[0]}:{}}),(a.key==="off"||a.key==="gap"||a.key==="conflict")&&(w=a.fact?{key:a.fact}:w),a.key==="unknown"&&(C="unknown")}else{if(o.get==="xlsx")return V(new Blob([se(G)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),`${b.id}.xlsx`);if(o.get==="yaml")return V(new Blob([b.castYaml],{type:"text/yaml"}),`${b.id}.cast.yaml`);if(o.get==="png")return void Ne()}le(),(o.key||o.pattern||o.look)&&W.querySelector(".cl-detail")?.scrollIntoView({block:"nearest"})});le();})();
275
+ .cl-text { margin: 4px 0 0; font: 12.5px/1.55 ui-monospace, Menlo, monospace; background: var(--soft); border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; }
276
+ .cl-variant { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; }
277
+ .cl-diff { font: 12.5px/1.6 ui-monospace, Menlo, monospace; }
278
+ .cl-del { background: var(--off-bg); color: var(--off); text-decoration: line-through; border-radius: 3px; padding: 0 2px; }
279
+ .cl-add { background: var(--platform-bg); color: var(--platform); border-radius: 3px; padding: 0 2px; }
280
+ .cl-chain { margin: 0 0 4px; }
281
+ .cl-silent { color: var(--off); font-weight: 600; }
282
+ .cl-routing { border-collapse: collapse; font-size: 12px; width: 100%; }
283
+ .cl-routing th, .cl-routing td { text-align: left; padding: 3px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
284
+ .cl-routing th { color: var(--muted); font-weight: 600; }
285
+ .cl-agent.wide { grid-column: span 2; }
286
+ @media (max-width: 680px) { .cl-agent.wide { grid-column: auto; } }
287
+ .cl-route { overflow-x: auto; }
288
+ .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 m=d.getContext("2d");m.scale(2,2),m.drawImage(a,0,0);let y=await new Promise($=>d.toBlob($,"image/png"));if(!y)throw new Error("no PNG");H(y,`${k.id}.png`)}catch{H(new Blob([t],{type:"image/svg+xml"}),`${k.id}.svg`)}}z.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)A=s.role;else if(s.focus!==void 0)V=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=I[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 H(new Blob([ce(K)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),`${k.id}.xlsx`);if(s.get==="yaml")return H(new Blob([k.castYaml],{type:"text/yaml"}),`${k.id}.cast.yaml`);if(s.get==="png")return void Je()}he(),(s.key||s.pattern||s.look)&&z.querySelector(".cl-detail")?.scrollIntoView({block:"nearest"})});he();})();
243
290
  </script>
244
291
  </body>
245
292
  </html>
@@ -0,0 +1,15 @@
1
+ mcs.metadata:
2
+ componentName: Abrir chamado no ERP
3
+ description: Abre um chamado no ERP da Bodega Azul pelo fluxo da solução.
4
+ kind: TaskDialog
5
+ inputs:
6
+ - kind: AutomaticTaskInput
7
+ propertyName: resumo
8
+ description: Resumo do pedido do cliente, em uma frase.
9
+ shouldPromptUser: false
10
+
11
+ modelDisplayName: Abrir chamado no ERP
12
+ modelDescription: Abre um chamado no ERP quando o cliente pede uma ação que a loja precisa executar (troca, cancelamento, reembolso).
13
+ action:
14
+ kind: InvokeFlowTaskAction
15
+ flowId: 7d1c2a4e-3b5f-4c6d-8e9f-0a1b2c3d4e5f
@@ -25,7 +25,7 @@ modelDisplayName: Consultar cupons ativos
25
25
  modelDescription: Verifica na lista Cupons do SharePoint se um código de cupom existe, se está ativo e qual a validade. Use quando o cliente informar um código de cupom.
26
26
  action:
27
27
  kind: InvokeConnectorTaskAction
28
- connectionReference: cr7b2_bodegaCupons.shared_sharepointonline.shared-sharepointonline-5dc0aa0a-6edf-4fc4-a7d5-cbbfc5636a85
28
+ connectionReference: cr7b2_bodegaCupons.shared_sharepointonline.shared-sharepointonline-f9f69116-631c-4103-bdd0-e6c557c79a73
29
29
  connectionProperties:
30
30
  mode: Maker
31
31
 
@@ -25,7 +25,7 @@ modelDisplayName: Enviar cupom por e-mail
25
25
  modelDescription: "Envia ao cliente, pelo Outlook, um e-mail com um código de cupom já validado e as regras de uso. Use somente quando o cliente pedir."
26
26
  action:
27
27
  kind: InvokeConnectorTaskAction
28
- connectionReference: cr7b2_bodegaCupons.shared_office365.shared-office365-3b988145-3785-4cc1-8a12-16e80746419d
28
+ connectionReference: cr7b2_bodegaCupons.shared_office365.shared-office365-8a5ef90d-d584-47ca-b2a1-5c87d8fc6ede
29
29
  connectionProperties:
30
30
  mode: Maker
31
31
 
@@ -11,7 +11,7 @@ modelDisplayName: Servidor MCP de Promoções
11
11
  modelDescription: Servidor MCP que lista as campanhas promocionais e os cupons vigentes da Bodega Azul.
12
12
  action:
13
13
  kind: InvokeExternalAgentTaskAction
14
- connectionReference: cr7b2_bodegaCupons.shared_bodegapromocoesmcp.fio2ta
14
+ connectionReference: cr7b2_bodegaCupons.shared_bodegapromocoesmcp.zsi3cu
15
15
  connectionProperties:
16
16
  mode: Maker
17
17
 
@@ -15,6 +15,18 @@ instructions: |
15
15
  - Responda sempre em português do Brasil
16
16
  - Nunca crie, invente ou altere códigos de cupom
17
17
  - Cupons não são cumulativos, salvo quando o regulamento disser o contrário
18
+
19
+ Links:
20
+ - Formate links assim: [título](url), nunca a URL crua.
21
+ - Um link de ação vai no topo; o link da base de ajuda vai no fim.
22
+ - Nunca escreva as palavras «clique aqui».
23
+ - No máximo 3 links por resposta.
24
+
25
+ Use no máximo 5 frases por resposta.
26
+
27
+ Não use emojis.
28
+
29
+ Para dúvidas gerais, indique https://ajuda.bodega-azul.example/atendimento.
18
30
  conversationStarters:
19
31
  - title: "Cupom não funciona"
20
32
  text: "Meu cupom não está funcionando"
@@ -1,17 +1,17 @@
1
1
  kind: ConnectionReferencesSourceFile
2
2
  connectionReferences:
3
- - id: 85ffe9e7-df95-4834-95c1-74e4d16daf3d
4
- connectionReferenceLogicalName: cr7b2_bodegaCupons.shared_office365.shared-office365-3b988145-3785-4cc1-8a12-16e80746419d
3
+ - id: d9eee619-a353-495f-a0dc-468f7fbe750a
4
+ connectionReferenceLogicalName: cr7b2_bodegaCupons.shared_office365.shared-office365-8a5ef90d-d584-47ca-b2a1-5c87d8fc6ede
5
5
  connectorId: /providers/Microsoft.PowerApps/apis/shared_office365
6
6
  displayName: Office 365 Outlook
7
7
 
8
- - id: 80009100-efc7-49b3-b008-08903fa748c4
9
- connectionReferenceLogicalName: cr7b2_bodegaCupons.shared_sharepointonline.shared-sharepointonline-5dc0aa0a-6edf-4fc4-a7d5-cbbfc5636a85
8
+ - id: 26a5926c-f68c-4981-aaa1-bfe4b58e84ce
9
+ connectionReferenceLogicalName: cr7b2_bodegaCupons.shared_sharepointonline.shared-sharepointonline-f9f69116-631c-4103-bdd0-e6c557c79a73
10
10
  connectorId: /providers/Microsoft.PowerApps/apis/shared_sharepointonline
11
11
  displayName: SharePoint
12
12
 
13
- - id: 8a5ef90d-d584-47ca-b2a1-5c87d8fc6ede
14
- connectionReferenceLogicalName: cr7b2_bodegaCupons.shared_bodegapromocoesmcp.fio2ta
13
+ - id: b9fa4804-c3ce-45ef-84c8-57371a88d0a7
14
+ connectionReferenceLogicalName: cr7b2_bodegaCupons.shared_bodegapromocoesmcp.zsi3cu
15
15
  connectorId: /providers/Microsoft.PowerApps/apis/shared_bodegapromocoesmcp
16
16
  displayName: Bodega Azul Promocoes MCP
17
- customConnectorId: 3dd0e6c5-57c7-4a73-a6a5-926cf68cb981
17
+ customConnectorId: 5b11a407-28a6-4213-b264-a3b0fd5c2ee4
@@ -15,12 +15,12 @@ beginDialog:
15
15
  intent: {}
16
16
  actions:
17
17
  - kind: CreateSearchQuery
18
- id: createSearchQuery_J5Bv7D
18
+ id: createSearchQuery_T4bsno
19
19
  userInput: =Topic.PerguntaCliente
20
20
  result: Topic.SearchQuery
21
21
 
22
22
  - kind: SearchAndSummarizeContent
23
- id: searchContent_G56Tte
23
+ id: searchContent_0f3HpC
24
24
  autoSend: false
25
25
  variable: Topic.SearchResult
26
26
  userInput: =Topic.SearchQuery.SearchQuery
@@ -37,7 +37,7 @@ beginDialog:
37
37
  responseCaptureType: FullResponse
38
38
 
39
39
  - kind: SetVariable
40
- id: setVariable_v0bST4
40
+ id: setVariable_7GXPBx
41
41
  variable: Topic.Resposta
42
42
  value: =Topic.SearchResult.Text.Content
43
43
 
@@ -16,5 +16,5 @@ beginDialog:
16
16
 
17
17
  actions:
18
18
  - kind: SendActivity
19
- id: sendMessage_7tt58m
19
+ id: sendMessage_81SZFW
20
20
  activity: "A transferência para um atendente ainda não está disponível neste canal. Fale com a nossa equipe pelo e-mail promocoes@bodegaazul.example, de segunda a sábado, das 9h às 18h."
@@ -8,13 +8,13 @@ beginDialog:
8
8
  priority: -1
9
9
  actions:
10
10
  - kind: ConditionGroup
11
- id: conditionGroup_cyPfzf
11
+ id: conditionGroup_jc7tt5
12
12
  conditions:
13
- - id: conditionItem_TVpF0N
13
+ - id: conditionItem_8m5nw9
14
14
  condition: =System.FallbackCount < 3
15
15
  actions:
16
16
  - kind: SendActivity
17
- id: sendMessage_DaL6jc
17
+ id: sendMessage_Bl0mZW
18
18
  activity:
19
19
  text:
20
20
  - "Desculpe, não entendi. Pode reformular a sua pergunta?"
@@ -22,11 +22,11 @@ beginDialog:
22
22
 
23
23
  elseActions:
24
24
  - kind: SendActivity
25
- id: sendMessage_Oy9Aaj
25
+ id: sendMessage_zfTVpF
26
26
  activity:
27
27
  text:
28
28
  - "Estou com dificuldade para entender o seu pedido. Vou te encaminhar para alguém da equipe Bodega Azul."
29
29
 
30
30
  - kind: BeginDialog
31
- id: beginDialog_H06jmh
31
+ id: beginDialog_0NDaL6
32
32
  dialog: cr7b2_bodegaCupons.topic.Escalate