@fayz-ai/plugin-support 0.3.0-canary.20261028142749 → 0.3.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 (105) hide show
  1. package/dist/{HelpdeskConsole-QY534ASZ.js → HelpdeskConsole-EATEBVLN.js} +10 -7
  2. package/dist/HelpdeskConsole-EATEBVLN.js.map +1 -0
  3. package/dist/{LiveChatAgentWatcher-J6PNLYWT.js → LiveChatAgentWatcher-WEUHRRLC.js} +17 -23
  4. package/dist/LiveChatAgentWatcher-WEUHRRLC.js.map +1 -0
  5. package/dist/{OpenTicketFromConversation-KDXK7A6L.js → OpenTicketFromConversation-RC26KHN3.js} +4 -4
  6. package/dist/{OpenTicketFromConversation-KDXK7A6L.js.map → OpenTicketFromConversation-RC26KHN3.js.map} +1 -1
  7. package/dist/{SupportCenter-JBBBJTKU.js → SupportCenter-HGQL4PBX.js} +12 -9
  8. package/dist/SupportCenter-HGQL4PBX.js.map +1 -0
  9. package/dist/{SupportSettingsPage-PB6A3VCI.js → SupportSettingsPage-LIVZY2XQ.js} +3 -3
  10. package/dist/{SupportSettingsPage-PB6A3VCI.js.map → SupportSettingsPage-LIVZY2XQ.js.map} +1 -1
  11. package/dist/chunk-3WPESEK2.js +136 -0
  12. package/dist/chunk-3WPESEK2.js.map +1 -0
  13. package/dist/chunk-5MGCM5C4.js +181 -0
  14. package/dist/chunk-5MGCM5C4.js.map +1 -0
  15. package/dist/{chunk-PIMV3VRT.js → chunk-DTO5R6GN.js} +26 -126
  16. package/dist/chunk-DTO5R6GN.js.map +1 -0
  17. package/dist/chunk-E5242OSS.js +88 -0
  18. package/dist/chunk-E5242OSS.js.map +1 -0
  19. package/dist/{chunk-M4LUNCKI.js → chunk-E5EXC7QW.js} +57 -16
  20. package/dist/chunk-E5EXC7QW.js.map +1 -0
  21. package/dist/chunk-JOS2QQML.js +17 -0
  22. package/dist/chunk-JOS2QQML.js.map +1 -0
  23. package/dist/{chunk-WOZTA5LS.js → chunk-L2HGTGW4.js} +6 -4
  24. package/dist/chunk-L2HGTGW4.js.map +1 -0
  25. package/dist/{chunk-37ZZRVI7.js → chunk-P4VNMWIT.js} +79 -186
  26. package/dist/chunk-P4VNMWIT.js.map +1 -0
  27. package/dist/{chunk-CWCN5PDE.js → chunk-PHIPTZSD.js} +48 -5
  28. package/dist/chunk-PHIPTZSD.js.map +1 -0
  29. package/dist/chunk-QBOQYER7.js +1603 -0
  30. package/dist/chunk-QBOQYER7.js.map +1 -0
  31. package/dist/{chunk-MQXGB4IO.js → chunk-S766CRAY.js} +42 -239
  32. package/dist/chunk-S766CRAY.js.map +1 -0
  33. package/dist/chunk-WHEJ63CM.js +156 -0
  34. package/dist/chunk-WHEJ63CM.js.map +1 -0
  35. package/dist/chunk-Y673XGDK.js +261 -0
  36. package/dist/chunk-Y673XGDK.js.map +1 -0
  37. package/dist/data/api.d.ts +5 -0
  38. package/dist/data/api.d.ts.map +1 -1
  39. package/dist/data/console.d.ts +6 -0
  40. package/dist/data/console.d.ts.map +1 -1
  41. package/dist/data/mock-host.d.ts.map +1 -1
  42. package/dist/data/provider.d.ts +12 -0
  43. package/dist/data/provider.d.ts.map +1 -1
  44. package/dist/host.d.ts +21 -0
  45. package/dist/host.d.ts.map +1 -1
  46. package/dist/host.js +24 -10
  47. package/dist/host.js.map +1 -1
  48. package/dist/in-chat-install-2BTKBF2Z.js +11 -0
  49. package/dist/in-chat-install-2BTKBF2Z.js.map +1 -0
  50. package/dist/index.js +18 -191
  51. package/dist/index.js.map +1 -1
  52. package/dist/lib/imported.d.ts +27 -0
  53. package/dist/lib/imported.d.ts.map +1 -0
  54. package/dist/lib/report-tool.d.ts +54 -9
  55. package/dist/lib/report-tool.d.ts.map +1 -1
  56. package/dist/lib/vocabulary.d.ts.map +1 -1
  57. package/dist/livechat/LiveChatAgentWatcher.d.ts +3 -2
  58. package/dist/livechat/LiveChatAgentWatcher.d.ts.map +1 -1
  59. package/dist/livechat/in-chat-install.d.ts +19 -0
  60. package/dist/livechat/in-chat-install.d.ts.map +1 -0
  61. package/dist/livechat/in-chat-link.d.ts +10 -0
  62. package/dist/livechat/in-chat-link.d.ts.map +1 -0
  63. package/dist/livechat/in-chat-machine.d.ts +99 -0
  64. package/dist/livechat/in-chat-machine.d.ts.map +1 -0
  65. package/dist/livechat/in-chat-request-machine.d.ts +147 -0
  66. package/dist/livechat/in-chat-request-machine.d.ts.map +1 -0
  67. package/dist/livechat/in-chat-request.d.ts +94 -0
  68. package/dist/livechat/in-chat-request.d.ts.map +1 -0
  69. package/dist/livechat/in-chat-widgets.d.ts +39 -0
  70. package/dist/livechat/in-chat-widgets.d.ts.map +1 -0
  71. package/dist/livechat/in-chat.d.ts +119 -0
  72. package/dist/livechat/in-chat.d.ts.map +1 -0
  73. package/dist/livechat/report-intake.d.ts +45 -0
  74. package/dist/livechat/report-intake.d.ts.map +1 -0
  75. package/dist/livechat/screen-capture.d.ts +7 -0
  76. package/dist/livechat/screen-capture.d.ts.map +1 -0
  77. package/dist/migrations/index.d.ts +2 -0
  78. package/dist/migrations/index.d.ts.map +1 -1
  79. package/dist/migrations/main.browser.js +3 -1
  80. package/dist/migrations/main.browser.js.map +1 -1
  81. package/dist/migrations/main.js +1181 -2
  82. package/dist/migrations/main.js.map +1 -1
  83. package/dist/realtime-HQVWBTML.js +3 -0
  84. package/dist/realtime-HQVWBTML.js.map +1 -0
  85. package/dist/screen-capture-FRMTTRUY.js +77 -0
  86. package/dist/screen-capture-FRMTTRUY.js.map +1 -0
  87. package/dist/types.d.ts +5 -1
  88. package/dist/types.d.ts.map +1 -1
  89. package/dist/views/SupportRequestsPanel.d.ts.map +1 -1
  90. package/dist/views/TicketSheet.d.ts +11 -1
  91. package/dist/views/TicketSheet.d.ts.map +1 -1
  92. package/package.json +5 -5
  93. package/dist/HelpdeskConsole-QY534ASZ.js.map +0 -1
  94. package/dist/LiveChatAgentWatcher-J6PNLYWT.js.map +0 -1
  95. package/dist/SupportCenter-JBBBJTKU.js.map +0 -1
  96. package/dist/chunk-37ZZRVI7.js.map +0 -1
  97. package/dist/chunk-CWCN5PDE.js.map +0 -1
  98. package/dist/chunk-JT4ZPWH7.js +0 -61
  99. package/dist/chunk-JT4ZPWH7.js.map +0 -1
  100. package/dist/chunk-M4LUNCKI.js.map +0 -1
  101. package/dist/chunk-MQXGB4IO.js.map +0 -1
  102. package/dist/chunk-PIMV3VRT.js.map +0 -1
  103. package/dist/chunk-STEDUFNR.js +0 -42
  104. package/dist/chunk-STEDUFNR.js.map +0 -1
  105. package/dist/chunk-WOZTA5LS.js.map +0 -1
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/lib/report-tool.ts","../src/components/RouteSkeletons.tsx","../src/lib/setup-guides.ts","../src/components/HelpdeskStatusPanel.tsx","../src/lib/conversation-links.tsx","../src/index.ts"],"names":["React","jsx","Skeleton","jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAQA,IAAI,mBAAA,GAA6C,IAAA;AAiBjD,SAAS,cAAc,GAAA,EAA2B;AAChD,EAAA,MAAM,IAAI,MAAA,CAAO,GAAA,IAAO,EAAE,CAAA,CAAE,IAAA,GAAO,WAAA,EAAY;AAC/C,EAAA,IAAI,CAAC,aAAA,EAAe,UAAA,EAAY,UAAA,EAAY,eAAY,YAAY,CAAA,CAAE,IAAA,CAAK,CAAC,MAAM,CAAA,CAAE,QAAA,CAAS,CAAC,CAAC,GAAG,OAAO,aAAA;AACzG,EAAA,IAAI,CAAC,OAAA,EAAS,OAAA,EAAS,QAAA,EAAU,OAAA,EAAS,eAAe,mBAAA,EAAe,SAAS,CAAA,CAAE,IAAA,CAAK,CAAC,CAAA,KAAM,CAAA,CAAE,SAAS,CAAC,CAAC,GAAG,OAAO,OAAA;AAEtH,EAAA,OAAO,SAAA;AACT;AAIA,SAAS,aAAA,CAAc,QAAQ,EAAA,EAA4C;AACzE,EAAA,IAAI;AACF,IAAA,MAAM,KAAA,GAAQ,kBAAA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A;AAAA,MACX,WAAA,EACE;AAAA,KACJ,CAAE,CAAA;AAAA,IAEF,OAAA,EAAS;AAAA,GACX;AACF","file":"index.js","sourcesContent":["import { useNavHistoryStore, getRecentActivity } from '@fayz-ai/core'\nimport type { PluginAITool } from '@fayz-ai/core'\nimport { createRequest, uploadAttachment, listRequests } from '../data/api'\nimport { useSupportStore } from '../store'\nimport type { PendingAttachment, SupportKind } from '../types'\n\n// Set once admin is loaded (registerSupportAITools) — the images/PDFs the chat\n// turn carried, so a print the user dropped reaches the ticket, not just the LLM.\nlet takeTurnReportFiles: (() => File[]) | null = null\n\n// ---------------------------------------------------------------------------\n// \"Modo relato\" — the Dico registers a support request instead of trying to\n// FIX the problem with whatever tool is lying around.\n//\n// The bug this exists to kill: told \"when I try to reconcile, it won't let me\n// create a supplier\", gpt-4o-mini treated it as a task and called a random\n// payable tool (\"Resolve Payable Context\") — doing nothing the user asked for.\n// A complaint is not a work order. So this tool is a DEAD END on purpose: it\n// writes the request, returns the number, and its description forbids every\n// other tool. The behaviour is driven from BOTH ends — this description and the\n// agent's provisioned instructions (\"report mode\").\n// ---------------------------------------------------------------------------\n\n/** Map whatever the model sends to one of the three ticket kinds. A plain\n * question (\"tenho uma dúvida\") is NOT a ticket — the agent just answers it. */\nfunction normalizeKind(raw: unknown): SupportKind {\n const s = String(raw ?? '').trim().toLowerCase()\n if (['improvement', 'melhoria', 'sugestao', 'sugestão', 'suggestion'].some((k) => s.includes(k))) return 'improvement'\n if (['other', 'outra', 'outras', 'outro', 'solicitacao', 'solicitação', 'request'].some((k) => s.includes(k))) return 'other'\n // Everything else — including \"problem\"/\"problema\"/\"bug\"/\"erro\" — is a problem.\n return 'problem'\n}\n\n/** The last screens the user passed through, newest first. Read from the global\n * nav-history ring buffer the app shell fills on every route change. */\nfunction recentScreens(limit = 10): Array<{ path: string; label: string }> {\n try {\n const stack = useNavHistoryStore.getState().stack\n return stack.slice(-limit).reverse().map((e) => ({ path: e.path, label: e.label }))\n } catch {\n return []\n }\n}\n\n/** The route the user is on right now, as the V1 form records it. */\nfunction currentRoute(): string | null {\n if (typeof location === 'undefined') return null\n return location.hash || location.pathname || null\n}\n\nexport const supportAITools: PluginAITool[] = [\n {\n id: 'support.report-issue',\n name: 'reportIssue',\n description:\n 'REGISTERS a support request (problema, melhoria ou outra solicitação) for the Fayz team. ' +\n 'Use this the moment the user is REPORTING that something is wrong, asking for a change, or raising a request you cannot resolve from the app itself — \"não consigo…\", \"deu erro\", \"não aparece a opção de…\", \"seria bom se…\". ' +\n 'This is the ONLY correct action for a report: do NOT call any other tool to investigate or \"fix\" it (no payable/reconciliation/record tools) — a complaint is not a work order, and guessing at a fix does nothing the user asked for. ' +\n 'Before registering: call findSupportRequests to check the issue is not ALREADY open (if it is, do not duplicate — point the user to that #number). Then use the recent trail you were given to say what the user was doing, confirm the problem in one short question, and offer (do not require) a print. Then call this with a clear description IN THE USER\\'S OWN WORDS. ' +\n 'It returns the request number — tell the user \"registrei a sua solicitação, número #N, a equipe vai acompanhar\" and STOP. The route and the recent screens are captured automatically; you do not pass them.',\n icon: 'LifeBuoy',\n mode: 'persist',\n // No confirmation card: the user already asked for it and the agent confirms\n // in prose. The card would just show the technical params.\n requiresConfirmation: false,\n parameters: {\n type: 'object',\n properties: {\n kind: {\n type: 'string',\n enum: ['problem', 'improvement', 'other'],\n description: 'problem = algo não funcionou; improvement = sugestão de melhoria; other = treinamento, acesso, dados, comercial. Default problem.',\n },\n description: {\n type: 'string',\n description: 'O que aconteceu, na linguagem do usuário: o que ele fazia, o que esperava e o que apareceu.',\n },\n subject: {\n type: 'string',\n description: 'Opcional. Um título curto para a solicitação.',\n },\n },\n required: ['description'],\n },\n category: 'Suporte',\n suggestions: [\n { label: 'Quero reportar um problema', prompt: 'Quero reportar um problema' },\n { label: 'Quero sugerir uma melhoria', prompt: 'Quero sugerir uma melhoria' },\n { label: 'Tenho uma dúvida', prompt: 'Tenho uma dúvida' },\n { label: 'Outra solicitação', prompt: 'Tenho outra solicitação para a equipe' },\n ],\n },\n {\n id: 'support.find-requests',\n name: 'findSupportRequests',\n description:\n 'Lists the user\\'s OPEN support requests (solicitações em aberto). ' +\n 'CALL THIS BEFORE registering a problem or improvement, to check whether the same thing is ALREADY reported. ' +\n 'If an open request clearly covers the same issue, do NOT open a duplicate: tell the user it is already registered (give the #number and its status) and offer to add a note to it instead. ' +\n 'Optional `query` filters by words from the user\\'s complaint.',\n icon: 'Search',\n mode: 'read',\n parameters: {\n type: 'object',\n properties: {\n query: { type: 'string', description: 'Palavras do que o usuário está relatando, para achar uma solicitação parecida. Opcional.' },\n },\n },\n category: 'Suporte',\n },\n]\n\nexport interface ReportIssueResult {\n ok: boolean\n id?: string\n number?: number\n status?: string\n attachments?: number\n ref?: { id: string; label: string; path: string }\n message?: string\n error?: string\n}\n\n/** Client-plane executor. Writes the request through the plugin's own data\n * layer (createRequest also opens the 'opened' event + mints the per-tenant\n * number via trigger) and hands back the number plus a goto ref the chat\n * renders as a \"Ver solicitação\" button. */\nasync function executeReportIssue(args: Record<string, unknown>): Promise<ReportIssueResult> {\n const description = String(args.description ?? '').trim()\n if (description.length < 5) {\n return {\n ok: false,\n error: 'missing_description',\n message: 'Antes de registrar, pergunte ao usuário o que aconteceu e descreva com as palavras dele (mínimo de uma frase).',\n }\n }\n const kind = normalizeKind(args.kind)\n const subject = typeof args.subject === 'string' && args.subject.trim() ? args.subject.trim() : null\n try {\n const res = await createRequest({\n kind,\n description,\n subject,\n route: currentRoute(),\n // What the user was doing travels with the request, so the team reads it\n // without a second round-trip. `activity` is the rich trail (routes +\n // buttons pressed); `recentScreens` stays for tickets opened before it.\n screenSnapshot: { activity: getRecentActivity(10), recentScreens: recentScreens() },\n })\n // Attach the print the user shared in the chat. Without this the image went\n // only to the model's vision and the ticket had no evidence on it.\n let attached = 0\n const files = takeTurnReportFiles ? takeTurnReportFiles() : []\n for (const file of files) {\n const pending: PendingAttachment = {\n id: crypto.randomUUID(),\n file,\n name: file.name || 'anexo',\n contentType: file.type || 'application/octet-stream',\n sizeBytes: file.size,\n }\n try {\n await uploadAttachment(res.id, pending)\n attached += 1\n } catch {\n // One failed upload never fails the report — the request is already open.\n }\n }\n // If the Central de Suporte is open behind the chat, the agent's write\n // bypasses its store — so \"Minhas solicitações\" would stay empty until a\n // reload. Refresh the list now so the request the user just reported shows.\n try {\n void useSupportStore.getState().loadList()\n } catch {\n // The screen may not be mounted; the list loads on next open regardless.\n }\n return {\n ok: true,\n id: res.id,\n number: res.number,\n status: 'received',\n attachments: attached,\n ref: { id: res.id, label: `Solicitação #${res.number}`, path: `/support/ticket/${res.id}` },\n message:\n `Solicitação #${res.number} registrada${attached ? ` com ${attached} anexo(s)` : ''}. ` +\n 'Diga ao usuário o número e que a equipe vai acompanhar. ' +\n 'NÃO chame mais nenhuma ferramenta — o relato está registrado.',\n }\n } catch (error) {\n return {\n ok: false,\n error: 'write_failed',\n message: error instanceof Error ? error.message : 'Não consegui registrar a solicitação.',\n }\n }\n}\n\n/** Open = still actionable (not closed/cancelled). The dedup check only cares\n * about requests the team could still be working on. */\nfunction isOpen(status: string): boolean {\n return status !== 'closed' && status !== 'cancelled'\n}\n\n/** Read-plane executor: the user's open requests, ranked by how well they match\n * the complaint, so the agent can see \"this is already #N\" before duplicating. */\nasync function executeFindRequests(args: Record<string, unknown>): Promise<unknown> {\n const query = String(args.query ?? '').trim().toLowerCase()\n const terms = query.split(/[^\\p{L}\\p{N}]+/u).filter((w) => w.length > 2)\n let open\n try {\n open = (await listRequests('mine', 'all')).filter((r) => isOpen(r.status))\n } catch (error) {\n return { error: 'read_failed', message: error instanceof Error ? error.message : 'Não consegui ler as solicitações.' }\n }\n const scored = open\n .map((r) => {\n const hay = `${r.subject ?? ''} ${r.description}`.toLowerCase()\n const score = terms.length ? terms.filter((t) => hay.includes(t)).length : 0\n return { r, score }\n })\n .sort((a, b) => b.score - a.score || b.r.number - a.r.number)\n const picked = (terms.length ? scored.filter((s) => s.score > 0) : scored).slice(0, 10)\n return {\n total: picked.length,\n openTotal: open.length,\n requests: picked.map(({ r }) => ({\n number: r.number,\n kind: r.kind,\n subject: r.subject || r.description.slice(0, 80),\n status: r.status,\n createdAt: r.createdAt,\n ref: { id: r.id, label: `Solicitação #${r.number}`, path: `/support/ticket/${r.id}` },\n })),\n hint: picked.length\n ? 'If one of these is clearly the SAME issue the user is reporting now, do not open a duplicate — say it is already registered (#number + status) and offer to add a note.'\n : 'Nothing similar is open — go ahead and register the new request.',\n }\n}\n\nlet registered = false\n\n/**\n * Register the client-plane executor for `reportIssue`.\n *\n * Done through a DYNAMIC import of @fayz-ai/admin, guarded to the browser, so\n * building the manifest (and unit-testing it) never pulls the admin React chain\n * — the same reason index.ts lazy-loads the views. Idempotent.\n */\nexport function registerSupportAITools(): void {\n if (registered || typeof document === 'undefined') return\n registered = true\n void import('@fayz-ai/admin')\n .then((admin) => {\n takeTurnReportFiles = admin.takeTurnReportFiles\n admin.registerAIToolHandler('reportIssue', (args) => executeReportIssue(args))\n admin.registerAIToolHandler('findSupportRequests', (args) => executeFindRequests(args))\n })\n .catch(() => {\n // An app with no assistant wired never calls the tool — a failed register\n // must not break the plugin's screens.\n registered = false\n })\n}\n","import { Skeleton } from '@fayz-ai/ui'\n\n// The Suspense fallbacks of the plugin's lazy routes. A route that is still\n// downloading its chunk promises the shape that comes next (the board's\n// columns, the settings cards, the center's cards) instead of a \"Carregando…\"\n// line — and the page does not jump when the view arrives.\n\n/** The console: the board's columns, as HelpdeskConsole draws them while it asks who you are. */\nexport function ConsoleSkeleton() {\n return (\n <div className=\"flex gap-3 overflow-hidden\" aria-busy=\"true\">\n {[0, 1, 2, 3].map((i) => (\n <div key={i} className=\"w-72 shrink-0 space-y-3 rounded-card bg-muted/30 p-3\">\n <Skeleton className=\"h-5 w-32\" /><Skeleton className=\"h-28 w-full\" /><Skeleton className=\"h-28 w-full\" />\n </div>\n ))}\n </div>\n )\n}\n\n/** The central's settings: the four cards on a narrow column. */\nexport function SettingsSkeleton() {\n return (\n <div className=\"mx-auto flex max-w-3xl flex-col gap-4\" aria-busy=\"true\">\n {[3, 4, 7, 2].map((rows, i) => (\n <div key={i} className=\"space-y-3 rounded-card border p-6\">\n <Skeleton className=\"h-5 w-48\" />\n <Skeleton className=\"h-4 w-80 max-w-full\" />\n {Array.from({ length: rows }, (_, j) => <Skeleton key={j} className=\"h-9 w-full\" />)}\n </div>\n ))}\n </div>\n )\n}\n\n/** The support center: a heading and its grid of cards. */\nexport function CenterSkeleton() {\n return (\n <div className=\"space-y-4\" aria-busy=\"true\">\n <Skeleton className=\"h-24 w-full\" />\n <div className=\"grid gap-4 md:grid-cols-2\">\n {[0, 1, 2, 3].map((i) => <Skeleton key={i} className=\"h-40 w-full\" />)}\n </div>\n </div>\n )\n}\n","import type { SetupGuideDef } from '@fayz-ai/core'\n\n// The V1 SETUP.md of administracao/configuracoes-do-atendimento, as data: what\n// the assistant checks, asks and does when someone wants the central set up.\n// `route` is a function of the console route, so it is filled at manifest time.\n\nexport function buildSupportSetupGuides(settingsRoute: string, consoleRoute: string): SetupGuideDef[] {\n return [\n {\n feature: 'support.configuracoes',\n title: 'Configurações do atendimento',\n about:\n 'Quem atende e com que nome o cliente lê as respostas, quantas conversas ao vivo cada um pega, em quanto tempo a equipe promete responder e resolver por prioridade, o horário e a mensagem de quando não há ninguém, por quanto tempo os anexos ficam guardados e quando uma resolvida sem resposta se encerra sozinha.',\n route: settingsRoute,\n status: 'ready',\n requires: [\n {\n title: 'A central ligada neste espaço',\n where: 'Fora da tela: o módulo de atendimento da plataforma é ligado para o espaço da empresa por quem administra a plataforma.',\n check: 'O menu mostra \"Atendimento\" e \"Configurações do atendimento\" dentro de \"Gestão de clientes\".',\n },\n {\n title: 'Permissão de administrar a central',\n where: 'Configurações › Equipe › perfis, permissão \"Administrar a central de atendimento\" (o dono já tem).',\n check: 'A tela abre com os quatro cartões; sem a permissão ela diz \"Acesso restrito\".',\n },\n {\n title: 'Quem vai atender é membro do espaço',\n where: 'Configurações › Equipe (convide pelo e-mail).',\n check: 'O e-mail da pessoa aparece em \"Membro da central\" no cartão Atendentes.',\n },\n ],\n steps: [\n { do: 'Inclua cada atendente: escolha o e-mail e escreva o nome que o cliente vê (\"Ana, do Suporte\").', why: 'O nome assina cada resposta e a saudação do chat.' },\n { do: 'Ajuste \"Conversas ao mesmo tempo\" de cada um (0 a 20).', why: 'No limite, o Aceitar do chat apaga para aquela pessoa.' },\n { do: 'Revise os prazos de primeira resposta (minutos) e de resolução (horas) por prioridade e clique em Salvar.', why: 'São os relógios dos cartões no quadro.', anchor: 'support-settings-save' },\n { do: 'Marque os dias e horários da equipe e o texto que o cliente lê quando não há ninguém; Salvar.' },\n { do: 'Defina por quantos dias guardar os anexos e depois de quantos dias uma resolvida sem resposta se encerra; Salvar.' },\n { do: 'Abra o Atendimento e confira o prazo nos cartões.', route: consoleRoute },\n ],\n rules: [\n 'O cartão Atendentes grava na hora (ao sair do campo, ao virar a chave, ao Incluir); prazos, horário, mensagem, retenção e fechamento só gravam no Salvar.',\n 'Primeira resposta em minutos, resolução em horas corridas; o quadro avisa quando falta um quarto do prazo.',\n 'Retenção de anexos: de 7 a 3650 dias, vale para anexos enviados depois da mudança.',\n 'Fechamento automático: de 1 a 90 dias, confere de hora em hora.',\n 'Não há excluir atendente: desative pela chave Ativo.',\n ],\n pitfalls: [\n 'O e-mail não aparece para incluir: a pessoa não é membro ativo do espaço, ou já está na lista (inclusive inativa — reative).',\n 'O horário de atendimento não abre nem fecha o chat: quem decide é a presença dos atendentes. O horário vira texto na tela de ausência.',\n ],\n warnings: [\n 'A limpeza automática dos anexos vencidos ainda não roda: o prazo é gravado em cada anexo, mas o arquivo não é apagado sozinho.',\n 'A mensagem de ausência só aparece ao cliente quando o chat ao vivo existir no V2.',\n ],\n answers: [\n 'Como incluo alguém como atendente?',\n 'Por que o e-mail da pessoa não aparece na lista para incluir?',\n 'Que nome o cliente vê nas respostas?',\n 'Mudei o prazo e o quadro ficou todo vermelho.',\n 'O horário de atendimento fecha o chat fora do horário?',\n 'Diminuí a retenção de anexos: os antigos somem?',\n ],\n },\n ]\n}\n","import React from 'react'\nimport { helpdeskConsolePath } from '../lib/console-path'\nimport { Badge, Skeleton } from '@fayz-ai/ui'\nimport { consoleListRequests, type ConsoleRequest } from '../data/console'\nimport { STATUS_LABEL, STATUS_TONE } from '../lib/vocabulary'\nimport type { SupportStatus } from '../types'\nimport { navigateApp } from '@fayz-ai/core'\n\n/** Hash navigation, without reaching into the shell's private routing. */\nfunction go(path: string) { if (typeof window !== 'undefined') navigateApp(path) }\n\n// Open first, then the closed ones.\nconst STATUS_ORDER: SupportStatus[] = [\n 'received', 'triage', 'in_service', 'waiting_you', 'in_development', 'resolved_check', 'closed', 'cancelled',\n]\n\n/**\n * The helpdesk's chamados grouped by status. With `tenantId` it is ONE store's\n * tickets — drawn inside that store's CRM card (the store is resolved from the\n * CRM company's metadata.tenant_id_v2). Without it, every store's. Reads the same\n * cross-tenant console RPC (operator-gated); each row deep-links to the ticket.\n */\nexport function HelpdeskStatusPanel({ tenantId }: { tenantId?: string } = {}): React.ReactElement {\n const [requests, setRequests] = React.useState<ConsoleRequest[]>([])\n const [loading, setLoading] = React.useState(true)\n\n React.useEffect(() => {\n let alive = true\n setLoading(true)\n consoleListRequests(undefined, '')\n .then((r) => { if (alive) setRequests(tenantId ? r.filter((x) => x.tenantId === tenantId) : r) })\n .catch(() => { if (alive) setRequests([]) })\n .finally(() => { if (alive) setLoading(false) })\n return () => { alive = false }\n }, [tenantId])\n\n const byStatus = STATUS_ORDER\n .map((s) => ({ status: s, items: requests.filter((r) => r.status === s) }))\n .filter((g) => g.items.length > 0)\n\n if (loading) {\n return <div className=\"space-y-2 p-1\">{[0, 1].map((i) => <Skeleton key={i} className=\"h-14 w-full\" />)}</div>\n }\n if (requests.length === 0) {\n return <p className=\"text-xs text-muted-foreground\">{tenantId ? 'Esta loja não tem chamados.' : 'Nenhum chamado por aqui.'}</p>\n }\n\n return (\n <div className=\"flex flex-col gap-3\">\n {!tenantId && <p className=\"px-1 text-xs text-muted-foreground\">{requests.length} chamado(s) de todas as lojas.</p>}\n {byStatus.map((g) => (\n <div key={g.status} className=\"flex flex-col gap-1.5\">\n <div className=\"flex items-center gap-2 px-1\">\n <Badge variant={STATUS_TONE[g.status]}>{STATUS_LABEL[g.status]}</Badge>\n <span className=\"text-[11px] text-muted-foreground\">{g.items.length}</span>\n </div>\n {g.items.map((r) => (\n <button\n key={r.id}\n onClick={() => go(`${helpdeskConsolePath()}/${r.id}`)}\n className=\"flex w-full flex-col gap-0.5 rounded-lg border bg-card p-2 text-left transition-colors hover:border-primary/40 hover:bg-accent\"\n >\n <div className=\"flex items-center justify-between gap-2 text-[11px] text-muted-foreground\">\n <span className=\"truncate font-medium text-foreground\">{r.tenantName ?? 'Loja'}</span>\n <span>#{r.number}</span>\n </div>\n <div className=\"truncate text-xs\">{r.subject || r.description.slice(0, 60)}</div>\n </button>\n ))}\n </div>\n ))}\n </div>\n )\n}\n\nexport default HelpdeskStatusPanel\n","import React from 'react'\nimport { lazyComponent } from '@fayz-ai/core'\nimport { helpdeskConsolePath } from './console-path'\nimport { STATUS_LABEL, STATUS_TONE } from './vocabulary'\nimport { ticketsForConversation } from '../data/console'\n\n// ---------------------------------------------------------------------------\n// The support side of \"Registros vinculados\" in /conversations: the \"Chamado\n// #N\" chip on a thread tied to a ticket, and \"Abrir chamado\" from a thread that\n// is not. Handed to the inbox by the app —\n// createConversationsPlugin({ recordLinks: [supportConversationLinks] })\n// — so neither plugin imports the other. The shapes below match\n// plugin-conversations' ConversationRecordLinkSource structurally.\n// ---------------------------------------------------------------------------\n\n/** The thread fields this source reads — the same shape as plugin-conversations'\n * ConversationRef (kept identical: a React component's props are invariant). */\nexport interface SupportConversationRef {\n id: string\n contactName: string\n contactPersonId?: string\n contactHandle: string\n channel: string\n lastMessagePreview: string\n}\n\ntype Tone = 'default' | 'secondary' | 'success' | 'warning' | 'destructive' | 'outline'\n\nexport interface SupportRecordLink { id: string; label: string; href: string; hint?: string; tone?: Tone }\n\nexport interface SupportConversationLinkSource {\n id: string\n load(conversation: SupportConversationRef): Promise<{ links: SupportRecordLink[]; canAct?: boolean }>\n Action?: React.ComponentType<{ conversation: SupportConversationRef; onDone: () => void }>\n}\n\nconst ticketLabel = (n: number) => `Chamado #${String(n).padStart(4, '0')}`\n\nexport const supportConversationLinks: SupportConversationLinkSource = {\n id: 'support',\n async load(conversation) {\n const { tickets, canOpen } = await ticketsForConversation(conversation.id)\n return {\n links: tickets.map((t) => ({\n id: t.id,\n label: ticketLabel(t.number),\n href: `${helpdeskConsolePath()}/${t.id}`,\n hint: STATUS_LABEL[t.status],\n tone: STATUS_TONE[t.status],\n })),\n // A ticket's own support thread already IS a ticket: \"Abrir chamado\" is\n // for the other channels (a WhatsApp/e-mail thread with a client).\n canAct: canOpen && conversation.channel !== 'support' && !!conversation.contactPersonId,\n }\n },\n Action: lazyComponent(() => import('../views/OpenTicketFromConversation').then((m) => m.OpenTicketFromConversation)),\n}\n","import React from 'react'\nimport type { PluginManifest, PluginScope, VerticalId } from '@fayz-ai/core'\nimport { registerTranslations, replaceApp } from '@fayz-ai/core'\nimport { supportLocales } from './locales'\nimport { setHelpdeskConsolePath } from './lib/console-path'\nimport { setConversationSurface, type SupportConversationSurfaceProps } from './lib/conversation-surface'\nimport { MIGRATIONS } from './migrations'\nimport {\n defaultFaq, defaultWhatsNew, defaultStatusComponents,\n type FaqItem, type WhatsNewItem, type StatusComponent,\n} from './lib/content'\nimport { supportAITools, registerSupportAITools } from './lib/report-tool'\nimport type { SupportCenterContent } from './views/SupportCenter'\nimport { setSupportSettingsProvider, getSupportSettings, type SupportSettingsProvider } from './data/settings'\nimport { setSlaPolicySource } from './lib/sla'\nimport { LEGACY_SETTINGS_SEGMENT, SETTINGS_TAB_ID, supportSettingsPath } from './lib/settings-path'\nimport { ConsoleSkeleton, SettingsSkeleton, CenterSkeleton } from './components/RouteSkeletons'\nimport { buildSupportSetupGuides } from './lib/setup-guides'\n\n// Lazy so building the manifest (and unit-testing it) does not eagerly pull the\n// React views and their @fayz-ai/admin chain. The wrapper owns its own Suspense,\n// so the route renders whether or not the shell provides one.\nconst LazySupportCenter = React.lazy(() => import('./views/SupportCenter'))\nconst LazyHelpdeskConsole = React.lazy(() => import('./views/HelpdeskConsole'))\nconst LazySupportSettings = React.lazy(() => import('./views/settings/SupportSettingsPage'))\nconst LazyLiveChatWatcher = React.lazy(() => import('./livechat/LiveChatAgentWatcher'))\n\n/** The live-chat header control: for everyone, the assistant's \"Atendente\"\n * hand-off (chat.supportAction → the live chat with the transcript); for the\n * agents of a central, presence + the queue chime (020) and the clock-in the\n * bridge tells the V1 (021). Renders nothing; outside the route switch so it\n * survives navigation. */\nconst LiveChatWatcherControl: React.FC<unknown> = () =>\n React.createElement(React.Suspense, { fallback: null }, React.createElement(LazyLiveChatWatcher, null))\n\n/** \"Configurações do atendimento\" (support 010), same Suspense reasoning. A tab\n * of the settings hub: `/settings/support`. */\nconst SupportSettingsTab: React.FC<unknown> = () =>\n React.createElement(\n React.Suspense,\n { fallback: React.createElement(SettingsSkeleton) },\n React.createElement(LazySupportSettings, null),\n )\n\n/** The old address (`<console>/configuracoes`, V1 /atendimento/configuracoes)\n * moves to the settings tab, so a saved link still opens the screen. Without\n * this route the console's `<console>/*` would read \"configuracoes\" as a ticket. */\nconst LegacySettingsRedirect: React.FC<unknown> = () => {\n React.useEffect(() => { replaceApp(supportSettingsPath()) }, [])\n return React.createElement(SettingsSkeleton)\n}\n\n/** The helpdesk console, wrapped in its own Suspense (same reason the center is\n * lazy: keep the manifest free of the React/admin chain). */\nconst HelpdeskConsolePage: React.FC<unknown> = () =>\n React.createElement(\n React.Suspense,\n { fallback: React.createElement(ConsoleSkeleton) },\n React.createElement(LazyHelpdeskConsole, null),\n )\n\nexport interface SupportPluginOptions {\n /** Label for the plugin and the user-menu entry (default \"Suporte\"). */\n label?: string\n scope?: PluginScope\n verticalId?: VerticalId\n /** Knowledge-base content — overrides the sample FAQ that ships by default. */\n faq?: FaqItem[]\n /** Release notes shown in the \"Novidades\" card. */\n whatsNew?: WhatsNewItem[]\n /** Status components listed under the Status card. */\n statusComponents?: StatusComponent[]\n /** Where the operator console is routed (default '/support/console'). An app that\n * nests it under another rail group points it there (e.g. '/customers/support'). */\n consoleRoute?: string\n /** Rail label of the operator console (default 'Central de Chamados'). */\n consoleLabel?: string\n /** Rail position of the operator console (default 45). */\n consolePosition?: number\n /**\n * The inbox thread the operator's ticket page draws as \"Conversa com o\n * cliente\" — plugin-conversations' `ConversationThreadSurface`. Since support\n * 004 a ticket's conversation IS a thread of the helpdesk inbox; handing the\n * inbox's own surface in keeps one composer and one details panel (no second\n * inbox) without this plugin importing that one.\n */\n conversationSurface?: React.ComponentType<SupportConversationSurfaceProps>\n /**\n * Where the central's settings are read and written (support 010). Default:\n * the Supabase RPCs. A mock (`createMockSupportSettingsProvider`) draws the\n * screen on a pool that has not got the migration yet.\n */\n settingsProvider?: SupportSettingsProvider\n /**\n * Offer Suporte to every account, whatever its trade's `preset.modules` says\n * (core `offeredToEveryTrade`): a ChefControl store gets the in-app support\n * panel (Minhas solicitações, Conversar com um atendente) even though the\n * restaurant preset never listed `support`. The operator console still needs\n * the `console` facet. Default false.\n */\n offeredToEveryTrade?: boolean\n}\n\nexport function createSupportPlugin(options?: SupportPluginOptions): PluginManifest {\n const label = options?.label ?? 'Suporte'\n const consoleRoute = options?.consoleRoute?.trim() || '/support/console'\n const consoleLabel = options?.consoleLabel ?? 'Central de Chamados'\n const consolePosition = options?.consolePosition ?? 45\n setHelpdeskConsolePath(consoleRoute)\n setConversationSurface(options?.conversationSurface)\n setSupportSettingsProvider(options?.settingsProvider)\n // The board's SLA clocks read the central's policy (Configurações do\n // atendimento); getSupportSettings never rejects — V1 defaults on failure.\n setSlaPolicySource(async () => (await getSupportSettings()).sla)\n // \"Configurações do atendimento\" is a tab of the settings hub\n // (`/settings/support`) — every settings screen lives under /settings. The\n // rail keeps a line to it as the console's SIBLING — the last line of the\n // group the console is nested in — not as its child.\n const settingsRoute = supportSettingsPath()\n const legacySettingsRoute = `${consoleRoute}/${LEGACY_SETTINGS_SEGMENT}`\n const consoleParent = consoleRoute.split('/').filter(Boolean).length > 1\n ? consoleRoute.slice(0, consoleRoute.lastIndexOf('/'))\n : undefined\n registerTranslations(supportLocales)\n // Make the Dico's \"modo relato\" tool runnable (client-plane executor). Guarded\n // to the browser inside, so this is a no-op when the manifest is built on the\n // server or in a unit test.\n registerSupportAITools()\n\n const content: SupportCenterContent = {\n faq: options?.faq ?? defaultFaq,\n whatsNew: options?.whatsNew ?? defaultWhatsNew,\n statusComponents: options?.statusComponents ?? defaultStatusComponents,\n }\n\n const SupportPage: React.FC<unknown> = () =>\n React.createElement(\n React.Suspense,\n { fallback: React.createElement(CenterSkeleton) },\n React.createElement(LazySupportCenter, { content }),\n )\n\n return {\n id: 'support',\n name: label,\n icon: 'LifeBuoy',\n version: '0.1.0',\n scope: options?.scope ?? 'universal',\n verticalId: options?.verticalId,\n defaultEnabled: true,\n ...(options?.offeredToEveryTrade ? { offeredToEveryTrade: true } : {}),\n dependencies: [],\n\n // Support is for everyone, like the V1 support panel (\"nasce liberada em\n // todos os perfis\") — so the route is open to any authenticated user rather\n // than gated by a deny-by-default feature. Only `support.all` is a declared\n // permission: it unlocks the \"Toda a empresa\" view, and ships denied (the\n // admin/owner holds it).\n declaredFeatures: [\n { id: 'support.all', label: 'Solicitações de toda a empresa', group: label },\n // V1 helpdesk_admin: change the central's settings (support 010 guards the\n // RPCs with support.admin.manage; the owner role gets it on its own).\n { id: 'support.admin', label: 'Administrar a central de atendimento', group: label, actions: ['manage'] },\n ],\n\n // The requester reaches Suporte from the user menu. The OPERATOR console line\n // is gated by the `console` FACET — it shows ONLY in the workspace that runs\n // the helpdesk (GoControl), where the facet is on. In a store (Pertinho,\n // Artorius…) the facet is off, so the line is absent no matter who is logged\n // in. It is a per-TENANT line: you see it when you are IN the GoControl\n // workspace, not because of who you are.\n navigation: [\n {\n id: 'support-console',\n section: 'main',\n position: consolePosition,\n label: consoleLabel,\n route: consoleRoute,\n icon: 'LifeBuoy',\n // Sit right below \"Clientes\": land above the line the rail draws next\n // after it (AtendeAI, then the CRM/financial block).\n before: ['/atendeai', '/sales', '/financial'],\n requiresFacet: 'console',\n },\n {\n id: 'support-settings',\n section: 'main',\n position: consolePosition + 20,\n label: 'Configurações do atendimento',\n route: settingsRoute,\n icon: 'Settings',\n ...(consoleParent ? { parent: consoleParent } : {}),\n requiresFacet: 'console',\n permission: { feature: 'support.admin', action: 'manage' },\n },\n ],\n\n // Off for every tenant by default; enabled only for the helpdesk workspace\n // with scripts/support-enable-console.mjs. A store that turns on Suporte does\n // NOT get it.\n facets: [\n {\n id: 'console',\n label: 'Central de Chamados (operador)',\n description: 'O console cross-tenant do suporte — só no workspace que opera o helpdesk.',\n },\n ],\n\n // \"Modo relato\": the assistant registers a request instead of improvising a\n // fix. The executor is wired above (registerSupportAITools); the opener\n // suggestions ride on the tool (the V1 doors).\n aiTools: supportAITools,\n\n routes: [\n {\n path: '/support',\n component: SupportPage as React.ComponentType<unknown>,\n guard: 'authenticated',\n },\n {\n // The helpdesk console. Open to any authenticated user as a route; the\n // view calls support_is_operator() and shows \"acesso restrito\" to a\n // non-operator, and every data call is gated server-side anyway.\n path: consoleRoute,\n component: HelpdeskConsolePage as React.ComponentType<unknown>,\n guard: 'authenticated',\n title: consoleLabel,\n },\n {\n // The retired address, kept only to forward a saved link to\n // /settings/support. More specific than the console's `${consoleRoute}/*`.\n path: legacySettingsRoute,\n component: LegacySettingsRedirect as React.ComponentType<unknown>,\n guard: 'authenticated',\n title: 'Configurações do atendimento',\n },\n ],\n\n // The settings screen itself: `/settings/support`. Same gates as the rail\n // line — the helpdesk workspace only (`console` facet) and whoever\n // administers the central; the page still asks the server (\"Acesso restrito\").\n settings: [\n {\n id: SETTINGS_TAB_ID,\n label: 'Central de atendimento',\n icon: 'LifeBuoy',\n section: 'communication',\n keywords: ['atendimento', 'atendentes', 'chamados', 'SLA', 'prazos', 'horário', 'ausência', 'anexos', 'suporte'],\n component: SupportSettingsTab as React.ComponentType<unknown>,\n requiresFacet: 'console',\n permission: { feature: 'support.admin', action: 'manage' },\n },\n ],\n\n // The live chat's agent side: presence (\"Disponível para conversas\") and the\n // chime of a new waiting chat, wherever the agent is in the app. It asks the\n // server whether this person is an agent of the open central and mounts\n // nothing otherwise (header controls have no facet gate).\n headerControls: [{ id: 'support-livechat', component: LiveChatWatcherControl, order: 94 }],\n\n setupGuides: buildSupportSetupGuides(settingsRoute, consoleRoute),\n\n migrations: MIGRATIONS.map((entry) => ({\n id: `support-${entry.id}`,\n version: '0.1.0',\n sql: entry.sql,\n description:\n 'Central de Suporte do Dico: the plg_support_* tables (requests, messages, events, attachments, notifications), their RLS, the per-tenant number trigger and the private support-attachments bucket; since 004 the ticket conversation is a thread of the helpdesk inbox (plugin-conversations).',\n })),\n\n locales: supportLocales,\n }\n}\n\nexport { useSupportStore } from './store'\n// A store's chamados by status, for embedding in that store's CRM card (the CRM\n// resolves the store tenant from company.metadata.tenant_id_v2 and passes it).\nexport { HelpdeskStatusPanel } from './components/HelpdeskStatusPanel'\nexport * from './types'\n// The inbox side of the unification: hand to createConversationsPlugin({\n// recordLinks: [supportConversationLinks] }) for the \"Chamado #N\" chip and\n// \"Abrir chamado\" on a conversation.\nexport {\n supportConversationLinks,\n type SupportConversationLinkSource,\n type SupportConversationRef,\n type SupportRecordLink,\n} from './lib/conversation-links'\nexport type { SupportConversationSurfaceProps } from './lib/conversation-surface'\n// The central's settings (support 010) — the board reads SLA/hours from here.\nexport {\n getSupportSettings, listSupportAgents, getMySupportAgent, getSupportAccess,\n createSupabaseSupportSettingsProvider, createMockSupportSettingsProvider,\n SupportSettingsError,\n type SupportSettingsProvider, type SupportAgent, type SupportAgentCandidate,\n type SupportAgentPatch, type SupportSettingsAccess, type MockSupportSettingsSeed,\n} from './data/settings'\nexport {\n SUPPORT_SETTINGS_DEFAULTS, slaTargets, describeBusinessHours, isWithinBusinessHours,\n WEEKDAY_LABEL,\n type SupportSettings, type SupportSlaPolicy, type SupportBusinessHours, type SupportWeekday,\n} from './lib/support-settings'\nexport { supportSettingsPath } from './lib/settings-path'\n// The live chat (support 020): the customer's panel and the board's queue, for\n// hosts that mount them somewhere else (e.g. next to the assistant).\nexport { LiveChatPanel, type LiveChatPanelProps } from './livechat/LiveChatPanel'\nexport { LiveChatQueue, type LiveChatQueueProps } from './livechat/LiveChatQueue'\nexport {\n chatAvailability, openChat, chatState, chatQueue, acceptChat, closeChat,\n type ChatAvailability, type ChatState, type ChatQueue, type QueueChat, type ChatAgentMe, type OpenChatInput,\n} from './livechat/api'\nexport { buildTranscript, chatSubject, type TranscriptMessage } from './livechat/rules'\n"]}
1
+ {"version":3,"sources":["../src/components/RouteSkeletons.tsx","../src/lib/setup-guides.ts","../src/components/HelpdeskStatusPanel.tsx","../src/lib/conversation-links.tsx","../src/index.ts"],"names":["React","jsx","Skeleton","jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAQO,SAAS,eAAA,GAAkB;AAChC,EAAA,2BACG,KAAA,EAAA,EAAI,SAAA,EAAU,8BAA6B,WAAA,EAAU,MAAA,EACnD,WAAC,CAAA,EAAG,CAAA,EAAG,CAAA,EAAG,CAAC,EAAE,GAAA,CAAI,CAAC,sBACjB,IAAA,CAAC,KAAA,EAAA,EAAY,WAAU,sDAAA,EACrB,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,QAAA,EAAA,EAAS,WAAU,UAAA,EAAW,CAAA;AAAA,oBAAE,GAAA,CAAC,QAAA,EAAA,EAAS,SAAA,EAAU,aAAA,EAAc,CAAA;AAAA,oBAAE,GAAA,CAAC,QAAA,EAAA,EAAS,SAAA,EAAU,aAAA,EAAc;AAAA,GAAA,EAAA,EAD/F,CAEV,CACD,CAAA,EACH,CAAA;AAEJ;AAGO,SAAS,gBAAA,GAAmB;AACjC,EAAA,2BACG,KAAA,EAAA,EAAI,SAAA,EAAU,y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AAA,CAAM,GAAA;AAAA,MACX,WAAA,EACE;AAAA,KACJ,CAAE,CAAA;AAAA,IAEF,OAAA,EAAS;AAAA,GACX;AACF","file":"index.js","sourcesContent":["import { Skeleton } from '@fayz-ai/ui'\n\n// The Suspense fallbacks of the plugin's lazy routes. A route that is still\n// downloading its chunk promises the shape that comes next (the board's\n// columns, the settings cards, the center's cards) instead of a \"Carregando…\"\n// line — and the page does not jump when the view arrives.\n\n/** The console: the board's columns, as HelpdeskConsole draws them while it asks who you are. */\nexport function ConsoleSkeleton() {\n return (\n <div className=\"flex gap-3 overflow-hidden\" aria-busy=\"true\">\n {[0, 1, 2, 3].map((i) => (\n <div key={i} className=\"w-72 shrink-0 space-y-3 rounded-card bg-muted/30 p-3\">\n <Skeleton className=\"h-5 w-32\" /><Skeleton className=\"h-28 w-full\" /><Skeleton className=\"h-28 w-full\" />\n </div>\n ))}\n </div>\n )\n}\n\n/** The central's settings: the four cards on a narrow column. */\nexport function SettingsSkeleton() {\n return (\n <div className=\"mx-auto flex max-w-3xl flex-col gap-4\" aria-busy=\"true\">\n {[3, 4, 7, 2].map((rows, i) => (\n <div key={i} className=\"space-y-3 rounded-card border p-6\">\n <Skeleton className=\"h-5 w-48\" />\n <Skeleton className=\"h-4 w-80 max-w-full\" />\n {Array.from({ length: rows }, (_, j) => <Skeleton key={j} className=\"h-9 w-full\" />)}\n </div>\n ))}\n </div>\n )\n}\n\n/** The support center: a heading and its grid of cards. */\nexport function CenterSkeleton() {\n return (\n <div className=\"space-y-4\" aria-busy=\"true\">\n <Skeleton className=\"h-24 w-full\" />\n <div className=\"grid gap-4 md:grid-cols-2\">\n {[0, 1, 2, 3].map((i) => <Skeleton key={i} className=\"h-40 w-full\" />)}\n </div>\n </div>\n )\n}\n","import type { SetupGuideDef } from '@fayz-ai/core'\n\n// The V1 SETUP.md of administracao/configuracoes-do-atendimento, as data: what\n// the assistant checks, asks and does when someone wants the central set up.\n// `route` is a function of the console route, so it is filled at manifest time.\n\nexport function buildSupportSetupGuides(settingsRoute: string, consoleRoute: string): SetupGuideDef[] {\n return [\n {\n feature: 'support.configuracoes',\n title: 'Configurações do atendimento',\n about:\n 'Quem atende e com que nome o cliente lê as respostas, quantas conversas ao vivo cada um pega, em quanto tempo a equipe promete responder e resolver por prioridade, o horário e a mensagem de quando não há ninguém, por quanto tempo os anexos ficam guardados e quando uma resolvida sem resposta se encerra sozinha.',\n route: settingsRoute,\n status: 'ready',\n requires: [\n {\n title: 'A central ligada neste espaço',\n where: 'Fora da tela: o módulo de atendimento da plataforma é ligado para o espaço da empresa por quem administra a plataforma.',\n check: 'O menu mostra \"Atendimento\" e \"Configurações do atendimento\" dentro de \"Gestão de clientes\".',\n },\n {\n title: 'Permissão de administrar a central',\n where: 'Configurações › Equipe › perfis, permissão \"Administrar a central de atendimento\" (o dono já tem).',\n check: 'A tela abre com os quatro cartões; sem a permissão ela diz \"Acesso restrito\".',\n },\n {\n title: 'Quem vai atender é membro do espaço',\n where: 'Configurações › Equipe (convide pelo e-mail).',\n check: 'O e-mail da pessoa aparece em \"Membro da central\" no cartão Atendentes.',\n },\n ],\n steps: [\n { do: 'Inclua cada atendente: escolha o e-mail e escreva o nome que o cliente vê (\"Ana, do Suporte\").', why: 'O nome assina cada resposta e a saudação do chat.' },\n { do: 'Ajuste \"Conversas ao mesmo tempo\" de cada um (0 a 20).', why: 'No limite, o Aceitar do chat apaga para aquela pessoa.' },\n { do: 'Revise os prazos de primeira resposta (minutos) e de resolução (horas) por prioridade e clique em Salvar.', why: 'São os relógios dos cartões no quadro.', anchor: 'support-settings-save' },\n { do: 'Marque os dias e horários da equipe e o texto que o cliente lê quando não há ninguém; Salvar.' },\n { do: 'Defina por quantos dias guardar os anexos e depois de quantos dias uma resolvida sem resposta se encerra; Salvar.' },\n { do: 'Abra o Atendimento e confira o prazo nos cartões.', route: consoleRoute },\n ],\n rules: [\n 'O cartão Atendentes grava na hora (ao sair do campo, ao virar a chave, ao Incluir); prazos, horário, mensagem, retenção e fechamento só gravam no Salvar.',\n 'Primeira resposta em minutos, resolução em horas corridas; o quadro avisa quando falta um quarto do prazo.',\n 'Retenção de anexos: de 7 a 3650 dias, vale para anexos enviados depois da mudança.',\n 'Fechamento automático: de 1 a 90 dias, confere de hora em hora.',\n 'Não há excluir atendente: desative pela chave Ativo.',\n ],\n pitfalls: [\n 'O e-mail não aparece para incluir: a pessoa não é membro ativo do espaço, ou já está na lista (inclusive inativa — reative).',\n 'O horário de atendimento não abre nem fecha o chat: quem decide é a presença dos atendentes. O horário vira texto na tela de ausência.',\n ],\n warnings: [\n 'A limpeza automática dos anexos vencidos ainda não roda: o prazo é gravado em cada anexo, mas o arquivo não é apagado sozinho.',\n 'A mensagem de ausência só aparece ao cliente quando o chat ao vivo existir no V2.',\n ],\n answers: [\n 'Como incluo alguém como atendente?',\n 'Por que o e-mail da pessoa não aparece na lista para incluir?',\n 'Que nome o cliente vê nas respostas?',\n 'Mudei o prazo e o quadro ficou todo vermelho.',\n 'O horário de atendimento fecha o chat fora do horário?',\n 'Diminuí a retenção de anexos: os antigos somem?',\n ],\n },\n ]\n}\n","import React from 'react'\nimport { helpdeskConsolePath } from '../lib/console-path'\nimport { Badge, Skeleton } from '@fayz-ai/ui'\nimport { consoleListRequests, type ConsoleRequest } from '../data/console'\nimport { STATUS_LABEL, STATUS_TONE } from '../lib/vocabulary'\nimport type { SupportStatus } from '../types'\nimport { navigateApp } from '@fayz-ai/core'\n\n/** Hash navigation, without reaching into the shell's private routing. */\nfunction go(path: string) { if (typeof window !== 'undefined') navigateApp(path) }\n\n// Open first, then the closed ones.\nconst STATUS_ORDER: SupportStatus[] = [\n 'received', 'triage', 'in_service', 'waiting_you', 'in_development', 'resolved_check', 'closed', 'cancelled',\n]\n\n/**\n * The helpdesk's chamados grouped by status. With `tenantId` it is ONE store's\n * tickets — drawn inside that store's CRM card (the store is resolved from the\n * CRM company's metadata.tenant_id_v2). Without it, every store's. Reads the same\n * cross-tenant console RPC (operator-gated); each row deep-links to the ticket.\n */\nexport function HelpdeskStatusPanel({ tenantId }: { tenantId?: string } = {}): React.ReactElement {\n const [requests, setRequests] = React.useState<ConsoleRequest[]>([])\n const [loading, setLoading] = React.useState(true)\n\n React.useEffect(() => {\n let alive = true\n setLoading(true)\n consoleListRequests(undefined, '')\n .then((r) => { if (alive) setRequests(tenantId ? r.filter((x) => x.tenantId === tenantId) : r) })\n .catch(() => { if (alive) setRequests([]) })\n .finally(() => { if (alive) setLoading(false) })\n return () => { alive = false }\n }, [tenantId])\n\n const byStatus = STATUS_ORDER\n .map((s) => ({ status: s, items: requests.filter((r) => r.status === s) }))\n .filter((g) => g.items.length > 0)\n\n if (loading) {\n return <div className=\"space-y-2 p-1\">{[0, 1].map((i) => <Skeleton key={i} className=\"h-14 w-full\" />)}</div>\n }\n if (requests.length === 0) {\n return <p className=\"text-xs text-muted-foreground\">{tenantId ? 'Esta loja não tem chamados.' : 'Nenhum chamado por aqui.'}</p>\n }\n\n return (\n <div className=\"flex flex-col gap-3\">\n {!tenantId && <p className=\"px-1 text-xs text-muted-foreground\">{requests.length} chamado(s) de todas as lojas.</p>}\n {byStatus.map((g) => (\n <div key={g.status} className=\"flex flex-col gap-1.5\">\n <div className=\"flex items-center gap-2 px-1\">\n <Badge variant={STATUS_TONE[g.status]}>{STATUS_LABEL[g.status]}</Badge>\n <span className=\"text-[11px] text-muted-foreground\">{g.items.length}</span>\n </div>\n {g.items.map((r) => (\n <button\n key={r.id}\n onClick={() => go(`${helpdeskConsolePath()}/${r.id}`)}\n className=\"flex w-full flex-col gap-0.5 rounded-lg border bg-card p-2 text-left transition-colors hover:border-primary/40 hover:bg-accent\"\n >\n <div className=\"flex items-center justify-between gap-2 text-[11px] text-muted-foreground\">\n <span className=\"truncate font-medium text-foreground\">{r.tenantName ?? 'Loja'}</span>\n <span>#{r.number}</span>\n </div>\n <div className=\"truncate text-xs\">{r.subject || r.description.slice(0, 60)}</div>\n </button>\n ))}\n </div>\n ))}\n </div>\n )\n}\n\nexport default HelpdeskStatusPanel\n","import React from 'react'\nimport { lazyComponent } from '@fayz-ai/core'\nimport { helpdeskConsolePath } from './console-path'\nimport { STATUS_LABEL, STATUS_TONE } from './vocabulary'\nimport { ticketsForConversation } from '../data/console'\n\n// ---------------------------------------------------------------------------\n// The support side of \"Registros vinculados\" in /conversations: the \"Chamado\n// #N\" chip on a thread tied to a ticket, and \"Abrir chamado\" from a thread that\n// is not. Handed to the inbox by the app —\n// createConversationsPlugin({ recordLinks: [supportConversationLinks] })\n// — so neither plugin imports the other. The shapes below match\n// plugin-conversations' ConversationRecordLinkSource structurally.\n// ---------------------------------------------------------------------------\n\n/** The thread fields this source reads — the same shape as plugin-conversations'\n * ConversationRef (kept identical: a React component's props are invariant). */\nexport interface SupportConversationRef {\n id: string\n contactName: string\n contactPersonId?: string\n contactHandle: string\n channel: string\n lastMessagePreview: string\n}\n\ntype Tone = 'default' | 'secondary' | 'success' | 'warning' | 'destructive' | 'outline'\n\nexport interface SupportRecordLink { id: string; label: string; href: string; hint?: string; tone?: Tone }\n\nexport interface SupportConversationLinkSource {\n id: string\n load(conversation: SupportConversationRef): Promise<{ links: SupportRecordLink[]; canAct?: boolean }>\n Action?: React.ComponentType<{ conversation: SupportConversationRef; onDone: () => void }>\n}\n\nconst ticketLabel = (n: number) => `Chamado #${String(n).padStart(4, '0')}`\n\nexport const supportConversationLinks: SupportConversationLinkSource = {\n id: 'support',\n async load(conversation) {\n const { tickets, canOpen } = await ticketsForConversation(conversation.id)\n return {\n links: tickets.map((t) => ({\n id: t.id,\n label: ticketLabel(t.number),\n href: `${helpdeskConsolePath()}/${t.id}`,\n hint: STATUS_LABEL[t.status],\n tone: STATUS_TONE[t.status],\n })),\n // A ticket's own support thread already IS a ticket: \"Abrir chamado\" is\n // for the other channels (a WhatsApp/e-mail thread with a client).\n canAct: canOpen && conversation.channel !== 'support' && !!conversation.contactPersonId,\n }\n },\n Action: lazyComponent(() => import('../views/OpenTicketFromConversation').then((m) => m.OpenTicketFromConversation)),\n}\n","import React from 'react'\nimport type { PluginManifest, PluginScope, VerticalId } from '@fayz-ai/core'\nimport { registerTranslations, replaceApp } from '@fayz-ai/core'\nimport { supportLocales } from './locales'\nimport { setHelpdeskConsolePath } from './lib/console-path'\nimport { setConversationSurface, type SupportConversationSurfaceProps } from './lib/conversation-surface'\nimport { MIGRATIONS } from './migrations'\nimport {\n defaultFaq, defaultWhatsNew, defaultStatusComponents,\n type FaqItem, type WhatsNewItem, type StatusComponent,\n} from './lib/content'\nimport { supportAITools, registerSupportAITools } from './lib/report-tool'\nimport type { SupportCenterContent } from './views/SupportCenter'\nimport { setSupportSettingsProvider, getSupportSettings, type SupportSettingsProvider } from './data/settings'\nimport { setSlaPolicySource } from './lib/sla'\nimport { LEGACY_SETTINGS_SEGMENT, SETTINGS_TAB_ID, supportSettingsPath } from './lib/settings-path'\nimport { ConsoleSkeleton, SettingsSkeleton, CenterSkeleton } from './components/RouteSkeletons'\nimport { buildSupportSetupGuides } from './lib/setup-guides'\n\n// Lazy so building the manifest (and unit-testing it) does not eagerly pull the\n// React views and their @fayz-ai/admin chain. The wrapper owns its own Suspense,\n// so the route renders whether or not the shell provides one.\nconst LazySupportCenter = React.lazy(() => import('./views/SupportCenter'))\nconst LazyHelpdeskConsole = React.lazy(() => import('./views/HelpdeskConsole'))\nconst LazySupportSettings = React.lazy(() => import('./views/settings/SupportSettingsPage'))\nconst LazyLiveChatWatcher = React.lazy(() => import('./livechat/LiveChatAgentWatcher'))\n\n/** The live-chat header control: for everyone, the assistant's \"Atendente\"\n * hand-off (chat.supportAction → the live chat with the transcript); for the\n * agents of a central, presence + the queue chime (020) and the clock-in the\n * bridge tells the V1 (021). Renders nothing; outside the route switch so it\n * survives navigation. */\nconst LiveChatWatcherControl: React.FC<unknown> = () =>\n React.createElement(React.Suspense, { fallback: null }, React.createElement(LazyLiveChatWatcher, null))\n\n/** \"Configurações do atendimento\" (support 010), same Suspense reasoning. A tab\n * of the settings hub: `/settings/support`. */\nconst SupportSettingsTab: React.FC<unknown> = () =>\n React.createElement(\n React.Suspense,\n { fallback: React.createElement(SettingsSkeleton) },\n React.createElement(LazySupportSettings, null),\n )\n\n/** The old address (`<console>/configuracoes`, V1 /atendimento/configuracoes)\n * moves to the settings tab, so a saved link still opens the screen. Without\n * this route the console's `<console>/*` would read \"configuracoes\" as a ticket. */\nconst LegacySettingsRedirect: React.FC<unknown> = () => {\n React.useEffect(() => { replaceApp(supportSettingsPath()) }, [])\n return React.createElement(SettingsSkeleton)\n}\n\n/** The helpdesk console, wrapped in its own Suspense (same reason the center is\n * lazy: keep the manifest free of the React/admin chain). */\nconst HelpdeskConsolePage: React.FC<unknown> = () =>\n React.createElement(\n React.Suspense,\n { fallback: React.createElement(ConsoleSkeleton) },\n React.createElement(LazyHelpdeskConsole, null),\n )\n\nexport interface SupportPluginOptions {\n /** Label for the plugin and the user-menu entry (default \"Suporte\"). */\n label?: string\n scope?: PluginScope\n verticalId?: VerticalId\n /** Knowledge-base content — overrides the sample FAQ that ships by default. */\n faq?: FaqItem[]\n /** Release notes shown in the \"Novidades\" card. */\n whatsNew?: WhatsNewItem[]\n /** Status components listed under the Status card. */\n statusComponents?: StatusComponent[]\n /** Where the operator console is routed (default '/support/console'). An app that\n * nests it under another rail group points it there (e.g. '/customers/support'). */\n consoleRoute?: string\n /** Rail label of the operator console (default 'Central de Chamados'). */\n consoleLabel?: string\n /** Rail position of the operator console (default 45). */\n consolePosition?: number\n /**\n * The inbox thread the operator's ticket page draws as \"Conversa com o\n * cliente\" — plugin-conversations' `ConversationThreadSurface`. Since support\n * 004 a ticket's conversation IS a thread of the helpdesk inbox; handing the\n * inbox's own surface in keeps one composer and one details panel (no second\n * inbox) without this plugin importing that one.\n */\n conversationSurface?: React.ComponentType<SupportConversationSurfaceProps>\n /**\n * Where the central's settings are read and written (support 010). Default:\n * the Supabase RPCs. A mock (`createMockSupportSettingsProvider`) draws the\n * screen on a pool that has not got the migration yet.\n */\n settingsProvider?: SupportSettingsProvider\n /**\n * Offer Suporte to every account, whatever its trade's `preset.modules` says\n * (core `offeredToEveryTrade`): a ChefControl store gets the in-app support\n * panel (Minhas solicitações, Conversar com um atendente) even though the\n * restaurant preset never listed `support`. The operator console still needs\n * the `console` facet. Default false.\n */\n offeredToEveryTrade?: boolean\n}\n\nexport function createSupportPlugin(options?: SupportPluginOptions): PluginManifest {\n const label = options?.label ?? 'Suporte'\n const consoleRoute = options?.consoleRoute?.trim() || '/support/console'\n const consoleLabel = options?.consoleLabel ?? 'Central de Chamados'\n const consolePosition = options?.consolePosition ?? 45\n setHelpdeskConsolePath(consoleRoute)\n setConversationSurface(options?.conversationSurface)\n setSupportSettingsProvider(options?.settingsProvider)\n // The board's SLA clocks read the central's policy (Configurações do\n // atendimento); getSupportSettings never rejects — V1 defaults on failure.\n setSlaPolicySource(async () => (await getSupportSettings()).sla)\n // \"Configurações do atendimento\" is a tab of the settings hub\n // (`/settings/support`) — every settings screen lives under /settings. The\n // rail keeps a line to it as the console's SIBLING — the last line of the\n // group the console is nested in — not as its child.\n const settingsRoute = supportSettingsPath()\n const legacySettingsRoute = `${consoleRoute}/${LEGACY_SETTINGS_SEGMENT}`\n const consoleParent = consoleRoute.split('/').filter(Boolean).length > 1\n ? consoleRoute.slice(0, consoleRoute.lastIndexOf('/'))\n : undefined\n registerTranslations(supportLocales)\n // Make the Dico's \"modo relato\" tool runnable (client-plane executor). Guarded\n // to the browser inside, so this is a no-op when the manifest is built on the\n // server or in a unit test.\n registerSupportAITools()\n\n const content: SupportCenterContent = {\n faq: options?.faq ?? defaultFaq,\n whatsNew: options?.whatsNew ?? defaultWhatsNew,\n statusComponents: options?.statusComponents ?? defaultStatusComponents,\n }\n\n const SupportPage: React.FC<unknown> = () =>\n React.createElement(\n React.Suspense,\n { fallback: React.createElement(CenterSkeleton) },\n React.createElement(LazySupportCenter, { content }),\n )\n\n return {\n id: 'support',\n name: label,\n icon: 'LifeBuoy',\n version: '0.1.0',\n scope: options?.scope ?? 'universal',\n verticalId: options?.verticalId,\n defaultEnabled: true,\n ...(options?.offeredToEveryTrade ? { offeredToEveryTrade: true } : {}),\n dependencies: [],\n\n // Support is for everyone, like the V1 support panel (\"nasce liberada em\n // todos os perfis\") — so the route is open to any authenticated user rather\n // than gated by a deny-by-default feature. Only `support.all` is a declared\n // permission: it unlocks the \"Toda a empresa\" view, and ships denied (the\n // admin/owner holds it).\n declaredFeatures: [\n { id: 'support.all', label: 'Solicitações de toda a empresa', group: label },\n // V1 helpdesk_admin: change the central's settings (support 010 guards the\n // RPCs with support.admin.manage; the owner role gets it on its own).\n { id: 'support.admin', label: 'Administrar a central de atendimento', group: label, actions: ['manage'] },\n ],\n\n // The requester reaches Suporte from the user menu. The OPERATOR console line\n // is gated by the `console` FACET — it shows ONLY in the workspace that runs\n // the helpdesk (GoControl), where the facet is on. In a store (Pertinho,\n // Artorius…) the facet is off, so the line is absent no matter who is logged\n // in. It is a per-TENANT line: you see it when you are IN the GoControl\n // workspace, not because of who you are.\n navigation: [\n {\n id: 'support-console',\n section: 'main',\n position: consolePosition,\n label: consoleLabel,\n route: consoleRoute,\n icon: 'LifeBuoy',\n // Sit right below \"Clientes\": land above the line the rail draws next\n // after it (AtendeAI, then the CRM/financial block).\n before: ['/atendeai', '/sales', '/financial'],\n requiresFacet: 'console',\n },\n {\n id: 'support-settings',\n section: 'main',\n position: consolePosition + 20,\n label: 'Configurações do atendimento',\n route: settingsRoute,\n icon: 'Settings',\n ...(consoleParent ? { parent: consoleParent } : {}),\n requiresFacet: 'console',\n permission: { feature: 'support.admin', action: 'manage' },\n },\n ],\n\n // Off for every tenant by default; enabled only for the helpdesk workspace\n // with scripts/support-enable-console.mjs. A store that turns on Suporte does\n // NOT get it.\n facets: [\n {\n id: 'console',\n label: 'Central de Chamados (operador)',\n description: 'O console cross-tenant do suporte — só no workspace que opera o helpdesk.',\n },\n ],\n\n // \"Modo relato\": the assistant registers a request instead of improvising a\n // fix. The executor is wired above (registerSupportAITools); the opener\n // suggestions ride on the tool (the V1 doors).\n aiTools: supportAITools,\n\n routes: [\n {\n path: '/support',\n component: SupportPage as React.ComponentType<unknown>,\n guard: 'authenticated',\n },\n {\n // The helpdesk console. Open to any authenticated user as a route; the\n // view calls support_is_operator() and shows \"acesso restrito\" to a\n // non-operator, and every data call is gated server-side anyway.\n path: consoleRoute,\n component: HelpdeskConsolePage as React.ComponentType<unknown>,\n guard: 'authenticated',\n title: consoleLabel,\n },\n {\n // The retired address, kept only to forward a saved link to\n // /settings/support. More specific than the console's `${consoleRoute}/*`.\n path: legacySettingsRoute,\n component: LegacySettingsRedirect as React.ComponentType<unknown>,\n guard: 'authenticated',\n title: 'Configurações do atendimento',\n },\n ],\n\n // The settings screen itself: `/settings/support`. Same gates as the rail\n // line — the helpdesk workspace only (`console` facet) and whoever\n // administers the central; the page still asks the server (\"Acesso restrito\").\n settings: [\n {\n id: SETTINGS_TAB_ID,\n label: 'Central de atendimento',\n icon: 'LifeBuoy',\n section: 'communication',\n keywords: ['atendimento', 'atendentes', 'chamados', 'SLA', 'prazos', 'horário', 'ausência', 'anexos', 'suporte'],\n component: SupportSettingsTab as React.ComponentType<unknown>,\n requiresFacet: 'console',\n permission: { feature: 'support.admin', action: 'manage' },\n },\n ],\n\n // The live chat's agent side: presence (\"Disponível para conversas\") and the\n // chime of a new waiting chat, wherever the agent is in the app. It asks the\n // server whether this person is an agent of the open central and mounts\n // nothing otherwise (header controls have no facet gate).\n headerControls: [{ id: 'support-livechat', component: LiveChatWatcherControl, order: 94 }],\n\n setupGuides: buildSupportSetupGuides(settingsRoute, consoleRoute),\n\n migrations: MIGRATIONS.map((entry) => ({\n id: `support-${entry.id}`,\n version: '0.1.0',\n sql: entry.sql,\n description:\n 'Central de Suporte do Dico: the plg_support_* tables (requests, messages, events, attachments, notifications), their RLS, the per-tenant number trigger and the private support-attachments bucket; since 004 the ticket conversation is a thread of the helpdesk inbox (plugin-conversations).',\n })),\n\n locales: supportLocales,\n }\n}\n\nexport { useSupportStore } from './store'\n// A store's chamados by status, for embedding in that store's CRM card (the CRM\n// resolves the store tenant from company.metadata.tenant_id_v2 and passes it).\nexport { HelpdeskStatusPanel } from './components/HelpdeskStatusPanel'\nexport * from './types'\n// The inbox side of the unification: hand to createConversationsPlugin({\n// recordLinks: [supportConversationLinks] }) for the \"Chamado #N\" chip and\n// \"Abrir chamado\" on a conversation.\nexport {\n supportConversationLinks,\n type SupportConversationLinkSource,\n type SupportConversationRef,\n type SupportRecordLink,\n} from './lib/conversation-links'\nexport type { SupportConversationSurfaceProps } from './lib/conversation-surface'\n// The central's settings (support 010) — the board reads SLA/hours from here.\nexport {\n getSupportSettings, listSupportAgents, getMySupportAgent, getSupportAccess,\n createSupabaseSupportSettingsProvider, createMockSupportSettingsProvider,\n SupportSettingsError,\n type SupportSettingsProvider, type SupportAgent, type SupportAgentCandidate,\n type SupportAgentPatch, type SupportSettingsAccess, type MockSupportSettingsSeed,\n} from './data/settings'\nexport {\n SUPPORT_SETTINGS_DEFAULTS, slaTargets, describeBusinessHours, isWithinBusinessHours,\n WEEKDAY_LABEL,\n type SupportSettings, type SupportSlaPolicy, type SupportBusinessHours, type SupportWeekday,\n} from './lib/support-settings'\nexport { supportSettingsPath } from './lib/settings-path'\n// The live chat (support 020): the customer's panel and the board's queue, for\n// hosts that mount them somewhere else (e.g. next to the assistant).\nexport { LiveChatPanel, type LiveChatPanelProps } from './livechat/LiveChatPanel'\nexport { LiveChatQueue, type LiveChatQueueProps } from './livechat/LiveChatQueue'\nexport {\n chatAvailability, openChat, chatState, chatQueue, acceptChat, closeChat,\n type ChatAvailability, type ChatState, type ChatQueue, type QueueChat, type ChatAgentMe, type OpenChatInput,\n} from './livechat/api'\nexport { buildTranscript, chatSubject, type TranscriptMessage } from './livechat/rules'\n"]}
@@ -0,0 +1,27 @@
1
+ import type { SupportAttachment } from '../types';
2
+ /** Marks the board tickets whose id is in `importedIds`. */
3
+ export declare function markImported<T extends {
4
+ id: string;
5
+ imported?: boolean;
6
+ }>(tickets: T[], importedIds: readonly string[]): T[];
7
+ export interface ImportedAttachmentSplit {
8
+ /** Files in the V2 bucket (the V2's own, and the copied V1 ones). */
9
+ stored: SupportAttachment[];
10
+ /** V1 files of which only the name came over. */
11
+ inV1: SupportAttachment[];
12
+ /** V1 attachment ids already copied to the V2 (left out of the live V1 list). */
13
+ copiedIds: Set<string>;
14
+ }
15
+ export declare function splitImportedAttachments(attachments: readonly SupportAttachment[]): ImportedAttachmentSplit;
16
+ /**
17
+ * The live V1 list (null = the V1 could not answer) against what the import
18
+ * brought: `live` = what the V1 links, minus the copied files; `names` = the
19
+ * imported names the V1 did not link (V1 off, file gone) — shown "no V1".
20
+ */
21
+ export declare function mergeV1Attachments<L extends {
22
+ id: string;
23
+ }>(live: readonly L[] | null, split: Pick<ImportedAttachmentSplit, 'inV1' | 'copiedIds'>): {
24
+ live: L[];
25
+ names: SupportAttachment[];
26
+ };
27
+ //# sourceMappingURL=imported.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imported.d.ts","sourceRoot":"","sources":["../../src/lib/imported.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAajD,4DAA4D;AAC5D,wBAAgB,YAAY,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,WAAW,EAAE,SAAS,MAAM,EAAE,GAAG,CAAC,EAAE,CAI5H;AAED,MAAM,WAAW,uBAAuB;IACtC,qEAAqE;IACrE,MAAM,EAAE,iBAAiB,EAAE,CAAA;IAC3B,iDAAiD;IACjD,IAAI,EAAE,iBAAiB,EAAE,CAAA;IACzB,iFAAiF;IACjF,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CACvB;AAED,wBAAgB,wBAAwB,CAAC,WAAW,EAAE,SAAS,iBAAiB,EAAE,GAAG,uBAAuB,CAU3G;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,EACzD,IAAI,EAAE,SAAS,CAAC,EAAE,GAAG,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,uBAAuB,EAAE,MAAM,GAAG,WAAW,CAAC,GACpF;IAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IAAC,KAAK,EAAE,iBAAiB,EAAE,CAAA;CAAE,CAI3C"}
@@ -1,4 +1,24 @@
1
1
  import type { PluginAITool } from '@fayz-ai/core';
2
+ import type { SupportKind } from '../types';
3
+ /** What the tools need from the in-chat mode (the live chat, the cards). Set by installSupportInChat. */
4
+ export interface SupportToolBridge {
5
+ takeTurnFiles: () => File[];
6
+ startLiveChat: () => Promise<{
7
+ ok: boolean;
8
+ number?: number;
9
+ reason?: string;
10
+ }>;
11
+ resumeChat: (id: string, number: number) => void;
12
+ }
13
+ export declare function setSupportToolBridge(next: SupportToolBridge | null): void;
14
+ /** The support menu's doors, as chips (each with its own icon and a deterministic
15
+ * path — admin `registerChatAction`; with nothing registered they send `prompt`). */
16
+ export declare const SUPPORT_DOOR_SUGGESTIONS: {
17
+ label: string;
18
+ prompt: string;
19
+ icon: string;
20
+ action: string;
21
+ }[];
2
22
  export declare const supportAITools: PluginAITool[];
3
23
  export interface ReportIssueResult {
4
24
  ok: boolean;
@@ -6,20 +26,45 @@ export interface ReportIssueResult {
6
26
  number?: number;
7
27
  status?: string;
8
28
  attachments?: number;
9
- ref?: {
10
- id: string;
11
- label: string;
12
- path: string;
13
- };
14
29
  message?: string;
15
30
  error?: string;
31
+ chatWidget?: {
32
+ type: string;
33
+ props: Record<string, unknown>;
34
+ };
16
35
  }
36
+ /** Client-plane executor. Writes the request through the support data port
37
+ * (`supportData()` — the platform's RPCs, or a host's provider: the V1's edge),
38
+ * attaches the files of the turn and hands back the number plus the card the
39
+ * chat shows ("Solicitação #N registrada"). */
40
+ /** One request through the support data port, with what the person attached: what every path registers through. */
41
+ export declare function createSupportRequest(input: {
42
+ kind: SupportKind;
43
+ description: string;
44
+ subject?: string | null;
45
+ files?: File[];
46
+ route?: string | null;
47
+ snapshot?: Record<string, unknown>;
48
+ }): Promise<{
49
+ id: string;
50
+ number: number;
51
+ }>;
52
+ export declare function executeReportIssue(args: Record<string, unknown>): Promise<ReportIssueResult>;
53
+ /** Read-plane executor: the user's requests, ranked by how well they match the
54
+ * complaint, so the agent can see "this is already #N" before duplicating —
55
+ * and, asked to SHOW them, the card with the list. */
56
+ export declare function executeFindRequests(args: Record<string, unknown>): Promise<unknown>;
57
+ export declare function executeStartLiveChat(): Promise<unknown>;
58
+ export declare function executeOpenRequest(args: Record<string, unknown>): Promise<unknown>;
59
+ /** Executors by tool name — what a host registers (the V1 brain calls them through its panel). */
60
+ export declare const supportToolHandlers: Record<string, (args: Record<string, unknown>) => Promise<unknown>>;
17
61
  /**
18
- * Register the client-plane executor for `reportIssue`.
62
+ * Register the client-plane executors and the in-chat mode (chips, cards, the
63
+ * "Atendente" hand-off).
19
64
  *
20
- * Done through a DYNAMIC import of @fayz-ai/admin, guarded to the browser, so
21
- * building the manifest (and unit-testing it) never pulls the admin React chain
22
- * — the same reason index.ts lazy-loads the views. Idempotent.
65
+ * Done through a DYNAMIC import, guarded to the browser, so building the
66
+ * manifest (and unit-testing it) never pulls the admin React chain — the same
67
+ * reason index.ts lazy-loads the views. Idempotent.
23
68
  */
24
69
  export declare function registerSupportAITools(): void;
25
70
  //# sourceMappingURL=report-tool.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"report-tool.d.ts","sourceRoot":"","sources":["../../src/lib/report-tool.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAiDjD,eAAO,MAAM,cAAc,EAAE,YAAY,EA4DxC,CAAA;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,OAAO,CAAA;IACX,EAAE,CAAC,EAAE,MAAM,C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ACb,CAIA,CAAA;AAGD,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,WAAW,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,kBAAkB,EAAE,MAAM,CAAA;CAAE,CA6BvG,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAcxD,CAAA;AAED,mFAAmF;AACnF,eAAO,MAAM,gBAAgB,EAAE,WAAW,CAAC,gBAAgB,CAEzD,CAAA;AAKF,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAS3D,CAAA;AAED,yCAAyC;AACzC,eAAO,MAAM,iBAAiB,EAAE,aAAa,EAE5C,CAAA;AAED,4EAA4E;AAC5E,eAAO,MAAM,mBAAmB,EAAE,eAAe,EAAwC,CAAA;AAEzF,sFAAsF;AACtF,wBAAgB,aAAa,CAAC,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAgBjF;AAED,kEAAkE;AAClE,wBAAgB,SAAS,CAAC,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAO7E;AAED,+EAA+E;AAC/E,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAIzD"}
@@ -5,8 +5,9 @@ export declare const HEARTBEAT_MS = 30000;
5
5
  /**
6
6
  * "Atendente" in the assistant (admin `chat.supportAction`): while this account
7
7
  * has a central to talk to (support_chat_availability — not the central itself,
8
- * not a pool without support 020), the button takes the person to the support
9
- * center and opens the live chat with what they told the bot.
8
+ * not a pool without support 020), the button turns THE SAME conversation into
9
+ * the live chat with the team (in-chat mode, chat-handoff). It never navigates:
10
+ * the support page stays a page, the assistant opens no separate screen.
10
11
  */
11
12
  export declare function SupportChatHandoff(): null;
12
13
  /** The header control: the hand-off for everyone, the watcher for agents. */
@@ -1 +1 @@
1
- {"version":3,"file":"LiveChatAgentWatcher.d.ts","sourceRoot":"","sources":["../../src/livechat/LiveChatAgentWatcher.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AA4BzB,wBAAgB,oBAAoB,SAkEnC;AAED,8EAA8E;AAC9E,eAAO,MAAM,YAAY,QAAS,CAAA;AAElC;;;;;GAKG;AACH,wBAAgB,kBAAkB,SAkBjC;AAED,6EAA6E;AAC7E,MAAM,CAAC,OAAO,UAAU,qBAAqB,sBAO5C"}
1
+ {"version":3,"file":"LiveChatAgentWatcher.d.ts","sourceRoot":"","sources":["../../src/livechat/LiveChatAgentWatcher.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AA4BzB,wBAAgB,oBAAoB,SAkEnC;AAED,8EAA8E;AAC9E,eAAO,MAAM,YAAY,QAAS,CAAA;AAElC;;;;;;GAMG;AACH,wBAAgB,kBAAkB,SAUjC;AAED,6EAA6E;AAC7E,MAAM,CAAC,OAAO,UAAU,qBAAqB,sBAO5C"}
@@ -0,0 +1,19 @@
1
+ import { InChatController } from './in-chat';
2
+ import { RequestFlow } from './in-chat-request';
3
+ export declare function getRequestFlow(): RequestFlow;
4
+ export declare function getInChatController(): InChatController;
5
+ /**
6
+ * Idempotent (counted): the manifest and a host may both call it. Returns the
7
+ * uninstall. The "Atendente" handler is separate — see refreshSupportHandler.
8
+ */
9
+ export declare function installSupportInChat(): () => void;
10
+ /**
11
+ * The header's "Atendente": registered while this account has a live chat to
12
+ * talk to (chatAvailability enabled — not the central itself, not a pool
13
+ * without support 020). It starts the live chat IN the conversation; it never
14
+ * navigates. Re-run on a tenant switch.
15
+ */
16
+ export declare function refreshSupportHandler(): Promise<boolean>;
17
+ /** For tests and a host's dispose: is a person answering right now? */
18
+ export declare function supportInChatActive(): boolean;
19
+ //# sourceMappingURL=in-chat-install.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"in-chat-install.d.ts","sourceRoot":"","sources":["../../src/livechat/in-chat-install.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,gBAAgB,EAA0F,MAAM,WAAW,CAAA;AACpI,OAAO,EAAE,WAAW,EAA+C,MAAM,mBAAmB,CAAA;AA+D5F,wBAAgB,cAAc,IAAI,WAAW,CAoB5C;AAID,wBAAgB,mBAAmB,IAAI,gBAAgB,CAYtD;AAuCD;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,IAAI,CAUjD;AA0FD;;;;;GAKG;AACH,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,OAAO,CAAC,CAiB9D;AAgBD,uEAAuE;AACvE,wBAAgB,mBAAmB,IAAI,OAAO,CAE7C"}
@@ -0,0 +1,10 @@
1
+ type Opener = (chat: {
2
+ id: string | null;
3
+ number: number | null;
4
+ }) => void;
5
+ export declare function setLiveChatOpener(next: Opener | null): void;
6
+ /** true = the assistant took it (the caller does not open its own chat screen). */
7
+ export declare function openLiveChatInAssistant(id: string | null, number?: number | null): boolean;
8
+ export declare function hasAssistantLiveChat(): boolean;
9
+ export {};
10
+ //# sourceMappingURL=in-chat-link.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"in-chat-link.d.ts","sourceRoot":"","sources":["../../src/livechat/in-chat-link.ts"],"names":[],"mappings":"AAIA,KAAK,MAAM,GAAG,CAAC,IAAI,EAAE;IAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,KAAK,IAAI,CAAA;AAI1E,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAE3D;AAED,mFAAmF;AACnF,wBAAgB,uBAAuB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,EAAE,MAAM,GAAE,MAAM,GAAG,IAAW,GAAG,OAAO,CAIhG;AAED,wBAAgB,oBAAoB,IAAI,OAAO,CAE9C"}
@@ -0,0 +1,99 @@
1
+ import type { SupportStatus } from '../types';
2
+ export type InChatPhase = 'idle' | 'connecting' | 'waiting' | 'chatting' | 'rating' | 'closing';
3
+ export interface InChatState {
4
+ phase: InChatPhase;
5
+ requestId: string | null;
6
+ number: number | null;
7
+ agentName: string | null;
8
+ position: number | null;
9
+ /** Who asked "Ficou bom?": the team (resolved_check) or the person ("Encerrar"). */
10
+ ratingBy: 'team' | 'user' | null;
11
+ /** The agent whose "entrou na conversa" line is already in the thread. */
12
+ announced: string | null;
13
+ }
14
+ export declare const INITIAL_IN_CHAT: InChatState;
15
+ export interface ChatSnapshot {
16
+ status: SupportStatus;
17
+ waiting: boolean;
18
+ teamReplied: boolean;
19
+ agentName: string | null;
20
+ position: number | null;
21
+ }
22
+ export type InChatEvent = {
23
+ t: 'start';
24
+ } | {
25
+ t: 'nobody';
26
+ }
27
+ /** `quiet`: this thread already says it (a second resume of the same chat draws no new line). */
28
+ | {
29
+ t: 'opened';
30
+ id: string;
31
+ number: number;
32
+ resumed?: boolean;
33
+ quiet?: boolean;
34
+ } | {
35
+ t: 'state';
36
+ snapshot: ChatSnapshot;
37
+ }
38
+ /** Someone took the conversation (read before their messages are shown, so the line comes first). */
39
+ | {
40
+ t: 'agent';
41
+ name: string;
42
+ } | {
43
+ t: 'end';
44
+ } | {
45
+ t: 'continue';
46
+ } | {
47
+ t: 'rated';
48
+ ok: boolean;
49
+ } | {
50
+ t: 'closed';
51
+ } | {
52
+ t: 'failed';
53
+ };
54
+ export type InChatEffect =
55
+ /** A system line across the thread. */
56
+ {
57
+ k: 'line';
58
+ text: string;
59
+ }
60
+ /** "Ficou bom?" as quick replies in the thread. */
61
+ | {
62
+ k: 'ask-rating';
63
+ by: 'team' | 'user';
64
+ }
65
+ /**
66
+ * The person ended it: close it on the server as far as this side can —
67
+ * `waiting` = leave the queue (cancel); otherwise end it / tell the team.
68
+ * Fire-and-forget: the thread is already back with the assistant.
69
+ */
70
+ | {
71
+ k: 'leave';
72
+ requestId: string;
73
+ waiting: boolean;
74
+ }
75
+ /** Nobody online: the assistant says so and offers to leave a message. */
76
+ | {
77
+ k: 'offline';
78
+ }
79
+ /** The conversation is over: back to the assistant. */
80
+ | {
81
+ k: 'done';
82
+ };
83
+ export declare function isLivePhase(phase: InChatPhase): boolean;
84
+ export declare function endedLine(number: number | null): string;
85
+ export declare function stepInChat(state: InChatState, event: InChatEvent): {
86
+ state: InChatState;
87
+ effects: InChatEffect[];
88
+ };
89
+ /** The header's support button while the conversation runs ("Em atendimento · #44"; "#44" where narrow). */
90
+ export declare function headerLine(state: InChatState): {
91
+ label: string;
92
+ short: string;
93
+ } | null;
94
+ /** The strip's words for a state. */
95
+ export declare function statusLine(state: InChatState): {
96
+ status: string;
97
+ detail: string | null;
98
+ };
99
+ //# sourceMappingURL=in-chat-machine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"in-chat-machine.d.ts","sourceRoot":"","sources":["../../src/livechat/in-chat-machine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AA8B7C,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,YAAY,GAAG,SAAS,GAAG,UAAU,GAAG,QAAQ,GAAG,SAAS,CAAA;AAE/F,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,WAAW,CAAA;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,oFAAoF;IACpF,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;IAChC,0EAA0E;IAC1E,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;CACzB;AAED,eAAO,MAAM,eAAe,EAAE,WAE7B,CAAA;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,aAAa,CAAA;IACrB,OAAO,EAAE,OA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