From e6a5d5784ca248aacca547c62b7e580b26dbae61 Mon Sep 17 00:00:00 2001 From: Ayaan Zaidi Date: Thu, 26 Feb 2026 14:02:43 +0530 Subject: [PATCH] feat(gateway): allow notifications.list for android nodes --- src/gateway/gateway-misc.test.ts | 13 +++++++++++++ src/gateway/node-command-policy.ts | 2 ++ 2 files changed, 15 insertions(+) diff --git a/src/gateway/gateway-misc.test.ts b/src/gateway/gateway-misc.test.ts index a202e4b2915..e6f65ed1b77 100644 --- a/src/gateway/gateway-misc.test.ts +++ b/src/gateway/gateway-misc.test.ts @@ -334,6 +334,19 @@ describe("resolveNodeCommandAllowlist", () => { } }); + it("includes Android notifications.list by default", () => { + const allow = resolveNodeCommandAllowlist( + {}, + { + platform: "android 16", + deviceFamily: "Android", + }, + ); + + expect(allow.has("notifications.list")).toBe(true); + expect(allow.has("system.notify")).toBe(false); + }); + it("can explicitly allow dangerous commands via allowCommands", () => { const allow = resolveNodeCommandAllowlist( { diff --git a/src/gateway/node-command-policy.ts b/src/gateway/node-command-policy.ts index ec829b0c5f6..68eb8bb2835 100644 --- a/src/gateway/node-command-policy.ts +++ b/src/gateway/node-command-policy.ts @@ -18,6 +18,7 @@ const CAMERA_DANGEROUS_COMMANDS = ["camera.snap", "camera.clip"]; const SCREEN_DANGEROUS_COMMANDS = ["screen.record"]; const LOCATION_COMMANDS = ["location.get"]; +const NOTIFICATION_COMMANDS = ["notifications.list"]; const DEVICE_COMMANDS = ["device.info", "device.status"]; @@ -69,6 +70,7 @@ const PLATFORM_DEFAULTS: Record = { ...CANVAS_COMMANDS, ...CAMERA_COMMANDS, ...LOCATION_COMMANDS, + ...NOTIFICATION_COMMANDS, ...DEVICE_COMMANDS, ...CONTACTS_COMMANDS, ...CALENDAR_COMMANDS,