@aintela/chat 0.9.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Memory-BUnmYGNv.js.map +1 -1
- package/dist/PersonaAvatar-tKaWpDeQ.js +199 -0
- package/dist/PersonaAvatar-tKaWpDeQ.js.map +1 -0
- package/dist/agent-team.d.ts +2 -0
- package/dist/agent-team.js +27 -0
- package/dist/agent-team.js.map +1 -0
- package/dist/components.js +7107 -7601
- package/dist/components.js.map +1 -1
- package/dist/{detachedRunActivity-jHa9SDv1.js → detachedRunActivity-CCrlilHK.js} +988 -901
- package/dist/detachedRunActivity-CCrlilHK.js.map +1 -0
- package/dist/hooks.js +1 -1
- package/dist/{httpSessionService-BIkDesYB.js → httpSessionService-BLiZMoLb.js} +117 -106
- package/dist/httpSessionService-BLiZMoLb.js.map +1 -0
- package/dist/index.js +284 -278
- package/dist/index.js.map +1 -1
- package/dist/models.js +1 -1
- package/dist/{serializer-DvR3nOcf.js → serializer-DvfyE4_t.js} +488 -461
- package/dist/serializer-DvfyE4_t.js.map +1 -0
- package/dist/services.js +2 -2
- package/dist/src/agentTeam.d.ts +3 -0
- package/dist/src/components/AgentTeam/PersonaAvatar.d.ts +7 -1
- package/dist/src/components/AgentTeam/__tests__/personaFixtures.d.ts +3 -0
- package/dist/src/components/AgentTeam/agentRoles.d.ts +2 -2
- package/dist/src/components/AgentTeam/chatAgent.d.ts +1 -1
- package/dist/src/components/AgentTeam/personas.d.ts +65 -4
- package/dist/src/components/AiChat/ChatPane/chatTurnLiveQuestion.test.d.ts +1 -0
- package/dist/src/components/AiChat/stateConfiguration.d.ts +19 -0
- package/dist/src/components/v2/PromptV2.d.ts +6 -0
- package/dist/src/models/Interaction.d.ts +6 -1
- package/dist/src/models/contexts.d.ts +6 -0
- package/dist/src/models/enums.d.ts +6 -1
- package/dist/src/models/semanticKernelModel/models.d.ts +10 -1
- package/dist/src/services/servers/AgentGatewayWSAsync.d.ts +31 -0
- package/dist/src/services/servers/gatewayQueueMessage.test.d.ts +1 -0
- package/dist/{useChatSessions-CyFKVtkk.js → useChatSessions-BI3bHoOh.js} +2 -2
- package/dist/{useChatSessions-CyFKVtkk.js.map → useChatSessions-BI3bHoOh.js.map} +1 -1
- package/package.json +8 -1
- package/dist/detachedRunActivity-jHa9SDv1.js.map +0 -1
- package/dist/httpSessionService-BIkDesYB.js.map +0 -1
- package/dist/serializer-DvR3nOcf.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Memory-BUnmYGNv.js","sources":["../src/models/contexts.ts","../src/models/Agent.ts","../src/models/Memory.ts"],"sourcesContent":["import type { Customer } from \"./Customer\";\nimport type { Agent } from \"./Agent\";\nimport { type IDBStorable } from \"./IDBStorable\";\n\nexport class Account {\n id: string;\n biName: string;\n\n constructor(id: string, biName: string) {\n this.id = id;\n this.biName = biName;\n }\n\n getBiName() {\n return `BI_${this.biName}`;\n }\n}\n\nexport interface User extends IDBStorable {\n email: string;\n family_name: string;\n given_name: string;\n name: string;\n hd: string;\n picture: string;\n access_token: string;\n previous_access_token?: string;\n refresh_token?: string;\n account?: Account;\n}\n\nexport interface AuthState {\n isAuthenticated: boolean;\n isLoading: boolean;\n login: (userData: User) => void;\n logout: () => void;\n errorMessage: string | null;\n}\n\nexport interface AgentContext {\n agentConfig: Partial<Agent>;\n customer?: Customer;\n model?: string;\n}\n","export type AgentKind = 'ExplorerAgent' | 'DashboardAgent' | 'Unknown';\nexport const AgentKind = {\n ExplorerAgent: 'ExplorerAgent' as AgentKind,\n DashboardAgent: 'DashboardAgent' as AgentKind,\n Unknown: 'Unknown' as AgentKind,\n} as const;\n\n/**\n * Agent model - represents an AI agent configuration\n * Mirrors the .NET Agent entity in Envision.SemanticKernel.Models.Agent\n */\nexport interface Agent {\n id: string;\n name: string;\n type?: AgentKind;\n defaultModelId?: string;\n defaultQuickModelId?: string;\n description?: string;\n muiIconName?: string;\n embeddingConfigurationId: string;\n agentImplementation?: string;\n agentBootStrapImplementation?: string;\n parameters?: Record<string, string>;\n plugins: string[];\n /** List of additional main instruction IDs (Category: Main or Generic) for this agent */\n mainInstructionIds?: string[];\n lastUpdated?: Date;\n created?: Date;\n}\n\n/**\n * Partial agent for listing purposes (only essential fields)\n */\nexport type AgentSummary = Pick<Agent, 'id' | 'name' | 'description' | 'muiIconName' | 'type'>;\n","/**\n * Memory model - represents a semantic memory stored in MongoDB and Qdrant\n * Mirrors the .NET Memory entity in Envision.SemanticKernel.Core/Memory/Memory.cs\n */\n\n/**\n * Context types for memories - determines how they're filtered in semantic search\n */\nexport enum MemoryContexts {\n Table = 0, // Table schema information\n Metric = 1, // Business metrics and KPIs\n Chart = 2, // Chart/visualization descriptions\n Dashboards = 3, // Dashboard information\n Suggestions = 4, // Business recommendations\n Memory = 5 // General memories (no filter applied in search)\n}\n\n/**\n * Human-readable labels for each context type\n */\nexport const MemoryContextLabels: Record<MemoryContexts, string> = {\n [MemoryContexts.Table]: 'Table',\n [MemoryContexts.Metric]: 'Metric',\n [MemoryContexts.Chart]: 'Chart',\n [MemoryContexts.Dashboards]: 'Dashboards',\n [MemoryContexts.Suggestions]: 'Suggestions',\n [MemoryContexts.Memory]: 'Memory',\n};\n\n/**\n * Full Memory entity as stored in the database\n */\nexport interface SemanticMemory {\n id: string;\n memoryText: string;\n relatedTags?: string;\n created?: string;\n updatedAt?: string;\n // Runtime properties (populated by search results only)\n runtimeScore?: number;\n runtimeRank?: number;\n}\n\n/**\n * Input model for creating/updating memories\n * Does not include id, created, or runtime properties\n */\nexport interface SemanticMemoryInput {\n memoryText: string;\n relatedTags?: string;\n}\n\n/**\n * Options for semantic search\n */\nexport interface SemanticMemorySearchOptions {\n relatedTable?: string;\n relatedContext?: MemoryContexts;\n relatedTags?: string;\n limit?: number;\n}\n"],"names":["_Account","id","biName","__publicField","__name","Account","AgentKind","MemoryContexts","MemoryContextLabels"],"mappings":";;;;AAIO,MAAMA,IAAN,MAAMA,EAAQ;AAAA,EAIjB,YAAYC,GAAYC,GAAgB;AAHxC,IAAAC,EAAA;AACA,IAAAA,EAAA;AAGI,SAAK,KAAKF,GACV,KAAK,SAASC;AAAA,EAClB;AAAA,EAEA,YAAY;AACR,WAAO,MAAM,KAAK,MAAM;AAAA,EAC5B;AACJ;AAZqBE,EAAAJ,GAAA;AAAd,IAAMK,IAANL;ACHA,MAAMM,IAAY;AAAA,EACrB,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,SAAS;AACb;ACGO,IAAKC,sBAAAA,OACRA,EAAAA,EAAA,QAAQ,CAAA,IAAR,SACAA,EAAAA,EAAA,SAAS,CAAA,IAAT,UACAA,EAAAA,EAAA,QAAQ,CAAA,IAAR,SACAA,EAAAA,EAAA,aAAa,CAAA,IAAb,cACAA,EAAAA,EAAA,cAAc,CAAA,IAAd,eACAA,EAAAA,EAAA,SAAS,CAAA,IAAT,UANQA,IAAAA,KAAA,CAAA,CAAA;AAYL,MAAMC,IAAsD;AAAA,EAC9D,GAAuB;AAAA,EACvB,GAAwB;AAAA,EACxB,GAAuB;AAAA,EACvB,GAA4B;AAAA,EAC5B,GAA6B;AAAA,EAC7B,GAAwB;AAC7B;"}
|
|
1
|
+
{"version":3,"file":"Memory-BUnmYGNv.js","sources":["../src/models/contexts.ts","../src/models/Agent.ts","../src/models/Memory.ts"],"sourcesContent":["import type { Customer } from \"./Customer\";\nimport type { Agent } from \"./Agent\";\nimport { type IDBStorable } from \"./IDBStorable\";\n\nexport class Account {\n id: string;\n biName: string;\n\n constructor(id: string, biName: string) {\n this.id = id;\n this.biName = biName;\n }\n\n getBiName() {\n return `BI_${this.biName}`;\n }\n}\n\nexport interface User extends IDBStorable {\n email: string;\n family_name: string;\n given_name: string;\n name: string;\n hd: string;\n picture: string;\n access_token: string;\n previous_access_token?: string;\n refresh_token?: string;\n account?: Account;\n}\n\nexport interface AuthState {\n isAuthenticated: boolean;\n isLoading: boolean;\n login: (userData: User) => void;\n logout: () => void;\n errorMessage: string | null;\n}\n\nexport interface AgentContext {\n agentConfig: Partial<Agent>;\n customer?: Customer;\n model?: string;\n /**\n * Extra `Message.Parameters` the host adds to every message, read at SEND time (so it can change between\n * conversations without rebuilding the engine). AIA sends the named agent it showed before the first message\n * (`NamedAgentId`, AIA Issue 1625). Keys the library sets itself win over these.\n */\n parameters?: () => Record<string, string> | undefined;\n}\n","export type AgentKind = 'ExplorerAgent' | 'DashboardAgent' | 'Unknown';\nexport const AgentKind = {\n ExplorerAgent: 'ExplorerAgent' as AgentKind,\n DashboardAgent: 'DashboardAgent' as AgentKind,\n Unknown: 'Unknown' as AgentKind,\n} as const;\n\n/**\n * Agent model - represents an AI agent configuration\n * Mirrors the .NET Agent entity in Envision.SemanticKernel.Models.Agent\n */\nexport interface Agent {\n id: string;\n name: string;\n type?: AgentKind;\n defaultModelId?: string;\n defaultQuickModelId?: string;\n description?: string;\n muiIconName?: string;\n embeddingConfigurationId: string;\n agentImplementation?: string;\n agentBootStrapImplementation?: string;\n parameters?: Record<string, string>;\n plugins: string[];\n /** List of additional main instruction IDs (Category: Main or Generic) for this agent */\n mainInstructionIds?: string[];\n lastUpdated?: Date;\n created?: Date;\n}\n\n/**\n * Partial agent for listing purposes (only essential fields)\n */\nexport type AgentSummary = Pick<Agent, 'id' | 'name' | 'description' | 'muiIconName' | 'type'>;\n","/**\n * Memory model - represents a semantic memory stored in MongoDB and Qdrant\n * Mirrors the .NET Memory entity in Envision.SemanticKernel.Core/Memory/Memory.cs\n */\n\n/**\n * Context types for memories - determines how they're filtered in semantic search\n */\nexport enum MemoryContexts {\n Table = 0, // Table schema information\n Metric = 1, // Business metrics and KPIs\n Chart = 2, // Chart/visualization descriptions\n Dashboards = 3, // Dashboard information\n Suggestions = 4, // Business recommendations\n Memory = 5 // General memories (no filter applied in search)\n}\n\n/**\n * Human-readable labels for each context type\n */\nexport const MemoryContextLabels: Record<MemoryContexts, string> = {\n [MemoryContexts.Table]: 'Table',\n [MemoryContexts.Metric]: 'Metric',\n [MemoryContexts.Chart]: 'Chart',\n [MemoryContexts.Dashboards]: 'Dashboards',\n [MemoryContexts.Suggestions]: 'Suggestions',\n [MemoryContexts.Memory]: 'Memory',\n};\n\n/**\n * Full Memory entity as stored in the database\n */\nexport interface SemanticMemory {\n id: string;\n memoryText: string;\n relatedTags?: string;\n created?: string;\n updatedAt?: string;\n // Runtime properties (populated by search results only)\n runtimeScore?: number;\n runtimeRank?: number;\n}\n\n/**\n * Input model for creating/updating memories\n * Does not include id, created, or runtime properties\n */\nexport interface SemanticMemoryInput {\n memoryText: string;\n relatedTags?: string;\n}\n\n/**\n * Options for semantic search\n */\nexport interface SemanticMemorySearchOptions {\n relatedTable?: string;\n relatedContext?: MemoryContexts;\n relatedTags?: string;\n limit?: number;\n}\n"],"names":["_Account","id","biName","__publicField","__name","Account","AgentKind","MemoryContexts","MemoryContextLabels"],"mappings":";;;;AAIO,MAAMA,IAAN,MAAMA,EAAQ;AAAA,EAIjB,YAAYC,GAAYC,GAAgB;AAHxC,IAAAC,EAAA;AACA,IAAAA,EAAA;AAGI,SAAK,KAAKF,GACV,KAAK,SAASC;AAAA,EAClB;AAAA,EAEA,YAAY;AACR,WAAO,MAAM,KAAK,MAAM;AAAA,EAC5B;AACJ;AAZqBE,EAAAJ,GAAA;AAAd,IAAMK,IAANL;ACHA,MAAMM,IAAY;AAAA,EACrB,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,SAAS;AACb;ACGO,IAAKC,sBAAAA,OACRA,EAAAA,EAAA,QAAQ,CAAA,IAAR,SACAA,EAAAA,EAAA,SAAS,CAAA,IAAT,UACAA,EAAAA,EAAA,QAAQ,CAAA,IAAR,SACAA,EAAAA,EAAA,aAAa,CAAA,IAAb,cACAA,EAAAA,EAAA,cAAc,CAAA,IAAd,eACAA,EAAAA,EAAA,SAAS,CAAA,IAAT,UANQA,IAAAA,KAAA,CAAA,CAAA;AAYL,MAAMC,IAAsD;AAAA,EAC9D,GAAuB;AAAA,EACvB,GAAwB;AAAA,EACxB,GAAuB;AAAA,EACvB,GAA4B;AAAA,EAC5B,GAA6B;AAAA,EAC7B,GAAwB;AAC7B;"}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
var F = Object.defineProperty;
|
|
2
|
+
var t = (e, o) => F(e, "name", { value: o, configurable: !0 });
|
|
3
|
+
import { jsx as s, jsxs as M, Fragment as O } from "react/jsx-runtime";
|
|
4
|
+
import { useSyncExternalStore as B, useId as Z } from "react";
|
|
5
|
+
import f from "@mui/material/Box";
|
|
6
|
+
import { useTheme as j } from "@mui/material/styles";
|
|
7
|
+
const x = /* @__PURE__ */ t((e, o) => Math.min(o, Math.max(0, Math.round(Number.isFinite(e) ? e : 0))), "clampInt");
|
|
8
|
+
function ae(e) {
|
|
9
|
+
var n;
|
|
10
|
+
const o = e.gender === "f" ? "f" : "m", a = ((n = e.tail) == null ? void 0 : n.trim()) ?? "";
|
|
11
|
+
return {
|
|
12
|
+
id: e.id,
|
|
13
|
+
name: e.name,
|
|
14
|
+
gender: o,
|
|
15
|
+
voice: e.voice,
|
|
16
|
+
tail: a,
|
|
17
|
+
hello: `Olá, sou ${o === "f" ? "a" : "o"} ${e.name}, ${o === "f" ? "agente autônoma" : "agente autônomo"} especialista em viagens corporativas.${a ? " " + a : ""}`,
|
|
18
|
+
look: {
|
|
19
|
+
skin: x(e.look.skin, 5),
|
|
20
|
+
hair: e.look.hair,
|
|
21
|
+
hairColor: e.look.hairColor,
|
|
22
|
+
shirt: x(e.look.shirt, 7),
|
|
23
|
+
bg: x(e.look.background, 5),
|
|
24
|
+
top: e.look.top,
|
|
25
|
+
glasses: e.look.glasses || void 0,
|
|
26
|
+
beard: e.look.beard || void 0,
|
|
27
|
+
hearingAid: e.look.hearingAid || void 0,
|
|
28
|
+
part: e.look.part || void 0,
|
|
29
|
+
cover: e.look.cover || void 0
|
|
30
|
+
},
|
|
31
|
+
comm: {
|
|
32
|
+
address: e.sheet.address,
|
|
33
|
+
formality: Math.min(5, Math.max(1, Math.round(e.sheet.formality))),
|
|
34
|
+
exclamation: e.sheet.exclamation,
|
|
35
|
+
emoji: e.sheet.emoji,
|
|
36
|
+
region: e.sheet.region,
|
|
37
|
+
regionalMarks: e.sheet.regionalMarks,
|
|
38
|
+
samples: { badNews: e.sheet.badNews, issued: e.sheet.issued, approval: e.sheet.approval, closing: e.sheet.closing }
|
|
39
|
+
},
|
|
40
|
+
avatarUrl: e.avatarUrl || void 0,
|
|
41
|
+
active: e.active,
|
|
42
|
+
suggestRank: e.suggestRank ?? void 0
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
t(ae, "personaFromDto");
|
|
46
|
+
let C = { all: [], byId: /* @__PURE__ */ new Map() };
|
|
47
|
+
const L = /* @__PURE__ */ new Set();
|
|
48
|
+
function oe(e) {
|
|
49
|
+
const o = [...e].sort((a, n) => a.name.localeCompare(n.name, "pt-BR") || a.id.localeCompare(n.id));
|
|
50
|
+
C = { all: o, byId: new Map(o.map((a) => [a.id, a])) }, L.forEach((a) => a());
|
|
51
|
+
}
|
|
52
|
+
t(oe, "setPersonaCatalog");
|
|
53
|
+
const te = /* @__PURE__ */ t(() => C.all, "getPersonaCatalog"), R = /* @__PURE__ */ t((e) => e ? C.byId.get(e) : void 0, "findPersona"), D = /* @__PURE__ */ t((e) => (L.add(e), () => {
|
|
54
|
+
L.delete(e);
|
|
55
|
+
}), "subscribe"), se = /* @__PURE__ */ t(() => B(D, () => C.all, () => C.all), "usePersonaCatalog"), P = /* @__PURE__ */ t((e) => B(D, () => R(e), () => R(e)), "usePersona");
|
|
56
|
+
function re(e = C.all) {
|
|
57
|
+
return e.filter((o) => o.active).sort((o, a) => (o.suggestRank ?? Number.MAX_SAFE_INTEGER) - (a.suggestRank ?? Number.MAX_SAFE_INTEGER) || o.name.localeCompare(a.name, "pt-BR"));
|
|
58
|
+
}
|
|
59
|
+
t(re, "suggestionOrder");
|
|
60
|
+
const ie = /* @__PURE__ */ t((e) => e.gender === "f" ? "a" : "o", "article"), ne = [
|
|
61
|
+
{ title: "Tratamento", rule: '"Você" por padrão. Quem começa com "o senhor" passa a "você" assim que o viajante usar "você". Nenhuma persona usa apelido ("querido", "meu bem").' },
|
|
62
|
+
{ title: "Formalidade", rule: "Varia de 2 a 5. O conteúdo é igual em todas: mesmo dado, mesma ordem, mesma política. Só muda o tom e o ritmo." },
|
|
63
|
+
{ title: "Exclamação e emoji", rule: "Nunca em má notícia, cobrança ou aprovação. O emoji só aparece no encerramento e só se o viajante usou um antes." },
|
|
64
|
+
{ title: "Má notícia", rule: "Diz o fato na primeira frase e a alternativa na segunda. Sem pedir desculpas em nome da companhia, sem minimizar." },
|
|
65
|
+
{ title: "Emissão", rule: 'Sempre "Emitido" (ou equivalente) e o localizador em mono. O que vem depois varia por persona.' },
|
|
66
|
+
{ title: "Aprovação", rule: "Diz quanto passa da política, quem aprova (pelo nome) e pergunta antes de enviar." },
|
|
67
|
+
{ title: "Regionalismo", rule: "Leve: no máximo uma marca por conversa, nunca em dados, preços ou política. Quatro personas são neutras." }
|
|
68
|
+
], q = ["res", "pos", "pol", "evt"], I = {
|
|
69
|
+
res: { label: "Agente de Reservas", short: "Reservas", product: "Booking Agent", specialty: "viagens corporativas" },
|
|
70
|
+
pos: { label: "Agente de Pós-venda", short: "Pós-venda", product: "Trip Assistant Agent", specialty: "pós-venda" },
|
|
71
|
+
pol: { label: "Agente de Políticas e Aprovações", short: "Políticas e Aprovações", product: "Políticas e Aprovações", specialty: "políticas e aprovações" },
|
|
72
|
+
evt: { label: "Agente de Eventos e Grupos", short: "Eventos", product: "Eventos", specialty: "eventos e grupos" }
|
|
73
|
+
}, le = {
|
|
74
|
+
res: "de reservas",
|
|
75
|
+
pos: "do pós-venda",
|
|
76
|
+
pol: "de políticas e aprovações",
|
|
77
|
+
evt: "de eventos e grupos"
|
|
78
|
+
}, k = { res: "#9BC024", pos: "#6E9CC0", pol: "#C29A5E", evt: "#B07AA8" }, ce = {
|
|
79
|
+
res: "Busca e reserva voos dentro da política da {org}, emite os bilhetes e acompanha a viagem até o embarque.",
|
|
80
|
+
pos: "Cuida do que vem depois da emissão: remarcações, cancelamentos, assentos e reembolsos.",
|
|
81
|
+
pol: "Confere cada viagem com a política da {org} e encaminha aprovações para quem decide.",
|
|
82
|
+
evt: "Organiza viagens de eventos e grupos, com várias origens para um mesmo destino."
|
|
83
|
+
}, pe = /* @__PURE__ */ t((e) => typeof e == "string" && q.includes(e), "isAgentRole"), N = /* @__PURE__ */ t((e) => e === "f" ? "a" : "o", "articleFor"), S = /* @__PURE__ */ t((e) => e === "f" ? "agente autônoma" : "agente autônomo", "autonomousAgent"), y = /* @__PURE__ */ t((e) => `${e.name}, ${S(e.gender)}`, "avatarAlt");
|
|
84
|
+
function _(e, o, a, n) {
|
|
85
|
+
return `Olá, sou ${N(o)} ${e}, ${S(o)} especialista em ${I[a].specialty}.${n ? " " + n : ""}`;
|
|
86
|
+
}
|
|
87
|
+
t(_, "greeting");
|
|
88
|
+
function T(e) {
|
|
89
|
+
if (e.tail !== void 0) return e.tail.trim();
|
|
90
|
+
const o = /especialista em [^.]*\.\s*(.*)$/.exec(e.hello);
|
|
91
|
+
return o ? o[1].trim() : "";
|
|
92
|
+
}
|
|
93
|
+
t(T, "personaTail");
|
|
94
|
+
const de = /* @__PURE__ */ t((e, o) => _(e.name, e.gender, o, T(e)), "personaGreeting"), G = ["#F2D3B8", "#E3B791", "#C98F66", "#A26A47", "#7A4A2E", "#55341F"], $ = { black: "#1F1B18", dbrown: "#3A281D", brown: "#6A4730", auburn: "#8C4A2B", blond: "#C8A064", gray: "#A9A39A", white: "#DEDAD3" }, w = ["#3E4A5C", "#5B6B4E", "#7A5A48", "#2F5050", "#5F5374", "#4A4A46", "#8B6F47", "#3D5A73"], U = ["#E4E9D3", "#DCE5EC", "#EDE2D4", "#E4DEEC", "#D9E7E0", "#ECE5D0"], b = "#1D1B19", W = "#F4F1EA", Q = "rgba(0,0,0,.14)", i = {
|
|
95
|
+
shoulders: "M8 66 C8 52 18 45.5 32 45.5 C46 45.5 56 52 56 66Z",
|
|
96
|
+
neck: "M27.5 35 h9 v11 q-4.5 3 -9 0Z",
|
|
97
|
+
collar: "M25.5 46.2 L32 53 L38.5 46.2 L36.4 45.4 L32 49.6 L27.6 45.4Z",
|
|
98
|
+
scarf: "M25 44 Q32 49.5 39 44 L40.5 47.5 Q32 53.5 23.5 47.5Z",
|
|
99
|
+
backLong: "M19.5 30 C18 15 25 11.5 32 11.5 C39 11.5 46 15 44.5 30 L46 51 C40 53.5 24 53.5 18 51Z",
|
|
100
|
+
backWavy: "M19 37 C16 17 24 12 32 12 C40 12 48 17 45 37 C42.5 40 21.5 40 19 37Z",
|
|
101
|
+
hijabBack: "M15.5 54 C14 38 16 12.5 32 12.5 C48 12.5 50 38 48.5 54 C44 58 20 58 15.5 54Z",
|
|
102
|
+
hijabBand: "M21.6 27 C21 17.5 26 15.2 32 15.2 C38 15.2 43 17.5 42.4 27 C40.5 21 36.5 19.8 32 19.8 C27.5 19.8 23.5 21 21.6 27Z",
|
|
103
|
+
hijabDrape: "M19 41 C23 49 41 49 45 41 L50 56 L14 56Z",
|
|
104
|
+
short: "M21 27 C20.5 17.5 26 14.5 32 14.5 C38.5 14.5 43.5 17.5 43 27 C41.5 21.5 37.5 19.5 32 20 C26.5 19.5 22.5 21.5 21 27Z",
|
|
105
|
+
side: "M21 28 C20 17 26 14 32.5 14 C39.5 14 44 18 43 28 C42 23.5 40.5 21 38 20 C34 23 27 23.5 21 28Z",
|
|
106
|
+
part: "M21 29 C20 17 26 14 32 14 C38 14 44 17 43 29 C41 22 36.5 19.5 32 20.5 C27.5 19.5 23 22 21 29Z",
|
|
107
|
+
buzz: "M21.5 24.5 C22 18 26.5 15.5 32 15.5 C37.5 15.5 42 18 42.5 24.5 C40 20.5 36 19.5 32 19.5 C28 19.5 24 20.5 21.5 24.5Z",
|
|
108
|
+
pulled: "M21.2 27 C21 18 26 15 32 15 C38 15 43 18 42.8 27 C41 21 37 19 32 19 C27 19 23 21 21.2 27Z",
|
|
109
|
+
tuftL: "M21.2 31 C20.8 26 21.4 24 22.9 23 L23.4 31Z",
|
|
110
|
+
tuftR: "M42.8 31 C43.2 26 42.6 24 41.1 23 L40.6 31Z",
|
|
111
|
+
beard: "M21.8 31 C22.5 39.5 27 42.5 32 42.5 C37 42.5 41.5 39.5 42.2 31 C40.5 35 38 36.4 35.5 35.8 C33.5 35.2 30.5 35.2 28.5 35.8 C26 36.4 23.5 35 21.8 31Z"
|
|
112
|
+
}, H = [[24.5, 20.5, 3.8], [28.5, 17.5, 4.2], [33, 16.5, 4.4], [37.5, 17.8, 4.1], [40.6, 21.2, 3.5]];
|
|
113
|
+
function V({ p: e, role: o }) {
|
|
114
|
+
const a = e.look, n = G[a.skin], l = $[a.hairColor] ?? $.black, v = w[a.shirt], c = [];
|
|
115
|
+
let d = 0;
|
|
116
|
+
const p = /* @__PURE__ */ t((m, g) => c.push(/* @__PURE__ */ s("path", { d: m, fill: g }, d++)), "path"), r = /* @__PURE__ */ t((m, g, A, E) => c.push(/* @__PURE__ */ s("circle", { cx: m, cy: g, r: A, fill: E }, d++)), "circ");
|
|
117
|
+
if (c.push(/* @__PURE__ */ s("rect", { width: "64", height: "64", fill: U[a.bg] }, d++)), a.cover ? p(i.hijabBack, a.cover) : (a.hair === "long" && p(i.backLong, l), a.hair === "wavy" && p(i.backWavy, l), a.hair === "curly" && (r(32, 24, 15, l), r(19.5, 31, 6, l), r(44.5, 31, 6, l)), a.hair === "afro" && r(32, 23, 17.5, l), a.hair === "bun" && r(32, 12.5, 5.5, l)), p(i.shoulders, v), a.top === "lanyard" && c.push(/* @__PURE__ */ s("path", { d: "M28 46 L30 66 M36 46 L34 66", stroke: o ? k[o] : "#C9C4BA", strokeWidth: "1.6", fill: "none" }, d++)), p(i.neck, n), c.push(/* @__PURE__ */ s("path", { d: "M27.5 40 q4.5 2.6 9 0 v-3 h-9z", fill: Q }, d++)), a.top === "collar" && !a.cover && p(i.collar, W), a.top === "scarf" && !a.cover) {
|
|
118
|
+
const m = w[(a.shirt + 3) % 8];
|
|
119
|
+
p(i.scarf, m === v ? "#C29A5E" : m);
|
|
120
|
+
}
|
|
121
|
+
if (a.cover && p(i.hijabDrape, a.cover), a.cover || (r(21.6, 30, 2.3, n), r(42.4, 30, 2.3, n)), c.push(/* @__PURE__ */ s("ellipse", { cx: "32", cy: "28.5", rx: a.cover ? 9.8 : 10.5, ry: a.cover ? 12 : 12.5, fill: n }, d++)), a.beard && p(i.beard, l), a.cover) p(i.hijabBand, a.cover);
|
|
122
|
+
else {
|
|
123
|
+
const m = { short: i.short, side: i.side, buzz: i.buzz, bun: i.pulled, long: a.part ? i.part : i.side, wavy: i.part }[a.hair];
|
|
124
|
+
m && p(m, l), a.hair === "bald" && (p(i.tuftL, l), p(i.tuftR, l)), (a.hair === "curly" || a.hair === "afro") && H.forEach(([g, A, E]) => r(g, A - (a.hair === "afro" ? 0.5 : 0), E, l));
|
|
125
|
+
}
|
|
126
|
+
const h = 29.5;
|
|
127
|
+
r(28, h, 1.35, b), r(36, h, 1.35, b);
|
|
128
|
+
const u = a.beard ? 34.6 : 35;
|
|
129
|
+
return c.push(/* @__PURE__ */ s("path", { d: `M28.8 ${u} Q32 ${u + 2.3} 35.2 ${u}`, stroke: a.beard ? "#F1E7DC" : b, strokeWidth: 1.25, strokeLinecap: "round", fill: "none" }, d++)), a.glasses && c.push(/* @__PURE__ */ M("g", { fill: "none", stroke: b, strokeWidth: "1.1", children: [
|
|
130
|
+
/* @__PURE__ */ s("circle", { cx: "28", cy: h, r: "3.4" }),
|
|
131
|
+
/* @__PURE__ */ s("circle", { cx: "36", cy: h, r: "3.4" }),
|
|
132
|
+
/* @__PURE__ */ s("path", { d: `M31.4 ${h} h1.2` })
|
|
133
|
+
] }, d++)), a.hearingAid && c.push(/* @__PURE__ */ s("path", { d: "M20 28 q-2 2.2 0 4.6", stroke: o === "res" || !o ? k.pos : k.res, strokeWidth: "1.8", strokeLinecap: "round", fill: "none" }, d++)), /* @__PURE__ */ s(O, { children: c });
|
|
134
|
+
}
|
|
135
|
+
t(V, "AvatarArt");
|
|
136
|
+
function z({ persona: e, size: o = 32, role: a, pin: n, ring: l, dimmed: v }) {
|
|
137
|
+
const c = j(), d = Z(), p = P(typeof e == "string" ? e : void 0), r = typeof e == "string" ? p : e, h = n ?? (!!a && o >= 48), u = c.palette.mode === "dark" ? "rgba(255,255,255,.08)" : "rgba(17,17,17,.06)", m = Math.max(8, o * 0.17);
|
|
138
|
+
return /* @__PURE__ */ M(f, { component: "span", sx: { position: "relative", display: "inline-block", width: o, height: o, flex: "none", opacity: v ? 0.85 : 1 }, children: [
|
|
139
|
+
r != null && r.avatarUrl ? /* @__PURE__ */ s(
|
|
140
|
+
f,
|
|
141
|
+
{
|
|
142
|
+
component: "img",
|
|
143
|
+
src: r.avatarUrl,
|
|
144
|
+
alt: y(r),
|
|
145
|
+
width: o,
|
|
146
|
+
height: o,
|
|
147
|
+
sx: { display: "block", width: o, height: o, objectFit: "cover", borderRadius: "50%", boxShadow: l ? `0 0 0 2px ${c.palette.background.paper}, 0 0 0 3.5px ${c.palette.primary.dark}` : `0 0 0 1px ${u}` }
|
|
148
|
+
}
|
|
149
|
+
) : /* @__PURE__ */ M(
|
|
150
|
+
f,
|
|
151
|
+
{
|
|
152
|
+
component: "svg",
|
|
153
|
+
width: o,
|
|
154
|
+
height: o,
|
|
155
|
+
viewBox: "0 0 64 64",
|
|
156
|
+
role: "img",
|
|
157
|
+
"aria-label": r ? y(r) : "Agente",
|
|
158
|
+
sx: { display: "block", borderRadius: "50%", boxShadow: l ? `0 0 0 2px ${c.palette.background.paper}, 0 0 0 3.5px ${c.palette.primary.dark}` : `0 0 0 1px ${u}` },
|
|
159
|
+
children: [
|
|
160
|
+
/* @__PURE__ */ s("title", { children: r ? y(r) : "Agente" }),
|
|
161
|
+
/* @__PURE__ */ s("defs", { children: /* @__PURE__ */ s("clipPath", { id: d, children: /* @__PURE__ */ s("circle", { cx: "32", cy: "32", r: "32" }) }) }),
|
|
162
|
+
/* @__PURE__ */ s("g", { clipPath: `url(#${d})`, children: r ? /* @__PURE__ */ s(V, { p: r, role: a }) : /* @__PURE__ */ s("rect", { width: "64", height: "64", fill: u }) })
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
),
|
|
166
|
+
h && a && /* @__PURE__ */ s(f, { component: "span", title: a, sx: { position: "absolute", right: o * 0.02, bottom: o * 0.04, width: m, height: m, borderRadius: "50%", bgcolor: k[a], boxShadow: /* @__PURE__ */ t((g) => `0 0 0 2px ${g.palette.background.paper}`, "boxShadow") } })
|
|
167
|
+
] });
|
|
168
|
+
}
|
|
169
|
+
t(z, "PersonaAvatar");
|
|
170
|
+
function me({ ids: e, size: o = 26, max: a = 5 }) {
|
|
171
|
+
return /* @__PURE__ */ s(f, { sx: { display: "flex" }, children: e.slice(0, a).map((n, l) => /* @__PURE__ */ s(f, { sx: { ml: l ? "-6px" : 0, borderRadius: "50%", boxShadow: /* @__PURE__ */ t((v) => `0 0 0 2px ${v.palette.background.paper}`, "boxShadow"), display: "flex" }, children: /* @__PURE__ */ s(z, { persona: n, size: o }) }, n)) });
|
|
172
|
+
}
|
|
173
|
+
t(me, "AvatarStack");
|
|
174
|
+
export {
|
|
175
|
+
q as A,
|
|
176
|
+
z as P,
|
|
177
|
+
k as R,
|
|
178
|
+
ne as V,
|
|
179
|
+
me as a,
|
|
180
|
+
ce as b,
|
|
181
|
+
I as c,
|
|
182
|
+
le as d,
|
|
183
|
+
ie as e,
|
|
184
|
+
N as f,
|
|
185
|
+
S as g,
|
|
186
|
+
y as h,
|
|
187
|
+
R as i,
|
|
188
|
+
te as j,
|
|
189
|
+
_ as k,
|
|
190
|
+
pe as l,
|
|
191
|
+
de as m,
|
|
192
|
+
T as n,
|
|
193
|
+
re as o,
|
|
194
|
+
ae as p,
|
|
195
|
+
se as q,
|
|
196
|
+
oe as s,
|
|
197
|
+
P as u
|
|
198
|
+
};
|
|
199
|
+
//# sourceMappingURL=PersonaAvatar-tKaWpDeQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PersonaAvatar-tKaWpDeQ.js","sources":["../src/components/AgentTeam/personas.ts","../src/components/AgentTeam/agentRoles.ts","../src/components/AgentTeam/PersonaAvatar.tsx"],"sourcesContent":["// Catálogo de personas da Equipe de agentes. A biblioteca NÃO traz personas (AIA Issue 1625): elas vivem na coleção\n// aia_master.NamedAgents, e o app as entrega com setPersonaCatalog(...) — tipicamente lidas de\n// GET /api/agent-team/personas e convertidas com personaFromDto. Até lá, um id desconhecido desenha o avatar neutro.\n// Qualquer persona pode ocupar qualquer especialidade: a persona muda tom e ritmo, nunca conteúdo, dados ou política.\nimport { useSyncExternalStore } from 'react';\n\n/** O id de uma persona — o que times, cobranças e conversas referenciam (`diego`). */\nexport type PersonaId = string;\nexport type Gender = 'f' | 'm';\nexport type HairStyle = 'long' | 'short' | 'curly' | 'bun' | 'side' | 'wavy' | 'bald' | 'afro' | 'buzz' | 'none';\nexport type HairColor = 'black' | 'dbrown' | 'brown' | 'auburn' | 'blond' | 'gray' | 'white';\nexport type Top = 'collar' | 'crew' | 'scarf' | 'lanyard';\n\n/** Traços do avatar (direção 1 · Recorte). Índices apontam para as paletas fixas de AgentAvatar.tsx. */\nexport interface AvatarLook {\n skin: 0 | 1 | 2 | 3 | 4 | 5;\n hair: HairStyle;\n hairColor: HairColor;\n shirt: number; // 0–7\n bg: number; // 0–5\n top: Top;\n glasses?: boolean;\n beard?: boolean;\n /** aparelho auditivo */\n hearingAid?: boolean;\n /** risca no cabelo longo */\n part?: boolean;\n /** cor do véu (hijab); substitui o cabelo */\n cover?: string;\n}\n\nexport interface PersonaVoice {\n /** forma de tratamento */\n address: string;\n /** 1 (descontraído) – 5 (formal) */\n formality: 1 | 2 | 3 | 4 | 5;\n exclamation: string;\n emoji: string;\n region: string;\n /** marcas regionais leves — no máximo uma por conversa, nunca em dados/preço/política */\n regionalMarks: string;\n /** mesmo cenário para todas: voo cancelado · emissão LATAM 3510 (QX7M2P) · tarifa R$ 340 acima da política (aprovação da Marina) */\n samples: { badNews: string; issued: string; approval: string; closing: string };\n}\n\nexport interface Persona {\n id: PersonaId;\n name: string;\n gender: Gender;\n /** dois adjetivos */\n voice: string;\n /** saudação de reservas — formato fixo: \"Olá, sou {o|a} {Nome}, agente {autônomo|autônoma} especialista em {especialidade}.\" + frase própria */\n hello: string;\n /** a frase própria depois da saudação fixa */\n tail: string;\n look: AvatarLook;\n comm: PersonaVoice;\n /** ilustração que substitui o avatar gerado, quando houver */\n avatarUrl?: string;\n /** false: não é mais oferecida para contratação nem sugerida; times e conversas que a têm continuam a vê-la */\n active: boolean;\n /** posição em \"Sugerir outro\" (1 primeiro); ausente depois de todas as ranqueadas */\n suggestRank?: number;\n}\n\n/** Uma persona como a ProfileApi a serve (`GET /api/agent-team/personas`, `NamedAgentDto`). */\nexport interface NamedAgentDto {\n id: string;\n name: string;\n gender: string;\n voice: string;\n tail: string;\n sheet: {\n address: string; formality: number; exclamation: string; emoji: string; region: string; regionalMarks: string;\n badNews: string; issued: string; approval: string; closing: string;\n };\n look: {\n skin: number; hair: string; hairColor: string; shirt: number; background: number; top: string;\n glasses?: boolean; beard?: boolean; hearingAid?: boolean; part?: boolean; cover?: string | null;\n };\n avatarUrl?: string | null;\n active: boolean;\n suggestRank?: number | null;\n updatedAt?: string | null;\n updatedBy?: string | null;\n}\n\nconst clampInt = (v: number, max: number) => Math.min(max, Math.max(0, Math.round(Number.isFinite(v) ? v : 0)));\n\n/** A persona a partir do que a ProfileApi serve. */\nexport function personaFromDto(d: NamedAgentDto): Persona {\n const gender: Gender = d.gender === 'f' ? 'f' : 'm';\n const tail = d.tail?.trim() ?? '';\n return {\n id: d.id,\n name: d.name,\n gender,\n voice: d.voice,\n tail,\n hello: `Olá, sou ${gender === 'f' ? 'a' : 'o'} ${d.name}, ${gender === 'f' ? 'agente autônoma' : 'agente autônomo'} especialista em viagens corporativas.${tail ? ' ' + tail : ''}`,\n look: {\n skin: clampInt(d.look.skin, 5) as AvatarLook['skin'],\n hair: d.look.hair as HairStyle,\n hairColor: d.look.hairColor as HairColor,\n shirt: clampInt(d.look.shirt, 7),\n bg: clampInt(d.look.background, 5),\n top: d.look.top as Top,\n glasses: d.look.glasses || undefined,\n beard: d.look.beard || undefined,\n hearingAid: d.look.hearingAid || undefined,\n part: d.look.part || undefined,\n cover: d.look.cover || undefined,\n },\n comm: {\n address: d.sheet.address,\n formality: Math.min(5, Math.max(1, Math.round(d.sheet.formality))) as PersonaVoice['formality'],\n exclamation: d.sheet.exclamation,\n emoji: d.sheet.emoji,\n region: d.sheet.region,\n regionalMarks: d.sheet.regionalMarks,\n samples: { badNews: d.sheet.badNews, issued: d.sheet.issued, approval: d.sheet.approval, closing: d.sheet.closing },\n },\n avatarUrl: d.avatarUrl || undefined,\n active: d.active,\n suggestRank: d.suggestRank ?? undefined,\n };\n}\n\n// ── O catálogo carregado pelo app ──────────────────────────────────────────────────────────────────────────────────\n// Um store de módulo (não um contexto) porque também é lido fora do React — resolveChatAgent, os testes — e porque o\n// app o carrega uma vez para todas as telas. Os componentes assinam com usePersonaCatalog/usePersona e redesenham\n// quando ele chega ou muda.\n\ninterface CatalogState {\n all: readonly Persona[];\n byId: ReadonlyMap<string, Persona>;\n}\n\nlet state: CatalogState = { all: [], byId: new Map() };\nconst listeners = new Set<() => void>();\n\n/** Entrega (ou troca) o catálogo. Ordem: por nome. */\nexport function setPersonaCatalog(personas: readonly Persona[]): void {\n const all = [...personas].sort((a, b) => a.name.localeCompare(b.name, 'pt-BR') || a.id.localeCompare(b.id));\n state = { all, byId: new Map(all.map((p) => [p.id, p])) };\n listeners.forEach((l) => l());\n}\n\n/** Todas as personas carregadas, ativas ou não. */\nexport const getPersonaCatalog = (): readonly Persona[] => state.all;\n\n/** A persona deste id, ativa ou não; undefined quando o catálogo não a tem (ou ainda não chegou). */\nexport const findPersona = (id: PersonaId | null | undefined): Persona | undefined => (id ? state.byId.get(id) : undefined);\n\nconst subscribe = (l: () => void) => {\n listeners.add(l);\n return () => { listeners.delete(l); };\n};\n\n/** O catálogo, redesenhando quando ele chega ou muda. */\nexport const usePersonaCatalog = (): readonly Persona[] => useSyncExternalStore(subscribe, () => state.all, () => state.all);\n\n/** Uma persona por id, redesenhando quando o catálogo chega ou muda. */\nexport const usePersona = (id: PersonaId | null | undefined): Persona | undefined =>\n useSyncExternalStore(subscribe, () => findPersona(id), () => findPersona(id));\n\n/**\n * As personas que \"Sugerir outro\" percorre, na ordem: as ranqueadas primeiro, depois as demais por nome — só ativas.\n */\nexport function suggestionOrder(personas: readonly Persona[] = state.all): Persona[] {\n return personas\n .filter((p) => p.active)\n .sort((a, b) => (a.suggestRank ?? Number.MAX_SAFE_INTEGER) - (b.suggestRank ?? Number.MAX_SAFE_INTEGER)\n || a.name.localeCompare(b.name, 'pt-BR'));\n}\n\n/** \"a\" / \"o\" — artigo para frases como \"A Ana passa a sênior\", \"Liberar o Rafael\". */\nexport const article = (p: Persona) => (p.gender === 'f' ? 'a' : 'o');\n\n/** Regras de comunicação comuns a todas as personas (vão no system prompt do agente, acima da voz da persona). */\nexport const VOICE_RULES: { title: string; rule: string }[] = [\n { title: \"Tratamento\", rule: \"\\\"Você\\\" por padrão. Quem começa com \\\"o senhor\\\" passa a \\\"você\\\" assim que o viajante usar \\\"você\\\". Nenhuma persona usa apelido (\\\"querido\\\", \\\"meu bem\\\").\" },\n { title: \"Formalidade\", rule: \"Varia de 2 a 5. O conteúdo é igual em todas: mesmo dado, mesma ordem, mesma política. Só muda o tom e o ritmo.\" },\n { title: \"Exclamação e emoji\", rule: \"Nunca em má notícia, cobrança ou aprovação. O emoji só aparece no encerramento e só se o viajante usou um antes.\" },\n { title: \"Má notícia\", rule: \"Diz o fato na primeira frase e a alternativa na segunda. Sem pedir desculpas em nome da companhia, sem minimizar.\" },\n { title: \"Emissão\", rule: \"Sempre \\\"Emitido\\\" (ou equivalente) e o localizador em mono. O que vem depois varia por persona.\" },\n { title: \"Aprovação\", rule: \"Diz quanto passa da política, quem aprova (pelo nome) e pergunta antes de enviar.\" },\n { title: \"Regionalismo\", rule: \"Leve: no máximo uma marca por conversa, nunca em dados, preços ou política. Quatro personas são neutras.\" },\n];\n","// Equipe de agentes — especialidades e a frase com que um agente se apresenta.\n// Regra de marca: o produto nunca diz \"IA\" nem \"AI\". O agente é um \"agente autônomo especialista em …\".\nimport type { Gender, Persona } from './personas';\n\nexport type AgentRole = 'res' | 'pos' | 'pol' | 'evt';\n\nexport const AGENT_ROLES: readonly AgentRole[] = ['res', 'pos', 'pol', 'evt'];\n\nexport const ROLE_LABEL: Record<AgentRole, { label: string; short: string; product: string; specialty: string }> = {\n res: { label: 'Agente de Reservas', short: 'Reservas', product: 'Booking Agent', specialty: 'viagens corporativas' },\n pos: { label: 'Agente de Pós-venda', short: 'Pós-venda', product: 'Trip Assistant Agent', specialty: 'pós-venda' },\n pol: { label: 'Agente de Políticas e Aprovações', short: 'Políticas e Aprovações', product: 'Políticas e Aprovações', specialty: 'políticas e aprovações' },\n evt: { label: 'Agente de Eventos e Grupos', short: 'Eventos', product: 'Eventos', specialty: 'eventos e grupos' },\n};\n\n/** \"do pós-venda\", para \"Ana passou sua conversa para Bruno, do pós-venda.\" */\nexport const ROLE_OF: Record<AgentRole, string> = {\n res: 'de reservas',\n pos: 'do pós-venda',\n pol: 'de políticas e aprovações',\n evt: 'de eventos e grupos',\n};\n\n/**\n * Cor do pino de especialidade. Arte fixa, igual no claro e no escuro: o pino fica sobre o fundo do avatar.\n * O handoff sugere levar para `palette.agentRole` no tema do app.\n */\nexport const ROLE_COLOR: Record<AgentRole, string> = { res: '#9BC024', pos: '#6E9CC0', pol: '#C29A5E', evt: '#B07AA8' };\n\nexport const ROLE_DESC: Record<AgentRole, string> = {\n res: 'Busca e reserva voos dentro da política da {org}, emite os bilhetes e acompanha a viagem até o embarque.',\n pos: 'Cuida do que vem depois da emissão: remarcações, cancelamentos, assentos e reembolsos.',\n pol: 'Confere cada viagem com a política da {org} e encaminha aprovações para quem decide.',\n evt: 'Organiza viagens de eventos e grupos, com várias origens para um mesmo destino.',\n};\n\nexport const isAgentRole = (v: unknown): v is AgentRole => typeof v === 'string' && (AGENT_ROLES as readonly string[]).includes(v);\n\n/** \"a\" / \"o\" — \"a Ana\", \"o Diego\". */\nexport const articleFor = (gender: Gender) => (gender === 'f' ? 'a' : 'o');\n\n/** \"agente autônoma\" / \"agente autônomo\". */\nexport const autonomousAgent = (gender: Gender) => (gender === 'f' ? 'agente autônoma' : 'agente autônomo');\n\n/** \"Ana, agente autônoma\" — texto alternativo do avatar. */\nexport const avatarAlt = (p: Pick<Persona, 'name' | 'gender'>) => `${p.name}, ${autonomousAgent(p.gender)}`;\n\n/**\n * Saudação no formato fixo: \"Olá, sou o Roberto, agente autônomo especialista em viagens corporativas.\" + a frase\n * própria da persona. Trocar o papel troca só o trecho da especialidade.\n */\nexport function greeting(name: string, gender: Gender, role: AgentRole, tail?: string) {\n return `Olá, sou ${articleFor(gender)} ${name}, ${autonomousAgent(gender)} especialista em ${ROLE_LABEL[role].specialty}.${tail ? ' ' + tail : ''}`;\n}\n\n/** A frase própria da persona: o `tail` do catálogo, ou o que vem depois de \"… especialista em {especialidade}.\" no `hello`. */\nexport function personaTail(p: Pick<Persona, 'hello'> & Partial<Pick<Persona, 'tail'>>): string {\n if (p.tail !== undefined) return p.tail.trim();\n const m = /especialista em [^.]*\\.\\s*(.*)$/.exec(p.hello);\n return m ? m[1].trim() : '';\n}\n\n/** A saudação da persona ocupando um papel: a especialidade vem do papel, a frase final da persona. */\nexport const personaGreeting = (p: Pick<Persona, 'name' | 'gender' | 'hello'>, role: AgentRole) =>\n greeting(p.name, p.gender, role, personaTail(p));\n","import { useId, type ReactNode } from 'react';\nimport Box from '@mui/material/Box';\nimport { useTheme } from '@mui/material/styles';\nimport { usePersona, type Persona, type PersonaId } from './personas';\nimport { ROLE_COLOR, avatarAlt, type AgentRole } from './agentRoles';\n\n/*\n PersonaAvatar — avatar da persona, direção 1 · Recorte (escolhida em `Equipe - Avatares.html`).\n Formas chapadas sobre um círculo tingido, viewBox 64×64. Legível a 24 px no claro e no escuro.\n\n CORES FIXAS: pele, cabelo, roupa e fundo são ARTE, não tema. Não mudam no Grafite — o rosto é o mesmo em\n qualquer tema. Só o anel de 1 px (separação da superfície) e o anel de destaque vêm do tema.\n\n Provisório: são formas para fixar proporção, fundo e peso. A arte final vem de um ilustrador sobre esta direção;\n quando chegar, troque `AvatarArt` por <img src={persona.avatarUrl}> mantendo recorte, anel e pino.\n*/\nconst SKIN = ['#F2D3B8', '#E3B791', '#C98F66', '#A26A47', '#7A4A2E', '#55341F'];\nconst HAIR: Record<string, string> = { black: '#1F1B18', dbrown: '#3A281D', brown: '#6A4730', auburn: '#8C4A2B', blond: '#C8A064', gray: '#A9A39A', white: '#DEDAD3' };\nconst SHIRT = ['#3E4A5C', '#5B6B4E', '#7A5A48', '#2F5050', '#5F5374', '#4A4A46', '#8B6F47', '#3D5A73'];\nconst BG = ['#E4E9D3', '#DCE5EC', '#EDE2D4', '#E4DEEC', '#D9E7E0', '#ECE5D0'];\nconst INK = '#1D1B19';\nconst COLLAR = '#F4F1EA';\nconst SHADE = 'rgba(0,0,0,.14)';\n\nconst SH = {\n shoulders: 'M8 66 C8 52 18 45.5 32 45.5 C46 45.5 56 52 56 66Z',\n neck: 'M27.5 35 h9 v11 q-4.5 3 -9 0Z',\n collar: 'M25.5 46.2 L32 53 L38.5 46.2 L36.4 45.4 L32 49.6 L27.6 45.4Z',\n scarf: 'M25 44 Q32 49.5 39 44 L40.5 47.5 Q32 53.5 23.5 47.5Z',\n backLong: 'M19.5 30 C18 15 25 11.5 32 11.5 C39 11.5 46 15 44.5 30 L46 51 C40 53.5 24 53.5 18 51Z',\n backWavy: 'M19 37 C16 17 24 12 32 12 C40 12 48 17 45 37 C42.5 40 21.5 40 19 37Z',\n hijabBack: 'M15.5 54 C14 38 16 12.5 32 12.5 C48 12.5 50 38 48.5 54 C44 58 20 58 15.5 54Z',\n hijabBand: 'M21.6 27 C21 17.5 26 15.2 32 15.2 C38 15.2 43 17.5 42.4 27 C40.5 21 36.5 19.8 32 19.8 C27.5 19.8 23.5 21 21.6 27Z',\n hijabDrape: 'M19 41 C23 49 41 49 45 41 L50 56 L14 56Z',\n short: 'M21 27 C20.5 17.5 26 14.5 32 14.5 C38.5 14.5 43.5 17.5 43 27 C41.5 21.5 37.5 19.5 32 20 C26.5 19.5 22.5 21.5 21 27Z',\n side: 'M21 28 C20 17 26 14 32.5 14 C39.5 14 44 18 43 28 C42 23.5 40.5 21 38 20 C34 23 27 23.5 21 28Z',\n part: 'M21 29 C20 17 26 14 32 14 C38 14 44 17 43 29 C41 22 36.5 19.5 32 20.5 C27.5 19.5 23 22 21 29Z',\n buzz: 'M21.5 24.5 C22 18 26.5 15.5 32 15.5 C37.5 15.5 42 18 42.5 24.5 C40 20.5 36 19.5 32 19.5 C28 19.5 24 20.5 21.5 24.5Z',\n pulled: 'M21.2 27 C21 18 26 15 32 15 C38 15 43 18 42.8 27 C41 21 37 19 32 19 C27 19 23 21 21.2 27Z',\n tuftL: 'M21.2 31 C20.8 26 21.4 24 22.9 23 L23.4 31Z',\n tuftR: 'M42.8 31 C43.2 26 42.6 24 41.1 23 L40.6 31Z',\n beard: 'M21.8 31 C22.5 39.5 27 42.5 32 42.5 C37 42.5 41.5 39.5 42.2 31 C40.5 35 38 36.4 35.5 35.8 C33.5 35.2 30.5 35.2 28.5 35.8 C26 36.4 23.5 35 21.8 31Z',\n};\nconst CURLS: [number, number, number][] = [[24.5, 20.5, 3.8], [28.5, 17.5, 4.2], [33, 16.5, 4.4], [37.5, 17.8, 4.1], [40.6, 21.2, 3.5]];\n\nfunction AvatarArt({ p, role }: { p: AvatarSubject; role?: AgentRole }) {\n const l = p.look;\n const skin = SKIN[l.skin], hc = HAIR[l.hairColor] ?? HAIR.black, shirt = SHIRT[l.shirt];\n const out: ReactNode[] = [];\n let k = 0;\n const path = (d: string, fill: string) => out.push(<path key={k++} d={d} fill={fill} />);\n const circ = (cx: number, cy: number, r: number, fill: string) => out.push(<circle key={k++} cx={cx} cy={cy} r={r} fill={fill} />);\n\n out.push(<rect key={k++} width=\"64\" height=\"64\" fill={BG[l.bg]} />);\n if (l.cover) path(SH.hijabBack, l.cover);\n else {\n if (l.hair === 'long') path(SH.backLong, hc);\n if (l.hair === 'wavy') path(SH.backWavy, hc);\n if (l.hair === 'curly') { circ(32, 24, 15, hc); circ(19.5, 31, 6, hc); circ(44.5, 31, 6, hc); }\n if (l.hair === 'afro') circ(32, 23, 17.5, hc);\n if (l.hair === 'bun') circ(32, 12.5, 5.5, hc);\n }\n path(SH.shoulders, shirt);\n if (l.top === 'lanyard') out.push(<path key={k++} d=\"M28 46 L30 66 M36 46 L34 66\" stroke={role ? ROLE_COLOR[role] : '#C9C4BA'} strokeWidth=\"1.6\" fill=\"none\" />);\n path(SH.neck, skin);\n out.push(<path key={k++} d=\"M27.5 40 q4.5 2.6 9 0 v-3 h-9z\" fill={SHADE} />);\n if (l.top === 'collar' && !l.cover) path(SH.collar, COLLAR);\n if (l.top === 'scarf' && !l.cover) { const alt = SHIRT[(l.shirt + 3) % 8]; path(SH.scarf, alt === shirt ? '#C29A5E' : alt); }\n if (l.cover) path(SH.hijabDrape, l.cover);\n if (!l.cover) { circ(21.6, 30, 2.3, skin); circ(42.4, 30, 2.3, skin); }\n out.push(<ellipse key={k++} cx=\"32\" cy=\"28.5\" rx={l.cover ? 9.8 : 10.5} ry={l.cover ? 12 : 12.5} fill={skin} />);\n if (l.beard) path(SH.beard, hc);\n if (l.cover) path(SH.hijabBand, l.cover);\n else {\n const front = { short: SH.short, side: SH.side, buzz: SH.buzz, bun: SH.pulled, long: l.part ? SH.part : SH.side, wavy: SH.part }[l.hair as 'short'];\n if (front) path(front, hc);\n if (l.hair === 'bald') { path(SH.tuftL, hc); path(SH.tuftR, hc); }\n if (l.hair === 'curly' || l.hair === 'afro') CURLS.forEach(([x, y, r]) => circ(x, y - (l.hair === 'afro' ? 0.5 : 0), r, hc));\n }\n const fy = 29.5;\n circ(28, fy, 1.35, INK); circ(36, fy, 1.35, INK);\n const my = l.beard ? 34.6 : 35;\n out.push(<path key={k++} d={`M28.8 ${my} Q32 ${my + 2.3} 35.2 ${my}`} stroke={l.beard ? '#F1E7DC' : INK} strokeWidth={1.25} strokeLinecap=\"round\" fill=\"none\" />);\n if (l.glasses) out.push(<g key={k++} fill=\"none\" stroke={INK} strokeWidth=\"1.1\"><circle cx=\"28\" cy={fy} r=\"3.4\" /><circle cx=\"36\" cy={fy} r=\"3.4\" /><path d={`M31.4 ${fy} h1.2`} /></g>);\n if (l.hearingAid) out.push(<path key={k++} d=\"M20 28 q-2 2.2 0 4.6\" stroke={role === 'res' || !role ? ROLE_COLOR.pos : ROLE_COLOR.res} strokeWidth=\"1.8\" strokeLinecap=\"round\" fill=\"none\" />);\n return <>{out}</>;\n}\n\n/** What the avatar needs: a catalog persona, or a draft one (the admin console's preview). */\nexport type AvatarSubject = Pick<Persona, 'name' | 'gender' | 'look'> & { avatarUrl?: string };\n\nexport interface PersonaAvatarProps {\n /** An id (looked up in the loaded catalog — the neutral avatar until it arrives or when it does not have it) or the\n * persona itself. */\n persona: PersonaId | AvatarSubject;\n /** px. Tamanhos usados: 20 (passagem), 24 (chat mobile), 28 (chat desktop), 36/44/48/56/72/88. */\n size?: number;\n /** Mostra o pino de especialidade no canto. Por padrão só a partir de 48 px — no chat o texto do papel faz esse trabalho. */\n role?: AgentRole;\n pin?: boolean;\n /** Anel de destaque (ex.: cartão da persona aberto no header do chat). */\n ring?: boolean;\n dimmed?: boolean;\n}\n\nexport function PersonaAvatar({ persona, size = 32, role, pin, ring, dimmed }: PersonaAvatarProps) {\n const theme = useTheme();\n const clip = useId();\n const fromCatalog = usePersona(typeof persona === 'string' ? persona : undefined);\n const p = typeof persona === 'string' ? fromCatalog : persona;\n const showPin = pin ?? (!!role && size >= 48);\n const hairline = theme.palette.mode === 'dark' ? 'rgba(255,255,255,.08)' : 'rgba(17,17,17,.06)';\n const pinSize = Math.max(8, size * 0.17);\n return (\n <Box component=\"span\" sx={{ position: 'relative', display: 'inline-block', width: size, height: size, flex: 'none', opacity: dimmed ? 0.85 : 1 }}>\n {p?.avatarUrl ? (\n <Box\n component=\"img\"\n src={p.avatarUrl}\n alt={avatarAlt(p)}\n width={size}\n height={size}\n sx={{ display: 'block', width: size, height: size, objectFit: 'cover', borderRadius: '50%', boxShadow: ring ? `0 0 0 2px ${theme.palette.background.paper}, 0 0 0 3.5px ${theme.palette.primary.dark}` : `0 0 0 1px ${hairline}` }}\n />\n ) : (\n <Box\n component=\"svg\"\n width={size}\n height={size}\n viewBox=\"0 0 64 64\"\n role=\"img\"\n aria-label={p ? avatarAlt(p) : 'Agente'}\n sx={{ display: 'block', borderRadius: '50%', boxShadow: ring ? `0 0 0 2px ${theme.palette.background.paper}, 0 0 0 3.5px ${theme.palette.primary.dark}` : `0 0 0 1px ${hairline}` }}\n >\n <title>{p ? avatarAlt(p) : 'Agente'}</title>\n <defs><clipPath id={clip}><circle cx=\"32\" cy=\"32\" r=\"32\" /></clipPath></defs>\n {/* An id the catalog does not have (yet): a neutral disc, never someone else's face. */}\n <g clipPath={`url(#${clip})`}>{p ? <AvatarArt p={p} role={role} /> : <rect width=\"64\" height=\"64\" fill={hairline} />}</g>\n </Box>\n )}\n {showPin && role && (\n <Box component=\"span\" title={role} sx={{ position: 'absolute', right: size * 0.02, bottom: size * 0.04, width: pinSize, height: pinSize, borderRadius: '50%', bgcolor: ROLE_COLOR[role], boxShadow: (t) => `0 0 0 2px ${t.palette.background.paper}` }} />\n )}\n </Box>\n );\n}\n\n/** Pilha de avatares sobrepostos (linha \"quem entra\" do formulário de contratação). */\nexport function AvatarStack({ ids, size = 26, max = 5 }: { ids: PersonaId[]; size?: number; max?: number }) {\n return (\n <Box sx={{ display: 'flex' }}>\n {ids.slice(0, max).map((id, i) => (\n <Box key={id} sx={{ ml: i ? '-6px' : 0, borderRadius: '50%', boxShadow: (t) => `0 0 0 2px ${t.palette.background.paper}`, display: 'flex' }}>\n <PersonaAvatar persona={id} size={size} />\n </Box>\n ))}\n </Box>\n );\n}\n"],"names":["clampInt","__name","v","max","personaFromDto","d","gender","tail","_a","state","listeners","setPersonaCatalog","personas","all","b","p","l","getPersonaCatalog","findPersona","id","subscribe","usePersonaCatalog","useSyncExternalStore","usePersona","suggestionOrder","a","article","VOICE_RULES","AGENT_ROLES","ROLE_LABEL","ROLE_OF","ROLE_COLOR","ROLE_DESC","isAgentRole","articleFor","autonomousAgent","avatarAlt","greeting","name","role","personaTail","m","personaGreeting","SKIN","HAIR","SHIRT","BG","INK","COLLAR","SHADE","SH","CURLS","AvatarArt","skin","hc","shirt","out","k","path","fill","jsx","circ","cx","cy","r","alt","front","x","y","fy","my","jsxs","PersonaAvatar","persona","size","pin","ring","dimmed","theme","useTheme","clip","useId","fromCatalog","showPin","hairline","pinSize","Box","t","AvatarStack","ids","i"],"mappings":";;;;;;AAuFA,MAAMA,IAAW,gBAAAC,EAAA,CAACC,GAAWC,MAAgB,KAAK,IAAIA,GAAK,KAAK,IAAI,GAAG,KAAK,MAAM,OAAO,SAASD,CAAC,IAAIA,IAAI,CAAC,CAAC,CAAC,GAA7F;AAGV,SAASE,GAAeC,GAA2B;;AACxD,QAAMC,IAAiBD,EAAE,WAAW,MAAM,MAAM,KAC1CE,MAAOC,IAAAH,EAAE,SAAF,gBAAAG,EAAQ,WAAU;AAC/B,SAAO;AAAA,IACL,IAAIH,EAAE;AAAA,IACN,MAAMA,EAAE;AAAA,IACR,QAAAC;AAAA,IACA,OAAOD,EAAE;AAAA,IACT,MAAAE;AAAA,IACA,OAAO,YAAYD,MAAW,MAAM,MAAM,GAAG,IAAID,EAAE,IAAI,KAAKC,MAAW,MAAM,oBAAoB,iBAAiB,yCAAyCC,IAAO,MAAMA,IAAO,EAAE;AAAA,IACjL,MAAM;AAAA,MACJ,MAAMP,EAASK,EAAE,KAAK,MAAM,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uD,GAAY,EAAA,GADhCvD,CAEV,CACD,EAAA,CACH;AAEJ;AAVgBlB,EAAAuF,IAAA;"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { A as e, a as o, P as r, R as t, b as n, c as g, d as E, V as O, e as i, f as l, g as L, h as R, i as A, j as P, k as u, l as C, p as _, m as p, n as c, s as m, o as S, u as d, q as f } from "./PersonaAvatar-tKaWpDeQ.js";
|
|
2
|
+
export {
|
|
3
|
+
e as AGENT_ROLES,
|
|
4
|
+
o as AvatarStack,
|
|
5
|
+
r as PersonaAvatar,
|
|
6
|
+
t as ROLE_COLOR,
|
|
7
|
+
n as ROLE_DESC,
|
|
8
|
+
g as ROLE_LABEL,
|
|
9
|
+
E as ROLE_OF,
|
|
10
|
+
O as VOICE_RULES,
|
|
11
|
+
i as article,
|
|
12
|
+
l as articleFor,
|
|
13
|
+
L as autonomousAgent,
|
|
14
|
+
R as avatarAlt,
|
|
15
|
+
A as findPersona,
|
|
16
|
+
P as getPersonaCatalog,
|
|
17
|
+
u as greeting,
|
|
18
|
+
C as isAgentRole,
|
|
19
|
+
_ as personaFromDto,
|
|
20
|
+
p as personaGreeting,
|
|
21
|
+
c as personaTail,
|
|
22
|
+
m as setPersonaCatalog,
|
|
23
|
+
S as suggestionOrder,
|
|
24
|
+
d as usePersona,
|
|
25
|
+
f as usePersonaCatalog
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=agent-team.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-team.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|