Topiclint

io.github.CloudCorpRecords由 GitHub 帳號 CloudCorpRecords 發布v0.1.0更新於 Nov 3, 2026

針對MQTT主題路徑的Sparkplug B主題檢查與UNS命名檢查。

AI 翻譯由 AI 模型根據下方的原文描述翻譯,可能有誤。

原文描述

Sparkplug B topic linting and UNS naming checks for MQTT topic paths.

已驗證STDIO僅桌面

概覽

Topiclint 的本機 MCP 服務;無需登入;STDIO。

暫無 AI 概覽:以下資訊來自註冊中心條目和服務本身。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Topiclint,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

topiclint

topiclint checks MQTT topic strings before they reach a broker or a namespace design review. It lints individual topics against the Sparkplug B topic grammar (Sparkplug 3.0), and it reviews a whole set of Unified Namespace (UNS) topic paths for naming consistency — the kind of drift (mixed casing, uneven depth, near-duplicate siblings) that makes a namespace hard to browse, query, and hand over. One binary serves a command-line interface and a stdio MCP server.

Everything is local and offline. There is no broker connection, no network access, no API key, and no account. The linter validates grammar only: it does not decode payloads or check that a device exists. The naming check judges consistency only: it does not know your plant and will not design a namespace for you.

Install

bash
npx @reneturcios/topiclint lint spBv1.0/Plant1/NBIRTH/Edge1

Or run the container image:

bash
docker run -i ghcr.io/cloudcorprecords/topiclint

The container defaults to the MCP server (see below); pass CLI arguments to use it as a CLI instead.

CLI

bash
topiclint lint spBv1.0/Plant1/NBIRTH/Edge1 spBv1.0/Plant1/DDATA/Edge1/Dev1topiclint check enterprise/site1/line1 enterprise/site1/line2
topiclint --version

Each topic or path is one argument; a single argument may also be a newline-delimited list. Both commands print a JSON report. A report full of findings is still a successful run — findings are the output, not an error. Exit codes: 0 on success, 1 on a runtime error, 2 for usage errors.

What the Sparkplug lint checks

For every topic: the spBv1.0 namespace level; the message type (one of NBIRTH, NDEATH, DBIRTH, DDEATH, NDATA, DDATA, NCMD, DCMD, plus STATE); the level count (node messages and STATE carry exactly four levels, device messages exactly five); the legacy Sparkplug 2.2 STATE form (STATE/<host_id> with no namespace), reported as its own failure; publish-side MQTT wildcards (+ / #); empty levels; and identifier characters in the group, node, and device levels — whitespace fails, and characters outside [A-Za-z0-9_-] warn, because both break downstream consumers that split, quote, or map topics.

Each result carries the parsed topic parts (namespace, group id, message type, edge node id, device id) plus ordered findings with levels fail / warn / pass / info.

What the UNS check looks for

Across the whole set: duplicate paths, empty levels, whitespace in segments, and stray MQTT wildcards all fail. Siblings under the same parent whose names differ only by case fail as a case-collision — they read as one node but are two. Inconsistent hierarchy depth and mixed casing styles (lower, upper, snake_case, kebab-case, PascalCase, camelCase) warn. The report opens with a one-line summary, then the per-issue findings.

MCP server

One bin serves both faces. The mcp subcommand starts a stdio MCP server:

bash
npx -y @reneturcios/topiclint mcp

MCP client configuration:

json
{  "mcpServers": {    "topiclint": {      "command": "npx",      "args": ["-y", "@reneturcios/topiclint", "mcp"]    }  }}

Tools

Both tools take a single topics argument: a single string, a newline-delimited string, or an array of topic strings.

ToolInputWhat it returns
lint_sparkplug_topictopics (string or string array)Per-topic parsed parts plus ordered findings, with pass/fail counts and a summary.
check_uns_namespacetopics (string or string array)A summary line plus per-issue findings for the whole path set.

Development

bash
npm installnpm run build   # tsc -> dist/npm test        # node test runner over test/*.test.ts, no networknpm run dev     # run the CLI from source via tsx

License

MIT — see LICENSE.

來源:README.md,提交 8f0d4af

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.0最新Nov 3, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分