Skip to main content

千面平台插件作者侧 SDK 与 capability 真源模型。

Project description

tg-bot-plugin-sdk

tg-bot-plugin-sdk 是千面平台插件作者侧 Python API 的新真源。

当前阶段提供:

  • BasePluginPluginContext
  • CapabilityResultRuntimeCapabilityInvocation
  • concurrency_class 常量与 PluginCapabilitySpec
  • BackgroundTaskHandle / BackgroundTaskObserver
  • invoke_capability / event_capability 装饰器
  • CapabilityDeclarationError / PluginError
  • capability 真源投影与 externalize 输出脚本

作者侧 ABI 约束:

  • PluginCapabilitySpec.concurrency_class 固定为 sync_session / async_sidecar / async_terminal,默认 sync_session
  • RuntimeCapabilityInvocation 固定提供 message_thread_idsession_keysession_kind
  • PluginContext 不默认暴露 shard_idworker_idhost_id 这类内部调度字段

packages/sdk/scripts/externalize_capabilities.py 会生成 build/capabilities.externalize.json,后续由 packages/buildkit 消费并把 capability 投影刷新回 manifest.json

本地验证

  • 独立安装与导入验证:bash packages/sdk/scripts/check_package_install.sh
  • 单元测试:pytest -q packages/sdk/tests

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

tg_bot_plugin_sdk-0.2.1-py3-none-any.whl (35.5 kB view details)

Uploaded Python 3

File details

Details for the file tg_bot_plugin_sdk-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for tg_bot_plugin_sdk-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 97c261e78bcf304b2aa5d052c9e4e4975eb388fe60338b050f5bc3e5db02008a
MD5 7436b20c5cc7a7ff135b8d8e9950fa8d
BLAKE2b-256 9f152024d76493fd309f0ff1d2469f0216fe79b2a936b5bc0ab09a5e680e3468

See more details on using hashes here.

Provenance

The following attestation bundles were made for tg_bot_plugin_sdk-0.2.1-py3-none-any.whl:

Publisher: release-sdk.yml on Fire-Dragons/TG-BOT

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page