@luanpdd/kit-mcp 1.5.1 → 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 +37 -0
- package/bin/ui.js +1 -1
- package/kit/agents/planner.md +2 -5
- package/package.json +1 -1
- package/src/cli/index.js +2 -2
- package/src/mcp-server/index.js +3 -1
- package/src/ui/server.js +7 -3
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,43 @@ 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
|
+
|
|
30
|
+
## [1.5.2] - 2026-05-05
|
|
31
|
+
|
|
32
|
+
Patch de lifecycle: sidecar não desliga mais sozinho por idle.
|
|
33
|
+
|
|
34
|
+
### Corrigido
|
|
35
|
+
|
|
36
|
+
- **Sidecar encerrava sozinho após 30min** mesmo com a aba aberta sem eventos. Default de `idleMs` mudou de `30 * 60 * 1000` (30min) para `0` (nunca encerra). Resolve "abro a sidecar pra acompanhar trabalho longo, saio almoçar, volto e tá morta". Quem quiser o comportamento antigo: `kit ui start --idle-ms 1800000`.
|
|
37
|
+
|
|
38
|
+
### Sem mudanças de API
|
|
39
|
+
|
|
40
|
+
Patch isolado em `src/ui/server.js`. Stable API v1.0+ preservada.
|
|
41
|
+
|
|
42
|
+
### Heads-up
|
|
43
|
+
|
|
44
|
+
Se você tem `@luanpdd/kit-mcp` instalado globalmente (`npm i -g`) e `kit ui start` está dando "unknown command 'ui'", a versão global está stale. Atualize com `npm i -g @luanpdd/kit-mcp@latest`.
|
|
45
|
+
|
|
9
46
|
## [1.5.1] - 2026-05-05
|
|
10
47
|
|
|
11
48
|
Patch da UI sidecar: auto-reconnect quando o server reinicia + bordas com respiro.
|
package/bin/ui.js
CHANGED
|
@@ -33,7 +33,7 @@ if (args.help) {
|
|
|
33
33
|
'Usage: node bin/ui.js [options]',
|
|
34
34
|
' --project-root <path> project root for lockfile keying (default: cwd)',
|
|
35
35
|
' --port <n> bind to a specific port (default: auto-pick 7100-7199)',
|
|
36
|
-
' --idle-ms <ms> idle shutdown timeout (default:
|
|
36
|
+
' --idle-ms <ms> idle shutdown timeout (default: 0 = never; pass e.g. 1800000 for 30min)',
|
|
37
37
|
' --version print version and exit',
|
|
38
38
|
' --help this text',
|
|
39
39
|
'',
|
package/kit/agents/planner.md
CHANGED
|
@@ -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
|
|
246
|
-
| "Criar a API" | "
|
|
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.
|
|
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
|
|
148
|
+
return { kind: x.kind, name: x.name, description: x.description };
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
// --- kit ---
|
|
@@ -379,7 +379,7 @@ ui.command('start')
|
|
|
379
379
|
.description('Start the sidecar HTTP server in foreground (Ctrl+C to stop). Prints URL on stderr.')
|
|
380
380
|
.option('--project-root <path>', 'Project root for lockfile keying (default: cwd)')
|
|
381
381
|
.option('--port <n>', 'Bind to a specific port (default: auto-pick 7100-7199)')
|
|
382
|
-
.option('--idle-ms <ms>', 'Idle shutdown timeout (default
|
|
382
|
+
.option('--idle-ms <ms>', 'Idle shutdown timeout (default 0 = never; e.g. 1800000 for 30min)')
|
|
383
383
|
.option('--no-open', 'Skip auto-opening the browser')
|
|
384
384
|
.action(async (opts) => {
|
|
385
385
|
const projectRoot = opts.projectRoot || process.cwd();
|
package/src/mcp-server/index.js
CHANGED
|
@@ -253,7 +253,9 @@ const HANDLERS = {
|
|
|
253
253
|
};
|
|
254
254
|
|
|
255
255
|
function slim(x) {
|
|
256
|
-
|
|
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
|
@@ -33,7 +33,7 @@ const HOST = '127.0.0.1';
|
|
|
33
33
|
const HEARTBEAT_INTERVAL_MS = 15_000;
|
|
34
34
|
const RING_BUFFER_SIZE = 200;
|
|
35
35
|
const MAX_SSE_SUBSCRIBERS = 32;
|
|
36
|
-
const DEFAULT_IDLE_MS =
|
|
36
|
+
const DEFAULT_IDLE_MS = 0; // never auto-shutdown by default — pass --idle-ms 1800000 to opt back in
|
|
37
37
|
|
|
38
38
|
const SSE_HEADERS = {
|
|
39
39
|
'Content-Type': 'text/event-stream; charset=utf-8',
|
|
@@ -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
|
}
|