Skip to content

Commit 122d06b

Browse files
committed
Remove mobile push support
1 parent a2b19a3 commit 122d06b

78 files changed

Lines changed: 87 additions & 8632 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.ade/ade.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,3 @@ ai:
4242
endpoint: http://127.0.0.1:1234
4343
autoDetect: true
4444
preferredModelId: null
45-
notifications:
46-
apns:
47-
enabled: true
48-
env: sandbox
49-
keyId: 8HYA5AWCGP
50-
teamId: VQ372F39G6
51-
bundleId: com.ade.ios

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
228228

229229
### Added
230230

231-
- Added mobile push notifications through APNS, external MCP OAuth, auto-rebase suggestions, PR issue resolver, smart tooltips, and the diagnostics dashboard.
231+
- Added external MCP OAuth, auto-rebase suggestions, PR issue resolver, smart tooltips, and the diagnostics dashboard.
232232
- Added legacy Cursor integration and OpenCode runtime integration for managed AI backends.
233233

234234
## [1.0.18] - 2026-04-14

apps/ade-cli/src/bootstrap.ts

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,6 @@ import { createAutomationIngressService } from "../../desktop/src/main/services/
7474
import { createAutomationSecretService } from "../../desktop/src/main/services/automations/automationSecretService";
7575
import type { createGithubService } from "../../desktop/src/main/services/github/githubService";
7676
import { createFeedbackReporterService } from "../../desktop/src/main/services/feedback/feedbackReporterService";
77-
import {
78-
ApnsKeyStore,
79-
ApnsService,
80-
} from "../../desktop/src/main/services/notifications/apnsService";
8177
import {
8278
ADE_AGENT_SKILLS_DIRS_ENV,
8379
getAdeAgentSkillRootsForPrompt,
@@ -231,8 +227,6 @@ export type AdeRuntime = {
231227
builtInBrowserService?: BuiltInBrowserService | BuiltInBrowserDesktopBridgeClient | null;
232228
syncHostService?: ReturnType<typeof createSyncHostService> | null;
233229
syncService?: ReturnType<typeof createSyncService> | null;
234-
apnsService?: ApnsService | null;
235-
apnsKeyStore?: ApnsKeyStore | null;
236230
automationIngressService?: ReturnType<typeof createAutomationIngressService> | null;
237231
feedbackReporterService?: ReturnType<typeof createFeedbackReporterService> | null;
238232
usageTrackingService?: ReturnType<typeof createUsageTrackingService> | null;
@@ -1158,39 +1152,6 @@ export async function createAdeRuntime(args: {
11581152
projectConfigService,
11591153
usageTrackingService,
11601154
});
1161-
const apnsService = new ApnsService({ logger });
1162-
const projectSecretsDir = path.join(projectRoot, ".ade", "secrets");
1163-
const apnsKeyStore = new ApnsKeyStore({
1164-
encryptedKeyPath: path.join(projectSecretsDir, "apns.key.enc"),
1165-
credentialStore: new EncryptedFileCredentialStore({
1166-
secretsDir: projectSecretsDir,
1167-
}),
1168-
});
1169-
try {
1170-
const apnsConfig = projectConfigService.get().effective.notifications?.apns;
1171-
if (
1172-
apnsConfig?.enabled &&
1173-
apnsKeyStore.has() &&
1174-
apnsConfig.keyId &&
1175-
apnsConfig.teamId &&
1176-
apnsConfig.bundleId
1177-
) {
1178-
const pem = apnsKeyStore.load();
1179-
if (pem) {
1180-
apnsService.configure({
1181-
keyP8Pem: pem,
1182-
keyId: apnsConfig.keyId,
1183-
teamId: apnsConfig.teamId,
1184-
bundleId: apnsConfig.bundleId,
1185-
env: apnsConfig.env ?? "sandbox",
1186-
});
1187-
}
1188-
}
1189-
} catch (error) {
1190-
logger.warn("apns.configure_on_startup_failed", {
1191-
error: error instanceof Error ? error.message : String(error),
1192-
});
1193-
}
11941155
let syncService: ReturnType<typeof createSyncService> | null = null;
11951156
if (resolvedArgs.syncRuntime?.enabled && agentChatService) {
11961157
const { createSyncService } = await import("./services/sync/syncService");
@@ -1287,8 +1248,6 @@ export async function createAdeRuntime(args: {
12871248
diffService,
12881249
syncService,
12891250
syncHostService: syncService?.getHostService() ?? null,
1290-
apnsService,
1291-
apnsKeyStore,
12921251
laneWorktreeLockService,
12931252
ptyService,
12941253
testService,
@@ -1338,7 +1297,6 @@ export async function createAdeRuntime(args: {
13381297
swallow(() => automationIngressService?.dispose());
13391298
swallow(() => automationService?.dispose());
13401299
swallow(() => usageTrackingService.dispose());
1341-
swallow(() => apnsService.dispose());
13421300
swallow(() => syncService?.dispose());
13431301
swallow(() => processService.disposeAll());
13441302
swallow(() => runtimeDiagnosticsService.dispose());

apps/ade-cli/src/services/sync/deviceRegistryService.ts

Lines changed: 0 additions & 177 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import type {
1313
SyncPeerMetadata,
1414
SyncPeerPlatform,
1515
} from "../../../../desktop/src/shared/types";
16-
import { normalizeNotificationPreferences, type NotificationPreferences } from "../../../../desktop/src/shared/types/sync";
1716
import type { Logger } from "../../../../desktop/src/main/services/logging/logger";
1817
import { mapPlatform } from "./syncProtocol";
1918
import { resolveTailscaleCliPath } from "./resolveTailscaleCliPath";
@@ -53,7 +52,6 @@ type ClusterStateRow = {
5352

5453
const DEVICE_ID_FILE = "sync-device-id";
5554
export const DEFAULT_SYNC_CLUSTER_ID = "default";
56-
const WORKSPACE_ACTIVITY_ID = "workspace";
5755
const TAILSCALE_STATUS_CACHE_MS = 30_000;
5856

5957
let tailscaleStatusCache:
@@ -477,174 +475,6 @@ export function createDeviceRegistryService(args: DeviceRegistryServiceArgs) {
477475
});
478476
};
479477

480-
type ApnsTokenKind = "alert" | "activity-start" | "activity-update";
481-
482-
const apnsMetaKey = (kind: ApnsTokenKind): string => {
483-
if (kind === "alert") return "apnsAlertToken";
484-
if (kind === "activity-start") return "apnsActivityStartToken";
485-
return "apnsActivityUpdateTokens";
486-
};
487-
488-
const setApnsToken = (
489-
deviceId: string,
490-
token: string,
491-
kind: ApnsTokenKind,
492-
env: "sandbox" | "production",
493-
extras: { bundleId?: string; activityId?: string } = {},
494-
): SyncDeviceRecord | null => {
495-
const device = getDevice(deviceId);
496-
if (!device) return null;
497-
const nextMetadata: Record<string, unknown> = {
498-
...device.metadata,
499-
apnsEnv: env,
500-
apnsTokenUpdatedAt: nowIso(),
501-
};
502-
if (extras.bundleId) nextMetadata.apnsBundleId = extras.bundleId;
503-
if (kind === "activity-update") {
504-
const existing = (device.metadata.apnsActivityUpdateTokens as Record<string, string> | undefined) ?? {};
505-
const activityId = extras.activityId?.trim() || WORKSPACE_ACTIVITY_ID;
506-
nextMetadata.apnsActivityUpdateTokens = { ...existing, [activityId]: token };
507-
} else {
508-
nextMetadata[apnsMetaKey(kind)] = token;
509-
}
510-
return upsertDeviceRecord({
511-
deviceId: device.deviceId,
512-
siteId: device.siteId,
513-
name: device.name,
514-
platform: device.platform,
515-
deviceType: device.deviceType,
516-
lastSeenAt: device.lastSeenAt,
517-
lastHost: device.lastHost,
518-
lastPort: device.lastPort,
519-
tailscaleIp: device.tailscaleIp,
520-
ipAddresses: device.ipAddresses,
521-
metadata: nextMetadata,
522-
});
523-
};
524-
525-
const getApnsTokenForDevice = (
526-
deviceId: string,
527-
kind: ApnsTokenKind,
528-
activityId?: string,
529-
): string | null => {
530-
const device = getDevice(deviceId);
531-
if (!device) return null;
532-
if (kind === "activity-update") {
533-
const map = (device.metadata.apnsActivityUpdateTokens as Record<string, string> | undefined) ?? {};
534-
return map[activityId?.trim() || WORKSPACE_ACTIVITY_ID] ?? null;
535-
}
536-
const raw = device.metadata[apnsMetaKey(kind)];
537-
return typeof raw === "string" && raw.trim().length > 0 ? raw : null;
538-
};
539-
540-
const setNotificationPreferences = (
541-
deviceId: string,
542-
prefs: NotificationPreferences,
543-
): SyncDeviceRecord | null => {
544-
const device = getDevice(deviceId);
545-
if (!device) return null;
546-
const normalizedPrefs = normalizeNotificationPreferences(prefs);
547-
return upsertDeviceRecord({
548-
deviceId: device.deviceId,
549-
siteId: device.siteId,
550-
name: device.name,
551-
platform: device.platform,
552-
deviceType: device.deviceType,
553-
lastSeenAt: device.lastSeenAt,
554-
lastHost: device.lastHost,
555-
lastPort: device.lastPort,
556-
tailscaleIp: device.tailscaleIp,
557-
ipAddresses: device.ipAddresses,
558-
metadata: {
559-
...device.metadata,
560-
notificationPreferences: normalizedPrefs,
561-
notificationPreferencesUpdatedAt: nowIso(),
562-
},
563-
});
564-
};
565-
566-
const getNotificationPreferences = (deviceId: string): NotificationPreferences | null => {
567-
const prefs = getDevice(deviceId)?.metadata.notificationPreferences;
568-
if (!prefs || typeof prefs !== "object" || Array.isArray(prefs)) return null;
569-
return normalizeNotificationPreferences(prefs);
570-
};
571-
572-
const invalidateApnsToken = (deviceToken: string): void => {
573-
const token = deviceToken.trim();
574-
if (!token) return;
575-
const device = findDeviceByApnsToken(token);
576-
if (!device) return;
577-
const nextMetadata = { ...device.metadata };
578-
if (nextMetadata.apnsAlertToken === token) {
579-
delete nextMetadata.apnsAlertToken;
580-
}
581-
if (nextMetadata.apnsActivityStartToken === token) {
582-
delete nextMetadata.apnsActivityStartToken;
583-
}
584-
const updates = nextMetadata.apnsActivityUpdateTokens;
585-
if (updates && typeof updates === "object" && !Array.isArray(updates)) {
586-
const nextUpdates = { ...(updates as Record<string, string>) };
587-
for (const [activityId, value] of Object.entries(nextUpdates)) {
588-
if (value === token) delete nextUpdates[activityId];
589-
}
590-
if (Object.keys(nextUpdates).length > 0) {
591-
nextMetadata.apnsActivityUpdateTokens = nextUpdates;
592-
} else {
593-
delete nextMetadata.apnsActivityUpdateTokens;
594-
}
595-
}
596-
upsertDeviceRecord({
597-
deviceId: device.deviceId,
598-
siteId: device.siteId,
599-
name: device.name,
600-
platform: device.platform,
601-
deviceType: device.deviceType,
602-
lastSeenAt: device.lastSeenAt,
603-
lastHost: device.lastHost,
604-
lastPort: device.lastPort,
605-
tailscaleIp: device.tailscaleIp,
606-
ipAddresses: device.ipAddresses,
607-
metadata: nextMetadata,
608-
});
609-
};
610-
611-
const invalidateApnsTokensForDevice = (deviceId: string): void => {
612-
const device = getDevice(deviceId);
613-
if (!device) return;
614-
const nextMetadata = { ...device.metadata };
615-
delete nextMetadata.apnsAlertToken;
616-
delete nextMetadata.apnsActivityStartToken;
617-
delete nextMetadata.apnsActivityUpdateTokens;
618-
upsertDeviceRecord({
619-
deviceId: device.deviceId,
620-
siteId: device.siteId,
621-
name: device.name,
622-
platform: device.platform,
623-
deviceType: device.deviceType,
624-
lastSeenAt: device.lastSeenAt,
625-
lastHost: device.lastHost,
626-
lastPort: device.lastPort,
627-
tailscaleIp: device.tailscaleIp,
628-
ipAddresses: device.ipAddresses,
629-
metadata: nextMetadata,
630-
});
631-
};
632-
633-
const findDeviceByApnsToken = (token: string): SyncDeviceRecord | null => {
634-
for (const device of listDevices()) {
635-
const alert = device.metadata.apnsAlertToken;
636-
const activity = device.metadata.apnsActivityStartToken;
637-
if (alert === token || activity === token) return device;
638-
const updates = device.metadata.apnsActivityUpdateTokens;
639-
if (updates && typeof updates === "object") {
640-
for (const value of Object.values(updates as Record<string, unknown>)) {
641-
if (value === token) return device;
642-
}
643-
}
644-
}
645-
return null;
646-
};
647-
648478
const applyBrainStatus = (payload: SyncBrainStatusPayload): void => {
649479
upsertPeerMetadata(payload.brain, { lastSeenAt: nowIso() });
650480
for (const peer of payload.connectedPeers) {
@@ -698,13 +528,6 @@ export function createDeviceRegistryService(args: DeviceRegistryServiceArgs) {
698528
applyBrainStatus,
699529
clearClusterRegistryForViewerJoin,
700530
forgetDevice,
701-
setApnsToken,
702-
getApnsTokenForDevice,
703-
setNotificationPreferences,
704-
getNotificationPreferences,
705-
invalidateApnsToken,
706-
invalidateApnsTokensForDevice,
707-
findDeviceByApnsToken,
708531
};
709532
}
710533

0 commit comments

Comments
 (0)