infinicode 2.8.80 → 2.8.81

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": "infinicode",
3
- "version": "2.8.80",
3
+ "version": "2.8.81",
4
4
  "description": "OpenKernel — provider-agnostic AI execution kernel. Native coding agent + mission-driven execution runtime.",
5
5
  "type": "module",
6
6
  "main": "./dist/kernel/index.js",
@@ -392,6 +392,10 @@ class PreviewAgent:
392
392
  self.enrollment_token: Optional[str] = cfg.get("enrollment_token")
393
393
  self.video_device = cfg.get("video_device", os.getenv("VIDEO_DEVICE", "auto"))
394
394
  self.audio_device = cfg.get("audio_device", os.getenv("AUDIO_DEVICE", "default"))
395
+ # Scheduler inventory IDs come from RoboVision/sounddevice. They are
396
+ # not guaranteed to equal PyAudio's device indexes, so capture must
397
+ # use the resolved hardware name reported in that same inventory.
398
+ self.audio_capture_device = self.audio_device
395
399
  self.audio_output_device = cfg.get("audio_output_device", os.getenv("AUDIO_OUTPUT_DEVICE", "default"))
396
400
  self.robovision_url = cfg.get("robovision_url", os.getenv("ROBOVISION_URL", "http://127.0.0.1:5000"))
397
401
  self.use_robovision_camera = bool(cfg.get("use_robovision_camera", False))
@@ -672,6 +676,16 @@ class PreviewAgent:
672
676
  if data.get("audio_device") is not None:
673
677
  changed = changed or self.audio_device != data["audio_device"]
674
678
  self.audio_device = data["audio_device"]
679
+ inventory = data.get("device_inventory") or {}
680
+ selected = str(self.audio_device)
681
+ self.audio_capture_device = next(
682
+ (
683
+ str(item.get("name"))
684
+ for item in inventory.get("audio_input", [])
685
+ if str(item.get("id")) == selected and item.get("name")
686
+ ),
687
+ self.audio_device,
688
+ )
675
689
  if data.get("audio_output_device") is not None:
676
690
  changed = changed or self.audio_output_device != data["audio_output_device"]
677
691
  self.audio_output_device = data["audio_output_device"]
@@ -1457,7 +1471,7 @@ class LiveKitPublisher:
1457
1471
 
1458
1472
  async def _audio_loop(self) -> None:
1459
1473
  assert self.audio_source is not None
1460
- mic = create_audio_capture(self.agent.audio_device)
1474
+ mic = create_audio_capture(self.agent.audio_capture_device)
1461
1475
  if mic is None:
1462
1476
  logger.warning("audio_loop: create_audio_capture returned None, mic will not publish")
1463
1477
  return