@12-apps/mcp 3.5.1 → 3.7.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.
@@ -0,0 +1,114 @@
1
+ import { PT_BR_CONFIRM_ACTION_COPY } from "@12-apps/ui/pt-BR";
2
+
3
+ import type { McpAiCopy } from "./copy";
4
+
5
+ /**
6
+ * The pt-BR pack for the AI-integration screens — a NAMED constant a host
7
+ * passes by hand, never a default.
8
+ *
9
+ * The filename is what exempts this file from the copy-portability gate:
10
+ * Portuguese may ship, it may not be silent. Every sentence is VERBATIM what
11
+ * the components used to render, so a host adopting it sees no change on
12
+ * screen — what changes is that the words are chosen in a diff.
13
+ */
14
+ export const PT_BR_MCP_AI_COPY: McpAiCopy = {
15
+ capabilities: {
16
+ heading: "O que o assistente faz por você",
17
+ subheading: "Sem planilhas, sem cliques — é só perguntar na conversa.",
18
+ },
19
+ landing: {
20
+ eyebrow: "Integração com IA",
21
+ titleTail: "à sua loja",
22
+ lede:
23
+ "Deixe o Claude, o ChatGPT e outros assistentes responderem sobre o seu cardápio, estoque e " +
24
+ "pedidos — e executarem ações por você, direto na conversa. Com segurança e sem instalar nada.",
25
+ trust: [
26
+ {
27
+ id: "login",
28
+ label: "Usa o seu próprio login",
29
+ caption: "Sem chaves ou credenciais extras",
30
+ },
31
+ { id: "install", label: "Sem instalar nada", caption: "Conecta em poucos minutos" },
32
+ {
33
+ id: "permissions",
34
+ label: "Só o que você pode",
35
+ caption: "As suas permissões, nada além",
36
+ },
37
+ { id: "surface", label: "Navegador ou app", caption: "Claude, ChatGPT, Codex" },
38
+ ],
39
+ start: "Começar",
40
+ },
41
+ flow: {
42
+ steps: {
43
+ select: "Escolher",
44
+ copyUrl: "Copiar URL",
45
+ configure: "Configurar",
46
+ connect: "Conectar",
47
+ install: "Instalar",
48
+ confirm: "Confirmar",
49
+ },
50
+ back: "Voltar",
51
+ next: "Próximo",
52
+ advance: "Continuar",
53
+ finish: "Concluir",
54
+ copyUrl: "Copiar URL",
55
+ copied: "Copiado",
56
+ copyMessage: "Copiar mensagem",
57
+ copyUrlTitle: "Copie a URL da sua loja",
58
+ urlCaption:
59
+ "É o único dado que você cola no assistente — ao copiar, seguimos para o próximo passo.",
60
+ promptCaption:
61
+ "Assim ele se conecta, se identifica (Claude, ChatGPT…) e registramos a conexão.",
62
+ askTitle: "Peça ao assistente para conectar",
63
+ installBody:
64
+ "Abra o plugin da sua loja, clique em Instalar e autorize o acesso — sem copiar URL nem gerar credenciais.",
65
+ installAction: "Instalar o plugin da loja",
66
+ pasteTitle: "Cole esta mensagem no assistente",
67
+ pasteInstallCaption:
68
+ "Cole no assistente para ele se conectar, se identificar e confirmar o acesso.",
69
+ connectedTo: (hostLabel) => `${hostLabel} está conectado à sua loja.`,
70
+ waitingTitle: "Esperando conexão",
71
+ waitingBody: (hostLabel) =>
72
+ `Assim que você autorizar o acesso no ${hostLabel}, ela aparece aqui automaticamente.`,
73
+ testNow: "Testar agora",
74
+ },
75
+ statusBoard: {
76
+ instructions: "Instruções",
77
+ connected: "Conectado",
78
+ notConnected: "Ainda não conectado",
79
+ connect: "Conectar",
80
+ disconnect: "Desconectar",
81
+ disconnectTitle: "Desconectar o assistente?",
82
+ disconnectBody:
83
+ "Ele perde o acesso à sua loja na hora. Para voltar a usar, será preciso conectar de novo.",
84
+ disconnectConfirm: "Desconectar",
85
+ disconnectError: "Não foi possível desconectar. Tente de novo.",
86
+ boardTitle: "Assistentes conectados",
87
+ boardCaption: "Em verde os que já operam a sua loja; em vermelho os que faltam conectar.",
88
+ confirmAction: PT_BR_CONFIRM_ACTION_COPY,
89
+ },
90
+ summary: {
91
+ activeNow: "ativo agora",
92
+ activeMinutes: (minutes) => `ativo há ${minutes} min`,
93
+ activeHours: (hours) => `ativo há ${hours} h`,
94
+ activeDays: (days) => `ativo há ${days} dias`,
95
+ configured: "Integração configurada",
96
+ connectedSuffix: "Conectado",
97
+ connectedSeveral: (names) => `${names} conectados`,
98
+ connectedGeneric: "IA conectada",
99
+ },
100
+ hostSelect: {
101
+ caption: "Selecione onde você usa a IA — o passo a passo é feito sob medida para ele.",
102
+ },
103
+ connectGuide: {
104
+ urlLabel: "URL do servidor da sua loja",
105
+ urlHint: "Copie esta URL e cole no seu assistente para conectá-lo à loja.",
106
+ moreInfo: "Para mais informações, consulte a",
107
+ connectOn: (hostLabel) => `Conectar no ${hostLabel}`,
108
+ },
109
+ onboarding: {
110
+ title: "Conecte assistentes de IA à sua loja",
111
+ editLabel: "Conectar IA",
112
+ collapseLabel: "Ocultar",
113
+ },
114
+ };
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/guide.ts"],"sourcesContent":["/**\n * AI-integration guide content — the reusable copy for a store's \"Integração com\n * IA\" onboarding. Pure, public, non-sensitive text (no React) so the on-page\n * walkthrough stays a portable, testable content module. Host brand marks/icons\n * and colours live in the components. Apps may pass their own overrides to\n * `<AiIntegrationOnboarding>`; these are the shared defaults.\n *\n * The MCP endpoint URL is NOT hardcoded here — the app derives it per request\n * from the deployment origin and passes it in.\n */\n\n/** Which brand a host belongs to — drives the icon/accent in the UI. */\nexport type AiHostBrand = \"claude\" | \"openai\";\n\nexport interface AiHostLink {\n /** Deep-link straight to the host's connector settings, when one exists. */\n url: string;\n label: string;\n}\n\n/**\n * One stage of the \"configure the connector\" part of the flow. A host can split\n * configuration across several stages, each with its OWN deep link, step label\n * and instructions — e.g. ChatGPT needs \"enable developer mode\" (Security\n * settings) and then \"configurar\" (create the connector). When a host declares\n * `configureStages`, the wizard renders one wizard step per stage (between\n * \"Copiar URL\" and \"Confirmar\") instead of the default Configurar/Conectar\n * split, and the sign-in happens inside a stage — no prompt to paste.\n */\nexport interface AiHostConfigureStage {\n /** Stable id — also the wizard step id + test id suffix (`ai-stage-${id}`). */\n id: string;\n /** Step label shown in the stepper. */\n label: string;\n /** Optional deep link opened on this stage (unlocks \"Próximo\" once opened). */\n link?: AiHostLink;\n /** The instructions shown for this stage. */\n steps: readonly string[];\n}\n\n/**\n * The AI providers a connection can be attributed to — derived server-side from\n * the OAuth client's redirect URIs (and confirmed by the `announceAiConnection`\n * tool). Drives which host card lights up green on the status board.\n */\nexport type AiProvider = \"claude\" | \"chatgpt\" | \"codex\";\n\n/** The provider a host id belongs to (claude-desktop shares Claude's provider). */\nexport function providerForHostId(hostId: string): AiProvider | null {\n if (hostId === \"claude\" || hostId === \"claude-desktop\") return \"claude\";\n if (hostId === \"chatgpt\") return \"chatgpt\";\n if (hostId === \"codex\") return \"codex\";\n return null;\n}\n\nexport interface AiHostGuide {\n /** Stable id — also the panel test id suffix (`ai-setup-${id}`). */\n id: string;\n /** Tab label shown to the owner. */\n label: string;\n brand: AiHostBrand;\n /** One-line hint of what this host is (web app, desktop app, CLI…). */\n kind: string;\n /** Optional direct link button (desktop apps have no deep link). */\n link?: AiHostLink;\n /**\n * Optional link to the host's OFFICIAL connector docs — a stable vendor URL\n * shown as a \"Para mais informações\" reference (never a deep link with a\n * volatile connector id / UI params).\n */\n docs?: AiHostLink;\n steps: readonly string[];\n /**\n * Optional per-stage configuration (each with its own deep link + label). When\n * present, the wizard renders one step per stage in place of the default\n * Configurar → Conectar split, and `steps` mirrors the flattened stage\n * instructions so the MCP guide stays a single source of truth.\n */\n configureStages?: readonly AiHostConfigureStage[];\n /**\n * Optional deep link to a PUBLISHED one-click plugin/connector for this host\n * (set per app via env, e.g. `CHATGPT_PLUGIN_URL` / `CLAUDE_PLUGIN_URL`). When\n * present, the wizard swaps the manual \"copy URL + configure connector\" path\n * for a simplified \"open → Install → authorize\" flow: the owner never copies\n * the MCP URL. Absent → the full manual flow.\n */\n pluginUrl?: string;\n}\n\nconst CONNECTOR_TAIL: readonly string[] = [\n \"Deixe OAuth Client ID e Client Secret em branco — não é preciso gerar credenciais: a loja registra o conector automaticamente no primeiro acesso.\",\n \"Confirme e clique em Connect: abre a tela de login da loja — entre com a SUA conta de lojista e autorize o acesso.\",\n \"Pronto: ative o conector na conversa para o assistente consultar e operar a sua loja.\",\n];\n\n/**\n * ChatGPT's two-stage configuration (Developer mode is now required before a\n * connector can be created). Stage 1 enables Developer mode in Security & login;\n * stage 2 creates the connector and signs in — which registers the connection on\n * the store side, so no prompt needs to be pasted afterwards.\n */\nfunction chatgptConfigureStages(\n platformName: string,\n): readonly AiHostConfigureStage[] {\n return [\n {\n id: \"enable-dev-mode\",\n label: \"enable developer mode\",\n link: {\n url: \"https://chatgpt.com/plugins#settings/Security\",\n label: \"Abrir Segurança e login\",\n },\n steps: [\n \"Ative o Modo desenvolvedor em Settings › Security and login (Segurança e login).\",\n ],\n },\n {\n id: \"configurar\",\n label: \"configurar\",\n link: {\n url: \"https://chatgpt.com/plugins#settings/Connectors?create-connector=true&redirectAfter=%2Fplugins\",\n label: \"Criar o conector\",\n },\n steps: [\n \"Isso vai abrir um popup para você criar um plugin novo. Coloque como nome o nome da sua loja e, no campo MCP, o link copiado no passo anterior.\",\n 'Marque a caixa \"I understand and want to continue\" — a OpenAI não revisou este servidor MCP; ela avisa que sites podem tentar roubar seus dados ou induzir o modelo a ações indevidas, incluindo destruir dados.',\n `Clique em \"Sign in with ${platformName}\" e entre com a sua conta de lojista para autorizar o acesso. Pronto: a conexão é registrada automaticamente.`,\n ],\n },\n ];\n}\n\n/**\n * The AI hosts a store owner can connect, in recommended order. Same OAuth flow\n * everywhere (the host drives it) — only the menu path differs per app.\n *\n * A FUNCTION of the platform's name, because one step is not generic: the\n * ChatGPT connector's consent screen shows an OAuth button labelled with\n * whoever operates the server, and the owner is told which button to click. It\n * used to name one particular STORE on one particular deployment — not even the\n * product, a tenant of it — so every other adopter instructed its owners to\n * click a button that does not exist.\n */\nexport function aiHostGuides(platformName: string): readonly AiHostGuide[] {\n const chatgptStages = chatgptConfigureStages(platformName);\n return [\n {\n id: \"claude\",\n label: \"Claude.ai\",\n brand: \"claude\",\n kind: \"No navegador\",\n link: {\n url: \"https://claude.ai/new?modal=add-custom-connector#settings/customize-connectors\",\n label: \"Abrir os conectores do Claude\",\n },\n docs: {\n url: \"https://support.anthropic.com/en/articles/11175166-how-do-i-connect-mcp-servers-to-claude-ai\",\n label: \"documentação oficial da Anthropic — conectores personalizados\",\n },\n steps: [\n \"Clique no botão acima (ou vá em Settings › Customize › Connectors) e escolha Add custom connector.\",\n \"Dê um nome ao conector (ex.: o nome da sua loja) e cole a URL do servidor MCP da sua loja (copie acima) no campo de URL.\",\n ...CONNECTOR_TAIL,\n ],\n },\n {\n id: \"claude-desktop\",\n label: \"Claude Desktop\",\n brand: \"claude\",\n kind: \"Aplicativo (Windows/Mac)\",\n docs: {\n url: \"https://support.anthropic.com/en/articles/11175166-how-do-i-connect-mcp-servers-to-claude-ai\",\n label: \"documentação oficial da Anthropic — conectores personalizados\",\n },\n steps: [\n \"Abra o Claude Desktop e vá em Settings (⚙️) › Connectors.\",\n \"Clique em Add custom connector e cole a URL do servidor MCP da sua loja (copie acima).\",\n ...CONNECTOR_TAIL,\n ],\n },\n {\n id: \"chatgpt\",\n label: \"ChatGPT\",\n brand: \"openai\",\n kind: \"No navegador\",\n link: {\n url: \"https://chatgpt.com/plugins\",\n label: \"Abrir os plugins do ChatGPT\",\n },\n docs: {\n url: \"https://developers.openai.com/apps-sdk/deploy/connect-chatgpt\",\n label:\n \"documentação oficial da OpenAI — conectar um servidor MCP ao ChatGPT\",\n },\n configureStages: chatgptStages,\n // Mirrors the flattened stage instructions so the MCP connect guide\n // (`connectToChatGpt`) can never drift from what owners see in the wizard.\n steps: chatgptStages.flatMap((stage) => stage.steps),\n },\n {\n id: \"codex\",\n label: \"Codex\",\n brand: \"openai\",\n kind: \"App / CLI de desenvolvedor\",\n link: {\n url: \"https://developers.openai.com/codex\",\n label: \"Documentação do Codex\",\n },\n docs: {\n url: \"https://developers.openai.com/apps-sdk/deploy/connect-chatgpt\",\n label: \"documentação oficial da OpenAI — conectar um servidor MCP\",\n },\n steps: [\n \"No Codex, abra as configurações de MCP (Settings › MCP no app, ou o arquivo de configuração na CLI).\",\n \"Adicione um servidor MCP e cole a URL do servidor MCP da sua loja (copie acima) como um conector remoto (HTTP).\",\n ...CONNECTOR_TAIL,\n ],\n },\n ];\n}\n\nexport interface AiCapability {\n /** Stable id — maps to an icon in the component. */\n id: string;\n /** Card headline. */\n title: string;\n /** Short supporting line, usually an example prompt in quotes. */\n detail: string;\n}\n\n/** What a connected assistant does for the owner — one marketing card each. */\nexport const AI_CAPABILITIES: readonly AiCapability[] = [\n {\n id: \"orders\",\n title: \"Acompanhe seus pedidos\",\n detail: '\"Quais pedidos entraram hoje?\"',\n },\n {\n id: \"inventory\",\n title: \"Controle o estoque\",\n detail:\n '\"Quanto ainda tenho do produto X? Registre a entrada de 20 unidades.\"',\n },\n {\n id: \"catalog\",\n title: \"Gerencie o catálogo\",\n detail: \"Crie e edite produtos e categorias conversando.\",\n },\n {\n id: \"sales\",\n title: \"Entenda suas vendas\",\n detail: '\"Qual foi o faturamento da semana?\"',\n },\n];\n\n/**\n * The permission model in one line, shown prominently: the assistant acts AS\n * the signed-in owner (auth-passthrough) — it can do exactly what the owner\n * can, nothing more, and no extra credential/API key is ever created.\n */\nexport const AI_PERMISSION_MODEL =\n \"O assistente age em seu nome, com exatamente as suas permissões: ele pode fazer o que você pode fazer na sua loja — nada além disso. Não é preciso criar nenhuma chave ou credencial extra; a autorização usa o seu próprio login.\";\n\n/** The two tools the paste-in prompt drives, and what to call the store id. */\nexport interface AiConnectPromptSpec {\n /**\n * The tool that REGISTERS the connection server-side, so the store learns\n * which assistant connected.\n */\n announceTool: string;\n /** A real READ tool, called straight after, to prove the access works. */\n probeTool: string;\n /** What that read returns, in the owner's own words (\"o estoque da loja\"). */\n probeSubject: string;\n /** What the assistant should ask for if it needs to identify the store. */\n identifierName: string;\n}\n\n/**\n * The message the owner pastes into the assistant's chat right after\n * connecting: announce the connection, then read something real to prove it\n * works. The owner types nothing.\n *\n * BUILT from the host's tool names rather than shipped with them. This was a\n * constant naming two tools — `announceAiConnection` and `listInventory` — that\n * THIS PACKAGE does not define or serve; they belong to one adopter's surface.\n * Any other host handed its owner a prompt instructing the assistant to call\n * two tools that do not exist, and because nothing registered the connection,\n * the wizard's confirm step then waited forever for a state that could never\n * arrive.\n */\nexport function aiConnectPrompt(spec: AiConnectPromptSpec): string {\n return (\n \"Você agora tem acesso ao conector MCP da minha loja. Faça, nesta ordem:\\n\" +\n `1) Execute a ferramenta ${spec.announceTool} informando qual assistente você é (host: \"chatgpt\", \"claude\" ou \"codex\") para registrar a conexão com a minha loja.\\n` +\n `2) Execute a ferramenta ${spec.probeTool} para confirmar o acesso a ${spec.probeSubject}.\\n` +\n `Se precisar do identificador da loja, me pergunte o ${spec.identifierName}.`\n );\n}\n"],"mappings":";;;;;AAgDO,SAAS,kBAAkB,QAAmC;AACnE,MAAI,WAAW,YAAY,WAAW,iBAAkB,QAAO;AAC/D,MAAI,WAAW,UAAW,QAAO;AACjC,MAAI,WAAW,QAAS,QAAO;AAC/B,SAAO;AACT;AALgB;AAyChB,IAAM,iBAAoC;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AACF;AAQA,SAAS,uBACP,cACiC;AACjC,SAAO;AAAA,IACL;AAAA,MACE,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,MAAM;AAAA,QACJ,KAAK;AAAA,QACL,OAAO;AAAA,MACT;AAAA,MACA,OAAO;AAAA,QACL;AAAA,MACF;AAAA,IACF;AAAA,IACA;AAAA,MACE,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,MAAM;AAAA,QACJ,KAAK;AAAA,QACL,OAAO;AAAA,MACT;AAAA,MACA,OAAO;AAAA,QACL;AAAA,QACA;AAAA,QACA,2BAA2B,YAAY;AAAA,MACzC;AAAA,IACF;AAAA,EACF;AACF;AA7BS;AA0CF,SAAS,aAAa,cAA8C;AACzE,QAAM,gBAAgB,uBAAuB,YAAY;AACzD,SAAO;AAAA,IACL;AAAA,MACE,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,OAAO;AAAA,MACP,MAAM;AAAA,MACN,MAAM;AAAA,QAC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