-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Motivation
Currently, the Terminal Toolkit hard-blocks certain “dangerous” commands, which causes some tasks to fail completely. We need to remove this strict prohibition and replace it with a Human-in-the-Loop (HITL) approval mechanism.
Solution
The HITL: When any of the following dangerous commands is detected, the system should return three options for the user to choose from:
Yes (approve this command once)
All Yes in this task (approve all subsequent dangerous commands within the current task)
No (reject the command)
These options should be displayed and handled by the frontend.
very important!!!
Do NOT directly reuse the previous human_toolkit activation mechanism that waits for user input and automatically skips after 30 seconds.
Enable HITL Mechanism via System Settings
Location: System Settings >> Permissions
In System Settings Homepage >> Settings >> Permissions : in Permissions page add a new "Safe Mode" toggle with the following hint ⬇️ .
With Safe Mode active, Eigent will pause and seek explicit approval whenever high-risk system operations are detected.
This should be disabled by default. When enabled by the user, it activates the Human-in-the-Loop (HITL) approval mechanism.
Additional context
Dangerous Command List (Triggers HITL):
- System Administration: sudo, su, reboot, shutdown, halt, poweroff, init
- File System: rm, chown, chgrp, umount, mount
- Disk Operations: dd, mkfs, fdisk, parted, fsck, mkswap, swapon, swapoff
- Process Management: service, systemctl, systemd
- Network Configuration: iptables, ip6tables, ifconfig, route, iptables-save
- Cron/Scheduling: crontab, at, batch
- User/Kernel Management: useradd, userdel, usermod, passwd, chpasswd, newgrp, modprobe, rmmod, insmod, lsmod
Additional Safety Constraint:
Non-Docker Mode: If the environment is running outside of Docker, the system must validate cd commands. Ensure the agent cannot traverse outside the designated working_directory.