@renanlido/tia-openness-mcp 1.6.0 → 1.6.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/dist/index.js +10 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -32086,7 +32086,7 @@ function registerJobTools(server2) {
|
|
|
32086
32086
|
"tia_job_status",
|
|
32087
32087
|
{
|
|
32088
32088
|
title: "TIA \u2014 long-operation status",
|
|
32089
|
-
description: 'Waits (up to waitSeconds, default 20, max 25) for a background job started by a long tool that answered status:"running" (tia_connect, tia_start, tia_show_ui, tia_project_create/save/close/archive, tia_compile, tia_download, tia_upload, tia_export_xml, tia_export_block, tia_block_compare, tia_spec_apply) and returns its FINAL result with job:{id,tool,state,durationMs} \u2014 including a gate handoff if the operation ended in one. While a job runs, every other serve-bound tool answers kind:"busy" (with details.jobId): call this instead of polling tia_status, and never repeat the original call. If a tia_connect/tia_start/tia_show_ui job stays running for minutes, a trust dialog (GATE G1) may be waiting on the serve host \u2014 ask a human to look. Does not call serve. Class R.',
|
|
32089
|
+
description: 'Waits (up to waitSeconds, default 20, max 25) for a background job started by a long tool that answered status:"running" (tia_connect, tia_start, tia_show_ui, tia_project_create/save/saveas/close/archive, tia_compile, tia_source_put, tia_download, tia_upload, tia_export_xml, tia_export_block, tia_block_compare, tia_spec_apply) and returns its FINAL result with job:{id,tool,state,durationMs} \u2014 including a gate handoff if the operation ended in one. While a job runs, every other serve-bound tool answers kind:"busy" (with details.jobId): call this instead of polling tia_status, and never repeat the original call. If a tia_connect/tia_start/tia_show_ui job stays running for minutes, a trust dialog (GATE G1) may be waiting on the serve host \u2014 ask a human to look. Does not call serve. Class R.',
|
|
32090
32090
|
inputSchema: {
|
|
32091
32091
|
jobId: external_exports.string().describe("jobId returned by the long tool (or by a busy error's details.jobId)"),
|
|
32092
32092
|
waitSeconds: external_exports.number().int().min(0).max(25).optional().describe("how long this call may wait (default 20, max 25)")
|
|
@@ -32300,12 +32300,12 @@ function registerLifecycleTools(server2) {
|
|
|
32300
32300
|
"tia_project_saveas",
|
|
32301
32301
|
{
|
|
32302
32302
|
title: "TIA \u2014 save project as",
|
|
32303
|
-
description:
|
|
32303
|
+
description: `Saves the open project to another directory. Maps to POST /project/saveas. ${LONG_OPERATION_NOTE}`,
|
|
32304
32304
|
inputSchema: {
|
|
32305
32305
|
directory: external_exports.string().optional().describe("target directory for 'save as'")
|
|
32306
32306
|
}
|
|
32307
32307
|
},
|
|
32308
|
-
async ({ directory }) => postResult2("/project/saveas", jsonBody({ directory }))
|
|
32308
|
+
async ({ directory }) => jobs.run("tia_project_saveas", { directory }, () => postResult2("/project/saveas", jsonBody({ directory })))
|
|
32309
32309
|
);
|
|
32310
32310
|
server2.registerTool(
|
|
32311
32311
|
"tia_project_close",
|
|
@@ -32902,7 +32902,7 @@ function registerAuthoringTools(server2) {
|
|
|
32902
32902
|
"tia_source_put",
|
|
32903
32903
|
{
|
|
32904
32904
|
title: "TIA \u2014 write/compile SCL source",
|
|
32905
|
-
description:
|
|
32905
|
+
description: `Writes a block from textual SCL source and (optionally) compiles it. Gd6: use THIS for TEXTUAL language (SCL/STL); for graphical (LAD/FBD/GRAPH) use tia_import_xml. With compile:true, the raw compile DTO is nested under 'compile' (same as tia_compile's response), and 'located[]' plus a nextHint are merged at the TOP LEVEL of the result \u2014 same place tia_compile puts them \u2014 when the compile regenerated blocks, e.g. an instance DB after an FB interface change. \`generatedOrUpdated\` lists every block the source created or regenerated (app \u2265 v1.6.0; older serves list only new ones) \u2014 TIA regenerates a block even when the text is identical, so it then needs a compile \u2014 and \`sourceChanges\` gives the per-block change and parts. Maps to POST /plcs/{plc}/source. M-off. ${LONG_OPERATION_NOTE}`,
|
|
32906
32906
|
inputSchema: {
|
|
32907
32907
|
plc: external_exports.string().describe("PLC name"),
|
|
32908
32908
|
name: external_exports.string().describe("block/source name"),
|
|
@@ -32911,7 +32911,8 @@ function registerAuthoringTools(server2) {
|
|
|
32911
32911
|
...dryRunField
|
|
32912
32912
|
}
|
|
32913
32913
|
},
|
|
32914
|
-
|
|
32914
|
+
// dryRun is pure (never calls serve) and stays outside the runner, like tia_spec_apply.
|
|
32915
|
+
async ({ plc, name, code, compile, dryRun }) => dryRun ? sourcePutFlow({ plc, name, code, compile, dryRun }) : jobs.run("tia_source_put", { plc, name, code, compile }, () => sourcePutFlow({ plc, name, code, compile }))
|
|
32915
32916
|
);
|
|
32916
32917
|
server2.registerTool(
|
|
32917
32918
|
"tia_import_xml",
|
|
@@ -33360,6 +33361,7 @@ async function planDownload(args, plan, store) {
|
|
|
33360
33361
|
blockers,
|
|
33361
33362
|
compile,
|
|
33362
33363
|
connection: data.connection ?? null,
|
|
33364
|
+
target: data.target ?? null,
|
|
33363
33365
|
note: fingerprintMissing ? "NO approval token was issued: serve reported ready but returned no software fingerprint, and this MCP never approves a download it cannot verify. Update the TIAOpenness app (serve) to v1.6.0 or later and run dryRun again." : "NO approval token was issued. Fix the blockers (compile errors \u2192 tia_compile; interface \u2192 tia_pg_interfaces) and run dryRun again."
|
|
33364
33366
|
},
|
|
33365
33367
|
false
|
|
@@ -33380,6 +33382,7 @@ async function planDownload(args, plan, store) {
|
|
|
33380
33382
|
warnings: data.warnings ?? [],
|
|
33381
33383
|
compile,
|
|
33382
33384
|
connection: data.connection ?? null,
|
|
33385
|
+
target: data.target ?? null,
|
|
33383
33386
|
loadPreview: {
|
|
33384
33387
|
// Amendment #4: mirrors EVERY real auto-confirmation of PlcDeployService.cs (PreDownload/PostDownload),
|
|
33385
33388
|
// not just the 3 most obvious — including ones that don't stop/restart the CPU but still change its content.
|
|
@@ -33395,7 +33398,7 @@ async function planDownload(args, plan, store) {
|
|
|
33395
33398
|
],
|
|
33396
33399
|
note: "Openness has no preview-without-downloading; these are the selections serve's delegates will make. The real download returns 'configurations' with what was actually confirmed."
|
|
33397
33400
|
},
|
|
33398
|
-
note: "Plan verified by serve. NOTHING was downloaded. After a human approves THIS plan and
|
|
33401
|
+
note: "Plan verified by serve. NOTHING was downloaded. After a human approves THIS plan, fingerprint and target (project + CPU address), call tia_download with approved:true and this planHash (single-use, expires at expiresAt)."
|
|
33399
33402
|
},
|
|
33400
33403
|
false
|
|
33401
33404
|
);
|
|
@@ -34184,7 +34187,7 @@ function registerGuideTool(server2) {
|
|
|
34184
34187
|
|
|
34185
34188
|
// src/index.ts
|
|
34186
34189
|
var server = new McpServer(
|
|
34187
|
-
{ name: "tia-openness", version: "1.6.
|
|
34190
|
+
{ name: "tia-openness", version: "1.6.1" },
|
|
34188
34191
|
// Camada 1 (ambiente): o brief operacional viaja no handshake MCP — qualquer cliente
|
|
34189
34192
|
// que honre `instructions` recebe gates/serial-only/pipeline sem instalar nada.
|
|
34190
34193
|
{ instructions: BRIEF }
|
package/package.json
CHANGED