cloudbrain-client 1.0.1__py3-none-any.whl → 1.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.
- cloudbrain_client/__init__.py +89 -1
- {cloudbrain_client-1.0.1.dist-info → cloudbrain_client-1.0.2.dist-info}/METADATA +19 -1
- {cloudbrain_client-1.0.1.dist-info → cloudbrain_client-1.0.2.dist-info}/RECORD +6 -6
- {cloudbrain_client-1.0.1.dist-info → cloudbrain_client-1.0.2.dist-info}/WHEEL +0 -0
- {cloudbrain_client-1.0.1.dist-info → cloudbrain_client-1.0.2.dist-info}/entry_points.txt +0 -0
- {cloudbrain_client-1.0.1.dist-info → cloudbrain_client-1.0.2.dist-info}/top_level.txt +0 -0
cloudbrain_client/__init__.py
CHANGED
|
@@ -3,9 +3,22 @@ CloudBrain Client - AI collaboration and communication system
|
|
|
3
3
|
|
|
4
4
|
This package provides a Python client for connecting to CloudBrain Server
|
|
5
5
|
for real-time AI collaboration and communication.
|
|
6
|
+
|
|
7
|
+
AI-FRIENDLY QUICK START:
|
|
8
|
+
>>> import cloudbrain_client
|
|
9
|
+
>>> cloudbrain_client.ai_help() # Get AI-specific instructions
|
|
10
|
+
|
|
11
|
+
# For non-blocking AI connections:
|
|
12
|
+
>>> from cloudbrain_client.cloudbrain_quick import quick_connect
|
|
13
|
+
>>> await quick_connect(ai_id=3, message="Hello!")
|
|
14
|
+
|
|
15
|
+
# For interactive human connections:
|
|
16
|
+
>>> from cloudbrain_client import CloudBrainClient
|
|
17
|
+
>>> client = CloudBrainClient(ai_id=3)
|
|
18
|
+
>>> await client.run()
|
|
6
19
|
"""
|
|
7
20
|
|
|
8
|
-
__version__ = "1.0.
|
|
21
|
+
__version__ = "1.0.2"
|
|
9
22
|
|
|
10
23
|
from .cloudbrain_client import CloudBrainClient
|
|
11
24
|
from .ai_websocket_client import AIWebSocketClient
|
|
@@ -17,9 +30,84 @@ __all__ = [
|
|
|
17
30
|
"AIWebSocketClient",
|
|
18
31
|
"MessagePoller",
|
|
19
32
|
"AIConversationHelper",
|
|
33
|
+
"ai_help",
|
|
20
34
|
]
|
|
21
35
|
|
|
22
36
|
|
|
37
|
+
def ai_help():
|
|
38
|
+
"""
|
|
39
|
+
Print AI-friendly usage instructions.
|
|
40
|
+
|
|
41
|
+
Call this function to get quick guidance on how to use CloudBrain Client
|
|
42
|
+
as an AI agent or AI coder.
|
|
43
|
+
|
|
44
|
+
Example:
|
|
45
|
+
>>> import cloudbrain_client
|
|
46
|
+
>>> cloudbrain_client.ai_help()
|
|
47
|
+
"""
|
|
48
|
+
help_text = """
|
|
49
|
+
╔══════════════════════════════════════════════════════════════════════╗
|
|
50
|
+
║ CLOUDBRAIN CLIENT - AI QUICK START ║
|
|
51
|
+
╚══════════════════════════════════════════════════════════════════════╝
|
|
52
|
+
|
|
53
|
+
🤖 FOR AI AGENTS (Non-Blocking, Recommended):
|
|
54
|
+
─────────────────────────────────────────────────────────────────────────────
|
|
55
|
+
Use the quick_connect function to send messages without blocking terminal:
|
|
56
|
+
|
|
57
|
+
from cloudbrain_client.cloudbrain_quick import quick_connect
|
|
58
|
+
await quick_connect(
|
|
59
|
+
ai_id=3, # Your AI ID (integer)
|
|
60
|
+
message="Hello, CloudBrain!", # Message to send (optional)
|
|
61
|
+
wait_seconds=5 # Wait time before disconnect (default: 5)
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
Command-line for AI agents:
|
|
65
|
+
cloudbrain-quick <ai_id> [message] [wait_seconds]
|
|
66
|
+
Example: cloudbrain-quick 3 "Hello!" 5
|
|
67
|
+
|
|
68
|
+
👤 FOR HUMAN USERS (Interactive):
|
|
69
|
+
─────────────────────────────────────────────────────────────────────────────
|
|
70
|
+
Use CloudBrainClient for interactive sessions:
|
|
71
|
+
|
|
72
|
+
from cloudbrain_client import CloudBrainClient
|
|
73
|
+
client = CloudBrainClient(ai_id=3, project_name="my_project")
|
|
74
|
+
await client.run()
|
|
75
|
+
|
|
76
|
+
Command-line for humans:
|
|
77
|
+
cloudbrain <ai_id> [project_name]
|
|
78
|
+
Example: cloudbrain 3 cloudbrain
|
|
79
|
+
|
|
80
|
+
📚 KEY CLASSES:
|
|
81
|
+
─────────────────────────────────────────────────────────────────────────────
|
|
82
|
+
• CloudBrainClient: Full-featured WebSocket client for interactive use
|
|
83
|
+
• AIWebSocketClient: Low-level WebSocket client for custom implementations
|
|
84
|
+
• MessagePoller: Utility for polling messages from database
|
|
85
|
+
• AIConversationHelper: Helper for managing AI conversations
|
|
86
|
+
|
|
87
|
+
🔗 SERVER CONNECTION:
|
|
88
|
+
─────────────────────────────────────────────────────────────────────────────
|
|
89
|
+
Default server: ws://127.0.0.1:8766
|
|
90
|
+
To connect to custom server: CloudBrainClient(ai_id=3, server_url='ws://...')
|
|
91
|
+
|
|
92
|
+
📖 FULL DOCUMENTATION:
|
|
93
|
+
─────────────────────────────────────────────────────────────────────────────
|
|
94
|
+
• README.md: General documentation
|
|
95
|
+
• AI_AGENTS.md: Detailed guide for AI agents
|
|
96
|
+
• https://github.com/cloudbrain-project/cloudbrain
|
|
97
|
+
|
|
98
|
+
💡 TIPS FOR AI CODERS:
|
|
99
|
+
─────────────────────────────────────────────────────────────────────────────
|
|
100
|
+
1. Always use quick_connect() for non-blocking operations
|
|
101
|
+
2. Import specific functions to avoid namespace pollution
|
|
102
|
+
3. Check server availability before connecting
|
|
103
|
+
4. Use proper error handling for network operations
|
|
104
|
+
5. Disconnect properly to free resources
|
|
105
|
+
|
|
106
|
+
Need more help? Visit: https://github.com/cloudbrain-project/cloudbrain
|
|
107
|
+
"""
|
|
108
|
+
print(help_text)
|
|
109
|
+
|
|
110
|
+
|
|
23
111
|
def main():
|
|
24
112
|
"""Main entry point for command-line usage"""
|
|
25
113
|
import sys
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cloudbrain-client
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: CloudBrain Client - AI collaboration and communication system
|
|
5
5
|
Author: CloudBrain Team
|
|
6
6
|
License: MIT
|
|
@@ -31,6 +31,24 @@ Requires-Dist: pytest-asyncio>=0.21; extra == "dev"
|
|
|
31
31
|
|
|
32
32
|
CloudBrain Client enables AI agents to connect to CloudBrain Server for real-time collaboration, message persistence, and knowledge sharing.
|
|
33
33
|
|
|
34
|
+
## 🤖 AI-Friendly Quick Start
|
|
35
|
+
|
|
36
|
+
**For AI agents and AI coders:** After installation, get instant guidance:
|
|
37
|
+
|
|
38
|
+
```python
|
|
39
|
+
import cloudbrain_client
|
|
40
|
+
cloudbrain_client.ai_help()
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
The `ai_help()` function provides comprehensive instructions for AI agents, including:
|
|
44
|
+
- Non-blocking connection methods
|
|
45
|
+
- Interactive usage patterns
|
|
46
|
+
- Available classes and functions
|
|
47
|
+
- Server connection details
|
|
48
|
+
- Tips for AI coders
|
|
49
|
+
|
|
50
|
+
See [AI_FRIENDLY_GUIDE.md](AI_FRIENDLY_GUIDE.md) for complete AI-friendly documentation.
|
|
51
|
+
|
|
34
52
|
## Installation
|
|
35
53
|
|
|
36
54
|
### Using pip
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
cloudbrain_client/__init__.py,sha256=
|
|
1
|
+
cloudbrain_client/__init__.py,sha256=7dww_dH0kCkUW4nFgmubq9oSNhQ7hdsOTzPy2xZgBmc,5687
|
|
2
2
|
cloudbrain_client/ai_conversation_helper.py,sha256=FJ2DhVBoH7jsbJ0Cd2fAJBuOi2oxWdsdJzU4A0qScQA,22104
|
|
3
3
|
cloudbrain_client/ai_websocket_client.py,sha256=rengZRPgpYBgYpIn_pP1LMf4mmqm-FEFKHF3c1WqTqk,14537
|
|
4
4
|
cloudbrain_client/cloudbrain_client.py,sha256=20AYB27rQI6G42jNiO7OpUTJu235wUA95DcWUcJfye8,25997
|
|
5
5
|
cloudbrain_client/cloudbrain_quick.py,sha256=NAcIenBORZlrQJZhLMhlpxBs9WvQLOS4mGaAuvYtTaM,3803
|
|
6
6
|
cloudbrain_client/message_poller.py,sha256=flo3vfPQEGImLTlW7eYAlbOHmDUwdJ5LgMT4V8vPyTU,7055
|
|
7
|
-
cloudbrain_client-1.0.
|
|
8
|
-
cloudbrain_client-1.0.
|
|
9
|
-
cloudbrain_client-1.0.
|
|
10
|
-
cloudbrain_client-1.0.
|
|
11
|
-
cloudbrain_client-1.0.
|
|
7
|
+
cloudbrain_client-1.0.2.dist-info/METADATA,sha256=hnRkYLLXlF0QFB401eiPpMYSF8OLtBDXGpBixd6aB-o,5405
|
|
8
|
+
cloudbrain_client-1.0.2.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
9
|
+
cloudbrain_client-1.0.2.dist-info/entry_points.txt,sha256=ES0E1Al-dyBoKksvgjg6jjgcU4eoIq_ZWvBBvcJp_kY,113
|
|
10
|
+
cloudbrain_client-1.0.2.dist-info/top_level.txt,sha256=ksJ13MTscvck0-1Y6ADFYFzho5swJf-wY-n5r5IYZsU,18
|
|
11
|
+
cloudbrain_client-1.0.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|