rokid-pluginbridge-plugin-sdk (Python)
Official Python SDK for building PluginBridge plugins.
The package name is fixed as rokid-pluginbridge-plugin-sdk.
Install the published package from PyPI (the repository development path is
python/).
Quick start
pip install rokid-pluginbridge-plugin-sdk
from pluginbridge import serve, PluginAdapter, Capability
class MyAdapter(PluginAdapter):
def id(self) -> str:
return "acme.tool"
def probe(self) -> Capability:
return Capability(
PluginID="acme.tool",
Available=True,
NativeVisibleInput=True,
CanForwardSync=True,
CanReverseSync=False,
CanWaitRun=False,
IntegrationMode="protocol-native",
VisibilitySurface="acme.tool",
)
# ... implement the rest
serve(MyAdapter())
See example/echo_adapter.py for a complete echo adapter.
That example is intentionally minimal and is not a finished mobile/glasses remote-conversation plugin by itself.
Important product rule:
- If your plugin is meant to appear in the mobile / glasses app, it must do more than "accept one prompt".
- In practice that means
list_sessions,attach_session,subscribe, andwait_for_runare required, and approval handling is required whenever the native application has approval semantics.
Step-by-step plugin development guide:
Manifest
id: acme.tool
integration_mode: protocol-native
transport: process
runtime_modes: [native]
default_runtime_mode: native
runtime_controls:
native: {}
command: ["python3", "echo_adapter.py"]
capabilities:
native_visible_input: true
Integration modes
protocol-native: 通过正式 gateway / app-server / 本地 API / CLI 协议接入。desktop-automation: 通过桌面 UI 自动化、CDP、深链、辅助功能接入。
manifest 里的 integration_mode 应和 probe() 返回的 integration_mode 保持一致。
每个 runtime 必须在 runtime_controls 中为模型、推理和权限选择唯一的 stable 或
interactive 实现;动态标准控件必须携带 semantic_kinds[],不能与稳定字段同时作为 owner。
Control detail confirmation
ControlSessionResult.details_confirmed 不是 manifest 配置或 capability,而是每次
control_session 返回对完整 detail 的权威性断言。稳定 Native RPC 可在只读结果已确认,
或变更 RPC 已成功后设置 True;Desktop/UI 自动化和仅 accepted 的异步命令保持
False,由 subscribe 后续收敛。多运行模式 Plugin 必须按本次执行路径判断。判定表与
误用风险见
SDK README。
Protocol
The SDK speaks JSON-over-newline-stdio. See the repository
README and conformance/ for the current contract.
JSON wire field names use snake_case and are locked. SDK-facing Python
dataclass field names remain idiomatic; conversion occurs only at the stdio boundary.
This SDK implements PluginBridge v4. Legacy PascalCase wire payloads are rejected.
Metadata
Release files for rokid-pluginbridge-plugin-sdk 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rokid_pluginbridge_plugin_sdk-0.1.1.tar.gz | 16.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rokid_pluginbridge_plugin_sdk-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 28.4 kB
Release files / rokid_pluginbridge_plugin_sdk-0.1.1.tar.gz
| Download URL | rokid_pluginbridge_plugin_sdk-0.1.1.tar.gz |
|---|---|
| Size | 16.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8be3148df42831388bdfd25af1dd05281d80c44bb1ad87845a69d83f09a7ea60
|
|
BLAKE2b-256 checksum How to use checksums |
f844be5550c3139aa8c07d1d9d6cd360e0124fac2de0da62b0ecb80fc2f27966
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.
Transparency logRelease files / rokid_pluginbridge_plugin_sdk-0.1.1-py3-none-any.whl
| Download URL | rokid_pluginbridge_plugin_sdk-0.1.1-py3-none-any.whl |
|---|---|
| Size | 12.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8db53d528f70902b2c61a0b8e033191a4296dc1b85c3d137b340b5db254764b8
|
|
BLAKE2b-256 checksum How to use checksums |
b9a9900083ec6923228e7f57bde069ed45911639a48981d699be00329d6e58e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.
Transparency log