-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
22 lines (19 loc) · 730 Bytes
/
main.py
File metadata and controls
22 lines (19 loc) · 730 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import os
import json
import shutil
from engine.agent import run_agent
def ensure_file(file_path, template_path=None, default_data=None):
if not os.path.exists(file_path):
if template_path and os.path.exists(template_path):
shutil.copy(template_path, file_path)
print(f"✅ Created {file_path} from template.")
elif default_data is not None:
with open(file_path, "w", encoding="utf-8") as f:
json.dump(default_data, f, indent=2)
print(f"✅ Created {file_path} with defaults.")
else:
print(f"⚠️ {file_path} missing and no template/default available.")
def main():
run_agent()
if __name__ == "__main__":
main()