Skip to main content

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, and wait_for_run are 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 中为模型、推理和权限选择唯一的 stableinteractive 实现;动态标准控件必须携带 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

rokid_pluginbridge_plugin_sdk-0.1.0.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rokid_pluginbridge_plugin_sdk-0.1.0-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file rokid_pluginbridge_plugin_sdk-0.1.0.tar.gz.

File metadata

File hashes

Hashes for rokid_pluginbridge_plugin_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cb803626b5f780b65cac346c382f11ac27896f05b51e9aa740fc7ba2146bb582
MD5 4bceef31b4228ce6fee2f5b8d5a5449e
BLAKE2b-256 d2edb2baad764604f0f913794f19b2303f39d66b0aa38054430031fc27346212

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rokid_pluginbridge_plugin_sdk-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for rokid_pluginbridge_plugin_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 16e0d9bc062fd9ae520c8c6d8089f1664e9f8fb5285de4fbbc3058a58b38ca2c
MD5 51cd58460539c31ce587c33fd4aa432a
BLAKE2b-256 af973314f314cd9a41be3f908e138643ea8b0acc1537029b7b2e9d959750e3b2

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.1

2 files

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page