Skip to content

Add platform features: Preferences, SecureStorage, device info, and sensor streaming#32

Merged
Redth merged 2 commits intomainfrom
Features-b3c5
Mar 11, 2026
Merged

Add platform features: Preferences, SecureStorage, device info, and sensor streaming#32
Redth merged 2 commits intomainfrom
Features-b3c5

Conversation

@Redth
Copy link
Copy Markdown
Owner

@Redth Redth commented Mar 11, 2026

Summary

Adds MAUI platform integration API support to MauiDevFlow — both agent endpoints and CLI commands for interacting with app storage, querying device/platform info, and streaming sensor data.

New Agent Endpoints

Storage CRUD

  • Preferences/api/preferences (list/get/set/delete/clear) with typed values (string, int, bool, double, float, long, datetime) and shared container support
  • SecureStorage/api/secure-storage (get/set/delete/clear)

Platform Info (read-only)

  • /api/platform/app-info — name, version, build, theme
  • /api/platform/device-info — manufacturer, model, OS, idiom
  • /api/platform/device-display — screen size, density, orientation, refresh rate
  • /api/platform/battery — charge level, state, power source
  • /api/platform/connectivity — network access, connection profiles
  • /api/platform/version-tracking — version/build history, first launch info
  • /api/platform/permissions — check all or specific permission statuses
  • /api/platform/geolocation — GPS coordinates with configurable accuracy/timeout

Sensors

  • /api/sensors — list sensors with support/active/subscriber status
  • /api/sensors/{name}/start / stop — manage sensor lifecycle
  • /ws/sensors?sensor=<name> — WebSocket streaming of real-time sensor readings

New CLI Commands

  • MAUI preferences list|get|set|delete|clear
  • MAUI secure-storage get|set|delete|clear
  • MAUI platform app-info|device-info|display|battery|connectivity|version-tracking|permissions|geolocation
  • MAUI sensors list|start|stop|stream

Infrastructure

  • Added DELETE HTTP method support to AgentHttpServer
  • New SensorManager class for sensor lifecycle management and WebSocket broadcasting
  • Preferences key tracking via internal registry (MAUI has no "list all keys" API)

Documentation

  • README.md — features, CLI examples, API endpoint table updated
  • AGENTS.md — new Platform Features architecture section
  • SKILL.md — sections 8-10 (Storage, Platform Info, Sensors) + command reference

Verification

  • dotnet build ci.slnf ✅ (0 warnings, 0 errors)
  • dotnet test ci.slnf ✅ (104 tests passed)

Redth and others added 2 commits March 11, 2026 11:32
…ensor streaming

Agent endpoints:
- Preferences CRUD (list/get/set/delete/clear) with key tracking registry
- SecureStorage CRUD (get/set/delete/clear)
- Platform info: app-info, device-info, display, battery, connectivity,
  version-tracking, permissions, geolocation
- Sensor management: list/start/stop with WebSocket streaming
- DELETE HTTP method support in AgentHttpServer

CLI commands:
- MAUI preferences list|get|set|delete|clear
- MAUI secure-storage get|set|delete|clear
- MAUI platform app-info|device-info|display|battery|connectivity|
  version-tracking|permissions|geolocation
- MAUI sensors list|start|stop|stream

New files:
- SensorManager.cs — sensor lifecycle + WebSocket broadcast

Documentation:
- README.md — features, CLI examples, API endpoint table
- AGENTS.md — architecture section for platform features
- SKILL.md — sections 8-10 and command reference

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
SensorManager now drops readings that arrive faster than ThrottleMs
(default 100ms). Clients can override via ?throttleMs= query param
on the /ws/sensors WebSocket, or --throttle on the CLI stream command.
Setting throttleMs=0 disables throttling for full-speed capture.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Redth Redth merged commit 5bae84f into main Mar 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant