code-puppy 0.0.321__py3-none-any.whl → 0.0.322__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.
@@ -17,6 +17,7 @@ from code_puppy.plugins.shell_safety.command_cache import (
17
17
  cache_assessment,
18
18
  get_cached_assessment,
19
19
  )
20
+ from code_puppy.tools.command_runner import ShellSafetyAssessment
20
21
 
21
22
  # OAuth model prefixes - these models have their own safety mechanisms
22
23
  OAUTH_MODEL_PREFIXES = (
@@ -142,8 +143,14 @@ async def shell_safety_callback(
142
143
  # Create agent and assess command
143
144
  agent = ShellSafetyAgent()
144
145
 
145
- # Run async assessment (we're in an async callback now!)
146
- assessment = await agent.run_with_mcp(command)
146
+ # Build the assessment prompt with optional cwd context
147
+ prompt = f"Assess this shell command:\n\nCommand: {command}"
148
+ if cwd:
149
+ prompt += f"\nWorking directory: {cwd}"
150
+
151
+ # Run async assessment with structured output type
152
+ result = await agent.run_with_mcp(prompt, output_type=ShellSafetyAssessment)
153
+ assessment = result.output
147
154
 
148
155
  # Cache the result for future use, but only if it's not a fallback assessment
149
156
  if not getattr(assessment, "is_fallback", False):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: code-puppy
3
- Version: 0.0.321
3
+ Version: 0.0.322
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
@@ -140,7 +140,7 @@ code_puppy/plugins/file_permission_handler/register_callbacks.py,sha256=QlUqENkb
140
140
  code_puppy/plugins/shell_safety/__init__.py,sha256=B-RYLWKlvrws9XCHG1Z99mBMC3VC394HAlMOhhCoGGI,243
141
141
  code_puppy/plugins/shell_safety/agent_shell_safety.py,sha256=5JutYlzzTzyFcbFujlNkV4NunVvD5QIpOSumjS3Fjc8,2408
142
142
  code_puppy/plugins/shell_safety/command_cache.py,sha256=adYtSPNVOZfW_6dQdtEihO6E-JYXYrdvlS1Cl7xBkDU,4546
143
- code_puppy/plugins/shell_safety/register_callbacks.py,sha256=fSQcdpVoHXbsG97pMk0VE28u4_iz_IVCDxpuACk_R4Q,6995
143
+ code_puppy/plugins/shell_safety/register_callbacks.py,sha256=W3v664RR48Fdbbbltf_NnX22_Ahw2AvAOtvXvWc7KxQ,7322
144
144
  code_puppy/prompts/codex_system_prompt.md,sha256=hEFTCziroLqZmqNle5kG34A8kvTteOWezCiVrAEKhE0,24400
145
145
  code_puppy/tools/__init__.py,sha256=BVTZ85jLHgDANwOnUSOz3UDlp8VQDq4DoGF23BRlyWw,6032
146
146
  code_puppy/tools/agent_tools.py,sha256=snBI6FlFtR03CbYKXwu53R48c_fRSuDIwcNdVUruLcA,21020
@@ -159,10 +159,10 @@ code_puppy/tools/browser/browser_scripts.py,sha256=sNb8eLEyzhasy5hV4B9OjM8yIVMLV
159
159
  code_puppy/tools/browser/browser_workflows.py,sha256=nitW42vCf0ieTX1gLabozTugNQ8phtoFzZbiAhw1V90,6491
160
160
  code_puppy/tools/browser/camoufox_manager.py,sha256=RZjGOEftE5sI_tsercUyXFSZI2wpStXf-q0PdYh2G3I,8680
161
161
  code_puppy/tools/browser/vqa_agent.py,sha256=DBn9HKloILqJSTSdNZzH_PYWT0B2h9VwmY6akFQI_uU,2913
162
- code_puppy-0.0.321.data/data/code_puppy/models.json,sha256=mTpmJH0UJlmX8M2KVPbxMWb99de3IxKXCWO-B23b6xo,3101
163
- code_puppy-0.0.321.data/data/code_puppy/models_dev_api.json,sha256=wHjkj-IM_fx1oHki6-GqtOoCrRMR0ScK0f-Iz0UEcy8,548187
164
- code_puppy-0.0.321.dist-info/METADATA,sha256=3v2LGI_pBSIkOVJY6_DijQF37x8e7-0PkOVYQ3wAYQ8,28030
165
- code_puppy-0.0.321.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
166
- code_puppy-0.0.321.dist-info/entry_points.txt,sha256=Tp4eQC99WY3HOKd3sdvb22vZODRq0XkZVNpXOag_KdI,91
167
- code_puppy-0.0.321.dist-info/licenses/LICENSE,sha256=31u8x0SPgdOq3izJX41kgFazWsM43zPEF9eskzqbJMY,1075
168
- code_puppy-0.0.321.dist-info/RECORD,,
162
+ code_puppy-0.0.322.data/data/code_puppy/models.json,sha256=mTpmJH0UJlmX8M2KVPbxMWb99de3IxKXCWO-B23b6xo,3101
163
+ code_puppy-0.0.322.data/data/code_puppy/models_dev_api.json,sha256=wHjkj-IM_fx1oHki6-GqtOoCrRMR0ScK0f-Iz0UEcy8,548187
164
+ code_puppy-0.0.322.dist-info/METADATA,sha256=-tIjZhIMRQz1VNQkZzb8aVEsOavOA8hdGdHHY4adgM8,28030
165
+ code_puppy-0.0.322.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
166
+ code_puppy-0.0.322.dist-info/entry_points.txt,sha256=Tp4eQC99WY3HOKd3sdvb22vZODRq0XkZVNpXOag_KdI,91
167
+ code_puppy-0.0.322.dist-info/licenses/LICENSE,sha256=31u8x0SPgdOq3izJX41kgFazWsM43zPEF9eskzqbJMY,1075
168
+ code_puppy-0.0.322.dist-info/RECORD,,