entari-plugin-server 0.7.0__tar.gz → 0.7.2__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.
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: entari-plugin-server
3
- Version: 0.7.0
3
+ Version: 0.7.2
4
4
  Summary: Entari plugin for running Satori Server
5
5
  Author-Email: RF-Tar-Railt <rf_tar_railt@qq.com>
6
6
  License: MIT
7
7
  Project-URL: homepage, https://github.com/ArcletProject/entari-plugin-server
8
8
  Project-URL: repository, https://github.com/ArcletProject/entari-plugin-server
9
9
  Requires-Python: >=3.10
10
- Requires-Dist: arclet-entari<0.19.0,>=0.18.0rc1
10
+ Requires-Dist: arclet-entari<0.19.0,>=0.18.0rc4
11
11
  Requires-Dist: satori-python-server<1.4.0,>=1.3.0
12
12
  Provides-Extra: fastapi
13
13
  Requires-Dist: fastapi>=0.116.1; extra == "fastapi"
@@ -1,12 +1,12 @@
1
1
  [project]
2
2
  name = "entari-plugin-server"
3
- version = "0.7.0"
3
+ version = "0.7.2"
4
4
  description = "Entari plugin for running Satori Server"
5
5
  authors = [
6
6
  { name = "RF-Tar-Railt", email = "rf_tar_railt@qq.com" },
7
7
  ]
8
8
  dependencies = [
9
- "arclet-entari<0.19.0,>=0.18.0rc1",
9
+ "arclet-entari<0.19.0,>=0.18.0rc4",
10
10
  "satori-python-server<1.4.0,>=1.3.0",
11
11
  ]
12
12
  requires-python = ">=3.10"
@@ -9,6 +9,7 @@ from arclet.entari.config.models.default import BasicConfModel
9
9
  from typing_extensions import TypeAlias
10
10
 
11
11
  from arclet.entari import Plugin, plugin
12
+ from arclet.entari.plugin import PluginRole
12
13
  from arclet.entari.config import EntariConfig
13
14
  from arclet.entari.config import config_model_validate
14
15
  from arclet.entari import logger as log_m
@@ -32,8 +33,9 @@ plg = Plugin.current()
32
33
  plugin.declare_static()
33
34
  plugin.metadata(
34
35
  "server",
36
+ PluginRole.LIBRARY,
35
37
  [{"name": "RF-Tar-Railt", "email": "rf_tar_railt@qq.com"}],
36
- "0.7.0",
38
+ "0.7.2",
37
39
  description="为 Entari 提供 Satori 服务器支持,基于此为 Entari 提供 ASGI 服务、适配器连接等功能",
38
40
  urls={
39
41
  "homepage": "https://github.com/ArcletProject/entari-plugin-server",
@@ -3,6 +3,7 @@ from io import BytesIO
3
3
  from arclet.entari import Entari
4
4
  from arclet.entari.logger import log
5
5
  from arclet.entari.session import EntariProtocol
6
+ from arclet.letoderea.utils import add_task
6
7
  from satori import Api, Event
7
8
  from satori.client import Account, ApiInfo
8
9
  from satori.exception import (
@@ -64,6 +65,7 @@ class DirectAdapterProtocol(EntariProtocol):
64
65
  req._form = _form
65
66
  else:
66
67
  req._json = params or {}
68
+
67
69
  resp = await self.server.http_server_handler(req)
68
70
  if isinstance(resp, JSONResponse):
69
71
  return decode(resp.body) # type: ignore
@@ -108,4 +110,4 @@ class DirectAdapterServer(Server):
108
110
  else:
109
111
  acc = app.accounts[login_sn].custom(protocol_cls=DirectAdapterProtocol)
110
112
  acc.protocol.server = self
111
- await app.handle_event(acc, event)
113
+ add_task(app.handle_event(acc, event))