PHM Physics Check

io.github.PHM-Audit由 GitHub 帳號 PHM-Audit 發布v1.0.1更新於 Nov 6, 2026

Deterministic physics plausibility checks for LLM outputs and robotics data. Offline, stdlib-only.

發布方自己的服務:check.tattoo: tattoo size and placement guide

已驗證STDIO僅桌面開發者工具AI 與機器學習

概覽

AI 產生的概覽

本機 MCP 伺服器,對 LLM 文字、單一物理量與機器人資料做確定性的物理合理性檢查,回傳 PASS/WARN/FAIL 結論。

可以做什麼
  • 檢查含物理量的自由文字:單位一致性、光速與溫度下限、質量/長度/能量非負、機率範圍
  • 檢查單一數值與單位是否符合物理定律
  • 驗證機器人紀錄:四元數正規化、時間戳合理性、NaN/Inf 數值、缺少單位標註
  • 以結構化違規紀錄回傳 PASS/WARN/FAIL 結論,結果可重現且完全離線
適用情境
當助理產生或審閱帶物理量的文字、工程描述或機器人/具身智慧資料集,需要一個確定性的合理性把關,而不是另一個模型的判斷時適用。它是輕量的離線子集,並非完整物理引擎。
執行需求
以本機 stdio 程序執行,指令為 python3 -m phm_lite_check.mcp_server;需要 Python 3.8 以上,無第三方相依套件。從 GitHub 儲存庫或發行版 wheel 安裝;不需要 API 金鑰、帳號或網路存取。
安裝前請注意
僅包含確定性的離線子集,專有深度檢查已被排除,文中提到的遠端引擎端點並未包含在此套件內。結論屬於啟發式合理性提示,WARN/FAIL 應視為需要人工複核的訊號,而非權威的物理驗證。此套件由社群提供,與其提供轉接器的框架並無隸屬關係。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

phm-lite-check

Deterministic physics plausibility checking for LLM outputs and robotics / embodied-AI datasets. Zero dependencies, pure standard library, Python >= 3.8.

This package is an independent, community-provided library: it is the offline subset of the PHM physical-judgment engine (proprietary core methods are intentionally excluded). A companion plugin (phm-physics-check) is listed on the Dify Marketplace.

Not affiliated with, endorsed by, or sponsored by LangChain, AutoGen, or Dify. Integration adapters are community-provided.

MCP server

This package doubles as a local MCP server (stdio transport). After installing, point your MCP client at:

python3 -m phm_lite_check.mcp_server

Exposing three tools: physics_text_check, physics_quantity_check, robotics_data_check.

What it checks

Text / quantities (check_text, full_check)

  • Dimensional / unit consistency (SI + common units)
  • Universal speed limit (c)
  • Absolute temperature floor (0 K)
  • Non-negativity of mass / length / energy
  • Probability range [0, 1]
  • Kinematic relations (free-fall family, tolerance-checked)
  • Conservation checks (energy / momentum, tolerance-checked)

Robotics records (check_robotics_record)

  • Quaternion normalization (|q| within tolerance of 1.0)
  • Timestamp sanity: monotonicity, duplicates, NaN/Inf, outlier gaps (possible frame loss)
  • NaN / Inf scan over numeric arrays
  • Unit annotation presence for common motion fields

Design guarantees

  • Deterministic: same input -> same output, always reproducible.
  • Zero dependencies: pure standard library; framework adapters import their host lazily.
  • Verdicts: PASS / WARN / FAIL with structured violation records.
  • No network calls: everything runs offline in-process.

NOTE: this package contains only the deterministic offline subset of the PHM physical-judgment engine. Proprietary core methods are intentionally excluded. (Deployment-specific deep checks are available separately via a configurable remote engine endpoint, not included in this package.)

Install

Option A — from the GitHub repo (no package index needed):

bash
pip install git+https://github.com/PHM-Audit/phm-lite-check

Option B — from a Release wheel (faster, no git clone):

bash
pip install https://github.com/PHM-Audit/phm-lite-check/releases/download/v1.0.0/phm_lite_check-1.0.0-py3-none-any.whl

Optional extras (once installed):

bash
pip install "phm-lite-check[langchain]"   # + langchain-core (adapter tests)pip install "phm-lite-check[autogen]"     # + autogen-agentchat

PyPI listing is planned; both options above work today.

Quickstart — library

python
from phm_lite_check import check_text, check_robotics_record
check_text("The drone descends at 450 km/h and confidence is 1.8.")# {"verdict": "FAIL", "violations": [...], ...}
check_robotics_record({    "quaternion": [1.395, 0.0, 0.0, 0.0],   # |q| >> 1 -> FAIL    "timestamps": [0.0, 0.1, 0.05],          # not monotonic -> FAIL    "position": [1.0, 2.0],                  # no unit annotated -> WARN})

Quickstart — LangChain

python
from phm_lite_check.integrations import langchain_tool
tools = langchain_tool.get_langchain_tools()   # 3 @tool callablesagent = create_react_agent(llm, tools)         # your usual wiring

Quickstart — AutoGen (v0.4+)

python
from autogen_agentchat.agents import AssistantAgentfrom phm_lite_check.integrations import autogen_tool
assistant = AssistantAgent(    name="checked_assistant",    model_client=...,                    # your model client    tools=autogen_tool.get_autogen_tools(),)

Tools exposed by both adapters

ToolInputChecks
physics_text_checkfree text with quantitiesunit consistency, limits, probabilities
physics_quantity_checkvalue + unitone quantity against physical law
robotics_data_checkJSON recordquaternions, timestamps, NaN/Inf, units

Tests

bash
pip install -e ".[dev]"pytest tests/ -q

License

MIT

來源:README.md,提交 5e32d2f

工具

0
SourceWeft 曾在隔離沙箱中以無憑證方式啟動該軟體包一次,以列出其工具,但未能完成:該軟體包類型無法在沙箱中執行。

版本歷史

1
  1. v1.0.1最新Nov 6, 2026

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

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

  • 已宣告認證方式10 分

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

  • 已列出工具15 分

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

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

其他 Check 整合