Commit Graph
1019 Commits
Author SHA1 Message Date
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
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
johnmalek312 6899d31bf3 fix: validate empty messages and clean up QueuedUserMessage import 2026-03-10 00:27:07 +11:00
johnmalek312 c5bc5e70f9 Merge pull request #279 from hanxi/fix/circular-import
fix: resolve circular import conflict with external mcp package
2026-03-10 00:08:14 +11:00
johnmalek312 8d0eea0349 fix: per-message XML tags and remove dead event classes 2026-03-09 21:16:15 +11:00
johnmalek312 21e594673f fix: unify external_user_message tag format across agents 2026-03-09 19:21:26 +11:00
johnmalek312 1f9998752c chore: remove verbose comments and delete test_external_message.py 2026-03-09 18:56:57 +11:00
johnmalek312 cac887c8fd fix: replace workflow step with direct method for message injection
WorkflowValidationError: llama-index validates that all consumed events
are produced by some step. ExternalUserMessageEvent is external-only,
so the @step approach fails validation.

Replace with DroidAgent.send_user_message(text) -> QueuedUserMessage.
Directly queues on shared state, no event routing needed. Drain points
in FastAgent and Manager still emit Applied/Dropped stream events.
2026-03-09 18:41:14 +11:00
johnmalek312 5aeae4789e feat: add message IDs, completion guards, and dropped message handling
- QueuedUserMessage dataclass with uuid4 ID and queued_at_step
- Events now carry message IDs for end-to-end tracking
- ExternalUserMessageDroppedEvent for max-steps scenario
- FastAgent complete() with pending messages: reset and continue loop
  so LLM sees its own complete() result alongside the user's message
- Manager request_accomplished with pending messages: loop back to
  ManagerInputEvent instead of finalizing
- Max steps: drain queue, emit DroppedEvent, finalize as normal
- workflow_completed flag on shared state, guarding queue_user_message
- Fix device-state injection bug: merge external messages into tool
  results user message instead of appending separate ChatMessages
2026-03-09 18:09:19 +11:00
johnmalek312 039b76965b feat: add mid-run external user message injection
Allow callers to inject user messages into a running DroidAgent via
handler.send_event(ExternalUserMessageEvent(message="...")).

Messages are queued in shared state and drained at safe checkpoints:
- FastAgent: after tool results, before next LLM call
- ManagerAgent: merged into synthesized user turn in prepare_context

Adds ExternalUserMessageEvent, QueuedEvent, and AppliedEvent for
observability. Updates FastAgent and Manager system prompts to
instruct the LLM to honor mid-execution user corrections.
2026-03-09 17:45:29 +11:00
涵曦 d0fb29c73f fix: resolve circular import conflict with external mcp package 2026-03-05 20:08:06 +08:00
johnmalek312 3260801767 chore: black formatter 2026-03-05 02:45:50 +11:00
johnmalek312 91d4217f1c Merge pull request #272 from akhilkedia/bugfix_switch
Bugfix for adding checked stated to Formatted a11y tree
2026-03-05 02:41:21 +11:00
sleynsol 7aa647a755 updated README 2026-03-03 10:55:20 +01:00
johnmalek312 8c53a5682a docs: make v5 the default docs version 2026-03-02 14:34:16 +11:00
johnmalek312 1e4f544b7e chore: bump version to 0.5.0 v0.5.0 2026-03-02 13:08:04 +11:00
johnmalek312 ed92367599 docs: fix inconsistencies across v4/v5 documentation 2026-03-02 13:07:25 +11:00