@luanpdd/kit-mcp 1.5.2 → 1.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/CHANGELOG.md CHANGED
@@ -6,6 +6,27 @@ Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) · Versioning:
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.5.3] - 2026-05-05
10
+
11
+ Patch bundle de auditoria — 4 melhorias quick-win (1 segurança, 1 infra, 2 token-economy).
12
+
13
+ ### Segurança
14
+
15
+ - **POST /shutdown agora valida Origin** ([src/ui/server.js](src/ui/server.js)). Antes, qualquer página local podia derrubar o sidecar via fetch cross-origin (CSRF local por DNS rebinding). Agora retorna 403 em Origin não permitido — alinha com o comportamento de POST /publish. Novo teste em [test/integration/ui-server.test.js](test/integration/ui-server.test.js) cobre o caso.
16
+
17
+ ### Infraestrutura
18
+
19
+ - **Fix do extrator de release notes** ([.github/workflows/publish.yml](.github/workflows/publish.yml)). O awk regex `## [VERSION]` interpretava `[…]` como bracket class em vez de literal — todo release desde a v1.0.0 caía em fallback `Release vX.Y.Z.` em vez de pegar o body do CHANGELOG. Corrigido com `[[]VERSION[]]` (POSIX char-class trick para casar `[` e `]` literais). Validado localmente contra o CHANGELOG da v1.5.2.
20
+
21
+ ### Economia de tokens
22
+
23
+ - **`mcp__kit__kit list-*` não retorna mais `absPath`** ([src/mcp-server/index.js](src/mcp-server/index.js), [src/cli/index.js](src/cli/index.js)). Caminhos absolutos do filesystem (especialmente em Windows com Long Paths) custam tokens em todo turn que liste agents/commands/skills sem trazer benefício para o consumidor IA. Para o caminho específico de um item, use `action=get`.
24
+ - **Tabela "Vago/Correto" do `planner.md` reduzida de 5 → 2 linhas** ([kit/agents/planner.md](kit/agents/planner.md)). Mantém a heurística de teste sem repetir 5 exemplos didáticos. Cada agente carregado paga menos.
25
+
26
+ ### Sem mudanças de API runtime
27
+
28
+ `absPath` segue disponível via `mcp__kit__kit action=get`. Stable API v1.0+ preservada.
29
+
9
30
  ## [1.5.2] - 2026-05-05
10
31
 
11
32
  Patch de lifecycle: sidecar não desliga mais sozinho por idle.
@@ -242,11 +242,8 @@ Isso evita o anti-padrão de "caça ao tesouro" onde executores exploram a base
242
242
 
243
243
  | VAGO DEMAIS | CORRETO |
244
244
  |-------------|---------|
245
- | "Adicionar autenticação" | "Adicionar auth JWT com rotação de refresh usando biblioteca jose, armazenar em cookie httpOnly, 15min acesso / 7dias refresh" |
246
- | "Criar a API" | "Criar endpoint POST /api/projects aceitando {name, description}, valida comprimento do nome 3-50 chars, retorna 201 com objeto project" |
247
- | "Estilizar o dashboard" | "Adicionar classes Tailwind ao Dashboard.tsx: layout grid (3 colunas no lg, 1 no mobile), sombras nos cards, estados hover nos botões de ação" |
248
- | "Tratar erros" | "Envolver chamadas de API em try/catch, retornar {error: string} em 4xx/5xx, exibir toast via sonner no cliente" |
249
- | "Configurar o banco de dados" | "Adicionar modelos User e Project ao schema.prisma com UUIDs, constraint unique no email, timestamps createdAt/updatedAt, executar prisma db push" |
245
+ | "Adicionar autenticação" | "Adicionar auth JWT com rotação de refresh usando jose, cookie httpOnly, 15min/7d" |
246
+ | "Criar a API" | "POST /api/projects aceitando {name, description}, valida nome 3-50 chars, retorna 201" |
250
247
 
251
248
  **Teste:** Outra instância do Claude poderia executar sem fazer perguntas esclarecedoras? Se não, adicione especificidade.
252
249
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luanpdd/kit-mcp",
3
- "version": "1.5.2",
3
+ "version": "1.5.3",
4
4
  "description": "Generic infrastructure to ship YOUR personal kit of agents/commands/skills as an MCP server, with cross-IDE sync (Claude Code, Cursor, Codex, Gemini, Windsurf, Antigravity, Copilot, Trae).",
5
5
  "type": "module",
6
6
  "bin": {
package/src/cli/index.js CHANGED
@@ -145,7 +145,7 @@ function fail(msg) {
145
145
  }
146
146
 
147
147
  function slim(x) {
148
- return { kind: x.kind, name: x.name, description: x.description, absPath: x.absPath };
148
+ return { kind: x.kind, name: x.name, description: x.description };
149
149
  }
150
150
 
151
151
  // --- kit ---
@@ -253,7 +253,9 @@ const HANDLERS = {
253
253
  };
254
254
 
255
255
  function slim(x) {
256
- return { kind: x.kind, name: x.name, description: x.description, absPath: x.absPath };
256
+ // absPath omitted by design list-* tools are AI-consumed in tight context budgets.
257
+ // Use action=get to fetch the absPath (and content) for a specific item.
258
+ return { kind: x.kind, name: x.name, description: x.description };
257
259
  }
258
260
 
259
261
  // --- server bootstrap ---
package/src/ui/server.js CHANGED
@@ -320,7 +320,11 @@ export function createServer({
320
320
  });
321
321
  }
322
322
 
323
- async function handleShutdownRequest(res) {
323
+ async function handleShutdownRequest(req, res) {
324
+ if (!isOriginAllowed(req, listeningPort)) {
325
+ sendJson(res, 403, { error: 'origin_not_allowed' });
326
+ return;
327
+ }
324
328
  sendJson(res, 200, { ok: true, draining: true });
325
329
  setImmediate(() => {
326
330
  shutdown('explicit').catch((err) => logErr('shutdown error:', err.message));
@@ -360,7 +364,7 @@ export function createServer({
360
364
  case 'POST /publish':
361
365
  return handlePublish(req, res);
362
366
  case 'POST /shutdown':
363
- return handleShutdownRequest(res);
367
+ return handleShutdownRequest(req, res);
364
368
  default:
365
369
  return sendJson(res, 404, { error: 'not_found', route });
366
370
  }