feat(accessibility): implement Artemis Accessibility Helper for robust UI hierarchy capture

- Introduce ArtemisAccessibilityHelper APK (API 24 to 37+) as a conflict-free, high-performance replacement for UiAutomator:
  * Eliminates native UiAutomator waitForIdle() timeouts, reducing DOM dump latency from ~3s to ~15ms and maintaining resilience against infinite animations.
  * Implements a multi-tier fallback hierarchy discovery strategy (multi-window layer enumeration -> active window fallback -> input/accessibility focus backtracking) with adaptive progressive backoff for seamless page transition capture.
  * Resolves node drop defect caused by 32-bit hash collisions on recurring virtual view IDs in long lists and WebViews by utilizing bounded recursion (MAX_DEPTH=75, MAX_NODES=8000).
  * Strict W3C XML 1.0 character sanitization filtering invalid ASCII control codes and escaping attribute whitespace (
, 
, 	) to preserve multiline text formatting.
  * Enriches semantic parsing with stateDescription (API 30+ Jetpack Compose), screenReaderFocusable, paneTitle, heading, error, and tooltip attributes.
  * Multi-window metadata propagation tagging each node with window-id, window-type, and window-layer.
  * Adds dual-path standalone build script (build_apk.sh) producing a clean 29KB APK without Gradle daemon overhead alongside standard Gradle Kotlin DSL.
- Integrate AccessibilityClient into Artemis Python runtime with automatic bundled APK detection, self-healing installation, and port forwarding.
- Add unit test suite covering AccessibilityClient endpoints and atomic snapshot parsing.
This commit is contained in:
somew1nd committed 2026-09-10 14:10:23 -07:00
1 parent 38a2de6a9f
commit bac31b44c1
20 files changed
+2323

No files matched your search

@@ -0,0 +1,35 @@
plugins {
id("com.android.application")
}
android {
namespace = "com.artemis.helper"
compileSdk = 35
defaultConfig {
applicationId = "com.artemis.helper"
minSdk = 24
targetSdk = 35
versionCode = 1
versionName = "1.0.0"
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
}
dependencies {
// Pure standard Android SDK APIs (android.accessibilityservice, android.view.accessibility, org.json)
// Zero external dependencies to maximize stability, guarantee compatibility, and keep APK under 30KB.
}