@promovaweb/inboundfy 0.0.0-stage → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BRAINSTORM.md +90 -0
- package/CHANGELOG.md +88 -0
- package/CONTEXTO.md +116 -0
- package/ESCRITA.md +245 -0
- package/ESTRATEGIA.md +96 -0
- package/ESTRUTURAS-PERSUASIVAS.md +108 -0
- package/INSTALACAO.md +162 -0
- package/LICENSE +6 -0
- package/LIMPEZA-MATERIAL-BRUTO.md +115 -0
- package/METODOLOGIA.md +231 -0
- package/README.md +270 -2
- package/RELEASING.md +123 -0
- package/SKILL-AUTORIA.md +302 -0
- package/SKILLS.md +298 -0
- package/TRADUCAO.md +100 -0
- package/bin/inboundfy.cjs +24 -0
- package/brand/README.md +45 -0
- package/brand/accessibility.md +18 -0
- package/brand/colors/README.md +11 -0
- package/brand/colors/palette.json +70 -0
- package/brand/fonts/OFL-Inter.txt +93 -0
- package/brand/fonts/OFL-Manrope.txt +93 -0
- package/brand/fonts/fonts.css +73 -0
- package/brand/fonts/inter-latin.woff2 +0 -0
- package/brand/fonts/manrope-latin.woff2 +0 -0
- package/brand/global.css +86 -0
- package/brand/logo/icon-dark.png +0 -0
- package/brand/logo/icon-dark.svg +8 -0
- package/brand/logo/icon-light.png +0 -0
- package/brand/logo/icon-light.svg +8 -0
- package/brand/logo/icon.png +0 -0
- package/brand/logo/icon.svg +9 -0
- package/brand/logo/logo-dark.png +0 -0
- package/brand/logo/logo-dark.svg +11 -0
- package/brand/logo/logo-light.png +0 -0
- package/brand/logo/logo-light.svg +11 -0
- package/brand/manifest.json +66 -0
- package/brand/tailwind-theme.js +60 -0
- package/brand/tokens.json +70 -0
- package/brand/typography/README.md +26 -0
- package/context/README.md +41 -0
- package/context/aprendizado.md +41 -0
- package/context/campanhas.md +28 -0
- package/context/canais.md +30 -0
- package/context/concorrentes.md +16 -0
- package/context/depoimentos.json +3 -0
- package/context/empresa.md +48 -0
- package/context/enderecos.md +25 -0
- package/context/estruturas-proibidas.md +288 -0
- package/context/ferramentas.md +16 -0
- package/context/glossario.md +13 -0
- package/context/links.md +63 -0
- package/context/marca-voz.md +44 -0
- package/context/ofertas.md +27 -0
- package/context/pessoas.md +18 -0
- package/context/produtos.md +22 -0
- package/context/proibicoes.md +133 -0
- package/context/publico.md +19 -0
- package/context/servicos.md +17 -0
- package/dist/acervo.d.ts +12 -0
- package/dist/acervo.d.ts.map +1 -0
- package/dist/acervo.js +183 -0
- package/dist/acervo.js.map +1 -0
- package/dist/agent.d.ts +30 -0
- package/dist/agent.d.ts.map +1 -0
- package/dist/agent.js +134 -0
- package/dist/agent.js.map +1 -0
- package/dist/calendar.d.ts +6 -0
- package/dist/calendar.d.ts.map +1 -0
- package/dist/calendar.js +78 -0
- package/dist/calendar.js.map +1 -0
- package/dist/cli.d.ts +6 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +301 -0
- package/dist/cli.js.map +1 -0
- package/dist/content.d.ts +11 -0
- package/dist/content.d.ts.map +1 -0
- package/dist/content.js +92 -0
- package/dist/content.js.map +1 -0
- package/dist/context-readiness.d.ts +10 -0
- package/dist/context-readiness.d.ts.map +1 -0
- package/dist/context-readiness.js +60 -0
- package/dist/context-readiness.js.map +1 -0
- package/dist/context-scan.d.ts +9 -0
- package/dist/context-scan.d.ts.map +1 -0
- package/dist/context-scan.js +86 -0
- package/dist/context-scan.js.map +1 -0
- package/dist/doctor.d.ts +7 -0
- package/dist/doctor.d.ts.map +1 -0
- package/dist/doctor.js +149 -0
- package/dist/doctor.js.map +1 -0
- package/dist/errors.d.ts +8 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +12 -0
- package/dist/errors.js.map +1 -0
- package/dist/installer.d.ts +23 -0
- package/dist/installer.d.ts.map +1 -0
- package/dist/installer.js +411 -0
- package/dist/installer.js.map +1 -0
- package/dist/io.d.ts +27 -0
- package/dist/io.d.ts.map +1 -0
- package/dist/io.js +157 -0
- package/dist/io.js.map +1 -0
- package/dist/output.d.ts +12 -0
- package/dist/output.d.ts.map +1 -0
- package/dist/output.js +42 -0
- package/dist/output.js.map +1 -0
- package/dist/payload.d.ts +26 -0
- package/dist/payload.d.ts.map +1 -0
- package/dist/payload.js +143 -0
- package/dist/payload.js.map +1 -0
- package/dist/pipeline.d.ts +21 -0
- package/dist/pipeline.d.ts.map +1 -0
- package/dist/pipeline.js +219 -0
- package/dist/pipeline.js.map +1 -0
- package/dist/project-structure.d.ts +28 -0
- package/dist/project-structure.d.ts.map +1 -0
- package/dist/project-structure.js +102 -0
- package/dist/project-structure.js.map +1 -0
- package/dist/schemas.d.ts +50 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +48 -0
- package/dist/schemas.js.map +1 -0
- package/dist/types.d.ts +115 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -0
- package/docs/README.md +14 -0
- package/docs/method/00-arquitetura.md +36 -0
- package/docs/method/01-setup-e-runtime.md +80 -0
- package/docs/method/02-contexto-fontes-e-precedencia.md +32 -0
- package/docs/method/03-catalogo-e-pareamento.md +58 -0
- package/docs/method/04-sequencias-e-numeracao.md +83 -0
- package/docs/method/05-artefatos-e-estados.md +91 -0
- package/docs/method/06-contrato-de-skill.md +51 -0
- package/docs/method/07-validacao-e-testes.md +72 -0
- package/docs/method/08-evolucao-do-framework.md +97 -0
- package/docs/method/09-arquitetura-das-skills.md +225 -0
- package/docs/method/10-referencia-cli.md +87 -0
- package/docs/method/README.md +30 -0
- package/docs/user/00-visao-geral.md +70 -0
- package/docs/user/01-pre-requisitos.md +56 -0
- package/docs/user/02-instalacao.md +171 -0
- package/docs/user/03-contexto-e-marca.md +84 -0
- package/docs/user/04-primeiro-brainstorm.md +62 -0
- package/docs/user/05-primeira-campanha.md +58 -0
- package/docs/user/06-primeiro-pacote.md +91 -0
- package/docs/user/07-peca-avulsa.md +65 -0
- package/docs/user/08-validacao-e-correcoes.md +106 -0
- package/docs/user/09-atualizacao-e-reparo.md +77 -0
- package/docs/user/10-solucao-de-problemas.md +86 -0
- package/docs/user/README.md +80 -0
- package/docs/user/reading-order.txt +12 -0
- package/ebook/Inboundfy-Guia-do-Usuario-v0.5.0.epub +0 -0
- package/ebook/Inboundfy-Guia-do-Usuario-v0.5.0.pdf +0 -0
- package/ebook/Inboundfy-Guia-do-Usuario-v0.5.1.epub +0 -0
- package/ebook/Inboundfy-Guia-do-Usuario-v0.5.1.pdf +0 -0
- package/ebook/Inboundfy-Guia-do-Usuario-v0.5.2.epub +0 -0
- package/ebook/Inboundfy-Guia-do-Usuario-v0.5.2.pdf +0 -0
- package/ebook/Inboundfy-Guia-do-Usuario-v0.5.3.epub +0 -0
- package/ebook/Inboundfy-Guia-do-Usuario-v0.5.3.pdf +0 -0
- package/ebook/README.md +63 -0
- package/ebook/VERSION +3 -0
- package/ebook/build.json +107 -0
- package/ebook/ebook-inboundfy.epub +0 -0
- package/ebook/ebook-inboundfy.pdf +0 -0
- package/examples/README.md +40 -0
- package/examples/cli/README.md +39 -0
- package/examples/como-funciona-o-mcp/00-entrada/material-original.md +52 -0
- package/examples/como-funciona-o-mcp/01-saneamento/base-limpa.md +60 -0
- package/examples/como-funciona-o-mcp/01-saneamento/relatorio-saneamento.md +43 -0
- package/examples/como-funciona-o-mcp/02-pesquisa-e-ativos/ativos.md +67 -0
- package/examples/como-funciona-o-mcp/03-planejamento/plano-de-oportunidades.md +39 -0
- package/examples/como-funciona-o-mcp/04-briefs/blog-como-funciona-o-mcp.md +33 -0
- package/examples/como-funciona-o-mcp/06-auditoria/auditoria-final.md +49 -0
- package/examples/como-funciona-o-mcp/97-ativos-finais/blog/como-funciona-o-mcp/README.md +92 -0
- package/examples/como-funciona-o-mcp/README.md +56 -0
- package/examples/primeiro-projeto/01-entrada.md +26 -0
- package/examples/primeiro-projeto/02-relatorio-setup.md +17 -0
- package/examples/primeiro-projeto/03-pedido.md +14 -0
- package/examples/primeiro-projeto/04-resultado.md +18 -0
- package/examples/primeiro-projeto/README.md +14 -0
- package/examples/validacao-assets/01-candidato-reprovado.md +20 -0
- package/examples/validacao-assets/02-relatorio-reprovacao.md +41 -0
- package/examples/validacao-assets/03-asset-corrigido.md +17 -0
- package/examples/validacao-assets/04-relatorio-aprovacao.md +40 -0
- package/examples/validacao-assets/05-evidencia-testes.md +49 -0
- package/examples/validacao-assets/README.md +43 -0
- package/examples/validacao-assets/brand/manual-da-marca.md +23 -0
- package/examples/validacao-assets/brief.md +15 -0
- package/examples/validacao-assets/casos/blog-estrutura-semantica/01-candidato-reprovado.md +21 -0
- package/examples/validacao-assets/casos/blog-estrutura-semantica/02-relatorio-reprovacao.md +22 -0
- package/examples/validacao-assets/casos/blog-estrutura-semantica/03-asset-corrigido.md +22 -0
- package/examples/validacao-assets/casos/blog-estrutura-semantica/04-relatorio-aprovacao.md +15 -0
- package/examples/validacao-assets/casos/blog-estrutura-semantica/README.md +13 -0
- package/examples/validacao-assets/casos/blog-estrutura-semantica/brief.md +8 -0
- package/examples/validacao-assets/casos/email-oferta/01-candidato-reprovado.md +18 -0
- package/examples/validacao-assets/casos/email-oferta/02-relatorio-reprovacao.md +20 -0
- package/examples/validacao-assets/casos/email-oferta/03-asset-corrigido.md +16 -0
- package/examples/validacao-assets/casos/email-oferta/04-relatorio-aprovacao.md +15 -0
- package/examples/validacao-assets/casos/email-oferta/README.md +14 -0
- package/examples/validacao-assets/casos/email-oferta/brief.md +9 -0
- package/examples/validacao-assets/casos/email-oferta/fonte-oferta.md +7 -0
- package/examples/validacao-assets/casos/instagram-imagem-brand/01-candidato-reprovado.svg +18 -0
- package/examples/validacao-assets/casos/instagram-imagem-brand/02-relatorio-reprovacao.md +21 -0
- package/examples/validacao-assets/casos/instagram-imagem-brand/03-asset-corrigido.svg +17 -0
- package/examples/validacao-assets/casos/instagram-imagem-brand/04-relatorio-aprovacao.md +16 -0
- package/examples/validacao-assets/casos/instagram-imagem-brand/README.md +13 -0
- package/examples/validacao-assets/casos/instagram-imagem-brand/brief.md +9 -0
- package/package.json +83 -4
- package/skills/_shared/01-preflight-e-fontes.md +66 -0
- package/skills/_shared/02-contrato-de-artefato.md +81 -0
- package/skills/_shared/03-interacao-e-handoff.md +94 -0
- package/skills/_shared/04-validacao-e-retomada.md +59 -0
- package/skills/_shared/05-contexto-editorial.md +54 -0
- package/skills/catalogo.json +2470 -0
- package/skills/inboundfy/REFERENCIA.md +214 -0
- package/skills/inboundfy/SKILL.md +105 -0
- package/skills/inboundfy/agents/openai.yaml +4 -0
- package/skills/inboundfy-acervo/REFERENCIA.md +249 -0
- package/skills/inboundfy-acervo/SKILL.md +351 -0
- package/skills/inboundfy-acervo/agents/openai.yaml +4 -0
- package/skills/inboundfy-acervo/references/estrategia-do-acervo.md +235 -0
- package/skills/inboundfy-anti-slop/ETAPAS.md +113 -0
- package/skills/inboundfy-anti-slop/REFERENCIA.md +290 -0
- package/skills/inboundfy-anti-slop/SKILL.md +98 -0
- package/skills/inboundfy-anti-slop/agents/openai.yaml +4 -0
- package/skills/inboundfy-anti-slop-codigo/REFERENCIA.md +189 -0
- package/skills/inboundfy-anti-slop-codigo/SKILL.md +78 -0
- package/skills/inboundfy-anti-slop-codigo/agents/openai.yaml +4 -0
- package/skills/inboundfy-aprendizado/REFERENCIA.md +236 -0
- package/skills/inboundfy-aprendizado/SKILL.md +97 -0
- package/skills/inboundfy-aprendizado/agents/openai.yaml +4 -0
- package/skills/inboundfy-arquitetura-site/REFERENCIA.md +223 -0
- package/skills/inboundfy-arquitetura-site/SKILL.md +69 -0
- package/skills/inboundfy-arquitetura-site/agents/openai.yaml +4 -0
- package/skills/inboundfy-aso/REFERENCIA.md +223 -0
- package/skills/inboundfy-aso/SKILL.md +69 -0
- package/skills/inboundfy-aso/agents/openai.yaml +4 -0
- package/skills/inboundfy-atribuicao/REFERENCIA.md +192 -0
- package/skills/inboundfy-atribuicao/SKILL.md +78 -0
- package/skills/inboundfy-atribuicao/agents/openai.yaml +4 -0
- package/skills/inboundfy-auditoria-seo/REFERENCIA.md +223 -0
- package/skills/inboundfy-auditoria-seo/SKILL.md +69 -0
- package/skills/inboundfy-auditoria-seo/agents/openai.yaml +4 -0
- package/skills/inboundfy-base-editorial/REFERENCIA.md +177 -0
- package/skills/inboundfy-base-editorial/SKILL.md +76 -0
- package/skills/inboundfy-base-editorial/agents/openai.yaml +4 -0
- package/skills/inboundfy-base-formatador/REFERENCIA.md +217 -0
- package/skills/inboundfy-base-formatador/SKILL.md +94 -0
- package/skills/inboundfy-base-formatador/agents/openai.yaml +4 -0
- package/skills/inboundfy-base-imagem/REFERENCIA.md +230 -0
- package/skills/inboundfy-base-imagem/SKILL.md +116 -0
- package/skills/inboundfy-base-imagem/agents/openai.yaml +4 -0
- package/skills/inboundfy-base-seo/REFERENCIA.md +236 -0
- package/skills/inboundfy-base-seo/SKILL.md +106 -0
- package/skills/inboundfy-base-seo/agents/openai.yaml +4 -0
- package/skills/inboundfy-base-validador/REFERENCIA.md +267 -0
- package/skills/inboundfy-base-validador/SKILL.md +144 -0
- package/skills/inboundfy-base-validador/agents/openai.yaml +4 -0
- package/skills/inboundfy-brainstorm/REFERENCIA.md +208 -0
- package/skills/inboundfy-brainstorm/SKILL.md +99 -0
- package/skills/inboundfy-brainstorm/agents/openai.yaml +4 -0
- package/skills/inboundfy-brainstorm/references/etapas/00-triagem.md +266 -0
- package/skills/inboundfy-brainstorm/references/etapas/01-entrevista.md +269 -0
- package/skills/inboundfy-brainstorm/references/etapas/02-pesquisa.md +271 -0
- package/skills/inboundfy-brainstorm/references/etapas/03-sintese.md +273 -0
- package/skills/inboundfy-brainstorm/references/etapas/04-validacao.md +273 -0
- package/skills/inboundfy-catalogo/REFERENCIA.md +177 -0
- package/skills/inboundfy-catalogo/SKILL.md +66 -0
- package/skills/inboundfy-catalogo/agents/openai.yaml +4 -0
- package/skills/inboundfy-concorrentes/REFERENCIA.md +197 -0
- package/skills/inboundfy-concorrentes/SKILL.md +81 -0
- package/skills/inboundfy-concorrentes/agents/openai.yaml +4 -0
- package/skills/inboundfy-conselho-marketing/REFERENCIA.md +223 -0
- package/skills/inboundfy-conselho-marketing/SKILL.md +69 -0
- package/skills/inboundfy-conselho-marketing/agents/openai.yaml +4 -0
- package/skills/inboundfy-contexto-concorrentes/REFERENCIA.md +225 -0
- package/skills/inboundfy-contexto-concorrentes/SKILL.md +91 -0
- package/skills/inboundfy-contexto-concorrentes/agents/openai.yaml +4 -0
- package/skills/inboundfy-contexto-depoimentos/REFERENCIA.md +239 -0
- package/skills/inboundfy-contexto-depoimentos/SKILL.md +105 -0
- package/skills/inboundfy-contexto-depoimentos/agents/openai.yaml +4 -0
- package/skills/inboundfy-contexto-institucional/REFERENCIA.md +141 -0
- package/skills/inboundfy-contexto-institucional/SKILL.md +92 -0
- package/skills/inboundfy-contexto-institucional/agents/openai.yaml +4 -0
- package/skills/inboundfy-contexto-institucional/references/empresa.md +339 -0
- package/skills/inboundfy-contexto-institucional/references/enderecos.md +310 -0
- package/skills/inboundfy-contexto-institucional/references/glossario.md +27 -0
- package/skills/inboundfy-contexto-institucional/references/links.md +230 -0
- package/skills/inboundfy-contexto-institucional/references/pessoas.md +311 -0
- package/skills/inboundfy-contexto-marca/REFERENCIA.md +304 -0
- package/skills/inboundfy-contexto-marca/SKILL.md +106 -0
- package/skills/inboundfy-contexto-marca/agents/openai.yaml +4 -0
- package/skills/inboundfy-contexto-oferta/REFERENCIA.md +132 -0
- package/skills/inboundfy-contexto-oferta/SKILL.md +86 -0
- package/skills/inboundfy-contexto-oferta/agents/openai.yaml +4 -0
- package/skills/inboundfy-contexto-oferta/references/ofertas.md +324 -0
- package/skills/inboundfy-contexto-oferta/references/produtos.md +332 -0
- package/skills/inboundfy-contexto-oferta/references/servicos.md +41 -0
- package/skills/inboundfy-contexto-operacao/REFERENCIA.md +132 -0
- package/skills/inboundfy-contexto-operacao/SKILL.md +88 -0
- package/skills/inboundfy-contexto-operacao/agents/openai.yaml +4 -0
- package/skills/inboundfy-contexto-operacao/references/campanhas.md +293 -0
- package/skills/inboundfy-contexto-operacao/references/canais.md +306 -0
- package/skills/inboundfy-contexto-operacao/references/ferramentas.md +295 -0
- package/skills/inboundfy-contexto-publico/REFERENCIA.md +235 -0
- package/skills/inboundfy-contexto-publico/SKILL.md +90 -0
- package/skills/inboundfy-contexto-publico/agents/openai.yaml +4 -0
- package/skills/inboundfy-copy-edicao/REFERENCIA.md +219 -0
- package/skills/inboundfy-copy-edicao/SKILL.md +83 -0
- package/skills/inboundfy-copy-edicao/agents/openai.yaml +4 -0
- package/skills/inboundfy-copy-editor/REFERENCIA.md +310 -0
- package/skills/inboundfy-copy-editor/SKILL.md +110 -0
- package/skills/inboundfy-copy-editor/agents/openai.yaml +4 -0
- package/skills/inboundfy-copy-gramatica/REFERENCIA.md +672 -0
- package/skills/inboundfy-copy-gramatica/SKILL.md +141 -0
- package/skills/inboundfy-copy-gramatica/agents/openai.yaml +4 -0
- package/skills/inboundfy-copy-oferta/REFERENCIA.md +192 -0
- package/skills/inboundfy-copy-oferta/SKILL.md +77 -0
- package/skills/inboundfy-copy-oferta/agents/openai.yaml +4 -0
- package/skills/inboundfy-copy-persuasao/REFERENCIA.md +187 -0
- package/skills/inboundfy-copy-persuasao/SKILL.md +77 -0
- package/skills/inboundfy-copy-persuasao/agents/openai.yaml +4 -0
- package/skills/inboundfy-copy-posicionamento/REFERENCIA.md +197 -0
- package/skills/inboundfy-copy-posicionamento/SKILL.md +77 -0
- package/skills/inboundfy-copy-posicionamento/agents/openai.yaml +4 -0
- package/skills/inboundfy-copy-redacao/REFERENCIA.md +203 -0
- package/skills/inboundfy-copy-redacao/SKILL.md +88 -0
- package/skills/inboundfy-copy-redacao/agents/openai.yaml +4 -0
- package/skills/inboundfy-copy-simplificar/REFERENCIA.md +210 -0
- package/skills/inboundfy-copy-simplificar/SKILL.md +117 -0
- package/skills/inboundfy-copy-simplificar/agents/openai.yaml +4 -0
- package/skills/inboundfy-dados-estruturados/REFERENCIA.md +223 -0
- package/skills/inboundfy-dados-estruturados/SKILL.md +69 -0
- package/skills/inboundfy-dados-estruturados/agents/openai.yaml +4 -0
- package/skills/inboundfy-enablement-vendas/REFERENCIA.md +223 -0
- package/skills/inboundfy-enablement-vendas/SKILL.md +69 -0
- package/skills/inboundfy-enablement-vendas/agents/openai.yaml +4 -0
- package/skills/inboundfy-especialista-blog/REFERENCIA.md +265 -0
- package/skills/inboundfy-especialista-blog/SKILL.md +146 -0
- package/skills/inboundfy-especialista-blog/agents/openai.yaml +4 -0
- package/skills/inboundfy-especialista-blog-imagem/REFERENCIA.md +232 -0
- package/skills/inboundfy-especialista-blog-imagem/SKILL.md +113 -0
- package/skills/inboundfy-especialista-blog-imagem/agents/openai.yaml +4 -0
- package/skills/inboundfy-especialista-changelog/REFERENCIA.md +236 -0
- package/skills/inboundfy-especialista-changelog/SKILL.md +105 -0
- package/skills/inboundfy-especialista-changelog/agents/openai.yaml +4 -0
- package/skills/inboundfy-especialista-ebook/REFERENCIA.md +245 -0
- package/skills/inboundfy-especialista-ebook/SKILL.md +129 -0
- package/skills/inboundfy-especialista-ebook/agents/openai.yaml +4 -0
- package/skills/inboundfy-especialista-ebook-imagem/REFERENCIA.md +221 -0
- package/skills/inboundfy-especialista-ebook-imagem/SKILL.md +107 -0
- package/skills/inboundfy-especialista-ebook-imagem/agents/openai.yaml +4 -0
- package/skills/inboundfy-especialista-email/REFERENCIA.md +242 -0
- package/skills/inboundfy-especialista-email/SKILL.md +150 -0
- package/skills/inboundfy-especialista-email/agents/openai.yaml +4 -0
- package/skills/inboundfy-especialista-infografico/REFERENCIA.md +231 -0
- package/skills/inboundfy-especialista-infografico/SKILL.md +121 -0
- package/skills/inboundfy-especialista-infografico/agents/openai.yaml +4 -0
- package/skills/inboundfy-especialista-infografico-imagem/REFERENCIA.md +231 -0
- package/skills/inboundfy-especialista-infografico-imagem/SKILL.md +105 -0
- package/skills/inboundfy-especialista-infografico-imagem/agents/openai.yaml +4 -0
- package/skills/inboundfy-especialista-instagram/REFERENCIA.md +242 -0
- package/skills/inboundfy-especialista-instagram/SKILL.md +129 -0
- package/skills/inboundfy-especialista-instagram/agents/openai.yaml +4 -0
- package/skills/inboundfy-especialista-instagram-imagem/REFERENCIA.md +239 -0
- package/skills/inboundfy-especialista-instagram-imagem/SKILL.md +109 -0
- package/skills/inboundfy-especialista-instagram-imagem/agents/openai.yaml +4 -0
- package/skills/inboundfy-especialista-linkedin/REFERENCIA.md +240 -0
- package/skills/inboundfy-especialista-linkedin/SKILL.md +131 -0
- package/skills/inboundfy-especialista-linkedin/agents/openai.yaml +4 -0
- package/skills/inboundfy-especialista-linkedin-imagem/REFERENCIA.md +225 -0
- package/skills/inboundfy-especialista-linkedin-imagem/SKILL.md +108 -0
- package/skills/inboundfy-especialista-linkedin-imagem/agents/openai.yaml +4 -0
- package/skills/inboundfy-especialista-newsletter/REFERENCIA.md +253 -0
- package/skills/inboundfy-especialista-newsletter/SKILL.md +121 -0
- package/skills/inboundfy-especialista-newsletter/agents/openai.yaml +4 -0
- package/skills/inboundfy-especialista-podcast/REFERENCIA.md +270 -0
- package/skills/inboundfy-especialista-podcast/SKILL.md +103 -0
- package/skills/inboundfy-especialista-podcast/agents/openai.yaml +4 -0
- package/skills/inboundfy-especialista-substack/REFERENCIA.md +177 -0
- package/skills/inboundfy-especialista-substack/SKILL.md +60 -0
- package/skills/inboundfy-especialista-substack/agents/openai.yaml +4 -0
- package/skills/inboundfy-especialista-video/REFERENCIA.md +242 -0
- package/skills/inboundfy-especialista-video/SKILL.md +127 -0
- package/skills/inboundfy-especialista-video/agents/openai.yaml +4 -0
- package/skills/inboundfy-especialista-video-imagem/REFERENCIA.md +224 -0
- package/skills/inboundfy-especialista-video-imagem/SKILL.md +105 -0
- package/skills/inboundfy-especialista-video-imagem/agents/openai.yaml +4 -0
- package/skills/inboundfy-especialista-webinar/REFERENCIA.md +268 -0
- package/skills/inboundfy-especialista-webinar/SKILL.md +134 -0
- package/skills/inboundfy-especialista-webinar/agents/openai.yaml +4 -0
- package/skills/inboundfy-especialista-webinar-imagem/REFERENCIA.md +223 -0
- package/skills/inboundfy-especialista-webinar-imagem/SKILL.md +104 -0
- package/skills/inboundfy-especialista-webinar-imagem/agents/openai.yaml +4 -0
- package/skills/inboundfy-especialista-youtube/REFERENCIA.md +177 -0
- package/skills/inboundfy-especialista-youtube/SKILL.md +61 -0
- package/skills/inboundfy-especialista-youtube/agents/openai.yaml +4 -0
- package/skills/inboundfy-estrategia/REFERENCIA.md +206 -0
- package/skills/inboundfy-estrategia/SKILL.md +89 -0
- package/skills/inboundfy-estrategia/agents/openai.yaml +4 -0
- package/skills/inboundfy-estrategia/references/etapas/00-briefing-cliente.md +328 -0
- package/skills/inboundfy-estrategia/references/etapas/01-pesquisa-mercado.md +316 -0
- package/skills/inboundfy-estrategia/references/etapas/02-campanha.md +332 -0
- package/skills/inboundfy-estrategia/references/etapas/03-calendario.md +323 -0
- package/skills/inboundfy-experimentacao/REFERENCIA.md +198 -0
- package/skills/inboundfy-experimentacao/SKILL.md +79 -0
- package/skills/inboundfy-experimentacao/agents/openai.yaml +4 -0
- package/skills/inboundfy-extrair-faq/REFERENCIA.md +192 -0
- package/skills/inboundfy-extrair-faq/SKILL.md +94 -0
- package/skills/inboundfy-extrair-faq/agents/openai.yaml +4 -0
- package/skills/inboundfy-geo/REFERENCIA.md +191 -0
- package/skills/inboundfy-geo/SKILL.md +85 -0
- package/skills/inboundfy-geo/agents/openai.yaml +4 -0
- package/skills/inboundfy-growth-anuncios/REFERENCIA.md +223 -0
- package/skills/inboundfy-growth-anuncios/SKILL.md +69 -0
- package/skills/inboundfy-growth-anuncios/agents/openai.yaml +4 -0
- package/skills/inboundfy-growth-comunidade/REFERENCIA.md +223 -0
- package/skills/inboundfy-growth-comunidade/SKILL.md +69 -0
- package/skills/inboundfy-growth-comunidade/agents/openai.yaml +4 -0
- package/skills/inboundfy-growth-criativos-anuncios/REFERENCIA.md +223 -0
- package/skills/inboundfy-growth-criativos-anuncios/SKILL.md +69 -0
- package/skills/inboundfy-growth-criativos-anuncios/agents/openai.yaml +4 -0
- package/skills/inboundfy-growth-cro/REFERENCIA.md +186 -0
- package/skills/inboundfy-growth-cro/SKILL.md +76 -0
- package/skills/inboundfy-growth-cro/agents/openai.yaml +4 -0
- package/skills/inboundfy-growth-distribuicao/REFERENCIA.md +223 -0
- package/skills/inboundfy-growth-distribuicao/SKILL.md +69 -0
- package/skills/inboundfy-growth-distribuicao/agents/openai.yaml +4 -0
- package/skills/inboundfy-growth-email-frio/REFERENCIA.md +223 -0
- package/skills/inboundfy-growth-email-frio/SKILL.md +69 -0
- package/skills/inboundfy-growth-email-frio/agents/openai.yaml +4 -0
- package/skills/inboundfy-growth-eventos/REFERENCIA.md +223 -0
- package/skills/inboundfy-growth-eventos/SKILL.md +69 -0
- package/skills/inboundfy-growth-eventos/agents/openai.yaml +4 -0
- package/skills/inboundfy-growth-ferramentas-gratuitas/REFERENCIA.md +223 -0
- package/skills/inboundfy-growth-ferramentas-gratuitas/SKILL.md +69 -0
- package/skills/inboundfy-growth-ferramentas-gratuitas/agents/openai.yaml +4 -0
- package/skills/inboundfy-growth-influenciadores/REFERENCIA.md +223 -0
- package/skills/inboundfy-growth-influenciadores/SKILL.md +69 -0
- package/skills/inboundfy-growth-influenciadores/agents/openai.yaml +4 -0
- package/skills/inboundfy-growth-lancamento/REFERENCIA.md +184 -0
- package/skills/inboundfy-growth-lancamento/SKILL.md +77 -0
- package/skills/inboundfy-growth-lancamento/agents/openai.yaml +4 -0
- package/skills/inboundfy-growth-lead-magnet/REFERENCIA.md +193 -0
- package/skills/inboundfy-growth-lead-magnet/SKILL.md +75 -0
- package/skills/inboundfy-growth-lead-magnet/agents/openai.yaml +4 -0
- package/skills/inboundfy-growth-loops/REFERENCIA.md +223 -0
- package/skills/inboundfy-growth-loops/SKILL.md +69 -0
- package/skills/inboundfy-growth-loops/agents/openai.yaml +4 -0
- package/skills/inboundfy-growth-onboarding/REFERENCIA.md +223 -0
- package/skills/inboundfy-growth-onboarding/SKILL.md +69 -0
- package/skills/inboundfy-growth-onboarding/agents/openai.yaml +4 -0
- package/skills/inboundfy-growth-parcerias/REFERENCIA.md +223 -0
- package/skills/inboundfy-growth-parcerias/SKILL.md +69 -0
- package/skills/inboundfy-growth-parcerias/agents/openai.yaml +4 -0
- package/skills/inboundfy-growth-paywall/REFERENCIA.md +223 -0
- package/skills/inboundfy-growth-paywall/SKILL.md +69 -0
- package/skills/inboundfy-growth-paywall/agents/openai.yaml +4 -0
- package/skills/inboundfy-growth-popups/REFERENCIA.md +223 -0
- package/skills/inboundfy-growth-popups/SKILL.md +69 -0
- package/skills/inboundfy-growth-popups/agents/openai.yaml +4 -0
- package/skills/inboundfy-growth-pricing/REFERENCIA.md +223 -0
- package/skills/inboundfy-growth-pricing/SKILL.md +69 -0
- package/skills/inboundfy-growth-pricing/agents/openai.yaml +4 -0
- package/skills/inboundfy-growth-prospeccao/REFERENCIA.md +223 -0
- package/skills/inboundfy-growth-prospeccao/SKILL.md +69 -0
- package/skills/inboundfy-growth-prospeccao/agents/openai.yaml +4 -0
- package/skills/inboundfy-growth-referencias/REFERENCIA.md +223 -0
- package/skills/inboundfy-growth-referencias/SKILL.md +69 -0
- package/skills/inboundfy-growth-referencias/agents/openai.yaml +4 -0
- package/skills/inboundfy-growth-relacoes-publicas/REFERENCIA.md +223 -0
- package/skills/inboundfy-growth-relacoes-publicas/SKILL.md +69 -0
- package/skills/inboundfy-growth-relacoes-publicas/agents/openai.yaml +4 -0
- package/skills/inboundfy-growth-retencao/REFERENCIA.md +223 -0
- package/skills/inboundfy-growth-retencao/SKILL.md +69 -0
- package/skills/inboundfy-growth-retencao/agents/openai.yaml +4 -0
- package/skills/inboundfy-growth-revops/REFERENCIA.md +223 -0
- package/skills/inboundfy-growth-revops/SKILL.md +69 -0
- package/skills/inboundfy-growth-revops/agents/openai.yaml +4 -0
- package/skills/inboundfy-growth-signup/REFERENCIA.md +223 -0
- package/skills/inboundfy-growth-signup/SKILL.md +69 -0
- package/skills/inboundfy-growth-signup/agents/openai.yaml +4 -0
- package/skills/inboundfy-growth-sms/REFERENCIA.md +223 -0
- package/skills/inboundfy-growth-sms/SKILL.md +69 -0
- package/skills/inboundfy-growth-sms/agents/openai.yaml +4 -0
- package/skills/inboundfy-growth-social/REFERENCIA.md +223 -0
- package/skills/inboundfy-growth-social/SKILL.md +69 -0
- package/skills/inboundfy-growth-social/agents/openai.yaml +4 -0
- package/skills/inboundfy-iniciar/REFERENCIA.md +189 -0
- package/skills/inboundfy-iniciar/SKILL.md +73 -0
- package/skills/inboundfy-iniciar/agents/openai.yaml +4 -0
- package/skills/inboundfy-metricas/REFERENCIA.md +194 -0
- package/skills/inboundfy-metricas/SKILL.md +76 -0
- package/skills/inboundfy-metricas/agents/openai.yaml +4 -0
- package/skills/inboundfy-personas/REFERENCIA.md +177 -0
- package/skills/inboundfy-personas/SKILL.md +69 -0
- package/skills/inboundfy-personas/agents/openai.yaml +4 -0
- package/skills/inboundfy-pesquisa-acervo/REFERENCIA.md +178 -0
- package/skills/inboundfy-pesquisa-acervo/SKILL.md +73 -0
- package/skills/inboundfy-pesquisa-acervo/agents/openai.yaml +4 -0
- package/skills/inboundfy-pesquisa-cliente/REFERENCIA.md +192 -0
- package/skills/inboundfy-pesquisa-cliente/SKILL.md +82 -0
- package/skills/inboundfy-pesquisa-cliente/agents/openai.yaml +4 -0
- package/skills/inboundfy-pipeline/REFERENCIA.md +192 -0
- package/skills/inboundfy-pipeline/SKILL.md +84 -0
- package/skills/inboundfy-pipeline/agents/openai.yaml +4 -0
- package/skills/inboundfy-planejamento/REFERENCIA.md +177 -0
- package/skills/inboundfy-planejamento/SKILL.md +75 -0
- package/skills/inboundfy-planejamento/agents/openai.yaml +4 -0
- package/skills/inboundfy-planejamento/references/etapas/00-triagem.md +336 -0
- package/skills/inboundfy-planejamento/references/etapas/01-saneamento.md +339 -0
- package/skills/inboundfy-planejamento/references/etapas/02-pesquisa.md +353 -0
- package/skills/inboundfy-planejamento/references/etapas/03-oportunidades.md +347 -0
- package/skills/inboundfy-planejamento/references/etapas/04-briefing.md +353 -0
- package/skills/inboundfy-planejamento/references/etapas/05-producao.md +328 -0
- package/skills/inboundfy-planejamento/references/etapas/06-auditoria.md +345 -0
- package/skills/inboundfy-processar-acervo/REFERENCIA.md +178 -0
- package/skills/inboundfy-processar-acervo/SKILL.md +78 -0
- package/skills/inboundfy-processar-acervo/agents/openai.yaml +4 -0
- package/skills/inboundfy-producao/REFERENCIA.md +178 -0
- package/skills/inboundfy-producao/SKILL.md +78 -0
- package/skills/inboundfy-producao/agents/openai.yaml +4 -0
- package/skills/inboundfy-seo/REFERENCIA.md +197 -0
- package/skills/inboundfy-seo/SKILL.md +80 -0
- package/skills/inboundfy-seo/agents/openai.yaml +4 -0
- package/skills/inboundfy-seo-programatico/REFERENCIA.md +223 -0
- package/skills/inboundfy-seo-programatico/SKILL.md +69 -0
- package/skills/inboundfy-seo-programatico/agents/openai.yaml +4 -0
- package/skills/inboundfy-setup/REFERENCIA.md +220 -0
- package/skills/inboundfy-setup/SKILL.md +90 -0
- package/skills/inboundfy-setup/agents/openai.yaml +4 -0
- package/skills/inboundfy-setup/scripts/inventariar-fontes-projeto.mjs +90 -0
- package/skills/inboundfy-validador-blog/REFERENCIA.md +194 -0
- package/skills/inboundfy-validador-blog/SKILL.md +81 -0
- package/skills/inboundfy-validador-blog/agents/openai.yaml +4 -0
- package/skills/inboundfy-validador-blog-imagem/REFERENCIA.md +194 -0
- package/skills/inboundfy-validador-blog-imagem/SKILL.md +76 -0
- package/skills/inboundfy-validador-blog-imagem/agents/openai.yaml +4 -0
- package/skills/inboundfy-validador-changelog/REFERENCIA.md +195 -0
- package/skills/inboundfy-validador-changelog/SKILL.md +76 -0
- package/skills/inboundfy-validador-changelog/agents/openai.yaml +4 -0
- package/skills/inboundfy-validador-ebook/REFERENCIA.md +194 -0
- package/skills/inboundfy-validador-ebook/SKILL.md +78 -0
- package/skills/inboundfy-validador-ebook/agents/openai.yaml +4 -0
- package/skills/inboundfy-validador-ebook-imagem/REFERENCIA.md +194 -0
- package/skills/inboundfy-validador-ebook-imagem/SKILL.md +77 -0
- package/skills/inboundfy-validador-ebook-imagem/agents/openai.yaml +4 -0
- package/skills/inboundfy-validador-email/REFERENCIA.md +194 -0
- package/skills/inboundfy-validador-email/SKILL.md +78 -0
- package/skills/inboundfy-validador-email/agents/openai.yaml +4 -0
- package/skills/inboundfy-validador-infografico/REFERENCIA.md +194 -0
- package/skills/inboundfy-validador-infografico/SKILL.md +76 -0
- package/skills/inboundfy-validador-infografico/agents/openai.yaml +4 -0
- package/skills/inboundfy-validador-infografico-imagem/REFERENCIA.md +194 -0
- package/skills/inboundfy-validador-infografico-imagem/SKILL.md +77 -0
- package/skills/inboundfy-validador-infografico-imagem/agents/openai.yaml +4 -0
- package/skills/inboundfy-validador-instagram/REFERENCIA.md +194 -0
- package/skills/inboundfy-validador-instagram/SKILL.md +77 -0
- package/skills/inboundfy-validador-instagram/agents/openai.yaml +4 -0
- package/skills/inboundfy-validador-instagram-imagem/REFERENCIA.md +194 -0
- package/skills/inboundfy-validador-instagram-imagem/SKILL.md +77 -0
- package/skills/inboundfy-validador-instagram-imagem/agents/openai.yaml +4 -0
- package/skills/inboundfy-validador-linkedin/REFERENCIA.md +194 -0
- package/skills/inboundfy-validador-linkedin/SKILL.md +77 -0
- package/skills/inboundfy-validador-linkedin/agents/openai.yaml +4 -0
- package/skills/inboundfy-validador-linkedin-imagem/REFERENCIA.md +194 -0
- package/skills/inboundfy-validador-linkedin-imagem/SKILL.md +77 -0
- package/skills/inboundfy-validador-linkedin-imagem/agents/openai.yaml +4 -0
- package/skills/inboundfy-validador-newsletter/REFERENCIA.md +194 -0
- package/skills/inboundfy-validador-newsletter/SKILL.md +78 -0
- package/skills/inboundfy-validador-newsletter/agents/openai.yaml +4 -0
- package/skills/inboundfy-validador-podcast/REFERENCIA.md +194 -0
- package/skills/inboundfy-validador-podcast/SKILL.md +76 -0
- package/skills/inboundfy-validador-podcast/agents/openai.yaml +4 -0
- package/skills/inboundfy-validador-substack/REFERENCIA.md +177 -0
- package/skills/inboundfy-validador-substack/SKILL.md +60 -0
- package/skills/inboundfy-validador-substack/agents/openai.yaml +4 -0
- package/skills/inboundfy-validador-video/REFERENCIA.md +194 -0
- package/skills/inboundfy-validador-video/SKILL.md +77 -0
- package/skills/inboundfy-validador-video/agents/openai.yaml +4 -0
- package/skills/inboundfy-validador-video-imagem/REFERENCIA.md +194 -0
- package/skills/inboundfy-validador-video-imagem/SKILL.md +77 -0
- package/skills/inboundfy-validador-video-imagem/agents/openai.yaml +4 -0
- package/skills/inboundfy-validador-webinar/REFERENCIA.md +194 -0
- package/skills/inboundfy-validador-webinar/SKILL.md +78 -0
- package/skills/inboundfy-validador-webinar/agents/openai.yaml +4 -0
- package/skills/inboundfy-validador-webinar-imagem/REFERENCIA.md +194 -0
- package/skills/inboundfy-validador-webinar-imagem/SKILL.md +77 -0
- package/skills/inboundfy-validador-webinar-imagem/agents/openai.yaml +4 -0
- package/skills/inboundfy-validador-youtube/REFERENCIA.md +177 -0
- package/skills/inboundfy-validador-youtube/SKILL.md +60 -0
- package/skills/inboundfy-validador-youtube/agents/openai.yaml +4 -0
- package/skills/inboundfy-voz/REFERENCIA.md +177 -0
- package/skills/inboundfy-voz/SKILL.md +70 -0
- package/skills/inboundfy-voz/agents/openai.yaml +4 -0
- package/templates/acervo-readme.md +39 -0
- package/templates/brainstorm.md +99 -0
- package/templates/calendario-readme.md +7 -0
- package/templates/canais-readme.md +7 -0
- package/templates/fontes-projeto.md +57 -0
- package/templates/project/README.md +26 -0
- package/templates/project/estrategia.md +33 -0
- package/templates/project/pipeline.md +39 -0
- package/templates/skills/REFERENCIA.md +70 -0
- package/templates/skills/SKILL.md +47 -0
- package/templates/skills/openai.yaml +4 -0
- package/templates/skills/perfil.json +20 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../src/doctor.ts"],"names":[],"mappings":"AAAA;;GAEG;AAWH,OAAO,KAAK,EAEV,YAAY,EAGb,MAAM,YAAY,CAAC;AAcpB,qEAAqE;AACrE,wBAAsB,SAAS,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CA6I1E"}
|
package/dist/doctor.js
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Diagnóstico read-only da instalação e resumo de estado do framework.
|
|
3
|
+
*/
|
|
4
|
+
import { readFile } from "node:fs/promises";
|
|
5
|
+
import { join } from "node:path";
|
|
6
|
+
import { hasInstructionBlock } from "./agent.js";
|
|
7
|
+
import { exists, isRegularFile, readJson, resolvePortable } from "./io.js";
|
|
8
|
+
import { collectContextTemplates, readPackageVersion, sha256 } from "./payload.js";
|
|
9
|
+
import { installationManifestSchema, installationStateSchema, } from "./schemas.js";
|
|
10
|
+
import { validateMinimumContext } from "./context-readiness.js";
|
|
11
|
+
const EXPECTED_PROJECT_FILES = [
|
|
12
|
+
".inboundfy/README.md",
|
|
13
|
+
".inboundfy/estrategia.md",
|
|
14
|
+
".inboundfy/pipeline.md",
|
|
15
|
+
".inboundfy/fontes-projeto.md",
|
|
16
|
+
".inboundfy/fontes-candidatas.json",
|
|
17
|
+
".inboundfy/indices/acervo.json",
|
|
18
|
+
".inboundfy/indices/conteudos.json",
|
|
19
|
+
".inboundfy/indices/calendario.json",
|
|
20
|
+
];
|
|
21
|
+
/** Confere todos os arquivos sem criar diretório, trava ou cache. */
|
|
22
|
+
export async function runDoctor(projectRoot) {
|
|
23
|
+
const cliVersion = await readPackageVersion();
|
|
24
|
+
const checks = [];
|
|
25
|
+
const state = await loadState(projectRoot, checks);
|
|
26
|
+
const manifest = await loadManifest(projectRoot, checks);
|
|
27
|
+
if (state) {
|
|
28
|
+
const readiness = await validateMinimumContext(projectRoot);
|
|
29
|
+
checks.push(state.frameworkVersion === cliVersion
|
|
30
|
+
? ok("version", `CLI e framework usam ${cliVersion}.`)
|
|
31
|
+
: warning("version", `O projeto usa ${state.frameworkVersion}; o CLI atual usa ${cliVersion}. Execute update com a versão desejada.`, ".inboundfy/install.json"));
|
|
32
|
+
checks.push(state.setupStatus === "ready" && readiness.ready
|
|
33
|
+
? ok("setup-status", "O preenchimento inicial foi marcado como concluído.")
|
|
34
|
+
: state.setupStatus === "ready"
|
|
35
|
+
? error("setup-status", `O setup está marcado como concluído, mas faltam: ${readiness.missing.join("; ")}.`, ".inboundfy")
|
|
36
|
+
: warning("setup-status", "Os arquivos foram instalados, mas a skill inboundfy-setup ainda precisa concluir o preenchimento inicial.", ".inboundfy/install.json"));
|
|
37
|
+
for (const directory of [
|
|
38
|
+
state.paths.acervo,
|
|
39
|
+
state.paths.canais,
|
|
40
|
+
state.paths.calendario,
|
|
41
|
+
]) {
|
|
42
|
+
checks.push((await exists(resolvePortable(projectRoot, directory)))
|
|
43
|
+
? ok(`directory:${directory}`, `Diretório presente: ${directory}`)
|
|
44
|
+
: error(`directory:${directory}`, `Diretório ausente: ${directory}`, directory));
|
|
45
|
+
}
|
|
46
|
+
if (state.instructionFile) {
|
|
47
|
+
checks.push((await hasInstructionBlock(join(projectRoot, state.instructionFile)))
|
|
48
|
+
? ok("instruction-block", `Bloco do Inboundfy íntegro em ${state.instructionFile}.`)
|
|
49
|
+
: error("instruction-block", `O bloco delimitado do Inboundfy está ausente ou divergente em ${state.instructionFile}.`, state.instructionFile));
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
if (manifest) {
|
|
53
|
+
if (state && manifest.frameworkVersion !== state.frameworkVersion) {
|
|
54
|
+
checks.push(error("manifest-version", "A versão do manifesto diverge do estado da instalação.", ".inboundfy/manifest.json"));
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
checks.push(ok("manifest-version", "O manifesto usa a versão instalada."));
|
|
58
|
+
}
|
|
59
|
+
for (const managed of manifest.managedFiles) {
|
|
60
|
+
const path = resolvePortable(projectRoot, managed.path);
|
|
61
|
+
if (!(await isRegularFile(path))) {
|
|
62
|
+
checks.push(error(`managed:${managed.path}`, `Arquivo gerenciado ausente ou inválido: ${managed.path}`, managed.path));
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
const current = sha256(await readFile(path));
|
|
66
|
+
checks.push(current === managed.sha256
|
|
67
|
+
? ok(`managed:${managed.path}`, `Arquivo íntegro: ${managed.path}`)
|
|
68
|
+
: error(`managed:${managed.path}`, `Arquivo gerenciado foi alterado: ${managed.path}`, managed.path));
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
for (const path of EXPECTED_PROJECT_FILES) {
|
|
72
|
+
checks.push((await isRegularFile(resolvePortable(projectRoot, path)))
|
|
73
|
+
? ok(`project:${path}`, `Arquivo do projeto presente: ${path}`)
|
|
74
|
+
: error(`project:${path}`, `Arquivo do projeto ausente: ${path}`, path));
|
|
75
|
+
}
|
|
76
|
+
for (const template of await collectContextTemplates()) {
|
|
77
|
+
checks.push((await isRegularFile(resolvePortable(projectRoot, template.targetRelative)))
|
|
78
|
+
? ok(`context:${template.targetRelative}`, `Contexto presente: ${template.targetRelative}`)
|
|
79
|
+
: error(`context:${template.targetRelative}`, `Contexto ausente: ${template.targetRelative}`, template.targetRelative));
|
|
80
|
+
}
|
|
81
|
+
const summary = {
|
|
82
|
+
errors: checks.filter((check) => check.level === "error").length,
|
|
83
|
+
warnings: checks.filter((check) => check.level === "warning").length,
|
|
84
|
+
ok: checks.filter((check) => check.level === "ok").length,
|
|
85
|
+
};
|
|
86
|
+
return {
|
|
87
|
+
schemaVersion: 2,
|
|
88
|
+
healthy: summary.errors === 0,
|
|
89
|
+
installedVersion: state?.frameworkVersion ?? null,
|
|
90
|
+
cliVersion,
|
|
91
|
+
projectRoot,
|
|
92
|
+
checks,
|
|
93
|
+
summary,
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
async function loadState(projectRoot, checks) {
|
|
97
|
+
const path = join(projectRoot, ".inboundfy", "install.json");
|
|
98
|
+
if (!(await isRegularFile(path))) {
|
|
99
|
+
checks.push(error("install-state", "A instalação não possui .inboundfy/install.json.", ".inboundfy/install.json"));
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
try {
|
|
103
|
+
const state = installationStateSchema.parse(await readJson(path));
|
|
104
|
+
checks.push(ok("install-state", "O estado da instalação é válido."));
|
|
105
|
+
return state;
|
|
106
|
+
}
|
|
107
|
+
catch {
|
|
108
|
+
checks.push(error("install-state", "O arquivo .inboundfy/install.json é inválido.", ".inboundfy/install.json"));
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
async function loadManifest(projectRoot, checks) {
|
|
113
|
+
const path = join(projectRoot, ".inboundfy", "manifest.json");
|
|
114
|
+
if (!(await isRegularFile(path))) {
|
|
115
|
+
checks.push(error("manifest", "A instalação não possui .inboundfy/manifest.json.", ".inboundfy/manifest.json"));
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
try {
|
|
119
|
+
const manifest = installationManifestSchema.parse(await readJson(path));
|
|
120
|
+
checks.push(ok("manifest", "O manifesto da instalação é válido."));
|
|
121
|
+
return manifest;
|
|
122
|
+
}
|
|
123
|
+
catch {
|
|
124
|
+
checks.push(error("manifest", "O arquivo .inboundfy/manifest.json é inválido.", ".inboundfy/manifest.json"));
|
|
125
|
+
return null;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
function ok(id, message) {
|
|
129
|
+
return { id, level: "ok", message, repairable: false };
|
|
130
|
+
}
|
|
131
|
+
function warning(id, message, path) {
|
|
132
|
+
return {
|
|
133
|
+
id,
|
|
134
|
+
level: "warning",
|
|
135
|
+
message,
|
|
136
|
+
...(path ? { path } : {}),
|
|
137
|
+
repairable: id !== "setup-status",
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
function error(id, message, path) {
|
|
141
|
+
return {
|
|
142
|
+
id,
|
|
143
|
+
level: "error",
|
|
144
|
+
message,
|
|
145
|
+
...(path ? { path } : {}),
|
|
146
|
+
repairable: true,
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
//# sourceMappingURL=doctor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../src/doctor.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC3E,OAAO,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACnF,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,GACxB,MAAM,cAAc,CAAC;AAOtB,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,MAAM,sBAAsB,GAAG;IAC7B,sBAAsB;IACtB,0BAA0B;IAC1B,wBAAwB;IACxB,8BAA8B;IAC9B,mCAAmC;IACnC,gCAAgC;IAChC,mCAAmC;IACnC,oCAAoC;CAC5B,CAAC;AAEX,qEAAqE;AACrE,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,WAAmB;IACjD,MAAM,UAAU,GAAG,MAAM,kBAAkB,EAAE,CAAC;IAC9C,MAAM,MAAM,GAAkB,EAAE,CAAC;IACjC,MAAM,KAAK,GAAG,MAAM,SAAS,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IACnD,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAEzD,IAAI,KAAK,EAAE,CAAC;QACV,MAAM,SAAS,GAAG,MAAM,sBAAsB,CAAC,WAAW,CAAC,CAAC;QAC5D,MAAM,CAAC,IAAI,CACT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G;AAEH,qBAAa,QAAS,SAAQ,KAAK;IACjC,SAAgB,QAAQ,EAAE,MAAM,CAAC;IAEjC,YAAmB,OAAO,EAAE,MAAM,EAAE,QAAQ,SAAI,EAAE,OAAO,CAAC,EAAE,YAAY,EAIvE;CACF"}
|
package/dist/errors.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Erros esperados do CLI com código de saída controlado.
|
|
3
|
+
*/
|
|
4
|
+
export class CliError extends Error {
|
|
5
|
+
exitCode;
|
|
6
|
+
constructor(message, exitCode = 1, options) {
|
|
7
|
+
super(message, options);
|
|
8
|
+
this.name = "CliError";
|
|
9
|
+
this.exitCode = exitCode;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,OAAO,QAAS,SAAQ,KAAK;IACjB,QAAQ,CAAS;IAEjC,YAAmB,OAAe,EAAE,QAAQ,GAAG,CAAC,EAAE,OAAsB;QACtE,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;CACF"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Planeja e aplica instalação, atualização, reparo e skills do Inboundfy.
|
|
3
|
+
*/
|
|
4
|
+
import type { AgentKind, OperationMode, OperationResult } from "./types.js";
|
|
5
|
+
export interface InstallOptions {
|
|
6
|
+
projectRoot: string;
|
|
7
|
+
mode: OperationMode;
|
|
8
|
+
dryRun?: boolean;
|
|
9
|
+
force?: boolean;
|
|
10
|
+
yes?: boolean;
|
|
11
|
+
agent?: AgentKind;
|
|
12
|
+
skillsDirectory?: string;
|
|
13
|
+
instructionFile?: "AGENTS.md" | "CLAUDE.md" | "none";
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Executa a operação solicitada com backup de customizações e manifesto novo.
|
|
17
|
+
*/
|
|
18
|
+
export declare function executeInstallation(options: InstallOptions): Promise<OperationResult>;
|
|
19
|
+
/** Marca o preenchimento semântico concluído depois da entrevista da skill. */
|
|
20
|
+
export declare function markContextReady(projectRoot: string): Promise<void>;
|
|
21
|
+
/** Atualiza somente o inventário técnico de fontes locais. */
|
|
22
|
+
export declare function refreshContextSources(projectRoot: string): Promise<number>;
|
|
23
|
+
//# sourceMappingURL=installer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"installer.d.ts","sourceRoot":"","sources":["../src/installer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAwCH,OAAO,KAAK,EACV,SAAS,EAIT,aAAa,EACb,eAAe,EAEhB,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,aAAa,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,MAAM,CAAC;CACtD;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,eAAe,CAAC,CA+H1B;AAuVD,+EAA+E;AAC/E,wBAAsB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAczE;AAED,8DAA8D;AAC9D,wBAAsB,qBAAqB,CACzC,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,MAAM,CAAC,CAyBjB"}
|
|
@@ -0,0 +1,411 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Planeja e aplica instalação, atualização, reparo e skills do Inboundfy.
|
|
3
|
+
*/
|
|
4
|
+
import { readFile, mkdir, rename } from "node:fs/promises";
|
|
5
|
+
import { dirname, join } from "node:path";
|
|
6
|
+
import { collectContextTemplates, collectFrameworkPayload, collectProjectTemplates, collectSkillsPayload, readPackageVersion, sha256, } from "./payload.js";
|
|
7
|
+
import { acquireLock, assertNoSymlink, exists, isRegularFile, readJson, resolvePortable, writeAtomic, } from "./io.js";
|
|
8
|
+
import { mergeInstructionBlock, resolveAgent, resolveInstructionFile, } from "./agent.js";
|
|
9
|
+
import { scanContextSources } from "./context-scan.js";
|
|
10
|
+
import { CliError } from "./errors.js";
|
|
11
|
+
import { validateMinimumContext } from "./context-readiness.js";
|
|
12
|
+
import { ensureChannelDirectories, ensureProjectStructure, } from "./project-structure.js";
|
|
13
|
+
import { installationManifestSchema, installationStateSchema, } from "./schemas.js";
|
|
14
|
+
/**
|
|
15
|
+
* Executa a operação solicitada com backup de customizações e manifesto novo.
|
|
16
|
+
*/
|
|
17
|
+
export async function executeInstallation(options) {
|
|
18
|
+
const version = await readPackageVersion();
|
|
19
|
+
const statePath = join(options.projectRoot, ".inboundfy", "install.json");
|
|
20
|
+
const manifestPath = join(options.projectRoot, ".inboundfy", "manifest.json");
|
|
21
|
+
const previousState = await loadStateIfPresent(statePath);
|
|
22
|
+
const previousManifest = await loadManifestIfPresent(manifestPath);
|
|
23
|
+
validateMode(options, previousState, version);
|
|
24
|
+
const selectedAgent = previousState && options.mode !== "install"
|
|
25
|
+
? {
|
|
26
|
+
agent: previousState.agent,
|
|
27
|
+
skillsDirectory: previousState.skillsDirectory,
|
|
28
|
+
}
|
|
29
|
+
: await resolveAgent({
|
|
30
|
+
projectRoot: options.projectRoot,
|
|
31
|
+
...(options.agent ? { agent: options.agent } : {}),
|
|
32
|
+
...(options.skillsDirectory
|
|
33
|
+
? { skillsDirectory: options.skillsDirectory }
|
|
34
|
+
: {}),
|
|
35
|
+
...(options.yes !== undefined ? { yes: options.yes } : {}),
|
|
36
|
+
});
|
|
37
|
+
const instructionFile = previousState && options.mode !== "install"
|
|
38
|
+
? previousState.instructionFile
|
|
39
|
+
: await resolveInstructionFile({
|
|
40
|
+
projectRoot: options.projectRoot,
|
|
41
|
+
...(options.instructionFile
|
|
42
|
+
? { requested: options.instructionFile }
|
|
43
|
+
: {}),
|
|
44
|
+
...(options.yes !== undefined ? { yes: options.yes } : {}),
|
|
45
|
+
});
|
|
46
|
+
const now = new Date().toISOString();
|
|
47
|
+
const state = {
|
|
48
|
+
schemaVersion: 2,
|
|
49
|
+
packageName: "@promovaweb/inboundfy",
|
|
50
|
+
frameworkVersion: version,
|
|
51
|
+
installedAt: previousState?.installedAt ?? now,
|
|
52
|
+
updatedAt: now,
|
|
53
|
+
projectRoot: ".",
|
|
54
|
+
agent: selectedAgent.agent,
|
|
55
|
+
skillsDirectory: selectedAgent.skillsDirectory,
|
|
56
|
+
instructionFile,
|
|
57
|
+
setupStatus: previousState?.setupStatus ?? "pending-context",
|
|
58
|
+
paths: previousState?.paths ?? {
|
|
59
|
+
acervo: "acervo",
|
|
60
|
+
canais: "canais",
|
|
61
|
+
calendario: "calendario",
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
const payload = options.mode === "agent-install"
|
|
65
|
+
? await collectSkillsPayload(state.skillsDirectory)
|
|
66
|
+
: [
|
|
67
|
+
...(await collectFrameworkPayload()),
|
|
68
|
+
...(await collectSkillsPayload(state.skillsDirectory)),
|
|
69
|
+
virtualVersionFile(version),
|
|
70
|
+
];
|
|
71
|
+
const actions = [];
|
|
72
|
+
const releaseLock = options.dryRun
|
|
73
|
+
? async () => undefined
|
|
74
|
+
: await acquireLock(options.projectRoot);
|
|
75
|
+
try {
|
|
76
|
+
const managedFiles = await applyPayload({
|
|
77
|
+
...options,
|
|
78
|
+
payload,
|
|
79
|
+
previousManifest,
|
|
80
|
+
actions,
|
|
81
|
+
});
|
|
82
|
+
if (options.mode !== "agent-install") {
|
|
83
|
+
await ensureUserSpace(options, state, actions);
|
|
84
|
+
await reconcileInstructions(options, state, actions);
|
|
85
|
+
await reconcileLegacyFiles(options, payload, previousManifest, actions);
|
|
86
|
+
}
|
|
87
|
+
const manifest = {
|
|
88
|
+
schemaVersion: 2,
|
|
89
|
+
packageName: "@promovaweb/inboundfy",
|
|
90
|
+
frameworkVersion: version,
|
|
91
|
+
generatedAt: now,
|
|
92
|
+
managedFiles: options.mode === "agent-install" && previousManifest
|
|
93
|
+
? mergeManagedFiles(previousManifest.managedFiles, managedFiles)
|
|
94
|
+
: managedFiles,
|
|
95
|
+
};
|
|
96
|
+
if (!options.dryRun) {
|
|
97
|
+
await writeAtomic(options.projectRoot, statePath, `${JSON.stringify(state, null, 2)}\n`);
|
|
98
|
+
await writeAtomic(options.projectRoot, manifestPath, `${JSON.stringify(manifest, null, 2)}\n`);
|
|
99
|
+
}
|
|
100
|
+
actions.push({
|
|
101
|
+
action: options.dryRun ? "preserve" : previousState ? "update" : "create",
|
|
102
|
+
path: ".inboundfy/install.json",
|
|
103
|
+
detail: options.dryRun ? "seria atualizado" : "estado da instalação",
|
|
104
|
+
});
|
|
105
|
+
actions.push({
|
|
106
|
+
action: options.dryRun
|
|
107
|
+
? "preserve"
|
|
108
|
+
: previousManifest
|
|
109
|
+
? "update"
|
|
110
|
+
: "create",
|
|
111
|
+
path: ".inboundfy/manifest.json",
|
|
112
|
+
detail: options.dryRun ? "seria atualizado" : "hashes gerenciados",
|
|
113
|
+
});
|
|
114
|
+
return {
|
|
115
|
+
mode: options.mode,
|
|
116
|
+
version,
|
|
117
|
+
dryRun: Boolean(options.dryRun),
|
|
118
|
+
actions,
|
|
119
|
+
state,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
finally {
|
|
123
|
+
await releaseLock();
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
async function applyPayload(input) {
|
|
127
|
+
const previous = new Map(input.previousManifest?.managedFiles.map((file) => [file.path, file]) ?? []);
|
|
128
|
+
const installed = [];
|
|
129
|
+
for (const file of input.payload) {
|
|
130
|
+
const target = resolvePortable(input.projectRoot, file.targetRelative);
|
|
131
|
+
const existing = await readRegularFileIfPresent(target);
|
|
132
|
+
const old = previous.get(file.targetRelative);
|
|
133
|
+
if (existing && sha256(existing) === file.sha256) {
|
|
134
|
+
input.actions.push({ action: "unchanged", path: file.targetRelative });
|
|
135
|
+
}
|
|
136
|
+
else if (!existing) {
|
|
137
|
+
input.actions.push({ action: "create", path: file.targetRelative });
|
|
138
|
+
if (!input.dryRun) {
|
|
139
|
+
await writeAtomic(input.projectRoot, target, file.content);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
const canReplace = Boolean(input.force) ||
|
|
144
|
+
(old !== undefined && sha256(existing) === old.sha256);
|
|
145
|
+
if (!canReplace && input.mode === "install") {
|
|
146
|
+
throw new CliError(`O arquivo ${file.targetRelative} já existe e não pertence a uma instalação conhecida. Use --force para preservá-lo em migrações e continuar.`);
|
|
147
|
+
}
|
|
148
|
+
if (!canReplace || sha256(existing) !== old?.sha256) {
|
|
149
|
+
await backupFile(input, file.targetRelative, existing);
|
|
150
|
+
}
|
|
151
|
+
input.actions.push({ action: "update", path: file.targetRelative });
|
|
152
|
+
if (!input.dryRun) {
|
|
153
|
+
await writeAtomic(input.projectRoot, target, file.content);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
installed.push({
|
|
157
|
+
path: file.targetRelative,
|
|
158
|
+
source: file.sourceRelative,
|
|
159
|
+
sha256: file.sha256,
|
|
160
|
+
category: file.category,
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
return installed.sort((left, right) => left.path.localeCompare(right.path));
|
|
164
|
+
}
|
|
165
|
+
async function ensureUserSpace(options, state, actions) {
|
|
166
|
+
await ensureProjectStructure(options.projectRoot, options.dryRun === undefined ? {} : { dryRun: options.dryRun });
|
|
167
|
+
for (const directory of [
|
|
168
|
+
state.paths.acervo,
|
|
169
|
+
state.paths.canais,
|
|
170
|
+
state.paths.calendario,
|
|
171
|
+
]) {
|
|
172
|
+
const target = resolvePortable(options.projectRoot, directory);
|
|
173
|
+
if (await exists(target)) {
|
|
174
|
+
actions.push({ action: "unchanged", path: directory });
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
actions.push({ action: "mkdir", path: directory });
|
|
178
|
+
if (!options.dryRun) {
|
|
179
|
+
await assertNoSymlink(options.projectRoot, target);
|
|
180
|
+
await mkdir(target, { recursive: true });
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
for (const template of await collectProjectTemplates()) {
|
|
185
|
+
const target = resolvePortable(options.projectRoot, template.targetRelative);
|
|
186
|
+
if (await exists(target)) {
|
|
187
|
+
actions.push({
|
|
188
|
+
action: "preserve",
|
|
189
|
+
path: template.targetRelative,
|
|
190
|
+
detail: "arquivo do projeto preservado",
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
actions.push({ action: "create", path: template.targetRelative });
|
|
195
|
+
if (!options.dryRun) {
|
|
196
|
+
await writeAtomic(options.projectRoot, target, template.content);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
await ensureChannelDirectories(options.projectRoot, []);
|
|
201
|
+
for (const template of await collectContextTemplates()) {
|
|
202
|
+
const target = resolvePortable(options.projectRoot, template.targetRelative);
|
|
203
|
+
if (await exists(target)) {
|
|
204
|
+
actions.push({
|
|
205
|
+
action: "preserve",
|
|
206
|
+
path: template.targetRelative,
|
|
207
|
+
detail: "informação do usuário",
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
else {
|
|
211
|
+
actions.push({ action: "create", path: template.targetRelative });
|
|
212
|
+
if (!options.dryRun) {
|
|
213
|
+
await writeAtomic(options.projectRoot, target, template.content);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
const candidates = await scanContextSources(options.projectRoot, [
|
|
218
|
+
state.paths.acervo,
|
|
219
|
+
state.paths.canais,
|
|
220
|
+
state.paths.calendario,
|
|
221
|
+
state.skillsDirectory,
|
|
222
|
+
]);
|
|
223
|
+
const candidatesPath = resolvePortable(options.projectRoot, ".inboundfy/fontes-candidatas.json");
|
|
224
|
+
actions.push({
|
|
225
|
+
action: (await exists(candidatesPath)) ? "update" : "create",
|
|
226
|
+
path: ".inboundfy/fontes-candidatas.json",
|
|
227
|
+
detail: `${candidates.length} fonte(s) encontrada(s)`,
|
|
228
|
+
});
|
|
229
|
+
if (!options.dryRun) {
|
|
230
|
+
await writeAtomic(options.projectRoot, candidatesPath, `${JSON.stringify({
|
|
231
|
+
schemaVersion: 1,
|
|
232
|
+
generatedAt: new Date().toISOString(),
|
|
233
|
+
sources: candidates,
|
|
234
|
+
}, null, 2)}\n`);
|
|
235
|
+
}
|
|
236
|
+
const sourcesPath = resolvePortable(options.projectRoot, ".inboundfy/fontes-projeto.md");
|
|
237
|
+
if (await exists(sourcesPath)) {
|
|
238
|
+
actions.push({
|
|
239
|
+
action: "preserve",
|
|
240
|
+
path: ".inboundfy/fontes-projeto.md",
|
|
241
|
+
detail: "classificação mantida",
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
else {
|
|
245
|
+
actions.push({ action: "create", path: ".inboundfy/fontes-projeto.md" });
|
|
246
|
+
if (!options.dryRun) {
|
|
247
|
+
await writeAtomic(options.projectRoot, sourcesPath, renderProjectSources(candidates));
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
async function reconcileInstructions(options, state, actions) {
|
|
252
|
+
if (!state.instructionFile)
|
|
253
|
+
return;
|
|
254
|
+
const path = resolvePortable(options.projectRoot, state.instructionFile);
|
|
255
|
+
const current = (await exists(path)) ? await readFile(path, "utf8") : "";
|
|
256
|
+
const desired = mergeInstructionBlock(current);
|
|
257
|
+
if (current === desired) {
|
|
258
|
+
actions.push({ action: "unchanged", path: state.instructionFile });
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
actions.push({
|
|
262
|
+
action: current ? "update" : "create",
|
|
263
|
+
path: state.instructionFile,
|
|
264
|
+
detail: "somente o bloco delimitado do Inboundfy",
|
|
265
|
+
});
|
|
266
|
+
if (!options.dryRun) {
|
|
267
|
+
await writeAtomic(options.projectRoot, path, desired);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
async function reconcileLegacyFiles(options, payload, previousManifest, actions) {
|
|
271
|
+
if (!previousManifest || options.mode !== "update")
|
|
272
|
+
return;
|
|
273
|
+
const desired = new Set(payload.map((file) => file.targetRelative));
|
|
274
|
+
for (const old of previousManifest.managedFiles) {
|
|
275
|
+
if (desired.has(old.path))
|
|
276
|
+
continue;
|
|
277
|
+
const target = resolvePortable(options.projectRoot, old.path);
|
|
278
|
+
const content = await readRegularFileIfPresent(target);
|
|
279
|
+
if (!content)
|
|
280
|
+
continue;
|
|
281
|
+
const backup = backupRelative("arquivos-legados", old.path);
|
|
282
|
+
actions.push({
|
|
283
|
+
action: "remove-legacy",
|
|
284
|
+
path: old.path,
|
|
285
|
+
detail: `preservado em ${backup}`,
|
|
286
|
+
});
|
|
287
|
+
if (!options.dryRun) {
|
|
288
|
+
const backupPath = resolvePortable(options.projectRoot, backup);
|
|
289
|
+
await assertNoSymlink(options.projectRoot, target);
|
|
290
|
+
await assertNoSymlink(options.projectRoot, backupPath);
|
|
291
|
+
await mkdir(dirname(backupPath), { recursive: true });
|
|
292
|
+
await rename(target, backupPath);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
async function backupFile(options, relativePath, content) {
|
|
297
|
+
const backup = backupRelative("arquivos-customizados", relativePath);
|
|
298
|
+
options.actions.push({
|
|
299
|
+
action: "backup",
|
|
300
|
+
path: relativePath,
|
|
301
|
+
detail: backup,
|
|
302
|
+
});
|
|
303
|
+
if (!options.dryRun) {
|
|
304
|
+
await writeAtomic(options.projectRoot, resolvePortable(options.projectRoot, backup), content);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
function backupRelative(group, path) {
|
|
308
|
+
const stamp = new Date().toISOString().replace(/[:.]/g, "-");
|
|
309
|
+
return `.inboundfy/migracoes/${group}/${stamp}/${path}`;
|
|
310
|
+
}
|
|
311
|
+
function virtualVersionFile(version) {
|
|
312
|
+
const content = Buffer.from(`# Versão do Inboundfy instalada
|
|
313
|
+
|
|
314
|
+
- Versão: ${version}
|
|
315
|
+
- Pacote: @promovaweb/inboundfy@${version}
|
|
316
|
+
- Gerenciado pelo CLI: sim
|
|
317
|
+
`);
|
|
318
|
+
return {
|
|
319
|
+
sourcePath: "generated",
|
|
320
|
+
sourceRelative: "generated:VERSAO.md",
|
|
321
|
+
targetRelative: ".inboundfy/framework/VERSAO.md",
|
|
322
|
+
content,
|
|
323
|
+
sha256: sha256(content),
|
|
324
|
+
category: "framework",
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
function renderProjectSources(candidates) {
|
|
328
|
+
const rows = candidates.length === 0
|
|
329
|
+
? "| — | Nenhuma fonte encontrada | pendente |"
|
|
330
|
+
: candidates
|
|
331
|
+
.map((source) => `| \`${source.path}\` | ${escapeTable(source.title)} | pendente |`)
|
|
332
|
+
.join("\n");
|
|
333
|
+
return `# Fontes do projeto
|
|
334
|
+
|
|
335
|
+
O CLI encontrou os arquivos abaixo sem alterar as fontes. A skill
|
|
336
|
+
\`inboundfy-setup\` deve classificar finalidade, autoridade, assuntos e
|
|
337
|
+
divergências antes que outra skill use uma fonte na produção.
|
|
338
|
+
|
|
339
|
+
| Caminho | Título | Classificação |
|
|
340
|
+
| --- | --- | --- |
|
|
341
|
+
${rows}
|
|
342
|
+
|
|
343
|
+
O inventário técnico completo, com headings e SHA-256, está em
|
|
344
|
+
\`.inboundfy/fontes-candidatas.json\`.
|
|
345
|
+
`;
|
|
346
|
+
}
|
|
347
|
+
function escapeTable(value) {
|
|
348
|
+
return value.replaceAll("|", "\\|").replaceAll("\n", " ");
|
|
349
|
+
}
|
|
350
|
+
async function loadStateIfPresent(path) {
|
|
351
|
+
if (!(await exists(path)))
|
|
352
|
+
return null;
|
|
353
|
+
return installationStateSchema.parse(await readJson(path));
|
|
354
|
+
}
|
|
355
|
+
async function loadManifestIfPresent(path) {
|
|
356
|
+
if (!(await exists(path)))
|
|
357
|
+
return null;
|
|
358
|
+
return installationManifestSchema.parse(await readJson(path));
|
|
359
|
+
}
|
|
360
|
+
function validateMode(options, state, version) {
|
|
361
|
+
if (options.mode === "install" && state && !options.force) {
|
|
362
|
+
throw new CliError("O Inboundfy já está instalado. Use update, repair ou install --force.");
|
|
363
|
+
}
|
|
364
|
+
if (options.mode !== "install" && !state) {
|
|
365
|
+
throw new CliError("A instalação não foi encontrada. Execute inboundfy install primeiro.");
|
|
366
|
+
}
|
|
367
|
+
if (options.mode === "repair" &&
|
|
368
|
+
state &&
|
|
369
|
+
state.frameworkVersion !== version) {
|
|
370
|
+
throw new CliError(`A instalação usa ${state.frameworkVersion} e este CLI usa ${version}. Execute update para mudar de versão.`);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
async function readRegularFileIfPresent(path) {
|
|
374
|
+
return (await isRegularFile(path)) ? readFile(path) : null;
|
|
375
|
+
}
|
|
376
|
+
function mergeManagedFiles(previous, current) {
|
|
377
|
+
const merged = new Map(previous.map((file) => [file.path, file]));
|
|
378
|
+
for (const file of current)
|
|
379
|
+
merged.set(file.path, file);
|
|
380
|
+
return [...merged.values()].sort((left, right) => left.path.localeCompare(right.path));
|
|
381
|
+
}
|
|
382
|
+
/** Marca o preenchimento semântico concluído depois da entrevista da skill. */
|
|
383
|
+
export async function markContextReady(projectRoot) {
|
|
384
|
+
const path = join(projectRoot, ".inboundfy", "install.json");
|
|
385
|
+
const state = installationStateSchema.parse(await readJson(path));
|
|
386
|
+
const readiness = await validateMinimumContext(projectRoot);
|
|
387
|
+
if (!readiness.ready) {
|
|
388
|
+
throw new CliError(`O preenchimento mínimo ainda está incompleto:\n- ${readiness.missing.join("\n- ")}`);
|
|
389
|
+
}
|
|
390
|
+
state.setupStatus = "ready";
|
|
391
|
+
state.updatedAt = new Date().toISOString();
|
|
392
|
+
await writeAtomic(projectRoot, path, `${JSON.stringify(state, null, 2)}\n`);
|
|
393
|
+
}
|
|
394
|
+
/** Atualiza somente o inventário técnico de fontes locais. */
|
|
395
|
+
export async function refreshContextSources(projectRoot) {
|
|
396
|
+
const path = join(projectRoot, ".inboundfy", "install.json");
|
|
397
|
+
const state = installationStateSchema.parse(await readJson(path));
|
|
398
|
+
const candidates = await scanContextSources(projectRoot, [
|
|
399
|
+
state.paths.acervo,
|
|
400
|
+
state.paths.canais,
|
|
401
|
+
state.paths.calendario,
|
|
402
|
+
state.skillsDirectory,
|
|
403
|
+
]);
|
|
404
|
+
await writeAtomic(projectRoot, join(projectRoot, ".inboundfy", "fontes-candidatas.json"), `${JSON.stringify({
|
|
405
|
+
schemaVersion: 1,
|
|
406
|
+
generatedAt: new Date().toISOString(),
|
|
407
|
+
sources: candidates,
|
|
408
|
+
}, null, 2)}\n`);
|
|
409
|
+
return candidates.length;
|
|
410
|
+
}
|
|
411
|
+
//# sourceMappingURL=installer.js.map
|