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
tests/test_mesh.py CHANGED
@@ -1,6 +1,7 @@
1
1
  """
2
2
  Tests for Mesh orchestrator.
3
3
  """
4
+ import asyncio
4
5
  import pytest
5
6
  from jarviscore import Mesh, MeshMode, Agent
6
7
 
@@ -321,20 +322,50 @@ class TestMeshWorkflow:
321
322
  assert "not started" in str(exc_info.value)
322
323
 
323
324
  @pytest.mark.asyncio
324
- async def test_workflow_distributed_mode_fails(self):
325
- """Test that workflow() fails in distributed mode."""
325
+ async def test_workflow_distributed_mode_works(self):
326
+ """Test that workflow() works in distributed mode (has workflow engine)."""
326
327
  # Use unique port to avoid conflicts with P2P tests
327
328
  mesh = Mesh(mode="distributed", config={'bind_port': 7999})
328
329
  mesh.add(TestAgent1)
329
330
 
330
331
  await mesh.start()
331
332
 
333
+ # Distributed mode should allow workflow execution
334
+ results = await mesh.workflow("test-workflow", [
335
+ {"agent": "agent1", "task": "Should succeed"}
336
+ ])
337
+
338
+ assert len(results) == 1
339
+ assert results[0]["status"] == "success"
340
+
341
+ await mesh.stop()
342
+
343
+ @pytest.mark.asyncio
344
+ async def test_workflow_p2p_mode_fails(self):
345
+ """Test that workflow() fails in p2p mode (no workflow engine)."""
346
+ mesh = Mesh(mode="p2p", config={'bind_port': 7998})
347
+
348
+ class P2PTestAgent(Agent):
349
+ role = "p2p_test"
350
+ capabilities = ["test"]
351
+
352
+ async def execute_task(self, task):
353
+ return {"status": "success"}
354
+
355
+ async def run(self):
356
+ while not self.shutdown_requested:
357
+ await asyncio.sleep(0.1)
358
+
359
+ mesh.add(P2PTestAgent)
360
+
361
+ await mesh.start()
362
+
332
363
  with pytest.raises(RuntimeError) as exc_info:
333
364
  await mesh.workflow("test-workflow", [
334
- {"agent": "agent1", "task": "Should fail"}
365
+ {"agent": "p2p_test", "task": "Should fail"}
335
366
  ])
336
367
 
337
- assert "only available in autonomous mode" in str(exc_info.value)
368
+ assert "not available in p2p mode" in str(exc_info.value)
338
369
 
339
370
  await mesh.stop()
340
371
 
@@ -1,69 +0,0 @@
1
- examples/calculator_agent_example.py,sha256=x7TrzE45WT_1DqwEnw8U3Fw56WpR9jBe3SLZz5vsKWc,2276
2
- examples/multi_agent_workflow.py,sha256=Sygx3iEBM9WzorVMXqtiwn4rLYrW9BsxsiQSKceuzsE,4303
3
- examples/research_agent_example.py,sha256=phJ5AHNnZ_pxCfiKvHoTp_IFwOAW7VD1fRNHlXvfgj4,2287
4
- jarviscore/__init__.py,sha256=oBtxDmo0XAe_95wRMkuL_qRJmBpfKtbQUi2EhNv4QLo,2500
5
- jarviscore/adapter/__init__.py,sha256=s78Y-q7se72kkA6mguUgsp5E3za8a9c0FRcN-J_-yDE,951
6
- jarviscore/adapter/decorator.py,sha256=FMHFEyypzsMfghg6YXX2UYIqGhfl2-oFX86auuSA610,11804
7
- jarviscore/cli/__init__.py,sha256=OnpJ37xDcbh3jFhALLY1jimgp1mxlB1-VhsKhGS6TDY,123
8
- jarviscore/cli/__main__.py,sha256=GuIqW9NKJ3n70ei54ItzrBYEVaWG5dAWGxdu87w7YgI,829
9
- jarviscore/cli/check.py,sha256=eWvk6fkRsJ8hpgT60XUoAn_0nyzF0PFKRl65m7U9cxQ,13955
10
- jarviscore/cli/scaffold.py,sha256=nhTqmxKMh8L7lHogCWDT_UKZy_kKoavQzl31o1JPfxc,4829
11
- jarviscore/cli/smoketest.py,sha256=1qek9Vb7DlX9YAtQwLg-L7Gr90q61oMy4elaF7rQA4I,13363
12
- jarviscore/config/__init__.py,sha256=ZLjbRHSi5azaDyoSOFr9cQ65J5Fvi56xI-WHdczc204,178
13
- jarviscore/config/settings.py,sha256=ueYpJAZxT1zoEPymzrn0OHAXZxQXBqSMs87VwolPdhg,3516
14
- jarviscore/context/__init__.py,sha256=FdMfHUPs1vDRDaz2WR_F3IJi9k4FIVBvsGVKD5dJBrQ,1171
15
- jarviscore/context/dependency.py,sha256=ns6IwTsMBBuP0w8oBRt60iiNsu5k7RomEViUi4kkmBg,4750
16
- jarviscore/context/jarvis_context.py,sha256=6ai2TjDE5PRiBxF5lTdyBMoK3b8wv6cr0a6q55PoUSk,5775
17
- jarviscore/context/memory.py,sha256=taonyl24ZUe-NZ5VtvrxljNv6f_BebuH6VE7l0B9S7A,4442
18
- jarviscore/core/__init__.py,sha256=30K2aqZckYTRZupn6X-mGV2QDSqWCgJ1cpN6Zk1gqlQ,177
19
- jarviscore/core/agent.py,sha256=qcqdhRVoYNxIhO_FYmttiDFA354EYtSaM2xp-TNDWGM,5402
20
- jarviscore/core/mesh.py,sha256=880H25tyteX7ppoI7KkTOnPQoCjoQ3_YdMPzWTb3Zzc,16380
21
- jarviscore/core/profile.py,sha256=sTrGTxV9mAqbt5l3z0-BSNOeWzq8YDLR3mlaPFSgt1c,2190
22
- jarviscore/data/.env.example,sha256=TCPdye7tYNDOEpcgaEuzUsQ-H7m9G6rsyzNZV9IYQ9s,5156
23
- jarviscore/data/__init__.py,sha256=757nsqMkytYV0zXiM_mh3LqtGZZ1lgFuMzvaLrW51PM,151
24
- jarviscore/data/examples/calculator_agent_example.py,sha256=x7TrzE45WT_1DqwEnw8U3Fw56WpR9jBe3SLZz5vsKWc,2276
25
- jarviscore/data/examples/multi_agent_workflow.py,sha256=Sygx3iEBM9WzorVMXqtiwn4rLYrW9BsxsiQSKceuzsE,4303
26
- jarviscore/data/examples/research_agent_example.py,sha256=phJ5AHNnZ_pxCfiKvHoTp_IFwOAW7VD1fRNHlXvfgj4,2287
27
- jarviscore/docs/API_REFERENCE.md,sha256=26OhRSfX6n3eSSgvtQdoeITmjzDjl9qUOU4PuH1NqKM,20066
28
- jarviscore/docs/CONFIGURATION.md,sha256=tATnnDcKOxgAFLmzX59ySBtXKBp6AgeC1qWm-GsJORE,14201
29
- jarviscore/docs/GETTING_STARTED.md,sha256=PJef680gyLqNN64pnvPmrRcPCE_X0sm5BSF0Bs1mOTY,13774
30
- jarviscore/docs/TROUBLESHOOTING.md,sha256=lIGHQRM1HpoG5lVUKCftnAiyag1Czai1eWux25txo90,8476
31
- jarviscore/docs/USER_GUIDE.md,sha256=qdfuisZyqtVtxtmtW2QB7BD6LrrHMXXb5yqlB5Z0irM,21330
32
- jarviscore/execution/__init__.py,sha256=yDAMehMO2dVvdKjxVx7zQV2AaxySmvymA24QF3O9tlY,1754
33
- jarviscore/execution/code_registry.py,sha256=C3_hAVXIeCG31qwSBUrmBBicmd2vnUrXJhJgj8MKlJw,9213
34
- jarviscore/execution/generator.py,sha256=zY7IxxDu4xoifeuCGZZN8_l8zQCsB5eUO9HGIiLIttw,8696
35
- jarviscore/execution/llm.py,sha256=a04W7buLXP1BvQoSR9u6hybGwaJqpjStZDipLIVCDVA,16794
36
- jarviscore/execution/repair.py,sha256=yy6GTX6nFoA38S9V1ZGvqOeH3iRThRkMI3GZ6F_2WrU,9092
37
- jarviscore/execution/result_handler.py,sha256=7SKr-teFksqNgejhnZNrjAzKbtDXbOSV3Tv7gfYsdig,10590
38
- jarviscore/execution/sandbox.py,sha256=IVkccce_WHDxXO6l8BCcuxAB5iueJfYtbryydoE972c,19981
39
- jarviscore/execution/search.py,sha256=JSoT8vb_yT6_EKaAgUQDS8ONgFeKf6s8YlEeTn6FaWQ,9923
40
- jarviscore/orchestration/__init__.py,sha256=Ia9GfEMWif0tN0Ju89q6M_x_BRw9FcQl5Rf99p8CIKU,386
41
- jarviscore/orchestration/claimer.py,sha256=ekhHqhtxpi_USnPsIioFK6bA2nhH6jalulBkptYubVU,3106
42
- jarviscore/orchestration/dependency.py,sha256=UtSSwSC2Ak5V5dYeZWJy3wZZuTE-Y-fcglkoIgNT_70,4377
43
- jarviscore/orchestration/engine.py,sha256=vviPOIYvhRqK5TbyS2epiRayhGe8fBg1j8N0VB6Vzyc,10455
44
- jarviscore/orchestration/status.py,sha256=XeKASMNQDwpJ6HpDw3m3eAAMNWsWCj4k9jrvMnLHPbo,2540
45
- jarviscore/p2p/__init__.py,sha256=EMggUUf7E0MGJlayy0GNGiFGnd0vr-PJ2T2suR_mwAI,632
46
- jarviscore/p2p/broadcaster.py,sha256=PQRBRfVQD1FNntnxi7H8VsOyYGk_63N-QtnRB4Dx_-I,14127
47
- jarviscore/p2p/coordinator.py,sha256=dqSyg2xUAlxuRIn121fY1246KqT1O8-bImjpH80WIC0,13397
48
- jarviscore/p2p/keepalive.py,sha256=Ml4TyXv2pzJ7UZl3uYVgMlHmpjxYV6fAebWLSEEXo5U,14079
49
- jarviscore/p2p/swim_manager.py,sha256=Mdr6D0uxJR0h1JMO_faAda2Ojv6gfjoY-ZOzD9q_DWo,10816
50
- jarviscore/profiles/__init__.py,sha256=vBV6W5vszx3px4UOZwCh2wsH-TYzIoPp4Zo_STT8pNo,154
51
- jarviscore/profiles/autoagent.py,sha256=1nJAVf1oU9lLO47BP1xFGBDZtypXXkwKy6kZjtpdlX0,10424
52
- jarviscore/profiles/customagent.py,sha256=GRauTYlWyYSgZrWyYZlAPNkJoVgjDHjfY_c0rdeoOgM,4618
53
- jarviscore_framework-0.1.1.dist-info/licenses/LICENSE,sha256=SjsXanvmQJFYz_SVFa17O85-bKIa_aG99wrkPpWtypo,1101
54
- tests/conftest.py,sha256=vK5f8DVxCkOGTz3K1835ru5vRgHnaDL_V9M5AUaJ2Zw,974
55
- tests/test_agent.py,sha256=qx9SFDTP4DlcQi6hV8y6LZyEYX6IB8D3VnM7fODnW9s,5182
56
- tests/test_autoagent.py,sha256=_mzinLdQwskOn6a-yGqdfoOsqw2f52XSyTCmj8hLqlg,4628
57
- tests/test_autoagent_day4.py,sha256=TTb0kSImF9stMsq4cMlkGahf9UBpYjoNXAkgnkKuuQA,4719
58
- tests/test_context.py,sha256=MftpCCeLkmORo-jBzLZtNjMlEZqkvH9Vyt2h5FPHBzo,15628
59
- tests/test_customagent.py,sha256=auxU6j3GVVT1r2kwoxarFUSCHtwSTjCrxBTqZzezqzw,8310
60
- tests/test_decorator.py,sha256=cqJL6gbszWbtEwk8yDcRDbdXcykvM0uvGpjWUUqmw_8,20398
61
- tests/test_integration.py,sha256=X9TYRW2WKF1doLFARTEyCCYLFAnYsazsshDwBzQZcZE,9191
62
- tests/test_llm_fallback.py,sha256=CNajpKkQ6MO503dRbgaP2cz9kXHwUGKo5381tHKTe4c,5742
63
- tests/test_mesh.py,sha256=QD0qbVRms7__ox2Ye7Ps4tfuH63m3_EoJzikjHIHjbc,10902
64
- tests/test_p2p_integration.py,sha256=F9B21eWlwRzSRphm2Kacs9nM1FgSbSzi6RSLPDvvt2U,10995
65
- tests/test_remote_sandbox.py,sha256=80ebc0pWInauWnywsQ0VSzlk8OexSCgGL7BcJUCPkR8,3268
66
- jarviscore_framework-0.1.1.dist-info/METADATA,sha256=fTfNWNQ0mEbSMXXe6NjhAPE3_QuPB0dZU4u4d6g7bIA,4313
67
- jarviscore_framework-0.1.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
68
- jarviscore_framework-0.1.1.dist-info/top_level.txt,sha256=P1SVqN5qA97MpLqnuowxDioZ49zccGrx0tjKz-7wz5o,26
69
- jarviscore_framework-0.1.1.dist-info/RECORD,,