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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rokid_pluginbridge_plugin_sdk-0.1.0.tar.gz.
File metadata
- Download URL: rokid_pluginbridge_plugin_sdk-0.1.0.tar.gz
- Upload date:
- Size: 16.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb803626b5f780b65cac346c382f11ac27896f05b51e9aa740fc7ba2146bb582
|
|
| MD5 |
4bceef31b4228ce6fee2f5b8d5a5449e
|
|
| BLAKE2b-256 |
d2edb2baad764604f0f913794f19b2303f39d66b0aa38054430031fc27346212
|
Provenance
The following attestation bundles were made for rokid_pluginbridge_plugin_sdk-0.1.0.tar.gz:
Publisher:
publish.yml on Rokid-Prism/prism-plugin-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rokid_pluginbridge_plugin_sdk-0.1.0.tar.gz -
Subject digest:
cb803626b5f780b65cac346c382f11ac27896f05b51e9aa740fc7ba2146bb582 - Sigstore transparency entry: 2623942484
- Sigstore integration time:
-
Permalink:
Rokid-Prism/prism-plugin-sdk@ed39e11a85418afaed200410e0a39964002613e0 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Rokid-Prism
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ed39e11a85418afaed200410e0a39964002613e0 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file rokid_pluginbridge_plugin_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: rokid_pluginbridge_plugin_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16e0d9bc062fd9ae520c8c6d8089f1664e9f8fb5285de4fbbc3058a58b38ca2c
|
|
| MD5 |
51cd58460539c31ce587c33fd4aa432a
|
|
| BLAKE2b-256 |
af973314f314cd9a41be3f908e138643ea8b0acc1537029b7b2e9d959750e3b2
|
Provenance
The following attestation bundles were made for rokid_pluginbridge_plugin_sdk-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on Rokid-Prism/prism-plugin-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rokid_pluginbridge_plugin_sdk-0.1.0-py3-none-any.whl -
Subject digest:
16e0d9bc062fd9ae520c8c6d8089f1664e9f8fb5285de4fbbc3058a58b38ca2c - Sigstore transparency entry: 2623942519
- Sigstore integration time:
-
Permalink:
Rokid-Prism/prism-plugin-sdk@ed39e11a85418afaed200410e0a39964002613e0 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Rokid-Prism
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ed39e11a85418afaed200410e0a39964002613e0 -
Trigger Event:
workflow_dispatch
-
Statement type: