code-puppy 0.0.87__tar.gz → 0.0.89__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 (30) hide show
  1. {code_puppy-0.0.87 → code_puppy-0.0.89}/PKG-INFO +1 -1
  2. {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/models.json +1 -1
  3. {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/tools/command_runner.py +0 -3
  4. {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/tools/file_operations.py +11 -2
  5. {code_puppy-0.0.87 → code_puppy-0.0.89}/pyproject.toml +1 -1
  6. {code_puppy-0.0.87 → code_puppy-0.0.89}/.gitignore +0 -0
  7. {code_puppy-0.0.87 → code_puppy-0.0.89}/LICENSE +0 -0
  8. {code_puppy-0.0.87 → code_puppy-0.0.89}/README.md +0 -0
  9. {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/__init__.py +0 -0
  10. {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/agent.py +0 -0
  11. {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/agent_prompts.py +0 -0
  12. {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/command_line/__init__.py +0 -0
  13. {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/command_line/file_path_completion.py +0 -0
  14. {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/command_line/meta_command_handler.py +0 -0
  15. {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/command_line/model_picker_completion.py +0 -0
  16. {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/command_line/motd.py +0 -0
  17. {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/command_line/prompt_toolkit_completion.py +0 -0
  18. {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/command_line/utils.py +0 -0
  19. {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/config.py +0 -0
  20. {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/main.py +0 -0
  21. {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/message_history_processor.py +0 -0
  22. {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/model_factory.py +0 -0
  23. {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/state_management.py +0 -0
  24. {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/summarization_agent.py +0 -0
  25. {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/token_utils.py +0 -0
  26. {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/tools/__init__.py +0 -0
  27. {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/tools/common.py +0 -0
  28. {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/tools/file_modifications.py +0 -0
  29. {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/tools/token_check.py +0 -0
  30. {code_puppy-0.0.87 → code_puppy-0.0.89}/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.87
3
+ Version: 0.0.89
4
4
  Summary: Code generation agent
5
5
  Author: Michael Pfaffenberger
6
6
  License: MIT
@@ -11,7 +11,7 @@
11
11
  "url": "https://api.cerebras.ai/v1",
12
12
  "api_key": "$CEREBRAS_API_KEY"
13
13
  },
14
- "context_length": 10000
14
+ "context_length": 131072
15
15
  },
16
16
  "Cerebras-Qwen3-235b-a22b-instruct-2507": {
17
17
  "type": "custom_openai",
@@ -57,9 +57,6 @@ def _kill_process_group(proc: subprocess.Popen) -> None:
57
57
  proc.kill()
58
58
  except Exception:
59
59
  pass
60
- # On Windows, restore terminal state after killing process
61
- if hasattr(signal, "CTRL_C_EVENT"):
62
- os.kill(proc.pid, signal.CTRL_C_EVENT)
63
60
  return
64
61
 
65
62
  # POSIX
@@ -25,6 +25,7 @@ class ListedFile(BaseModel):
25
25
 
26
26
  class ListFileOutput(BaseModel):
27
27
  files: List[ListedFile]
28
+ error: str | None = None
28
29
 
29
30
 
30
31
  def _list_files(
@@ -270,7 +271,7 @@ def _grep(context: RunContext, search_string: str, directory: str = ".") -> Grep
270
271
  **{
271
272
  "file_path": file_path,
272
273
  "line_number": line_number,
273
- "line_content": line_content.rstrip("\n\r"),
274
+ "line_content": line_content.rstrip("\n\r")[2048:],
274
275
  }
275
276
  )
276
277
  matches.append(match_info)
@@ -311,7 +312,15 @@ def _grep(context: RunContext, search_string: str, directory: str = ".") -> Grep
311
312
  def list_files(
312
313
  context: RunContext, directory: str = ".", recursive: bool = True
313
314
  ) -> ListFileOutput:
314
- return _list_files(context, directory, recursive)
315
+ list_files_output = _list_files(context, directory, recursive)
316
+ tokenizer = get_tokenizer()
317
+ num_tokens = len(tokenizer.encode(list_files_output.model_dump_json()))
318
+ if num_tokens > 10000:
319
+ return ListFileOutput(
320
+ files=[],
321
+ error="Too many files - tokens exceeded. Try listing non-recursively"
322
+ )
323
+ return list_files_output
315
324
 
316
325
 
317
326
  def read_file(context: RunContext, file_path: str = "", start_line: int | None = None, num_lines: int | None = None) -> ReadFileOutput:
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "code-puppy"
7
- version = "0.0.87"
7
+ version = "0.0.89"
8
8
  description = "Code generation agent"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
File without changes
File without changes
File without changes