code-puppy 0.0.341__py3-none-any.whl → 0.0.361__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.
- code_puppy/agents/__init__.py +2 -0
- code_puppy/agents/agent_manager.py +49 -0
- code_puppy/agents/agent_pack_leader.py +383 -0
- code_puppy/agents/agent_qa_kitten.py +12 -7
- code_puppy/agents/agent_terminal_qa.py +323 -0
- code_puppy/agents/base_agent.py +34 -252
- code_puppy/agents/event_stream_handler.py +350 -0
- code_puppy/agents/pack/__init__.py +34 -0
- code_puppy/agents/pack/bloodhound.py +304 -0
- code_puppy/agents/pack/husky.py +321 -0
- code_puppy/agents/pack/retriever.py +393 -0
- code_puppy/agents/pack/shepherd.py +348 -0
- code_puppy/agents/pack/terrier.py +287 -0
- code_puppy/agents/pack/watchdog.py +367 -0
- code_puppy/agents/subagent_stream_handler.py +276 -0
- code_puppy/api/__init__.py +13 -0
- code_puppy/api/app.py +169 -0
- code_puppy/api/main.py +21 -0
- code_puppy/api/pty_manager.py +446 -0
- code_puppy/api/routers/__init__.py +12 -0
- code_puppy/api/routers/agents.py +36 -0
- code_puppy/api/routers/commands.py +217 -0
- code_puppy/api/routers/config.py +74 -0
- code_puppy/api/routers/sessions.py +232 -0
- code_puppy/api/templates/terminal.html +361 -0
- code_puppy/api/websocket.py +154 -0
- code_puppy/callbacks.py +73 -0
- code_puppy/claude_cache_client.py +249 -34
- code_puppy/cli_runner.py +4 -3
- code_puppy/command_line/add_model_menu.py +8 -9
- code_puppy/command_line/core_commands.py +85 -0
- code_puppy/command_line/mcp/catalog_server_installer.py +5 -6
- code_puppy/command_line/mcp/custom_server_form.py +54 -19
- code_puppy/command_line/mcp/custom_server_installer.py +8 -9
- code_puppy/command_line/mcp/handler.py +0 -2
- code_puppy/command_line/mcp/help_command.py +1 -5
- code_puppy/command_line/mcp/start_command.py +36 -18
- code_puppy/command_line/onboarding_slides.py +0 -1
- code_puppy/command_line/prompt_toolkit_completion.py +16 -10
- code_puppy/command_line/utils.py +54 -0
- code_puppy/config.py +66 -62
- code_puppy/mcp_/async_lifecycle.py +35 -4
- code_puppy/mcp_/managed_server.py +49 -20
- code_puppy/mcp_/manager.py +81 -52
- code_puppy/messaging/__init__.py +15 -0
- code_puppy/messaging/message_queue.py +11 -23
- code_puppy/messaging/messages.py +27 -0
- code_puppy/messaging/queue_console.py +1 -1
- code_puppy/messaging/rich_renderer.py +36 -1
- code_puppy/messaging/spinner/__init__.py +20 -2
- code_puppy/messaging/subagent_console.py +461 -0
- code_puppy/model_utils.py +54 -0
- code_puppy/plugins/antigravity_oauth/antigravity_model.py +90 -19
- code_puppy/plugins/antigravity_oauth/transport.py +1 -0
- code_puppy/plugins/frontend_emitter/__init__.py +25 -0
- code_puppy/plugins/frontend_emitter/emitter.py +121 -0
- code_puppy/plugins/frontend_emitter/register_callbacks.py +261 -0
- code_puppy/prompts/antigravity_system_prompt.md +1 -0
- code_puppy/status_display.py +6 -2
- code_puppy/tools/__init__.py +37 -1
- code_puppy/tools/agent_tools.py +139 -36
- code_puppy/tools/browser/__init__.py +37 -0
- code_puppy/tools/browser/browser_control.py +6 -6
- code_puppy/tools/browser/browser_interactions.py +21 -20
- code_puppy/tools/browser/browser_locators.py +9 -9
- code_puppy/tools/browser/browser_navigation.py +7 -7
- code_puppy/tools/browser/browser_screenshot.py +78 -140
- code_puppy/tools/browser/browser_scripts.py +15 -13
- code_puppy/tools/browser/camoufox_manager.py +226 -64
- code_puppy/tools/browser/chromium_terminal_manager.py +259 -0
- code_puppy/tools/browser/terminal_command_tools.py +521 -0
- code_puppy/tools/browser/terminal_screenshot_tools.py +556 -0
- code_puppy/tools/browser/terminal_tools.py +525 -0
- code_puppy/tools/command_runner.py +292 -101
- code_puppy/tools/common.py +176 -1
- code_puppy/tools/display.py +84 -0
- code_puppy/tools/subagent_context.py +158 -0
- {code_puppy-0.0.341.dist-info → code_puppy-0.0.361.dist-info}/METADATA +13 -11
- {code_puppy-0.0.341.dist-info → code_puppy-0.0.361.dist-info}/RECORD +84 -53
- code_puppy/command_line/mcp/add_command.py +0 -170
- code_puppy/tools/browser/vqa_agent.py +0 -90
- {code_puppy-0.0.341.data → code_puppy-0.0.361.data}/data/code_puppy/models.json +0 -0
- {code_puppy-0.0.341.data → code_puppy-0.0.361.data}/data/code_puppy/models_dev_api.json +0 -0
- {code_puppy-0.0.341.dist-info → code_puppy-0.0.361.dist-info}/WHEEL +0 -0
- {code_puppy-0.0.341.dist-info → code_puppy-0.0.361.dist-info}/entry_points.txt +0 -0
- {code_puppy-0.0.341.dist-info → code_puppy-0.0.361.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
code_puppy/__init__.py,sha256=xMPewo9RNHb3yfFNIk5WCbv2cvSPtJOCgK2-GqLbNnU,373
|
|
2
2
|
code_puppy/__main__.py,sha256=pDVssJOWP8A83iFkxMLY9YteHYat0EyWDQqMkKHpWp4,203
|
|
3
|
-
code_puppy/callbacks.py,sha256=
|
|
3
|
+
code_puppy/callbacks.py,sha256=Pp0VyeXJBEtk-N_RSWr5pbveelovsdLUiJ4f11dzwGw,10775
|
|
4
4
|
code_puppy/chatgpt_codex_client.py,sha256=Om0ANB_kpHubhCwNzF9ENf8RvKBqs0IYzBLl_SNw0Vk,9833
|
|
5
|
-
code_puppy/claude_cache_client.py,sha256=
|
|
6
|
-
code_puppy/cli_runner.py,sha256=
|
|
7
|
-
code_puppy/config.py,sha256=
|
|
5
|
+
code_puppy/claude_cache_client.py,sha256=Gl6um5ZaKpcnxOvoFSM8Lwm_Vu4-VyWz8Nli8DnRLa4,22508
|
|
6
|
+
code_puppy/cli_runner.py,sha256=w5CLKgQYYaT7My3Cga2StXYol-u6DBxNzzUuhhsfhsA,34952
|
|
7
|
+
code_puppy/config.py,sha256=z4c-rKwQOEsg13HHd1KskIQG4Ygdr9krQsCAiZU-Wa0,52441
|
|
8
8
|
code_puppy/error_logging.py,sha256=a80OILCUtJhexI6a9GM-r5LqIdjvSRzggfgPp2jv1X0,3297
|
|
9
9
|
code_puppy/gemini_code_assist.py,sha256=KGS7sO5OLc83nDF3xxS-QiU6vxW9vcm6hmzilu79Ef8,13867
|
|
10
10
|
code_puppy/http_utils.py,sha256=H3N5Qz2B1CcsGUYOycGWAqoNMr2P1NCVluKX3aRwRqI,10358
|
|
11
11
|
code_puppy/keymap.py,sha256=IvMkTlB_bIqOWpbTpmftkdyjhtD5todXuEIw1zCZ4u0,3584
|
|
12
12
|
code_puppy/main.py,sha256=82r3vZy_XcyEsenLn82BnUusaoyL3Bpm_Th_jKgqecE,273
|
|
13
13
|
code_puppy/model_factory.py,sha256=BSGHZlwtF7jkYz2qFG9oJglG-NnfmbsQXbx4I6stXW0,38313
|
|
14
|
-
code_puppy/model_utils.py,sha256=
|
|
14
|
+
code_puppy/model_utils.py,sha256=55TKNnGTXQlHJNqejL2PfQqQmChXfzOjJg-hlarfR7w,5551
|
|
15
15
|
code_puppy/models.json,sha256=FMQdE_yvP_8y0xxt3K918UkFL9cZMYAqW1SfXcQkU_k,3105
|
|
16
16
|
code_puppy/models_dev_api.json,sha256=wHjkj-IM_fx1oHki6-GqtOoCrRMR0ScK0f-Iz0UEcy8,548187
|
|
17
17
|
code_puppy/models_dev_parser.py,sha256=8ndmWrsSyKbXXpRZPXc0w6TfWMuCcgaHiMifmlaBaPc,20611
|
|
@@ -19,12 +19,12 @@ code_puppy/pydantic_patches.py,sha256=YecAEeCOjSIwIBu2O5vEw72atMSL37cXGrbEuukI07
|
|
|
19
19
|
code_puppy/reopenable_async_client.py,sha256=pD34chyBFcC7_OVPJ8fp6aRI5jYdN-7VDycObMZPwG8,8292
|
|
20
20
|
code_puppy/round_robin_model.py,sha256=kSawwPUiPgg0yg8r4AAVgvjzsWkptxpSORd75-HP7W4,5335
|
|
21
21
|
code_puppy/session_storage.py,sha256=T4hOsAl9z0yz2JZCptjJBOnN8fCmkLZx5eLy1hTdv6Q,9631
|
|
22
|
-
code_puppy/status_display.py,sha256=
|
|
22
|
+
code_puppy/status_display.py,sha256=r2jlosF4VNn9CUYJNcsroRQPModh9ZQNsleDwMby1Z4,9158
|
|
23
23
|
code_puppy/summarization_agent.py,sha256=6Pu_Wp_rF-HAhoX9u2uXTabRVkOZUYwRoMP1lzNS4ew,4485
|
|
24
24
|
code_puppy/terminal_utils.py,sha256=TaS19x7EZqudlBUAQwLMzBMNxBHBNInvQQREXqRGtkM,12984
|
|
25
25
|
code_puppy/uvx_detection.py,sha256=tP9X9Nvzow--KIqtqjgrHQkSxMJ3EevfoaeoB9VLY2o,7224
|
|
26
26
|
code_puppy/version_checker.py,sha256=aq2Mwxl1CR9sEFBgrPt3OQOowLOBUp9VaQYWJhuUv8Q,1780
|
|
27
|
-
code_puppy/agents/__init__.py,sha256=
|
|
27
|
+
code_puppy/agents/__init__.py,sha256=9giVbeBb8YAc51PC9EhR0h15NGwbzKLB3HECCK5iaKo,610
|
|
28
28
|
code_puppy/agents/agent_c_reviewer.py,sha256=1kO_89hcrhlS4sJ6elDLSEx-h43jAaWGgvIL0SZUuKo,8214
|
|
29
29
|
code_puppy/agents/agent_code_puppy.py,sha256=-u9VkqoE_GuB8zae9OeFMv64qt94cFs-_tzK2stIk5A,8406
|
|
30
30
|
code_puppy/agents/agent_code_reviewer.py,sha256=V9pznpi7z1XTYBjRj1Em8S71PbFXLvU8z0gCmPAQxSc,4635
|
|
@@ -32,19 +32,41 @@ code_puppy/agents/agent_cpp_reviewer.py,sha256=lbaGU4aKSNBrxsYfN86BKOeKBgL8kS9sL
|
|
|
32
32
|
code_puppy/agents/agent_creator_agent.py,sha256=pYnDRCn8qWivAeu-GA-WYn_gZ67KT1I9ZyHbaNssIII,25027
|
|
33
33
|
code_puppy/agents/agent_golang_reviewer.py,sha256=VEAwiQW06occkfABVz9Y7wStQ8pFtX94DAvZdRSRuzs,9319
|
|
34
34
|
code_puppy/agents/agent_javascript_reviewer.py,sha256=ATSXl278kPU4F6hiYsMMGkGrrWDlJqPwaYwYGNuo9J0,9494
|
|
35
|
-
code_puppy/agents/agent_manager.py,sha256=
|
|
35
|
+
code_puppy/agents/agent_manager.py,sha256=IWHhgebDF6UzuGHNM5HvxZyfVpCcJmdQqA0RajeWSCA,15026
|
|
36
|
+
code_puppy/agents/agent_pack_leader.py,sha256=DrP5rnYZbqkOm4ClK_Q4-aehjqXXVlq1UFs1bu11zbA,15766
|
|
36
37
|
code_puppy/agents/agent_planning.py,sha256=LtFqQixrDUPudSvmhbntK-zRbDHn0lSi1xrKFVqCwDo,6902
|
|
37
38
|
code_puppy/agents/agent_python_programmer.py,sha256=R-7XoGIFJ58EY9LE9mWGcQQ8gSsMzi-1HD6wigJQPL8,6846
|
|
38
39
|
code_puppy/agents/agent_python_reviewer.py,sha256=J8lqzoKJlohs8NWMbgUpHXNt1bXHNIkuGjzLd9Af8qE,5854
|
|
39
40
|
code_puppy/agents/agent_qa_expert.py,sha256=5Ikb4U3SZQknUEfwlHZiyZXKqnffnOTQagr_wrkUkPk,10125
|
|
40
|
-
code_puppy/agents/agent_qa_kitten.py,sha256=
|
|
41
|
+
code_puppy/agents/agent_qa_kitten.py,sha256=qvry-1u_CiXi8eRueHTax4OtqsS_mQrtXHsbTXWzGYs,9517
|
|
41
42
|
code_puppy/agents/agent_security_auditor.py,sha256=SpiYNA0XAsIwBj7S2_EQPRslRUmF_-b89pIJyW7DYtY,12022
|
|
43
|
+
code_puppy/agents/agent_terminal_qa.py,sha256=U-iyP7OBWdAmchW_oUU8k6asH2aignTMmgqqYDyf-ms,10343
|
|
42
44
|
code_puppy/agents/agent_typescript_reviewer.py,sha256=vsnpp98xg6cIoFAEJrRTUM_i4wLEWGm5nJxs6fhHobM,10275
|
|
43
|
-
code_puppy/agents/base_agent.py,sha256=
|
|
45
|
+
code_puppy/agents/base_agent.py,sha256=oKlX9CEIWSvdXyQDVi9F1jauA6rjKleY_n6044Ux5DY,73840
|
|
46
|
+
code_puppy/agents/event_stream_handler.py,sha256=JttLZJpNADE5HXiXY-GZ6tpwaBeFRODcy34KiquPOvU,14952
|
|
44
47
|
code_puppy/agents/json_agent.py,sha256=lhopDJDoiSGHvD8A6t50hi9ZBoNRKgUywfxd0Po_Dzc,4886
|
|
45
48
|
code_puppy/agents/prompt_reviewer.py,sha256=JJrJ0m5q0Puxl8vFsyhAbY9ftU9n6c6UxEVdNct1E-Q,5558
|
|
49
|
+
code_puppy/agents/subagent_stream_handler.py,sha256=5imUFYOJCv7blfv4fTHm6OQ7JpqlyFv_luBYGSj16MA,10329
|
|
50
|
+
code_puppy/agents/pack/__init__.py,sha256=evYSWr_t1B0v88DuCkTFdcGNZ0MANK_XiVRfXTbbHd4,1214
|
|
51
|
+
code_puppy/agents/pack/bloodhound.py,sha256=bfYSvggVNWJKxDhZT_wIWDKGM5StIvbqeFe_xP-N1JU,9407
|
|
52
|
+
code_puppy/agents/pack/husky.py,sha256=xSmHhIoiQ4rVrs3od36hnEIH5jnd_j72R9PY2gIjaTQ,9455
|
|
53
|
+
code_puppy/agents/pack/retriever.py,sha256=kz9sqnKMtJT3xoeplVdXFs_2YdHuW5JkB-vMDnQ4ZY8,10143
|
|
54
|
+
code_puppy/agents/pack/shepherd.py,sha256=gSsPAj7MV_AaiSUWNNoFLW0C932ToctJl2X9ySZN8CM,9878
|
|
55
|
+
code_puppy/agents/pack/terrier.py,sha256=bw0f5g0fmIMVsVZsBYwDrIUwMhldg1U7tzGk1EHhgK0,7935
|
|
56
|
+
code_puppy/agents/pack/watchdog.py,sha256=xgiyrGgMdf8CNJoZ0bPqZ_oZBc6cu6It8d_jeNONiy4,10039
|
|
57
|
+
code_puppy/api/__init__.py,sha256=q0VZ5PgiCjEL2xWPVsElwAffDscJ6JtbbIhYFmw3TA4,357
|
|
58
|
+
code_puppy/api/app.py,sha256=J7a0jfSJ1kqS0t3wt0AaCEGqIroVsXtVoVcbJi0Ag5k,5456
|
|
59
|
+
code_puppy/api/main.py,sha256=ycWD5_aWwdOQ2GPnqsQC-BjINNx_Qie6xFyjr9gYofI,453
|
|
60
|
+
code_puppy/api/pty_manager.py,sha256=P-SB9yuMlrwfgedV6VkzWDtGBMKAxnqV-RysQubhrS8,13714
|
|
61
|
+
code_puppy/api/websocket.py,sha256=j_96B2k2XQ-KGsNqGZqTjUeUH8NkDGfgSs32Bj4C634,5360
|
|
62
|
+
code_puppy/api/routers/__init__.py,sha256=-ifjlIm_yeFQ27vIC6OzeQFJZjnUF1e6xbFK1aNG798,430
|
|
63
|
+
code_puppy/api/routers/agents.py,sha256=Lshn89lIBi49if6GoJDBZQ2_8l7JfgAUy4gvYXlfmws,939
|
|
64
|
+
code_puppy/api/routers/commands.py,sha256=HRvsYmjrUL_tha7-nKFBEJhGRfUlCspKkngwLU8TQ6Y,6513
|
|
65
|
+
code_puppy/api/routers/config.py,sha256=uDUFYZqki0fQd0U5EHpfTgqlZaRFfmhPyWrIHXNBX3A,2005
|
|
66
|
+
code_puppy/api/routers/sessions.py,sha256=GqYRT7IJYPpEdTseLF3FIpbvvD86lIqwwPswL31D9Wc,6786
|
|
67
|
+
code_puppy/api/templates/terminal.html,sha256=9alh6tTbLyXPDjBvkXw8nEWPXB-m_LIceGGRYpSLuyo,13125
|
|
46
68
|
code_puppy/command_line/__init__.py,sha256=y7WeRemfYppk8KVbCGeAIiTuiOszIURCDjOMZv_YRmU,45
|
|
47
|
-
code_puppy/command_line/add_model_menu.py,sha256=
|
|
69
|
+
code_puppy/command_line/add_model_menu.py,sha256=CpURhxPvUhLHLBV_uwH1ODfJ-WAcGklvlsjEf5Vfvg4,43255
|
|
48
70
|
code_puppy/command_line/attachments.py,sha256=4Q5I2Es4j0ltnz5wjw2z0QXMsiMJvEfWRkPf_lJeITM,13093
|
|
49
71
|
code_puppy/command_line/autosave_menu.py,sha256=de7nOmFmEH6x5T7C95U8N8xgxxeF-l5lgaJzGJsF3ZY,19824
|
|
50
72
|
code_puppy/command_line/clipboard.py,sha256=oe9bfAX5RnT81FiYrDmhvHaePS1tAT-NFG1fSXubSD4,16869
|
|
@@ -52,7 +74,7 @@ code_puppy/command_line/colors_menu.py,sha256=LoFVfJ-Mo-Eq9hnb2Rj5mn7oBCnadAGr-8
|
|
|
52
74
|
code_puppy/command_line/command_handler.py,sha256=CY9F27eovZJK_kpU1YmbroYLWGTCuouCOQ-TXfDp-nw,10916
|
|
53
75
|
code_puppy/command_line/command_registry.py,sha256=qFySsw1g8dol3kgi0p6cXrIDlP11_OhOoaQ5nAadWXg,4416
|
|
54
76
|
code_puppy/command_line/config_commands.py,sha256=qS9Cm758DPz2QGvHLhAV4Tp_Xfgo3PyoCoLDusbnmCw,25742
|
|
55
|
-
code_puppy/command_line/core_commands.py,sha256=
|
|
77
|
+
code_puppy/command_line/core_commands.py,sha256=q5yi_xjPSoCjX8ET4PnMVsZlGwJ2PlEXVnao_7_1rJk,30619
|
|
56
78
|
code_puppy/command_line/diff_menu.py,sha256=_Gr9SP9fbItk-08dya9WTAR53s_PlyAvEnbt-8VWKPk,24141
|
|
57
79
|
code_puppy/command_line/file_path_completion.py,sha256=gw8NpIxa6GOpczUJRyh7VNZwoXKKn-yvCqit7h2y6Gg,2931
|
|
58
80
|
code_puppy/command_line/load_context_completion.py,sha256=a3JvLDeLLSYxVgTjAdqWzS4spjv6ccCrK2LKZgVJ1IM,2202
|
|
@@ -60,21 +82,20 @@ code_puppy/command_line/mcp_completion.py,sha256=eKzW2O7gun7HoHekOW0XVXhNS5J2xCt
|
|
|
60
82
|
code_puppy/command_line/model_picker_completion.py,sha256=nDnlf0qFCG2zAm_mWW2eMYwVC7eROVQrFe92hZqOKa8,6810
|
|
61
83
|
code_puppy/command_line/model_settings_menu.py,sha256=AI97IusDgMmWoCOp7C0Yrk_Uy6M9cmVhoZfVWgFWwXg,32392
|
|
62
84
|
code_puppy/command_line/motd.py,sha256=XuIk3UTLawwVFM-NfoaJGU5F2hPLASTFXq84UdDMT0Q,2408
|
|
63
|
-
code_puppy/command_line/onboarding_slides.py,sha256=
|
|
85
|
+
code_puppy/command_line/onboarding_slides.py,sha256=itqAsuHzjHpD_XNz6FniBIYr6dNyP1AW_XQZQ6SbVek,7125
|
|
64
86
|
code_puppy/command_line/onboarding_wizard.py,sha256=U5lV_1P3IwDYZUHar0zKgdp121zzkvOwwORvdCZwFcw,10241
|
|
65
87
|
code_puppy/command_line/pin_command_completion.py,sha256=juSvdqRpk7AdfkPy1DJx5NzfEUU5KYGlChvP0hisM18,11667
|
|
66
|
-
code_puppy/command_line/prompt_toolkit_completion.py,sha256=
|
|
88
|
+
code_puppy/command_line/prompt_toolkit_completion.py,sha256=49GM3jVE89G1M3XroMZk2LhGgXpOO8XZ0Sg8h4a6LLw,32806
|
|
67
89
|
code_puppy/command_line/session_commands.py,sha256=Jh8GGfhlfBAEVfucKLbcZjNaXYd0twImiOwq2ZnGdQQ,9902
|
|
68
|
-
code_puppy/command_line/utils.py,sha256=
|
|
90
|
+
code_puppy/command_line/utils.py,sha256=_upMrrmDp5hteUjrRiEgVR6SoeNEPNZGXb5lOWYqcUQ,2952
|
|
69
91
|
code_puppy/command_line/mcp/__init__.py,sha256=0-OQuwjq_pLiTVJ1_NrirVwdRerghyKs_MTZkwPC7YY,315
|
|
70
|
-
code_puppy/command_line/mcp/add_command.py,sha256=iWqHReWbVOO3kuPE4NTMs3dv_BluxTBaasDPm9P1lU0,5892
|
|
71
92
|
code_puppy/command_line/mcp/base.py,sha256=pPeNnSyM0GGqD6mhYN-qA22rAT9bEapxliwH_YiIu3Q,823
|
|
72
|
-
code_puppy/command_line/mcp/catalog_server_installer.py,sha256=
|
|
73
|
-
code_puppy/command_line/mcp/custom_server_form.py,sha256=
|
|
74
|
-
code_puppy/command_line/mcp/custom_server_installer.py,sha256=
|
|
93
|
+
code_puppy/command_line/mcp/catalog_server_installer.py,sha256=G9FvQPTBB4LeJ4cOR9DvIkp82mClKRKI35KELbFLCKU,6181
|
|
94
|
+
code_puppy/command_line/mcp/custom_server_form.py,sha256=z0hsqXY1_ScJoacneyfrFHeVUlU3ZUHYt6CXV1wnJ0Y,23733
|
|
95
|
+
code_puppy/command_line/mcp/custom_server_installer.py,sha256=oLB5j07XKApdTrCDlY97GxE1NHrqupsX6DOCXzFj3TE,5744
|
|
75
96
|
code_puppy/command_line/mcp/edit_command.py,sha256=_WxxpaTgxo9pbvMogG9yvh2mcLE5SYf0Qbi8a8IpZ0k,4603
|
|
76
|
-
code_puppy/command_line/mcp/handler.py,sha256=
|
|
77
|
-
code_puppy/command_line/mcp/help_command.py,sha256=
|
|
97
|
+
code_puppy/command_line/mcp/handler.py,sha256=jwhcLi28QQ6IuE6E5IsMbU67jMZChfZW96hG9ezYgN4,4547
|
|
98
|
+
code_puppy/command_line/mcp/help_command.py,sha256=sTWecPqmmq6vmLVgZVNjBXKnziCLoJSKsugHkxiJlTI,5285
|
|
78
99
|
code_puppy/command_line/mcp/install_command.py,sha256=lmUyMUWtkGuy1SOQRHjQgt8mD3t1agVMQfEL5_TOzTM,8364
|
|
79
100
|
code_puppy/command_line/mcp/install_menu.py,sha256=GVNR7SJbheGLFc_r9N3CT1AT024ptzsEcj1cRnp4U3g,24769
|
|
80
101
|
code_puppy/command_line/mcp/list_command.py,sha256=UKQFPlhT9qGMCyG5VKjvnSMzDDtfAhIaKU_eErgZJDg,3181
|
|
@@ -83,7 +104,7 @@ code_puppy/command_line/mcp/remove_command.py,sha256=hyU_tKJWfyLnmufrFVLwlF0qFEb
|
|
|
83
104
|
code_puppy/command_line/mcp/restart_command.py,sha256=w5EcDac09iCvPBAR0u2M5KSIhASqTu5uZwsjCJ4JLhk,3588
|
|
84
105
|
code_puppy/command_line/mcp/search_command.py,sha256=mDkSz_KjPbvlO9U7oYUKJlqqY4QM90gWKO2xsH2i3SA,4244
|
|
85
106
|
code_puppy/command_line/mcp/start_all_command.py,sha256=_TVrjRR_oqJVS6qQaHssS0V_3342av1h9gz-Fxwa-Dw,4667
|
|
86
|
-
code_puppy/command_line/mcp/start_command.py,sha256=
|
|
107
|
+
code_puppy/command_line/mcp/start_command.py,sha256=XhuhyMpuo2Bkp53qxvZBSM8yRGatcwY8m-DXcQBHAZc,4344
|
|
87
108
|
code_puppy/command_line/mcp/status_command.py,sha256=NCyjFlBMURQ39T3G2dTPbyJdNC6X14FyWFzVh4BBnig,6657
|
|
88
109
|
code_puppy/command_line/mcp/stop_all_command.py,sha256=33mRvxd2cBbTXE6BSkSzFmdDOT4yCxwGEDrHczqpavw,3864
|
|
89
110
|
code_puppy/command_line/mcp/stop_command.py,sha256=iMzk9h6NuUDg0hhI5eDLem5VS8IwBC7xg8AU-7jsmBE,2679
|
|
@@ -91,7 +112,7 @@ code_puppy/command_line/mcp/test_command.py,sha256=eV8u5KKClRK1M2_os1zA78b9TDuYU
|
|
|
91
112
|
code_puppy/command_line/mcp/utils.py,sha256=0Wt4ttYgSlVvtusYmBLKXSkjAjcsDiUxcZQAoFLUNnE,3625
|
|
92
113
|
code_puppy/command_line/mcp/wizard_utils.py,sha256=M5X8RchkQujKYKORsXJnUq2kJHzmNfutIUrsHmfzi7k,11126
|
|
93
114
|
code_puppy/mcp_/__init__.py,sha256=P9bmVX5UDmzQDqHMylOxuo5Hi82E30pPSMOYw8lEx7Q,1781
|
|
94
|
-
code_puppy/mcp_/async_lifecycle.py,sha256=
|
|
115
|
+
code_puppy/mcp_/async_lifecycle.py,sha256=XVB73WOc2_sWi0ySWh_h6n5a-xtt72BGvtajyeoKW20,9014
|
|
95
116
|
code_puppy/mcp_/blocking_startup.py,sha256=27R2wwLVDu5i19IP90KmCn_zHrvVcHVNU8d9c8EcTeI,14780
|
|
96
117
|
code_puppy/mcp_/captured_stdio_server.py,sha256=t_mnCjtiopRsyi4Aa97rFzDVxEQmb-u94sWJsj2FP8k,8925
|
|
97
118
|
code_puppy/mcp_/circuit_breaker.py,sha256=a83YwXux9h4R6zBWBUrCIqtp2ffyl7JZEoK2tErG_0I,8601
|
|
@@ -99,8 +120,8 @@ code_puppy/mcp_/config_wizard.py,sha256=JNNpgnSD6PFSyS3pTdEdD164oXd2VKp4VHLSz3To
|
|
|
99
120
|
code_puppy/mcp_/dashboard.py,sha256=VtaFxLtPnbM_HL2TXRDAg6IqcM-EcFkoghGgkfhMrKI,9417
|
|
100
121
|
code_puppy/mcp_/error_isolation.py,sha256=mpPBiH17zTXPsOEAn9WmkbwQwnt4gmgiaWv87JBJbUo,12426
|
|
101
122
|
code_puppy/mcp_/health_monitor.py,sha256=n5R6EeYOYbUucUFe74qGWCU3g6Mep5UEQbLF0wbT0dU,19688
|
|
102
|
-
code_puppy/mcp_/managed_server.py,sha256=
|
|
103
|
-
code_puppy/mcp_/manager.py,sha256=
|
|
123
|
+
code_puppy/mcp_/managed_server.py,sha256=e-DetKb3bVgdLYw7miTptLAbqhRgZ1cNoTGS0fh4Noo,15371
|
|
124
|
+
code_puppy/mcp_/manager.py,sha256=_2ZRTLS8Sf3SMgEpAHl-wXBDYVqg2l-j9uI9EkfCNaE,31062
|
|
104
125
|
code_puppy/mcp_/mcp_logs.py,sha256=o4pSHwELWIjEjqhfaMMEGrBvb159-VIgUp21E707BPo,6264
|
|
105
126
|
code_puppy/mcp_/registry.py,sha256=U_t12WQ-En-KGyZoiTYdqlhp9NkDTWafu8g5InvF2NM,15774
|
|
106
127
|
code_puppy/mcp_/retry_manager.py,sha256=evVxbtrsHNyo8UoI7zpO-NVDegibn82RLlgN8VKewA8,10665
|
|
@@ -108,23 +129,24 @@ code_puppy/mcp_/server_registry_catalog.py,sha256=fr_wsr99BphnaDiPLcN60t4Mp62lbt
|
|
|
108
129
|
code_puppy/mcp_/status_tracker.py,sha256=uekxrzkzIWrv3OfSVgblaPuoGFcAh_dBYwCcaHZ_CrM,12183
|
|
109
130
|
code_puppy/mcp_/system_tools.py,sha256=7_oR8k0c8YjtCcYF9g7A946oAGuKOf_i-92aJH7VmlQ,7331
|
|
110
131
|
code_puppy/mcp_/examples/retry_example.py,sha256=Qi5K6cNmhc5-zncZa0F_dkJUEdZ6OIgt1xfG5PUxt3Q,7234
|
|
111
|
-
code_puppy/messaging/__init__.py,sha256=
|
|
132
|
+
code_puppy/messaging/__init__.py,sha256=PmQWdm0f9RBv8I7Km3qU_OCUiBqxHIDenN9DKELzQCE,6832
|
|
112
133
|
code_puppy/messaging/bus.py,sha256=TbdltJ0D5tqnaE4irq1fcXllDYm-mQ_SiX1IFm-S4sw,21406
|
|
113
134
|
code_puppy/messaging/commands.py,sha256=77CtKVNaF5KS3Xyzd0ccDAisZWQxL3weVEt3J-SfYxo,5464
|
|
114
135
|
code_puppy/messaging/markdown_patches.py,sha256=dMIJozzJChuHa8QNMSEz_kC-dyt7kZiDLZ7rjthbcmg,1626
|
|
115
|
-
code_puppy/messaging/message_queue.py,sha256=
|
|
116
|
-
code_puppy/messaging/messages.py,sha256=
|
|
117
|
-
code_puppy/messaging/queue_console.py,sha256=
|
|
136
|
+
code_puppy/messaging/message_queue.py,sha256=1-5NFWIes5kpecsKnhuQQJPeT0-X102Xi1-IwXUM5_Y,11430
|
|
137
|
+
code_puppy/messaging/messages.py,sha256=wiDnsuFe9P-dWrzfeBwD2_zEdbDKTInCAK7rFMnex9I,17614
|
|
138
|
+
code_puppy/messaging/queue_console.py,sha256=Xp-rFEpaOtMi-qHvgCi9QTNvTiNgaZ9qXubddOOmImE,9983
|
|
118
139
|
code_puppy/messaging/renderers.py,sha256=GHVtMnxE1pJ-yrcRjacY81JcjlHRz3UVHzp-ohN-CGE,12058
|
|
119
|
-
code_puppy/messaging/rich_renderer.py,sha256=
|
|
120
|
-
code_puppy/messaging/
|
|
140
|
+
code_puppy/messaging/rich_renderer.py,sha256=EkncFhKzoKTaFcTK23KcJ4VOiaMunILYg643lT_wlng,39114
|
|
141
|
+
code_puppy/messaging/subagent_console.py,sha256=HkqYPxYly24Gr1c0m8fa-RsUFA4JJpVCyA7oM0MNdv0,15976
|
|
142
|
+
code_puppy/messaging/spinner/__init__.py,sha256=eR221vdrDT7CtY3O7cLvIcPViazjNdpX0Oyqa3xpPSQ,2304
|
|
121
143
|
code_puppy/messaging/spinner/console_spinner.py,sha256=YIReuWPD01YPy58FqWdMDWj2QhauTUxKo675Ub4-eDA,8451
|
|
122
144
|
code_puppy/messaging/spinner/spinner_base.py,sha256=JiQDAhCfwrWUFunb8Xcj1caEl34JJY7Bcio7mDeckSc,2694
|
|
123
145
|
code_puppy/plugins/__init__.py,sha256=gWgrXWoFpl-3Mxz2DAvxKW6SkCWrOnw-hKsY9O7nHcI,6710
|
|
124
146
|
code_puppy/plugins/oauth_puppy_html.py,sha256=Wpa-V_NlRiBAvo_OXHuR7wvOH_jSt8L9HSFGiab6xI0,13058
|
|
125
147
|
code_puppy/plugins/antigravity_oauth/__init__.py,sha256=1miHihSqRNXO20Vh_Gn9M3Aa2szh0gtdSCaKKj9nq0Q,362
|
|
126
148
|
code_puppy/plugins/antigravity_oauth/accounts.py,sha256=GQit2-K24bsopmTZyscFUq3M0cAEO5WutHWnipVdgz8,14304
|
|
127
|
-
code_puppy/plugins/antigravity_oauth/antigravity_model.py,sha256=
|
|
149
|
+
code_puppy/plugins/antigravity_oauth/antigravity_model.py,sha256=T81dp_j59BAKxcE8lIt3XKJQVB9Wb0IFugcNeR8mdVQ,29195
|
|
128
150
|
code_puppy/plugins/antigravity_oauth/config.py,sha256=BoQgqf5I2XoHWnBBo9vhCIc_XwPj9Mbp0Z95ygWwt78,1362
|
|
129
151
|
code_puppy/plugins/antigravity_oauth/constants.py,sha256=qsrA10JJvzNuY0OobvvwCQcoGpILBninllcUUMKkUrQ,4644
|
|
130
152
|
code_puppy/plugins/antigravity_oauth/oauth.py,sha256=ZHXJtZP63l6brOpX1WdLfuUClIleA79-4y36YUJc6Wo,15137
|
|
@@ -132,7 +154,7 @@ code_puppy/plugins/antigravity_oauth/register_callbacks.py,sha256=uKIvfzH-dXj1g_
|
|
|
132
154
|
code_puppy/plugins/antigravity_oauth/storage.py,sha256=LW1DkY6Z-GRbBDrIitT6glKemZptp3NzldIrLRqTAK0,8971
|
|
133
155
|
code_puppy/plugins/antigravity_oauth/test_plugin.py,sha256=n0kjFG8Vt2n1j0GgTRSdSyhF0t9xxE8Ht60SH5CSwzw,11027
|
|
134
156
|
code_puppy/plugins/antigravity_oauth/token.py,sha256=WbiFCkrZvChpGXvwIYsJMgqU9xdJ81KwR062lFlnL3U,5038
|
|
135
|
-
code_puppy/plugins/antigravity_oauth/transport.py,sha256=
|
|
157
|
+
code_puppy/plugins/antigravity_oauth/transport.py,sha256=GykwfwDmru5bw5WqGyVgxALQ_UyshMSmtDXsUfdgbD4,27729
|
|
136
158
|
code_puppy/plugins/antigravity_oauth/utils.py,sha256=mXHRv0l07r27VjtSsIy9rlpkUheP88RaM4x4M0O1mMY,5401
|
|
137
159
|
code_puppy/plugins/chatgpt_oauth/__init__.py,sha256=Kjc6Hsz1sWvMD2OdAlWZvJRiKJSj4fx22boa-aVFKjA,189
|
|
138
160
|
code_puppy/plugins/chatgpt_oauth/config.py,sha256=H_wAH9Duyn8WH2Kq8oe72uda-_4qu1uXLPun_SDdtsk,2023
|
|
@@ -153,32 +175,41 @@ code_puppy/plugins/example_custom_command/README.md,sha256=5c5Zkm7CW6BDSfe3WoLU7
|
|
|
153
175
|
code_puppy/plugins/example_custom_command/register_callbacks.py,sha256=1vkch42NISx1BiWivcT7Va8fRV2evTOS8zFtRWS18us,1658
|
|
154
176
|
code_puppy/plugins/file_permission_handler/__init__.py,sha256=yuR7qt2pTQ-E2DLf4aIy16cAiuaTKX6x1Zixs54PZFo,144
|
|
155
177
|
code_puppy/plugins/file_permission_handler/register_callbacks.py,sha256=QlUqENkbN8e6lv1hjFixNPANwyQ1o2fQQkzerEXar94,17968
|
|
178
|
+
code_puppy/plugins/frontend_emitter/__init__.py,sha256=4_o6anYxDpJGvKyMomRy4FfLXZx6VOLnX0PcZIL-fws,661
|
|
179
|
+
code_puppy/plugins/frontend_emitter/emitter.py,sha256=GNcnoKLPAjrD_see82nuRutZEHxXwb2aUEKR4K8TJvQ,3787
|
|
180
|
+
code_puppy/plugins/frontend_emitter/register_callbacks.py,sha256=3j7Emn3VeWSJSN9ozZ_Z78ZU8JvN7yfJNQ4bSH2KGdE,7704
|
|
156
181
|
code_puppy/plugins/shell_safety/__init__.py,sha256=B-RYLWKlvrws9XCHG1Z99mBMC3VC394HAlMOhhCoGGI,243
|
|
157
182
|
code_puppy/plugins/shell_safety/agent_shell_safety.py,sha256=5JutYlzzTzyFcbFujlNkV4NunVvD5QIpOSumjS3Fjc8,2408
|
|
158
183
|
code_puppy/plugins/shell_safety/command_cache.py,sha256=adYtSPNVOZfW_6dQdtEihO6E-JYXYrdvlS1Cl7xBkDU,4546
|
|
159
184
|
code_puppy/plugins/shell_safety/register_callbacks.py,sha256=W3v664RR48Fdbbbltf_NnX22_Ahw2AvAOtvXvWc7KxQ,7322
|
|
185
|
+
code_puppy/prompts/antigravity_system_prompt.md,sha256=ZaTfRyY57ttROyZMmOBtqZQu1to7sdTNTv8_0fTgPNw,6807
|
|
160
186
|
code_puppy/prompts/codex_system_prompt.md,sha256=hEFTCziroLqZmqNle5kG34A8kvTteOWezCiVrAEKhE0,24400
|
|
161
|
-
code_puppy/tools/__init__.py,sha256=
|
|
162
|
-
code_puppy/tools/agent_tools.py,sha256=
|
|
163
|
-
code_puppy/tools/command_runner.py,sha256=
|
|
164
|
-
code_puppy/tools/common.py,sha256=
|
|
187
|
+
code_puppy/tools/__init__.py,sha256=9bzVIjX9CAr2YTZkhD7IWFYt4KpnFRx6ge_Tqazugbs,7425
|
|
188
|
+
code_puppy/tools/agent_tools.py,sha256=XvBQ_IPa4NHLmIA2mdyPwy9GPlYGQwhtdn-w_3i239g,25517
|
|
189
|
+
code_puppy/tools/command_runner.py,sha256=Sresr_ykou_c2V1sKoNxqrqCQovKF5yDiQJ8r3E9lak,50995
|
|
190
|
+
code_puppy/tools/common.py,sha256=lVtF94cn6jtC5YKfitV7L3rk37Ts2gMoHLQrqDFD2E4,46411
|
|
191
|
+
code_puppy/tools/display.py,sha256=-ulDyq55178f8O_TAEmnxGoy_ZdFkbHBw-W4ul851GM,2675
|
|
165
192
|
code_puppy/tools/file_modifications.py,sha256=vz9n7R0AGDSdLUArZr_55yJLkyI30M8zreAppxIx02M,29380
|
|
166
193
|
code_puppy/tools/file_operations.py,sha256=CqhpuBnOFOcQCIYXOujskxq2VMLWYJhibYrH0YcPSfA,35692
|
|
194
|
+
code_puppy/tools/subagent_context.py,sha256=zsiKV3B3DxZ_Y5IHHhtE-SMFDg_jMrY7Hi6r5LH--IU,4781
|
|
167
195
|
code_puppy/tools/tools_content.py,sha256=bsBqW-ppd1XNAS_g50B3UHDQBWEALC1UneH6-afz1zo,2365
|
|
168
|
-
code_puppy/tools/browser/__init__.py,sha256=
|
|
169
|
-
code_puppy/tools/browser/browser_control.py,sha256=
|
|
170
|
-
code_puppy/tools/browser/browser_interactions.py,sha256=
|
|
171
|
-
code_puppy/tools/browser/browser_locators.py,sha256=
|
|
172
|
-
code_puppy/tools/browser/browser_navigation.py,sha256=
|
|
173
|
-
code_puppy/tools/browser/browser_screenshot.py,sha256=
|
|
174
|
-
code_puppy/tools/browser/browser_scripts.py,sha256=
|
|
196
|
+
code_puppy/tools/browser/__init__.py,sha256=SPiEQwsDj5KoxDwX_viNUKFsn4tczxY-Jq2C64EzSNI,927
|
|
197
|
+
code_puppy/tools/browser/browser_control.py,sha256=YntpjfWTIv0TDlAO5BqTV_hDbUBw-8wmMn29K3TDQo0,8430
|
|
198
|
+
code_puppy/tools/browser/browser_interactions.py,sha256=ZyJmA2-ZtIATF76uGMt08cfVaYiqg7W2-cHfAzNI0F8,16775
|
|
199
|
+
code_puppy/tools/browser/browser_locators.py,sha256=sxXNm-K087poeSp7Um5Gc1sZxb7HlSZOu0F0r2b0ty8,19177
|
|
200
|
+
code_puppy/tools/browser/browser_navigation.py,sha256=RJdG14UXtA6wz4PNLw2Tqeu4oUDQilOyNbyTjgIFCrY,7416
|
|
201
|
+
code_puppy/tools/browser/browser_screenshot.py,sha256=AJe9JbZv8vC93AFWzsAUlrg1YNshv4SWNde-O-_mfQU,6282
|
|
202
|
+
code_puppy/tools/browser/browser_scripts.py,sha256=CYWdQMtjKTNvJNSCkB2vGo-MOzmT_gw2oFMGtkfuzuA,14779
|
|
175
203
|
code_puppy/tools/browser/browser_workflows.py,sha256=nitW42vCf0ieTX1gLabozTugNQ8phtoFzZbiAhw1V90,6491
|
|
176
|
-
code_puppy/tools/browser/camoufox_manager.py,sha256=
|
|
177
|
-
code_puppy/tools/browser/
|
|
178
|
-
code_puppy
|
|
179
|
-
code_puppy
|
|
180
|
-
code_puppy
|
|
181
|
-
code_puppy-0.0.
|
|
182
|
-
code_puppy-0.0.
|
|
183
|
-
code_puppy-0.0.
|
|
184
|
-
code_puppy-0.0.
|
|
204
|
+
code_puppy/tools/browser/camoufox_manager.py,sha256=WIr98SrGeC5jd6jX5tjhFR6A3janqV4tq9Mbznnlh44,13920
|
|
205
|
+
code_puppy/tools/browser/chromium_terminal_manager.py,sha256=w1thQ_ACb6oV45L93TSqPQD0o0cTh3FqT5I9zcOOWlM,8226
|
|
206
|
+
code_puppy/tools/browser/terminal_command_tools.py,sha256=9byOZku-dwvTtCl532xt7Lumed_jTn0sLvUe_X75XCQ,19068
|
|
207
|
+
code_puppy/tools/browser/terminal_screenshot_tools.py,sha256=J_21YO_495NvYgNFu9KQP6VYg2K_f8CtSdZuF94Yhnw,18448
|
|
208
|
+
code_puppy/tools/browser/terminal_tools.py,sha256=F5LjVH3udSCFHmqC3O1UJLoLozZFZsEdX42jOmkqkW0,17853
|
|
209
|
+
code_puppy-0.0.361.data/data/code_puppy/models.json,sha256=FMQdE_yvP_8y0xxt3K918UkFL9cZMYAqW1SfXcQkU_k,3105
|
|
210
|
+
code_puppy-0.0.361.data/data/code_puppy/models_dev_api.json,sha256=wHjkj-IM_fx1oHki6-GqtOoCrRMR0ScK0f-Iz0UEcy8,548187
|
|
211
|
+
code_puppy-0.0.361.dist-info/METADATA,sha256=AkNpl1g19rE0ZEPI-0MWepw8wFq_zLHhe8o_dVlYaRQ,27614
|
|
212
|
+
code_puppy-0.0.361.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
213
|
+
code_puppy-0.0.361.dist-info/entry_points.txt,sha256=Tp4eQC99WY3HOKd3sdvb22vZODRq0XkZVNpXOag_KdI,91
|
|
214
|
+
code_puppy-0.0.361.dist-info/licenses/LICENSE,sha256=31u8x0SPgdOq3izJX41kgFazWsM43zPEF9eskzqbJMY,1075
|
|
215
|
+
code_puppy-0.0.361.dist-info/RECORD,,
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
MCP Add Command - Adds new MCP servers from JSON configuration or wizard.
|
|
3
|
-
"""
|
|
4
|
-
|
|
5
|
-
import json
|
|
6
|
-
import logging
|
|
7
|
-
import os
|
|
8
|
-
from typing import List, Optional
|
|
9
|
-
|
|
10
|
-
from code_puppy.messaging import emit_error, emit_info
|
|
11
|
-
|
|
12
|
-
from .base import MCPCommandBase
|
|
13
|
-
from .wizard_utils import run_interactive_install_wizard
|
|
14
|
-
|
|
15
|
-
# Configure logging
|
|
16
|
-
logger = logging.getLogger(__name__)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
class AddCommand(MCPCommandBase):
|
|
20
|
-
"""
|
|
21
|
-
Command handler for adding MCP servers.
|
|
22
|
-
|
|
23
|
-
Adds new MCP servers from JSON configuration or interactive wizard.
|
|
24
|
-
"""
|
|
25
|
-
|
|
26
|
-
def execute(self, args: List[str], group_id: Optional[str] = None) -> None:
|
|
27
|
-
"""
|
|
28
|
-
Add a new MCP server from JSON configuration or launch wizard.
|
|
29
|
-
|
|
30
|
-
Usage:
|
|
31
|
-
/mcp add - Launch interactive wizard
|
|
32
|
-
/mcp add <json> - Add server from JSON config
|
|
33
|
-
|
|
34
|
-
Example JSON:
|
|
35
|
-
/mcp add {"name": "test", "type": "stdio", "command": "echo", "args": ["hello"]}
|
|
36
|
-
|
|
37
|
-
Args:
|
|
38
|
-
args: Command arguments - JSON config or empty for wizard
|
|
39
|
-
group_id: Optional message group ID for grouping related messages
|
|
40
|
-
"""
|
|
41
|
-
if group_id is None:
|
|
42
|
-
group_id = self.generate_group_id()
|
|
43
|
-
|
|
44
|
-
try:
|
|
45
|
-
if args:
|
|
46
|
-
# Parse JSON from arguments
|
|
47
|
-
json_str = " ".join(args)
|
|
48
|
-
|
|
49
|
-
try:
|
|
50
|
-
config_dict = json.loads(json_str)
|
|
51
|
-
except json.JSONDecodeError as e:
|
|
52
|
-
emit_info(f"Invalid JSON: {e}", message_group=group_id)
|
|
53
|
-
emit_info(
|
|
54
|
-
"Usage: /mcp add <json> or /mcp add (for wizard)",
|
|
55
|
-
message_group=group_id,
|
|
56
|
-
)
|
|
57
|
-
emit_info(
|
|
58
|
-
'Example: /mcp add {"name": "test", "type": "stdio", "command": "echo"}',
|
|
59
|
-
message_group=group_id,
|
|
60
|
-
)
|
|
61
|
-
return
|
|
62
|
-
|
|
63
|
-
# Validate required fields
|
|
64
|
-
if "name" not in config_dict:
|
|
65
|
-
emit_info("Missing required field: 'name'", message_group=group_id)
|
|
66
|
-
return
|
|
67
|
-
if "type" not in config_dict:
|
|
68
|
-
emit_info("Missing required field: 'type'", message_group=group_id)
|
|
69
|
-
return
|
|
70
|
-
|
|
71
|
-
# Add the server
|
|
72
|
-
success = self._add_server_from_json(config_dict, group_id)
|
|
73
|
-
|
|
74
|
-
if success:
|
|
75
|
-
# Reload MCP servers
|
|
76
|
-
try:
|
|
77
|
-
from code_puppy.agent import reload_mcp_servers
|
|
78
|
-
|
|
79
|
-
reload_mcp_servers()
|
|
80
|
-
except ImportError:
|
|
81
|
-
pass
|
|
82
|
-
|
|
83
|
-
emit_info(
|
|
84
|
-
"Use '/mcp list' to see all servers", message_group=group_id
|
|
85
|
-
)
|
|
86
|
-
|
|
87
|
-
else:
|
|
88
|
-
# No arguments - launch interactive wizard with server templates
|
|
89
|
-
success = run_interactive_install_wizard(self.manager, group_id)
|
|
90
|
-
|
|
91
|
-
if success:
|
|
92
|
-
# Reload the agent to pick up new server
|
|
93
|
-
try:
|
|
94
|
-
from code_puppy.agent import reload_mcp_servers
|
|
95
|
-
|
|
96
|
-
reload_mcp_servers()
|
|
97
|
-
except ImportError:
|
|
98
|
-
pass
|
|
99
|
-
|
|
100
|
-
except ImportError as e:
|
|
101
|
-
logger.error(f"Failed to import: {e}")
|
|
102
|
-
emit_info("Required module not available", message_group=group_id)
|
|
103
|
-
except Exception as e:
|
|
104
|
-
logger.error(f"Error in add command: {e}")
|
|
105
|
-
emit_error(f"Error adding server: {e}", message_group=group_id)
|
|
106
|
-
|
|
107
|
-
def _add_server_from_json(self, config_dict: dict, group_id: str) -> bool:
|
|
108
|
-
"""
|
|
109
|
-
Add a server from JSON configuration.
|
|
110
|
-
|
|
111
|
-
Args:
|
|
112
|
-
config_dict: Server configuration dictionary
|
|
113
|
-
group_id: Message group ID
|
|
114
|
-
|
|
115
|
-
Returns:
|
|
116
|
-
True if successful, False otherwise
|
|
117
|
-
"""
|
|
118
|
-
try:
|
|
119
|
-
from code_puppy.config import MCP_SERVERS_FILE
|
|
120
|
-
from code_puppy.mcp_.managed_server import ServerConfig
|
|
121
|
-
|
|
122
|
-
# Extract required fields
|
|
123
|
-
name = config_dict.pop("name")
|
|
124
|
-
server_type = config_dict.pop("type")
|
|
125
|
-
enabled = config_dict.pop("enabled", True)
|
|
126
|
-
|
|
127
|
-
# Everything else goes into config
|
|
128
|
-
server_config = ServerConfig(
|
|
129
|
-
id=f"{name}_{hash(name)}",
|
|
130
|
-
name=name,
|
|
131
|
-
type=server_type,
|
|
132
|
-
enabled=enabled,
|
|
133
|
-
config=config_dict, # Remaining fields are server-specific config
|
|
134
|
-
)
|
|
135
|
-
|
|
136
|
-
# Register the server
|
|
137
|
-
server_id = self.manager.register_server(server_config)
|
|
138
|
-
|
|
139
|
-
if not server_id:
|
|
140
|
-
emit_info(f"Failed to add server '{name}'", message_group=group_id)
|
|
141
|
-
return False
|
|
142
|
-
|
|
143
|
-
emit_info(
|
|
144
|
-
f"✅ Added server '{name}' (ID: {server_id})", message_group=group_id
|
|
145
|
-
)
|
|
146
|
-
|
|
147
|
-
# Save to mcp_servers.json for persistence
|
|
148
|
-
if os.path.exists(MCP_SERVERS_FILE):
|
|
149
|
-
with open(MCP_SERVERS_FILE, "r") as f:
|
|
150
|
-
data = json.load(f)
|
|
151
|
-
servers = data.get("mcp_servers", {})
|
|
152
|
-
else:
|
|
153
|
-
servers = {}
|
|
154
|
-
data = {"mcp_servers": servers}
|
|
155
|
-
|
|
156
|
-
# Add new server
|
|
157
|
-
servers[name] = config_dict.copy()
|
|
158
|
-
servers[name]["type"] = server_type
|
|
159
|
-
|
|
160
|
-
# Save back
|
|
161
|
-
os.makedirs(os.path.dirname(MCP_SERVERS_FILE), exist_ok=True)
|
|
162
|
-
with open(MCP_SERVERS_FILE, "w") as f:
|
|
163
|
-
json.dump(data, f, indent=2)
|
|
164
|
-
|
|
165
|
-
return True
|
|
166
|
-
|
|
167
|
-
except Exception as e:
|
|
168
|
-
logger.error(f"Error adding server from JSON: {e}")
|
|
169
|
-
emit_error(f"Failed to add server: {e}", message_group=group_id)
|
|
170
|
-
return False
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
"""Utilities for running visual question-answering via pydantic-ai."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
from functools import lru_cache
|
|
6
|
-
|
|
7
|
-
from pydantic import BaseModel, Field
|
|
8
|
-
from pydantic_ai import Agent, BinaryContent
|
|
9
|
-
|
|
10
|
-
from code_puppy.config import get_use_dbos, get_vqa_model_name
|
|
11
|
-
from code_puppy.model_factory import ModelFactory
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
class VisualAnalysisResult(BaseModel):
|
|
15
|
-
"""Structured response from the VQA agent."""
|
|
16
|
-
|
|
17
|
-
answer: str
|
|
18
|
-
confidence: float = Field(ge=0.0, le=1.0)
|
|
19
|
-
observations: str
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
def _get_vqa_instructions() -> str:
|
|
23
|
-
"""Get the system instructions for the VQA agent."""
|
|
24
|
-
return (
|
|
25
|
-
"You are a visual analysis specialist. Answer the user's question about the provided image. "
|
|
26
|
-
"Always respond using the structured schema: answer, confidence (0-1 float), observations. "
|
|
27
|
-
"Confidence reflects how certain you are about the answer. Observations should include useful, concise context."
|
|
28
|
-
)
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
@lru_cache(maxsize=1)
|
|
32
|
-
def _load_vqa_agent(model_name: str) -> Agent[None, VisualAnalysisResult]:
|
|
33
|
-
"""Create a cached agent instance for visual analysis."""
|
|
34
|
-
from code_puppy.model_utils import prepare_prompt_for_model
|
|
35
|
-
|
|
36
|
-
models_config = ModelFactory.load_config()
|
|
37
|
-
model = ModelFactory.get_model(model_name, models_config)
|
|
38
|
-
|
|
39
|
-
# Handle claude-code models: swap instructions (prompt prepending happens in run_vqa_analysis)
|
|
40
|
-
instructions = _get_vqa_instructions()
|
|
41
|
-
prepared = prepare_prompt_for_model(
|
|
42
|
-
model_name, instructions, "", prepend_system_to_user=False
|
|
43
|
-
)
|
|
44
|
-
instructions = prepared.instructions
|
|
45
|
-
|
|
46
|
-
vqa_agent = Agent(
|
|
47
|
-
model=model,
|
|
48
|
-
instructions=instructions,
|
|
49
|
-
output_type=VisualAnalysisResult,
|
|
50
|
-
retries=2,
|
|
51
|
-
)
|
|
52
|
-
|
|
53
|
-
if get_use_dbos():
|
|
54
|
-
from pydantic_ai.durable_exec.dbos import DBOSAgent
|
|
55
|
-
|
|
56
|
-
dbos_agent = DBOSAgent(vqa_agent, name="vqa-agent")
|
|
57
|
-
return dbos_agent
|
|
58
|
-
|
|
59
|
-
return vqa_agent
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
def _get_vqa_agent() -> Agent[None, VisualAnalysisResult]:
|
|
63
|
-
"""Return a cached VQA agent configured with the current model."""
|
|
64
|
-
model_name = get_vqa_model_name()
|
|
65
|
-
# lru_cache keyed by model_name ensures refresh when configuration changes
|
|
66
|
-
return _load_vqa_agent(model_name)
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
def run_vqa_analysis(
|
|
70
|
-
question: str,
|
|
71
|
-
image_bytes: bytes,
|
|
72
|
-
media_type: str = "image/png",
|
|
73
|
-
) -> VisualAnalysisResult:
|
|
74
|
-
"""Execute the VQA agent synchronously against screenshot bytes."""
|
|
75
|
-
from code_puppy.model_utils import prepare_prompt_for_model
|
|
76
|
-
|
|
77
|
-
agent = _get_vqa_agent()
|
|
78
|
-
|
|
79
|
-
# Handle claude-code models: prepend system prompt to user question
|
|
80
|
-
model_name = get_vqa_model_name()
|
|
81
|
-
prepared = prepare_prompt_for_model(model_name, _get_vqa_instructions(), question)
|
|
82
|
-
question = prepared.user_prompt
|
|
83
|
-
|
|
84
|
-
result = agent.run_sync(
|
|
85
|
-
[
|
|
86
|
-
question,
|
|
87
|
-
BinaryContent(data=image_bytes, media_type=media_type),
|
|
88
|
-
]
|
|
89
|
-
)
|
|
90
|
-
return result.output
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|