jarviscore-framework 0.1.1__py3-none-any.whl → 0.2.0__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.
Files changed (85) hide show
  1. examples/autoagent_distributed_example.py +211 -0
  2. examples/custom_profile_decorator.py +134 -0
  3. examples/custom_profile_wrap.py +168 -0
  4. examples/customagent_distributed_example.py +362 -0
  5. examples/customagent_p2p_example.py +347 -0
  6. jarviscore/__init__.py +49 -36
  7. jarviscore/adapter/__init__.py +15 -9
  8. jarviscore/adapter/decorator.py +23 -19
  9. jarviscore/adapter/wrapper.py +303 -0
  10. jarviscore/cli/scaffold.py +1 -1
  11. jarviscore/cli/smoketest.py +3 -2
  12. jarviscore/core/agent.py +44 -1
  13. jarviscore/core/mesh.py +196 -35
  14. jarviscore/data/examples/autoagent_distributed_example.py +211 -0
  15. jarviscore/data/examples/customagent_distributed_example.py +362 -0
  16. jarviscore/data/examples/customagent_p2p_example.py +347 -0
  17. jarviscore/docs/API_REFERENCE.md +264 -51
  18. jarviscore/docs/AUTOAGENT_GUIDE.md +198 -0
  19. jarviscore/docs/CONFIGURATION.md +35 -21
  20. jarviscore/docs/CUSTOMAGENT_GUIDE.md +415 -0
  21. jarviscore/docs/GETTING_STARTED.md +106 -13
  22. jarviscore/docs/TROUBLESHOOTING.md +144 -6
  23. jarviscore/docs/USER_GUIDE.md +138 -361
  24. jarviscore/orchestration/engine.py +20 -8
  25. jarviscore/p2p/__init__.py +10 -0
  26. jarviscore/p2p/coordinator.py +129 -0
  27. jarviscore/p2p/messages.py +87 -0
  28. jarviscore/p2p/peer_client.py +576 -0
  29. jarviscore/p2p/peer_tool.py +268 -0
  30. {jarviscore_framework-0.1.1.dist-info → jarviscore_framework-0.2.0.dist-info}/METADATA +60 -54
  31. jarviscore_framework-0.2.0.dist-info/RECORD +132 -0
  32. {jarviscore_framework-0.1.1.dist-info → jarviscore_framework-0.2.0.dist-info}/WHEEL +1 -1
  33. {jarviscore_framework-0.1.1.dist-info → jarviscore_framework-0.2.0.dist-info}/top_level.txt +1 -0
  34. test_logs/code_registry/functions/data_generator-558779ed_560ebc37.py +7 -0
  35. test_logs/code_registry/functions/data_generator-5ed3609e_560ebc37.py +7 -0
  36. test_logs/code_registry/functions/data_generator-66da0356_43970bb9.py +25 -0
  37. test_logs/code_registry/functions/data_generator-7a2fac83_583709d9.py +36 -0
  38. test_logs/code_registry/functions/data_generator-888b670f_aa235863.py +9 -0
  39. test_logs/code_registry/functions/data_generator-9ca5f642_aa235863.py +9 -0
  40. test_logs/code_registry/functions/data_generator-bfd90775_560ebc37.py +7 -0
  41. test_logs/code_registry/functions/data_generator-e95d2f7d_aa235863.py +9 -0
  42. test_logs/code_registry/functions/data_generator-f60ca8a2_327eb8c2.py +29 -0
  43. test_logs/code_registry/functions/mathematician-02adf9ee_958658d9.py +19 -0
  44. test_logs/code_registry/functions/mathematician-0706fb57_5df13441.py +23 -0
  45. test_logs/code_registry/functions/mathematician-153c9c4a_ba59c918.py +83 -0
  46. test_logs/code_registry/functions/mathematician-287e61c0_41daa793.py +18 -0
  47. test_logs/code_registry/functions/mathematician-2967af5a_863c2cc6.py +17 -0
  48. test_logs/code_registry/functions/mathematician-303ca6d6_5df13441.py +23 -0
  49. test_logs/code_registry/functions/mathematician-308a4afd_cbf5064d.py +73 -0
  50. test_logs/code_registry/functions/mathematician-353f16e2_0968bcf5.py +18 -0
  51. test_logs/code_registry/functions/mathematician-3c22475a_41daa793.py +17 -0
  52. test_logs/code_registry/functions/mathematician-5bac1029_0968bcf5.py +18 -0
  53. test_logs/code_registry/functions/mathematician-640f76b2_9198780b.py +19 -0
  54. test_logs/code_registry/functions/mathematician-752fa7ea_863c2cc6.py +17 -0
  55. test_logs/code_registry/functions/mathematician-baf9ef39_0968bcf5.py +18 -0
  56. test_logs/code_registry/functions/mathematician-bc8b2a2f_5df13441.py +23 -0
  57. test_logs/code_registry/functions/mathematician-c31e4686_41daa793.py +18 -0
  58. test_logs/code_registry/functions/mathematician-cc84c84c_863c2cc6.py +17 -0
  59. test_logs/code_registry/functions/mathematician-dd7c7144_9198780b.py +19 -0
  60. test_logs/code_registry/functions/mathematician-e671c256_41ea4487.py +74 -0
  61. test_logs/code_registry/functions/report_generator-1a878fcc_18d44bdc.py +47 -0
  62. test_logs/code_registry/functions/report_generator-25c1c331_cea57d0d.py +35 -0
  63. test_logs/code_registry/functions/report_generator-37552117_e711c2b9.py +35 -0
  64. test_logs/code_registry/functions/report_generator-bc662768_e711c2b9.py +35 -0
  65. test_logs/code_registry/functions/report_generator-d6c0e76b_5e7722ec.py +44 -0
  66. test_logs/code_registry/functions/report_generator-f270fb02_680529c3.py +44 -0
  67. test_logs/code_registry/functions/text_processor-11393b14_4370d3ed.py +40 -0
  68. test_logs/code_registry/functions/text_processor-7d02dfc3_d3b569be.py +37 -0
  69. test_logs/code_registry/functions/text_processor-8adb5e32_9168c5fe.py +13 -0
  70. test_logs/code_registry/functions/text_processor-c58ffc19_78b4ceac.py +42 -0
  71. test_logs/code_registry/functions/text_processor-cd5977b1_9168c5fe.py +13 -0
  72. test_logs/code_registry/functions/text_processor-ec1c8773_9168c5fe.py +13 -0
  73. tests/test_01_analyst_standalone.py +124 -0
  74. tests/test_02_assistant_standalone.py +164 -0
  75. tests/test_03_analyst_with_framework.py +945 -0
  76. tests/test_04_assistant_with_framework.py +1002 -0
  77. tests/test_05_integration.py +1301 -0
  78. tests/test_06_real_llm_integration.py +760 -0
  79. tests/test_07_distributed_single_node.py +578 -0
  80. tests/test_08_distributed_multi_node.py +454 -0
  81. tests/test_09_distributed_autoagent.py +509 -0
  82. tests/test_10_distributed_customagent.py +787 -0
  83. tests/test_mesh.py +35 -4
  84. jarviscore_framework-0.1.1.dist-info/RECORD +0 -69
  85. {jarviscore_framework-0.1.1.dist-info → jarviscore_framework-0.2.0.dist-info}/licenses/LICENSE +0 -0
@@ -1,6 +1,6 @@
1
1
  # JarvisCore Troubleshooting Guide
2
2
 
3
- Common issues and solutions for AutoAgent/Prompt-Dev users.
3
+ Common issues and solutions for AutoAgent and CustomAgent users.
4
4
 
5
5
  ---
6
6
 
@@ -199,7 +199,68 @@ await mesh.workflow("wf-1", [
199
199
 
200
200
  ---
201
201
 
202
- ### 5. Environment Issues
202
+ ### 5. CustomAgent Issues
203
+
204
+ #### Issue: `execute_task not called`
205
+
206
+ **Cause:** Wrong mode for your use case
207
+
208
+ **Solution:**
209
+ ```python
210
+ # For workflow orchestration (autonomous/distributed modes)
211
+ class MyAgent(CustomAgent):
212
+ async def execute_task(self, task): # Called by workflow engine
213
+ return {"status": "success", "output": ...}
214
+
215
+ # For P2P mode, use run() instead
216
+ class MyAgent(CustomAgent):
217
+ async def run(self): # Called in P2P mode
218
+ while not self.shutdown_requested:
219
+ msg = await self.peers.receive(timeout=0.5)
220
+ ...
221
+ ```
222
+
223
+ #### Issue: `self.peers is None`
224
+
225
+ **Cause:** Agent not in P2P or distributed mode
226
+
227
+ **Solution:**
228
+ ```python
229
+ # Ensure mesh is in p2p or distributed mode
230
+ mesh = Mesh(mode="distributed", config={ # or "p2p"
231
+ 'bind_port': 7950,
232
+ 'node_name': 'my-node',
233
+ })
234
+
235
+ # Check peers is available before using
236
+ if self.peers:
237
+ result = await self.peers.as_tool().execute("ask_peer", {...})
238
+ ```
239
+
240
+ #### Issue: `No response from peer`
241
+
242
+ **Cause:** Target agent not listening or wrong role
243
+
244
+ **Solution:**
245
+ ```python
246
+ # Ensure target agent is running its run() loop
247
+ # In researcher agent:
248
+ async def run(self):
249
+ while not self.shutdown_requested:
250
+ msg = await self.peers.receive(timeout=0.5)
251
+ if msg and msg.is_request:
252
+ await self.peers.respond(msg, {"response": ...})
253
+
254
+ # When asking, use correct role
255
+ result = await self.peers.as_tool().execute(
256
+ "ask_peer",
257
+ {"role": "researcher", "question": "..."} # Must match agent's role
258
+ )
259
+ ```
260
+
261
+ ---
262
+
263
+ ### 6. Environment Issues
203
264
 
204
265
  #### Issue: `.env file not found`
205
266
 
@@ -234,7 +295,7 @@ python your_script.py
234
295
 
235
296
  ---
236
297
 
237
- ### 6. Sandbox Configuration
298
+ ### 7. Sandbox Configuration
238
299
 
239
300
  #### Issue: `Remote sandbox connection failed`
240
301
 
@@ -259,7 +320,78 @@ python your_script.py
259
320
 
260
321
  ---
261
322
 
262
- ### 7. Performance Issues
323
+ ### 8. P2P/Distributed Mode Issues
324
+
325
+ #### Issue: `P2P coordinator failed to start`
326
+
327
+ **Cause:** Port already in use or network issue
328
+
329
+ **Solution:**
330
+ ```bash
331
+ # Check if port is in use
332
+ lsof -i :7950
333
+
334
+ # Try different port
335
+ mesh = Mesh(mode="distributed", config={
336
+ 'bind_port': 7960, # Different port
337
+ })
338
+ ```
339
+
340
+ #### Issue: `Cannot connect to seed nodes`
341
+
342
+ **Cause:** Firewall, wrong address, or seed node not running
343
+
344
+ **Solution:**
345
+ ```bash
346
+ # Check connectivity
347
+ nc -zv 192.168.1.10 7950
348
+
349
+ # Open firewall ports
350
+ sudo ufw allow 7950/tcp
351
+ sudo ufw allow 7950/udp
352
+
353
+ # Ensure seed node is running first
354
+ # On seed node:
355
+ mesh = Mesh(mode="distributed", config={
356
+ 'bind_host': '0.0.0.0', # Listen on all interfaces
357
+ 'bind_port': 7950,
358
+ })
359
+ ```
360
+
361
+ #### Issue: `Workflow not available in p2p mode`
362
+
363
+ **Cause:** P2P mode doesn't include workflow engine
364
+
365
+ **Solution:**
366
+ ```python
367
+ # Use distributed mode for both workflow + P2P
368
+ mesh = Mesh(mode="distributed", config={...})
369
+
370
+ # Or use p2p mode with run() loops instead
371
+ mesh = Mesh(mode="p2p", config={...})
372
+ await mesh.start()
373
+ await mesh.run_forever() # Agents use run() loops
374
+ ```
375
+
376
+ #### Issue: `Agents not discovering each other`
377
+
378
+ **Cause:** Network configuration or timing
379
+
380
+ **Solution:**
381
+ ```python
382
+ # Wait for mesh to stabilize after start
383
+ await mesh.start()
384
+ await asyncio.sleep(1) # Give time for peer discovery
385
+
386
+ # Check if peers are available
387
+ agent = mesh.get_agent("my_role")
388
+ if agent.peers:
389
+ print("Peers available")
390
+ ```
391
+
392
+ ---
393
+
394
+ ### 9. Performance Issues
263
395
 
264
396
  #### Issue: Code generation is slow (>10 seconds)
265
397
 
@@ -295,7 +427,7 @@ python your_script.py
295
427
 
296
428
  ---
297
429
 
298
- ### 8. Testing Issues
430
+ ### 9. Testing Issues
299
431
 
300
432
  #### Issue: Smoke test fails but examples work
301
433
 
@@ -425,4 +557,10 @@ If significantly slower:
425
557
 
426
558
  ---
427
559
 
428
- *Last updated: 2026-01-13*
560
+ *Last updated: 2026-01-22*
561
+
562
+ ---
563
+
564
+ ## Version
565
+
566
+ Troubleshooting Guide for JarvisCore v0.2.0