-
-
Notifications
You must be signed in to change notification settings - Fork 293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Self healing and workspace update agent #663
base: master
Are you sure you want to change the base?
Self healing and workspace update agent #663
Conversation
start = end = int(line_range) | ||
|
||
# Apply the changes | ||
with open(file_path, 'r') as f: |
Check failure
Code scanning / Bearer
Unsanitized dynamic input in file path Error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be in the WORKSPACE_DIR="agent_workspace".
Can you change file_path to be under that dir?
start -= 1 | ||
lines[start:end] = new_code.splitlines(True) | ||
|
||
with open(file_path, 'w') as f: |
Check failure
Code scanning / Bearer
Unsanitized dynamic input in file path Error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also needs the path change
process = subprocess.Popen( | ||
code, | ||
shell=True, | ||
stdout=subprocess.PIPE, | ||
stderr=subprocess.PIPE, | ||
text=True | ||
) |
Check failure
Code scanning / Bearer
Unsanitized user input in OS command Error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The input needs to be filtered to remove hazardous characters.
Big pr and needs to be tested more
with following changes
Self-Healing Agent Features
Handles common errors like:
Output format:
π Documentation preview π: https://swarms--663.org.readthedocs.build/en/663/