M7: polish + E2E + docs (layout pass, theming, states, e2e driver, schema, setup.md, security)
This commit is contained in:
1 parent
0cc8b7aafe
commit
bf6bf7e8bd
26 files changed
+2225
-327
No files matched your search
@@ -691,6 +691,7 @@ class AndroidAdapter(BasePlatformAdapter):
|
||||
self.max_upload_bytes = int(
|
||||
extra.get("max_upload_bytes", DEFAULT_MAX_UPLOAD_BYTES)
|
||||
)
|
||||
self._gateway_status = protocol.STATUS_ONLINE
|
||||
|
||||
# Home channel: the core hook turns the env-seeded ``home_channel``
|
||||
# dict into a HomeChannel dataclass on the config; config.yaml may
|
||||
@@ -796,6 +797,10 @@ class AndroidAdapter(BasePlatformAdapter):
|
||||
self._connected = False
|
||||
return False
|
||||
|
||||
# M5: announce gateway health to connected clients (none yet at
|
||||
# startup; the frame + plumbing exist for future transitions).
|
||||
await self._ws_server.broadcast(protocol.status(self._gateway_status))
|
||||
|
||||
# M3: ensure the default (home) channel exists in the directory so the
|
||||
# app's channel list and cron home delivery have a stable anchor.
|
||||
try:
|
||||
@@ -1542,6 +1547,12 @@ class AndroidAdapter(BasePlatformAdapter):
|
||||
media_types=media_types,
|
||||
)
|
||||
await self.handle_message(event)
|
||||
# M5: acknowledge the user message to the originating device (the
|
||||
# app shows ✓✓) at the moment it is handed to the agent.
|
||||
await self._ws_server.send_to(
|
||||
device_id,
|
||||
protocol.read_receipt(chat_id, message_id),
|
||||
)
|
||||
|
||||
# ── M4: inbound media (app -> agent) ──────────────────────────────────
|
||||
#
|
||||
@@ -2023,6 +2034,10 @@ class AndroidAdapter(BasePlatformAdapter):
|
||||
|
||||
# ── hello.ack helpers ─────────────────────────────────────────────────
|
||||
|
||||
def gateway_status(self) -> str:
|
||||
"""Current gateway health state (sent to each pairing connection)."""
|
||||
return self._gateway_status
|
||||
|
||||
def server_caps(self) -> Dict[str, Any]:
|
||||
"""Capability flags advertised in ``hello.ack`` (M4 surface)."""
|
||||
return {
|
||||
|
||||
Reference in new issue
Block a user