@renanlido/tia-openness-mcp 1.1.1 → 1.3.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.
Files changed (3) hide show
  1. package/README.md +23 -1
  2. package/dist/index.js +490 -398
  3. package/package.json +3 -2
package/README.md CHANGED
@@ -16,6 +16,27 @@ publicado no **npm público** via **semantic-release** — rode com um one-liner
16
16
  npx -y @renanlido/tia-openness-mcp
17
17
  ```
18
18
 
19
+ ## Operating guide embedded (tia_guide)
20
+
21
+ The harness operating guide ships **inside the MCP itself**, in three layers:
22
+
23
+ 1. **Server `instructions`** — the always-on operating brief (`content/brief.md`) travels in the
24
+ MCP handshake (`instructions` field). Any client that honors `instructions` (Claude Code,
25
+ Claude Desktop, ...) gets the gates/serial-only/pipeline rules automatically, with zero setup.
26
+ 2. **`tia_guide(topic)`** — a tool that returns the bundled guide chapters on demand:
27
+ `toc` (default) | `full` | `brief` | `gates-guards` | `gui-gates` | `gotchas` | `pipeline` |
28
+ `recipes` | `spec-format`. Call it with `{"topic":"pipeline"}` before the first build on a
29
+ project, and `{"topic":"gui-gates"}` when a tool returns `requires_human_action` or a compile
30
+ error mentions a GUI-only setting.
31
+ 3. **Teaching errors on gate signals** — gate responses (`requires_human_action`, the
32
+ `guiGateHints` on compile results, etc.) carry the relevant next steps inline, so the guide
33
+ reinforces itself at the moment a gate is actually hit, not only up front.
34
+
35
+ `tia_guide` is **pure and offline**: it never calls the `serve` API and never returns `isError` —
36
+ unlike every other tool in this package, it works **even with the `serve` down**. The chapters are
37
+ generated from `mcp/content/*.md` (the canonical source) into `src/content.gen.ts` via
38
+ `npm run sync` — see [scripts/sync-guide.mjs](scripts/sync-guide.mjs).
39
+
19
40
  ## Tools
20
41
 
21
42
  ### Diagnóstico + M1 read-only (classe R, auto-aprováveis)
@@ -23,6 +44,7 @@ npx -y @renanlido/tia-openness-mcp
23
44
  |---|---|---|
24
45
  | `tia_ping` | `GET /health` + `GET /readiness` | Diagnostica conectividade e ATIVAÇÃO do `serve`. `{ base, reachable, activated, latencyMs, hint }`. Ideal p/ Mac→VM. |
25
46
  | `tia_readiness` | `GET /readiness` | Prontidão do ambiente **no host do serve** (x64, grupo Windows, PublicAPI, registro, instâncias). |
47
+ | `tia_guide` | — (bundled content, no HTTP call) | Returns the operating guide (see "Operating guide embedded" above). Topics: `toc` (default) \| `full` \| `brief` \| `gates-guards` \| `gui-gates` \| `gotchas` \| `pipeline` \| `recipes` \| `spec-format`. Pure/offline — works with the `serve` down. |
26
48
 
27
49
  **M1 (read-only, 1:1 com os GET da API):** `tia_instances`, `tia_status`, `tia_projects`, `tia_project_info`,
28
50
  `tia_project_languages`, `tia_plcs`, `tia_devices`, `tia_device_tree`, `tia_device_connections`,
@@ -81,7 +103,7 @@ Aceita o **project-spec** estruturado (`docs/TIA-BEST-PRACTICES.md` §13.2; JSON
81
103
  - **`tia_spec_plan`** (sem serve): transforma um spec válido na sequência ordenada de operações (subnets→devices→módulos→rede→tags→blocos→compile).
82
104
  - **`tia_spec_apply`**: orquestra o build OFFLINE num projeto aberto (valida → G5 → executa serial → compila), **para no 1º erro** e **nunca baixa** (download é o GATE G3, sempre humano). `dryRun:true` devolve o plano.
83
105
 
84
- > **MCP M0–M5 COMPLETO** (~74 tools), **validado em runtime** contra um TIA Portal V21 real (incluindo **deploy em hardware** num S7-1200) e **publicado no npm**. Roadmap e marcos em `docs/ROADMAP.md` §3.
106
+ > **MCP M0–M5 COMPLETO** (76 tools), **validado em runtime** contra um TIA Portal V21 real (incluindo **deploy em hardware** num S7-1200) e **publicado no npm**. Roadmap e marcos em `docs/ROADMAP.md` §3.
85
107
 
86
108
  ## Configuração (env)
87
109