@makerbi/remodex 2.0.1 → 2.3.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@makerbi/remodex",
3
- "version": "2.0.1",
3
+ "version": "2.3.1",
4
4
  "description": "Local bridge between Codex and the Remodex mobile app. Run `remodex up` to start.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -35,6 +35,6 @@
35
35
  "type": "commonjs",
36
36
  "dependencies": {
37
37
  "qrcode-terminal": "^0.12.0",
38
- "ws": "^8.19.0"
38
+ "ws": "^8.21.0"
39
39
  }
40
40
  }
@@ -23,11 +23,11 @@ function composeAccountStatus({
23
23
  normalizeString(authStatus?.authMethod),
24
24
  normalizeString(account?.type),
25
25
  ]) || null;
26
- const tokenReady = Boolean(authToken);
26
+ // Voice transcription now uses ChatGPT session auth only; API-key tokens must not advertise voice readiness.
27
+ const tokenReady = Boolean(authToken) && isChatGPTAuthMethod(authMethod);
27
28
  const requiresOpenaiAuth = Boolean(accountRead?.requiresOpenaiAuth || authStatus?.requiresOpenaiAuth);
28
29
  const hasPriorLoginContext = hasAccountLogin || Boolean(authMethod);
29
- const hasUsableChatGPTToken = tokenReady && isChatGPTAuthMethod(authMethod);
30
- const needsReauth = !loginInFlight && requiresOpenaiAuth && hasPriorLoginContext && !hasUsableChatGPTToken;
30
+ const needsReauth = !loginInFlight && requiresOpenaiAuth && hasPriorLoginContext && !tokenReady;
31
31
  const isAuthenticated = !needsReauth && (tokenReady || hasAccountLogin);
32
32
  const status = isAuthenticated
33
33
  ? "authenticated"
@@ -55,7 +55,8 @@ function composeAccountStatus({
55
55
  }
56
56
 
57
57
  function isChatGPTAuthMethod(authMethod) {
58
- return authMethod === "chatgpt" || authMethod === "chatgptAuthTokens";
58
+ const normalized = normalizeString(authMethod).toLowerCase().replace(/[^a-z0-9]/g, "");
59
+ return normalized === "chatgpt" || normalized === "chatgptauthtokens";
59
60
  }
60
61
 
61
62
  // Removes any token-bearing fields before the bridge sends auth state to the phone.