@renanlido/tia-openness-mcp 1.9.0 → 1.9.2
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 +74 -44
- package/dist/index.js +10 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,20 +35,24 @@ The harness operating guide ships **inside the MCP itself**, in three layers:
|
|
|
35
35
|
`guiGateHints` on compile results, etc.) carry the relevant next steps inline, so the guide
|
|
36
36
|
reinforces itself at the moment a gate is actually hit, not only up front.
|
|
37
37
|
|
|
38
|
-
`tia_guide` is **pure and offline**: it never calls the `serve` API and never returns `isError
|
|
39
|
-
|
|
38
|
+
`tia_guide` is **pure and offline**: it never calls the `serve` API and never returns `isError`, so it works
|
|
39
|
+
**even with the `serve` down** (so do `tia_spec_validate`, `tia_spec_plan` and `tia_job_status`). The chapters are
|
|
40
40
|
generated from `mcp/content/*.md` (the canonical source) into `src/content.gen.ts` via
|
|
41
41
|
`npm run sync` — see [scripts/sync-guide.mjs](scripts/sync-guide.mjs).
|
|
42
42
|
|
|
43
43
|
## Tools
|
|
44
44
|
|
|
45
|
+
**Names:** MCP tools use underscores (`tia_ping`, `tia_readiness`, `tia_compile`). Harness skills use
|
|
46
|
+
hyphens (`tia-init`, `tia-review`); the old dotted skill names were retired.
|
|
47
|
+
Tools and skills are separate interfaces; `tia.ping` is not a tool name.
|
|
48
|
+
|
|
45
49
|
### Diagnostics + M1 read-only (class R, auto-approvable)
|
|
46
50
|
| Tool | Endpoint | Description |
|
|
47
51
|
|---|---|---|
|
|
48
52
|
| `tia_ping` | `GET /health` + `GET /readiness` | Diagnoses connectivity and ACTIVATION of the `serve`. `{ base, reachable, activated, latencyMs, hint }`. Ideal for Mac→VM. |
|
|
49
53
|
| `tia_readiness` | `GET /readiness` | Environment readiness **on the serve host** (x64, Windows group, PublicAPI, registry, instances). |
|
|
50
54
|
| `tia_guide` | — (bundled content, no HTTP call) | Returns the operating guide (see "Operating guide embedded" above). Topics: `toc` (default) \| `full` \| `codex` (sized for Codex, no recipes) \| `brief` \| `gates-guards` \| `gui-gates` \| `gotchas` \| `pipeline` \| `recipes` \| `spec-format`. Pure/offline — works with the `serve` down. |
|
|
51
|
-
| `tia_job_status` | — (does not call `serve`) | Waits (up to `waitSeconds`, default 20, max 25) for a long tool's background job
|
|
55
|
+
| `tia_job_status` | — (does not call `serve`) | Waits (up to `waitSeconds`, default 20, max 25) for a long tool's background job: returns its final result if the job ends within the wait, otherwise `status:"running"` again; an unknown or forgotten `jobId` answers `not_found` (see "Long operations run as jobs" below). |
|
|
52
56
|
|
|
53
57
|
**M1 (read-only, 1:1 with the API's GET endpoints):** `tia_instances`, `tia_status`, `tia_projects`, `tia_project_info`,
|
|
54
58
|
`tia_project_languages`, `tia_plcs`, `tia_devices`, `tia_device_tree`, `tia_device_connections`,
|
|
@@ -67,8 +71,10 @@ interfaces the CPU sees, plus each adapter's OS status — **no network scan**,
|
|
|
67
71
|
| `tia_project_create` | `POST /project/create` | Creates a project (Gd4: empty directory → otherwise 409). |
|
|
68
72
|
| `tia_project_save` / `tia_project_saveas` / `tia_project_close` / `tia_project_archive` | `POST /project/*` | Project lifecycle. `tia_project_close` KEEPS the TIA process alive (`portalKept`/`pid`) — the next `tia_connect` reuses it; nothing is saved. |
|
|
69
73
|
|
|
70
|
-
**Trust GATE (G1):**
|
|
71
|
-
|
|
74
|
+
**Trust GATE (G1):** setup pre-registers eligible installed executables (Program Files, admin-only ACLs) in the
|
|
75
|
+
Openness allow-list. If the executable is not covered by a current entry, connecting can require a human to
|
|
76
|
+
confirm the security dialog ON THE HOST. When the dialog is needed, the proactive flow is
|
|
77
|
+
**`tia_start` → `tia_show_ui` → (human confirms) → `tia_connect`**.
|
|
72
78
|
If `tia_connect` hits the dialog, it does NOT retry-storm: it returns `{ status:"requires_human_action",
|
|
73
79
|
gate:"trust_dialog", youMustDo, resumeToken }` after ~180 s without an answer (`TIA_CONNECT_TIMEOUT_MS`) with
|
|
74
80
|
`/health` still reachable. Check `tia_status` first — `hasProject:true` means the connect actually succeeded
|
|
@@ -77,18 +83,23 @@ gate:"trust_dialog", youMustDo, resumeToken }` after ~180 s without an answer (`
|
|
|
77
83
|
until the job ends) — keep polling `tia_job_status`. After the human confirms, call `tia_connect` again with
|
|
78
84
|
the `resumeToken`.
|
|
79
85
|
|
|
80
|
-
### M3 —
|
|
81
|
-
A **compliant-by-construction** creation surface (
|
|
82
|
-
|
|
86
|
+
### M3 — creation/authoring (class M-off) + guards
|
|
87
|
+
A **compliant-by-construction** creation surface (32 tools) with schema validation (Gd13); every tool except
|
|
88
|
+
`tia_export_block`, `tia_block_compare` and `tia_obj_service` takes `dryRun` (Gd11):
|
|
89
|
+
- **Hardware/network:** `tia_device_create`/`plug`/`unplug`, `tia_device_change_version` (changes the CPU firmware version in place, keeping the program), `tia_device_group_create`, `tia_subnet_create`, `tia_network_connect`/`address`/`disconnect`.
|
|
83
90
|
- **Tags/constants:** `tia_tagtable_create`, `tia_tag_create`/`delete`, `tia_constant_create`.
|
|
84
91
|
- **Blocks/types:** `tia_fb_create`, `tia_instancedb_create`, `tia_block_delete`/`set_attribute`, `tia_block_group_create`, `tia_type_group_create`/`type_delete`.
|
|
85
92
|
- **Code:** `tia_source_put` (textual SCL — Gd6), `tia_import_xml`/`tia_types_import` (graphical SimaticML — Gd6/Gd7), `tia_export_xml`.
|
|
86
93
|
- **Project-as-code proof (#26/#28):** `tia_export_block` (exports ONE block inline as SimaticML — `sha256`/`normalizedSha256`/`bytes`, no file on the serve host) and `tia_block_compare` (compares a block against the SimaticML you pass, e.g. the file in git — normalized, ignores BOM/formatting/`<Created>`/UIds — `verdict:"equal"|"different"` is the actual roundtrip proof; a raw hash is not). Both read-mostly: exporting an inconsistent block first compiles it (export requires consistency), which can regenerate its instance DB.
|
|
87
94
|
- **Watch tables:** `tia_watchtable_create`/`delete`.
|
|
88
|
-
- **Generic
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
95
|
+
- **Generic object layer:** `tia_obj_service`/`set_attributes`/`invoke`/`create`. Declared M-off, but not offline-only:
|
|
96
|
+
the serve's `/obj` risk policy lets these reach online, credential and other deploy-gated members of the object
|
|
97
|
+
model only with the `deploy` license scope, and refuses a download through them for every license — use
|
|
98
|
+
`tia_download`.
|
|
99
|
+
|
|
100
|
+
**Guards (client-side, before touching Openness):** **Gd5** — a versioned `typeIdentifier` uses `/V<fw>` (slash),
|
|
101
|
+
never `:V`: a `:V<digit>` is rejected with `kind:"guard_violation"`; the guard does not check that the identifier
|
|
102
|
+
exists (resolve the value via `tia_catalog`). **Gd11** — `dryRun:true` validates the guards
|
|
92
103
|
and returns the **plan by name WITHOUT mutating** (`status:"plan_ok"`). **Gd6** (advisory) — textual language (SCL) via
|
|
93
104
|
`tia_source_put`, graphical (LAD/FBD/GRAPH) via `tia_import_xml`; UDTs before blocks. **Gd2** (advisory) — idempotency
|
|
94
105
|
by name (check existence with the M1 read-only tools before creating; Openness has no rollback).
|
|
@@ -121,22 +132,26 @@ is a path **on the serve host**.
|
|
|
121
132
|
| `tia_connection_create` | `POST /connections` | M-off — S7 connection (G2: requires ≥2 consistent CPUs; failure attaches diagnostics). |
|
|
122
133
|
| `tia_download` | `POST /plcs/{plc}/download/plan` + `POST /plcs/{plc}/download` | **GATE G3** — never downloads without human approval bound to the `planHash`. |
|
|
123
134
|
| `tia_upload` | `POST /stations/upload/plan` · `POST /stations/upload` | **GATE G4** (+G6 read password) — single-use planHash bound to the open project; runs as a job. |
|
|
124
|
-
| `tia_online` / `tia_offline` / `tia_online_state` | `POST /plcs/{plc}/online`·`/offline`·`GET …/state` | **G4** (online) / R (state). |
|
|
135
|
+
| `tia_online` / `tia_offline` / `tia_online_state` | `POST /plcs/{plc}/online`·`/offline`·`GET …/state` | **GATE G4** (online, needs `confirm:true`) / **GATE** (offline, no `confirm`) / R (state). |
|
|
125
136
|
| `tia_accessible_devices` | `POST /plcs/{plc}/online/accessibledevices` | **GATE G7** (net scan). |
|
|
126
137
|
| `tia_mastersecret_set` / `tia_mastersecret_reset` | `…/online/mastersecret` | **GATE G6** (the secret comes from a human, never from the AI). |
|
|
127
138
|
|
|
128
139
|
**Download GATE (G3, ADR 0008):** `tia_download` NEVER downloads without approval, and the approval is bound to
|
|
129
140
|
the approved connection/options and the covered software content — **not the hardware configuration**. Flow: `tia_compile` (Gd9 precondition: `errors=0`)
|
|
130
141
|
→ `tia_download dryRun:true`, which asks **serve** for a VERIFIED plan (`POST /plcs/{plc}/download/plan`: fresh compile,
|
|
131
|
-
resolved connection, and a **software fingerprint**
|
|
132
|
-
|
|
133
|
-
|
|
142
|
+
resolved connection, and a **software fingerprint** of program blocks, UDTs and tag tables — blocks and UDTs use Openness
|
|
143
|
+
fingerprints and fall back to modification dates (see `fingerprintItems[].source`), tag tables hash their content; NOT
|
|
144
|
+
hardware, system block groups or technology objects. The approval also binds the open project and the target-address
|
|
145
|
+
set (a change to either is `409 plan_stale`), but any other hardware change after approval passes the token check
|
|
146
|
+
undetected: it needs fresh human review, not the old approval) → only a `ready` plan returns a single-use `planHash` that expires
|
|
134
147
|
(`TIA_PLAN_TTL_MS`, default 15 min, MCP-process-only) → a human approves the plan **and its fingerprint** → `tia_download
|
|
135
148
|
approved:true` with the **same `planHash`**. `serve` re-checks the fingerprint **inside** the download call (no window
|
|
136
149
|
between check and load) and refuses **`409 plan_stale`** if the software changed since the plan. `allowUpgradeTargetDevice:
|
|
137
150
|
true` (#31) is part of the approved plan — without it, a CPU that requires TIA's "upgrade the target device" confirmation
|
|
138
|
-
refuses the load with **`409 upgrade_target_device_required
|
|
139
|
-
|
|
151
|
+
refuses the load with **`409 upgrade_target_device_required`**. That does not prove nothing was loaded:
|
|
152
|
+
`details.refusedPhase` and `details.configurations` show how far the pass got (the CPU may already have stopped,
|
|
153
|
+
received the load or restarted), so a human checks the CPU state before a new plan — earlier confirmations in the same
|
|
154
|
+
pass, like `StopAll`, cannot be undone. A successful dry-run is NOT a handoff —
|
|
140
155
|
it returns `status:"plan_ok"` with the `planHash`. Calling the real download without `approved:true` (or with a
|
|
141
156
|
wrong/expired/consumed hash or a parameter mismatch) returns a `requires_human_action / download_approval` envelope
|
|
142
157
|
with a `reasonCode` (`not_approved` \| `unknown` \| `expired` \| `consumed` \| `plan_mismatch` \| `outcome_unknown`).
|
|
@@ -146,12 +161,12 @@ The auto-confirmed selections (StopAll/Overwrite/Start/…) remain visible in th
|
|
|
146
161
|
(transparency record, P0.5) — pick the connection with `tia_pg_interfaces` (no scan).
|
|
147
162
|
|
|
148
163
|
### M5 — project-spec ingestion (orchestrates M1–M4)
|
|
149
|
-
Accepts the structured **project-spec** (`docs/TIA-BEST-PRACTICES.md` §13.2; JSON Schema at
|
|
164
|
+
Accepts the structured **project-spec** (`docs/TIA-BEST-PRACTICES.md` §13.2; JSON Schema at `schemas/project-spec.schema.json` in the repository):
|
|
150
165
|
- **`tia_spec_validate`** (R, deterministic, **no serve needed**): validates shape + cross-field rules — R-NAMES (unique names), R-TYPEID (`OrderNumber:<MLFB>/V<fw>`), R-SUBNET (IP∈CIDR, CPU+IO on the same subnet, 1 IO-system), R-LANGFAM (STL/GRAPH only on S7-1500), R-MODLIMIT, and **G5** (`safety.required && autonomous ⇒ REJECT`).
|
|
151
|
-
- **`tia_spec_plan`** (no serve needed): turns a valid spec into the ordered operation sequence (subnets→devices→modules→network→tags→blocks→compile).
|
|
152
|
-
- **`tia_spec_apply`**: orchestrates the OFFLINE build on an open project (validate → G5 → execute serially → compile), **stops at the 1st
|
|
166
|
+
- **`tia_spec_plan`** (no serve needed): turns a valid spec into the ordered operation sequence (subnets→devices→modules→network→tags→blocks→compile; the compile step is dropped when an explicit `verification.ladder` leaves `"compile"` out).
|
|
167
|
+
- **`tia_spec_apply`**: orchestrates the OFFLINE build on an open project (validate → G5 → execute serially → compile, as planned), **stops at the 1st failed step** unless `continueOnError:true` (then it applies the rest and reports `applied_with_errors`), and **never downloads** (download is GATE G3, always human). `dryRun:true` returns the plan.
|
|
153
168
|
|
|
154
|
-
> **MCP M0–M5 COMPLETE** (105 tools
|
|
169
|
+
> **MCP M0–M5 COMPLETE** (105 tools), **runtime-validated** against a real TIA Portal V21 (including a
|
|
155
170
|
> **hardware deploy** to an S7-1200) and **published to npm**. Roadmap and milestones in `docs/ROADMAP.md` §3.
|
|
156
171
|
|
|
157
172
|
### Long operations run as jobs (ADR 0009)
|
|
@@ -176,8 +191,9 @@ soft-deadline job runner instead of blocking the call: `tia_connect`, `tia_start
|
|
|
176
191
|
`tia_guide`, `tia_spec_validate`, `tia_spec_plan` and `tia_job_status` itself never answer busy (they
|
|
177
192
|
don't call `serve`). `tia_ping` is the diagnostic exception: it probes `/health` (which bypasses the
|
|
178
193
|
busy guard) and returns a reachability report instead of `busy` — with no `details.jobId`, so it cannot
|
|
179
|
-
be used to obtain the job ID. The same long tool called again with the
|
|
180
|
-
|
|
194
|
+
be used to obtain the job ID. The same long tool called again with the same arguments (the key is the tool plus
|
|
195
|
+
all its arguments) returns the same `jobId` instead of starting a second run; a `tia_connect` that differs in any
|
|
196
|
+
argument (UI, UMAC, `resumeToken`) answers `busy` while the first one runs.
|
|
181
197
|
- If a `tia_connect`/`tia_start`/`tia_show_ui` job stays `running` for minutes, a **trust dialog (G1)**
|
|
182
198
|
may be waiting on the serve host — ask a human to look.
|
|
183
199
|
|
|
@@ -187,13 +203,13 @@ soft-deadline job runner instead of blocking the call: `tia_connect`, `tia_start
|
|
|
187
203
|
|---|---|---|
|
|
188
204
|
| `TIA_API_BASE` | `http://localhost:5000` | Base URL of the `serve` API. |
|
|
189
205
|
| `TIA_API_TIMEOUT_MS` | `15000` | Per-request timeout (fail fast if the host/VM does not respond). |
|
|
190
|
-
| `TIA_SLOW_TIMEOUT_MS` | `120000` | Timeout for slow/cold ops (
|
|
206
|
+
| `TIA_SLOW_TIMEOUT_MS` | `120000` | Timeout for slow/cold ops (catalog, download plan and other slow M1–M3 calls). `tia_project_create` uses `TIA_CONNECT_TIMEOUT_MS`; `tia_compile` does NOT use this variable — it has a separate fixed 120 s timeout. |
|
|
191
207
|
| `TIA_CONNECT_TIMEOUT_MS` | `180000` | Timeout for the calls that start a new TIA (`tia_connect`, `tia_project_create`, `tia_start`, `tia_show_ui`) before a wait is treated as a possible G1 trust-dialog gate. |
|
|
192
|
-
| `TIA_SOFT_DEADLINE_MS` | `20000` | Soft deadline for the
|
|
208
|
+
| `TIA_SOFT_DEADLINE_MS` | `20000` | Soft deadline for the 24 long tools before they answer `status:"running"` (capped at `25000`). |
|
|
193
209
|
| `TIA_PLAN_TTL_MS` | `900000` | Validity of a G3 download `planHash` (15 min); the token lives only in this MCP process. |
|
|
194
210
|
|
|
195
|
-
> **The MCP sends no key.** The API is **activated by a license** configured in the GUI ("License"
|
|
196
|
-
>
|
|
211
|
+
> **The MCP sends no host activation key.** The API is **activated by a license** configured in the GUI ("License"
|
|
212
|
+
> tab). Human-provided operation credentials travel in tool calls, not in the MCP launch configuration.
|
|
197
213
|
|
|
198
214
|
## Mac → Windows VM scenario (pointing at the server)
|
|
199
215
|
|
|
@@ -218,7 +234,8 @@ soft-deadline job runner instead of blocking the call: `tia_connect`, `tia_start
|
|
|
218
234
|
export TIA_API_BASE="http://<vm-ip>:5000"
|
|
219
235
|
```
|
|
220
236
|
3. **Diagnose** with the `tia_ping` tool: `reachable:false` → IP/port/firewall/VM; `activated:false` →
|
|
221
|
-
license missing/invalid on the VM
|
|
237
|
+
license missing/invalid on the VM. Both `true` mean reachable and activated, not environment readiness:
|
|
238
|
+
call `tia_readiness` and inspect `ready` and `checks` before proceeding.
|
|
222
239
|
|
|
223
240
|
## Build / bundle
|
|
224
241
|
|
|
@@ -252,22 +269,31 @@ Packing (`mcpb validate` / `mcpb pack`) and attaching the file to the release is
|
|
|
252
269
|
npx -y @renanlido/tia-openness-mcp # runs without installing (recommended for .mcp.json)
|
|
253
270
|
# or install the `tia-openness-mcp` binary on PATH:
|
|
254
271
|
npm install -g @renanlido/tia-openness-mcp
|
|
272
|
+
npx -y @renanlido/tia-openness-mcp@latest --version # prints the version and exits
|
|
255
273
|
```
|
|
256
274
|
|
|
275
|
+
Run without `--version`, it is a stdio **server**, not an interactive command: it prints
|
|
276
|
+
`[tia-openness-mcp] <version> stdio ready …` on stderr and then waits for an MCP client on stdin (Ctrl+C to quit).
|
|
277
|
+
Your agent starts it from its MCP configuration; there is nothing to type into it.
|
|
278
|
+
|
|
257
279
|
### B) Local, without publishing (dev on this machine)
|
|
258
280
|
|
|
259
281
|
```bash
|
|
260
282
|
cd mcp
|
|
261
|
-
npm install
|
|
283
|
+
npm install
|
|
284
|
+
npm run build # creates dist/index.js
|
|
285
|
+
npm install -g . # installs the already-built binary
|
|
262
286
|
# or: npm pack && npm install -g ./renanlido-tia-openness-mcp-*.tgz
|
|
263
287
|
```
|
|
264
288
|
|
|
265
289
|
## Publishing (public npm + semantic-release)
|
|
266
290
|
|
|
267
|
-
**Automatic versioning by conventional commits** (`feat` → minor, `fix` → patch, `BREAKING CHANGE`
|
|
268
|
-
→ major
|
|
269
|
-
|
|
270
|
-
|
|
291
|
+
**Automatic versioning by conventional commits** (`feat` → minor, `fix`/`perf` → patch, `BREAKING CHANGE`
|
|
292
|
+
→ major; `docs(README)` also produces a patch so documentation corrections reach npm).
|
|
293
|
+
The `.github/workflows/release-mcp.yml` workflow runs on pushes to `main` affecting `mcp/**` or the workflow
|
|
294
|
+
file itself, and on manual dispatch. `semantic-release-monorepo` filters commits by the package path;
|
|
295
|
+
publication happens only when those commits warrant a release. The package is **public**
|
|
296
|
+
(`registry.npmjs.org`, `publishConfig.access: public`); a green workflow alone does not prove a new version exists.
|
|
271
297
|
|
|
272
298
|
**Authentication is npm trusted publishing (OIDC)** — there is no `NPM_TOKEN`. The package stays
|
|
273
299
|
`@renanlido/tia-openness-mcp` after the private source repository moved; its trusted publisher on npmjs.com must
|
|
@@ -289,10 +315,12 @@ to match npm. [`CHANGELOG.md`](CHANGELOG.md) is frozen at 1.7.0; later notes are
|
|
|
289
315
|
**Several agents at once: the guided setup (once published).** `@renanlido/plcware-setup` connects this server to Claude Code,
|
|
290
316
|
Claude Desktop, Codex, Gemini CLI, Cursor and VS Code in one run (`npx @renanlido/plcware-setup`: it asks the API address,
|
|
291
317
|
previews every change and confirms once), and where the agent takes them also installs the harness skills and subagents.
|
|
292
|
-
|
|
293
|
-
`src/tool-classes.json`)
|
|
294
|
-
|
|
295
|
-
|
|
318
|
+
Setup adds preapproval allowances for the read-only tools (class R: 39 of the 105 `tia_*` tools, listed in
|
|
319
|
+
`src/tool-classes.json`) where the chosen registration route supports them. Existing user permissions are
|
|
320
|
+
preserved: deny/ask rules can still prompt for reads, and existing allow rules can already permit mutations.
|
|
321
|
+
Linked Claude settings files are not modified; Codex's command-registration route installs no preapprovals.
|
|
322
|
+
Setup records every change, so its `uninstall` removes only what it added. **It is not published yet**, so that
|
|
323
|
+
command does not work today: use the per-agent commands below.
|
|
296
324
|
|
|
297
325
|
## Registering in Claude Code
|
|
298
326
|
|
|
@@ -333,9 +361,10 @@ only if the client says the server failed to start) — is in `docs/INSTALL.md`
|
|
|
333
361
|
`TIA_SLOW_TIMEOUT_MS` (120000), `TIA_CONNECT_TIMEOUT_MS` (180000). E.g. `--env TIA_SLOW_TIMEOUT_MS=180000`
|
|
334
362
|
on `claude mcp add`, or the corresponding key in the `.mcp.json` `env`.
|
|
335
363
|
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
`tia_ping` /
|
|
364
|
+
The `--scope user` command makes the server available across your projects. Only the `.mcp.json` alternative
|
|
365
|
+
is **project-scoped** and needs the corresponding project-server approval. Check `claude mcp list` (it should
|
|
366
|
+
list `tia`), approve the project server if prompted, then start or reload the session and call `tia_ping` /
|
|
367
|
+
`tia_readiness`.
|
|
339
368
|
|
|
340
369
|
## Smoke test
|
|
341
370
|
|
|
@@ -347,11 +376,12 @@ MCP_COMMAND=tia-openness-mcp MCP_ARGS='[]' npm run smoke # (Windows: use
|
|
|
347
376
|
|
|
348
377
|
## Notes
|
|
349
378
|
|
|
350
|
-
- **
|
|
351
|
-
|
|
379
|
+
- **No host activation key is sent by the MCP.** Activation is configured on the host (GUI). Human-provided UMAC
|
|
380
|
+
credentials, CPU master secrets and block/certificate passwords can be sent in tool request bodies; never store
|
|
381
|
+
them in `.mcp.json`.
|
|
352
382
|
- **Serial-only**: the backend is a serial worker; the MCP must never parallelize tool calls (Gd1).
|
|
353
383
|
- **stdout belongs to the MCP protocol** — logs go to **stderr**.
|
|
354
384
|
- The bundle is produced by [scripts/build.mjs](scripts/build.mjs) (esbuild, ESM, shebang + `createRequire`,
|
|
355
385
|
injected version). `dist/`, `node_modules/`, `*.tgz` are artifacts (gitignored).
|
|
356
386
|
- When adding/changing tools, **rebuild + reinstall** the binary (`npm run build && npm i -g .`) so the local
|
|
357
|
-
install reflects it
|
|
387
|
+
install reflects it. Production publication requires a release-worthy package commit on `main` (see "Publishing").
|
package/dist/index.js
CHANGED
|
@@ -34776,8 +34776,9 @@ function classifyTools(server2) {
|
|
|
34776
34776
|
}
|
|
34777
34777
|
|
|
34778
34778
|
// src/index.ts
|
|
34779
|
+
var VERSION = "1.9.2";
|
|
34779
34780
|
var server = new McpServer(
|
|
34780
|
-
{ name: "tia-openness", version:
|
|
34781
|
+
{ name: "tia-openness", version: VERSION },
|
|
34781
34782
|
// Camada 1 (ambiente): o brief operacional viaja no handshake MCP — qualquer cliente
|
|
34782
34783
|
// que honre `instructions` recebe gates/serial-only/pipeline sem instalar nada.
|
|
34783
34784
|
{ instructions: BRIEF }
|
|
@@ -34798,9 +34799,16 @@ registerUploadTools(server);
|
|
|
34798
34799
|
registerOnlineTools(server);
|
|
34799
34800
|
registerSpecTools(server);
|
|
34800
34801
|
async function main() {
|
|
34802
|
+
if (process.argv.slice(2).some((a) => a === "--version" || a === "-v")) {
|
|
34803
|
+
console.log(VERSION);
|
|
34804
|
+
process.exit(0);
|
|
34805
|
+
return;
|
|
34806
|
+
}
|
|
34801
34807
|
const transport = new StdioServerTransport();
|
|
34802
34808
|
await server.connect(transport);
|
|
34803
|
-
console.error(
|
|
34809
|
+
console.error(
|
|
34810
|
+
`[tia-openness-mcp] ${VERSION} stdio ready. API base = ${BASE} timeout=${TIMEOUT_MS}ms. Waiting for an MCP client on stdin: this is a server for your agent, not an interactive command (Ctrl+C to quit).`
|
|
34811
|
+
);
|
|
34804
34812
|
}
|
|
34805
34813
|
main().catch((e) => {
|
|
34806
34814
|
console.error("[tia-openness-mcp] fatal error:", e);
|
package/package.json
CHANGED