robopark 3.3.5 → 3.3.6

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": "robopark",
3
- "version": "3.3.5",
3
+ "version": "3.3.6",
4
4
  "description": "RoboPark fleet control CLI \u2014 scheduler, control UI, and character voice calls. Standalone: no infinicode runtime.",
5
5
  "type": "module",
6
6
  "bin": {
package/scheduler/main.py CHANGED
@@ -2022,6 +2022,16 @@ async def create_voice_call(payload: VoiceCallRequest):
2022
2022
  )
2023
2023
  if response.status_code >= 400:
2024
2024
  await _abandon_session(session_id, "provider_auth_error")
2025
+ # 401/403 mean the key is wrong, revoked, or missing a scope such as
2026
+ # convai_write. Reporting that as 502 told the join page it was a
2027
+ # transient gateway blip, so an always-on call reconnected forever
2028
+ # against a credential that could never work. 503 marks it as
2029
+ # configuration, which the page treats as permanent.
2030
+ if response.status_code in (401, 403):
2031
+ raise HTTPException(
2032
+ 503,
2033
+ f"ElevenLabs rejected the API key ({response.status_code}): {response.text[:300]}",
2034
+ )
2025
2035
  raise HTTPException(502, f"ElevenLabs signed URL failed ({response.status_code}): {response.text[:300]}")
2026
2036
  signed_url = response.json().get("signed_url")
2027
2037
  if not signed_url:
@@ -166,7 +166,11 @@
166
166
  // A 4xx means the link itself is wrong and retrying cannot fix it. Anything
167
167
  // else (5xx, signing timeout, network drop) is transient, and dead-ending
168
168
  // here is what left a failed call with no reconnect until a manual re-join.
169
- var status=Number(error&&error.status||0),permanent=status>=400&&status<500;
169
+ // 4xx: the link itself is wrong. 503: the scheduler is telling us this
170
+ // deployment is misconfigured (no ElevenLabs key, or a key the provider
171
+ // rejected) — retrying that forever just mints a dead session every 30s
172
+ // and never recovers. Everything else really is transient.
173
+ var status=Number(error&&error.status||0),permanent=(status>=400&&status<500)||status===503;
170
174
  if(!permanent&&alwaysOn&&desired&&!ending){el('join').hidden=true;el('end').hidden=false;scheduleReconnect();return}
171
175
  fail(details.message)})}
172
176
  function start(){if(desired||conversation||connecting)return;if(mode==='production'&&!robot){fail('Select a registered production robot first.');return}alwaysOn=true;el('always-on').classList.add('on');el('always-on').setAttribute('aria-pressed','true');el('always-on').textContent='Always on: ON';if(mode==='test')ensureMicAudioContext();desired=true;retryAttempt=0;el('join').disabled=true;text('state','requesting microphone permission');stage('permission');var audio=inputDeviceId?{deviceId:{exact:inputDeviceId}}:true;navigator.mediaDevices.getUserMedia({audio:audio}).then(function(stream){stream.getTracks().forEach(function(track){track.stop()});return startLocalVideo()}).then(function(){connectAttempt('initial')}).catch(function(error){if(desired){text('state','microphone unavailable; retrying');scheduleReconnect()}else{fail(error&&error.message||String(error))}})}
@@ -165,7 +165,11 @@
165
165
  // A 4xx means the link itself is wrong and retrying cannot fix it. Anything
166
166
  // else (5xx, signing timeout, network drop) is transient, and dead-ending
167
167
  // here is what left a failed call with no reconnect until a manual re-join.
168
- var status=Number(error&&error.status||0),permanent=status>=400&&status<500;
168
+ // 4xx: the link itself is wrong. 503: the scheduler is telling us this
169
+ // deployment is misconfigured (no ElevenLabs key, or a key the provider
170
+ // rejected) — retrying that forever just mints a dead session every 30s
171
+ // and never recovers. Everything else really is transient.
172
+ var status=Number(error&&error.status||0),permanent=(status>=400&&status<500)||status===503;
169
173
  if(!permanent&&alwaysOn&&desired&&!ending){el('join').hidden=true;el('end').hidden=false;scheduleReconnect();return}
170
174
  fail(details.message)})}
171
175
  function start(){if(desired||conversation||connecting)return;if(mode==='production'&&!robot){fail('Select a registered production robot first.');return}alwaysOn=true;el('always-on').classList.add('on');el('always-on').setAttribute('aria-pressed','true');el('always-on').textContent='Always on: ON';if(mode==='test')ensureMicAudioContext();desired=true;retryAttempt=0;el('join').disabled=true;text('state','requesting microphone permission');stage('permission');var audio=inputDeviceId?{deviceId:{exact:inputDeviceId}}:true;navigator.mediaDevices.getUserMedia({audio:audio}).then(function(stream){stream.getTracks().forEach(function(track){track.stop()});return startLocalVideo()}).then(function(){connectAttempt('initial')}).catch(function(error){if(desired){text('state','microphone unavailable; retrying');scheduleReconnect()}else{fail(error&&error.message||String(error))}})}