cloudbrain-client 1.1.5__tar.gz → 1.1.7__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 (17) hide show
  1. {cloudbrain_client-1.1.5 → cloudbrain_client-1.1.7}/PKG-INFO +1 -1
  2. {cloudbrain_client-1.1.5 → cloudbrain_client-1.1.7}/cloudbrain_client/ai_websocket_client.py +8 -2
  3. {cloudbrain_client-1.1.5 → cloudbrain_client-1.1.7}/cloudbrain_client.egg-info/PKG-INFO +1 -1
  4. {cloudbrain_client-1.1.5 → cloudbrain_client-1.1.7}/pyproject.toml +1 -1
  5. {cloudbrain_client-1.1.5 → cloudbrain_client-1.1.7}/README.md +0 -0
  6. {cloudbrain_client-1.1.5 → cloudbrain_client-1.1.7}/cloudbrain_client/__init__.py +0 -0
  7. {cloudbrain_client-1.1.5 → cloudbrain_client-1.1.7}/cloudbrain_client/ai_conversation_helper.py +0 -0
  8. {cloudbrain_client-1.1.5 → cloudbrain_client-1.1.7}/cloudbrain_client/cloudbrain_client.py +0 -0
  9. {cloudbrain_client-1.1.5 → cloudbrain_client-1.1.7}/cloudbrain_client/cloudbrain_collaboration_helper.py +0 -0
  10. {cloudbrain_client-1.1.5 → cloudbrain_client-1.1.7}/cloudbrain_client/cloudbrain_quick.py +0 -0
  11. {cloudbrain_client-1.1.5 → cloudbrain_client-1.1.7}/cloudbrain_client/message_poller.py +0 -0
  12. {cloudbrain_client-1.1.5 → cloudbrain_client-1.1.7}/cloudbrain_client.egg-info/SOURCES.txt +0 -0
  13. {cloudbrain_client-1.1.5 → cloudbrain_client-1.1.7}/cloudbrain_client.egg-info/dependency_links.txt +0 -0
  14. {cloudbrain_client-1.1.5 → cloudbrain_client-1.1.7}/cloudbrain_client.egg-info/entry_points.txt +0 -0
  15. {cloudbrain_client-1.1.5 → cloudbrain_client-1.1.7}/cloudbrain_client.egg-info/requires.txt +0 -0
  16. {cloudbrain_client-1.1.5 → cloudbrain_client-1.1.7}/cloudbrain_client.egg-info/top_level.txt +0 -0
  17. {cloudbrain_client-1.1.5 → cloudbrain_client-1.1.7}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cloudbrain-client
3
- Version: 1.1.5
3
+ Version: 1.1.7
4
4
  Summary: CloudBrain Client - AI collaboration and communication system with AI-to-AI collaboration support and documentation access
5
5
  Author: CloudBrain Team
6
6
  License: MIT
@@ -22,7 +22,8 @@ class AIWebSocketClient:
22
22
  self.server_url = server_url
23
23
  self.ws = None
24
24
  self.connected = False
25
- self.message_handlers = []
25
+ self.message_handlers = {} # For request-response pattern
26
+ self.registered_handlers = [] # For general message handlers
26
27
  self.ai_name = ai_name
27
28
  self.ai_expertise = None
28
29
  self.ai_version = None
@@ -122,7 +123,7 @@ class AIWebSocketClient:
122
123
  print(f"⚠️ Unknown message type: {message_type}")
123
124
 
124
125
  # Call registered handlers
125
- for handler in self.message_handlers:
126
+ for handler in self.registered_handlers:
126
127
  try:
127
128
  await handler(data)
128
129
  except Exception as e:
@@ -248,6 +249,8 @@ class AIWebSocketClient:
248
249
  Returns:
249
250
  Response dictionary from server
250
251
  """
252
+ print(f"🔍 DEBUG send_request: type={request_type}, connected={self.connected}")
253
+
251
254
  if not self.connected:
252
255
  return {"error": "Not connected"}
253
256
 
@@ -259,6 +262,7 @@ class AIWebSocketClient:
259
262
 
260
263
  # Store the future in message handlers
261
264
  self.message_handlers[request_id] = response_future
265
+ print(f"🔍 DEBUG: Stored future for request_id={request_id}")
262
266
 
263
267
  # Send the request
264
268
  message = {
@@ -267,11 +271,13 @@ class AIWebSocketClient:
267
271
  **(data or {})
268
272
  }
269
273
 
274
+ print(f"🔍 DEBUG: Sending message: {json.dumps(message, indent=2)}")
270
275
  await self.ws.send(json.dumps(message))
271
276
 
272
277
  # Wait for response with timeout
273
278
  try:
274
279
  response = await asyncio.wait_for(response_future, timeout=10.0)
280
+ print(f"🔍 DEBUG: Received response: {json.dumps(response, indent=2)}")
275
281
  return response
276
282
  except asyncio.TimeoutError:
277
283
  return {"error": "Request timeout"}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cloudbrain-client
3
- Version: 1.1.5
3
+ Version: 1.1.7
4
4
  Summary: CloudBrain Client - AI collaboration and communication system with AI-to-AI collaboration support and documentation access
5
5
  Author: CloudBrain Team
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "cloudbrain-client"
7
- version = "1.1.5"
7
+ version = "1.1.7"
8
8
  description = "CloudBrain Client - AI collaboration and communication system with AI-to-AI collaboration support and documentation access"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"