pdc-mcp 0.5.0 → 0.5.1
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 +2 -1
- package/dist/index.js +46 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -95,7 +95,8 @@ está logado no painel) e repita o pedido. O token fica em
|
|
|
95
95
|
| `pdc_preflight` | Checagem pré-deploy: build, compose, env vazias (`ready`) |
|
|
96
96
|
| `pdc_deploy` | Dispara o deploy de um ambiente |
|
|
97
97
|
| `pdc_deployment_status` | Status + timeline + logs de um deployment |
|
|
98
|
-
| `pdc_runtime_logs` | Saúde/logs do container (diagnóstico de crash) |
|
|
98
|
+
| `pdc_runtime_logs` | Saúde/logs do container público (diagnóstico de crash) |
|
|
99
|
+
| `pdc_service_logs` | Serviços da stack Compose (estado/health) + log por-serviço — pra achar quem travou um deploy compose (ex.: `migrate`/`minio-init`) |
|
|
99
100
|
| `pdc_restart` / `pdc_stop` | Controle do app (com confirmação do usuário) |
|
|
100
101
|
|
|
101
102
|
## Prompts guiados
|
package/dist/index.js
CHANGED
|
@@ -29718,9 +29718,45 @@ class PdcSession {
|
|
|
29718
29718
|
return await loadToken(this.opts.baseUrl, this.opts.configDir) != null;
|
|
29719
29719
|
}
|
|
29720
29720
|
}
|
|
29721
|
+
// package.json
|
|
29722
|
+
var package_default = {
|
|
29723
|
+
name: "pdc-mcp",
|
|
29724
|
+
version: "0.5.1",
|
|
29725
|
+
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.",
|
|
29726
|
+
type: "module",
|
|
29727
|
+
bin: { "pdc-mcp": "dist/index.js" },
|
|
29728
|
+
files: ["dist/index.js", "README.md", "LICENSE"],
|
|
29729
|
+
engines: { node: ">=18" },
|
|
29730
|
+
publishConfig: { access: "public" },
|
|
29731
|
+
scripts: {
|
|
29732
|
+
build: "bun build src/index.ts --target=node --outfile dist/index.js",
|
|
29733
|
+
prepublishOnly: "bun run build"
|
|
29734
|
+
},
|
|
29735
|
+
keywords: [
|
|
29736
|
+
"mcp",
|
|
29737
|
+
"model-context-protocol",
|
|
29738
|
+
"pdc",
|
|
29739
|
+
"deploy",
|
|
29740
|
+
"coolify",
|
|
29741
|
+
"claude",
|
|
29742
|
+
"cursor"
|
|
29743
|
+
],
|
|
29744
|
+
license: "MIT",
|
|
29745
|
+
repository: {
|
|
29746
|
+
type: "git",
|
|
29747
|
+
url: "git+https://github.com/pdc-deploy/pdc-mcp.git",
|
|
29748
|
+
directory: "packages/mcp"
|
|
29749
|
+
},
|
|
29750
|
+
homepage: "https://projetos.ltap.ifce.edu.br/docs",
|
|
29751
|
+
devDependencies: {
|
|
29752
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
29753
|
+
"@pdc/core": "*",
|
|
29754
|
+
zod: "^4.4.3"
|
|
29755
|
+
}
|
|
29756
|
+
};
|
|
29721
29757
|
|
|
29722
29758
|
// src/version.ts
|
|
29723
|
-
var MCP_VERSION =
|
|
29759
|
+
var MCP_VERSION = package_default.version;
|
|
29724
29760
|
|
|
29725
29761
|
// src/update.ts
|
|
29726
29762
|
var REGISTRY_URL = "https://registry.npmjs.org/pdc-mcp/latest";
|
|
@@ -29740,10 +29776,11 @@ function updateBanner(info) {
|
|
|
29740
29776
|
return null;
|
|
29741
29777
|
return `⬆️ O PDC Deploy MCP tem uma atualização disponível: ${info.current} → ${info.latest}. ` + `Se você o instalou globalmente, rode \`npm i -g pdc-mcp@latest\`; ` + `se ele roda via npx (\`npx -y pdc-mcp\`), reinicie a sessão do agente para pegar a última. ` + `Novidades em ${DOCS_URL}.`;
|
|
29742
29778
|
}
|
|
29779
|
+
var CACHE_TTL_MS = 10 * 60 * 1000;
|
|
29743
29780
|
var cached2 = null;
|
|
29744
|
-
async function checkForUpdate(fetchImpl = fetch) {
|
|
29745
|
-
if (cached2)
|
|
29746
|
-
return cached2;
|
|
29781
|
+
async function checkForUpdate(fetchImpl = fetch, opts = {}) {
|
|
29782
|
+
if (!opts.force && cached2 && Date.now() - cached2.at < CACHE_TTL_MS)
|
|
29783
|
+
return cached2.info;
|
|
29747
29784
|
const current = MCP_VERSION;
|
|
29748
29785
|
try {
|
|
29749
29786
|
const r = await fetchImpl(REGISTRY_URL, { headers: { accept: "application/json" } });
|
|
@@ -29751,11 +29788,12 @@ async function checkForUpdate(fetchImpl = fetch) {
|
|
|
29751
29788
|
throw new Error(`registry ${r.status}`);
|
|
29752
29789
|
const data = await r.json();
|
|
29753
29790
|
const latest = typeof data.version === "string" ? data.version : null;
|
|
29754
|
-
|
|
29791
|
+
const info = { current, latest, updateAvailable: !!latest && compareVersions(latest, current) > 0 };
|
|
29792
|
+
cached2 = { at: Date.now(), info };
|
|
29793
|
+
return info;
|
|
29755
29794
|
} catch {
|
|
29756
|
-
|
|
29795
|
+
return { current, latest: null, updateAvailable: false };
|
|
29757
29796
|
}
|
|
29758
|
-
return cached2;
|
|
29759
29797
|
}
|
|
29760
29798
|
|
|
29761
29799
|
// src/server.ts
|
|
@@ -29821,7 +29859,7 @@ function createPdcMcpServer(opts) {
|
|
|
29821
29859
|
description: "Verifica no npm se há uma versão mais nova do PDC Deploy MCP e informa como atualizar. " + "Devolve { current, latest, updateAvailable }. Chame no INÍCIO da sessão; se updateAvailable=true, " + "avise o usuário com a instrução de atualização (é como os MCPs se mantêm atualizados).",
|
|
29822
29860
|
inputSchema: {}
|
|
29823
29861
|
}, () => run(async () => {
|
|
29824
|
-
const info = await checkForUpdate();
|
|
29862
|
+
const info = await checkForUpdate(fetch, { force: true });
|
|
29825
29863
|
return { ...info, message: updateBanner(info) ?? `Você está na última versão (${info.current}).` };
|
|
29826
29864
|
}));
|
|
29827
29865
|
server.registerTool("pdc_list_orgs", {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pdc-mcp",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
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" },
|