robopark 3.3.18 → 3.3.21

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.18",
3
+ "version": "3.3.21",
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
@@ -1928,16 +1928,28 @@ async def _claim_character_device(
1928
1928
  )
1929
1929
  await db.execute(
1930
1930
  "UPDATE devices SET character_id = ?, name = ?, status = ?, last_heartbeat = ? WHERE id = ?",
1931
- (character_id, label, "claimed", stamp, device_id),
1931
+ (character_id, label, "online", stamp, device_id),
1932
1932
  )
1933
1933
  else:
1934
1934
  await db.execute(
1935
1935
  """INSERT INTO devices (id, name, character_id, status, device_role,
1936
1936
  last_heartbeat, enrolled_at, notes)
1937
1937
  VALUES (?, ?, ?, ?, ?, ?, ?, ?)""",
1938
- (device_id, label, character_id, "claimed", "voice_vision", stamp, stamp,
1938
+ (device_id, label, character_id, "online", "voice_vision", stamp, stamp,
1939
1939
  f"auto-claimed via join link {claim_key}"),
1940
1940
  )
1941
+ # Fleet views, the park map and the camera grid read the robots table, not
1942
+ # devices. A claim that only wrote a device row was invisible to all of
1943
+ # them, so a live managed call showed the robot offline everywhere.
1944
+ await db.execute(
1945
+ """INSERT INTO robots (id, name, character_id, status, last_heartbeat)
1946
+ VALUES (?, ?, ?, 'online', ?)
1947
+ ON CONFLICT(id) DO UPDATE SET
1948
+ character_id = excluded.character_id,
1949
+ status = 'online',
1950
+ last_heartbeat = excluded.last_heartbeat""",
1951
+ (device_id, label, character_id, stamp),
1952
+ )
1941
1953
  await db.commit()
1942
1954
  # No MJPEG ref: a claimed device publishes its own browser camera rather than
1943
1955
  # exposing a robot-side vision server, so the page falls back to local video.
@@ -2040,6 +2052,20 @@ async def create_voice_call(payload: VoiceCallRequest):
2040
2052
  json.dumps(["control-center", engine, call_mode] + (["managed-link"] if join_link_id else [])),
2041
2053
  json.dumps(metadata, separators=(",", ":")),
2042
2054
  ))
2055
+ # Publish live status. The session row alone is invisible to the park
2056
+ # map, fleet cards and camera grid: those read robots.current_session_id
2057
+ # and the device heartbeat. Without this a managed ElevenLabs call was
2058
+ # fully active while every operator view showed the robot offline.
2059
+ if robot_id:
2060
+ await db.execute(
2061
+ "UPDATE robots SET status = 'online', current_session_id = ?, "
2062
+ "connected_server_id = ?, last_heartbeat = ? WHERE id = ?",
2063
+ (session_id, server["id"] if server else None, now.isoformat(), robot_id),
2064
+ )
2065
+ await db.execute(
2066
+ "UPDATE devices SET status = 'online', last_heartbeat = ? WHERE id = ?",
2067
+ (now.isoformat(), robot_id),
2068
+ )
2043
2069
  await db.commit()
2044
2070
 
2045
2071
  signed_url = None
@@ -15,7 +15,7 @@
15
15
  "id": "barracuda",
16
16
  "name": "BARRACUDA",
17
17
  "description": "The Star Guardians speed navigator and tactical pilot.",
18
- "voice_stack_id": "english-default",
18
+ "voice_stack_id": "hebrew-default",
19
19
  "default_engine": "elevenlabs",
20
20
  "elevenlabs_agent_id": "agent_3001ky0z8wq0fht8xyb0tnkdksdz",
21
21
  "elevenlabs_branch_id": "agtbrch_6401ky0z8wq2fwqa7117kn7d6x6p",
@@ -29,7 +29,7 @@
29
29
  "id": "jaguar",
30
30
  "name": "JAGUAR",
31
31
  "description": "A confident and agile Star Guardians scout.",
32
- "voice_stack_id": "english-default",
32
+ "voice_stack_id": "hebrew-default",
33
33
  "default_engine": "elevenlabs",
34
34
  "elevenlabs_agent_id": "agent_4201ky0zhwn4fz7bwy9767wt6g3t",
35
35
  "elevenlabs_branch_id": "agtbrch_8101ky0zhwn5ez5t8xbw7dg9wmxk",
@@ -43,7 +43,7 @@
43
43
  "id": "magnus",
44
44
  "name": "MAGNUS",
45
45
  "description": "The calm leader of the Star Guardians.",
46
- "voice_stack_id": "english-default",
46
+ "voice_stack_id": "hebrew-default",
47
47
  "default_engine": "elevenlabs",
48
48
  "elevenlabs_agent_id": "agent_5601ky0ymahreyft2xz9xht0dj4v",
49
49
  "elevenlabs_branch_id": "agtbrch_1501ky0ymahsf208g6pksq5cb4y0",
@@ -57,7 +57,7 @@
57
57
  "id": "ronin",
58
58
  "name": "RONIN",
59
59
  "description": "The Star Guardians story keeper and patient guide.",
60
- "voice_stack_id": "english-default",
60
+ "voice_stack_id": "hebrew-default",
61
61
  "default_engine": "elevenlabs",
62
62
  "elevenlabs_agent_id": "agent_4701ky0xkz89f8t993tmg5t8t23r",
63
63
  "elevenlabs_branch_id": "agtbrch_5601ky0xkz8behzr4tzbdtg7a1rs",
@@ -71,7 +71,7 @@
71
71
  "id": "titan",
72
72
  "name": "TITAN",
73
73
  "description": "The Star Guardians iron guardian and stability anchor.",
74
- "voice_stack_id": "english-default",
74
+ "voice_stack_id": "hebrew-default",
75
75
  "default_engine": "elevenlabs",
76
76
  "elevenlabs_agent_id": "agent_2501ky0x8t39fh5ske8tz3148b26",
77
77
  "elevenlabs_branch_id": "agtbrch_5601ky0x8t3be1c87tpf7qp8yskw",
@@ -85,7 +85,7 @@
85
85
  "id": "vixen",
86
86
  "name": "VIXEN",
87
87
  "description": "The Star Guardians strategist and precision planner.",
88
- "voice_stack_id": "english-default",
88
+ "voice_stack_id": "hebrew-default",
89
89
  "default_engine": "elevenlabs",
90
90
  "elevenlabs_agent_id": "agent_6701ky0nfavke0ysrpj5v38m1cry",
91
91
  "elevenlabs_branch_id": "agtbrch_0701ky0nfbvtfca90wxrvxqawvnh",
@@ -99,7 +99,7 @@
99
99
  "id": "kongor",
100
100
  "name": "KONGOR",
101
101
  "description": "The Star Guardians heavy bruiser.",
102
- "voice_stack_id": "english-default",
102
+ "voice_stack_id": "hebrew-default",
103
103
  "default_engine": "elevenlabs",
104
104
  "elevenlabs_agent_id": "agent_2901kyp83sr7ext9sq1ezrxrqqpd",
105
105
  "elevenlabs_branch_id": "agtbrch_5301kyp83srsfgxr4p0cahqvsnyp",
@@ -113,7 +113,7 @@
113
113
  "id": "palladin",
114
114
  "name": "PALLADIN",
115
115
  "description": "The Star Guardians steadfast protector and ceremonial guardian.",
116
- "voice_stack_id": "english-default",
116
+ "voice_stack_id": "hebrew-default",
117
117
  "default_engine": "elevenlabs",
118
118
  "elevenlabs_agent_id": "agent_0001ky7mxx2ce4pseeyn6wrtnrz8",
119
119
  "elevenlabs_branch_id": "agtbrch_5101ky7mxx34eg7bcmetf2s8hsv6",
@@ -127,7 +127,7 @@
127
127
  "id": "volt",
128
128
  "name": "VOLT",
129
129
  "description": "The Star Guardians electric systems specialist and rapid responder.",
130
- "voice_stack_id": "english-default",
130
+ "voice_stack_id": "hebrew-default",
131
131
  "default_engine": "elevenlabs",
132
132
  "elevenlabs_agent_id": "agent_4101ky97n2pze4p8ax3dgb3hbc3c",
133
133
  "elevenlabs_branch_id": "agtbrch_5301ky97n2q1fr89y9egvewhg6z2",
@@ -3398,7 +3398,14 @@ footer.cmd{left:var(--global-nav-width);transition:left .24s cubic-bezier(.2,.8,
3398
3398
  if(name==='live'){ pollLiveSessions(); startLiveAutoRefresh(); }
3399
3399
  if(name==='cameras'){ loadCameraGrid(); }
3400
3400
  if(name==='motors'){ loadMotorLab(); }
3401
- if(name==='voice'){ refreshVoiceCallOptions(); }
3401
+ // The voice tab renders from characterPresets/voiceStacks, which only the
3402
+ // setup tab used to load. Opening #robopark/voice directly therefore drew
3403
+ // an empty character list from arrays nothing had populated.
3404
+ if(name==='voice'){
3405
+ if(!(characterPresets||[]).length) loadCharacterPresets();
3406
+ if(!(voiceStacks||[]).length) loadVoiceStacks();
3407
+ refreshVoiceCallOptions();
3408
+ }
3402
3409
  if(name==='history'){ rpHistoryPage=0; pollHistory(); }
3403
3410
  if(name==='audit'){ pollAuditLog(); rpIntervals.audit = setInterval(pollAuditLog, 6000); }
3404
3411
  if(name==='fleet'){ pollFleet(); rpIntervals.fleet = setInterval(pollFleet, 5000); }