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.1.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.1-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for rokid_pluginbridge_plugin_sdk-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8be3148df42831388bdfd25af1dd05281d80c44bb1ad87845a69d83f09a7ea60
MD5 56a8caafd1922eaa71933dd00189338a
BLAKE2b-256 f844be5550c3139aa8c07d1d9d6cd360e0124fac2de0da62b0ecb80fc2f27966

See more details on using hashes here.

Provenance

The following attestation bundles were made for rokid_pluginbridge_plugin_sdk-0.1.1.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.1-py3-none-any.whl.

File metadata

File hashes

Hashes for rokid_pluginbridge_plugin_sdk-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8db53d528f70902b2c61a0b8e033191a4296dc1b85c3d137b340b5db254764b8
MD5 e5bc11b744f072693046d9945c2c1b01
BLAKE2b-256 b9a9900083ec6923228e7f57bde069ed45911639a48981d699be00329d6e58e8

See more details on using hashes here.

Provenance

The following attestation bundles were made for rokid_pluginbridge_plugin_sdk-0.1.1-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

This release

0.1.1 This release

2 files

0.1.0

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