feat: analytics requested, visited and summary on the CLI and MCP (#33) - #37
Merged
Merged
Conversation
- cleat analytics requested ranking 24h from the access log - cleat analytics visited [--json] pageviews ranking (stale aware) - cleat analytics show APP [--range] summary with paths, referrers, UTM - MCP tools analytics_requested, analytics_visited and analytics_summary (requested vs visited kept apart in the descriptions) Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contexto (#33)
CLI/MCP já tinham paridade com Signals, mas nada de uso de produto. Agora os endpoints existem no painel (#209 requested, #210 visited/summary) e o contrato está vendado no fixture (#35).
Mudanças
CLI
cleat analytics requested [--json]— ranking 24h do access.log do servidor ativo.cleat analytics visited [--json]— ranking de pageviews (inject-on); avisa quando o sidecar está fora (stale).cleat analytics show APP [--range 24h|7d|90d] [--json]— pageviews, uniques, top paths, referrers e UTM; flagSTALEquando o sidecar não respondeu.MCP
analytics_requested,analytics_visitedeanalytics_summary(appobrigatório,rangeopcional). As descrições deixam explícito que requested = access.log e visited/summary = JS pageviews; não misturam.analytics_visiteddevolve{data, stale}para o agente saber que a fonte está fora.Outros
Client.analytics_*novos; dispatch/usage documentam o grupoanalytics.@usedjá cobriam os recursos ([MÉDIO] Fixture do contrato da CLI diverge do checkout local do painel #35); sem mudança de fixture aqui.Testes
mix testcomCLEAT_DEPLOY_CONTRACT: 296 testes, 0 falhas (novos: client, comandos com json/range/usage/stale, tools MCP e usage)mix format --check-formattedemix compile --warnings-as-errorslimposDepende de cleat-cloud/cleat-deploy#209 e #210 (mergeadas) e #35 (fixture).
Closes #33.