惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
U
Unit 42
Google DeepMind News
Google DeepMind News
博客园 - 司徒正美
Y
Y Combinator Blog
F
Fortinet All Blogs
云风的 BLOG
云风的 BLOG
T
Tailwind CSS Blog
G
Google Developers Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
罗磊的独立博客
D
DataBreaches.Net
T
The Blog of Author Tim Ferriss
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
MyScale Blog
MyScale Blog
N
Netflix TechBlog - Medium
Microsoft Security Blog
Microsoft Security Blog
GbyAI
GbyAI
P
Proofpoint News Feed
Jina AI
Jina AI
B
Blog RSS Feed
腾讯CDC
阮一峰的网络日志
阮一峰的网络日志
D
Docker

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
feat: add ios push relay sandbox profiles · openclaw/open...
joshavant · 2026-06-23 · via Recent Commits to openclaw:main

@@ -71,10 +71,10 @@ actor PushRegistrationManager {

7171

throw PushRelayError.relayMisconfigured(

7272

"Relay transport requires OpenClawPushDistribution=official")

7373

}

74-

guard self.buildConfig.apnsEnvironment == .production else {

75-

throw PushRelayError.relayMisconfigured(

76-

"Relay transport requires OpenClawPushAPNsEnvironment=production")

77-

}

74+

try Self.validateRelayContract(

75+

relayProfile: self.buildConfig.relayProfile,

76+

apnsEnvironment: self.buildConfig.apnsEnvironment,

77+

proofPolicy: self.buildConfig.proofPolicy)

7878

guard let relayClient = self.relayClient else {

7979

throw PushRelayError.relayBaseURLMissing

8080

}

@@ -96,6 +96,9 @@ actor PushRegistrationManager {

9696

stored.installationId == installationId,

9797

stored.gatewayDeviceId == gatewayIdentity.deviceId,

9898

stored.relayOrigin == relayOrigin,

99+

stored.apnsEnvironment == self.buildConfig.apnsEnvironment.rawValue,

100+

stored.relayProfile == self.buildConfig.relayProfile.rawValue,

101+

stored.proofPolicy == self.buildConfig.proofPolicy.rawValue,

99102

stored.lastAPNsTokenHashHex == tokenHashHex,

100103

!Self.isExpired(stored.relayHandleExpiresAtMs)

101104

{

@@ -112,14 +115,16 @@ actor PushRegistrationManager {

112115

tokenDebugSuffix: stored.tokenDebugSuffix))

113116

}

114117115-

let response = try await relayClient.register(

118+

let response = try await relayClient.register(PushRelayRegistrationInput(

116119

installationId: installationId,

117120

bundleId: bundleId,

118121

appVersion: DeviceInfoHelper.appVersion(),

119122

environment: self.buildConfig.apnsEnvironment,

123+

relayProfile: self.buildConfig.relayProfile,

124+

proofPolicy: self.buildConfig.proofPolicy,

120125

distribution: self.buildConfig.distribution,

121126

apnsTokenHex: apnsTokenHex,

122-

gatewayIdentity: gatewayIdentity)

127+

gatewayIdentity: gatewayIdentity))

123128

let registrationState = PushRelayRegistrationStore.RegistrationState(

124129

relayHandle: response.relayHandle,

125130

sendGrant: response.sendGrant,

@@ -129,7 +134,10 @@ actor PushRegistrationManager {

129134

tokenDebugSuffix: Self.normalizeTokenSuffix(response.tokenSuffix),

130135

lastAPNsTokenHashHex: tokenHashHex,

131136

installationId: installationId,

132-

lastTransport: self.buildConfig.transport.rawValue)

137+

lastTransport: self.buildConfig.transport.rawValue,

138+

apnsEnvironment: self.buildConfig.apnsEnvironment.rawValue,

139+

relayProfile: self.buildConfig.relayProfile.rawValue,

140+

proofPolicy: self.buildConfig.proofPolicy.rawValue)

133141

_ = PushRelayRegistrationStore.saveRegistrationState(registrationState)

134142

return try Self.encodePayload(

135143

RelayGatewayPushRegistrationPayload(

@@ -151,6 +159,30 @@ actor PushRegistrationManager {

151159

return expiresAtMs <= nowMs + 60000

152160

}

153161162+

private static func validateRelayContract(

163+

relayProfile: PushRelayProfile,

164+

apnsEnvironment: PushAPNsEnvironment,

165+

proofPolicy: PushProofPolicy)

166+

throws {

167+

switch relayProfile {

168+

case .production:

169+

guard apnsEnvironment == .production, proofPolicy == .appleStrict else {

170+

throw PushRelayError.relayMisconfigured(

171+

"production relay profile requires production APNs and appleStrict proof")

172+

}

173+

case .deviceSandbox:

174+

guard apnsEnvironment == .sandbox, proofPolicy == .appleDevelopment else {

175+

throw PushRelayError.relayMisconfigured(

176+

"deviceSandbox relay profile requires sandbox APNs and appleDevelopment proof")

177+

}

178+

case .simulatorSandbox:

179+

guard apnsEnvironment == .sandbox, proofPolicy == .internalSimulator else {

180+

throw PushRelayError.relayMisconfigured(

181+

"simulatorSandbox relay profile requires sandbox APNs and internalSimulator proof")

182+

}

183+

}

184+

}

185+154186

private static func sha256Hex(_ value: String) -> String {

155187

let digest = SHA256.hash(data: Data(value.utf8))

156188

return digest.map { String(format: "%02x", $0) }.joined()