Skip to content

Your phone, on your command. Gotcha is world's first fully on-device AI copilot for Android that turns natural language into real device actions — safely.

style: wrap run_termux_command description lines under detekt's 140-char limit

Gotcha Contributor746e7aa47e86
diff --git a/app/src/main/java/com/gotcha/tools/ToolDefinitions.kt b/app/src/main/java/com/gotcha/tools/ToolDefinitions.kt
index 0378635..057b6b9 100644
--- a/app/src/main/java/com/gotcha/tools/ToolDefinitions.kt
+++ b/app/src/main/java/com/gotcha/tools/ToolDefinitions.kt
@@ -1879,14 +1879,28 @@ object ToolDefinitions {
"the user has run `termux-setup-storage` in Termux; if a /sdcard path fails, say so " +
"rather than retrying.\n" +
"\nRealistic limits to factor in:\n" +
- "- No interactive prompts — there is no terminal here, so any command that waits for typed input (pkg install without -y, ssh password, read, mysql>) blocks until the 600s timeout. Always pass -y / --yes / -q where the tool supports them.\n" +
- "- Output is capped at 32KB by Gotcha and ~100KB by Termux. For larger output, redirect to a file inside Termux (e.g. `... > /sdcard/Download/out.txt`) and read it back via read_file.\n" +
- "- You cannot kill a command after submitting it. A timed-out command keeps running under Termux's UID. There is no kill from here.\n" +
- "- Hard ceiling: timeout_seconds <= 600. `pkg install` of ffmpeg, chromium, rust, golang, or texlive can hit this — raise timeout_seconds to 600 and warn the user before starting one.\n" +
- "- 4 commands in flight, process-wide. Sub-agents share the same semaphore. A 5th call returns an error.\n" +
- "- Android 12+ foreground-service rule: if Gotcha is in the background and the assistive ball is off, this tool fails with 'Not allowed to start service'. Tell the user to bring Gotcha to the foreground (or switch the assistive ball on).\n" +
- "\nIf `pkg install` hangs at \"0% [Connecting to packages.termux.dev]\" or fails with NO_PUBKEY, the default mirror is slow or blocked on the user's network. Tell the user to open Termux and run `termux-change-repo` once, then retry. The full mirror list and the non-interactive sources.list swap are in the termux_repositories skill.\n" +
- "\nFor long-running processes (servers, watchers, daemons), the foreground process is orphaned the moment Gotcha returns. The persistence pattern (`nohup ... > log 2>&1 < /dev/null & echo $! > pid; disown`) and the termux-wake-lock requirement are in the termux_background skill. For full Debian/Ubuntu via proot-distro (when Termux's bionic/busybox is not enough), see the termux_proot skill.",
+ "- No interactive prompts — there is no terminal here, so any command that waits for typed input " +
+ "(pkg install without -y, ssh password, read, mysql>) blocks until the 600s timeout. Always " +
+ "pass -y / --yes / -q where the tool supports them.\n" +
+ "- Output is capped at 32KB by Gotcha and ~100KB by Termux. For larger output, redirect to a " +
+ "file inside Termux (e.g. `... > /sdcard/Download/out.txt`) and read it back via read_file.\n" +
+ "- You cannot kill a command after submitting it. A timed-out command keeps running under " +
+ "Termux's UID. There is no kill from here.\n" +
+ "- Hard ceiling: timeout_seconds <= 600. `pkg install` of ffmpeg, chromium, rust, golang, or " +
+ "texlive can hit this — raise timeout_seconds to 600 and warn the user before starting one.\n" +
+ "- 4 commands in flight, process-wide. Sub-agents share the same semaphore.\n" +
+ "- Android 12+ foreground-service rule: if Gotcha is in the background and the assistive ball " +
+ "is off, this tool fails with 'Not allowed to start service'. Tell the user to bring Gotcha to " +
+ "the foreground (or switch the assistive ball on).\n" +
+ "\nIf `pkg install` hangs at \"0% [Connecting to packages.termux.dev]\" or fails with NO_PUBKEY, " +
+ "the default mirror is slow or blocked on the user's network. Tell the user to open Termux and " +
+ "run `termux-change-repo` once, then retry. The full mirror list and the non-interactive " +
+ "sources.list swap are in the termux_repositories skill.\n" +
+ "\nFor long-running processes (servers, watchers, daemons), the foreground process is orphaned " +
+ "the moment Gotcha returns. The persistence pattern (`nohup ... > log 2>&1 < /dev/null & echo $! " +
+ "> pid; disown`) and the termux-wake-lock requirement are in the termux_background skill. For " +
+ "full Debian/Ubuntu via proot-distro (when Termux's bionic/busybox is not enough), see the " +
+ "termux_proot skill.",
schema {
putJsonObject("properties") {
putJsonObject("command") {