@aivin-labs/cli 1.0.47 → 1.0.51

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.
Files changed (34) hide show
  1. package/README.md +1 -1
  2. package/bin/cli.mjs +1 -1
  3. package/bin/lib/auth.mjs +1 -1
  4. package/bin/lib/context.mjs +3 -3
  5. package/bin/lib/openFile.mjs +3 -2
  6. package/bin/lib/remote/client.mjs +1418 -1221
  7. package/bin/lib/remote/confirmBarrier.mjs +45 -0
  8. package/bin/lib/remote/constants.mjs +3 -1
  9. package/bin/lib/remote/desktop/aivinIco.mjs +696 -0
  10. package/bin/lib/remote/desktop/castAuth.mjs +23 -9
  11. package/bin/lib/remote/desktop/castConsent.mjs +37 -6
  12. package/bin/lib/remote/desktop/castFileDrop.mjs +24 -0
  13. package/bin/lib/remote/desktop/castInput.mjs +63 -19
  14. package/bin/lib/remote/desktop/castTouchViewers.mjs +26 -0
  15. package/bin/lib/remote/desktop/desktopCast.mjs +25 -2
  16. package/bin/lib/remote/desktop/desktopCastSource.mjs +298 -101
  17. package/bin/lib/remote/desktop/index.mjs +5 -3
  18. package/bin/lib/remote/desktop/traySource.mjs +1385 -1343
  19. package/bin/lib/remote/desktop/webrtcWorker.mjs +3 -0
  20. package/bin/lib/remote/deviceProfile.mjs +2 -0
  21. package/bin/lib/remote/gui/index.mjs +485 -480
  22. package/bin/lib/remote/humanInput.mjs +117 -0
  23. package/bin/lib/remote/idempotency.mjs +19 -2
  24. package/bin/lib/remote/keepAwake.mjs +15 -9
  25. package/bin/lib/remote/localConfirm.mjs +26 -7
  26. package/bin/lib/remote/mascot/ask.mjs +23 -4
  27. package/bin/lib/remote/mascot/askHostSource.mjs +10 -4
  28. package/bin/lib/remote/processes.mjs +231 -230
  29. package/bin/lib/remote/scheduler.mjs +164 -124
  30. package/bin/lib/remote/toolHandlers.mjs +3 -2
  31. package/bin/lib/remote/winTree.mjs +29 -0
  32. package/bin/lib/servers.mjs +31 -1
  33. package/docs/CLI.md +2 -2
  34. package/package.json +1 -1
@@ -187,6 +187,9 @@ export function createDesktopWebRtcWorker({
187
187
 
188
188
  function closeAll() {
189
189
  peers.clear();
190
+ // Phiên dừng lúc có người xem đang dựng WebRTC: trả "không dựng được" ngay, không để nơi gọi chờ đủ 30 s rồi báo trạng thái cho phiên đã chết.
191
+ for (const done of waiting.values()) done(false);
192
+ waiting.clear();
190
193
  if (!child) return;
191
194
  const proc = child;
192
195
  send({ t: 'closeAll' });
@@ -122,6 +122,8 @@ export function buildDeviceProfile(roots) {
122
122
  binaries: detectBinaries(),
123
123
  projects: detectProjects(roots),
124
124
  desktop_cast: process.platform === 'win32',
125
+ // Giao diện chỉ gửi lệnh mà bản CLI này hiểu; CLI cũ không khai thì giao diện đi đường cũ.
126
+ cast_features: ['paste_html', 'drop_files'],
125
127
  };
126
128
  }
127
129