1034 Commits
Author SHA1 Message Date
johnmalek312 a4e4a89dc3 style: apply black formatting 2026-03-31 23:36:35 +11:00
johnmalek312 5ad3dc1271 fix(ios): remove dead back button branch and update outdated iOS docs
Remove unreachable back button handler in IOSDriver.press_button()
(guard rejects it before reaching the handler). Guard empty
supported_buttons producing malformed system_button description.

Update iOS docs to match current driver behavior: get_date() works,
input_text() clear is supported, swipe uses coordinates, port is 6643.
Replace stub iOS setup guide with full Xcode build/signing/iproxy
instructions.
2026-03-31 23:33:18 +11:00
johnmalek312 a08e2a9fb5 feat(ios): enhance iOS portal discovery and driver connection
- Implement auto-discovery of iOS portal using a port scanning method.
- Validate and normalize iOS portal URLs to ensure correct format.
- Update IOSDriver to handle connection errors more gracefully.
- Refactor tool registration to support platform-specific app opening methods.
- Improve error logging for better debugging and user feedback.
2026-03-31 17:06:03 +11:00
johnmalek312 ef8f18a013 fix(ios): improve iOS state parser and telemetry accuracy
- Replace interactive-type whitelist with skip-type blacklist so all
  visible elements (text, icons, images) appear in UI state
- Filter elements with zero width or height (not tappable)
- Label iOS elements as "Current UI elements" instead of "Clickable"
- Use effective package/activity in telemetry events
2026-03-30 23:30:11 +11:00
johnmalek312 918ace8c7f refactor: rename /state_full endpoint to /state 2026-03-30 17:42:41 +11:00
johnmalek312 067c84f72b refactor(ios): update iOS driver and provider to use unified state_full endpoint
Use /state_full instead of separate /vision/a11y + /vision/state calls.
Add coordinate-based swipe, clear support in input_text, back button
via /gestures/back, and get_date via /device/date. Remove deprecated
_infer_screen_size in favor of device_context screen_bounds.
2026-03-30 17:23:51 +11:00
johnmalek312 729266e262 fix(ui): handle empty package name and activity in phone state display
Skip the App line in formatted phone state when packageName is empty
(e.g., on iOS where there's no package concept). Prevent
update_current_app from overwriting known values with empty strings.
2026-03-30 17:22:10 +11:00
johnmalek312 6c143254d8 refactor(tools)!: consolidate tool registration, add platform-aware prompts
Replace scattered tool registration (ATOMIC_ACTION_SIGNATURES dict,
inline registrations in droid_agent.py, build_credential_tools()) with
a single build_tool_registry() function in signatures.py.

- Add platform property to DeviceDriver (Android/iOS), derived from
  actual driver in start_handler instead of config
- Dynamic system_button description from driver.supported_buttons
- Replace hardcoded "Android" in prompt templates with {{ platform }}
- Gate available_secrets on type_secret being in registry
- Fix manager exclusion set bug (open_app/type_secret leaked into
  custom_actions)
- Move telemetry init event to start_handler, use standard_tool_names
- Rename AppStarter tools param to driver

BREAKING CHANGE: `ATOMIC_ACTION_SIGNATURES` and `build_credential_tools`
are removed from the public API. Use `build_tool_registry()` instead.
2026-03-29 20:59:35 +11:00
johnmalek312 670a44379a chore: remove CHANGELOG and bump version to 0.5.3 v0.5.3 2026-03-28 20:27:45 +11:00
johnmalek312 c77932e68c chore: black formatter 2026-03-28 19:20:54 +11:00
johnmalek312 d12efee850 Merge branch 'docs/update-v5-docs' 2026-03-28 19:18:35 +11:00
johnmalek312 66e921d777 Merge pull request #301 from Ramtx/main
fix :naming consistancy
2026-03-28 01:14:33 -07:00
johnmalek312 be0048196a docs: remove versioned docs structure, keep only latest
Remove v3, v4, and v5 directories. Move latest (v5) docs to docs root.
Update docs.json navigation to use flat tabs instead of versioned layout.
Fix all internal links to use unversioned paths.
2026-03-27 22:33:24 +11:00
Ramtx 317add745a Merge branch 'main' into main 2026-03-27 21:03:34 +11:00
Mariozada 5223cebe61 fix :naming consistancy 2026-03-27 20:31:06 +11:00
johnmalek312 492f1992aa Merge pull request #300 from droidrun/docs/update-v5-docs
docs: update v5 docs to match codebase
2026-03-26 23:36:59 -07:00
johnmalek312 dcdc1e9fd3 docs: fix broken anchor link, clarify send_user_message example, mark --agent as future 2026-03-27 17:36:02 +11:00
johnmalek312 cef6b5965b docs: fix PR review feedback
- Fix send_user_message example to use asyncio.create_task()
- Add description for --agent flag and external agents
- Document stealth and wpm params on input_text
2026-03-27 17:09:49 +11:00
johnmalek312 c079d93a46 docs: update v5 docs to match current codebase 2026-03-27 16:02:50 +11:00
johnmalek312 2179e11cb6 fix(tracing): check Phoenix server reachability before enabling tracing
Ping the Phoenix endpoint at startup and skip instrumentation if
unreachable, preventing repeated export warnings throughout the session.
2026-03-27 15:26:47 +11:00
johnmalek312 e9d0305c78 Bump version to 0.5.2 v0.5.2 2026-03-27 14:26:57 +11:00
johnmalek312 0b06775122 Merge pull request #299 from droidrun/feat/device-commands-and-press-button
feat(cli)!: add device commands and replace press_key with press_button
2026-03-26 20:25:34 -07:00
johnmalek312 e97129e928 Fix device_commands: resource leak, iOS check, dead code, import
- Fix fd leak in screenshot command (wrap os.write in try/finally)
- Check iOS flag before connecting in long-press command
- Remove dead except ValueError in press (click.Choice already validates)
- Move os import to top of file
2026-03-27 14:24:05 +11:00
johnmalek312 40155b1a82 Reapply "feat(cli)!: add direct device action commands and replace press_key with press_button"
This reverts commit 4e26ef8651.
2026-03-26 17:49:44 +11:00
johnmalek312 4e26ef8651 Revert "feat(cli)!: add direct device action commands and replace press_key with press_button"
This reverts commit ebd7941f02.
2026-03-26 17:48:16 +11:00
johnmalek312 ebd7941f02 feat(cli)!: add direct device action commands and replace press_key with press_button
Add `droidrun device` subgroup with 9 commands: screenshot, ui, tap,
swipe, long-press, type, press, apps, start. These bypass the LLM agent
and talk directly to the device driver.

Replace the Android-centric `press_key(keycode)` interface with a
platform-agnostic `press_button(name)` abstraction across all drivers
(Android, iOS, Cloud, Stealth, Recording). Each driver declares its own
`supported_buttons` set and maps button names internally.

Remove `DroidRunCLI` auto-routing that implicitly routed unknown args
to the `run` command.

BREAKING CHANGE: `DeviceDriver.press_key(keycode)` is removed in favor
of `DeviceDriver.press_button(button)`. Macro recordings now emit
`button_press` action type instead of `key_press`.
2026-03-26 16:06:27 +11:00
johnmalek312 8a7603a36c Merge pull request #297 from droidrun/cleanup
refactor!: redesign external agent system to use raw ADB access
2026-03-25 07:57:27 -07:00
johnmalek312 fdf580d5b6 fix(external): harden external agent loading and add docs
- Allow agents with no config section (use DEFAULT_CONFIG or env vars)
- Validate run() is async, reject sync functions with clear error
- Wrap list_agents() at CLI import to prevent crashes on scan failure
- Simplify migration to only remove example entries
- Add README.md with full contract, AdbDevice API, and setup guide
2026-03-25 22:09:46 +11:00
johnmalek312 eb047e7c38 refactor!: redesign external agent system to use raw ADB access
External agents now receive a raw async_adbutils.AdbDevice instead of
internal DroidRun tools. This makes them fully self-contained — zero
imports from droidrun, just copy-paste a file or folder and it works.

- Remove mai_ui and autoglm agents (depended on internals)
- Pass raw AdbDevice directly, skip Portal/driver/registry setup
- Add --agent CLI flag with dynamic discovery from external/ dir
- Add list_agents() for runtime agent enumeration
- Add config migration v005 to clean up legacy agent entries
- Update config_example.yaml to remove old agent references

BREAKING CHANGE: external agent run() signature changed from
(tools, instruction, config, max_steps) to
(device, instruction, config, max_steps) where device is an
async_adbutils.AdbDevice
2026-03-25 21:42:28 +11:00
johnmalek312 c3e365be11 Merge pull request #294 from droidrun/cleanup
Remove deprecated agents and update default model
2026-03-23 23:26:37 -07:00
johnmalek312 0f2972a44f Merge pull request #293 from Mariozada/main
TCP Auth token
2026-03-23 03:38:35 -07:00
johnmalek312 e3cc1ec154 chore: update default model to gemini-3.1-flash-lite-preview
Replace all gemini-2.5-pro and gemini-2.5-flash defaults with
gemini-3.1-flash-lite-preview and drop the models/ prefix from
model names.
2026-03-23 17:52:49 +11:00
johnmalek312 1fee3be384 refactor!: remove CodeActAgent, ScripterAgent, and TextManipulatorAgent
Remove three deprecated agents and all associated dead code:
- CodeActAgent (Python code-gen + exec)
- ScripterAgent (off-device Python execution)
- TextManipulatorAgent (text field editing via code-gen)

Only FastAgent (XML tool-calling) remains as the direct-execution
agent. Rename agent/codeact/ to agent/fast_agent/ and
config/prompts/codeact/ to config/prompts/fast_agent/.

Also removes: SimpleCodeExecutor, SafeExecutionConfig,
extract_code_and_thought, code_checker, and all related config
fields (codeact, scripter, text_manipulator LLM profiles).

Adds v004 config migration to strip removed keys and update
prompt paths in existing user configs.

BREAKING CHANGE: `ScripterConfig`, `SafeExecutionConfig`, and
`codeact` config field are removed. The `text_manipulator` and
`scripter` LLM profiles are no longer used. Users with custom
imports of these classes or configs referencing removed fields
will need to update their code.
2026-03-23 17:49:54 +11:00
Mariozada 899950fcfe fix: handle Portal TCP auth token rotation 2026-03-19 21:19:56 +11:00
Mariozada 68802f8284 fix: TCP authentication mode 2026-03-19 18:41:47 +11:00
johnmalek312 98b762d06a chore: sync uv lockfile for v0.5.1 2026-03-13 04:27:11 +11:00
johnmalek312 5c9de16d8f chore: bump version to 0.5.1 v0.5.1 2026-03-13 04:26:10 +11:00
johnmalek312 baa19dfe60 Merge pull request #289 from droidrun/reliablity
fix(state): improve state retrieval reliability with retries and a11y recovery
2026-03-13 04:24:38 +11:00
johnmalek312 7d1f03979c fix(state): correct recovery timing, consistent typing, and cleaner logging
- Set _RECOVERY_AFTER_ATTEMPT to 5 so recovery fires after ~11s as intended
- Use Optional[List[float]] consistently instead of mixing old/new style hints
- Simplify nested f-string in retry warning log
- Update docstring to reflect actual fallback behavior for short delay lists
2026-03-13 04:24:04 +11:00
johnmalek312 98290d23cb Merge pull request #288 from droidrun/feat/stealth-passthrough
Add stealth passthrough to CloudDriver
2026-03-13 04:19:15 +11:00
johnmalek312 534cd451d5 fix(state): add TCP server recovery to state retrieval retry logic
Restart Portal's TCP socket server alongside the accessibility service
during mid-retry recovery. This handles the case where the TCP server
crashes mid-run, causing state requests to fail on both TCP and content
provider paths.
2026-03-13 04:17:50 +11:00
johnmalek312 f53bb933f8 fix(state): improve state retrieval reliability with retries and a11y recovery
Extract retry logic into fetch_state_with_retry() helper with 7 attempts,
increasing backoff (1-10s, ~29s total), and mid-retry accessibility service
restart after ~11s of failures. Fixes intermittent "Portal returned error:
Unknown error" by logging the full Portal response dict.
2026-03-13 04:13:05 +11:00
johnmalek312 d57b004336 feat(cloud): add stealth flag to CloudDriver for devices-api passthrough
CloudDriver.__init__ accepts stealth=True which passes
{"stealth": true} via extra_body on tap, swipe, and input_text
calls to devices-api. No stealth logic added — purely passthrough.
2026-03-13 02:19:27 +11:00
sleynsol e32bf1a9fc updated README 2026-03-11 14:55:37 +01:00
johnmalek312 4f1a39f548 chore: bump version to 0.5.1.dev3 v0.5.1.dev3 2026-03-11 05:02:06 +11:00
johnmalek312 f8db6f9324 feat(driver): add stealth and wpm params to input_text for cloud devices 2026-03-11 04:58:06 +11:00
johnmalek312 290d7b12ab chore: bump version to 0.5.1.dev2 v0.5.1.dev2 2026-03-11 03:41:56 +11:00
johnmalek312 f3df299547 fix: consistent Screenshot → UI state emission order across all agents
- Manager and StatelessManager now emit ScreenshotEvent before
  RecordUIStateEvent, matching FastAgent/CodeAct ordering
- DroidAgent finalize step now emits RecordUIStateEvent after the
  final screenshot so every screenshot has a paired UI state
2026-03-11 03:39:38 +11:00
johnmalek312 d6d59761a6 chore: bump version to 0.5.1.dev1 in pyproject.toml v0.5.1.dev1 2026-03-10 14:48:11 +11:00
johnmalek312 2aa0d4e303 Merge pull request #283 from droidrun/feat/external-user-message-injection
Feat/external user message injection
2026-03-10 01:12:27 +11:00