langbot-plugin 0.7.18__tar.gz → 0.7.19__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (409) hide show
  1. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/.gitignore +3 -0
  2. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/ARCHITECTURE.md +8 -0
  3. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/PKG-INFO +1 -1
  4. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/pyproject.toml +1 -1
  5. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/definition/components/manifest.py +3 -0
  6. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/proxies/runner/common.py +5 -1
  7. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/proxies/runner/resources.py +1 -0
  8. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/box/backend.py +30 -4
  9. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/box/client.py +5 -1
  10. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/box/runtime.py +71 -29
  11. langbot_plugin-0.7.19/src/langbot_plugin/cli/commands/buildplugin.py +41 -0
  12. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/cli/locales/en_US.py +1 -0
  13. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/cli/locales/es_ES.py +1 -0
  14. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/cli/locales/ja_JP.py +1 -0
  15. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/cli/locales/th_TH.py +1 -0
  16. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/cli/locales/vi_VN.py +1 -0
  17. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/cli/locales/zh_Hans.py +1 -0
  18. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/cli/locales/zh_Hant.py +1 -0
  19. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/cli/run/handler.py +151 -0
  20. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/entities/io/actions/enums.py +11 -0
  21. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/io/connection.py +16 -0
  22. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/io/handler.py +43 -12
  23. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/io/handlers/control.py +106 -6
  24. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/io/handlers/plugin.py +41 -0
  25. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/plugin/mgr.py +72 -0
  26. langbot_plugin-0.7.19/src/langbot_plugin/runtime/security.py +176 -0
  27. langbot_plugin-0.7.19/src/langbot_plugin/utils/git_sync.py +500 -0
  28. langbot_plugin-0.7.19/src/langbot_plugin/utils/packaging.py +345 -0
  29. langbot_plugin-0.7.19/src/langbot_plugin/utils/page_components.py +17 -0
  30. langbot_plugin-0.7.19/src/langbot_plugin/version.py +1 -0
  31. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/api/proxies/test_agent_run_api_proxy.py +13 -2
  32. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/api/proxies/test_langbot_api.py +8 -1
  33. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/api/proxies/test_reasoning_parameter.py +10 -2
  34. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/api/test_runner_public_apis.py +8 -1
  35. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/box/test_backend.py +63 -0
  36. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/box/test_client.py +2 -0
  37. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/box/test_runtime.py +174 -0
  38. langbot_plugin-0.7.19/tests/cli/test_cli_main.py +164 -0
  39. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/runtime/io/handlers/test_control_handler.py +121 -1
  40. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/runtime/io/handlers/test_plugin_handler.py +151 -0
  41. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/runtime/io/test_connections.py +69 -0
  42. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/runtime/io/test_handler.py +128 -0
  43. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/runtime/plugin/test_event_dispatch_real_worker.py +81 -7
  44. langbot_plugin-0.7.19/tests/runtime/test_security.py +62 -0
  45. langbot_plugin-0.7.19/tests/utils/test_cli_run_handler_packaging.py +134 -0
  46. langbot_plugin-0.7.19/tests/utils/test_git_sync.py +293 -0
  47. langbot_plugin-0.7.19/tests/utils/test_packaging_utils.py +206 -0
  48. langbot_plugin-0.7.18/src/langbot_plugin/cli/commands/buildplugin.py +0 -178
  49. langbot_plugin-0.7.18/src/langbot_plugin/runtime/security.py +0 -97
  50. langbot_plugin-0.7.18/src/langbot_plugin/version.py +0 -1
  51. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/.github/workflows/box-docker.yml +0 -0
  52. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/.github/workflows/cla.yml +0 -0
  53. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/.github/workflows/publish-pypi.yaml +0 -0
  54. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/.github/workflows/publish.yml +0 -0
  55. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/.github/workflows/test.yml +0 -0
  56. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/.python-version +0 -0
  57. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/AGENTS.md +0 -0
  58. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/CLAUDE.md +0 -0
  59. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/CONTRIBUTING.md +0 -0
  60. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/LICENSE +0 -0
  61. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/README.md +0 -0
  62. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/README_CN.md +0 -0
  63. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/data/.env.example +0 -0
  64. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/docs/Message.md +0 -0
  65. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/docs/PluginPages.md +0 -0
  66. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/docs/agent-runner-interactions.md +0 -0
  67. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/docs/agent-runner-pluginization/PROTOCOL_V1.md +0 -0
  68. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/docs/agent-runner-pluginization/README.md +0 -0
  69. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/docs/agent-runner-pluginization/SDK_RUNTIME_PLAN.md +0 -0
  70. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/docs/certified-plugins.md +0 -0
  71. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/docs/communication/apis/lb2rt.md +0 -0
  72. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/docs/communication/runtime_plugin.md +0 -0
  73. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/docs/dependency-management.md +0 -0
  74. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/docs/langbot-plugin-social.png +0 -0
  75. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/docs/runner.md +0 -0
  76. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/docs/stateless-components.md +0 -0
  77. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/local_e2e/acceptance.json +0 -0
  78. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/local_e2e/registration_fanin.py +0 -0
  79. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/local_e2e/run_acceptance.py +0 -0
  80. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/mypy.ini +0 -0
  81. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/scripts/check_action_consistency.py +0 -0
  82. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/scripts/runtime_resource_probe.py +0 -0
  83. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/__init__.py +0 -0
  84. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/__init__.py +0 -0
  85. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/agent_tools/__init__.py +0 -0
  86. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/agent_tools/asset_gateway.py +0 -0
  87. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/agent_tools/daemon.py +0 -0
  88. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/agent_tools/decorators.py +0 -0
  89. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/agent_tools/external_tools.py +0 -0
  90. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/agent_tools/mcp_access.py +0 -0
  91. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/agent_tools/mcp_bridge.py +0 -0
  92. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/agent_tools/mcp_config.py +0 -0
  93. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/agent_tools/mcp_protocol.py +0 -0
  94. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/agent_tools/mcp_stdio.py +0 -0
  95. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/definition/__init__.py +0 -0
  96. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/definition/abstract/__init__.py +0 -0
  97. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/definition/abstract/platform/__init__.py +0 -0
  98. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/definition/abstract/platform/adapter.py +0 -0
  99. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/definition/abstract/platform/event_logger.py +0 -0
  100. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/definition/components/__init__.py +0 -0
  101. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/definition/components/base.py +0 -0
  102. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/definition/components/command/__init__.py +0 -0
  103. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/definition/components/command/command.py +0 -0
  104. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/definition/components/common/__init__.py +0 -0
  105. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/definition/components/common/event_listener.py +0 -0
  106. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/definition/components/knowledge_engine/__init__.py +0 -0
  107. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/definition/components/knowledge_engine/engine.py +0 -0
  108. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/definition/components/page/__init__.py +0 -0
  109. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/definition/components/parser/__init__.py +0 -0
  110. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/definition/components/parser/parser.py +0 -0
  111. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/definition/components/runner/__init__.py +0 -0
  112. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/definition/components/runner/runner.py +0 -0
  113. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/definition/components/tool/__init__.py +0 -0
  114. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/definition/components/tool/tool.py +0 -0
  115. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/definition/plugin.py +0 -0
  116. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/__init__.py +0 -0
  117. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/__init__.py +0 -0
  118. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/command/__init__.py +0 -0
  119. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/command/context.py +0 -0
  120. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/command/errors.py +0 -0
  121. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/pipeline/__init__.py +0 -0
  122. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/pipeline/query.py +0 -0
  123. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/platform/__init__.py +0 -0
  124. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/platform/entities.py +0 -0
  125. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/platform/errors.py +0 -0
  126. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/platform/events.py +0 -0
  127. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/platform/logger.py +0 -0
  128. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/platform/message.py +0 -0
  129. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/provider/__init__.py +0 -0
  130. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/provider/message.py +0 -0
  131. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/provider/prompt.py +0 -0
  132. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/provider/reasoning.py +0 -0
  133. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/provider/session.py +0 -0
  134. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/rag/__init__.py +0 -0
  135. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/rag/context.py +0 -0
  136. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/rag/enums.py +0 -0
  137. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/rag/errors.py +0 -0
  138. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/rag/models.py +0 -0
  139. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/resource/__init__.py +0 -0
  140. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/resource/tool.py +0 -0
  141. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/runner/__init__.py +0 -0
  142. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/runner/box.py +0 -0
  143. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/runner/capabilities.py +0 -0
  144. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/runner/compat.py +0 -0
  145. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/runner/context.py +0 -0
  146. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/runner/context_access.py +0 -0
  147. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/runner/delivery.py +0 -0
  148. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/runner/errors.py +0 -0
  149. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/runner/event.py +0 -0
  150. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/runner/input.py +0 -0
  151. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/runner/interaction.py +0 -0
  152. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/runner/manifest.py +0 -0
  153. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/runner/page_results.py +0 -0
  154. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/runner/permissions.py +0 -0
  155. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/runner/resources.py +0 -0
  156. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/runner/result.py +0 -0
  157. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/runner/run_ledger.py +0 -0
  158. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/runner/runtime.py +0 -0
  159. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/runner/runtime_registry.py +0 -0
  160. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/runner/state.py +0 -0
  161. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/runner/stats.py +0 -0
  162. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/runner/steering.py +0 -0
  163. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/runner/transcript.py +0 -0
  164. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/builtin/runner/trigger.py +0 -0
  165. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/context.py +0 -0
  166. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/events.py +0 -0
  167. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/entities/execution.py +0 -0
  168. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/proxies/__init__.py +0 -0
  169. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/proxies/base.py +0 -0
  170. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/proxies/event_context.py +0 -0
  171. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/proxies/execute_context.py +0 -0
  172. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/proxies/invocation.py +0 -0
  173. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/proxies/langbot_api.py +0 -0
  174. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/proxies/query_based_api.py +0 -0
  175. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/proxies/runner/__init__.py +0 -0
  176. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/proxies/runner/admin.py +0 -0
  177. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/proxies/runner/api.py +0 -0
  178. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/proxies/runner/box.py +0 -0
  179. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/proxies/runner/context.py +0 -0
  180. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/proxies/runner/ledger.py +0 -0
  181. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/proxies/runner/platform.py +0 -0
  182. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/proxies/runner/reply_stream.py +0 -0
  183. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/proxies/runner/state.py +0 -0
  184. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/api/proxies/runner/tracing.py +0 -0
  185. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/artifact.py +0 -0
  186. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/assets/__init__.py +0 -0
  187. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/assets/langbot-page-sdk.js +0 -0
  188. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/assets/templates/.env.example.example +0 -0
  189. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/assets/templates/.github/workflows/release.yml.example +0 -0
  190. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/assets/templates/.gitignore.example +0 -0
  191. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/assets/templates/.vscode/launch.json.example +0 -0
  192. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/assets/templates/README.md.example +0 -0
  193. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/assets/templates/__init__.py +0 -0
  194. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/assets/templates/assets/icon.svg.example +0 -0
  195. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/assets/templates/components/__init__.py +0 -0
  196. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/assets/templates/components/commands/__init__.py +0 -0
  197. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/assets/templates/components/commands/{cmd_name}.py.example +0 -0
  198. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/assets/templates/components/commands/{cmd_name}.yaml.example +0 -0
  199. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/assets/templates/components/event_listener/__init__.py +0 -0
  200. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/assets/templates/components/event_listener/default.py.example +0 -0
  201. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/assets/templates/components/event_listener/default.yaml.example +0 -0
  202. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/assets/templates/components/knowledge_engine/__init__.py +0 -0
  203. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/assets/templates/components/knowledge_engine/{knowledge_engine_name}.py.example +0 -0
  204. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/assets/templates/components/knowledge_engine/{knowledge_engine_name}.yaml.example +0 -0
  205. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/assets/templates/components/pages/{page_name}.html.example +0 -0
  206. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/assets/templates/components/pages/{page_name}.yaml.example +0 -0
  207. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/assets/templates/components/parser/__init__.py +0 -0
  208. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/assets/templates/components/parser/{parser_name}.py.example +0 -0
  209. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/assets/templates/components/parser/{parser_name}.yaml.example +0 -0
  210. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/assets/templates/components/runner/__init__.py +0 -0
  211. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/assets/templates/components/runner/{runner_name}.py.example +0 -0
  212. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/assets/templates/components/runner/{runner_name}.yaml.example +0 -0
  213. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/assets/templates/components/tools/__init__.py +0 -0
  214. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/assets/templates/components/tools/{tool_name}.py.example +0 -0
  215. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/assets/templates/components/tools/{tool_name}.yaml.example +0 -0
  216. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/assets/templates/main.py.example +0 -0
  217. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/assets/templates/manifest.yaml.example +0 -0
  218. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/assets/templates/readme/README_zh_Hans.md.example +0 -0
  219. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/assets/templates/requirements.txt.example +0 -0
  220. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/box/__init__.py +0 -0
  221. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/box/actions.py +0 -0
  222. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/box/e2b_backend.py +0 -0
  223. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/box/errors.py +0 -0
  224. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/box/host_backend.py +0 -0
  225. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/box/models.py +0 -0
  226. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/box/nsjail_backend.py +0 -0
  227. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/box/security.py +0 -0
  228. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/box/server.py +0 -0
  229. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/box/tenancy.py +0 -0
  230. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/certification.py +0 -0
  231. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/cli/__init__.py +0 -0
  232. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/cli/__main__.py +0 -0
  233. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/cli/commands/__init__.py +0 -0
  234. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/cli/commands/gencomponent.py +0 -0
  235. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/cli/commands/initplugin.py +0 -0
  236. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/cli/commands/login.py +0 -0
  237. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/cli/commands/logout.py +0 -0
  238. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/cli/commands/publish.py +0 -0
  239. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/cli/commands/runplugin.py +0 -0
  240. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/cli/gen/__init__.py +0 -0
  241. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/cli/gen/renderer.py +0 -0
  242. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/cli/i18n.py +0 -0
  243. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/cli/locales/__init__.py +0 -0
  244. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/cli/run/__init__.py +0 -0
  245. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/cli/run/controller.py +0 -0
  246. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/cli/run/hotreload.py +0 -0
  247. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/cli/utils/__init__.py +0 -0
  248. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/cli/utils/cloudsv.py +0 -0
  249. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/cli/utils/form.py +0 -0
  250. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/cli/utils/page_components.py +0 -0
  251. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/entities/__init__.py +0 -0
  252. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/entities/io/__init__.py +0 -0
  253. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/entities/io/actions/__init__.py +0 -0
  254. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/entities/io/context.py +0 -0
  255. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/entities/io/errors.py +0 -0
  256. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/entities/io/req.py +0 -0
  257. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/entities/io/resp.py +0 -0
  258. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/entities/marketplace.py +0 -0
  259. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/LICENSE +0 -0
  260. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/README.md +0 -0
  261. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/__init__.py +0 -0
  262. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/app.py +0 -0
  263. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/bounded_executor.py +0 -0
  264. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/context.py +0 -0
  265. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/event_loop_monitor.py +0 -0
  266. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/helper/__init__.py +0 -0
  267. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/helper/marketplace.py +0 -0
  268. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/helper/pkgmgr.py +0 -0
  269. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/io/__init__.py +0 -0
  270. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/io/connections/__init__.py +0 -0
  271. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/io/connections/stdio.py +0 -0
  272. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/io/connections/ws.py +0 -0
  273. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/io/controller.py +0 -0
  274. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/io/controllers/__init__.py +0 -0
  275. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/io/controllers/stdio/__init__.py +0 -0
  276. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/io/controllers/stdio/client.py +0 -0
  277. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/io/controllers/stdio/server.py +0 -0
  278. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/io/controllers/ws/__init__.py +0 -0
  279. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/io/controllers/ws/client.py +0 -0
  280. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/io/controllers/ws/server.py +0 -0
  281. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/io/handlers/__init__.py +0 -0
  282. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/ops_metrics.py +0 -0
  283. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/plugin/__init__.py +0 -0
  284. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/plugin/artifact.py +0 -0
  285. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/plugin/container.py +0 -0
  286. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/plugin/dependency_environment.py +0 -0
  287. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/plugin/logbuffer.py +0 -0
  288. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/plugin/restart_coordinator.py +0 -0
  289. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/plugin/runner_service.py +0 -0
  290. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/plugin/worker_launcher.py +0 -0
  291. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/plugin/worker_observability.py +0 -0
  292. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/plugin/worker_watchdog.py +0 -0
  293. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/runtime/settings.py +0 -0
  294. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/skill_store.py +0 -0
  295. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/storage.py +0 -0
  296. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/utils/__init__.py +0 -0
  297. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/utils/deadline.py +0 -0
  298. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/utils/discover/__init__.py +0 -0
  299. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/utils/discover/engine.py +0 -0
  300. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/utils/importutil.py +0 -0
  301. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/utils/log.py +0 -0
  302. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/utils/platform.py +0 -0
  303. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/src/langbot_plugin/workspace.py +0 -0
  304. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/__init__.py +0 -0
  305. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/api/definition/components/test_components.py +0 -0
  306. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/api/definition/components/test_imports.py +0 -0
  307. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/api/definition/test_manifest.py +0 -0
  308. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/api/definition/test_manifest_component_path.py +0 -0
  309. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/api/entities/builtin/runner/test_context_result.py +0 -0
  310. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/api/entities/builtin/runner/test_history_event_entities.py +0 -0
  311. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/api/entities/builtin/runner/test_interaction.py +0 -0
  312. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/api/entities/builtin/runner/test_run_ledger_entities.py +0 -0
  313. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/api/entities/builtin/test_command_context.py +0 -0
  314. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/api/entities/builtin/test_platform_logger.py +0 -0
  315. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/api/entities/builtin/test_provider_message.py +0 -0
  316. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/api/entities/builtin/test_rag_models.py +0 -0
  317. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/api/entities/test_context.py +0 -0
  318. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/api/entities/test_events.py +0 -0
  319. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/api/proxies/__init__.py +0 -0
  320. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/api/proxies/test_base.py +0 -0
  321. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/api/proxies/test_box_api.py +0 -0
  322. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/api/proxies/test_history_event_api_proxy.py +0 -0
  323. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/api/proxies/test_llm_stream_ownership.py +0 -0
  324. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/api/proxies/test_query_based_api.py +0 -0
  325. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/api/test_agent_tools_mcp_bridge.py +0 -0
  326. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/api/test_runner_handlers.py +0 -0
  327. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/api/test_runner_handlers_matrix.py +0 -0
  328. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/box/__init__.py +0 -0
  329. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/box/test_admission.py +0 -0
  330. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/box/test_artifact_cache_root.py +0 -0
  331. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/box/test_backend_selection.py +0 -0
  332. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/box/test_e2b_backend.py +0 -0
  333. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/box/test_host_backend.py +0 -0
  334. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/box/test_nsjail_backend.py +0 -0
  335. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/box/test_server.py +0 -0
  336. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/box/test_skill_store.py +0 -0
  337. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/box/test_storage_analysis.py +0 -0
  338. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/cli/run/test_controller.py +0 -0
  339. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/cli/run/test_hotreload.py +0 -0
  340. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/cli/run/test_runtime_handler.py +0 -0
  341. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/cli/test_buildplugin.py +0 -0
  342. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/cli/test_gencomponent.py +0 -0
  343. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/cli/test_i18n_form.py +0 -0
  344. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/cli/test_initplugin.py +0 -0
  345. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/cli/test_login.py +0 -0
  346. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/cli/test_logout_publish.py +0 -0
  347. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/cli/test_page_components.py +0 -0
  348. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/cli/test_renderer.py +0 -0
  349. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/cli/test_runner_usages.py +0 -0
  350. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/cli/test_runplugin.py +0 -0
  351. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/e2e/Dockerfile.box-socket +0 -0
  352. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/e2e/Dockerfile.box-socket.dockerignore +0 -0
  353. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/e2e/standalone_runtime_eba_probe.py +0 -0
  354. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/e2e/test_box_socket_mounts.py +0 -0
  355. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/e2e/test_run_mount_isolation.py +0 -0
  356. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/entities/io/test_dependency_errors.py +0 -0
  357. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/entities/io/test_protocol.py +0 -0
  358. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/fixtures/eba_event_probe_plugin/.gitignore +0 -0
  359. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/fixtures/eba_event_probe_plugin/assets/icon.svg +0 -0
  360. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/fixtures/eba_event_probe_plugin/components/event_listener/default.py +0 -0
  361. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/fixtures/eba_event_probe_plugin/components/event_listener/default.yaml +0 -0
  362. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/fixtures/eba_event_probe_plugin/main.py +0 -0
  363. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/fixtures/eba_event_probe_plugin/manifest.yaml +0 -0
  364. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/helpers/__init__.py +0 -0
  365. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/helpers/protocol.py +0 -0
  366. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/packaging/test_installed_cli_blackbox.py +0 -0
  367. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/packaging/test_release_metadata.py +0 -0
  368. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/runtime/helper/test_marketplace.py +0 -0
  369. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/runtime/helper/test_pkgmgr.py +0 -0
  370. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/runtime/io/handlers/test_import_contracts.py +0 -0
  371. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/runtime/io/handlers/test_legacy_file_chunk.py +0 -0
  372. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/runtime/io/test_action_consistency.py +0 -0
  373. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/runtime/io/test_controllers.py +0 -0
  374. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/runtime/io/test_heartbeat_admission.py +0 -0
  375. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/runtime/io/test_stdio_server.py +0 -0
  376. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/runtime/io/test_stream_flow_control.py +0 -0
  377. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/runtime/plugin/test_artifact_store.py +0 -0
  378. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/runtime/plugin/test_container.py +0 -0
  379. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/runtime/plugin/test_dependency_environment.py +0 -0
  380. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/runtime/plugin/test_exact_dify_real_worker.py +0 -0
  381. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/runtime/plugin/test_exact_legacy_sdk_compat.py +0 -0
  382. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/runtime/plugin/test_installation_manager.py +0 -0
  383. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/runtime/plugin/test_legacy_shadow.py +0 -0
  384. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/runtime/plugin/test_manager.py +0 -0
  385. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/runtime/plugin/test_mgr_runner.py +0 -0
  386. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/runtime/plugin/test_mode_resource_limits.py +0 -0
  387. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/runtime/plugin/test_restart_coordinator.py +0 -0
  388. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/runtime/plugin/test_shared_worker_subprocess.py +0 -0
  389. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/runtime/plugin/test_worker_launcher.py +0 -0
  390. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/runtime/plugin/test_worker_plugin_identity.py +0 -0
  391. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/runtime/plugin/test_workload_isolation.py +0 -0
  392. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/runtime/test_app.py +0 -0
  393. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/runtime/test_bounded_executor.py +0 -0
  394. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/runtime/test_event_loop_monitor.py +0 -0
  395. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/runtime/test_ops_metrics.py +0 -0
  396. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/runtime/test_pull_api_handlers.py +0 -0
  397. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/test_artifact_materialization.py +0 -0
  398. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/test_certification.py +0 -0
  399. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/test_log.py +0 -0
  400. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/test_message.py +0 -0
  401. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/test_plugin_logbuffer.py +0 -0
  402. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/test_skill_store.py +0 -0
  403. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/test_storage.py +0 -0
  404. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/test_worker_observability.py +0 -0
  405. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/test_worker_watchdog.py +0 -0
  406. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/utils/test_deadline.py +0 -0
  407. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/utils/test_discovery.py +0 -0
  408. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/utils/test_importutil.py +0 -0
  409. {langbot_plugin-0.7.18 → langbot_plugin-0.7.19}/tests/utils/test_platform.py +0 -0
@@ -178,3 +178,6 @@ cython_debug/
178
178
  /debug/
179
179
  uv.lock
180
180
  src/.DS_Store
181
+
182
+ *.pid
183
+ data/plugin-runtime/
@@ -482,6 +482,14 @@ retire older sessions. Managed-process relay handshakes carry Workspace and
482
482
  generation in authenticated headers; an attached relay closes as soon as that
483
483
  generation becomes stale.
484
484
 
485
+ Run-bound tool calls propagate scoped cancellation through Plugin Runtime to Box
486
+ EXEC. Cancellation cleanup uses the original request scope and remains bounded
487
+ when cancellation repeats or the invocation is revoked.
488
+ Cancelling an active execution retires its sandbox, as a command timeout
489
+ does; persistent workspace files survive, but container-local files and managed
490
+ processes do not. Cancelling a queued execution leaves the active sandbox alone.
491
+ Failed cleanup keeps the session fenced until a later acquire/delete retries it.
492
+
485
493
  There is no supported `python -m langbot_plugin.box` entrypoint; use `lbp box`.
486
494
 
487
495
  ## Backend Selection
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: langbot-plugin
3
- Version: 0.7.18
3
+ Version: 0.7.19
4
4
  Summary: This package contains the SDK, CLI for building plugins for LangBot, plus the runtime for hosting LangBot plugins
5
5
  Project-URL: Homepage, https://langbot.app
6
6
  Project-URL: Repository, https://github.com/langbot-app/langbot-plugin-sdk
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "langbot-plugin"
3
- version = "0.7.18"
3
+ version = "0.7.19"
4
4
  description = "This package contains the SDK, CLI for building plugins for LangBot, plus the runtime for hosting LangBot plugins"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -90,6 +90,9 @@ class Metadata(pydantic.BaseModel):
90
90
  repository: typing.Optional[str] = None
91
91
  """仓库"""
92
92
 
93
+ license: typing.Optional[str] = None
94
+ """开源协议(SPDX 标识符,如 MIT / Apache-2.0)"""
95
+
93
96
  def __init__(self, **kwargs):
94
97
  super().__init__(**kwargs)
95
98
 
@@ -113,9 +113,13 @@ class _AgentRunHandlerAdapter:
113
113
  action: PluginToRuntimeAction,
114
114
  data: dict[str, Any],
115
115
  timeout: float = 15.0,
116
+ *,
117
+ cancel_peer_on_cancel: bool = False,
116
118
  ) -> dict[str, Any]:
117
119
  try:
118
- return await self._handler.call_action(action, data, timeout)
120
+ return await self._handler.call_action(
121
+ action, data, timeout, cancel_peer_on_cancel=cancel_peer_on_cancel
122
+ )
119
123
  except ActionCallError as error:
120
124
  raise _build_agent_api_exception(action, error) from error
121
125
  except (ActionCallTimeoutError, ConnectionClosedError) as error:
@@ -282,6 +282,7 @@ class AgentRunResourceAPIMixin:
282
282
  "parameters": parameters,
283
283
  },
284
284
  timeout,
285
+ cancel_peer_on_cancel=True,
285
286
  )
286
287
  return self._expect_key(resp, "result", PluginToRuntimeAction.CALL_TOOL)
287
288
 
@@ -383,10 +383,36 @@ class CLISandboxBackend(BaseSandboxBackend):
383
383
  timeout_sec=20,
384
384
  check=False,
385
385
  )
386
- if result.return_code == 0:
387
- root = self._artifact_roots.pop(session.backend_session_id, None)
388
- if root is not None:
389
- await bounded_executor.run_blocking_cleanup(shutil.rmtree, root)
386
+ if result.return_code != 0 or result.timed_out:
387
+ # A missing container is already stopped; daemon failures are not.
388
+ remaining = await self._run_command(
389
+ [
390
+ self.command,
391
+ "ps",
392
+ "-a",
393
+ "--filter",
394
+ f"name={session.backend_session_id}",
395
+ "--format",
396
+ "{{.Names}}",
397
+ ],
398
+ timeout_sec=5,
399
+ check=True,
400
+ )
401
+ if (
402
+ remaining.timed_out
403
+ or remaining.return_code != 0
404
+ or session.backend_session_id in remaining.stdout.splitlines()
405
+ ):
406
+ raise BoxError(
407
+ self._format_cli_error(
408
+ result.stderr
409
+ or f"Failed to remove container {session.backend_session_id}"
410
+ )
411
+ )
412
+ root = self._artifact_roots.get(session.backend_session_id)
413
+ if root is not None:
414
+ await bounded_executor.run_blocking_cleanup(shutil.rmtree, root)
415
+ self._artifact_roots.pop(session.backend_session_id, None)
390
416
 
391
417
  async def is_session_alive(self, session: BoxSessionInfo) -> bool:
392
418
  result = await self._run_command(
@@ -166,7 +166,11 @@ class ActionRPCBoxClient(BoxRuntimeClient):
166
166
  ) -> dict[str, Any]:
167
167
  try:
168
168
  return await self.handler.call_action(
169
- action, data, timeout=timeout, action_context=action_context
169
+ action,
170
+ data,
171
+ timeout=timeout,
172
+ action_context=action_context,
173
+ cancel_peer_on_cancel=action == LangBotToBoxAction.EXEC,
170
174
  )
171
175
  except BoxRuntimeUnavailableError:
172
176
  raise
@@ -1248,6 +1248,7 @@ done
1248
1248
 
1249
1249
  result: BoxExecutionResult | None = None
1250
1250
  cleanup_task: asyncio.Task[None] | None = None
1251
+ execution_cancelled = False
1251
1252
  try:
1252
1253
  async with session.lock:
1253
1254
  if session.closing:
@@ -1262,24 +1263,38 @@ done
1262
1263
  f"workdir={spec.workdir} "
1263
1264
  f"timeout_sec={spec.timeout_sec}"
1264
1265
  )
1265
- result = await (await self._get_backend()).exec(session.info, spec)
1266
+ backend = await self._get_backend()
1267
+ try:
1268
+ result = await backend.exec(session.info, spec)
1269
+ except asyncio.CancelledError:
1270
+ execution_cancelled = True
1271
+ session.closing = True
1272
+ raise
1273
+ if result.status == BoxExecutionStatus.TIMED_OUT:
1274
+ # Fence queued callers before releasing the execution lock.
1275
+ session.closing = True
1266
1276
  return result
1267
1277
  finally:
1268
1278
  async with self._lock:
1269
- now = dt.datetime.now(_UTC)
1270
- if spec.session_id in self._sessions:
1271
- self._sessions[spec.session_id].info.last_used_at = now
1272
-
1273
- remaining = self._active_exec_counts.get(spec.session_id, 0) - 1
1274
- if remaining > 0:
1275
- self._active_exec_counts[spec.session_id] = remaining
1276
- else:
1277
- self._active_exec_counts.pop(spec.session_id, None)
1278
-
1279
- if result is not None and result.status == BoxExecutionStatus.TIMED_OUT:
1280
- cleanup_task = self._drop_session_locked(spec.session_id)
1279
+ if self._sessions.get(spec.session_id) is session:
1280
+ session.info.last_used_at = dt.datetime.now(_UTC)
1281
+ remaining = self._active_exec_counts.get(spec.session_id, 0) - 1
1282
+ if remaining > 0:
1283
+ self._active_exec_counts[spec.session_id] = remaining
1284
+ else:
1285
+ self._active_exec_counts.pop(spec.session_id, None)
1286
+
1287
+ if execution_cancelled or (
1288
+ result is not None
1289
+ and result.status == BoxExecutionStatus.TIMED_OUT
1290
+ ):
1291
+ cleanup_task = self._drop_session_locked(spec.session_id)
1281
1292
  if cleanup_task is not None:
1282
- await self._wait_for_session_cleanup(spec.session_id, cleanup_task)
1293
+ try:
1294
+ await self._wait_for_session_cleanup(spec.session_id, cleanup_task)
1295
+ except Exception:
1296
+ if not execution_cancelled:
1297
+ raise
1283
1298
 
1284
1299
  def start_background_reaper(self) -> None:
1285
1300
  if self.session_ttl_sec <= 0 and not self.admission_required:
@@ -1812,7 +1827,9 @@ done
1812
1827
  cleanup_task = self._closing_session_tasks.get(spec.session_id)
1813
1828
  if cleanup_task is None:
1814
1829
  existing = self._sessions.get(spec.session_id)
1815
- if existing is not None:
1830
+ if existing is not None and existing.closing:
1831
+ cleanup_task = self._drop_session_locked(spec.session_id)
1832
+ elif existing is not None:
1816
1833
  self._assert_session_compatible(existing.info, spec)
1817
1834
  if (
1818
1835
  not backend.execution_scoped_mounts
@@ -2148,6 +2165,10 @@ done
2148
2165
  cleanup_task = asyncio.create_task(
2149
2166
  self._cleanup_session_resources(session_id, runtime_session, backend)
2150
2167
  )
2168
+ # Reaper-triggered tasks can have no waiter; cleanup logs their failures.
2169
+ cleanup_task.add_done_callback(
2170
+ lambda task: task.exception() if not task.cancelled() else None
2171
+ )
2151
2172
  self._closing_session_tasks[session_id] = cleanup_task
2152
2173
  return cleanup_task
2153
2174
 
@@ -2157,34 +2178,54 @@ done
2157
2178
  runtime_session: _RuntimeSession,
2158
2179
  backend: BaseSandboxBackend,
2159
2180
  ) -> None:
2181
+ cleaned_up = False
2160
2182
  try:
2161
2183
  async with runtime_session.lock:
2184
+ process_error: Exception | None = None
2162
2185
  for mp in list(runtime_session.managed_processes.values()):
2163
- await self._terminate_managed_process(mp)
2186
+ try:
2187
+ await self._terminate_managed_process(mp)
2188
+ except Exception as exc:
2189
+ process_error = exc
2190
+ self.logger.warning(
2191
+ f"Failed to terminate managed process in {session_id}: {exc}",
2192
+ exc_info=True,
2193
+ )
2194
+
2195
+ self.logger.info(
2196
+ "LangBot Box session cleanup: "
2197
+ f"session_id={session_id} "
2198
+ f"backend_session_id={runtime_session.info.backend_session_id} "
2199
+ f"backend={runtime_session.info.backend_name}"
2200
+ )
2201
+ await backend.stop_session(runtime_session.info)
2202
+ if process_error is not None:
2203
+ raise BoxError(
2204
+ f"Failed to terminate managed processes in session {session_id}"
2205
+ ) from process_error
2164
2206
  runtime_session.managed_processes.clear()
2165
2207
  self._managed_process_session_ids.discard(session_id)
2166
-
2167
- try:
2168
- self.logger.info(
2169
- "LangBot Box session cleanup: "
2170
- f"session_id={session_id} "
2171
- f"backend_session_id={runtime_session.info.backend_session_id} "
2172
- f"backend={runtime_session.info.backend_name}"
2173
- )
2174
- await backend.stop_session(runtime_session.info)
2175
- except Exception as exc:
2176
- self.logger.warning(
2177
- f"Failed to clean up box session {session_id}: {exc}"
2178
- )
2208
+ cleaned_up = True
2179
2209
  except Exception as exc:
2180
2210
  self.logger.warning(
2181
2211
  f"Failed to finalize box session cleanup {session_id}: {exc}",
2182
2212
  exc_info=True,
2183
2213
  )
2214
+ raise
2184
2215
  finally:
2185
2216
  current_task = asyncio.current_task()
2186
2217
  async with self._lock:
2187
2218
  if self._closing_session_tasks.get(session_id) is current_task:
2219
+ if not cleaned_up:
2220
+ # Retain the fence and resources for the next acquire/delete.
2221
+ self._sessions[session_id] = runtime_session
2222
+ if runtime_session.workspace_key is not None:
2223
+ self._session_ids_by_workspace.setdefault(
2224
+ runtime_session.workspace_key, set()
2225
+ ).add(session_id)
2226
+ self._sync_managed_process_session_index(
2227
+ session_id, runtime_session
2228
+ )
2188
2229
  self._closing_session_tasks.pop(session_id, None)
2189
2230
 
2190
2231
  async def _wait_for_session_cleanups(
@@ -2206,6 +2247,7 @@ done
2206
2247
  f"LangBot Box session cleanup task failed{label}: {exc}",
2207
2248
  exc_info=True,
2208
2249
  )
2250
+ raise BoxError(f"Failed to clean up box session{label}: {exc}") from exc
2209
2251
 
2210
2252
  def _assert_session_compatible(self, session: BoxSessionInfo, spec: BoxSpec):
2211
2253
  _COMPAT_FIELDS = (
@@ -0,0 +1,41 @@
1
+ from __future__ import annotations
2
+
3
+ import os
4
+
5
+ from langbot_plugin.cli.i18n import cli_print
6
+ from langbot_plugin.utils.packaging import (
7
+ build_plugin_package,
8
+ parse_gitignore,
9
+ should_ignore,
10
+ )
11
+
12
+ # Re-exported for backwards compatibility with callers/tests that imported the
13
+ # gitignore helpers from this module before they moved to utils.packaging.
14
+ __all__ = ["parse_gitignore", "should_ignore", "build_plugin_process"]
15
+
16
+
17
+ def build_plugin_process(output_dir: str) -> str | None:
18
+ """Build the plugin in the current directory into ``output_dir``.
19
+
20
+ Discovery errors (e.g. an invalid Runner manifest) intentionally propagate:
21
+ a build must fail loudly rather than emit a package that silently drops a
22
+ component. Only a missing manifest is reported as a soft no-op, matching the
23
+ historical CLI behaviour.
24
+ """
25
+
26
+ if not os.path.exists("manifest.yaml"):
27
+ cli_print("manifest_not_found")
28
+ return None
29
+
30
+ cli_print("building_plugin", output_dir)
31
+
32
+ os.makedirs(output_dir, exist_ok=True)
33
+
34
+ package_bytes, filename = build_plugin_package(os.getcwd())
35
+
36
+ zipfile_path = os.path.join(output_dir, filename)
37
+ with open(zipfile_path, "wb") as output_file:
38
+ output_file.write(package_bytes)
39
+
40
+ cli_print("plugin_built", zipfile_path)
41
+ return zipfile_path
@@ -32,6 +32,7 @@ messages = {
32
32
  "file_added": " - Added: {}",
33
33
  "file_add_error": " - Error adding {}: {}",
34
34
  "plugin_built": "Plugin built successfully: {}",
35
+ "plugin_build_error": "Failed to build plugin: {}",
35
36
  # Login
36
37
  "starting_login": "Starting LangBot CLI login process...",
37
38
  "generating_device_code": "Generating device code...",
@@ -32,6 +32,7 @@ messages = {
32
32
  "file_added": " - Agregado: {}",
33
33
  "file_add_error": " - Error al agregar {}: {}",
34
34
  "plugin_built": "Plugin compilado exitosamente: {}",
35
+ "plugin_build_error": "Error al compilar el plugin: {}",
35
36
  # Login
36
37
  "starting_login": "Iniciando proceso de inicio de sesión de LangBot CLI...",
37
38
  "generating_device_code": "Generando código de dispositivo...",
@@ -32,6 +32,7 @@ messages = {
32
32
  "file_added": " - 追加済み:{}",
33
33
  "file_add_error": " - ファイル {} の追加エラー:{}",
34
34
  "plugin_built": "プラグインビルドが完了しました:{}",
35
+ "plugin_build_error": "プラグインのビルドに失敗しました:{}",
35
36
  # ログイン
36
37
  "starting_login": "LangBot CLI ログイン処理を開始中...",
37
38
  "generating_device_code": "デバイスコードを生成中...",
@@ -32,6 +32,7 @@ messages = {
32
32
  "file_added": " - เพิ่มแล้ว: {}",
33
33
  "file_add_error": " - เกิดข้อผิดพลาดในการเพิ่ม {}: {}",
34
34
  "plugin_built": "บิลด์ปลั๊กอินสำเร็จ: {}",
35
+ "plugin_build_error": "บิลด์ปลั๊กอินล้มเหลว: {}",
35
36
  # Login
36
37
  "starting_login": "กำลังเริ่มกระบวนการเข้าสู่ระบบ LangBot CLI...",
37
38
  "generating_device_code": "กำลังสร้างรหัสอุปกรณ์...",
@@ -32,6 +32,7 @@ messages = {
32
32
  "file_added": " - Đã thêm: {}",
33
33
  "file_add_error": " - Lỗi khi thêm {}: {}",
34
34
  "plugin_built": "Build plugin thành công: {}",
35
+ "plugin_build_error": "Build plugin thất bại: {}",
35
36
  # Login
36
37
  "starting_login": "Đang bắt đầu quá trình đăng nhập LangBot CLI...",
37
38
  "generating_device_code": "Đang tạo mã thiết bị...",
@@ -32,6 +32,7 @@ messages = {
32
32
  "file_added": " - 已添加:{}",
33
33
  "file_add_error": " - 添加文件 {} 时出错:{}",
34
34
  "plugin_built": "插件构建成功:{}",
35
+ "plugin_build_error": "构建插件失败:{}",
35
36
  # 登录
36
37
  "starting_login": "正在启动 LangBot CLI 登录流程...",
37
38
  "generating_device_code": "正在生成设备代码...",
@@ -32,6 +32,7 @@ messages = {
32
32
  "file_added": " - 已新增:{}",
33
33
  "file_add_error": " - 新增檔案 {} 時出錯:{}",
34
34
  "plugin_built": "插件建置成功:{}",
35
+ "plugin_build_error": "建置插件失敗:{}",
35
36
  # 登入
36
37
  "starting_login": "正在啟動 LangBot CLI 登入流程...",
37
38
  "generating_device_code": "正在產生裝置代碼...",
@@ -1,6 +1,7 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  import asyncio
4
+ import base64
4
5
  import contextlib
5
6
  import os
6
7
  import mimetypes
@@ -34,6 +35,8 @@ from langbot_plugin.api.definition.components.page import (
34
35
  PageResponse,
35
36
  )
36
37
  from langbot_plugin.api.definition.components.parser.parser import Parser
38
+ from langbot_plugin.utils import git_sync as git_sync_util
39
+ from langbot_plugin.utils import packaging as packaging_util
37
40
  from langbot_plugin.api.entities.builtin.rag.context import RetrievalContext
38
41
  from langbot_plugin.api.entities.builtin.rag.models import (
39
42
  IngestionContext,
@@ -808,6 +811,154 @@ class PluginRuntimeHandler(Handler):
808
811
 
809
812
  return ActionResponse.success(result.model_dump(mode="json"))
810
813
 
814
+ # ========== Plugin source packaging / GitHub sync (upload flow) ==========
815
+ #
816
+ # These handlers run inside the plugin worker process, whose working
817
+ # directory *is* the plugin source tree. That makes this process the only
818
+ # component that can package the developer's live source and run git on
819
+ # it. The Runtime relays the request and LangBot orchestrates the upload.
820
+
821
+ def _manifest_overrides(data: dict[str, typing.Any]) -> dict[str, typing.Any]:
822
+ overrides = data.get("manifest_overrides")
823
+ return overrides if isinstance(overrides, dict) else {}
824
+
825
+ def _icon_extra_files(
826
+ overrides: dict[str, typing.Any],
827
+ ) -> tuple[dict[str, bytes], dict[str, typing.Any]]:
828
+ """Extract an uploaded base64 icon into an archive-file mapping.
829
+
830
+ Returns ``(extra_files, sanitized_overrides)``; ``icon_base64`` is
831
+ removed from the overrides so the manifest only carries the icon
832
+ path.
833
+ """
834
+
835
+ icon_base64 = overrides.get("icon_base64")
836
+ clean = {
837
+ key: value for key, value in overrides.items() if key != "icon_base64"
838
+ }
839
+ if not isinstance(icon_base64, str) or not icon_base64.strip():
840
+ return {}, clean
841
+
842
+ raw = icon_base64.strip()
843
+ if "," in raw and raw.split(",", 1)[0].startswith("data:"):
844
+ raw = raw.split(",", 1)[1]
845
+ try:
846
+ icon_bytes = base64.b64decode(raw, validate=True)
847
+ except Exception:
848
+ raise ValueError("Invalid plugin icon data")
849
+
850
+ # Bound the icon weight. 10MB raw is ~13.3MB base64, which stays
851
+ # under the 16MB single-message cap (and is mirrored by the page).
852
+ if len(icon_bytes) > 10 * 1024 * 1024:
853
+ raise ValueError("Plugin icon exceeds the 10MB limit")
854
+
855
+ content_type = ""
856
+ if isinstance(icon_base64, str) and icon_base64.startswith("data:"):
857
+ content_type = icon_base64[5:].split(";", 1)[0]
858
+ ext = {
859
+ "image/png": ".png",
860
+ "image/jpeg": ".jpg",
861
+ "image/jpg": ".jpg",
862
+ "image/gif": ".gif",
863
+ "image/webp": ".webp",
864
+ "image/svg+xml": ".svg",
865
+ }.get(content_type.lower(), ".png")
866
+
867
+ icon_path = f"assets/icon{ext}"
868
+ clean["icon"] = icon_path
869
+ return {icon_path: icon_bytes}, clean
870
+
871
+ @self.action(RuntimeToPluginAction.BUILD_PLUGIN_PACKAGE)
872
+ async def build_plugin_package(data: dict[str, typing.Any]) -> ActionResponse:
873
+ """Build a ``.lbpkg`` from the plugin working directory.
874
+
875
+ Publisher edits made on the upload page (label/description/version/
876
+ repository/icon) are written back into the plugin's own
877
+ ``manifest.yaml`` and assets first, so the on-disk configuration
878
+ matches what is packaged and published instead of only differing
879
+ inside the archive.
880
+ """
881
+
882
+ plugin_root = os.getcwd()
883
+ try:
884
+ extra_files, overrides = _icon_extra_files(_manifest_overrides(data))
885
+ await asyncio.to_thread(
886
+ packaging_util.write_manifest_overrides,
887
+ plugin_root,
888
+ overrides,
889
+ )
890
+ await asyncio.to_thread(
891
+ packaging_util.write_extra_files,
892
+ plugin_root,
893
+ extra_files,
894
+ )
895
+ package_bytes, filename = await asyncio.to_thread(
896
+ packaging_util.build_plugin_package,
897
+ plugin_root,
898
+ manifest_overrides=overrides,
899
+ extra_files=extra_files,
900
+ )
901
+ manifest = await asyncio.to_thread(
902
+ packaging_util.read_plugin_manifest_metadata,
903
+ plugin_root,
904
+ )
905
+ except ValueError as e:
906
+ return ActionResponse.error(str(e))
907
+ except FileNotFoundError:
908
+ return ActionResponse.error(
909
+ "Plugin manifest not found in the working directory"
910
+ )
911
+ except Exception as e: # noqa: BLE001 - surface a readable reason
912
+ return ActionResponse.error(f"Failed to build plugin package: {e}")
913
+
914
+ package_file_key = await self.send_file(package_bytes, "lbpkg")
915
+ metadata = manifest.get("metadata") or {}
916
+ return ActionResponse.success(
917
+ {
918
+ "package_file_key": package_file_key,
919
+ "filename": filename,
920
+ "size": len(package_bytes),
921
+ "metadata": metadata,
922
+ "manifest": manifest,
923
+ }
924
+ )
925
+
926
+ @self.action(RuntimeToPluginAction.GIT_SYNC_PLUGIN)
927
+ async def git_sync_plugin(data: dict[str, typing.Any]) -> ActionResponse:
928
+ """Commit and push the plugin working directory to GitHub."""
929
+
930
+ plugin_root = os.getcwd()
931
+ try:
932
+ extra_files, overrides = _icon_extra_files(_manifest_overrides(data))
933
+ # Persist edits (and any uploaded icon) so the synchronised
934
+ # repository records the same assets that are published.
935
+ await asyncio.to_thread(
936
+ packaging_util.write_manifest_overrides,
937
+ plugin_root,
938
+ overrides,
939
+ )
940
+ await asyncio.to_thread(
941
+ packaging_util.write_extra_files,
942
+ plugin_root,
943
+ extra_files,
944
+ )
945
+ result = await asyncio.to_thread(
946
+ git_sync_util.sync_plugin_to_github,
947
+ plugin_root,
948
+ repo_url=str(data.get("repo_url") or ""),
949
+ token=str(data.get("token") or ""),
950
+ branch=str(data.get("branch") or ""),
951
+ commit_message=str(data.get("commit_message") or ""),
952
+ )
953
+ except git_sync_util.GitSyncError as e:
954
+ return ActionResponse.error(str(e))
955
+ except ValueError as e:
956
+ return ActionResponse.error(str(e))
957
+ except Exception as e: # noqa: BLE001 - surface a readable reason
958
+ return ActionResponse.error(f"Git sync failed: {e}")
959
+
960
+ return ActionResponse.success(result.to_dict())
961
+
811
962
  def _uses_reserved_admission(self, req_data):
812
963
  return req_data.get(
813
964
  "action"
@@ -163,6 +163,13 @@ class RuntimeToPluginAction(ActionType):
163
163
 
164
164
  PAGE_API = "page_api"
165
165
 
166
+ # Plugin source packaging / GitHub synchronisation, used by the
167
+ # "upload a debug plugin to LangBot Space" flow. The plugin process owns
168
+ # its working directory, so it builds the package and performs git work
169
+ # on behalf of the Runtime.
170
+ BUILD_PLUGIN_PACKAGE = "build_plugin_package"
171
+ GIT_SYNC_PLUGIN = "git_sync_plugin"
172
+
166
173
 
167
174
  class LangBotToRuntimeAction(ActionType):
168
175
  """The action from langbot to runtime."""
@@ -225,6 +232,10 @@ class LangBotToRuntimeAction(ActionType):
225
232
  # Page API
226
233
  PAGE_API = "page_api"
227
234
 
235
+ # Plugin source packaging / GitHub synchronisation for the upload flow.
236
+ BUILD_PLUGIN_PACKAGE = "build_plugin_package"
237
+ GIT_SYNC_PLUGIN = "git_sync_plugin"
238
+
228
239
 
229
240
  class RuntimeToLangBotAction(ActionType):
230
241
  """The action from runtime to langbot."""
@@ -16,6 +16,22 @@ def split_utf8_chunks(message: str, max_bytes: int) -> list[str]:
16
16
  if max_bytes <= 0:
17
17
  raise ValueError("max_bytes must be positive")
18
18
  chunks: list[str] = []
19
+ if isinstance(max_bytes, int) and max_bytes >= 4:
20
+ try:
21
+ encoded = message.encode("utf-8")
22
+ except UnicodeEncodeError:
23
+ # Preserve the original per-character error for malformed text.
24
+ pass
25
+ else:
26
+ start = 0
27
+ while start < len(encoded):
28
+ end = min(start + max_bytes, len(encoded))
29
+ # Back up at most three continuation bytes to a code-point boundary.
30
+ while end < len(encoded) and encoded[end] & 0xC0 == 0x80:
31
+ end -= 1
32
+ chunks.append(encoded[start:end].decode("utf-8"))
33
+ start = end
34
+ return chunks
19
35
  current: list[str] = []
20
36
  current_size = 0
21
37
  for char in message: