The Semantic Handshake Engine

v1.0.0

Generates executable device control templates from API docs using local LLMs to enable cross-protocol IoT device management respecting closed ecosystem restr...

0· 139·0 current·0 all-time
byMilesXiang@spacesq

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for spacesq/s2-nlp-connector.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "The Semantic Handshake Engine" (spacesq/s2-nlp-connector) from ClawHub.
Skill page: https://clawhub.ai/spacesq/s2-nlp-connector
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install s2-nlp-connector

ClawHub CLI

Package manager switcher

npx clawhub@latest install s2-nlp-connector
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
medium confidence
Purpose & Capability
Name/description (dynamic API adapter generation for IoT) aligns with what the skill does: it prompts an LLM to produce JSON control templates and then stores the adapter. There are no unrelated requirements (no cloud credentials, no unrelated binaries).
Instruction Scope
SKILL.md and skill.py both instruct the agent to send the entire provided API/protocol doc to an LLM and expect a JSON adapter. This stays within the declared purpose, but the skill will forward any content you enter (including possible embedded keys or secrets) to the model; the SKILL does not redact secrets or limit what is included in the prompt.
Install Mechanism
There is no install spec and no packages downloaded. The skill is provided as a code file and runs with standard library modules only (urllib, json, os), which is proportionate to its functionality.
Credentials
The skill requires no environment variables, credentials, or config paths. It does create and write to a local directory (./s2_primitive_data) to persist adapters and mounts — this storage is explained by the skill's purpose but may contain sensitive data depending on what you input.
Persistence & Privilege
always:false and user-invocable:true (normal). The skill persists adapter/mount metadata to a local file (active_hardware_mounts.json) but does not change other skills or system-wide settings. It does not grant itself elevated platform privileges.
Assessment
This skill appears coherent with its stated purpose, but follow these precautions before installing/using it: 1) Only run it against a trusted local LLM endpoint — the code POSTS the raw prompt (including whatever API doc you provide) to http://localhost:1234/v1; if that endpoint is malicious or configured to forward requests, your inputs could leak. 2) Do not paste secrets (API keys, tokens, private endpoints) into the 'API/Protocol Doc' prompt — the skill will send those verbatim to the model and store the resulting adapter in ./s2_primitive_data/active_hardware_mounts.json. 3) Inspect and sandbox the skill (run in an isolated environment) if you are unsure about its provenance; the package metadata lists space2.world but source is unknown. 4) If you plan to integrate proprietary hardware, note the code enforces a 'BLOCKED_CLOSED_ECOSYSTEM' policy and will instruct you to use official bridges (Matter/Home Assistant) rather than attempting cryptographic bypass. 5) If you need higher assurance, request signed provenance or a reproducible build from the author; absent that, treat the unknown source as a reason for caution.

Like a lobster shell, security has layers — review code before you run it.

latestvk9734er0shkgnx8vqaaz4n1af1838qeh
139downloads
0stars
1versions
Updated 1mo ago
v1.0.0
MIT-0

🤝 S2-NLP-Connector: The Dynamic API Adapter Generator

动态 API 适配器生成引擎

v1.0.0 | Bilingual Edition (English / 中文)

Welcome to Phase 2 of the S2-Spatial-Primitive OS. This SKILL answers the industry's hardest question: How does an LLM actually control physical IoT devices across different protocols? 欢迎来到 S2 空间基元操作系统的第二阶段。本技能解答了行业的终极疑问:大模型到底如何跨协议控制物理物联网设备?

Instead of writing hardcoded Python drivers for every new smart bulb, this engine uses your local LLM to read the device's API documentation and dynamically generate an executable Declarative Control Template (声明式控制模板). 本引擎不再为每个新灯泡硬编码驱动程序,而是利用您的本地大模型阅读设备的 API 文档,并动态生成可执行的声明式控制模板


🏗️ The 3-Tier Integration Architecture / 三级集成架构

Included in the S2-SP-OS Whitepaper Addendum, this connector operates on three explicit tiers: 依据白皮书技术附录,本互联引擎基于三个明确的层级运行:

Tier 1: S2-Native (Zero-Compute)

Devices that broadcast the S2 JSON schema natively bypass the LLM and mount instantly. / 原生支持 S2 JSON 的设备,跳过大模型,毫秒级直接挂载。

Tier 2: Open APIs (Declarative Adapter Generation)

If a device has a REST API (e.g., POST /api/speed {"level": X}), the LLM reads the doc and outputs a template. The S2 execution engine will later inject real values into the {{s2_value}} placeholder to trigger the device. / 对于开放接口,大模型阅读文档并吐出模板。S2 执行引擎随后将真实数值注入 {{s2_value}} 占位符以触发设备。

Tier 3: Closed Ecosystems (Sovereignty Block)

If you attempt to handshake with a proprietary, encrypted protocol (like native Apple HomeKit or Miio without a bridge), the engine explicitly flags it as BLOCKED_CLOSED_ECOSYSTEM. We respect hardware cryptographic sovereignty and enforce the use of Matter/Home Assistant bridges. / 如果试图与专有加密协议直接握手,引擎将显式拒绝并触发合规阻断。我们尊重硬件密码学主权,并强制要求使用 Matter 中继网桥。


🚀 Usage Simulation / 使用模拟

Run the script and try these two test cases to see the architecture in action: 运行脚本并尝试以下两个测试用例,见证架构的威力:

Test Case A (Open API - Success):

  • Device: Smart Bulb X
  • API Doc: POST /v1/light/dim {"brightness": X} (Watch the LLM generate the JSON template mapping to element_1_light!)

Test Case B (Closed Protocol - Blocked):

  • Device: Apple HomePod
  • API Doc: Apple HomeKit Proprietary (Watch the engine legally block the direct connection and demand a bridge!)

Comments

Loading comments...