Skip to content

Commit 9503b59

Browse files
authored
Add files via upload
1 parent 095d13a commit 9503b59

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

agent/skills/core/files.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,10 @@ def cat(path: str = "", **kwargs) -> str:
130130
return f"Error: {e}"
131131

132132

133-
def read(path: str) -> str:
133+
def read(path: str = "", **kwargs) -> str:
134134
"""Alias for cat(). Read and return file contents (max 10 MB)."""
135+
if not path:
136+
path = kwargs.get("path", "") or kwargs.get("args", "")
135137
return cat(path)
136138

137139

agent/skills/core/self_improvement.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ def check_for_learned_fix(skill_name: str = "", error_type: str = "", skill_path
472472
return fallback
473473

474474

475-
def check_lessons(skill_name: str = "", func_name: str = "") -> Optional[str]:
475+
def check_lessons(skill_name: str = "", func_name: str = "", **kwargs) -> Optional[str]:
476476
"""Pre-dispatch check: return a warning string if this skill has failed before,
477477
so the caller can surface the lesson before executing.
478478
Returns None if no prior failures exist (the common, happy path).
@@ -829,7 +829,7 @@ def _verify_syntax(source_code: str, skill_name: str) -> Dict:
829829
return {"ok": False, "error": str(e)}
830830

831831

832-
def apply_patch(skill_name: str, patch: Dict, backup: bool = True) -> Dict:
832+
def apply_patch(skill_name: str, patch: Dict, backup: bool = True, **kwargs) -> Dict:
833833
"""Apply a generated patch to the skill file.
834834
835835
Verification gate: the patched source is parsed and compiled BEFORE the file

0 commit comments

Comments
 (0)