pdc-mcp 0.4.0 → 0.5.0

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/README.md CHANGED
@@ -51,7 +51,7 @@ com backend local, passe o override `PDC_API_URL` (no Claude Code:
51
51
  ### Alternativa: binário standalone (sem Node nem Bun)
52
52
 
53
53
  Quem não quer Node/Bun pode baixar um **executável único** do seu sistema na
54
- [última Release](https://github.com/pdc-deploy/mcp-pdc-deploy/releases/latest)
54
+ [última Release](https://github.com/pdc-deploy/pdc-mcp/releases/latest)
55
55
  (`pdc-mcp-linux-x64`, `-linux-arm64`, `-darwin-x64`, `-darwin-arm64`,
56
56
  `-windows-x64.exe`). Linux/macOS: `chmod +x` e aponte o agente para o caminho
57
57
  absoluto (no macOS, se o Gatekeeper bloquear:
package/dist/index.js CHANGED
@@ -29533,6 +29533,12 @@ class PdcApi {
29533
29533
  getRuntimeLogs(environmentId) {
29534
29534
  return this.client.get(`/api/project-environments/${environmentId}/runtime-logs`);
29535
29535
  }
29536
+ getServices(environmentId) {
29537
+ return this.client.get(`/api/project-environments/${environmentId}/services`);
29538
+ }
29539
+ getServiceLogs(environmentId, service) {
29540
+ return this.client.get(`/api/project-environments/${environmentId}/services/${encodeURIComponent(service)}/logs`);
29541
+ }
29536
29542
  restartEnvironment(environmentId) {
29537
29543
  return this.client.post(`/api/project-environments/${environmentId}/restart`);
29538
29544
  }
@@ -29714,11 +29720,11 @@ class PdcSession {
29714
29720
  }
29715
29721
 
29716
29722
  // src/version.ts
29717
- var MCP_VERSION = "0.4.0";
29723
+ var MCP_VERSION = "0.4.1";
29718
29724
 
29719
29725
  // src/update.ts
29720
29726
  var REGISTRY_URL = "https://registry.npmjs.org/pdc-mcp/latest";
29721
- var DOCS_URL = "https://deploy.projetos.ltap.ifce.edu.br/docs";
29727
+ var DOCS_URL = "https://projetos.ltap.ifce.edu.br/docs";
29722
29728
  function compareVersions(a, b) {
29723
29729
  const pa = a.split(".").map((n) => parseInt(n, 10) || 0);
29724
29730
  const pb = b.split(".").map((n) => parseInt(n, 10) || 0);
@@ -30160,6 +30166,35 @@ function createPdcMcpServer(opts) {
30160
30166
  status: r.status,
30161
30167
  configured: r.configured,
30162
30168
  lastLogLines: r.logs.split(`
30169
+ `).filter(Boolean).slice(-40)
30170
+ };
30171
+ }));
30172
+ server.registerTool("pdc_service_logs", {
30173
+ description: "Logs e estado dos SERVIÇOS de uma stack Docker Compose (postgres, migrate, minio-init, api, web…). " + "Sem `service`: lista todos os serviços com estado/health (use pra achar o que travou). Com `service`: " + "traz as últimas linhas do log daquele serviço. Use quando um deploy compose falhou/travou e o " + "`pdc_runtime_logs` (só o container público) não basta — ex.: um init/migração que não completa " + "bloqueia o resto. Interprete o log e explique a causa (comando errado, banco inacessível, " + "restart-loop de serviço one-shot etc.).",
30174
+ inputSchema: { projectEnvironmentId: exports_external.string(), service: exports_external.string().optional() }
30175
+ }, ({ projectEnvironmentId, service }) => run(async () => {
30176
+ const a = await api2();
30177
+ if (!service) {
30178
+ const r2 = await a.getServices(projectEnvironmentId);
30179
+ if (!r2.configured) {
30180
+ return { configured: false, hint: "Observabilidade de runtime indisponível neste ambiente." };
30181
+ }
30182
+ return {
30183
+ configured: true,
30184
+ services: r2.services.map((s) => ({
30185
+ service: s.service,
30186
+ state: s.state,
30187
+ health: s.health,
30188
+ status: s.status
30189
+ })),
30190
+ hint: "Chame de novo com `service` pra ver o log do serviço suspeito (state restarting/exited)."
30191
+ };
30192
+ }
30193
+ const r = await a.getServiceLogs(projectEnvironmentId, service);
30194
+ return {
30195
+ configured: r.configured,
30196
+ service,
30197
+ lastLogLines: r.logs.split(`
30163
30198
  `).filter(Boolean).slice(-40)
30164
30199
  };
30165
30200
  }));
@@ -30223,7 +30258,7 @@ Diretório do projeto: ${directory}.` : "")));
30223
30258
  }
30224
30259
 
30225
30260
  // src/index.ts
30226
- var PRODUCTION_API_URL = "https://deploy.projetos.ltap.ifce.edu.br";
30261
+ var PRODUCTION_API_URL = "https://projetos.ltap.ifce.edu.br";
30227
30262
  var baseUrl = process.env.PDC_API_URL ?? PRODUCTION_API_URL;
30228
30263
  var server = createPdcMcpServer({
30229
30264
  baseUrl,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pdc-mcp",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Servidor MCP do PDC Deploy — opere o PDC (criar projetos, deployar, acompanhar builds) pelo seu agente de IA, com login por device code e segredos fora do chat.",
5
5
  "type": "module",
6
6
  "bin": { "pdc-mcp": "dist/index.js" },
@@ -23,10 +23,10 @@
23
23
  "license": "MIT",
24
24
  "repository": {
25
25
  "type": "git",
26
- "url": "git+https://github.com/pdc-deploy/mcp-pdc-deploy.git",
26
+ "url": "git+https://github.com/pdc-deploy/pdc-mcp.git",
27
27
  "directory": "packages/mcp"
28
28
  },
29
- "homepage": "https://deploy.projetos.ltap.ifce.edu.br/docs",
29
+ "homepage": "https://projetos.ltap.ifce.edu.br/docs",
30
30
  "devDependencies": {
31
31
  "@modelcontextprotocol/sdk": "^1.29.0",
32
32
  "@pdc/core": "*",