solana-agent 14.0.1__py3-none-any.whl → 14.0.2__py3-none-any.whl

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.
@@ -9,9 +9,10 @@ import importlib.util
9
9
  from typing import AsyncGenerator, Dict, Any
10
10
 
11
11
  from solana_agent.factories.agent_factory import SolanaAgentFactory
12
+ from solana_agent.interfaces.client.client import SolanaAgent
12
13
 
13
14
 
14
- class SolanaAgent:
15
+ class SolanaAgent(SolanaAgent):
15
16
  """Simplified client interface for interacting with the agent system."""
16
17
 
17
18
  def __init__(self, config_path: str = None, config: Dict[str, Any] = None):
@@ -56,7 +57,7 @@ class SolanaAgent:
56
57
  user_id: str,
57
58
  page_num: int = 1,
58
59
  page_size: int = 20,
59
- sort_order: str = "asc" # "asc" for oldest-first, "desc" for newest-first
60
+ sort_order: str = "desc" # "asc" for oldest-first, "desc" for newest-first
60
61
  ) -> Dict[str, Any]:
61
62
  """
62
63
  Get paginated message history for a user.
@@ -0,0 +1,22 @@
1
+ from abc import ABC, abstractmethod
2
+ from typing import Any, AsyncGenerator, Dict
3
+
4
+
5
+ class SolanaAgent(ABC):
6
+ """Interface for the Solana agent system."""
7
+
8
+ @abstractmethod
9
+ async def process(self, user_id: str, message: str) -> AsyncGenerator[str, None]:
10
+ """Process a user message and return the response stream."""
11
+ pass
12
+
13
+ @abstractmethod
14
+ async def get_user_history(
15
+ self,
16
+ user_id: str,
17
+ page_num: int = 1,
18
+ page_size: int = 20,
19
+ sort_order: str = "desc" # "asc" for oldest-first, "desc" for newest-first
20
+ ) -> Dict[str, Any]:
21
+ """Get paginated message history for a user."""
22
+ pass
@@ -1,5 +1,5 @@
1
1
  from abc import ABC, abstractmethod
2
- from typing import AsyncGenerator
2
+ from typing import Any, AsyncGenerator, Dict
3
3
 
4
4
 
5
5
  class QueryService(ABC):
@@ -9,3 +9,14 @@ class QueryService(ABC):
9
9
  async def process(self, user_id: str, query: str) -> AsyncGenerator[str, None]:
10
10
  """Process a query from a user."""
11
11
  pass
12
+
13
+ @abstractmethod
14
+ async def get_user_history(
15
+ self,
16
+ user_id: str,
17
+ page_num: int = 1,
18
+ page_size: int = 20,
19
+ sort_order: str = "desc" # "asc" for oldest-first, "desc" for newest-first
20
+ ) -> Dict[str, Any]:
21
+ """Get paginated message history for a user."""
22
+ pass
@@ -90,7 +90,7 @@ class QueryService(QueryServiceInterface):
90
90
  user_id: str,
91
91
  page_num: int = 1,
92
92
  page_size: int = 20,
93
- sort_order: str = "asc" # "asc" for oldest-first, "desc" for newest-first
93
+ sort_order: str = "desc" # "asc" for oldest-first, "desc" for newest-first
94
94
  ) -> Dict[str, Any]:
95
95
  """Get paginated message history for a user.
96
96
 
@@ -146,12 +146,15 @@ class QueryService(QueryServiceInterface):
146
146
  # Format the results
147
147
  formatted_conversations = []
148
148
  for conv in conversations:
149
+ # Convert datetime to Unix timestamp (seconds since epoch)
150
+ timestamp = int(conv.get("timestamp").timestamp()
151
+ ) if conv.get("timestamp") else None
152
+
149
153
  formatted_conversations.append({
150
154
  "id": str(conv.get("_id")),
151
155
  "user_message": conv.get("user_message"),
152
156
  "assistant_message": conv.get("assistant_message"),
153
- "timestamp": conv.get("timestamp").isoformat()
154
- if conv.get("timestamp") else None
157
+ "timestamp": timestamp,
155
158
  })
156
159
 
157
160
  return {
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: solana-agent
3
- Version: 14.0.1
3
+ Version: 14.0.2
4
4
  Summary: The Future of Work
5
5
  License: MIT
6
6
  Keywords: ai,openai,ai agents,agi
@@ -3,20 +3,21 @@ solana_agent/adapters/__init__.py,sha256=tiEEuuy0NF3ngc_tGEcRTt71zVI58v3dYY9RvMr
3
3
  solana_agent/adapters/llm_adapter.py,sha256=-MmQL71JlNJeWr16a-qZ5OzTg1_69ewgAR9ZSwXpsbw,4326
4
4
  solana_agent/adapters/mongodb_adapter.py,sha256=zvcIZ61zx45cwfjMimXC2RV_D_s6sL5b2Dz6H3HCgFc,2456
5
5
  solana_agent/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- solana_agent/client/solana_agent.py,sha256=SDspEitajVL3q2C0zlVoeE6iGTC4vWSd5vcRLZFUhXg,2600
6
+ solana_agent/client/solana_agent.py,sha256=Y2SRwysvUsW3_NM8dqURdabkmS1lMsiAKrPG9dtSQ4g,2676
7
7
  solana_agent/domains/__init__.py,sha256=HiC94wVPRy-QDJSSRywCRrhrFfTBeHjfi5z-QfZv46U,168
8
8
  solana_agent/domains/agents.py,sha256=S8OKtkUQ7npl8bZrSH64TZuu5bnwnMYXXx3IbKvJOuU,3005
9
9
  solana_agent/domains/routing.py,sha256=UDlgTjUoC9xIBVYu_dnf9-KG_bBgdEXAv_UtDOrYo0w,650
10
10
  solana_agent/factories/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  solana_agent/factories/agent_factory.py,sha256=yjB3G8ItXFH3DaoRf1BB1acPnL84Pd2pbqz5W03-5Jc,5711
12
12
  solana_agent/interfaces/__init__.py,sha256=IQs1WIM1FeKP1-kY2FEfyhol_dB-I-VAe2rD6jrVF6k,355
13
+ solana_agent/interfaces/client/client.py,sha256=SouFRSUhXK5qN88ln5anHnStrZfPJyY2cr5sVRRDBEw,668
13
14
  solana_agent/interfaces/plugins/plugins.py,sha256=TMmTXwHhmkdJpIhgADfrpGGGk7PHP7O9Qi89uA26uMI,3013
14
15
  solana_agent/interfaces/providers/data_storage.py,sha256=Qjui9ISvX_NtOUPTUyjPMNxDoYRpml-aMG8DZy_Qxzc,1509
15
16
  solana_agent/interfaces/providers/llm.py,sha256=y4OFj2Wq4XicMxArWsYBHSp6cFe3BcK9sCemfyaWV_A,887
16
17
  solana_agent/interfaces/providers/memory.py,sha256=oNOH8WZXVW8assDigIWZAWiwkxbpDiKupxA2RB6tQvQ,1010
17
18
  solana_agent/interfaces/repositories/agent.py,sha256=HZL5q7DoOj-qK5IDSShAJnu4_A75OR0xgJD_2W6Zr6k,820
18
19
  solana_agent/interfaces/services/agent.py,sha256=JHUVsxAnOsopiNilU_zDBAhJfQT_BFrtOczDL2atoZo,1407
19
- solana_agent/interfaces/services/query.py,sha256=6SILNgSIkUsCnhn6EqdmsfPFTieawGbNJq56a3TzgSA,307
20
+ solana_agent/interfaces/services/query.py,sha256=w2ZeAX3j0n7dfh5EtesWqEy4YZ-cqjI3EmR3lyGnyJs,641
20
21
  solana_agent/interfaces/services/routing.py,sha256=tKMK97m6U5I__F406sm60az4QInGLX_N3knc_AbMZ80,452
21
22
  solana_agent/plugins/__init__.py,sha256=coZdgJKq1ExOaj6qB810i3rEhbjdVlrkN76ozt_Ojgo,193
22
23
  solana_agent/plugins/manager.py,sha256=GWwhfMBn9THwVn7biOvVa25GLthCA1ilWIoDkt5hXNI,5084
@@ -28,9 +29,9 @@ solana_agent/repositories/agent.py,sha256=7FTT3WvOaBacWme7d-qaOyqAlUhf9LVLXnIiPb
28
29
  solana_agent/repositories/memory.py,sha256=0wgoa2bXhpgdBgn9-i9G10PB1bMGYObxcoY9Newll40,4742
29
30
  solana_agent/services/__init__.py,sha256=ab_NXJmwYUCmCrCzuTlZ47bJZINW0Y0F5jfQ9OovidU,163
30
31
  solana_agent/services/agent.py,sha256=Z5b6aOuEAMw8CHjvQ__reG4b9P056hKquFisNzwzosg,11509
31
- solana_agent/services/query.py,sha256=N8UULC7RrxxX-mQUjporduKj7auKV899n2B9Amol_ss,7767
32
+ solana_agent/services/query.py,sha256=5_Py2t3p8oB4EVZZnbi7BezP9yigRe1EU9ZQ9AzQAog,7901
32
33
  solana_agent/services/routing.py,sha256=L3nZaMeX4ENYfHoc2KrOtfzhScCWfrXS5RRaUIJPwNY,4956
33
- solana_agent-14.0.1.dist-info/LICENSE,sha256=BnSRc-NSFuyF2s496l_4EyrwAP6YimvxWcjPiJ0J7g4,1057
34
- solana_agent-14.0.1.dist-info/METADATA,sha256=eBVNjRyMRyVa_LQrrby0MkV_mAcd2Ri-GgDn9bZ8-zg,4774
35
- solana_agent-14.0.1.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
36
- solana_agent-14.0.1.dist-info/RECORD,,
34
+ solana_agent-14.0.2.dist-info/LICENSE,sha256=BnSRc-NSFuyF2s496l_4EyrwAP6YimvxWcjPiJ0J7g4,1057
35
+ solana_agent-14.0.2.dist-info/METADATA,sha256=8RG-LRrM9BBzXlb-159YvTacsao2BW4c7MgrutTY2ps,4774
36
+ solana_agent-14.0.2.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
37
+ solana_agent-14.0.2.dist-info/RECORD,,