remote-codex 0.11.10 → 0.11.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -781,7 +781,9 @@ function buildRelayServer(config2) {
781
781
  return;
782
782
  }
783
783
  const body = updateAccountSchema.parse(request.body ?? {});
784
- return store.updateAccount(user.id, body);
784
+ return store.updateAccount(user.id, {
785
+ ...body.username !== void 0 ? { username: body.username } : {}
786
+ });
785
787
  });
786
788
  app2.patch("/relay/account/password", async (request, reply) => {
787
789
  const user = requireRelayUser(request, reply, store);
@@ -1129,7 +1131,7 @@ async function forwardRelayHttp(input) {
1129
1131
  input.reply.header(name, value);
1130
1132
  }
1131
1133
  }
1132
- input.reply.status(response.statusCode).send(response.body);
1134
+ input.reply.status(response.statusCode).send(relayResponseBody(response));
1133
1135
  } catch (error) {
1134
1136
  const message = error instanceof Error ? error.message : "Relay request failed.";
1135
1137
  input.reply.status(message.includes("timed out") ? 504 : 503).send({
@@ -1138,6 +1140,12 @@ async function forwardRelayHttp(input) {
1138
1140
  });
1139
1141
  }
1140
1142
  }
1143
+ function relayResponseBody(response) {
1144
+ if (response.bodyEncoding === "base64") {
1145
+ return Buffer.from(response.body, "base64");
1146
+ }
1147
+ return response.body;
1148
+ }
1141
1149
  function connectRelayWebsocket(supervisor, socket, threadId) {
1142
1150
  const clientId = randomUUID();
1143
1151
  supervisor.clientSockets.set(clientId, { socket, threadId });