droidrun 0.2.0__py3-none-any.whl → 0.3.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. droidrun/__init__.py +16 -11
  2. droidrun/__main__.py +1 -1
  3. droidrun/adb/__init__.py +3 -3
  4. droidrun/adb/device.py +1 -1
  5. droidrun/adb/manager.py +2 -2
  6. droidrun/agent/__init__.py +6 -0
  7. droidrun/agent/codeact/__init__.py +2 -4
  8. droidrun/agent/codeact/codeact_agent.py +330 -235
  9. droidrun/agent/codeact/events.py +12 -20
  10. droidrun/agent/codeact/prompts.py +0 -52
  11. droidrun/agent/common/default.py +5 -0
  12. droidrun/agent/common/events.py +4 -0
  13. droidrun/agent/context/__init__.py +23 -0
  14. droidrun/agent/context/agent_persona.py +15 -0
  15. droidrun/agent/context/context_injection_manager.py +66 -0
  16. droidrun/agent/context/episodic_memory.py +15 -0
  17. droidrun/agent/context/personas/__init__.py +11 -0
  18. droidrun/agent/context/personas/app_starter.py +44 -0
  19. droidrun/agent/context/personas/default.py +95 -0
  20. droidrun/agent/context/personas/extractor.py +52 -0
  21. droidrun/agent/context/personas/ui_expert.py +107 -0
  22. droidrun/agent/context/reflection.py +20 -0
  23. droidrun/agent/context/task_manager.py +124 -0
  24. droidrun/agent/droid/__init__.py +2 -2
  25. droidrun/agent/droid/droid_agent.py +269 -325
  26. droidrun/agent/droid/events.py +28 -0
  27. droidrun/agent/oneflows/reflector.py +265 -0
  28. droidrun/agent/planner/__init__.py +2 -4
  29. droidrun/agent/planner/events.py +9 -13
  30. droidrun/agent/planner/planner_agent.py +288 -0
  31. droidrun/agent/planner/prompts.py +33 -53
  32. droidrun/agent/utils/__init__.py +3 -0
  33. droidrun/agent/utils/async_utils.py +1 -40
  34. droidrun/agent/utils/chat_utils.py +265 -48
  35. droidrun/agent/utils/executer.py +49 -14
  36. droidrun/agent/utils/llm_picker.py +14 -10
  37. droidrun/agent/utils/trajectory.py +184 -0
  38. droidrun/cli/__init__.py +1 -1
  39. droidrun/cli/logs.py +283 -0
  40. droidrun/cli/main.py +364 -441
  41. droidrun/tools/__init__.py +5 -10
  42. droidrun/tools/{actions.py → adb.py} +381 -412
  43. droidrun/tools/ios.py +596 -0
  44. droidrun/tools/tools.py +95 -0
  45. droidrun-0.3.1.dist-info/METADATA +150 -0
  46. droidrun-0.3.1.dist-info/RECORD +50 -0
  47. droidrun/agent/planner/task_manager.py +0 -355
  48. droidrun/agent/planner/workflow.py +0 -371
  49. droidrun/tools/device.py +0 -29
  50. droidrun/tools/loader.py +0 -60
  51. droidrun-0.2.0.dist-info/METADATA +0 -373
  52. droidrun-0.2.0.dist-info/RECORD +0 -32
  53. {droidrun-0.2.0.dist-info → droidrun-0.3.1.dist-info}/WHEEL +0 -0
  54. {droidrun-0.2.0.dist-info → droidrun-0.3.1.dist-info}/entry_points.txt +0 -0
  55. {droidrun-0.2.0.dist-info → droidrun-0.3.1.dist-info}/licenses/LICENSE +0 -0
droidrun/__init__.py CHANGED
@@ -2,25 +2,30 @@
2
2
  DroidRun - A framework for controlling Android devices through LLM agents.
3
3
  """
4
4
 
5
- __version__ = "0.1.0"
5
+ __version__ = "0.3.0"
6
6
 
7
7
  # Import main classes for easier access
8
- from .agent.codeact.codeact_agent import CodeActAgent as Agent
9
- from .agent.planner.workflow import PlannerAgent
10
- from .agent.utils.executer import SimpleCodeExecutor
11
- from .agent.utils.llm_picker import load_llm
12
- from .tools.device import DeviceManager
13
- from .tools.actions import Tools
14
- from .tools.loader import load_tools
8
+ from droidrun.agent.codeact.codeact_agent import CodeActAgent
9
+ from droidrun.agent.planner.planner_agent import PlannerAgent
10
+ from droidrun.agent.utils.executer import SimpleCodeExecutor
11
+ from droidrun.agent.utils.llm_picker import load_llm
12
+ from droidrun.adb.manager import DeviceManager
13
+ from droidrun.tools.tools import Tools
14
+ from droidrun.tools.adb import AdbTools
15
+ from droidrun.tools.ios import IOSTools
16
+ from droidrun.agent.droid import DroidAgent
15
17
 
16
18
 
17
19
  # Make main components available at package level
18
20
  __all__ = [
19
- "Agent",
21
+ "DroidAgent",
22
+ "CodeActAgent",
20
23
  "PlannerAgent",
21
24
  "DeviceManager",
22
25
  "Tools",
23
26
  "load_llm",
24
27
  "SimpleCodeExecutor",
25
- "load_tools",
26
- ]
28
+ "Tools",
29
+ "AdbTools",
30
+ "IOSTools",
31
+ ]
droidrun/__main__.py CHANGED
@@ -1,7 +1,7 @@
1
1
  """
2
2
  DroidRun main entry point
3
3
  """
4
- from .cli.main import cli
4
+ from droidrun.cli.main import cli
5
5
 
6
6
  if __name__ == '__main__':
7
7
  cli()
droidrun/adb/__init__.py CHANGED
@@ -2,9 +2,9 @@
2
2
  ADB Package - Android Debug Bridge functionality.
3
3
  """
4
4
 
5
- from .device import Device
6
- from .manager import DeviceManager
7
- from .wrapper import ADBWrapper
5
+ from droidrun.adb.device import Device
6
+ from droidrun.adb.manager import DeviceManager
7
+ from droidrun.adb.wrapper import ADBWrapper
8
8
 
9
9
  __all__ = [
10
10
  'Device',
droidrun/adb/device.py CHANGED
@@ -8,7 +8,7 @@ import time
8
8
  import random
9
9
  import string
10
10
  from typing import Dict, Optional, Tuple, List
11
- from .wrapper import ADBWrapper
11
+ from droidrun.adb.wrapper import ADBWrapper
12
12
 
13
13
  class Device:
14
14
  """High-level representation of an Android device."""
droidrun/adb/manager.py CHANGED
@@ -3,8 +3,8 @@ Device Manager - Manages Android device connections.
3
3
  """
4
4
 
5
5
  from typing import Dict, List, Optional
6
- from .wrapper import ADBWrapper
7
- from .device import Device
6
+ from droidrun.adb.wrapper import ADBWrapper
7
+ from droidrun.adb.device import Device
8
8
 
9
9
  class DeviceManager:
10
10
  """Manages Android device connections."""
@@ -0,0 +1,6 @@
1
+ #import logging
2
+
3
+ #logger = logging.getLogger("droidrun")
4
+ #logger.propagate = False # Don't send to root logger
5
+ #logger.handlers = [] # No handlers by default
6
+ #logger.setLevel(logging.INFO) # Or WARNING
@@ -1,13 +1,11 @@
1
- from .codeact_agent import CodeActAgent
2
- from .prompts import (
3
- DEFAULT_CODE_ACT_SYSTEM_PROMPT,
1
+ from droidrun.agent.codeact.codeact_agent import CodeActAgent
2
+ from droidrun.agent.codeact.prompts import (
4
3
  DEFAULT_CODE_ACT_USER_PROMPT,
5
4
  DEFAULT_NO_THOUGHTS_PROMPT
6
5
  )
7
6
 
8
7
  __all__ = [
9
8
  "CodeActAgent",
10
- "DEFAULT_CODE_ACT_SYSTEM_PROMPT",
11
9
  "DEFAULT_CODE_ACT_USER_PROMPT",
12
10
  "DEFAULT_NO_THOUGHTS_PROMPT"
13
11
  ]