The best way to control Claude Code, Codex and more from any computer or phone
fix(server): Swift TestFlight clients can read settings again (#26455)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
shivam committed
Nov 15, 2026 at 02:02 UTC
3a5d7f39a8a61f4942db266066b338881135418b
5 files changed
+19
apps/server/src/auth/RpcAuthorization.test.ts
+4
@@ -75,6 +75,10 @@ describe("RPC authorization scopes", () => {
75
}
76
});
77
78
+ it("still lets readers load settings the way installed Swift clients ask", () => {
79
+ expect(requiredScopeForRpcMethod("server.getSettings")).toBe(AuthOrchestrationReadScope);
80
+ });
81
+
82
it("rejects unknown RPC method names", () => {
83
for (const method of ["server.notRegistered", "toString", "constructor"]) {
84
expect(() => requiredScopeForRpcMethod(method)).toThrow(
apps/server/src/auth/RpcAuthorization.ts
+1
@@ -90,6 +90,7 @@ export const RPC_REQUIRED_SCOPES = {
90
[WS_METHODS.serverRemoveKeybinding]: AuthSettingsWriteScope,
91
[WS_METHODS.serverGetStorageCleanupReport]: AuthOrchestrationReadScope,
92
[WS_METHODS.serverGetDatabaseStorage]: AuthOrchestrationReadScope,
93
+ [WS_METHODS.serverGetSettings]: AuthOrchestrationReadScope,
94
[WS_METHODS.peerLinksList]: AuthAccessReadScope,
95
[WS_METHODS.serverUpdateSettings]: AuthSettingsWriteScope,
96
[WS_METHODS.serverSearchAcpRegistry]: AuthOrchestrationReadScope,
apps/server/src/observability/RpcInstrumentation.ts
+1
@@ -69,6 +69,7 @@ const RPC_AGGREGATES = {
69
[WS_METHODS.peerLinksLink]: "peerLinks",
70
[WS_METHODS.peerLinksUnlink]: "peerLinks",
71
[WS_METHODS.peerLinksAnswerRequest]: "peerLinks",
72
+ [WS_METHODS.serverGetSettings]: "server",
73
[WS_METHODS.serverUpdateSettings]: "server",
74
[WS_METHODS.serverSearchAcpRegistry]: "server",
75
[WS_METHODS.serverPrepareAcpRegistryAgent]: "server",
apps/server/src/ws.ts
+4
@@ -2657,6 +2657,10 @@ export const layerWsRpc = (
2657
Effect.annotateCurrentSpan({ "orchestration_v2.thread_id": input.threadId }).pipe(
2658
Effect.andThen(peerLinkRequests.answer(input)),
2659
),
2660
+ [WS_METHODS.serverGetSettings]: (_input) =>
2661
+ Effect.map(serverSettings.getSettings, (settings) =>
2662
+ ServerSettings.redactServerSettingsForClient(settings, settingsClient),
2663
+ ),
2664
[WS_METHODS.serverUpdateSettings]:
2665
/* Request instrumentation already owns the span; keep this helper in that context. */
2666
Effect.fnUntraced(function* ({ patch, providerInstanceMutation }) {
packages/contracts/src/rpc.ts
+9
@@ -523,6 +523,7 @@ export const WS_METHODS = {
523
peerLinksLink: "peerLinks.link",
524
peerLinksUnlink: "peerLinks.unlink",
525
peerLinksAnswerRequest: "peerLinks.answerRequest",
526
+ serverGetSettings: "server.getSettings",
527
serverUpdateSettings: "server.updateSettings",
528
serverDiscoverSourceControl: "server.discoverSourceControl",
529
serverCheckSecretSource: "server.checkSecretSource",
@@ -864,6 +865,13 @@ const WsPeerLinksAnswerRequestRpc = Rpc.make(WS_METHODS.peerLinksAnswerRequest,
865
error: Schema.Union([PeerLinkRequestError, EnvironmentAuthorizationError]),
866
});
867
868
+// No in-tree caller; installed Swift TestFlight builds still request it.
869
+const WsServerGetSettingsRpc = Rpc.make(WS_METHODS.serverGetSettings, {
870
+ payload: Schema.Struct({}),
871
+ success: ServerSettings,
872
+ error: Schema.Union([ServerSettingsError, EnvironmentAuthorizationError]),
873
+});
874
+
875
const WsServerUpdateSettingsRpc = Rpc.make(WS_METHODS.serverUpdateSettings, {
876
payload: Schema.Struct({
877
patch: ClientServerSettingsPatch,
@@ -2132,6 +2140,7 @@ export const WsRpcGroup = RpcGroup.make(
2140
WsServerRunStorageCleanupRpc,
2141
WsServerGetStorageCleanupReportRpc,
2142
WsServerGetDatabaseStorageRpc,
2143
+ WsServerGetSettingsRpc,
2144
WsServerReclaimDatabaseSpaceRpc,
2145
WsServerUpdateSettingsRpc,
2146
WsPeerLinksListRpc,