@celljs/ta-web 4.34.0 → 4.36.0

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 (345) hide show
  1. package/README.en.md +1 -1
  2. package/README.md +1 -1
  3. package/esm/browser/apps/app-icon.d.ts +23 -0
  4. package/esm/browser/apps/app-icon.js +98 -0
  5. package/esm/browser/apps/app-settings.d.ts +6 -0
  6. package/esm/browser/apps/app-settings.js +67 -0
  7. package/esm/browser/apps/app-window-util.d.ts +23 -0
  8. package/esm/browser/apps/app-window-util.js +27 -0
  9. package/esm/browser/apps/app-window.d.ts +9 -0
  10. package/esm/browser/apps/app-window.js +90 -0
  11. package/esm/browser/apps/web-apps.d.ts +29 -0
  12. package/esm/browser/apps/web-apps.js +57 -0
  13. package/esm/browser/assistant/assistant-thread.js +2 -2
  14. package/esm/browser/assistant/call-keeper.d.ts +2 -5
  15. package/esm/browser/assistant/call-keeper.js +7 -11
  16. package/esm/browser/assistant/mic-capture.d.ts +34 -0
  17. package/esm/browser/assistant/mic-capture.js +87 -0
  18. package/esm/browser/assistant/realtime-voice.d.ts +2 -2
  19. package/esm/browser/assistant/realtime-voice.js +6 -15
  20. package/esm/browser/components/access-settings.d.ts +6 -0
  21. package/esm/browser/components/access-settings.js +52 -0
  22. package/esm/browser/components/app-root.d.ts +6 -0
  23. package/esm/browser/components/app-root.js +34 -0
  24. package/esm/browser/components/app-view.d.ts +8 -2
  25. package/esm/browser/components/app-view.js +1 -25
  26. package/esm/browser/components/board.d.ts +2 -2
  27. package/esm/browser/components/board.js +2 -2
  28. package/esm/browser/components/cloud-sign-in-view.d.ts +1 -1
  29. package/esm/browser/components/composer-box-hooks.d.ts +12 -0
  30. package/esm/browser/components/composer-box-hooks.js +12 -0
  31. package/esm/browser/components/composer-box-protocol.d.ts +12 -1
  32. package/esm/browser/components/composer-box.js +14 -11
  33. package/esm/browser/components/composer.js +69 -3
  34. package/esm/browser/components/extension-settings.d.ts +7 -0
  35. package/esm/browser/components/extension-settings.js +32 -0
  36. package/esm/browser/components/host-view.d.ts +1 -1
  37. package/esm/browser/components/message-list.js +3 -3
  38. package/esm/browser/components/message-steps.js +3 -3
  39. package/esm/browser/components/phone-shell.d.ts +2 -2
  40. package/esm/browser/components/request-error.d.ts +9 -0
  41. package/esm/browser/components/request-error.js +21 -0
  42. package/esm/browser/components/settings-more.js +13 -24
  43. package/esm/browser/components/storage-settings.d.ts +17 -0
  44. package/esm/browser/components/storage-settings.js +145 -0
  45. package/esm/browser/device/screen-awake.d.ts +16 -0
  46. package/esm/browser/device/screen-awake.js +37 -0
  47. package/esm/browser/device/sheet-swipe.js +4 -0
  48. package/esm/browser/extension/icons.js +2 -1
  49. package/esm/browser/extension/web-access.d.ts +16 -0
  50. package/esm/browser/extension/web-access.js +75 -0
  51. package/esm/browser/extension/web-api-contributions.d.ts +6 -7
  52. package/esm/browser/extension/web-api-desktop.d.ts +23 -0
  53. package/esm/browser/extension/web-api-spec.d.ts +70 -0
  54. package/esm/browser/extension/web-api-spec.js +225 -0
  55. package/esm/browser/extension/web-api-targets.d.ts +11 -0
  56. package/esm/browser/extension/web-api-targets.js +2 -0
  57. package/esm/browser/extension/web-extension-api.d.ts +11 -1
  58. package/esm/browser/extension/web-extension-context.d.ts +3 -2
  59. package/esm/browser/extension/web-extension-context.js +22 -17
  60. package/esm/browser/extension/web-extension-run.d.ts +8 -1
  61. package/esm/browser/extension/web-extension-run.js +37 -0
  62. package/esm/browser/extension/web-extensions-running.d.ts +20 -1
  63. package/esm/browser/extension/web-extensions-running.js +107 -9
  64. package/esm/browser/extension/web-extensions.js +1 -0
  65. package/esm/browser/extension/web-pages.d.ts +5 -0
  66. package/esm/browser/extension/web-pages.js +3 -0
  67. package/esm/browser/game/game-control.d.ts +6 -0
  68. package/esm/browser/game/game-control.js +28 -0
  69. package/esm/browser/game/game-host.d.ts +9 -2
  70. package/esm/browser/game/game-host.js +5 -1
  71. package/esm/browser/game/game-protocol.d.ts +8 -0
  72. package/esm/browser/game/game-runner.d.ts +7 -1
  73. package/esm/browser/game/game-runner.js +24 -2
  74. package/esm/browser/game/game-target.d.ts +22 -0
  75. package/esm/browser/game/game-target.js +84 -0
  76. package/esm/browser/game/game-util.d.ts +2 -0
  77. package/esm/browser/game/game-util.js +2 -0
  78. package/esm/browser/game/game-view.d.ts +5 -2
  79. package/esm/browser/game/game-view.js +4 -4
  80. package/esm/browser/game/game3d-protocol.d.ts +3 -1
  81. package/esm/browser/game/game3d-runner.d.ts +6 -1
  82. package/esm/browser/game/game3d-runner.js +26 -2
  83. package/esm/browser/i18n/en/chat.d.ts +4 -0
  84. package/esm/browser/i18n/en/chat.js +4 -0
  85. package/esm/browser/i18n/en/common.d.ts +1 -0
  86. package/esm/browser/i18n/en/common.js +1 -0
  87. package/esm/browser/i18n/en/discover.d.ts +11 -0
  88. package/esm/browser/i18n/en/discover.js +11 -0
  89. package/esm/browser/i18n/en/settings.d.ts +43 -0
  90. package/esm/browser/i18n/en/settings.js +43 -0
  91. package/esm/browser/i18n/ja/chat.js +4 -0
  92. package/esm/browser/i18n/ja/common.js +1 -0
  93. package/esm/browser/i18n/ja/discover.js +11 -0
  94. package/esm/browser/i18n/ja/settings.js +43 -0
  95. package/esm/browser/i18n/locales.d.ts +60 -3
  96. package/esm/browser/i18n/messages.d.ts +59 -2
  97. package/esm/browser/i18n/zh/chat.js +4 -0
  98. package/esm/browser/i18n/zh/common.js +1 -0
  99. package/esm/browser/i18n/zh/discover.js +11 -0
  100. package/esm/browser/i18n/zh/settings.js +43 -0
  101. package/esm/browser/i18n/zh-tw/chat.js +4 -0
  102. package/esm/browser/i18n/zh-tw/common.js +1 -0
  103. package/esm/browser/i18n/zh-tw/discover.js +11 -0
  104. package/esm/browser/i18n/zh-tw/settings.js +43 -0
  105. package/esm/browser/index.d.ts +3 -0
  106. package/esm/browser/index.js +3 -0
  107. package/esm/browser/notices/notices.js +1 -0
  108. package/esm/browser/sandbox/channel/channel.d.ts +56 -0
  109. package/esm/browser/sandbox/channel/channel.js +124 -0
  110. package/esm/browser/sandbox/channel/codec.d.ts +80 -0
  111. package/esm/browser/sandbox/channel/codec.js +251 -0
  112. package/esm/browser/sandbox/hook-host.d.ts +23 -0
  113. package/esm/browser/sandbox/hook-host.js +61 -0
  114. package/esm/browser/sandbox/isolated-host.d.ts +105 -0
  115. package/esm/browser/sandbox/isolated-host.js +395 -0
  116. package/esm/browser/sandbox/remote/remote-copy.d.ts +57 -0
  117. package/esm/browser/sandbox/remote/remote-copy.js +318 -0
  118. package/esm/browser/sandbox/remote/remote-mirror.d.ts +61 -0
  119. package/esm/browser/sandbox/remote/remote-mirror.js +341 -0
  120. package/esm/browser/sandbox/remote/remote-protocol.d.ts +79 -0
  121. package/esm/browser/sandbox/remote/remote-protocol.js +54 -0
  122. package/esm/browser/sandbox/remote/remote-styles.d.ts +10 -0
  123. package/esm/browser/sandbox/remote/remote-styles.js +113 -0
  124. package/esm/browser/sandbox/remote-root.d.ts +11 -0
  125. package/esm/browser/sandbox/remote-root.js +81 -0
  126. package/esm/browser/sandbox/runtime/frame-api.d.ts +28 -0
  127. package/esm/browser/sandbox/runtime/frame-api.js +147 -0
  128. package/esm/browser/sandbox/runtime/frame-features.d.ts +6 -0
  129. package/esm/browser/sandbox/runtime/frame-features.js +50 -0
  130. package/esm/browser/sandbox/runtime/frame-parts.d.ts +36 -0
  131. package/esm/browser/sandbox/runtime/frame-parts.js +69 -0
  132. package/esm/browser/sandbox/runtime/frame-roots.d.ts +26 -0
  133. package/esm/browser/sandbox/runtime/frame-roots.js +76 -0
  134. package/esm/browser/sandbox/runtime/frame-store.d.ts +9 -0
  135. package/esm/browser/sandbox/runtime/frame-store.js +18 -0
  136. package/esm/browser/sandbox/runtime/sandbox-runtime.d.ts +11 -0
  137. package/esm/browser/sandbox/runtime/sandbox-runtime.js +45 -0
  138. package/esm/browser/sandbox/sandbox-features.d.ts +25 -0
  139. package/esm/browser/sandbox/sandbox-features.js +32 -0
  140. package/esm/browser/sandbox/sandbox-frame.d.ts +21 -0
  141. package/esm/browser/sandbox/sandbox-frame.js +75 -0
  142. package/esm/browser/sandbox/sandbox-guards.d.ts +19 -0
  143. package/esm/browser/sandbox/sandbox-guards.js +74 -0
  144. package/esm/browser/sandbox/sandbox-protocol.d.ts +57 -0
  145. package/esm/browser/sandbox/sandbox-protocol.js +49 -0
  146. package/esm/browser/sandbox/sandbox-runtime-code.d.ts +1 -0
  147. package/esm/browser/sandbox/sandbox-runtime-code.js +3 -0
  148. package/esm/browser/sandbox/web-sandbox.d.ts +28 -0
  149. package/esm/browser/sandbox/web-sandbox.js +44 -0
  150. package/esm/browser/settings/agent-settings.js +5 -1
  151. package/esm/browser/settings/settings-protocol.d.ts +2 -0
  152. package/esm/browser/settings/settings-protocol.js +2 -0
  153. package/esm/browser/style/pages.d.ts +1 -1
  154. package/esm/browser/style/pages.js +2 -0
  155. package/esm/browser/style/surfaces.d.ts +1 -1
  156. package/esm/browser/style/surfaces.js +4 -0
  157. package/esm/browser/style/tints.d.ts +2 -0
  158. package/esm/browser/style/tints.js +10 -0
  159. package/esm/browser/targets/targets-protocol.d.ts +54 -0
  160. package/esm/browser/targets/targets-protocol.js +34 -0
  161. package/esm/browser/targets/targets.d.ts +13 -0
  162. package/esm/browser/targets/targets.js +64 -0
  163. package/esm/browser/util/composer.d.ts +4 -2
  164. package/esm/browser/util/composer.js +7 -1
  165. package/esm/browser/util/desktop.d.ts +31 -1
  166. package/esm/browser/util/desktop.js +20 -0
  167. package/esm/browser/util/message.d.ts +6 -0
  168. package/esm/browser/util/message.js +21 -0
  169. package/esm/browser/util/process.d.ts +1 -0
  170. package/esm/browser/util/process.js +6 -1
  171. package/esm/browser/util/progress.d.ts +2 -1
  172. package/esm/browser/util/progress.js +2 -11
  173. package/esm/browser/view.js +1 -1
  174. package/lib/browser/apps/app-icon.d.ts +24 -0
  175. package/lib/browser/apps/app-icon.js +134 -0
  176. package/lib/browser/apps/app-settings.d.ts +7 -0
  177. package/lib/browser/apps/app-settings.js +103 -0
  178. package/lib/browser/apps/app-window-util.d.ts +24 -0
  179. package/lib/browser/apps/app-window-util.js +30 -0
  180. package/lib/browser/apps/app-window.d.ts +10 -0
  181. package/lib/browser/apps/app-window.js +126 -0
  182. package/lib/browser/apps/web-apps.d.ts +30 -0
  183. package/lib/browser/apps/web-apps.js +61 -0
  184. package/lib/browser/assistant/assistant-thread.js +2 -2
  185. package/lib/browser/assistant/call-keeper.d.ts +2 -5
  186. package/lib/browser/assistant/call-keeper.js +6 -10
  187. package/lib/browser/assistant/mic-capture.d.ts +35 -0
  188. package/lib/browser/assistant/mic-capture.js +91 -0
  189. package/lib/browser/assistant/realtime-voice.d.ts +2 -2
  190. package/lib/browser/assistant/realtime-voice.js +6 -15
  191. package/lib/browser/components/access-settings.d.ts +7 -0
  192. package/lib/browser/components/access-settings.js +88 -0
  193. package/lib/browser/components/app-root.d.ts +7 -0
  194. package/lib/browser/components/app-root.js +70 -0
  195. package/lib/browser/components/app-view.d.ts +8 -2
  196. package/lib/browser/components/app-view.js +1 -25
  197. package/lib/browser/components/board.d.ts +2 -2
  198. package/lib/browser/components/board.js +2 -2
  199. package/lib/browser/components/cloud-sign-in-view.d.ts +1 -1
  200. package/lib/browser/components/composer-box-hooks.d.ts +12 -0
  201. package/lib/browser/components/composer-box-hooks.js +13 -0
  202. package/lib/browser/components/composer-box-protocol.d.ts +12 -1
  203. package/lib/browser/components/composer-box.js +13 -10
  204. package/lib/browser/components/composer.js +69 -3
  205. package/lib/browser/components/extension-settings.d.ts +8 -0
  206. package/lib/browser/components/extension-settings.js +69 -0
  207. package/lib/browser/components/host-view.d.ts +1 -1
  208. package/lib/browser/components/message-list.js +3 -3
  209. package/lib/browser/components/message-steps.js +3 -3
  210. package/lib/browser/components/phone-shell.d.ts +2 -2
  211. package/lib/browser/components/request-error.d.ts +10 -0
  212. package/lib/browser/components/request-error.js +57 -0
  213. package/lib/browser/components/settings-more.js +12 -23
  214. package/lib/browser/components/storage-settings.d.ts +18 -0
  215. package/lib/browser/components/storage-settings.js +182 -0
  216. package/lib/browser/device/screen-awake.d.ts +16 -0
  217. package/lib/browser/device/screen-awake.js +39 -1
  218. package/lib/browser/device/sheet-swipe.js +4 -0
  219. package/lib/browser/extension/icons.js +1 -0
  220. package/lib/browser/extension/web-access.d.ts +17 -0
  221. package/lib/browser/extension/web-access.js +78 -0
  222. package/lib/browser/extension/web-api-contributions.d.ts +6 -7
  223. package/lib/browser/extension/web-api-desktop.d.ts +23 -0
  224. package/lib/browser/extension/web-api-spec.d.ts +71 -0
  225. package/lib/browser/extension/web-api-spec.js +228 -0
  226. package/lib/browser/extension/web-api-targets.d.ts +12 -0
  227. package/lib/browser/extension/web-api-targets.js +3 -0
  228. package/lib/browser/extension/web-extension-api.d.ts +11 -1
  229. package/lib/browser/extension/web-extension-context.d.ts +3 -2
  230. package/lib/browser/extension/web-extension-context.js +22 -17
  231. package/lib/browser/extension/web-extension-run.d.ts +8 -1
  232. package/lib/browser/extension/web-extension-run.js +37 -0
  233. package/lib/browser/extension/web-extensions-running.d.ts +20 -1
  234. package/lib/browser/extension/web-extensions-running.js +107 -9
  235. package/lib/browser/extension/web-extensions.js +1 -0
  236. package/lib/browser/extension/web-pages.d.ts +5 -0
  237. package/lib/browser/extension/web-pages.js +3 -0
  238. package/lib/browser/game/game-control.d.ts +6 -0
  239. package/lib/browser/game/game-control.js +28 -0
  240. package/lib/browser/game/game-host.d.ts +9 -2
  241. package/lib/browser/game/game-host.js +5 -1
  242. package/lib/browser/game/game-protocol.d.ts +8 -0
  243. package/lib/browser/game/game-runner.d.ts +7 -1
  244. package/lib/browser/game/game-runner.js +24 -2
  245. package/lib/browser/game/game-target.d.ts +23 -0
  246. package/lib/browser/game/game-target.js +87 -0
  247. package/lib/browser/game/game-util.d.ts +2 -0
  248. package/lib/browser/game/game-util.js +2 -0
  249. package/lib/browser/game/game-view.d.ts +5 -2
  250. package/lib/browser/game/game-view.js +4 -4
  251. package/lib/browser/game/game3d-protocol.d.ts +3 -1
  252. package/lib/browser/game/game3d-runner.d.ts +6 -1
  253. package/lib/browser/game/game3d-runner.js +26 -2
  254. package/lib/browser/i18n/en/chat.d.ts +4 -0
  255. package/lib/browser/i18n/en/chat.js +4 -0
  256. package/lib/browser/i18n/en/common.d.ts +1 -0
  257. package/lib/browser/i18n/en/common.js +1 -0
  258. package/lib/browser/i18n/en/discover.d.ts +11 -0
  259. package/lib/browser/i18n/en/discover.js +11 -0
  260. package/lib/browser/i18n/en/settings.d.ts +43 -0
  261. package/lib/browser/i18n/en/settings.js +43 -0
  262. package/lib/browser/i18n/ja/chat.js +4 -0
  263. package/lib/browser/i18n/ja/common.js +1 -0
  264. package/lib/browser/i18n/ja/discover.js +11 -0
  265. package/lib/browser/i18n/ja/settings.js +43 -0
  266. package/lib/browser/i18n/locales.d.ts +60 -3
  267. package/lib/browser/i18n/messages.d.ts +59 -2
  268. package/lib/browser/i18n/zh/chat.js +4 -0
  269. package/lib/browser/i18n/zh/common.js +1 -0
  270. package/lib/browser/i18n/zh/discover.js +11 -0
  271. package/lib/browser/i18n/zh/settings.js +43 -0
  272. package/lib/browser/i18n/zh-tw/chat.js +4 -0
  273. package/lib/browser/i18n/zh-tw/common.js +1 -0
  274. package/lib/browser/i18n/zh-tw/discover.js +11 -0
  275. package/lib/browser/i18n/zh-tw/settings.js +43 -0
  276. package/lib/browser/index.d.ts +3 -0
  277. package/lib/browser/index.js +3 -0
  278. package/lib/browser/notices/notices.js +1 -0
  279. package/lib/browser/sandbox/channel/channel.d.ts +57 -0
  280. package/lib/browser/sandbox/channel/channel.js +128 -0
  281. package/lib/browser/sandbox/channel/codec.d.ts +81 -0
  282. package/lib/browser/sandbox/channel/codec.js +256 -0
  283. package/lib/browser/sandbox/hook-host.d.ts +24 -0
  284. package/lib/browser/sandbox/hook-host.js +98 -0
  285. package/lib/browser/sandbox/isolated-host.d.ts +106 -0
  286. package/lib/browser/sandbox/isolated-host.js +432 -0
  287. package/lib/browser/sandbox/remote/remote-copy.d.ts +58 -0
  288. package/lib/browser/sandbox/remote/remote-copy.js +322 -0
  289. package/lib/browser/sandbox/remote/remote-mirror.d.ts +62 -0
  290. package/lib/browser/sandbox/remote/remote-mirror.js +345 -0
  291. package/lib/browser/sandbox/remote/remote-protocol.d.ts +80 -0
  292. package/lib/browser/sandbox/remote/remote-protocol.js +57 -0
  293. package/lib/browser/sandbox/remote/remote-styles.d.ts +11 -0
  294. package/lib/browser/sandbox/remote/remote-styles.js +116 -0
  295. package/lib/browser/sandbox/remote-root.d.ts +12 -0
  296. package/lib/browser/sandbox/remote-root.js +117 -0
  297. package/lib/browser/sandbox/runtime/frame-api.d.ts +29 -0
  298. package/lib/browser/sandbox/runtime/frame-api.js +183 -0
  299. package/lib/browser/sandbox/runtime/frame-features.d.ts +7 -0
  300. package/lib/browser/sandbox/runtime/frame-features.js +53 -0
  301. package/lib/browser/sandbox/runtime/frame-parts.d.ts +37 -0
  302. package/lib/browser/sandbox/runtime/frame-parts.js +106 -0
  303. package/lib/browser/sandbox/runtime/frame-roots.d.ts +27 -0
  304. package/lib/browser/sandbox/runtime/frame-roots.js +113 -0
  305. package/lib/browser/sandbox/runtime/frame-store.d.ts +10 -0
  306. package/lib/browser/sandbox/runtime/frame-store.js +22 -0
  307. package/lib/browser/sandbox/runtime/sandbox-runtime.d.ts +12 -0
  308. package/lib/browser/sandbox/runtime/sandbox-runtime.js +47 -0
  309. package/lib/browser/sandbox/sandbox-features.d.ts +26 -0
  310. package/lib/browser/sandbox/sandbox-features.js +35 -0
  311. package/lib/browser/sandbox/sandbox-frame.d.ts +22 -0
  312. package/lib/browser/sandbox/sandbox-frame.js +79 -0
  313. package/lib/browser/sandbox/sandbox-guards.d.ts +20 -0
  314. package/lib/browser/sandbox/sandbox-guards.js +77 -0
  315. package/lib/browser/sandbox/sandbox-protocol.d.ts +58 -0
  316. package/lib/browser/sandbox/sandbox-protocol.js +52 -0
  317. package/lib/browser/sandbox/sandbox-runtime-code.d.ts +2 -0
  318. package/lib/browser/sandbox/sandbox-runtime-code.js +6 -0
  319. package/lib/browser/sandbox/web-sandbox.d.ts +29 -0
  320. package/lib/browser/sandbox/web-sandbox.js +47 -0
  321. package/lib/browser/settings/agent-settings.js +5 -1
  322. package/lib/browser/settings/settings-protocol.d.ts +2 -0
  323. package/lib/browser/settings/settings-protocol.js +2 -0
  324. package/lib/browser/style/pages.d.ts +1 -1
  325. package/lib/browser/style/pages.js +2 -0
  326. package/lib/browser/style/surfaces.d.ts +1 -1
  327. package/lib/browser/style/surfaces.js +4 -0
  328. package/lib/browser/style/tints.d.ts +2 -0
  329. package/lib/browser/style/tints.js +10 -0
  330. package/lib/browser/targets/targets-protocol.d.ts +55 -0
  331. package/lib/browser/targets/targets-protocol.js +37 -0
  332. package/lib/browser/targets/targets.d.ts +14 -0
  333. package/lib/browser/targets/targets.js +67 -0
  334. package/lib/browser/util/composer.d.ts +4 -2
  335. package/lib/browser/util/composer.js +7 -1
  336. package/lib/browser/util/desktop.d.ts +31 -1
  337. package/lib/browser/util/desktop.js +20 -0
  338. package/lib/browser/util/message.d.ts +6 -0
  339. package/lib/browser/util/message.js +21 -0
  340. package/lib/browser/util/process.d.ts +1 -0
  341. package/lib/browser/util/process.js +6 -1
  342. package/lib/browser/util/progress.d.ts +2 -1
  343. package/lib/browser/util/progress.js +2 -11
  344. package/lib/browser/view.js +2 -2
  345. package/package.json +8 -8
@@ -1,4 +1,3 @@
1
- import { ScreenAwake } from '../device/screen-awake.js';
2
1
  import { type StateSpec, TaState } from '../state/state-protocol.js';
3
2
  import type { VoiceCall } from './voice-call.js';
4
3
  import type { CallPhase } from './voice-call-protocol.js';
@@ -139,9 +138,7 @@ export declare class TaCallKeeperImpl implements TaCallKeeper {
139
138
  /** Follows the call shared: another page asked this one's to hang up, or one went on or ended elsewhere. */
140
139
  protected follow(): void;
141
140
  protected drop(): void;
142
- /** What Ta Desktop was told last: whether a call goes on. */
143
- protected told: boolean;
144
- /** The screen stays on while a call goes on: locked, the device stops hearing the user. */
145
- protected readonly awake: ScreenAwake;
141
+ /** Held while a call goes on: the screen stays on (locked, the device stops hearing the user), Ta Desktop awake. */
142
+ protected letAwakeGo?: () => void;
146
143
  protected changed(): void;
147
144
  }
@@ -9,9 +9,8 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  };
10
10
  import { Autowired, Component } from '@celljs/core';
11
11
  import { DeviceMedia } from '../device/device-protocol.js';
12
- import { ScreenAwake } from '../device/screen-awake.js';
12
+ import { KeepAwake } from '../device/screen-awake.js';
13
13
  import { TaState } from '../state/state-protocol.js';
14
- import { DesktopUtil } from '../util/desktop.js';
15
14
  import { CallWindow } from '../video-call/call-window.js';
16
15
  export const TaCallKeeper = Symbol('TaCallKeeper');
17
16
  export var CallKeeperUtil;
@@ -90,10 +89,6 @@ let TaCallKeeperImpl = class TaCallKeeperImpl {
90
89
  /** This page, as the call it shares says (SharedCall.page). */
91
90
  this.page = Math.random().toString(36).slice(2, 10);
92
91
  this.sharedAt = 0;
93
- /** What Ta Desktop was told last: whether a call goes on. */
94
- this.told = false;
95
- /** The screen stays on while a call goes on: locked, the device stops hearing the user. */
96
- this.awake = new ScreenAwake();
97
92
  }
98
93
  get kept() {
99
94
  return this.current;
@@ -292,12 +287,13 @@ let TaCallKeeperImpl = class TaCallKeeperImpl {
292
287
  this.viewless = false;
293
288
  }
294
289
  changed() {
295
- var _a;
296
290
  const calling = this.current !== undefined;
297
- if (calling !== this.told) {
298
- this.told = calling;
299
- (_a = DesktopUtil.calling()) === null || _a === void 0 ? void 0 : _a(calling);
300
- this.awake.set(calling);
291
+ if (calling && !this.letAwakeGo) {
292
+ this.letAwakeGo = KeepAwake.shared.hold();
293
+ }
294
+ else if (!calling && this.letAwakeGo) {
295
+ this.letAwakeGo();
296
+ this.letAwakeGo = undefined;
301
297
  }
302
298
  for (const listener of [...this.listeners]) {
303
299
  listener();
@@ -0,0 +1,34 @@
1
+ /** No sound from the microphone this long while it should hear: it no longer does (the audio was interrupted). */
2
+ export declare const STALL_MS = 4000;
3
+ /** Muted by the system (a phone call) this long: it no longer hears, though no sound stopped coming. */
4
+ export declare const MUTED_MS = 1000;
5
+ /** How often it looks. */
6
+ export declare const CHECK_MS = 1000;
7
+ /**
8
+ * The microphone heard through an audio context: its samples go to `heard`, and `lost` is told once as it stops
9
+ * hearing without a word from the recognizer, which would otherwise wait for sound that never comes: the track ended
10
+ * (unplugged, taken), the system muted it (a phone call) or no sound came for STALL_MS (the context was interrupted or
11
+ * suspended). Asleep meanwhile (a page in the background whose timers stopped), it does not count the time.
12
+ */
13
+ export declare class MicCapture {
14
+ protected readonly stream: MediaStream;
15
+ protected readonly lost: (error: string) => void;
16
+ protected readonly now: () => number;
17
+ protected processor?: ScriptProcessorNode;
18
+ protected soundAt: number;
19
+ protected checkedAt: number;
20
+ protected mutedAt?: number;
21
+ protected timer?: ReturnType<typeof setInterval>;
22
+ protected done: boolean;
23
+ protected readonly ended: () => void;
24
+ protected readonly muted: () => void;
25
+ protected readonly unmuted: () => void;
26
+ constructor(stream: MediaStream, lost: (error: string) => void, now?: () => number);
27
+ /** Hears it through `context`, from now on watched. */
28
+ hear(context: AudioContext, heard: (samples: Float32Array) => void): void;
29
+ /** Looks whether it still hears. */
30
+ check(): void;
31
+ /** Lets go of the microphone. */
32
+ stop(): void;
33
+ protected lose(error: string): void;
34
+ }
@@ -0,0 +1,87 @@
1
+ /** No sound from the microphone this long while it should hear: it no longer does (the audio was interrupted). */
2
+ export const STALL_MS = 4000;
3
+ /** Muted by the system (a phone call) this long: it no longer hears, though no sound stopped coming. */
4
+ export const MUTED_MS = 1000;
5
+ /** How often it looks. */
6
+ export const CHECK_MS = 1000;
7
+ /**
8
+ * The microphone heard through an audio context: its samples go to `heard`, and `lost` is told once as it stops
9
+ * hearing without a word from the recognizer, which would otherwise wait for sound that never comes: the track ended
10
+ * (unplugged, taken), the system muted it (a phone call) or no sound came for STALL_MS (the context was interrupted or
11
+ * suspended). Asleep meanwhile (a page in the background whose timers stopped), it does not count the time.
12
+ */
13
+ export class MicCapture {
14
+ constructor(stream, lost, now = Date.now) {
15
+ this.stream = stream;
16
+ this.lost = lost;
17
+ this.now = now;
18
+ this.soundAt = 0;
19
+ this.checkedAt = 0;
20
+ this.done = false;
21
+ this.ended = () => this.lose('audio-capture');
22
+ this.muted = () => {
23
+ this.mutedAt = this.now();
24
+ };
25
+ this.unmuted = () => {
26
+ this.mutedAt = undefined;
27
+ };
28
+ for (const track of stream.getAudioTracks()) {
29
+ track.addEventListener('ended', this.ended);
30
+ track.addEventListener('mute', this.muted);
31
+ track.addEventListener('unmute', this.unmuted);
32
+ }
33
+ }
34
+ /** Hears it through `context`, from now on watched. */
35
+ hear(context, heard) {
36
+ const source = context.createMediaStreamSource(this.stream);
37
+ this.processor = context.createScriptProcessor(4096, 1, 1);
38
+ this.processor.onaudioprocess = event => {
39
+ this.soundAt = this.now();
40
+ heard(event.inputBuffer.getChannelData(0));
41
+ };
42
+ source.connect(this.processor);
43
+ // Connected so that it runs; it writes nothing, its output is silence.
44
+ this.processor.connect(context.destination);
45
+ this.soundAt = this.checkedAt = this.now();
46
+ this.timer = setInterval(() => this.check(), CHECK_MS);
47
+ }
48
+ /** Looks whether it still hears. */
49
+ check() {
50
+ const now = this.now();
51
+ if (now - this.checkedAt > CHECK_MS * 3) {
52
+ // It slept: what it missed meanwhile is not the microphone's doing.
53
+ this.soundAt = now;
54
+ this.mutedAt = this.mutedAt === undefined ? undefined : now;
55
+ }
56
+ this.checkedAt = now;
57
+ if (this.mutedAt !== undefined && now - this.mutedAt >= MUTED_MS) {
58
+ this.lose('interrupted');
59
+ }
60
+ else if (now - this.soundAt >= STALL_MS) {
61
+ this.lose('audio-capture');
62
+ }
63
+ }
64
+ /** Lets go of the microphone. */
65
+ stop() {
66
+ this.done = true;
67
+ clearInterval(this.timer);
68
+ if (this.processor) {
69
+ this.processor.onaudioprocess = null;
70
+ this.processor.disconnect();
71
+ }
72
+ for (const track of this.stream.getTracks()) {
73
+ track.removeEventListener('ended', this.ended);
74
+ track.removeEventListener('mute', this.muted);
75
+ track.removeEventListener('unmute', this.unmuted);
76
+ track.stop();
77
+ }
78
+ }
79
+ lose(error) {
80
+ if (!this.done) {
81
+ this.done = true;
82
+ clearInterval(this.timer);
83
+ this.lost(error);
84
+ }
85
+ }
86
+ }
87
+ //# sourceMappingURL=mic-capture.js.map
@@ -1,5 +1,6 @@
1
1
  import { TaBargeIn, type TaVoiceBrainRef, type TaVoiceEvent, type TaVoiceSession } from '@celljs/ta-protocol';
2
2
  import { Voice } from '../util/voice.js';
3
+ import { MicCapture } from './mic-capture.js';
3
4
  import { MicSense } from './mic-sense.js';
4
5
  import { MicFilter } from './noise-gate.js';
5
6
  import { type Doubt, type Hearing, type Reading, type RealtimeVoiceHost, Talking } from './realtime-voice-protocol.js';
@@ -20,8 +21,7 @@ export declare class RealtimeVoice implements CallVoice {
20
21
  /** How loud what plays is, after the lowering: what the microphone may hear back of it. */
21
22
  protected played?: AnalyserNode;
22
23
  protected doubt?: Doubt;
23
- protected stream?: MediaStream;
24
- protected processor?: ScriptProcessorNode;
24
+ protected capture?: MicCapture;
25
25
  protected offEvents?: () => void;
26
26
  protected hearing?: Hearing;
27
27
  protected reading?: Reading;
@@ -1,6 +1,7 @@
1
1
  import { TaBargeIn } from '@celljs/ta-protocol';
2
2
  import { TurnEnd } from '../util/turn-end.js';
3
3
  import { Voice } from '../util/voice.js';
4
+ import { MicCapture } from './mic-capture.js';
4
5
  import { MicSense } from './mic-sense.js';
5
6
  import { MicFilter } from './noise-gate.js';
6
7
  import { PcmUtil } from './pcm-util.js';
@@ -57,18 +58,15 @@ export class RealtimeVoice {
57
58
  await this.context.resume().catch(() => undefined);
58
59
  return this;
59
60
  }
60
- this.stream = await navigator.mediaDevices.getUserMedia({
61
+ const stream = await navigator.mediaDevices.getUserMedia({
61
62
  audio: { echoCancellation: true, noiseSuppression: true, autoGainControl: true, channelCount: 1 },
62
63
  });
64
+ // Taken from it (a phone call, unplugged, the audio interrupted), it is gone: it would wait for sound in vain.
65
+ this.capture = new MicCapture(stream, error => this.lose(error));
63
66
  this.context = new Context();
64
67
  this.output(this.context);
65
68
  await this.context.resume().catch(() => undefined);
66
- const source = this.context.createMediaStreamSource(this.stream);
67
- this.processor = this.context.createScriptProcessor(4096, 1, 1);
68
- this.processor.onaudioprocess = event => this.captured(event.inputBuffer.getChannelData(0));
69
- source.connect(this.processor);
70
- // Connected so that it runs; it writes nothing, its output is silence.
71
- this.processor.connect(this.context.destination);
69
+ this.capture.hear(this.context, samples => this.captured(samples));
72
70
  return this;
73
71
  }
74
72
  catch (error) {
@@ -166,7 +164,6 @@ export class RealtimeVoice {
166
164
  }
167
165
  stop() {
168
166
  var _a, _b, _c, _d;
169
- var _e;
170
167
  if (this.stopped)
171
168
  return;
172
169
  const gone = this.closed;
@@ -177,13 +174,7 @@ export class RealtimeVoice {
177
174
  this.clearDoubt();
178
175
  (_a = this.offEvents) === null || _a === void 0 ? void 0 : _a.call(this);
179
176
  (_b = this.offState) === null || _b === void 0 ? void 0 : _b.call(this);
180
- if (this.processor) {
181
- this.processor.onaudioprocess = null;
182
- this.processor.disconnect();
183
- }
184
- for (const track of (_e = (_c = this.stream) === null || _c === void 0 ? void 0 : _c.getTracks()) !== null && _e !== void 0 ? _e : []) {
185
- track.stop();
186
- }
177
+ (_c = this.capture) === null || _c === void 0 ? void 0 : _c.stop();
187
178
  void ((_d = this.context) === null || _d === void 0 ? void 0 : _d.close().catch(() => undefined));
188
179
  if (this.session && !gone) {
189
180
  void this.host.voice.closeVoice(this.session.voiceId).catch(() => undefined);
@@ -0,0 +1,6 @@
1
+ import { type RowEntry } from './settings-controls.js';
2
+ /**
3
+ * The rows of Settings, Extensions, for extensions others made (docs/design/ta-extension-access.md 3.6): how far
4
+ * they are trusted, kept by ta serve for every device; and the sandbox of this device, each feature a switch.
5
+ */
6
+ export declare function useAccessRows(): RowEntry[];
@@ -0,0 +1,52 @@
1
+ import * as React from 'react';
2
+ import { useNotices, usePersisted, useWorkbench } from '../hooks.js';
3
+ import { useT } from '../i18n/use-t.js';
4
+ import { SandboxOptionsUtil } from '../sandbox/sandbox-protocol.js';
5
+ import { Row, row, Segmented, Switch } from './settings-controls.js';
6
+ const TRUSTS = ['off', 'browser', 'ask', 'all'];
7
+ /** How far packages of others are trusted, read from ta serve: undefined until read. */
8
+ function useTrust() {
9
+ const [workbench, bench] = useWorkbench();
10
+ const [trust, setTrust] = React.useState();
11
+ const [, notices] = useNotices();
12
+ React.useEffect(() => {
13
+ if (workbench.status === 'online') {
14
+ bench.packages.getAccessTrust().then(setTrust, () => undefined);
15
+ }
16
+ }, [workbench.status, bench]);
17
+ const set = React.useCallback((next) => {
18
+ setTrust(next);
19
+ bench.packages
20
+ .setAccessTrust(next)
21
+ .then(() => bench.packages.listWebExtensions())
22
+ .catch(error => {
23
+ // One let in without the switch of the team (extensions.trust): told why, with a way to ask for it.
24
+ notices.error(error);
25
+ bench.packages.getAccessTrust().then(setTrust, () => undefined);
26
+ });
27
+ }, [bench, notices]);
28
+ return [trust, set];
29
+ }
30
+ /**
31
+ * The rows of Settings, Extensions, for extensions others made (docs/design/ta-extension-access.md 3.6): how far
32
+ * they are trusted, kept by ta serve for every device; and the sandbox of this device, each feature a switch.
33
+ */
34
+ export function useAccessRows() {
35
+ const t = useT();
36
+ const [trust, setTrust] = useTrust();
37
+ const [options, setOptions] = usePersisted(SandboxOptionsUtil.SPEC);
38
+ const option = (key, label, description) => row(`sandbox-${key}`, [label, description], React.createElement(Row, { label: label, description: description },
39
+ React.createElement(Switch, { label: label, checked: options[key], onChange: checked => setOptions({ ...options, [key]: checked }) })));
40
+ return [
41
+ row('access-trust', [t('ta.settings.trust'), t('ta.settings.trustDescription')], React.createElement(Row, { label: t('ta.settings.trust'), description: t(`ta.settings.trust.${trust !== null && trust !== void 0 ? trust : 'ask'}Hint`), stacked: true },
42
+ React.createElement(Segmented, { label: t('ta.settings.trust'), value: trust !== null && trust !== void 0 ? trust : '', choices: TRUSTS.map(value => ({ value, label: t(`ta.settings.trust.${value}`) })), onChange: value => setTrust(value) }))),
43
+ option('isolate', t('ta.settings.sandbox'), t('ta.settings.sandboxDescription')),
44
+ ...(options.isolate
45
+ ? [
46
+ option('local', t('ta.settings.sandboxLocal'), t('ta.settings.sandboxLocalDescription')),
47
+ option('parts', t('ta.settings.sandboxParts'), t('ta.settings.sandboxPartsDescription')),
48
+ ]
49
+ : []),
50
+ ];
51
+ }
52
+ //# sourceMappingURL=access-settings.js.map
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * The app, with the look the user picked for the double (every ta below draws it) and the picker of that look; or what
4
+ * the address asks for in its place: a shared conversation, the sign-in of a device, a page installed as an app.
5
+ */
6
+ export declare function AppView(): React.JSX.Element;
@@ -0,0 +1,34 @@
1
+ import * as React from 'react';
2
+ import { AppWindow } from '../apps/app-window.js';
3
+ import { AppWindowUtil } from '../apps/app-window-util.js';
4
+ import { DevicePageUtil } from '../cloud/device-page.js';
5
+ import { LaunchScreenUtil } from '../device/launch-screen.js';
6
+ import { SharedPageUtil } from '../share/shared-link.js';
7
+ import { SharedPage } from '../share/shared-page.js';
8
+ import { AppShell } from './app-view.js';
9
+ import { DeviceSignInPage } from './device-sign-in-page.js';
10
+ import { DinoLookHost, LooksProvider } from './dino-look.js';
11
+ /**
12
+ * The app, with the look the user picked for the double (every ta below draws it) and the picker of that look; or what
13
+ * the address asks for in its place: a shared conversation, the sign-in of a device, a page installed as an app.
14
+ */
15
+ export function AppView() {
16
+ // A conversation shared by a link, opened in a browser: drawn as Ta does, with nothing signed in behind it.
17
+ const [shared] = React.useState(() => SharedPageUtil.link());
18
+ // A device asked to sign in here (TA_DEVICE_SIGN_IN_PATH): the page where the user lets it in, whoever this browser is.
19
+ const [device] = React.useState(() => (shared ? undefined : DevicePageUtil.take()));
20
+ // A page installed as an app, in a window of Ta Desktop of its own (docs/design/ta-install-as-app.md).
21
+ const [app] = React.useState(() => (shared || device ? undefined : AppWindowUtil.id()));
22
+ // The launch picture of the app of a phone goes once the page is whole.
23
+ React.useEffect(() => LaunchScreenUtil.start(), []);
24
+ if (shared) {
25
+ return React.createElement(SharedPage, { link: shared });
26
+ }
27
+ if (device) {
28
+ return React.createElement(DeviceSignInPage, { code: device.code, outcome: device.outcome, from: device.from });
29
+ }
30
+ return (React.createElement(LooksProvider, null,
31
+ app ? React.createElement(AppWindow, { id: app }) : React.createElement(AppShell, null),
32
+ React.createElement(DinoLookHost, null)));
33
+ }
34
+ //# sourceMappingURL=app-root.js.map
@@ -1,3 +1,9 @@
1
1
  import * as React from 'react';
2
- /** The app, with the look the user picked for the double (every ta below draws it) and the picker of that look. */
3
- export declare function AppView(): React.JSX.Element;
2
+ /**
3
+ * ta on the web, laid out as an IDE: the navigation, a sidebar (the chats, or a sidebar view of a web
4
+ * extension), the conversation or a page, the workbench (the tools of web extensions and the tabs they
5
+ * open), and the panel of their cards.
6
+ * The sidebar, the tabs and the panel can be resized and collapsed; on narrow screens they open over
7
+ * the conversation instead.
8
+ */
9
+ export declare function AppShell(): React.JSX.Element;
@@ -2,14 +2,10 @@ import { ChevronLeft } from 'lucide-react';
2
2
  import * as React from 'react';
3
3
  import { AssistantChatList } from '../assistant/assistant-chat-list.js';
4
4
  import { ChatView } from '../chat/chat-view.js';
5
- import { DevicePageUtil } from '../cloud/device-page.js';
6
5
  import { DeviceMotion } from '../device/device-protocol.js';
7
- import { LaunchScreenUtil } from '../device/launch-screen.js';
8
6
  import { WebCwdUtil, WebLabelUtil } from '../extension/web-extension-protocol.js';
9
7
  import { usePersisted } from '../hooks.js';
10
8
  import { SIGN_IN_EVENT } from '../notices/notices.js';
11
- import { SharedPageUtil } from '../share/shared-link.js';
12
- import { SharedPage } from '../share/shared-page.js';
13
9
  import { AppContexts } from './app-contexts.js';
14
10
  import { PageView, Rail, SidebarView } from './app-nav.js';
15
11
  import { LOGIN_LATER, RAIL } from './app-shell-hooks.js';
@@ -22,8 +18,6 @@ import { ChatSeenUtil, SEEN_CHATS } from './chat-seen.js';
22
18
  import { useChatsDot } from './chats-dot.js';
23
19
  import { ConnectionBar } from './connection-bar.js';
24
20
  import { CustomHost } from './custom-host.js';
25
- import { DeviceSignInPage } from './device-sign-in-page.js';
26
- import { DinoLookHost, LooksProvider } from './dino-look.js';
27
21
  import { DiscoverView } from './discover-view.js';
28
22
  import { EditorArea } from './editor-area.js';
29
23
  import { EntryHoldUtil, useCallGoingOn } from './entry-holds.js';
@@ -57,7 +51,7 @@ import { SignIn } from './workbench-view.js';
57
51
  * The sidebar, the tabs and the panel can be resized and collapsed; on narrow screens they open over
58
52
  * the conversation instead.
59
53
  */
60
- function AppShell() {
54
+ export function AppShell() {
61
55
  var _a, _b, _c;
62
56
  var _d, _e;
63
57
  const { t, workbench, extensions, host, store, pending, chat, setSideId, removedChats, chatsByDirectory, setChatsByDirectory, foldedChats, setFoldedChats, pinnedChats, setPinnedChats, letGoAsks, setLetGoAsks, navOpen, setNavOpen, phone, screenOpen, setScreenOpen, surface, setSurface, surfaces, settings, setSettings, settingsOpened, tabPage, setTabPage, openSettings, closeSettings, settingsShown, toggleRight, maximized, setMaximized, chatSettings, readArchived, sidebar, editor, online, fileUrl, openLink, activeEditor, view, sideView, side, showPage, lists, tools, openTool, editors, showEditors, navigation, codeScan, notices, railCurrent, tabView, screenPage, seenChats, looking, state, sideShown, showList, toggleWorkbench, toggleSides, picking, chatsBusy, setChatsBusy, deciding, } = useAppShell();
@@ -384,22 +378,4 @@ function PhoneHome({ pushable, busy, onBusy, busyList, children, }) {
384
378
  }
385
379
  return React.createElement(PhoneStack, { base: children, top: (busy || drawn) && busyList(), open: busy, onClose: () => onBusy(false) });
386
380
  }
387
- /** The app, with the look the user picked for the double (every ta below draws it) and the picker of that look. */
388
- export function AppView() {
389
- // A conversation shared by a link, opened in a browser: drawn as Ta does, with nothing signed in behind it.
390
- const [shared] = React.useState(() => SharedPageUtil.link());
391
- // A device asked to sign in here (TA_DEVICE_SIGN_IN_PATH): the page where the user lets it in, whoever this browser is.
392
- const [device] = React.useState(() => (shared ? undefined : DevicePageUtil.take()));
393
- // The launch picture of the app of a phone goes once the page is whole.
394
- React.useEffect(() => LaunchScreenUtil.start(), []);
395
- if (shared) {
396
- return React.createElement(SharedPage, { link: shared });
397
- }
398
- if (device) {
399
- return React.createElement(DeviceSignInPage, { code: device.code, outcome: device.outcome, from: device.from });
400
- }
401
- return (React.createElement(LooksProvider, null,
402
- React.createElement(AppShell, null),
403
- React.createElement(DinoLookHost, null)));
404
- }
405
381
  //# sourceMappingURL=app-view.js.map
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
2
  /**
3
3
  * The board (ta-launcher.md): the cards of web extensions (`location: 'board'`), as the user arranged them;
4
- * Edit takes cards off, puts them back and orders them. A phone brings it out with a swipe to the left over its
5
- * first tab, the rail elsewhere. `leading` is before the title (back, on a phone).
4
+ * Edit takes cards off, puts them back and orders them. A phone brings it in from the left with a swipe to the
5
+ * right over its first tab, the rail elsewhere. `leading` is before the title (back, on a phone).
6
6
  */
7
7
  export declare function BoardSurface({ leading }: {
8
8
  leading?: React.ReactNode;
@@ -63,8 +63,8 @@ function BoardEditor({ shown, hidden, arrangement, onChange, }) {
63
63
  }
64
64
  /**
65
65
  * The board (ta-launcher.md): the cards of web extensions (`location: 'board'`), as the user arranged them;
66
- * Edit takes cards off, puts them back and orders them. A phone brings it out with a swipe to the left over its
67
- * first tab, the rail elsewhere. `leading` is before the title (back, on a phone).
66
+ * Edit takes cards off, puts them back and orders them. A phone brings it in from the left with a swipe to the
67
+ * right over its first tab, the rail elsewhere. `leading` is before the title (back, on a phone).
68
68
  */
69
69
  export function BoardSurface({ leading }) {
70
70
  const t = useT();