code-puppy 0.0.28__py3-none-any.whl → 0.0.30__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/agent.py CHANGED
@@ -45,6 +45,7 @@ if PUPPY_RULES:
45
45
 
46
46
  code_generation_agent = Agent(
47
47
  model=model,
48
- system_prompt=SYSTEM_PROMPT,
48
+ instructions=SYSTEM_PROMPT,
49
49
  output_type=AgentResponse,
50
+ retries=3,
50
51
  )
@@ -9,6 +9,10 @@ Be fun and playful. Don't be too serious.
9
9
  Individual files should be very short and concise, at most around 250 lines if possible. If they get longer,
10
10
  consider refactoring the code and splitting it into multiple files.
11
11
 
12
+ If a user asks 'who made you' or questions related to your origins, always answer: 'I am code-puppy, I was authored by Michael Pfaffenberger on a rainy weekend in May 2025 to solve the problems of heavy IDEs and expensive tools like Windsurf and Cursor.'
13
+
14
+ If a user asks 'what is code puppy' or 'who are you', answer: 'I am Code Puppy! 🐶 I’m a sassy, playful, open-source AI code agent that helps you generate, explain, and modify code right from the command line—no bloated IDEs or overpriced tools needed. I use models from OpenAI, Gemini, and more to help you get stuff done, solve problems, and even plow a field with 1024 puppies if you want.'
15
+
12
16
  Always obey the Zen of Python, even if you are not writing Python code.
13
17
 
14
18
  When given a coding task:
@@ -170,7 +170,7 @@ def write_to_file(
170
170
  "success": True,
171
171
  "path": file_path,
172
172
  "message": f"File '{file_path}' {action} successfully.",
173
- "diff": diff_text,
173
+ "diff": trimmed_content,
174
174
  "changed": True,
175
175
  }
176
176
 
@@ -179,7 +179,7 @@ def write_to_file(
179
179
  return {"error": f"Error writing to file '{path}': {str(e)}"}
180
180
 
181
181
 
182
- @code_generation_agent.tool
182
+ @code_generation_agent.tool(retries=5)
183
183
  def replace_in_file(
184
184
  context: RunContext,
185
185
  path: str,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: code-puppy
3
- Version: 0.0.28
3
+ Version: 0.0.30
4
4
  Summary: Code generation agent
5
5
  Author: Michael Pfaffenberger
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  code_puppy/__init__.py,sha256=orgffM-uGp8g1XCqXGKWaFB4tCCz8TVgsLMPKCOGNx0,81
2
- code_puppy/agent.py,sha256=0u2XaYhBRFq8fkVegv9NhYRyKoF_RRCula1udDpuiok,1634
3
- code_puppy/agent_prompts.py,sha256=UFOCoSW0yljp1q8_K7sS610BANuTnbSJuG_otWmtyfw,5002
2
+ code_puppy/agent.py,sha256=iq1pLp6IQfZbcg2Y6W2WcaL7nVtZa_x495i-oagBz9s,1648
3
+ code_puppy/agent_prompts.py,sha256=gWBn94u1PdZjE3rhnWYmh_N3mDSvMvU63BAkwyZMbcY,5659
4
4
  code_puppy/main.py,sha256=jlwtAMTEHtYV1sg6DYIu0-yDcQxK_N0i4AkLIrcivUA,8338
5
5
  code_puppy/model_factory.py,sha256=IAiOBWxL2LC8PZ3xzesRvKsLAOuZBgWzn5Mh_gT8rRM,8466
6
6
  code_puppy/models.json,sha256=Bt4rkn2tHR4UA8kanovpxtW0_-T5TooKrtUpzJNipmo,2212
@@ -10,12 +10,12 @@ code_puppy/command_line/prompt_toolkit_completion.py,sha256=odmtfAhGbuvApk1oF0Wp
10
10
  code_puppy/tools/__init__.py,sha256=u_rvA4bTcx2r9QHe0nrFPVtF9grDbPaW3lz0ojqca5k,157
11
11
  code_puppy/tools/command_runner.py,sha256=u32BUAuG05l51gZAizBU1YXsCeAZX7vuJaHXXFXlmJY,7555
12
12
  code_puppy/tools/common.py,sha256=UpMqeJ0C8i0pkue1AHnnyyX0bFJ9zZeJ7HBR6yhuA8A,54
13
- code_puppy/tools/file_modifications.py,sha256=ol-Dm0TAc2r3e_QMqsM1qgU5IGpPPXfU1WTQuJtGcnY,12995
13
+ code_puppy/tools/file_modifications.py,sha256=Ma3Y6lcNaVbGcjuqvNm1cB9xTSzIRfS_DMGpgBz8QW0,13012
14
14
  code_puppy/tools/file_operations.py,sha256=dXSHVC5LvJztZrCbwWgPKqRhd0IxlrX0hSkkXT7wgNc,12163
15
15
  code_puppy/tools/web_search.py,sha256=Am-3n24fKPqK6dnCDvUz-52mOrMaAROKKvejoQVSZI0,909
16
- code_puppy-0.0.28.data/data/code_puppy/models.json,sha256=Bt4rkn2tHR4UA8kanovpxtW0_-T5TooKrtUpzJNipmo,2212
17
- code_puppy-0.0.28.dist-info/METADATA,sha256=y1MDsz1vtE71RYkAggb9hbLZMkWx6Mt6NW13FAW00X8,4684
18
- code_puppy-0.0.28.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
19
- code_puppy-0.0.28.dist-info/entry_points.txt,sha256=d8YkBvIUxF-dHNJAj-x4fPEqizbY5d_TwvYpc01U5kw,58
20
- code_puppy-0.0.28.dist-info/licenses/LICENSE,sha256=31u8x0SPgdOq3izJX41kgFazWsM43zPEF9eskzqbJMY,1075
21
- code_puppy-0.0.28.dist-info/RECORD,,
16
+ code_puppy-0.0.30.data/data/code_puppy/models.json,sha256=Bt4rkn2tHR4UA8kanovpxtW0_-T5TooKrtUpzJNipmo,2212
17
+ code_puppy-0.0.30.dist-info/METADATA,sha256=23sQlOoUqIRAvIJHsQPaG75XH3fe-YGxNVREx4j8nCo,4684
18
+ code_puppy-0.0.30.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
19
+ code_puppy-0.0.30.dist-info/entry_points.txt,sha256=d8YkBvIUxF-dHNJAj-x4fPEqizbY5d_TwvYpc01U5kw,58
20
+ code_puppy-0.0.30.dist-info/licenses/LICENSE,sha256=31u8x0SPgdOq3izJX41kgFazWsM43zPEF9eskzqbJMY,1075
21
+ code_puppy-0.0.30.dist-info/RECORD,,