Repository navigation
M3x Mesh and Extensions
PAIOS connects to built-in tools and external sibling apps locally over M3x Mesh (packages/m3x_mesh), an on-device Android IPC layer built on ContentProvider endpoints (*.mesh) and JSON-RPC—with zero cloud relays.
External apps and PAIOS communicate over Android ContentProvider authorities following the <package>.mesh convention:
External M3x Mesh clients target content://page.puzzak.paios.mesh (resolved automatically for 'paios' or legacy 'geminilocal' identifiers) to query on-device AI:
-
query_local_ai: Invokes headless or interactive Gemini Nano inference viaMainActivity.registerHeadlessMeshHandler->MeshOverlayActivity(Mode A silent RPC pill or Mode B interactive sheet whenopen_assistant_bubble/interactive_bubble: trueis passed). -
get_ai_status: Probes model readiness and engine availability (M3xMeshClient.checkAppStatus).
PAIOS discovers installed *.mesh providers on the device (up to a 2-second discovery timeout per app and 16-second IPC execution timeout in M3xMeshClient.callTool), allowing Gemini Nano to chain up to 6 tool turns per user message.
-
Schema Compaction:
InternalToolsHelper.getMeshToolSchemaPromptcompacts tool definitions and drops redundant"description"bloat so enabled tool schemas fit comfortably inside Gemini Nano's context window (3500chars budget on Nano v4,2200chars on Nano v3). -
Tool Registry Synchronization:
AIEngine._syncInternalToolRegistrationskeepstoolRegistrysynchronized with Settings -> Extensions toggles on init andsetExtensionEnabled, ensuring disabled tools are omitted from prompts,M3xMeshdiscovery, and execution. -
Permission Model:
-
First-party Puzzak extensions (
page.puzzak.*,com.puzzak.*) are enabled by default. - Third-party extensions are disabled by default until toggled on individually or via "Allow all new extensions" in Settings -> Extensions, which also includes a live parameter schema inspector.
-
First-party Puzzak extensions (
| App | Package ID | Mesh Authority | Capabilities | Status |
|---|---|---|---|---|
| PTK (Puzzak's ToolKit) | page.puzzak.ptk |
content://page.puzzak.ptk.mesh |
Server telemetry, Statuspage incident monitoring, TCP ping & subnet diagnostics | Available (Play Store) |
| Alerts | page.puzzak.alerts |
content://page.puzzak.alerts.mesh |
Ukraine air raid alerts and map status | Available (Play Store) |
| Speech Services (TinyASR & TTS) | page.puzzak.speech |
content://page.puzzak.speech.mesh |
Standalone offline STT (Rust TinyASR + Silero VAD) & neural TTS over android.speech.RecognitionService + M3x Mesh, with multi-language packs including Ukrainian & English |
Planned (Roadmap) |
Rather than bundling heavy Rust ASR runtimes, VAD models, and TTS voice packs directly inside page.puzzak.paios, voice input/output is architected as a dedicated M3x Mesh companion app implementing android.speech.RecognitionService, TextToSpeech, and an offline Live Voice loop over M3xMesh. This keeps PAIOS dependency-light and modular while enabling shared offline speech services across the Puzzak ecosystem.
PAIOS ships five built-in modules implemented identically across Dart (InternalToolsService) and native Kotlin (InternalToolsHelper.kt) so tools behave consistently in both ChatPage and MeshOverlayActivity:
| Module ID | Tool Name(s) | Behavior |
|---|---|---|
paios.docs |
query_aicore_documentation (aliases: about_paios, paios_info, get_paios_info) |
Searches bundled & cached PAIOS, AICore, and ML Kit GenAI documentation offline (including PAIOS self-knowledge sections). |
paios.device |
get_battery_status |
Reads live battery percentage, charging status, and power state. Explicitly guarded against triggering on visual/screenshot questions. |
| Overlay Built-in |
inspect_screen (app: "paios") |
Available inside MeshOverlayActivity for lazy 3-turn TTL screenshot + AssistStructure inspection. |
All online modules are disabled by default for strict offline privacy and return clean offline errors (checkOnline() parallel DNS/TCP checks) when unreachable:
| Module ID | Tool Name(s) | Provider & Notes |
|---|---|---|
paios.wikipedia |
wikipedia_summary, wikipedia_details
|
Fetches Wikipedia REST summaries and section-ranked article details (with 25s timeout fallback and wikipedia_details -> wikipedia_summary fallback). |
paios.search |
duckduckgo_search |
Queries DuckDuckGo Instant Answer API for quick definitions and snippets (gates wikipedia_summary hints on paios.wikipedia enablement). |
paios.weather |
weather_forecast |
Retrieves current weather conditions, WMO weather codes, and 2-day forecasts via Open-Meteo. |
Related Pages: Offline Tooling & Built-in Documentation · System Assistant Overlay & Screen Inspection · Architecture & Model Variants
PAIOS (page.puzzak.paios) — Synced with v1.8.9+26112001 | GitHub Repository · Nightly Google Group · Play Testing Opt-In · Report an Issue