Skip to main content

TG-BOT 插件作者侧 SDK 与 capability 真源模型。

Project description

tg-bot-plugin-sdk

tg-bot-plugin-sdk 是 TG-BOT 插件作者侧 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.0-py3-none-any.whl (34.3 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for tg_bot_plugin_sdk-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a84e63ab1555e7cdb2d086731681a0f3cfd0f4d0e97bfc6edeb2e239aa5aecbe
MD5 ac701bd969af59b467109dedc1ab147f
BLAKE2b-256 cb24fdae194be1b8f6f2c517b326c0d694bef4e6eee44a9984865d63109b0b28

See more details on using hashes here.

Provenance

The following attestation bundles were made for tg_bot_plugin_sdk-0.2.0-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