281799fad2
14 tools read-only para inspecção da BD Paperclip directamente via MCP,
eliminando psql nos skills /clip-*. 2 tools write (rotation, cancel issue).
- src/db.ts: pool PG singleton + COMPANY_ID + helper query() parametrizado
- src/tools/diagnostics.ts: 16 tools, 100% queries com $1,$2 (zero injection)
- src/tools/index.ts: registo ...diagnosticsTools
- package.json: pg ^8.13.1 + @types/pg ^8.11.10
- CHANGELOG.md: changelog completo
Fix: diag_agents_without_membership cast a.id::text + filtros
principal_type='agent' AND status='active'.
Validado:
- 14/14 read tools testadas contra BD real (CEO=19 runs, 65 agentes,
Reality Checker sem heartbeat/membership, 2 routines next_run_at NULL)
- npm audit: 0 vulnerabilidades
- grep '\${' em SQL: zero matches
Refs: Desk #2041
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
41 lines
1.2 KiB
JSON
41 lines
1.2 KiB
JSON
{
|
|
"name": "mcp-paperclip",
|
|
"version": "1.0.0",
|
|
"description": "MCP Server para Paperclip AI — gestao de agentes, issues, rotinas e governance",
|
|
"main": "dist/index.js",
|
|
"type": "module",
|
|
"scripts": {
|
|
"build": "tsc",
|
|
"start": "node dist/index.js",
|
|
"start:http": "node dist/index-http.js",
|
|
"dev": "tsc --watch",
|
|
"test": "NODE_OPTIONS='--experimental-vm-modules' jest",
|
|
"lint": "eslint src --ext .ts",
|
|
"lint:fix": "eslint src --ext .ts --fix",
|
|
"format": "prettier --write \"src/**/*.ts\"",
|
|
"format:check": "prettier --check \"src/**/*.ts\"",
|
|
"quality:check": "npm run lint && npm run format:check && npm run build && npm run test"
|
|
},
|
|
"author": "Descomplicar",
|
|
"license": "MIT",
|
|
"dependencies": {
|
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
"dotenv": "^16.6.1",
|
|
"pg": "^8.13.1",
|
|
"winston": "^3.19.0",
|
|
"zod": "^3.25.76"
|
|
},
|
|
"devDependencies": {
|
|
"@types/jest": "^30.0.0",
|
|
"@types/node": "^22.19.17",
|
|
"@types/pg": "^8.11.10",
|
|
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
"@typescript-eslint/parser": "^7.18.0",
|
|
"eslint": "^8.57.1",
|
|
"jest": "^30.3.0",
|
|
"prettier": "^3.8.1",
|
|
"ts-jest": "^29.4.9",
|
|
"typescript": "^5.9.3"
|
|
}
|
|
}
|