jarviscore-framework 0.3.0__py3-none-any.whl → 0.3.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.
- examples/cloud_deployment_example.py +3 -3
- examples/{listeneragent_cognitive_discovery_example.py → customagent_cognitive_discovery_example.py} +55 -14
- examples/customagent_distributed_example.py +140 -1
- examples/fastapi_integration_example.py +74 -11
- jarviscore/__init__.py +8 -11
- jarviscore/cli/smoketest.py +1 -1
- jarviscore/core/mesh.py +158 -0
- jarviscore/data/examples/cloud_deployment_example.py +3 -3
- jarviscore/data/examples/custom_profile_decorator.py +134 -0
- jarviscore/data/examples/custom_profile_wrap.py +168 -0
- jarviscore/data/examples/{listeneragent_cognitive_discovery_example.py → customagent_cognitive_discovery_example.py} +55 -14
- jarviscore/data/examples/customagent_distributed_example.py +140 -1
- jarviscore/data/examples/fastapi_integration_example.py +74 -11
- jarviscore/docs/API_REFERENCE.md +576 -47
- jarviscore/docs/CHANGELOG.md +131 -0
- jarviscore/docs/CONFIGURATION.md +1 -1
- jarviscore/docs/CUSTOMAGENT_GUIDE.md +591 -153
- jarviscore/docs/GETTING_STARTED.md +186 -329
- jarviscore/docs/TROUBLESHOOTING.md +1 -1
- jarviscore/docs/USER_GUIDE.md +292 -12
- jarviscore/integrations/fastapi.py +4 -4
- jarviscore/p2p/coordinator.py +36 -7
- jarviscore/p2p/messages.py +13 -0
- jarviscore/p2p/peer_client.py +380 -21
- jarviscore/p2p/peer_tool.py +17 -11
- jarviscore/profiles/__init__.py +2 -4
- jarviscore/profiles/customagent.py +302 -74
- jarviscore/testing/__init__.py +35 -0
- jarviscore/testing/mocks.py +578 -0
- {jarviscore_framework-0.3.0.dist-info → jarviscore_framework-0.3.2.dist-info}/METADATA +61 -46
- {jarviscore_framework-0.3.0.dist-info → jarviscore_framework-0.3.2.dist-info}/RECORD +42 -34
- tests/test_13_dx_improvements.py +37 -37
- tests/test_15_llm_cognitive_discovery.py +18 -18
- tests/test_16_unified_dx_flow.py +3 -3
- tests/test_17_session_context.py +489 -0
- tests/test_18_mesh_diagnostics.py +465 -0
- tests/test_19_async_requests.py +516 -0
- tests/test_20_load_balancing.py +546 -0
- tests/test_21_mock_testing.py +776 -0
- jarviscore/profiles/listeneragent.py +0 -292
- {jarviscore_framework-0.3.0.dist-info → jarviscore_framework-0.3.2.dist-info}/WHEEL +0 -0
- {jarviscore_framework-0.3.0.dist-info → jarviscore_framework-0.3.2.dist-info}/licenses/LICENSE +0 -0
- {jarviscore_framework-0.3.0.dist-info → jarviscore_framework-0.3.2.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: jarviscore-framework
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.2
|
|
4
4
|
Summary: Build autonomous AI agents in 3 lines of code. Production-ready orchestration with P2P mesh networking.
|
|
5
5
|
Author-email: Ruth Mutua <mutuandinda82@gmail.com>, Muyukani Kizito <muyukani@prescottdata.io>
|
|
6
6
|
Maintainer-email: Prescott Data <info@prescottdata.io>
|
|
@@ -26,6 +26,8 @@ Requires-Dist: pyzmq
|
|
|
26
26
|
Requires-Dist: python-dotenv>=1.0.0
|
|
27
27
|
Requires-Dist: aiohttp>=3.9.0
|
|
28
28
|
Requires-Dist: beautifulsoup4>=4.12.0
|
|
29
|
+
Requires-Dist: fastapi>=0.104.0
|
|
30
|
+
Requires-Dist: uvicorn>=0.29.0
|
|
29
31
|
Requires-Dist: anthropic>=0.18.0
|
|
30
32
|
Requires-Dist: openai>=1.0.0
|
|
31
33
|
Requires-Dist: google-genai>=1.0.0
|
|
@@ -47,13 +49,13 @@ Dynamic: license-file
|
|
|
47
49
|
|
|
48
50
|
## Features
|
|
49
51
|
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
-
|
|
52
|
+
- **AutoAgent** - LLM generates and executes code from natural language
|
|
53
|
+
- **CustomAgent** - Bring your own logic with P2P message handlers
|
|
54
|
+
- **P2P Mesh** - Agent discovery and communication via SWIM protocol
|
|
55
|
+
- **Workflow Orchestration** - Dependencies, context passing, multi-step pipelines
|
|
56
|
+
- **FastAPI Integration** - 3-line setup with JarvisLifespan
|
|
57
|
+
- **Cognitive Discovery** - LLM-ready peer descriptions for autonomous delegation
|
|
58
|
+
- **Cloud Deployment** - Self-registering agents for Docker/K8s
|
|
57
59
|
|
|
58
60
|
## Installation
|
|
59
61
|
|
|
@@ -97,7 +99,26 @@ results = await mesh.workflow("calc", [
|
|
|
97
99
|
print(results[0]["output"]) # 3628800
|
|
98
100
|
```
|
|
99
101
|
|
|
100
|
-
### CustomAgent (
|
|
102
|
+
### CustomAgent + FastAPI (Recommended)
|
|
103
|
+
|
|
104
|
+
```python
|
|
105
|
+
from fastapi import FastAPI
|
|
106
|
+
from jarviscore.profiles import CustomAgent
|
|
107
|
+
from jarviscore.integrations.fastapi import JarvisLifespan
|
|
108
|
+
|
|
109
|
+
class ProcessorAgent(CustomAgent):
|
|
110
|
+
role = "processor"
|
|
111
|
+
capabilities = ["processing"]
|
|
112
|
+
|
|
113
|
+
async def on_peer_request(self, msg):
|
|
114
|
+
# Handle requests from other agents
|
|
115
|
+
return {"result": msg.data.get("task", "").upper()}
|
|
116
|
+
|
|
117
|
+
# 3 lines to integrate with FastAPI
|
|
118
|
+
app = FastAPI(lifespan=JarvisLifespan(ProcessorAgent(), mode="p2p"))
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### CustomAgent (Workflow Mode)
|
|
101
122
|
|
|
102
123
|
```python
|
|
103
124
|
from jarviscore import Mesh
|
|
@@ -121,56 +142,50 @@ results = await mesh.workflow("demo", [
|
|
|
121
142
|
print(results[0]["output"]) # [2, 4, 6]
|
|
122
143
|
```
|
|
123
144
|
|
|
124
|
-
|
|
145
|
+
## Profiles
|
|
125
146
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
class ProcessorAgent(ListenerAgent):
|
|
132
|
-
role = "processor"
|
|
133
|
-
capabilities = ["processing"]
|
|
134
|
-
|
|
135
|
-
async def on_peer_request(self, msg):
|
|
136
|
-
# Handle requests from other agents
|
|
137
|
-
return {"result": msg.data.get("task", "").upper()}
|
|
138
|
-
|
|
139
|
-
# That's it - 3 lines to integrate with FastAPI
|
|
140
|
-
app = FastAPI(lifespan=JarvisLifespan(ProcessorAgent(), mode="p2p"))
|
|
141
|
-
```
|
|
147
|
+
| Profile | You Write | JarvisCore Handles |
|
|
148
|
+
|---------|-----------|-------------------|
|
|
149
|
+
| **AutoAgent** | System prompt | LLM code generation, sandboxed execution |
|
|
150
|
+
| **CustomAgent** | `on_peer_request()` and/or `execute_task()` | Mesh, discovery, routing, lifecycle |
|
|
142
151
|
|
|
143
152
|
## Execution Modes
|
|
144
153
|
|
|
145
|
-
| Mode |
|
|
146
|
-
|
|
147
|
-
| `autonomous` |
|
|
148
|
-
| `p2p` |
|
|
149
|
-
| `distributed` |
|
|
154
|
+
| Mode | Use Case |
|
|
155
|
+
|------|----------|
|
|
156
|
+
| `autonomous` | Single machine, LLM code generation (AutoAgent) |
|
|
157
|
+
| `p2p` | Agent-to-agent communication, swarms (CustomAgent) |
|
|
158
|
+
| `distributed` | Multi-node workflows + P2P (CustomAgent) |
|
|
150
159
|
|
|
151
|
-
##
|
|
160
|
+
## Framework Integration
|
|
152
161
|
|
|
153
|
-
**
|
|
154
|
-
- **ListenerAgent** - No more writing `run()` loops. Just implement `on_peer_request()` and `on_peer_notify()` handlers.
|
|
155
|
-
- **JarvisLifespan** - FastAPI integration reduced from ~100 lines to 3 lines.
|
|
156
|
-
- **Cognitive Discovery** - `peers.get_cognitive_context()` generates LLM-ready peer descriptions. No more hardcoded agent names in prompts.
|
|
162
|
+
JarvisCore is **async-first**. Best experience with async frameworks.
|
|
157
163
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
164
|
+
| Framework | Integration |
|
|
165
|
+
|-----------|-------------|
|
|
166
|
+
| **FastAPI** | `JarvisLifespan` (3 lines) |
|
|
167
|
+
| **aiohttp, Quart, Tornado** | Manual lifecycle (see docs) |
|
|
168
|
+
| **Flask, Django** | Background thread pattern (see docs) |
|
|
161
169
|
|
|
162
170
|
## Documentation
|
|
163
171
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
-
|
|
168
|
-
|
|
169
|
-
|
|
172
|
+
Documentation is included with the package:
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
python -c "import jarviscore; print(jarviscore.__path__[0] + '/docs')"
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
**Available guides:**
|
|
179
|
+
- `GETTING_STARTED.md` - 5-minute quickstart
|
|
180
|
+
- `CUSTOMAGENT_GUIDE.md` - CustomAgent patterns and framework integration
|
|
181
|
+
- `AUTOAGENT_GUIDE.md` - LLM-powered agents
|
|
182
|
+
- `USER_GUIDE.md` - Complete documentation
|
|
183
|
+
- `API_REFERENCE.md` - Detailed API docs
|
|
184
|
+
- `CONFIGURATION.md` - Settings reference
|
|
170
185
|
|
|
171
186
|
## Version
|
|
172
187
|
|
|
173
|
-
**0.3.
|
|
188
|
+
**0.3.2**
|
|
174
189
|
|
|
175
190
|
## License
|
|
176
191
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
examples/autoagent_distributed_example.py,sha256=yXxabyqPqPc-CTroTf-0GAl63ln3zPRMhMYBEi1Tpsc,8586
|
|
2
2
|
examples/calculator_agent_example.py,sha256=x7TrzE45WT_1DqwEnw8U3Fw56WpR9jBe3SLZz5vsKWc,2276
|
|
3
|
-
examples/cloud_deployment_example.py,sha256=
|
|
3
|
+
examples/cloud_deployment_example.py,sha256=R0WVtta6hi_yuhWVnnQ5X_wiztPSRLC2gfhoDMgUakw,5038
|
|
4
4
|
examples/custom_profile_decorator.py,sha256=4EAgqXrT9an1f5AQ3cEWAhPvI_EeXbQq7O8ByunXb_M,4099
|
|
5
5
|
examples/custom_profile_wrap.py,sha256=0NoQECVBEJOiL7Syr2QL73jnvj2XhGQZUhOvisqEQXw,5088
|
|
6
|
-
examples/
|
|
6
|
+
examples/customagent_cognitive_discovery_example.py,sha256=UfdQm9j11G38IfHPyBguQSmxODU7A5Niod95aydNb7s,14835
|
|
7
|
+
examples/customagent_distributed_example.py,sha256=RA-zvRjPq2YrGfKU6_dP4ZuEVwivKdA3NNPty6j_GmA,18951
|
|
7
8
|
examples/customagent_p2p_example.py,sha256=tWywC5abc1aYIyW2V6Xgr_XkjZdqzcOeLut3PnzUpB8,30669
|
|
8
|
-
examples/fastapi_integration_example.py,sha256=
|
|
9
|
-
examples/listeneragent_cognitive_discovery_example.py,sha256=ycPj2UzN9AMgUInca0CJZF0tZ8x7BMP8Xk1dsHhMG78,12964
|
|
9
|
+
examples/fastapi_integration_example.py,sha256=qWob72OD2BLf-SlpvwKjfzgyTZo97DL2ttp-Ox56280,24790
|
|
10
10
|
examples/multi_agent_workflow.py,sha256=Sygx3iEBM9WzorVMXqtiwn4rLYrW9BsxsiQSKceuzsE,4303
|
|
11
11
|
examples/research_agent_example.py,sha256=phJ5AHNnZ_pxCfiKvHoTp_IFwOAW7VD1fRNHlXvfgj4,2287
|
|
12
|
-
jarviscore/__init__.py,sha256=
|
|
12
|
+
jarviscore/__init__.py,sha256=MFMKSUN3tqYyUAXHKrHWp6GyptOeg_wbg7CgbEfqZwA,3402
|
|
13
13
|
jarviscore/adapter/__init__.py,sha256=fipq2XzgW3Us35tbFhs9B_ypoeEZeaP7bTsNPFFZVRk,1092
|
|
14
14
|
jarviscore/adapter/decorator.py,sha256=ZY-WCF16EvtQWkra_6HNBKdTOJ0G5yvrD5PYKa6bcqk,12040
|
|
15
15
|
jarviscore/adapter/wrapper.py,sha256=kU9nBiezU1M1dq9x5EjnAVHs_QjFFOFx7dR4TNyFdPk,9666
|
|
@@ -17,7 +17,7 @@ jarviscore/cli/__init__.py,sha256=OnpJ37xDcbh3jFhALLY1jimgp1mxlB1-VhsKhGS6TDY,12
|
|
|
17
17
|
jarviscore/cli/__main__.py,sha256=GuIqW9NKJ3n70ei54ItzrBYEVaWG5dAWGxdu87w7YgI,829
|
|
18
18
|
jarviscore/cli/check.py,sha256=eWvk6fkRsJ8hpgT60XUoAn_0nyzF0PFKRl65m7U9cxQ,13955
|
|
19
19
|
jarviscore/cli/scaffold.py,sha256=LZhqOSUVO7ZgBZnu2M2pUsRmTXtInYfOVJDaPkVE0Ck,4898
|
|
20
|
-
jarviscore/cli/smoketest.py,sha256=
|
|
20
|
+
jarviscore/cli/smoketest.py,sha256=lRmpBBgo4jWuf6wiEEl8n0rb6dYQnKZ-ud2kodPmoEM,13770
|
|
21
21
|
jarviscore/config/__init__.py,sha256=ZLjbRHSi5azaDyoSOFr9cQ65J5Fvi56xI-WHdczc204,178
|
|
22
22
|
jarviscore/config/settings.py,sha256=ueYpJAZxT1zoEPymzrn0OHAXZxQXBqSMs87VwolPdhg,3516
|
|
23
23
|
jarviscore/context/__init__.py,sha256=FdMfHUPs1vDRDaz2WR_F3IJi9k4FIVBvsGVKD5dJBrQ,1171
|
|
@@ -26,27 +26,29 @@ jarviscore/context/jarvis_context.py,sha256=6ai2TjDE5PRiBxF5lTdyBMoK3b8wv6cr0a6q
|
|
|
26
26
|
jarviscore/context/memory.py,sha256=taonyl24ZUe-NZ5VtvrxljNv6f_BebuH6VE7l0B9S7A,4442
|
|
27
27
|
jarviscore/core/__init__.py,sha256=30K2aqZckYTRZupn6X-mGV2QDSqWCgJ1cpN6Zk1gqlQ,177
|
|
28
28
|
jarviscore/core/agent.py,sha256=j76BGNwN6ATnjWujvBSz8Dvojz7W9AEzC7gxfs9xde4,15561
|
|
29
|
-
jarviscore/core/mesh.py,sha256=
|
|
29
|
+
jarviscore/core/mesh.py,sha256=wPgrppzIXtqzhUdaCqNL4OvLpSBCUiAwxzcs-19Bpzg,29407
|
|
30
30
|
jarviscore/core/profile.py,sha256=sTrGTxV9mAqbt5l3z0-BSNOeWzq8YDLR3mlaPFSgt1c,2190
|
|
31
31
|
jarviscore/data/.env.example,sha256=TCPdye7tYNDOEpcgaEuzUsQ-H7m9G6rsyzNZV9IYQ9s,5156
|
|
32
32
|
jarviscore/data/__init__.py,sha256=757nsqMkytYV0zXiM_mh3LqtGZZ1lgFuMzvaLrW51PM,151
|
|
33
33
|
jarviscore/data/examples/autoagent_distributed_example.py,sha256=yXxabyqPqPc-CTroTf-0GAl63ln3zPRMhMYBEi1Tpsc,8586
|
|
34
34
|
jarviscore/data/examples/calculator_agent_example.py,sha256=x7TrzE45WT_1DqwEnw8U3Fw56WpR9jBe3SLZz5vsKWc,2276
|
|
35
|
-
jarviscore/data/examples/cloud_deployment_example.py,sha256=
|
|
36
|
-
jarviscore/data/examples/
|
|
35
|
+
jarviscore/data/examples/cloud_deployment_example.py,sha256=R0WVtta6hi_yuhWVnnQ5X_wiztPSRLC2gfhoDMgUakw,5038
|
|
36
|
+
jarviscore/data/examples/custom_profile_decorator.py,sha256=4EAgqXrT9an1f5AQ3cEWAhPvI_EeXbQq7O8ByunXb_M,4099
|
|
37
|
+
jarviscore/data/examples/custom_profile_wrap.py,sha256=0NoQECVBEJOiL7Syr2QL73jnvj2XhGQZUhOvisqEQXw,5088
|
|
38
|
+
jarviscore/data/examples/customagent_cognitive_discovery_example.py,sha256=UfdQm9j11G38IfHPyBguQSmxODU7A5Niod95aydNb7s,14835
|
|
39
|
+
jarviscore/data/examples/customagent_distributed_example.py,sha256=RA-zvRjPq2YrGfKU6_dP4ZuEVwivKdA3NNPty6j_GmA,18951
|
|
37
40
|
jarviscore/data/examples/customagent_p2p_example.py,sha256=tWywC5abc1aYIyW2V6Xgr_XkjZdqzcOeLut3PnzUpB8,30669
|
|
38
|
-
jarviscore/data/examples/fastapi_integration_example.py,sha256=
|
|
39
|
-
jarviscore/data/examples/listeneragent_cognitive_discovery_example.py,sha256=ycPj2UzN9AMgUInca0CJZF0tZ8x7BMP8Xk1dsHhMG78,12964
|
|
41
|
+
jarviscore/data/examples/fastapi_integration_example.py,sha256=qWob72OD2BLf-SlpvwKjfzgyTZo97DL2ttp-Ox56280,24790
|
|
40
42
|
jarviscore/data/examples/multi_agent_workflow.py,sha256=Sygx3iEBM9WzorVMXqtiwn4rLYrW9BsxsiQSKceuzsE,4303
|
|
41
43
|
jarviscore/data/examples/research_agent_example.py,sha256=phJ5AHNnZ_pxCfiKvHoTp_IFwOAW7VD1fRNHlXvfgj4,2287
|
|
42
|
-
jarviscore/docs/API_REFERENCE.md,sha256=
|
|
44
|
+
jarviscore/docs/API_REFERENCE.md,sha256=duRyLZ9uDu4EgyTjOPThHpBdOp_l6K73yDJLtzXivdU,44404
|
|
43
45
|
jarviscore/docs/AUTOAGENT_GUIDE.md,sha256=ftm8dymihs3Y9PZTZmSD9xRhlRFygfTZKm59Mz8zNRA,4618
|
|
44
|
-
jarviscore/docs/CHANGELOG.md,sha256=
|
|
45
|
-
jarviscore/docs/CONFIGURATION.md,sha256=
|
|
46
|
-
jarviscore/docs/CUSTOMAGENT_GUIDE.md,sha256=
|
|
47
|
-
jarviscore/docs/GETTING_STARTED.md,sha256=
|
|
48
|
-
jarviscore/docs/TROUBLESHOOTING.md,sha256=
|
|
49
|
-
jarviscore/docs/USER_GUIDE.md,sha256=
|
|
46
|
+
jarviscore/docs/CHANGELOG.md,sha256=_NIU7VQHiTB5HLcxw-HyhoDGup8uP2uCTcl6Nw5jQeY,7707
|
|
47
|
+
jarviscore/docs/CONFIGURATION.md,sha256=QiP2RVmZMhbV46S9W0FPKQ2y8P97ZntORtwxH-xPfvc,14910
|
|
48
|
+
jarviscore/docs/CUSTOMAGENT_GUIDE.md,sha256=hMbCD2R7h8gEUwl9usCc7_dNTWRRJ6NoI84Kip3yPX4,82420
|
|
49
|
+
jarviscore/docs/GETTING_STARTED.md,sha256=w_t47M9kQcIG3N6tesMcjQgqpkV7PZOHAOXOSk8yGhE,15860
|
|
50
|
+
jarviscore/docs/TROUBLESHOOTING.md,sha256=iK4kz4x4AsChBPxeOvW6bzg5Gf1XwoZTQEEJYOivtr0,11544
|
|
51
|
+
jarviscore/docs/USER_GUIDE.md,sha256=uOYXABiOpr1e_4QM_8W2xIJtHbdZE6wOS87-U_srdTs,28426
|
|
50
52
|
jarviscore/execution/__init__.py,sha256=yDAMehMO2dVvdKjxVx7zQV2AaxySmvymA24QF3O9tlY,1754
|
|
51
53
|
jarviscore/execution/code_registry.py,sha256=C3_hAVXIeCG31qwSBUrmBBicmd2vnUrXJhJgj8MKlJw,9213
|
|
52
54
|
jarviscore/execution/generator.py,sha256=zY7IxxDu4xoifeuCGZZN8_l8zQCsB5eUO9HGIiLIttw,8696
|
|
@@ -56,7 +58,7 @@ jarviscore/execution/result_handler.py,sha256=7SKr-teFksqNgejhnZNrjAzKbtDXbOSV3T
|
|
|
56
58
|
jarviscore/execution/sandbox.py,sha256=IVkccce_WHDxXO6l8BCcuxAB5iueJfYtbryydoE972c,19981
|
|
57
59
|
jarviscore/execution/search.py,sha256=JSoT8vb_yT6_EKaAgUQDS8ONgFeKf6s8YlEeTn6FaWQ,9923
|
|
58
60
|
jarviscore/integrations/__init__.py,sha256=2Nfn0b_Cpw3Zf64ePYrKTk8PIVqjxK3YGHD4iIURE4A,437
|
|
59
|
-
jarviscore/integrations/fastapi.py,sha256=
|
|
61
|
+
jarviscore/integrations/fastapi.py,sha256=fEEHUStGougihJTpHmXmkOcBvRyGElVoMdz7RBq9oRw,9230
|
|
60
62
|
jarviscore/orchestration/__init__.py,sha256=Ia9GfEMWif0tN0Ju89q6M_x_BRw9FcQl5Rf99p8CIKU,386
|
|
61
63
|
jarviscore/orchestration/claimer.py,sha256=ekhHqhtxpi_USnPsIioFK6bA2nhH6jalulBkptYubVU,3106
|
|
62
64
|
jarviscore/orchestration/dependency.py,sha256=UtSSwSC2Ak5V5dYeZWJy3wZZuTE-Y-fcglkoIgNT_70,4377
|
|
@@ -64,17 +66,18 @@ jarviscore/orchestration/engine.py,sha256=Xh9Fn3aVY7iwj7cAXdHcN90ogOiVFJlyJeoKnJ
|
|
|
64
66
|
jarviscore/orchestration/status.py,sha256=XeKASMNQDwpJ6HpDw3m3eAAMNWsWCj4k9jrvMnLHPbo,2540
|
|
65
67
|
jarviscore/p2p/__init__.py,sha256=k1KkBnbb74jrfWKLiKRsMbepy6xBfQZOGzOlDKvslp0,927
|
|
66
68
|
jarviscore/p2p/broadcaster.py,sha256=Gaj0nCHDBQrVe4ob4GcaFSqnAaVe3ugEILslc5Mq1qE,14414
|
|
67
|
-
jarviscore/p2p/coordinator.py,sha256=
|
|
69
|
+
jarviscore/p2p/coordinator.py,sha256=MMvV7O30Ro0HSRzAT3mpo9p_0QmQoSJ8IJPRkMySOlo,31521
|
|
68
70
|
jarviscore/p2p/keepalive.py,sha256=it0SyXVBmujfE79thrap-A1UxZW01p9ENEIglIbQoAM,14988
|
|
69
|
-
jarviscore/p2p/messages.py,sha256=
|
|
70
|
-
jarviscore/p2p/peer_client.py,sha256=
|
|
71
|
-
jarviscore/p2p/peer_tool.py,sha256=
|
|
71
|
+
jarviscore/p2p/messages.py,sha256=ud856fEQQvZz0ngK8vVHKzJ5PlAZGZIRz3e_-DGyNQ4,3151
|
|
72
|
+
jarviscore/p2p/peer_client.py,sha256=ikyn5cPUKODBunEG1qFtd6b_9gaAXYS4Be0sAkR9UL4,44859
|
|
73
|
+
jarviscore/p2p/peer_tool.py,sha256=tMaMGbocGkluOfMEGQABPm37e8Tgr3_PAWZ0urGfFgw,9596
|
|
72
74
|
jarviscore/p2p/swim_manager.py,sha256=mu9clcJ22gqSOoeWlr4QW9b4vhRvD6QEAlTjAVVZvV4,11126
|
|
73
|
-
jarviscore/profiles/__init__.py,sha256=
|
|
75
|
+
jarviscore/profiles/__init__.py,sha256=gg2_T7ONl5se6rCSXLo-OlA3yOzmyHZPaNLzB6zjolE,328
|
|
74
76
|
jarviscore/profiles/autoagent.py,sha256=1nJAVf1oU9lLO47BP1xFGBDZtypXXkwKy6kZjtpdlX0,10424
|
|
75
|
-
jarviscore/profiles/customagent.py,sha256
|
|
76
|
-
jarviscore/
|
|
77
|
-
|
|
77
|
+
jarviscore/profiles/customagent.py,sha256=--oI_pgKFXprFJXAFD-7Ot9XSYsucr_1L87TOEsJ06g,14279
|
|
78
|
+
jarviscore/testing/__init__.py,sha256=LdPqVN9xfeTBlc4znGcb6kwcTmUdG4Xt7NT77Uu3qOI,869
|
|
79
|
+
jarviscore/testing/mocks.py,sha256=QO-9k5URcRTBRtGCe9v7U8rYT4UalpiQuIidLb51pOE,18949
|
|
80
|
+
jarviscore_framework-0.3.2.dist-info/licenses/LICENSE,sha256=SjsXanvmQJFYz_SVFa17O85-bKIa_aG99wrkPpWtypo,1101
|
|
78
81
|
test_logs/code_registry/functions/data_generator-558779ed_560ebc37.py,sha256=ua0Lueqe1mWCeMpKTMaumfPS-ZrWBFF_Zx6TU5QVjNo,132
|
|
79
82
|
test_logs/code_registry/functions/data_generator-5ed3609e_560ebc37.py,sha256=ua0Lueqe1mWCeMpKTMaumfPS-ZrWBFF_Zx6TU5QVjNo,132
|
|
80
83
|
test_logs/code_registry/functions/data_generator-66da0356_43970bb9.py,sha256=vOkjCOcfXHLJX2TkR3et9vWSwEhCmOn4DdJHMGfTMVY,733
|
|
@@ -125,10 +128,15 @@ tests/test_07_distributed_single_node.py,sha256=rFL4FmD5-4MVfgnQ5FwAlIm2FFEdmNOB
|
|
|
125
128
|
tests/test_08_distributed_multi_node.py,sha256=GkznK1f9aDEFF5_37WhBh553Ov6bw7IDOAvngo4848I,18039
|
|
126
129
|
tests/test_09_distributed_autoagent.py,sha256=sg5KpHdiYyqQpKAPLNrjkaH4Ur6N8rwYrhbgiCe_KH8,20328
|
|
127
130
|
tests/test_10_distributed_customagent.py,sha256=ZtmZYHPHvW6wPdt3lveixSPm6GO1Fm3v6TCdox6YI6c,29728
|
|
128
|
-
tests/test_13_dx_improvements.py,sha256=
|
|
131
|
+
tests/test_13_dx_improvements.py,sha256=t3xoWdRBq5o2j90i-kZCJYc9AwW9F0lsB-9Y4VhISiI,20301
|
|
129
132
|
tests/test_14_cloud_deployment.py,sha256=EaqJ9Cai9Ki61dhmeqNgMfEkWGnL8-aQg52CKZ6335I,16402
|
|
130
|
-
tests/test_15_llm_cognitive_discovery.py,sha256=
|
|
131
|
-
tests/test_16_unified_dx_flow.py,sha256=
|
|
133
|
+
tests/test_15_llm_cognitive_discovery.py,sha256=AvBtuIPgiI5Z4skpoEjBOP6XwJukAJy7nR08HP-Gl5M,26331
|
|
134
|
+
tests/test_16_unified_dx_flow.py,sha256=fRqIwhXfkioEY1Wri2vNuxUvLYDy4FvwdRkOqAnffXs,38249
|
|
135
|
+
tests/test_17_session_context.py,sha256=8fDdv8Ct3NNgoXgutp2Bk2CJMiN0oCMCqqUhBqyMYds,17018
|
|
136
|
+
tests/test_18_mesh_diagnostics.py,sha256=-8cQMdGC7kgi8Cmafe3odz0wlYbDw17CxsJFJEVNClU,14043
|
|
137
|
+
tests/test_19_async_requests.py,sha256=lCWTdynGHSloY73sH4UYw6xUOkeekYu_HqeUasVVipI,17381
|
|
138
|
+
tests/test_20_load_balancing.py,sha256=a321d8PmwuE5EFN7PBoXol7yJPDtz9IeyjLxuQS_QnM,19573
|
|
139
|
+
tests/test_21_mock_testing.py,sha256=JFvS6a7U8Tsz8GtGYIHBGp0jz_LUL71P6iqD8r_-N88,25469
|
|
132
140
|
tests/test_agent.py,sha256=qx9SFDTP4DlcQi6hV8y6LZyEYX6IB8D3VnM7fODnW9s,5182
|
|
133
141
|
tests/test_autoagent.py,sha256=_mzinLdQwskOn6a-yGqdfoOsqw2f52XSyTCmj8hLqlg,4628
|
|
134
142
|
tests/test_autoagent_day4.py,sha256=TTb0kSImF9stMsq4cMlkGahf9UBpYjoNXAkgnkKuuQA,4719
|
|
@@ -140,7 +148,7 @@ tests/test_llm_fallback.py,sha256=CNajpKkQ6MO503dRbgaP2cz9kXHwUGKo5381tHKTe4c,57
|
|
|
140
148
|
tests/test_mesh.py,sha256=JmAAvZaduQ8dHThFDBYgUnjiz8a3r4Kt1atvdH1JO5I,11857
|
|
141
149
|
tests/test_p2p_integration.py,sha256=F9B21eWlwRzSRphm2Kacs9nM1FgSbSzi6RSLPDvvt2U,10995
|
|
142
150
|
tests/test_remote_sandbox.py,sha256=80ebc0pWInauWnywsQ0VSzlk8OexSCgGL7BcJUCPkR8,3268
|
|
143
|
-
jarviscore_framework-0.3.
|
|
144
|
-
jarviscore_framework-0.3.
|
|
145
|
-
jarviscore_framework-0.3.
|
|
146
|
-
jarviscore_framework-0.3.
|
|
151
|
+
jarviscore_framework-0.3.2.dist-info/METADATA,sha256=AOWvJ2tgtGxED2sKHjX2AsNsfk-kbhqDS-gZ7KiWBcs,5876
|
|
152
|
+
jarviscore_framework-0.3.2.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
153
|
+
jarviscore_framework-0.3.2.dist-info/top_level.txt,sha256=aTco8nlqDftlvhB43Je0xXmb-Pw5qYgj-phawjHX4VY,36
|
|
154
|
+
jarviscore_framework-0.3.2.dist-info/RECORD,,
|
tests/test_13_dx_improvements.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"""
|
|
2
|
-
Test 13: DX Improvements - FastAPI Integration,
|
|
2
|
+
Test 13: DX Improvements - FastAPI Integration, CustomAgent Handlers, Cognitive Context
|
|
3
3
|
|
|
4
4
|
Tests the Developer Experience improvements:
|
|
5
5
|
- JarvisLifespan for FastAPI integration
|
|
6
|
-
-
|
|
6
|
+
- CustomAgent profile with P2P message handlers
|
|
7
7
|
- Cognitive context generation for LLM prompts
|
|
8
8
|
|
|
9
9
|
Run with: pytest tests/test_13_dx_improvements.py -v -s
|
|
@@ -127,22 +127,22 @@ class TestJarvisLifespan:
|
|
|
127
127
|
|
|
128
128
|
|
|
129
129
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
130
|
-
# TEST:
|
|
130
|
+
# TEST: CUSTOMAGENT P2P HANDLERS
|
|
131
131
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
132
132
|
|
|
133
|
-
class
|
|
134
|
-
"""Test
|
|
133
|
+
class TestCustomAgentHandlers:
|
|
134
|
+
"""Test CustomAgent P2P message handlers."""
|
|
135
135
|
|
|
136
136
|
@pytest.mark.asyncio
|
|
137
|
-
async def
|
|
138
|
-
"""Test
|
|
139
|
-
from jarviscore.profiles import
|
|
137
|
+
async def test_customagent_dispatches_request_to_handler(self):
|
|
138
|
+
"""Test CustomAgent dispatches REQUEST messages to on_peer_request."""
|
|
139
|
+
from jarviscore.profiles import CustomAgent
|
|
140
140
|
from jarviscore.p2p.messages import IncomingMessage, MessageType
|
|
141
141
|
|
|
142
142
|
request_received = False
|
|
143
143
|
request_data = None
|
|
144
144
|
|
|
145
|
-
class
|
|
145
|
+
class TestAgent(CustomAgent):
|
|
146
146
|
role = "listener"
|
|
147
147
|
capabilities = ["listening"]
|
|
148
148
|
|
|
@@ -152,7 +152,7 @@ class TestListenerAgent:
|
|
|
152
152
|
request_data = msg.data
|
|
153
153
|
return {"handled": True, "echo": msg.data.get("value")}
|
|
154
154
|
|
|
155
|
-
agent =
|
|
155
|
+
agent = TestAgent()
|
|
156
156
|
agent._logger = MagicMock()
|
|
157
157
|
|
|
158
158
|
# Mock peers
|
|
@@ -182,15 +182,15 @@ class TestListenerAgent:
|
|
|
182
182
|
assert call_args[0][1] == {"handled": True, "echo": 42}
|
|
183
183
|
|
|
184
184
|
@pytest.mark.asyncio
|
|
185
|
-
async def
|
|
186
|
-
"""Test
|
|
187
|
-
from jarviscore.profiles import
|
|
185
|
+
async def test_customagent_dispatches_notify_to_handler(self):
|
|
186
|
+
"""Test CustomAgent dispatches NOTIFY messages to on_peer_notify."""
|
|
187
|
+
from jarviscore.profiles import CustomAgent
|
|
188
188
|
from jarviscore.p2p.messages import IncomingMessage, MessageType
|
|
189
189
|
|
|
190
190
|
notify_received = False
|
|
191
191
|
notify_data = None
|
|
192
192
|
|
|
193
|
-
class
|
|
193
|
+
class TestAgent(CustomAgent):
|
|
194
194
|
role = "listener"
|
|
195
195
|
capabilities = ["listening"]
|
|
196
196
|
|
|
@@ -202,7 +202,7 @@ class TestListenerAgent:
|
|
|
202
202
|
notify_received = True
|
|
203
203
|
notify_data = msg.data
|
|
204
204
|
|
|
205
|
-
agent =
|
|
205
|
+
agent = TestAgent()
|
|
206
206
|
agent._logger = MagicMock()
|
|
207
207
|
|
|
208
208
|
# Create test notify message
|
|
@@ -221,12 +221,12 @@ class TestListenerAgent:
|
|
|
221
221
|
assert notify_data == {"event": "task_complete", "result": "success"}
|
|
222
222
|
|
|
223
223
|
@pytest.mark.asyncio
|
|
224
|
-
async def
|
|
225
|
-
"""Test
|
|
226
|
-
from jarviscore.profiles import
|
|
224
|
+
async def test_customagent_auto_respond_disabled(self):
|
|
225
|
+
"""Test CustomAgent respects auto_respond=False setting."""
|
|
226
|
+
from jarviscore.profiles import CustomAgent
|
|
227
227
|
from jarviscore.p2p.messages import IncomingMessage, MessageType
|
|
228
228
|
|
|
229
|
-
class
|
|
229
|
+
class TestAgent(CustomAgent):
|
|
230
230
|
role = "listener"
|
|
231
231
|
capabilities = ["listening"]
|
|
232
232
|
auto_respond = False # Disable auto response
|
|
@@ -234,7 +234,7 @@ class TestListenerAgent:
|
|
|
234
234
|
async def on_peer_request(self, msg):
|
|
235
235
|
return {"result": "this should not be sent automatically"}
|
|
236
236
|
|
|
237
|
-
agent =
|
|
237
|
+
agent = TestAgent()
|
|
238
238
|
agent._logger = MagicMock()
|
|
239
239
|
agent.peers = MagicMock()
|
|
240
240
|
agent.peers.respond = AsyncMock()
|
|
@@ -254,15 +254,15 @@ class TestListenerAgent:
|
|
|
254
254
|
agent.peers.respond.assert_not_called()
|
|
255
255
|
|
|
256
256
|
@pytest.mark.asyncio
|
|
257
|
-
async def
|
|
258
|
-
"""Test
|
|
259
|
-
from jarviscore.profiles import
|
|
257
|
+
async def test_customagent_error_handling(self):
|
|
258
|
+
"""Test CustomAgent calls on_error when handler raises exception."""
|
|
259
|
+
from jarviscore.profiles import CustomAgent
|
|
260
260
|
from jarviscore.p2p.messages import IncomingMessage, MessageType
|
|
261
261
|
|
|
262
262
|
error_received = None
|
|
263
263
|
error_msg = None
|
|
264
264
|
|
|
265
|
-
class
|
|
265
|
+
class TestAgent(CustomAgent):
|
|
266
266
|
role = "listener"
|
|
267
267
|
capabilities = ["listening"]
|
|
268
268
|
|
|
@@ -274,7 +274,7 @@ class TestListenerAgent:
|
|
|
274
274
|
error_received = error
|
|
275
275
|
error_msg = msg
|
|
276
276
|
|
|
277
|
-
agent =
|
|
277
|
+
agent = TestAgent()
|
|
278
278
|
agent._logger = MagicMock()
|
|
279
279
|
agent.peers = MagicMock()
|
|
280
280
|
|
|
@@ -295,11 +295,11 @@ class TestListenerAgent:
|
|
|
295
295
|
assert error_msg is not None
|
|
296
296
|
|
|
297
297
|
@pytest.mark.asyncio
|
|
298
|
-
async def
|
|
299
|
-
"""Test
|
|
300
|
-
from jarviscore.profiles import
|
|
298
|
+
async def test_customagent_workflow_compatibility(self):
|
|
299
|
+
"""Test CustomAgent.execute_task() delegates to on_peer_request."""
|
|
300
|
+
from jarviscore.profiles import CustomAgent
|
|
301
301
|
|
|
302
|
-
class
|
|
302
|
+
class TestAgent(CustomAgent):
|
|
303
303
|
role = "processor"
|
|
304
304
|
capabilities = ["processing"]
|
|
305
305
|
|
|
@@ -307,7 +307,7 @@ class TestListenerAgent:
|
|
|
307
307
|
task = msg.data.get("task", "")
|
|
308
308
|
return {"processed": task.upper()}
|
|
309
309
|
|
|
310
|
-
agent =
|
|
310
|
+
agent = TestAgent()
|
|
311
311
|
agent._logger = MagicMock()
|
|
312
312
|
|
|
313
313
|
result = await agent.execute_task({"task": "hello world"})
|
|
@@ -500,21 +500,21 @@ class TestCognitiveContext:
|
|
|
500
500
|
|
|
501
501
|
|
|
502
502
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
503
|
-
# TEST: INTEGRATION -
|
|
503
|
+
# TEST: INTEGRATION - CustomAgent + JarvisLifespan
|
|
504
504
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
505
505
|
|
|
506
|
-
class
|
|
507
|
-
"""Integration test for
|
|
506
|
+
class TestCustomAgentWithFastAPI:
|
|
507
|
+
"""Integration test for CustomAgent with FastAPI lifespan."""
|
|
508
508
|
|
|
509
509
|
@pytest.mark.asyncio
|
|
510
|
-
async def
|
|
511
|
-
"""Test
|
|
512
|
-
from jarviscore.profiles import
|
|
510
|
+
async def test_customagent_in_fastapi_lifespan(self):
|
|
511
|
+
"""Test CustomAgent works correctly with JarvisLifespan."""
|
|
512
|
+
from jarviscore.profiles import CustomAgent
|
|
513
513
|
from jarviscore.integrations.fastapi import JarvisLifespan
|
|
514
514
|
|
|
515
515
|
messages_received = []
|
|
516
516
|
|
|
517
|
-
class APIAgent(
|
|
517
|
+
class APIAgent(CustomAgent):
|
|
518
518
|
role = "api_processor"
|
|
519
519
|
capabilities = ["api_processing"]
|
|
520
520
|
listen_timeout = 0.1 # Fast timeout for test
|
|
@@ -201,19 +201,19 @@ class TestCognitiveContextWithRealMesh:
|
|
|
201
201
|
# TEST: LISTENERAGENT PEER COMMUNICATION
|
|
202
202
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
203
203
|
|
|
204
|
-
class
|
|
205
|
-
"""Test
|
|
204
|
+
class TestCustomAgentPeerCommunication:
|
|
205
|
+
"""Test CustomAgent handles peer requests correctly."""
|
|
206
206
|
|
|
207
207
|
@pytest.mark.asyncio
|
|
208
|
-
async def
|
|
209
|
-
"""Test
|
|
208
|
+
async def test_customagent_receives_and_responds(self):
|
|
209
|
+
"""Test CustomAgent receives requests and sends responses."""
|
|
210
210
|
from jarviscore import Mesh
|
|
211
|
-
from jarviscore.profiles import
|
|
211
|
+
from jarviscore.profiles import CustomAgent
|
|
212
212
|
|
|
213
213
|
request_received = False
|
|
214
214
|
request_data = None
|
|
215
215
|
|
|
216
|
-
class ResponderAgent(
|
|
216
|
+
class ResponderAgent(CustomAgent):
|
|
217
217
|
role = "responder"
|
|
218
218
|
capabilities = ["responding"]
|
|
219
219
|
listen_timeout = 0.1
|
|
@@ -273,9 +273,9 @@ class TestListenerAgentPeerCommunication:
|
|
|
273
273
|
async def test_cognitive_context_enables_peer_discovery_for_requests(self):
|
|
274
274
|
"""Test that cognitive context helps discover correct peer for requests."""
|
|
275
275
|
from jarviscore import Mesh
|
|
276
|
-
from jarviscore.profiles import
|
|
276
|
+
from jarviscore.profiles import CustomAgent
|
|
277
277
|
|
|
278
|
-
class AnalystAgent(
|
|
278
|
+
class AnalystAgent(CustomAgent):
|
|
279
279
|
role = "analyst"
|
|
280
280
|
capabilities = ["data_analysis", "statistics"]
|
|
281
281
|
description = "Expert in data analysis"
|
|
@@ -285,7 +285,7 @@ class TestListenerAgentPeerCommunication:
|
|
|
285
285
|
query = msg.data.get("query", "")
|
|
286
286
|
return {"analysis": f"Analyzed: {query}", "confidence": 0.9}
|
|
287
287
|
|
|
288
|
-
class CoordinatorAgent(
|
|
288
|
+
class CoordinatorAgent(CustomAgent):
|
|
289
289
|
role = "coordinator"
|
|
290
290
|
capabilities = ["coordination"]
|
|
291
291
|
listen_timeout = 0.1
|
|
@@ -415,9 +415,9 @@ class TestLLMCognitiveDiscovery:
|
|
|
415
415
|
async def test_llm_receives_peer_context_in_prompt(self):
|
|
416
416
|
"""Test LLM receives and understands peer context."""
|
|
417
417
|
from jarviscore import Mesh
|
|
418
|
-
from jarviscore.profiles import
|
|
418
|
+
from jarviscore.profiles import CustomAgent
|
|
419
419
|
|
|
420
|
-
class SpecialistAgent(
|
|
420
|
+
class SpecialistAgent(CustomAgent):
|
|
421
421
|
role = "data_specialist"
|
|
422
422
|
capabilities = ["data_processing", "analytics"]
|
|
423
423
|
description = "Processes and analyzes data"
|
|
@@ -464,11 +464,11 @@ class TestLLMCognitiveDiscovery:
|
|
|
464
464
|
async def test_llm_decides_to_delegate_based_on_context(self):
|
|
465
465
|
"""Test LLM autonomously decides to delegate based on peer context."""
|
|
466
466
|
from jarviscore import Mesh
|
|
467
|
-
from jarviscore.profiles import
|
|
467
|
+
from jarviscore.profiles import CustomAgent
|
|
468
468
|
|
|
469
469
|
delegation_occurred = False
|
|
470
470
|
|
|
471
|
-
class AnalystAgent(
|
|
471
|
+
class AnalystAgent(CustomAgent):
|
|
472
472
|
role = "analyst"
|
|
473
473
|
capabilities = ["data_analysis", "statistics", "insights"]
|
|
474
474
|
description = "Expert data analyst"
|
|
@@ -482,7 +482,7 @@ class TestLLMCognitiveDiscovery:
|
|
|
482
482
|
"insights": ["Positive trend", "Growth accelerating"]
|
|
483
483
|
}
|
|
484
484
|
|
|
485
|
-
class CoordinatorAgent(
|
|
485
|
+
class CoordinatorAgent(CustomAgent):
|
|
486
486
|
role = "coordinator"
|
|
487
487
|
capabilities = ["coordination", "delegation"]
|
|
488
488
|
listen_timeout = 0.1
|
|
@@ -577,12 +577,12 @@ class TestEndToEndCognitiveDiscovery:
|
|
|
577
577
|
async def test_full_flow_without_llm(self):
|
|
578
578
|
"""Test complete flow with mock LLM decisions."""
|
|
579
579
|
from jarviscore import Mesh
|
|
580
|
-
from jarviscore.profiles import
|
|
580
|
+
from jarviscore.profiles import CustomAgent
|
|
581
581
|
|
|
582
582
|
analyst_requests = []
|
|
583
583
|
scout_requests = []
|
|
584
584
|
|
|
585
|
-
class AnalystAgent(
|
|
585
|
+
class AnalystAgent(CustomAgent):
|
|
586
586
|
role = "analyst"
|
|
587
587
|
capabilities = ["analysis"]
|
|
588
588
|
listen_timeout = 0.1
|
|
@@ -591,7 +591,7 @@ class TestEndToEndCognitiveDiscovery:
|
|
|
591
591
|
analyst_requests.append(msg.data)
|
|
592
592
|
return {"analysis_result": "Data analyzed successfully"}
|
|
593
593
|
|
|
594
|
-
class ScoutAgent(
|
|
594
|
+
class ScoutAgent(CustomAgent):
|
|
595
595
|
role = "scout"
|
|
596
596
|
capabilities = ["research"]
|
|
597
597
|
listen_timeout = 0.1
|
|
@@ -600,7 +600,7 @@ class TestEndToEndCognitiveDiscovery:
|
|
|
600
600
|
scout_requests.append(msg.data)
|
|
601
601
|
return {"research_result": "Research completed"}
|
|
602
602
|
|
|
603
|
-
class OrchestratorAgent(
|
|
603
|
+
class OrchestratorAgent(CustomAgent):
|
|
604
604
|
role = "orchestrator"
|
|
605
605
|
capabilities = ["orchestration"]
|
|
606
606
|
listen_timeout = 0.1
|
tests/test_16_unified_dx_flow.py
CHANGED
|
@@ -3,7 +3,7 @@ Test 16: Unified DX Flow - Autonomous Agents with Mesh as Tool
|
|
|
3
3
|
|
|
4
4
|
Tests the COMPLETE real-world flow combining all DX improvements:
|
|
5
5
|
1. FastAPI Integration (JarvisLifespan)
|
|
6
|
-
2.
|
|
6
|
+
2. CustomAgent Profile with P2P Handlers
|
|
7
7
|
3. Cognitive Discovery (get_cognitive_context)
|
|
8
8
|
4. LLM Autonomous Delegation - Each agent has mesh as a TOOL
|
|
9
9
|
5. Peer-to-Peer Communication - No coordinator, any agent can talk to any agent
|
|
@@ -85,9 +85,9 @@ requires_llm = pytest.mark.skipif(not llm_is_available(), reason="No valid LLM A
|
|
|
85
85
|
|
|
86
86
|
def create_llm_agent_class():
|
|
87
87
|
"""Create the LLMAgent base class."""
|
|
88
|
-
from jarviscore.profiles import
|
|
88
|
+
from jarviscore.profiles import CustomAgent
|
|
89
89
|
|
|
90
|
-
class LLMAgent(
|
|
90
|
+
class LLMAgent(CustomAgent):
|
|
91
91
|
"""
|
|
92
92
|
Base for LLM-powered agents that can discover and delegate to peers.
|
|
93
93
|
|