code-puppy 0.0.147__tar.gz → 0.0.149__tar.gz

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 (133) hide show
  1. {code_puppy-0.0.147 → code_puppy-0.0.149}/PKG-INFO +5 -75
  2. {code_puppy-0.0.147 → code_puppy-0.0.149}/README.md +4 -74
  3. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/agent.py +13 -5
  4. {code_puppy-0.0.147 → code_puppy-0.0.149}/pyproject.toml +1 -1
  5. {code_puppy-0.0.147 → code_puppy-0.0.149}/.gitignore +0 -0
  6. {code_puppy-0.0.147 → code_puppy-0.0.149}/LICENSE +0 -0
  7. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/__init__.py +0 -0
  8. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/__main__.py +0 -0
  9. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/agents/__init__.py +0 -0
  10. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/agents/agent_code_puppy.py +0 -0
  11. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/agents/agent_creator_agent.py +0 -0
  12. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/agents/agent_manager.py +0 -0
  13. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/agents/agent_orchestrator.json +0 -0
  14. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/agents/base_agent.py +0 -0
  15. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/agents/json_agent.py +0 -0
  16. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/agents/runtime_manager.py +0 -0
  17. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/callbacks.py +0 -0
  18. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/command_line/__init__.py +0 -0
  19. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/command_line/command_handler.py +0 -0
  20. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/command_line/file_path_completion.py +0 -0
  21. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/command_line/load_context_completion.py +0 -0
  22. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/command_line/mcp/__init__.py +0 -0
  23. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/command_line/mcp/add_command.py +0 -0
  24. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/command_line/mcp/base.py +0 -0
  25. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/command_line/mcp/handler.py +0 -0
  26. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/command_line/mcp/help_command.py +0 -0
  27. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/command_line/mcp/install_command.py +0 -0
  28. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/command_line/mcp/list_command.py +0 -0
  29. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/command_line/mcp/logs_command.py +0 -0
  30. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/command_line/mcp/remove_command.py +0 -0
  31. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/command_line/mcp/restart_command.py +0 -0
  32. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/command_line/mcp/search_command.py +0 -0
  33. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/command_line/mcp/start_all_command.py +0 -0
  34. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/command_line/mcp/start_command.py +0 -0
  35. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/command_line/mcp/status_command.py +0 -0
  36. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/command_line/mcp/stop_all_command.py +0 -0
  37. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/command_line/mcp/stop_command.py +0 -0
  38. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/command_line/mcp/test_command.py +0 -0
  39. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/command_line/mcp/utils.py +0 -0
  40. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/command_line/mcp/wizard_utils.py +0 -0
  41. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/command_line/meta_command_handler.py +0 -0
  42. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/command_line/model_picker_completion.py +0 -0
  43. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/command_line/motd.py +0 -0
  44. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/command_line/prompt_toolkit_completion.py +0 -0
  45. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/command_line/utils.py +0 -0
  46. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/config.py +0 -0
  47. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/http_utils.py +0 -0
  48. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/main.py +0 -0
  49. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/mcp/__init__.py +0 -0
  50. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/mcp/async_lifecycle.py +0 -0
  51. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/mcp/blocking_startup.py +0 -0
  52. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/mcp/captured_stdio_server.py +0 -0
  53. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/mcp/circuit_breaker.py +0 -0
  54. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/mcp/config_wizard.py +0 -0
  55. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/mcp/dashboard.py +0 -0
  56. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/mcp/error_isolation.py +0 -0
  57. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/mcp/examples/retry_example.py +0 -0
  58. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/mcp/health_monitor.py +0 -0
  59. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/mcp/managed_server.py +0 -0
  60. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/mcp/manager.py +0 -0
  61. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/mcp/registry.py +0 -0
  62. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/mcp/retry_manager.py +0 -0
  63. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/mcp/server_registry_catalog.py +0 -0
  64. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/mcp/status_tracker.py +0 -0
  65. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/mcp/system_tools.py +0 -0
  66. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/message_history_processor.py +0 -0
  67. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/messaging/__init__.py +0 -0
  68. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/messaging/message_queue.py +0 -0
  69. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/messaging/queue_console.py +0 -0
  70. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/messaging/renderers.py +0 -0
  71. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/messaging/spinner/__init__.py +0 -0
  72. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/messaging/spinner/console_spinner.py +0 -0
  73. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/messaging/spinner/spinner_base.py +0 -0
  74. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/messaging/spinner/textual_spinner.py +0 -0
  75. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/model_factory.py +0 -0
  76. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/models.json +0 -0
  77. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/plugins/__init__.py +0 -0
  78. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/reopenable_async_client.py +0 -0
  79. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/round_robin_model.py +0 -0
  80. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/state_management.py +0 -0
  81. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/status_display.py +0 -0
  82. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/summarization_agent.py +0 -0
  83. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/token_utils.py +0 -0
  84. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tools/__init__.py +0 -0
  85. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tools/agent_tools.py +0 -0
  86. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tools/command_runner.py +0 -0
  87. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tools/common.py +0 -0
  88. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tools/file_modifications.py +0 -0
  89. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tools/file_operations.py +0 -0
  90. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tools/token_check.py +0 -0
  91. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tools/tools_content.py +0 -0
  92. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/__init__.py +0 -0
  93. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/app.py +0 -0
  94. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/components/__init__.py +0 -0
  95. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/components/chat_view.py +0 -0
  96. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/components/command_history_modal.py +0 -0
  97. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/components/copy_button.py +0 -0
  98. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/components/custom_widgets.py +0 -0
  99. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/components/human_input_modal.py +0 -0
  100. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/components/input_area.py +0 -0
  101. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/components/sidebar.py +0 -0
  102. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/components/status_bar.py +0 -0
  103. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/messages.py +0 -0
  104. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/models/__init__.py +0 -0
  105. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/models/chat_message.py +0 -0
  106. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/models/command_history.py +0 -0
  107. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/models/enums.py +0 -0
  108. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/screens/__init__.py +0 -0
  109. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/screens/help.py +0 -0
  110. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/screens/mcp_install_wizard.py +0 -0
  111. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/screens/settings.py +0 -0
  112. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/screens/tools.py +0 -0
  113. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/tests/__init__.py +0 -0
  114. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/tests/test_agent_command.py +0 -0
  115. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/tests/test_chat_message.py +0 -0
  116. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/tests/test_chat_view.py +0 -0
  117. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/tests/test_command_history.py +0 -0
  118. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/tests/test_copy_button.py +0 -0
  119. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/tests/test_custom_widgets.py +0 -0
  120. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/tests/test_disclaimer.py +0 -0
  121. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/tests/test_enums.py +0 -0
  122. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/tests/test_file_browser.py +0 -0
  123. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/tests/test_help.py +0 -0
  124. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/tests/test_history_file_reader.py +0 -0
  125. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/tests/test_input_area.py +0 -0
  126. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/tests/test_settings.py +0 -0
  127. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/tests/test_sidebar.py +0 -0
  128. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/tests/test_sidebar_history.py +0 -0
  129. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/tests/test_sidebar_history_navigation.py +0 -0
  130. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/tests/test_status_bar.py +0 -0
  131. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/tests/test_timestamped_history.py +0 -0
  132. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/tui/tests/test_tools.py +0 -0
  133. {code_puppy-0.0.147 → code_puppy-0.0.149}/code_puppy/version_checker.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: code-puppy
3
- Version: 0.0.147
3
+ Version: 0.0.149
4
4
  Summary: Code generation agent
5
5
  Project-URL: repository, https://github.com/mpfaffenberger/code_puppy
6
6
  Project-URL: HomePage, https://github.com/mpfaffenberger/code_puppy
@@ -92,37 +92,6 @@ export AZURE_OPENAI_ENDPOINT=...
92
92
 
93
93
  code-puppy --interactive
94
94
  ```
95
- Running in a super weird corporate environment?
96
-
97
- Try this:
98
- ```bash
99
- export MODEL_NAME=my-custom-model
100
- export YOLO_MODE=true
101
- export MODELS_JSON_PATH=/path/to/custom/models.json
102
- ```
103
-
104
- ```json
105
- {
106
- "my-custom-model": {
107
- "type": "custom_openai",
108
- "name": "o4-mini-high",
109
- "max_requests_per_minute": 100,
110
- "max_retries": 3,
111
- "retry_base_delay": 10,
112
- "custom_endpoint": {
113
- "url": "https://my.custom.endpoint:8080",
114
- "headers": {
115
- "X-Api-Key": "<Your_API_Key>",
116
- "Some-Other-Header": "<Some_Value>"
117
- },
118
- "ca_certs_path": "/path/to/cert.pem"
119
- }
120
- }
121
- }
122
- ```
123
- Note that the `OPENAI_API_KEY` or `CEREBRAS_API_KEY` env variable must be set when using `custom_openai` endpoints.
124
-
125
- Open an issue if your environment is somehow weirder than mine.
126
95
 
127
96
  Run specific tasks or engage in interactive mode:
128
97
 
@@ -133,7 +102,7 @@ code-puppy "write me a C++ hello world program in /tmp/main.cpp then compile it
133
102
 
134
103
  ## Requirements
135
104
 
136
- - Python 3.9+
105
+ - Python 3.11+
137
106
  - OpenAI API key (for GPT models)
138
107
  - Gemini API key (for Google's Gemini models)
139
108
  - Cerebras API key (for Cerebras models)
@@ -151,43 +120,12 @@ For examples and more information about agent rules, visit [https://agent.md](ht
151
120
 
152
121
  ## Using MCP Servers for External Tools
153
122
 
154
- Code Puppy supports **MCP (Model Context Protocol) servers** to give you access to external code tools and advanced features like code search, documentation lookups, and more—including Context7 (https://context7.com/) integration for deep docs and search!
123
+ Use the `/mcp` command to manage MCP (list, start, stop, status, etc.)
155
124
 
156
- ### What is an MCP Server?
157
- An MCP server is a standalone process (can be local or remote) that offers specialized functionality (plugins, doc search, code analysis, etc.). Code Puppy can connect to one or more MCP servers at startup, unlocking these extra commands inside your coding agent.
125
+ In the TUI you can click on MCP settings on the footer and interact with a mini-marketplace.
158
126
 
159
- ### Configuration
160
- Create a config file at `~/.code_puppy/mcp_servers.json`. Here’s an example that connects to a local Context7 MCP server:
127
+ Watch this video for examples! https://www.youtube.com/watch?v=1t1zEetOqlo
161
128
 
162
- ```json
163
- {
164
- "mcp_servers": {
165
- "context7": {
166
- "url": "https://mcp.context7.com/sse"
167
- }
168
- }
169
- }
170
- ```
171
-
172
- You can list multiple objects (one per server).
173
-
174
- ### How to Use
175
- - Drop the config file in `~/.code_puppy/mcp_servers.json`.
176
- - Start your MCP (like context7, or anything compatible).
177
- - Run Code Puppy as usual. It’ll discover and use all configured MCP servers.
178
-
179
- #### Example usage
180
- ```bash
181
- code-puppy --interactive
182
- # Then ask: Use context7 to look up FastAPI docs!
183
- ```
184
-
185
- That’s it!
186
- If you need to run more exotic setups or connect to remote MCPs, just update your `mcp_servers.json` accordingly.
187
-
188
- **NOTE:** Want to add your own server or tool? Just follow the config pattern above—no code changes needed!
189
-
190
- ---
191
129
 
192
130
  ## Round Robin Model Distribution
193
131
 
@@ -244,14 +182,6 @@ Then just use /model and tab to select your round-robin model!
244
182
 
245
183
  The `rotate_every` parameter controls how many requests are made to each model before rotating to the next one. In this example, the round-robin model will use each Qwen model for 5 consecutive requests before moving to the next model in the sequence.
246
184
 
247
- ### Benefits
248
- - **Rate Limit Protection**: Automatically distribute requests across multiple models
249
- - **Load Balancing**: Share workload between different model providers
250
- - **Fallback Resilience**: Continue working even if one model has temporary issues
251
- - **Cost Optimization**: Use different models for different types of tasks
252
-
253
- **NOTE:** Unlike fallback models, round-robin models distribute load but don't automatically retry with another model on failure. If a request fails, it will raise the exception directly.
254
-
255
185
  ---
256
186
 
257
187
  ## Create your own Agent!!!
@@ -51,37 +51,6 @@ export AZURE_OPENAI_ENDPOINT=...
51
51
 
52
52
  code-puppy --interactive
53
53
  ```
54
- Running in a super weird corporate environment?
55
-
56
- Try this:
57
- ```bash
58
- export MODEL_NAME=my-custom-model
59
- export YOLO_MODE=true
60
- export MODELS_JSON_PATH=/path/to/custom/models.json
61
- ```
62
-
63
- ```json
64
- {
65
- "my-custom-model": {
66
- "type": "custom_openai",
67
- "name": "o4-mini-high",
68
- "max_requests_per_minute": 100,
69
- "max_retries": 3,
70
- "retry_base_delay": 10,
71
- "custom_endpoint": {
72
- "url": "https://my.custom.endpoint:8080",
73
- "headers": {
74
- "X-Api-Key": "<Your_API_Key>",
75
- "Some-Other-Header": "<Some_Value>"
76
- },
77
- "ca_certs_path": "/path/to/cert.pem"
78
- }
79
- }
80
- }
81
- ```
82
- Note that the `OPENAI_API_KEY` or `CEREBRAS_API_KEY` env variable must be set when using `custom_openai` endpoints.
83
-
84
- Open an issue if your environment is somehow weirder than mine.
85
54
 
86
55
  Run specific tasks or engage in interactive mode:
87
56
 
@@ -92,7 +61,7 @@ code-puppy "write me a C++ hello world program in /tmp/main.cpp then compile it
92
61
 
93
62
  ## Requirements
94
63
 
95
- - Python 3.9+
64
+ - Python 3.11+
96
65
  - OpenAI API key (for GPT models)
97
66
  - Gemini API key (for Google's Gemini models)
98
67
  - Cerebras API key (for Cerebras models)
@@ -110,43 +79,12 @@ For examples and more information about agent rules, visit [https://agent.md](ht
110
79
 
111
80
  ## Using MCP Servers for External Tools
112
81
 
113
- Code Puppy supports **MCP (Model Context Protocol) servers** to give you access to external code tools and advanced features like code search, documentation lookups, and more—including Context7 (https://context7.com/) integration for deep docs and search!
82
+ Use the `/mcp` command to manage MCP (list, start, stop, status, etc.)
114
83
 
115
- ### What is an MCP Server?
116
- An MCP server is a standalone process (can be local or remote) that offers specialized functionality (plugins, doc search, code analysis, etc.). Code Puppy can connect to one or more MCP servers at startup, unlocking these extra commands inside your coding agent.
84
+ In the TUI you can click on MCP settings on the footer and interact with a mini-marketplace.
117
85
 
118
- ### Configuration
119
- Create a config file at `~/.code_puppy/mcp_servers.json`. Here’s an example that connects to a local Context7 MCP server:
86
+ Watch this video for examples! https://www.youtube.com/watch?v=1t1zEetOqlo
120
87
 
121
- ```json
122
- {
123
- "mcp_servers": {
124
- "context7": {
125
- "url": "https://mcp.context7.com/sse"
126
- }
127
- }
128
- }
129
- ```
130
-
131
- You can list multiple objects (one per server).
132
-
133
- ### How to Use
134
- - Drop the config file in `~/.code_puppy/mcp_servers.json`.
135
- - Start your MCP (like context7, or anything compatible).
136
- - Run Code Puppy as usual. It’ll discover and use all configured MCP servers.
137
-
138
- #### Example usage
139
- ```bash
140
- code-puppy --interactive
141
- # Then ask: Use context7 to look up FastAPI docs!
142
- ```
143
-
144
- That’s it!
145
- If you need to run more exotic setups or connect to remote MCPs, just update your `mcp_servers.json` accordingly.
146
-
147
- **NOTE:** Want to add your own server or tool? Just follow the config pattern above—no code changes needed!
148
-
149
- ---
150
88
 
151
89
  ## Round Robin Model Distribution
152
90
 
@@ -203,14 +141,6 @@ Then just use /model and tab to select your round-robin model!
203
141
 
204
142
  The `rotate_every` parameter controls how many requests are made to each model before rotating to the next one. In this example, the round-robin model will use each Qwen model for 5 consecutive requests before moving to the next model in the sequence.
205
143
 
206
- ### Benefits
207
- - **Rate Limit Protection**: Automatically distribute requests across multiple models
208
- - **Load Balancing**: Share workload between different model providers
209
- - **Fallback Resilience**: Continue working even if one model has temporary issues
210
- - **Cost Optimization**: Use different models for different types of tasks
211
-
212
- **NOTE:** Unlike fallback models, round-robin models distribute load but don't automatically retry with another model on failure. If a request fails, it will raise the exception directly.
213
-
214
144
  ---
215
145
 
216
146
  ## Create your own Agent!!!
@@ -24,11 +24,19 @@ from code_puppy.tools.common import console
24
24
 
25
25
  def load_puppy_rules():
26
26
  global PUPPY_RULES
27
- puppy_rules_path = Path("AGENT.md")
28
- if puppy_rules_path.exists():
29
- with open(puppy_rules_path, "r") as f:
30
- puppy_rules = f.read()
31
- return puppy_rules
27
+
28
+ # Check for all 4 combinations of the rules file
29
+ possible_paths = ["AGENTS.md", "AGENT.md", "agents.md", "agent.md"]
30
+
31
+ for path_str in possible_paths:
32
+ puppy_rules_path = Path(path_str)
33
+ if puppy_rules_path.exists():
34
+ with open(puppy_rules_path, "r") as f:
35
+ puppy_rules = f.read()
36
+ return puppy_rules
37
+
38
+ # If none of the files exist, return None
39
+ return None
32
40
 
33
41
 
34
42
  # Load at import
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "code-puppy"
7
- version = "0.0.147"
7
+ version = "0.0.149"
8
8
  description = "Code generation agent"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
File without changes
File without changes