@renanlido/tia-openness-mcp 1.0.2 → 1.1.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/dist/index.js +22 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -31539,6 +31539,14 @@ async function deviceCreateFlow(args) {
|
|
|
31539
31539
|
summary: `criar device "${args.deviceName ?? args.deviceItemName ?? "?"}" (${args.typeIdentifier})`
|
|
31540
31540
|
});
|
|
31541
31541
|
}
|
|
31542
|
+
async function deviceChangeVersionFlow(args) {
|
|
31543
|
+
const bad = gd5Violation(args.typeIdentifier);
|
|
31544
|
+
if (bad) return guardError("Gd5", bad, { typeIdentifier: args.typeIdentifier });
|
|
31545
|
+
return mutate("POST", `/plcs/${seg2(args.plc)}/device/changeversion`, jsonBody2({ typeIdentifier: args.typeIdentifier, dryRun: args.dryRun }), {
|
|
31546
|
+
dryRun: args.dryRun,
|
|
31547
|
+
summary: `trocar firmware da CPU "${args.plc}" para ${args.typeIdentifier}`
|
|
31548
|
+
});
|
|
31549
|
+
}
|
|
31542
31550
|
var dryRunField = {
|
|
31543
31551
|
dryRun: external_exports.boolean().optional().describe("Gd11: plano-sem-aplicar \u2014 valida os guards e descreve a a\xE7\xE3o SEM mutar o projeto")
|
|
31544
31552
|
};
|
|
@@ -31557,6 +31565,19 @@ function registerAuthoringTools(server2) {
|
|
|
31557
31565
|
},
|
|
31558
31566
|
async (args) => deviceCreateFlow(args)
|
|
31559
31567
|
);
|
|
31568
|
+
server2.registerTool(
|
|
31569
|
+
"tia_device_change_version",
|
|
31570
|
+
{
|
|
31571
|
+
title: "TIA \u2014 trocar firmware da CPU (in-place)",
|
|
31572
|
+
description: "Troca a vers\xE3o de FIRMWARE da CPU IN-PLACE (wrap do DeviceItem.ChangeType), PRESERVANDO o programa \u2014 alternativa ao delete+recreate (habilita o 'auto-FW-match'). Guard Gd5: o typeIdentifier segue 'OrderNumber:<MLFB>/V<fw>' com '/V' (barra), nunca ':V' \u2014 resolva via tia_catalog. Regra: a vers\xE3o de firmware do PROJETO deve ser \u2264 a do DEVICE f\xEDsico (project FW \u2264 device FW). dryRun (Gd11) devolve o plano sem mutar. Mapeia POST /plcs/{plc}/device/changeversion. Classe M-off.",
|
|
31573
|
+
inputSchema: {
|
|
31574
|
+
plc: external_exports.string().describe("nome do CLP (CPU) cujo firmware ser\xE1 trocado"),
|
|
31575
|
+
typeIdentifier: external_exports.string().describe('OrderNumber:<MLFB>/V<fw> do firmware destino (Gd5; resolva via tia_catalog) \u2014 ex.: "OrderNumber:6ES7 214-1HG40-0XB0/V4.4"'),
|
|
31576
|
+
...dryRunField
|
|
31577
|
+
}
|
|
31578
|
+
},
|
|
31579
|
+
async ({ plc, typeIdentifier, dryRun }) => deviceChangeVersionFlow({ plc, typeIdentifier, dryRun })
|
|
31580
|
+
);
|
|
31560
31581
|
server2.registerTool(
|
|
31561
31582
|
"tia_device_plug",
|
|
31562
31583
|
{
|
|
@@ -32441,7 +32462,7 @@ function registerSpecTools(server2) {
|
|
|
32441
32462
|
}
|
|
32442
32463
|
|
|
32443
32464
|
// src/index.ts
|
|
32444
|
-
var server = new McpServer({ name: "tia-openness", version: "1.0
|
|
32465
|
+
var server = new McpServer({ name: "tia-openness", version: "1.1.0" });
|
|
32445
32466
|
server.registerTool(
|
|
32446
32467
|
"tia_ping",
|
|
32447
32468
|
{
|
package/package.json
CHANGED