@celljs/ta-web 4.33.0 → 4.35.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 (277) 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 +3 -1
  14. package/esm/browser/assistant/assistant-view.js +8 -4
  15. package/esm/browser/assistant/call-keeper.d.ts +2 -5
  16. package/esm/browser/assistant/call-keeper.js +7 -11
  17. package/esm/browser/components/access-settings.d.ts +6 -0
  18. package/esm/browser/components/access-settings.js +52 -0
  19. package/esm/browser/components/app-root.d.ts +6 -0
  20. package/esm/browser/components/app-root.js +34 -0
  21. package/esm/browser/components/app-view.d.ts +8 -2
  22. package/esm/browser/components/app-view.js +1 -25
  23. package/esm/browser/components/cloud-sign-in-view.d.ts +1 -1
  24. package/esm/browser/components/context-act.d.ts +4 -0
  25. package/esm/browser/components/context-act.js +8 -0
  26. package/esm/browser/components/context-line.d.ts +19 -0
  27. package/esm/browser/components/context-line.js +71 -0
  28. package/esm/browser/components/host-view.d.ts +1 -1
  29. package/esm/browser/components/message-list.js +12 -6
  30. package/esm/browser/components/message-steps.js +1 -1
  31. package/esm/browser/components/session-settings.d.ts +8 -4
  32. package/esm/browser/components/session-settings.js +10 -5
  33. package/esm/browser/components/session-view.js +12 -8
  34. package/esm/browser/components/settings-more.js +6 -0
  35. package/esm/browser/device/screen-awake.d.ts +16 -0
  36. package/esm/browser/device/screen-awake.js +37 -0
  37. package/esm/browser/device/sheet-swipe.js +4 -0
  38. package/esm/browser/extension/icons.js +2 -1
  39. package/esm/browser/extension/web-access.d.ts +16 -0
  40. package/esm/browser/extension/web-access.js +75 -0
  41. package/esm/browser/extension/web-api-desktop.d.ts +23 -0
  42. package/esm/browser/extension/web-api-spec.d.ts +70 -0
  43. package/esm/browser/extension/web-api-spec.js +223 -0
  44. package/esm/browser/extension/web-extension-api.d.ts +6 -0
  45. package/esm/browser/extension/web-extension-context.js +11 -2
  46. package/esm/browser/extension/web-extension-run.d.ts +6 -1
  47. package/esm/browser/extension/web-extension-run.js +25 -0
  48. package/esm/browser/extension/web-extensions-running.d.ts +18 -1
  49. package/esm/browser/extension/web-extensions-running.js +102 -9
  50. package/esm/browser/extension/web-pages.d.ts +5 -0
  51. package/esm/browser/extension/web-pages.js +3 -0
  52. package/esm/browser/i18n/en/chat.d.ts +16 -2
  53. package/esm/browser/i18n/en/chat.js +16 -2
  54. package/esm/browser/i18n/en/common.d.ts +1 -0
  55. package/esm/browser/i18n/en/common.js +1 -0
  56. package/esm/browser/i18n/en/discover.d.ts +11 -0
  57. package/esm/browser/i18n/en/discover.js +11 -0
  58. package/esm/browser/i18n/en/settings.d.ts +54 -0
  59. package/esm/browser/i18n/en/settings.js +57 -3
  60. package/esm/browser/i18n/en/tools.d.ts +1 -0
  61. package/esm/browser/i18n/en/tools.js +1 -0
  62. package/esm/browser/i18n/ja/chat.js +16 -2
  63. package/esm/browser/i18n/ja/common.js +1 -0
  64. package/esm/browser/i18n/ja/discover.js +11 -0
  65. package/esm/browser/i18n/ja/settings.js +57 -3
  66. package/esm/browser/i18n/ja/tools.js +1 -0
  67. package/esm/browser/i18n/locales.d.ts +84 -5
  68. package/esm/browser/i18n/messages.d.ts +83 -4
  69. package/esm/browser/i18n/zh/chat.js +16 -2
  70. package/esm/browser/i18n/zh/common.js +1 -0
  71. package/esm/browser/i18n/zh/discover.js +11 -0
  72. package/esm/browser/i18n/zh/settings.js +57 -3
  73. package/esm/browser/i18n/zh/tools.js +1 -0
  74. package/esm/browser/i18n/zh-tw/chat.js +16 -2
  75. package/esm/browser/i18n/zh-tw/common.js +1 -0
  76. package/esm/browser/i18n/zh-tw/discover.js +11 -0
  77. package/esm/browser/i18n/zh-tw/settings.js +57 -3
  78. package/esm/browser/i18n/zh-tw/tools.js +1 -0
  79. package/esm/browser/index.d.ts +1 -0
  80. package/esm/browser/index.js +1 -0
  81. package/esm/browser/notices/notices.js +1 -0
  82. package/esm/browser/sandbox/channel/channel.d.ts +56 -0
  83. package/esm/browser/sandbox/channel/channel.js +124 -0
  84. package/esm/browser/sandbox/channel/codec.d.ts +80 -0
  85. package/esm/browser/sandbox/channel/codec.js +251 -0
  86. package/esm/browser/sandbox/hook-host.d.ts +23 -0
  87. package/esm/browser/sandbox/hook-host.js +61 -0
  88. package/esm/browser/sandbox/isolated-host.d.ts +105 -0
  89. package/esm/browser/sandbox/isolated-host.js +395 -0
  90. package/esm/browser/sandbox/remote/remote-copy.d.ts +56 -0
  91. package/esm/browser/sandbox/remote/remote-copy.js +302 -0
  92. package/esm/browser/sandbox/remote/remote-mirror.d.ts +61 -0
  93. package/esm/browser/sandbox/remote/remote-mirror.js +341 -0
  94. package/esm/browser/sandbox/remote/remote-protocol.d.ts +79 -0
  95. package/esm/browser/sandbox/remote/remote-protocol.js +54 -0
  96. package/esm/browser/sandbox/remote/remote-styles.d.ts +10 -0
  97. package/esm/browser/sandbox/remote/remote-styles.js +113 -0
  98. package/esm/browser/sandbox/remote-root.d.ts +11 -0
  99. package/esm/browser/sandbox/remote-root.js +81 -0
  100. package/esm/browser/sandbox/runtime/frame-api.d.ts +28 -0
  101. package/esm/browser/sandbox/runtime/frame-api.js +147 -0
  102. package/esm/browser/sandbox/runtime/frame-features.d.ts +6 -0
  103. package/esm/browser/sandbox/runtime/frame-features.js +50 -0
  104. package/esm/browser/sandbox/runtime/frame-parts.d.ts +36 -0
  105. package/esm/browser/sandbox/runtime/frame-parts.js +69 -0
  106. package/esm/browser/sandbox/runtime/frame-roots.d.ts +26 -0
  107. package/esm/browser/sandbox/runtime/frame-roots.js +76 -0
  108. package/esm/browser/sandbox/runtime/frame-store.d.ts +9 -0
  109. package/esm/browser/sandbox/runtime/frame-store.js +18 -0
  110. package/esm/browser/sandbox/runtime/sandbox-runtime.d.ts +11 -0
  111. package/esm/browser/sandbox/runtime/sandbox-runtime.js +45 -0
  112. package/esm/browser/sandbox/sandbox-features.d.ts +25 -0
  113. package/esm/browser/sandbox/sandbox-features.js +32 -0
  114. package/esm/browser/sandbox/sandbox-frame.d.ts +21 -0
  115. package/esm/browser/sandbox/sandbox-frame.js +75 -0
  116. package/esm/browser/sandbox/sandbox-guards.d.ts +19 -0
  117. package/esm/browser/sandbox/sandbox-guards.js +74 -0
  118. package/esm/browser/sandbox/sandbox-protocol.d.ts +57 -0
  119. package/esm/browser/sandbox/sandbox-protocol.js +49 -0
  120. package/esm/browser/sandbox/sandbox-runtime-code.d.ts +1 -0
  121. package/esm/browser/sandbox/sandbox-runtime-code.js +3 -0
  122. package/esm/browser/sandbox/web-sandbox.d.ts +28 -0
  123. package/esm/browser/sandbox/web-sandbox.js +44 -0
  124. package/esm/browser/settings/agent-settings.js +12 -2
  125. package/esm/browser/settings/settings-protocol.d.ts +2 -0
  126. package/esm/browser/settings/settings-protocol.js +2 -0
  127. package/esm/browser/style/conversation.d.ts +1 -1
  128. package/esm/browser/style/conversation.js +20 -1
  129. package/esm/browser/style/surfaces.d.ts +1 -1
  130. package/esm/browser/style/surfaces.js +5 -0
  131. package/esm/browser/style/tints.d.ts +2 -0
  132. package/esm/browser/style/tints.js +10 -0
  133. package/esm/browser/util/context-view.d.ts +16 -0
  134. package/esm/browser/util/context-view.js +42 -0
  135. package/esm/browser/util/desktop.d.ts +31 -1
  136. package/esm/browser/util/desktop.js +20 -0
  137. package/esm/browser/util/progress.d.ts +4 -0
  138. package/esm/browser/util/progress.js +9 -3
  139. package/esm/browser/view.js +1 -1
  140. package/lib/browser/apps/app-icon.d.ts +24 -0
  141. package/lib/browser/apps/app-icon.js +134 -0
  142. package/lib/browser/apps/app-settings.d.ts +7 -0
  143. package/lib/browser/apps/app-settings.js +103 -0
  144. package/lib/browser/apps/app-window-util.d.ts +24 -0
  145. package/lib/browser/apps/app-window-util.js +30 -0
  146. package/lib/browser/apps/app-window.d.ts +10 -0
  147. package/lib/browser/apps/app-window.js +126 -0
  148. package/lib/browser/apps/web-apps.d.ts +30 -0
  149. package/lib/browser/apps/web-apps.js +61 -0
  150. package/lib/browser/assistant/assistant-thread.js +3 -1
  151. package/lib/browser/assistant/assistant-view.js +8 -4
  152. package/lib/browser/assistant/call-keeper.d.ts +2 -5
  153. package/lib/browser/assistant/call-keeper.js +6 -10
  154. package/lib/browser/components/access-settings.d.ts +7 -0
  155. package/lib/browser/components/access-settings.js +88 -0
  156. package/lib/browser/components/app-root.d.ts +7 -0
  157. package/lib/browser/components/app-root.js +70 -0
  158. package/lib/browser/components/app-view.d.ts +8 -2
  159. package/lib/browser/components/app-view.js +1 -25
  160. package/lib/browser/components/cloud-sign-in-view.d.ts +1 -1
  161. package/lib/browser/components/context-act.d.ts +5 -0
  162. package/lib/browser/components/context-act.js +44 -0
  163. package/lib/browser/components/context-line.d.ts +20 -0
  164. package/lib/browser/components/context-line.js +109 -0
  165. package/lib/browser/components/host-view.d.ts +1 -1
  166. package/lib/browser/components/message-list.js +12 -6
  167. package/lib/browser/components/message-steps.js +1 -1
  168. package/lib/browser/components/session-settings.d.ts +8 -4
  169. package/lib/browser/components/session-settings.js +10 -5
  170. package/lib/browser/components/session-view.js +12 -8
  171. package/lib/browser/components/settings-more.js +6 -0
  172. package/lib/browser/device/screen-awake.d.ts +16 -0
  173. package/lib/browser/device/screen-awake.js +39 -1
  174. package/lib/browser/device/sheet-swipe.js +4 -0
  175. package/lib/browser/extension/icons.js +1 -0
  176. package/lib/browser/extension/web-access.d.ts +17 -0
  177. package/lib/browser/extension/web-access.js +78 -0
  178. package/lib/browser/extension/web-api-desktop.d.ts +23 -0
  179. package/lib/browser/extension/web-api-spec.d.ts +71 -0
  180. package/lib/browser/extension/web-api-spec.js +226 -0
  181. package/lib/browser/extension/web-extension-api.d.ts +6 -0
  182. package/lib/browser/extension/web-extension-context.js +11 -2
  183. package/lib/browser/extension/web-extension-run.d.ts +6 -1
  184. package/lib/browser/extension/web-extension-run.js +25 -0
  185. package/lib/browser/extension/web-extensions-running.d.ts +18 -1
  186. package/lib/browser/extension/web-extensions-running.js +102 -9
  187. package/lib/browser/extension/web-pages.d.ts +5 -0
  188. package/lib/browser/extension/web-pages.js +3 -0
  189. package/lib/browser/i18n/en/chat.d.ts +16 -2
  190. package/lib/browser/i18n/en/chat.js +16 -2
  191. package/lib/browser/i18n/en/common.d.ts +1 -0
  192. package/lib/browser/i18n/en/common.js +1 -0
  193. package/lib/browser/i18n/en/discover.d.ts +11 -0
  194. package/lib/browser/i18n/en/discover.js +11 -0
  195. package/lib/browser/i18n/en/settings.d.ts +54 -0
  196. package/lib/browser/i18n/en/settings.js +57 -3
  197. package/lib/browser/i18n/en/tools.d.ts +1 -0
  198. package/lib/browser/i18n/en/tools.js +1 -0
  199. package/lib/browser/i18n/ja/chat.js +16 -2
  200. package/lib/browser/i18n/ja/common.js +1 -0
  201. package/lib/browser/i18n/ja/discover.js +11 -0
  202. package/lib/browser/i18n/ja/settings.js +57 -3
  203. package/lib/browser/i18n/ja/tools.js +1 -0
  204. package/lib/browser/i18n/locales.d.ts +84 -5
  205. package/lib/browser/i18n/messages.d.ts +83 -4
  206. package/lib/browser/i18n/zh/chat.js +16 -2
  207. package/lib/browser/i18n/zh/common.js +1 -0
  208. package/lib/browser/i18n/zh/discover.js +11 -0
  209. package/lib/browser/i18n/zh/settings.js +57 -3
  210. package/lib/browser/i18n/zh/tools.js +1 -0
  211. package/lib/browser/i18n/zh-tw/chat.js +16 -2
  212. package/lib/browser/i18n/zh-tw/common.js +1 -0
  213. package/lib/browser/i18n/zh-tw/discover.js +11 -0
  214. package/lib/browser/i18n/zh-tw/settings.js +57 -3
  215. package/lib/browser/i18n/zh-tw/tools.js +1 -0
  216. package/lib/browser/index.d.ts +1 -0
  217. package/lib/browser/index.js +1 -0
  218. package/lib/browser/notices/notices.js +1 -0
  219. package/lib/browser/sandbox/channel/channel.d.ts +57 -0
  220. package/lib/browser/sandbox/channel/channel.js +128 -0
  221. package/lib/browser/sandbox/channel/codec.d.ts +81 -0
  222. package/lib/browser/sandbox/channel/codec.js +256 -0
  223. package/lib/browser/sandbox/hook-host.d.ts +24 -0
  224. package/lib/browser/sandbox/hook-host.js +98 -0
  225. package/lib/browser/sandbox/isolated-host.d.ts +106 -0
  226. package/lib/browser/sandbox/isolated-host.js +432 -0
  227. package/lib/browser/sandbox/remote/remote-copy.d.ts +57 -0
  228. package/lib/browser/sandbox/remote/remote-copy.js +306 -0
  229. package/lib/browser/sandbox/remote/remote-mirror.d.ts +62 -0
  230. package/lib/browser/sandbox/remote/remote-mirror.js +345 -0
  231. package/lib/browser/sandbox/remote/remote-protocol.d.ts +80 -0
  232. package/lib/browser/sandbox/remote/remote-protocol.js +57 -0
  233. package/lib/browser/sandbox/remote/remote-styles.d.ts +11 -0
  234. package/lib/browser/sandbox/remote/remote-styles.js +116 -0
  235. package/lib/browser/sandbox/remote-root.d.ts +12 -0
  236. package/lib/browser/sandbox/remote-root.js +117 -0
  237. package/lib/browser/sandbox/runtime/frame-api.d.ts +29 -0
  238. package/lib/browser/sandbox/runtime/frame-api.js +183 -0
  239. package/lib/browser/sandbox/runtime/frame-features.d.ts +7 -0
  240. package/lib/browser/sandbox/runtime/frame-features.js +53 -0
  241. package/lib/browser/sandbox/runtime/frame-parts.d.ts +37 -0
  242. package/lib/browser/sandbox/runtime/frame-parts.js +106 -0
  243. package/lib/browser/sandbox/runtime/frame-roots.d.ts +27 -0
  244. package/lib/browser/sandbox/runtime/frame-roots.js +113 -0
  245. package/lib/browser/sandbox/runtime/frame-store.d.ts +10 -0
  246. package/lib/browser/sandbox/runtime/frame-store.js +22 -0
  247. package/lib/browser/sandbox/runtime/sandbox-runtime.d.ts +12 -0
  248. package/lib/browser/sandbox/runtime/sandbox-runtime.js +47 -0
  249. package/lib/browser/sandbox/sandbox-features.d.ts +26 -0
  250. package/lib/browser/sandbox/sandbox-features.js +35 -0
  251. package/lib/browser/sandbox/sandbox-frame.d.ts +22 -0
  252. package/lib/browser/sandbox/sandbox-frame.js +79 -0
  253. package/lib/browser/sandbox/sandbox-guards.d.ts +20 -0
  254. package/lib/browser/sandbox/sandbox-guards.js +77 -0
  255. package/lib/browser/sandbox/sandbox-protocol.d.ts +58 -0
  256. package/lib/browser/sandbox/sandbox-protocol.js +52 -0
  257. package/lib/browser/sandbox/sandbox-runtime-code.d.ts +2 -0
  258. package/lib/browser/sandbox/sandbox-runtime-code.js +6 -0
  259. package/lib/browser/sandbox/web-sandbox.d.ts +29 -0
  260. package/lib/browser/sandbox/web-sandbox.js +47 -0
  261. package/lib/browser/settings/agent-settings.js +12 -2
  262. package/lib/browser/settings/settings-protocol.d.ts +2 -0
  263. package/lib/browser/settings/settings-protocol.js +2 -0
  264. package/lib/browser/style/conversation.d.ts +1 -1
  265. package/lib/browser/style/conversation.js +20 -1
  266. package/lib/browser/style/surfaces.d.ts +1 -1
  267. package/lib/browser/style/surfaces.js +5 -0
  268. package/lib/browser/style/tints.d.ts +2 -0
  269. package/lib/browser/style/tints.js +10 -0
  270. package/lib/browser/util/context-view.d.ts +17 -0
  271. package/lib/browser/util/context-view.js +45 -0
  272. package/lib/browser/util/desktop.d.ts +31 -1
  273. package/lib/browser/util/desktop.js +20 -0
  274. package/lib/browser/util/progress.d.ts +4 -0
  275. package/lib/browser/util/progress.js +9 -3
  276. package/lib/browser/view.js +2 -2
  277. package/package.json +8 -8
@@ -55,6 +55,9 @@ export declare abstract class WebExtensionsRunning {
55
55
  protected placeholders?: WebViewEntry[];
56
56
  protected started?: WebOnDemand;
57
57
  protected readonly pageList: WebPageList;
58
+ /** Versions the user did not allow in this page (`<id>:<hash>`): not asked again until it loads again or they change. */
59
+ protected readonly refused: Set<string>;
60
+ protected readonly asking: Map<string, Promise<boolean>>;
58
61
  get state(): WebExtensionsState;
59
62
  protected init(): void;
60
63
  /** The extensions started on open (ta-launcher.md). */
@@ -62,7 +65,7 @@ export declare abstract class WebExtensionsRunning {
62
65
  /** The kinds the pages of the extensions there are list (TaWebExtensionInfo.lists), started or not. */
63
66
  protected listedKinds(): Set<string>;
64
67
  /** Loads and starts an extension started on open, as reconcile starts the others. */
65
- protected launch(info: TaWebExtensionInfo): Promise<void>;
68
+ protected launch(asked: TaWebExtensionInfo): Promise<void>;
66
69
  /** Stops one started on open: it is still listed, to start again; its page, if shown, gives way to the conversation. */
67
70
  protected stopOnDemand(id: string): void;
68
71
  protected reconcile(): Promise<boolean>;
@@ -73,6 +76,14 @@ export declare abstract class WebExtensionsRunning {
73
76
  * still the same and stops the others.
74
77
  */
75
78
  protected startKept(host: string | undefined): Promise<boolean>;
79
+ /** Whether what runs is that of the list: the same code, allowed as much. */
80
+ protected same(run: WebExtensionRun | undefined, info: TaWebExtensionInfo): boolean;
81
+ /**
82
+ * It as it may start: allowed already, or allowed by the user now (docs/design/ta-extension-access.md); undefined
83
+ * when they did not allow it. Asked once at a time, and not again in this page once refused.
84
+ */
85
+ protected allow(info: TaWebExtensionInfo): Promise<TaWebExtensionInfo | undefined>;
86
+ protected askAccess(info: TaWebExtensionInfo): Promise<boolean>;
76
87
  /** Stops and forgets the extensions running that `keep` does not keep; whether there were any. */
77
88
  protected stopUnless(keep: (run: WebExtensionRun) => boolean): boolean;
78
89
  protected loadPackage(info: TaWebExtensionInfo): Promise<{
@@ -81,6 +92,11 @@ export declare abstract class WebExtensionsRunning {
81
92
  } | {
82
93
  error: string;
83
94
  }>;
95
+ /**
96
+ * What starts an extension: its module, imported into the page; or, for one the user allowed less than all, its code
97
+ * to run in a sandbox, never imported here (docs/design/ta-extension-access.md 3).
98
+ */
99
+ protected factoryOf(info: TaWebExtensionInfo, code: string): Promise<WebExtensionFactory>;
84
100
  protected startPackage(info: TaWebExtensionInfo, load: {
85
101
  factory: WebExtensionFactory;
86
102
  hash: string;
@@ -92,6 +108,7 @@ export declare abstract class WebExtensionsRunning {
92
108
  protected guard(run: WebExtensionRun, action: () => void): void;
93
109
  protected publish(): void;
94
110
  protected update(change: Partial<WebExtensionsState>): void;
111
+ abstract refresh(): Promise<boolean>;
95
112
  abstract openView(id: string, preserveFocus?: boolean): void;
96
113
  abstract showView(id: string): Promise<boolean>;
97
114
  protected abstract get context(): WebExtensionContext;
@@ -9,14 +9,18 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  };
10
10
  import { Autowired, Optional, PostConstruct } from '@celljs/core';
11
11
  import { TaFiles } from '../files/files-protocol.js';
12
+ import { message } from '../i18n/messages.js';
12
13
  import { TaLinks } from '../links/links-protocol.js';
13
14
  import { TaNotices } from '../notices/notices-protocol.js';
14
15
  import { TaSessionNotices } from '../notices/session-notices.js';
15
16
  import { deviceValues } from '../offline/device-values.js';
17
+ import { SandboxOptionsUtil } from '../sandbox/sandbox-protocol.js';
18
+ import { WebSandbox } from '../sandbox/web-sandbox.js';
16
19
  import { TaScreen } from '../screen/screen-protocol.js';
17
20
  import { TaSettings } from '../settings/settings-protocol.js';
18
21
  import { TaState } from '../state/state-protocol.js';
19
22
  import { TaWorkbench } from '../workbench-protocol.js';
23
+ import { WebAccessUtil } from './web-access.js';
20
24
  import { WebEditorTabs } from './web-editor-tabs.js';
21
25
  import { WebExtensionCode } from './web-extension-code.js';
22
26
  import { BuiltinWebExtension, WebExtensionsStateUtil, } from './web-extension-protocol.js';
@@ -64,6 +68,9 @@ export class WebExtensionsRunning {
64
68
  /** The extensions of the list of the last time have started (startKept), once. */
65
69
  this.keptStarted = false;
66
70
  this.pageList = new WebPageList();
71
+ /** Versions the user did not allow in this page (`<id>:<hash>`): not asked again until it loads again or they change. */
72
+ this.refused = new Set();
73
+ this.asking = new Map();
67
74
  }
68
75
  get state() {
69
76
  return this.current;
@@ -94,13 +101,19 @@ export class WebExtensionsRunning {
94
101
  return WebPagesUtil.listedKinds([...this.current.onOpen.map(entry => entry.info), ...[...this.running.values()].map(run => run.loaded.info)]);
95
102
  }
96
103
  /** Loads and starts an extension started on open, as reconcile starts the others. */
97
- async launch(info) {
98
- var _a;
104
+ async launch(asked) {
105
+ var _a, _b;
106
+ const info = await this.allow(asked);
107
+ if (!info) {
108
+ return;
109
+ }
99
110
  const load = await this.loadPackage(info);
100
111
  // Gone or changed meanwhile: the next refresh has it.
101
112
  if (((_a = this.onDemand.get(info.id)) === null || _a === void 0 ? void 0 : _a.hash) === info.hash && !this.running.has(info.id)) {
102
113
  this.startPackage(info, load);
103
114
  this.publish();
115
+ // One in a sandbox registers its pages as it starts: they are there to show once it did.
116
+ await ('factory' in load ? (_b = load.factory.ready) === null || _b === void 0 ? void 0 : _b.catch(() => undefined) : undefined);
104
117
  }
105
118
  }
106
119
  /** Stops one started on open: it is still listed, to start again; its page, if shown, gives way to the conversation. */
@@ -150,8 +163,13 @@ export class WebExtensionsRunning {
150
163
  void this.code.keepOnly(infos.map(info => info.hash));
151
164
  // Those started on open wait to be opened (ta-launcher.md).
152
165
  this.onDemand.set(infos.filter(info => info.activation === 'open'));
153
- // Fetched together, started in the order of the list: the order of their views stays the same.
154
- const starting = infos.filter(info => { var _a; return ((_a = this.running.get(info.id)) === null || _a === void 0 ? void 0 : _a.hash) !== info.hash && info.activation !== 'open'; });
166
+ // Fetched together, started in the order of the list: the order of their views stays the same. One the user
167
+ // has not allowed (docs/design/ta-extension-access.md) waits to be asked; allowed, the list has it next time.
168
+ const differ = infos.filter(info => !this.same(this.running.get(info.id), info) && info.activation !== 'open');
169
+ const starting = differ.filter(info => WebAccessUtil.granted(info) !== undefined);
170
+ for (const info of differ.filter(waiting => WebAccessUtil.granted(waiting) === undefined)) {
171
+ void this.allow(info).then(allowed => allowed && this.refresh());
172
+ }
155
173
  const loads = await Promise.all(starting.map(info => this.loadPackage(info)));
156
174
  // Stopped only now, just before the new code starts: the views of the old one stay drawn until the next
157
175
  // publish, and stopped while the new code is read (after an update, over the relay) they would show
@@ -161,7 +179,7 @@ export class WebExtensionsRunning {
161
179
  return true;
162
180
  }
163
181
  const info = fresh.get(run.loaded.id);
164
- if (info && info.hash === run.hash) {
182
+ if (info && this.same(run, info)) {
165
183
  // Started from the list of the last time: what else it says is of now.
166
184
  run.loaded = { ...run.loaded, info };
167
185
  return true;
@@ -190,10 +208,12 @@ export class WebExtensionsRunning {
190
208
  return false;
191
209
  }
192
210
  this.keptStarted = true;
193
- const infos = this.code.list(host).filter(info => info.enabled !== false && info.activation !== 'open' && !this.running.has(info.id));
211
+ const infos = this.code
212
+ .list(host)
213
+ .filter(info => info.enabled !== false && info.activation !== 'open' && !this.running.has(info.id) && WebAccessUtil.granted(info) !== undefined);
194
214
  const loads = await Promise.all(infos.map(async (info) => {
195
215
  const code = await this.code.get(info.hash);
196
- return code === undefined ? undefined : WebExtensionUtil.load(code).catch(() => undefined);
216
+ return code === undefined ? undefined : this.factoryOf(info, code).catch(() => undefined);
197
217
  }));
198
218
  let started = false;
199
219
  for (const [index, info] of infos.entries()) {
@@ -208,6 +228,55 @@ export class WebExtensionsRunning {
208
228
  }
209
229
  return started;
210
230
  }
231
+ /** Whether what runs is that of the list: the same code, allowed as much. */
232
+ same(run, info) {
233
+ return !!run && run.hash === info.hash && WebAccessUtil.granted(run.loaded.info) === WebAccessUtil.granted(info);
234
+ }
235
+ /**
236
+ * It as it may start: allowed already, or allowed by the user now (docs/design/ta-extension-access.md); undefined
237
+ * when they did not allow it. Asked once at a time, and not again in this page once refused.
238
+ */
239
+ async allow(info) {
240
+ var _a;
241
+ if (WebAccessUtil.granted(info) !== undefined) {
242
+ return info;
243
+ }
244
+ const key = `${info.id}:${info.hash}`;
245
+ // Trusted only as far as a web page (3.6): not asked, its row in the list says why.
246
+ if (info.held || this.refused.has(key)) {
247
+ return undefined;
248
+ }
249
+ const asked = (_a = this.asking.get(key)) !== null && _a !== void 0 ? _a : this.askAccess(info).finally(() => this.asking.delete(key));
250
+ this.asking.set(key, asked);
251
+ return (await asked) ? { ...info, granted: info.access } : undefined;
252
+ }
253
+ async askAccess(info) {
254
+ var _a;
255
+ const language = this.settings.state.language;
256
+ const say = (id) => message(language, id);
257
+ const access = (_a = info.access) !== null && _a !== void 0 ? _a : 'full';
258
+ const yes = await this.notices.confirm({
259
+ title: say('ta.access.ask').replace('{name}', WebPagesUtil.title(info, language)),
260
+ message: [
261
+ say(info.regrant ? 'ta.access.updated' : 'ta.access.new'),
262
+ say(`ta.access.${access}`),
263
+ say('ta.access.from').replace('{source}', WebAccessUtil.source(info, say)),
264
+ ].join('\n'),
265
+ confirmLabel: say('ta.access.allow'),
266
+ });
267
+ if (!yes) {
268
+ this.refused.add(`${info.id}:${info.hash}`);
269
+ return false;
270
+ }
271
+ try {
272
+ await this.workbench.packages.grantAccess(info.id, access);
273
+ return true;
274
+ }
275
+ catch (error) {
276
+ this.notices.notify(say('ta.access.failed'), { level: 'error', detail: error instanceof Error ? error.message : String(error) });
277
+ return false;
278
+ }
279
+ }
211
280
  /** Stops and forgets the extensions running that `keep` does not keep; whether there were any. */
212
281
  stopUnless(keep) {
213
282
  let stopped = false;
@@ -225,11 +294,11 @@ export class WebExtensionsRunning {
225
294
  try {
226
295
  const kept = await this.code.get(info.hash);
227
296
  if (kept !== undefined) {
228
- return { factory: await WebExtensionUtil.load(kept), hash: info.hash };
297
+ return { factory: await this.factoryOf(info, kept), hash: info.hash };
229
298
  }
230
299
  const { code, hash } = await this.workbench.packages.readWebExtension(info.id);
231
300
  void this.code.set(hash, code);
232
- const factory = await WebExtensionUtil.load(code);
301
+ const factory = await this.factoryOf(info, code);
233
302
  // Read from the computer: what the user waits for the first time (kept code is quick).
234
303
  this.metrics.record(info.name, 'web:load', false, performance.now() - start);
235
304
  return { factory, hash };
@@ -239,6 +308,20 @@ export class WebExtensionsRunning {
239
308
  return { error: WebExtensionUtil.message(error) };
240
309
  }
241
310
  }
311
+ /**
312
+ * What starts an extension: its module, imported into the page; or, for one the user allowed less than all, its code
313
+ * to run in a sandbox, never imported here (docs/design/ta-extension-access.md 3).
314
+ */
315
+ async factoryOf(info, code) {
316
+ const granted = WebAccessUtil.granted(info);
317
+ if (!WebSandbox.applies(info, granted)) {
318
+ return WebExtensionUtil.load(code);
319
+ }
320
+ return WebSandbox.factory(code, info, granted, {
321
+ options: this.persisted.get(SandboxOptionsUtil.SPEC),
322
+ changes: listener => this.settings.subscribe(() => listener()),
323
+ });
324
+ }
242
325
  startPackage(info, load) {
243
326
  const loaded = { id: info.id, name: info.name, info };
244
327
  if ('error' in load) {
@@ -249,6 +332,7 @@ export class WebExtensionsRunning {
249
332
  }
250
333
  }
251
334
  start(loaded, factory, hash) {
335
+ var _a;
252
336
  const run = WebExtensionRunUtil.create(loaded, hash);
253
337
  this.running.set(loaded.id, run);
254
338
  try {
@@ -256,6 +340,15 @@ export class WebExtensionsRunning {
256
340
  run.dispose = typeof dispose === 'function' ? dispose : undefined;
257
341
  run.started = true;
258
342
  this.metrics.record(loaded.id, 'web:start');
343
+ // One in a sandbox that could not start says why where it is listed, as one that threw (3.7).
344
+ (_a = factory.ready) === null || _a === void 0 ? void 0 : _a.catch(error => {
345
+ if (this.running.get(loaded.id) === run && !run.stopped) {
346
+ this.metrics.record(loaded.id, 'web:start', true);
347
+ this.stop(run);
348
+ run.loaded = { ...loaded, error: WebExtensionUtil.message(error) };
349
+ this.publish();
350
+ }
351
+ });
259
352
  }
260
353
  catch (error) {
261
354
  this.metrics.record(loaded.id, 'web:start', true);
@@ -17,6 +17,11 @@ export interface WebPageInfo {
17
17
  extension: string;
18
18
  title: string;
19
19
  icon?: WebIcon;
20
+ /**
21
+ * The colour of its tile, `--ta-tint-<tint>` and `--ta-tint-ink-<tint>` of the theme, the same for every page of its
22
+ * extension: the launcher's tile and the icon of its app (docs/design/ta-install-as-app.md). Newer than some Ta apps.
23
+ */
24
+ tint?: number;
20
25
  state: WebPageState;
21
26
  /** Its extension starts when it opens (`pi.webActivation`, or temporary): it is never in the navigation. */
22
27
  onOpen: boolean;
@@ -1,4 +1,5 @@
1
1
  import { TA_PAGES_USED, TaPackageTextUtil } from '@celljs/ta-protocol';
2
+ import { TintUtil } from '../style/tints.js';
2
3
  import { WEB_ICONS } from './icons.js';
3
4
  import { WebLabelUtil } from './web-extension-protocol.js';
4
5
  export var WebPagesUtil;
@@ -68,6 +69,7 @@ export var WebPagesUtil;
68
69
  extension: view.id.slice(0, view.id.lastIndexOf('/')),
69
70
  title: WebLabelUtil.text(view.title),
70
71
  icon: view.icon,
72
+ tint: TintUtil.of(view.id.slice(0, view.id.lastIndexOf('/'))),
71
73
  state: view.id === shown ? 'shown' : 'running',
72
74
  onOpen: false,
73
75
  place: placeOf(view),
@@ -83,6 +85,7 @@ export var WebPagesUtil;
83
85
  extension: info.name,
84
86
  title: title(info, language, first ? WebLabelUtil.text(first.title) : undefined),
85
87
  icon: (_a = (info.icon ? WEB_ICONS[info.icon] : undefined)) !== null && _a !== void 0 ? _a : first === null || first === void 0 ? void 0 : first.icon,
88
+ tint: TintUtil.of(info.name),
86
89
  state: isShown ? 'shown' : background ? 'background' : running ? 'running' : 'stopped',
87
90
  onOpen: true,
88
91
  place: info.temporary ? 'launcher' : listed(info, kinds) ? 'list' : 'discover',
@@ -70,10 +70,8 @@ export declare const CHAT_EN: {
70
70
  'ta.message.skill': string;
71
71
  'ta.message.showMore': string;
72
72
  'ta.message.showLess': string;
73
- 'ta.message.compacted': string;
74
73
  'ta.message.picturesSeen': string;
75
74
  'ta.message.pictureSeen': string;
76
- 'ta.message.compactedFrom': string;
77
75
  'ta.message.steered': string;
78
76
  'ta.message.steeredTitle': string;
79
77
  'ta.message.queued': string;
@@ -212,4 +210,20 @@ export declare const CHAT_EN: {
212
210
  'ta.chat.replyingFor': string;
213
211
  'ta.chats.busy': string;
214
212
  'ta.chat.tagOpen': string;
213
+ 'ta.context.title': string;
214
+ 'ta.context.here': string;
215
+ 'ta.context.renew': string;
216
+ 'ta.context.renewNow': string;
217
+ 'ta.context.notNow': string;
218
+ 'ta.context.undo': string;
219
+ 'ta.context.offer': string;
220
+ 'ta.context.renewed': string;
221
+ 'ta.context.at': string;
222
+ 'ta.context.never': string;
223
+ 'ta.context.follow': string;
224
+ 'ta.context.mode.auto': string;
225
+ 'ta.context.mode.ask': string;
226
+ 'ta.context.mode.off': string;
227
+ 'ta.context.mark': string;
228
+ 'ta.context.note': string;
215
229
  };
@@ -70,10 +70,8 @@ export const CHAT_EN = {
70
70
  'ta.message.skill': 'Skill',
71
71
  'ta.message.showMore': 'Show more',
72
72
  'ta.message.showLess': 'Show less',
73
- 'ta.message.compacted': 'Earlier messages were compacted',
74
73
  'ta.message.picturesSeen': 'Looked at {count} picture(s)',
75
74
  'ta.message.pictureSeen': 'Picture {n} · {what}',
76
- 'ta.message.compactedFrom': 'from {tokens} tokens',
77
75
  'ta.message.steered': 'Said on the way',
78
76
  'ta.message.steeredTitle': 'Written while it worked: it read this after its tools and went on with it',
79
77
  'ta.message.queued': 'Waited for the reply',
@@ -212,5 +210,21 @@ export const CHAT_EN = {
212
210
  'ta.chat.replyingFor': '{names} · answering',
213
211
  'ta.chats.busy': 'Conversations going on',
214
212
  'ta.chat.tagOpen': 'What this means, and how to change it',
213
+ 'ta.context.title': 'Context',
214
+ 'ta.context.here': 'In this conversation',
215
+ 'ta.context.renew': 'Renew',
216
+ 'ta.context.renewNow': 'Renew the context now',
217
+ 'ta.context.notNow': 'Not now',
218
+ 'ta.context.undo': 'Undo',
219
+ 'ta.context.offer': 'The context is {percent}% full; renewing it keeps the work on track',
220
+ 'ta.context.renewed': 'Renewed the context · the work goes on from a handoff note',
221
+ 'ta.context.at': 'renews at {tokens}',
222
+ 'ta.context.never': 'never renews',
223
+ 'ta.context.follow': 'As in Settings ({mode})',
224
+ 'ta.context.mode.auto': 'Renew by itself',
225
+ 'ta.context.mode.ask': 'Ask me',
226
+ 'ta.context.mode.off': 'Never',
227
+ 'ta.context.mark': 'Context renewed here',
228
+ 'ta.context.note': 'Handoff note',
215
229
  };
216
230
  //# sourceMappingURL=chat.js.map
@@ -71,6 +71,7 @@ export declare const COMMON_EN: {
71
71
  'ta.error.forbiddenHint': string;
72
72
  'ta.error.forbiddenAsk': string;
73
73
  'ta.error.limit': string;
74
+ 'ta.error.deviceNotWaiting': string;
74
75
  'ta.error.forbiddenNever': string;
75
76
  'ta.notices': string;
76
77
  'ta.notice.picture': string;
@@ -72,6 +72,7 @@ export const COMMON_EN = {
72
72
  'ta.error.forbiddenHint': 'The owner of this Ta or an admin can let you',
73
73
  'ta.error.forbiddenAsk': 'Ask',
74
74
  'ta.error.limit': 'Too many people are working in this Ta at once; try again in a moment',
75
+ 'ta.error.deviceNotWaiting': 'This device is not waiting to be let in: it may be in already, or removed',
75
76
  'ta.error.forbiddenNever': 'This is kept out of reach of everyone let in',
76
77
  'ta.notices': 'Notifications',
77
78
  'ta.notice.picture': 'Picture of the extension, such as a QR code to scan',
@@ -58,6 +58,17 @@ export declare const DISCOVER_EN: {
58
58
  'ta.open.open': string;
59
59
  'ta.open.notALink': string;
60
60
  'ta.open.failed': string;
61
+ 'ta.access.ask': string;
62
+ 'ta.access.new': string;
63
+ 'ta.access.updated': string;
64
+ 'ta.access.full': string;
65
+ 'ta.access.app': string;
66
+ 'ta.access.browser': string;
67
+ 'ta.access.from': string;
68
+ 'ta.access.fromLink': string;
69
+ 'ta.access.fromMarket': string;
70
+ 'ta.access.allow': string;
71
+ 'ta.access.failed': string;
61
72
  'ta.search.pages': string;
62
73
  'ta.search.all': string;
63
74
  'ta.search.more': string;
@@ -59,6 +59,17 @@ export const DISCOVER_EN = {
59
59
  'ta.open.open': 'Open',
60
60
  'ta.open.notALink': 'This is not a link of an extension',
61
61
  'ta.open.failed': 'Could not open it',
62
+ 'ta.access.ask': 'Allow {name} to run?',
63
+ 'ta.access.new': 'It is not one you made: it runs once you allow it.',
64
+ 'ta.access.updated': 'It changed since you allowed it: this version runs once you allow it again.',
65
+ 'ta.access.full': 'It asks for all Ta can do: read and write the files of this computer, run commands, read your conversations. Allow only what you trust.',
66
+ 'ta.access.app': 'It asks for its own pages and the notices, widgets and voice of Ta, not for your files or conversations.',
67
+ 'ta.access.browser': 'It asks only for its own pages and data, as a web page does, not for your files or conversations.',
68
+ 'ta.access.from': 'From: {source}.',
69
+ 'ta.access.fromLink': 'a link someone shared',
70
+ 'ta.access.fromMarket': 'the market',
71
+ 'ta.access.allow': 'Allow',
72
+ 'ta.access.failed': 'Could not allow it',
62
73
  'ta.search.pages': 'Pages',
63
74
  'ta.search.all': 'Show all {count}',
64
75
  'ta.search.more': 'Show more',
@@ -105,6 +105,22 @@ export declare const SETTINGS_EN: {
105
105
  'ta.settings.keepAliveDescription': string;
106
106
  'ta.settings.retention': string;
107
107
  'ta.settings.retentionDescription': string;
108
+ 'ta.settings.trust': string;
109
+ 'ta.settings.trustDescription': string;
110
+ 'ta.settings.trust.off': string;
111
+ 'ta.settings.trust.browser': string;
112
+ 'ta.settings.trust.ask': string;
113
+ 'ta.settings.trust.all': string;
114
+ 'ta.settings.trust.offHint': string;
115
+ 'ta.settings.trust.browserHint': string;
116
+ 'ta.settings.trust.askHint': string;
117
+ 'ta.settings.trust.allHint': string;
118
+ 'ta.settings.sandbox': string;
119
+ 'ta.settings.sandboxDescription': string;
120
+ 'ta.settings.sandboxLocal': string;
121
+ 'ta.settings.sandboxLocalDescription': string;
122
+ 'ta.settings.sandboxParts': string;
123
+ 'ta.settings.sandboxPartsDescription': string;
108
124
  'ta.settings.minutes': string;
109
125
  'ta.settings.days': string;
110
126
  'ta.settings.never': string;
@@ -174,6 +190,32 @@ export declare const SETTINGS_EN: {
174
190
  'ta.setting.followUpMode.hint': string;
175
191
  'ta.setting.followUpMode.one-at-a-time': string;
176
192
  'ta.setting.followUpMode.all': string;
193
+ 'ta.setting.context.renewAt': string;
194
+ 'ta.setting.context.renewAt.hint': string;
195
+ 'ta.setting.context.renewAt.auto': string;
196
+ 'ta.setting.context.renewAt.never': string;
197
+ 'ta.setting.context.renewAt.40': string;
198
+ 'ta.setting.context.renewAt.60': string;
199
+ 'ta.setting.context.renewAt.80': string;
200
+ 'ta.setting.context.asked': string;
201
+ 'ta.setting.context.asked.hint': string;
202
+ 'ta.setting.context.asked.auto': string;
203
+ 'ta.setting.context.asked.ask': string;
204
+ 'ta.setting.context.asked.off': string;
205
+ 'ta.setting.context.unattended': string;
206
+ 'ta.setting.context.unattended.hint': string;
207
+ 'ta.setting.context.unattended.auto': string;
208
+ 'ta.setting.context.unattended.ask': string;
209
+ 'ta.setting.context.unattended.off': string;
210
+ 'ta.setting.context.double': string;
211
+ 'ta.setting.context.double.hint': string;
212
+ 'ta.setting.context.double.auto': string;
213
+ 'ta.setting.context.double.ask': string;
214
+ 'ta.setting.context.double.off': string;
215
+ 'ta.setting.context.fold': string;
216
+ 'ta.setting.context.fold.hint': string;
217
+ 'ta.setting.context.fold.on': string;
218
+ 'ta.setting.context.fold.off': string;
177
219
  'ta.setting.compaction.enabled': string;
178
220
  'ta.setting.compaction.enabled.hint': string;
179
221
  'ta.setting.compaction.reserveTokens': string;
@@ -210,4 +252,16 @@ export declare const SETTINGS_EN: {
210
252
  'ta.settings.cwdChange': string;
211
253
  'ta.settings.cwdDescription': string;
212
254
  'ta.workingDirectory.changed': string;
255
+ 'ta.settings.installApps': string;
256
+ 'ta.settings.installAppsDescription': string;
257
+ 'ta.settings.apps': string;
258
+ 'ta.apps.install': string;
259
+ 'ta.apps.remove': string;
260
+ 'ta.apps.open': string;
261
+ 'ta.apps.installed': string;
262
+ 'ta.apps.noEntry': string;
263
+ 'ta.apps.removed': string;
264
+ 'ta.apps.off': string;
265
+ 'ta.apps.gone': string;
266
+ 'ta.apps.goneHint': string;
213
267
  };
@@ -105,6 +105,22 @@ export const SETTINGS_EN = {
105
105
  'ta.settings.keepAliveDescription': 'An extension that starts when opened stops after this long in the background, and opens again where you left it until then',
106
106
  'ta.settings.retention': 'Clear unused temporary extensions',
107
107
  'ta.settings.retentionDescription': 'Extensions opened without installing go after this many days unused, unless they are in Mine',
108
+ 'ta.settings.trust': 'Extensions others made',
109
+ 'ta.settings.trustDescription': 'How far extensions others shared with you may reach: a web page, each version you allow, or all of Ta',
110
+ 'ta.settings.trust.off': 'Off',
111
+ 'ta.settings.trust.browser': 'Web only',
112
+ 'ta.settings.trust.ask': 'Ask each',
113
+ 'ta.settings.trust.all': 'Full',
114
+ 'ta.settings.trust.offHint': 'None of them runs, and you are not asked',
115
+ 'ta.settings.trust.browserHint': 'They get only their own pages and data, as a web page does; one that asks more does not run',
116
+ 'ta.settings.trust.askHint': 'You allow what each asks, and again after each update; below full access it runs apart from Ta',
117
+ 'ta.settings.trust.allHint': 'They run with all Ta can do (your files, your chats) without asking. Only if you trust whoever shares with you',
118
+ 'ta.settings.sandbox': 'Run them apart on this device',
119
+ 'ta.settings.sandboxDescription': 'Off: those that need to run apart from Ta do not run on this device',
120
+ 'ta.settings.sandboxLocal': 'Keep their local data',
121
+ 'ta.settings.sandboxLocalDescription': 'Their local storage is kept with their data, up to 1 MB each',
122
+ 'ta.settings.sandboxParts': "Let them use Ta's components",
123
+ 'ta.settings.sandboxPartsDescription': "Off: they draw only their own elements, without Ta's text, dialogs and icons",
108
124
  'ta.settings.minutes': '{count} min',
109
125
  'ta.settings.days': '{count} days',
110
126
  'ta.settings.never': 'Never',
@@ -148,7 +164,7 @@ export const SETTINGS_EN = {
148
164
  'ta.settings.off': 'Off',
149
165
  'ta.settings.group.model': 'Model',
150
166
  'ta.settings.group.conversation': 'Conversation',
151
- 'ta.settings.group.context': 'Context and retries',
167
+ 'ta.settings.group.context': 'Context',
152
168
  'ta.settings.group.tools': 'Tools',
153
169
  'ta.settings.shortcuts': 'Keyboard shortcuts',
154
170
  'ta.settings.about': 'About',
@@ -174,8 +190,34 @@ export const SETTINGS_EN = {
174
190
  'ta.setting.followUpMode.hint': 'What you queue for after the run (Alt+Enter).',
175
191
  'ta.setting.followUpMode.one-at-a-time': 'One at a time',
176
192
  'ta.setting.followUpMode.all': 'All together',
177
- 'ta.setting.compaction.enabled': 'Compact automatically',
178
- 'ta.setting.compaction.enabled.hint': 'Sum up the conversation when the context is nearly full.',
193
+ 'ta.setting.context.renewAt': 'Renew the context at',
194
+ 'ta.setting.context.renewAt.hint': 'How full it gets before Ta goes on from a handoff note, between two turns. Auto: 60% of the window, at most 250k tokens.',
195
+ 'ta.setting.context.renewAt.auto': 'Auto',
196
+ 'ta.setting.context.renewAt.never': 'Never',
197
+ 'ta.setting.context.renewAt.40': '40%',
198
+ 'ta.setting.context.renewAt.60': '60%',
199
+ 'ta.setting.context.renewAt.80': '80%',
200
+ 'ta.setting.context.asked': 'Conversations you start',
201
+ 'ta.setting.context.asked.hint': 'Once full: renew by itself, or offer it in a line at the end.',
202
+ 'ta.setting.context.asked.auto': 'Renew by itself',
203
+ 'ta.setting.context.asked.ask': 'Ask me',
204
+ 'ta.setting.context.asked.off': 'Never',
205
+ 'ta.setting.context.unattended': 'Work Ta does by itself',
206
+ 'ta.setting.context.unattended.hint': 'Tasks, goals, scheduled runs, agents given work.',
207
+ 'ta.setting.context.unattended.auto': 'Renew by itself',
208
+ 'ta.setting.context.unattended.ask': 'Ask me',
209
+ 'ta.setting.context.unattended.off': 'Never',
210
+ 'ta.setting.context.double': "The double's conversation",
211
+ 'ta.setting.context.double.hint': 'It goes on for days.',
212
+ 'ta.setting.context.double.auto': 'Renew by itself',
213
+ 'ta.setting.context.double.ask': 'Ask me',
214
+ 'ta.setting.context.double.off': 'Never',
215
+ 'ta.setting.context.fold': 'Fold old tool outputs',
216
+ 'ta.setting.context.fold.hint': 'Large outputs of tools from earlier in a conversation shrink to their start in what the model reads; the record keeps them whole. Not for external agents.',
217
+ 'ta.setting.context.fold.on': 'On',
218
+ 'ta.setting.context.fold.off': 'Off',
219
+ 'ta.setting.compaction.enabled': 'Compaction as a net',
220
+ 'ta.setting.compaction.enabled.hint': 'When a turn fills the context before it ends, the model summarizes it.',
179
221
  'ta.setting.compaction.reserveTokens': 'Tokens kept free',
180
222
  'ta.setting.compaction.reserveTokens.hint': 'Compaction starts when fewer are left for the reply.',
181
223
  'ta.setting.compaction.keepRecentTokens': 'Recent tokens kept',
@@ -210,5 +252,17 @@ export const SETTINGS_EN = {
210
252
  'ta.settings.cwdChange': 'Change…',
211
253
  'ta.settings.cwdDescription': 'New chats, terminals and the tasks of the double open here; open chats stay in their own: {path}',
212
254
  'ta.workingDirectory.changed': 'Default directory: {path}',
255
+ 'ta.settings.installApps': 'Install pages as apps',
256
+ 'ta.settings.installAppsDescription': 'Hold a page in Quick open to install it as an app of this computer, with a window of its own. Off, those installed still open',
257
+ 'ta.settings.apps': 'Installed as apps',
258
+ 'ta.apps.install': 'Install as app',
259
+ 'ta.apps.remove': 'Remove from apps',
260
+ 'ta.apps.open': 'Open',
261
+ 'ta.apps.installed': '{name} is installed as an app: open it from the apps of this computer from now on',
262
+ 'ta.apps.noEntry': 'The window of {name} is open, but it could not be put among the apps of this computer',
263
+ 'ta.apps.removed': '{name} is removed from the apps',
264
+ 'ta.apps.off': 'Installing pages as apps is turned off in Settings',
265
+ 'ta.apps.gone': 'This page is no longer here',
266
+ 'ta.apps.goneHint': 'Its extension may have been removed or turned off.',
213
267
  };
214
268
  //# sourceMappingURL=settings.js.map
@@ -95,6 +95,7 @@ export declare const TOOLS_EN: {
95
95
  'ta.progress.waiting': string;
96
96
  'ta.progress.calling': string;
97
97
  'ta.progress.compacting': string;
98
+ 'ta.progress.renewing': string;
98
99
  'ta.progress.retrying': string;
99
100
  'ta.progress.retryingNow': string;
100
101
  'ta.progress.retry.rateLimit': string;
@@ -96,6 +96,7 @@ export const TOOLS_EN = {
96
96
  'ta.progress.waiting': 'Waiting for the model',
97
97
  'ta.progress.calling': 'Writing a call · {tool}',
98
98
  'ta.progress.compacting': 'Compacting the conversation',
99
+ 'ta.progress.renewing': 'Writing the handoff note',
99
100
  'ta.progress.retrying': '{reason}; trying again in {seconds}s ({attempt}/{max})',
100
101
  'ta.progress.retryingNow': '{reason}; trying again ({attempt}/{max})',
101
102
  'ta.progress.retry.rateLimit': 'Rate limited by the provider',
@@ -69,10 +69,8 @@ export const CHAT_JA = {
69
69
  'ta.message.skill': 'スキル',
70
70
  'ta.message.showMore': '展開',
71
71
  'ta.message.showLess': '収起',
72
- 'ta.message.compacted': '以前のメッセージが圧縮されました',
73
72
  'ta.message.picturesSeen': '{count} 枚の画像を見ました',
74
73
  'ta.message.pictureSeen': '画像 {n} · {what}',
75
- 'ta.message.compactedFrom': '圧縮前 {tokens} トークン',
76
74
  'ta.message.steered': '途中で発言',
77
75
  'ta.message.steeredTitle': '作業中に書かれました。ツールを完了後に読まれて続行しました',
78
76
  'ta.message.queued': '返信を待機',
@@ -211,5 +209,21 @@ export const CHAT_JA = {
211
209
  'ta.chat.replyingFor': '{names} · 返信中',
212
210
  'ta.chats.busy': '進行中の会話',
213
211
  'ta.chat.tagOpen': '意味と変更方法',
212
+ 'ta.context.title': 'コンテキスト',
213
+ 'ta.context.here': 'この会話',
214
+ 'ta.context.renew': '新しくする',
215
+ 'ta.context.renewNow': '今すぐコンテキストを新しくする',
216
+ 'ta.context.notNow': '今回はしない',
217
+ 'ta.context.undo': '元に戻す',
218
+ 'ta.context.offer': 'コンテキストを {percent}% 使っています。新しくすると作業が安定します',
219
+ 'ta.context.renewed': 'コンテキストを新しくしました · 引き継ぎメモから続けます',
220
+ 'ta.context.at': '{tokens} で新しくする',
221
+ 'ta.context.never': '新しくしない',
222
+ 'ta.context.follow': '設定どおり({mode})',
223
+ 'ta.context.mode.auto': '自動で新しくする',
224
+ 'ta.context.mode.ask': '確認する',
225
+ 'ta.context.mode.off': 'しない',
226
+ 'ta.context.mark': 'ここでコンテキストを新しくしました',
227
+ 'ta.context.note': '引き継ぎメモ',
214
228
  };
215
229
  //# sourceMappingURL=chat.js.map
@@ -70,6 +70,7 @@ export const COMMON_JA = {
70
70
  'ta.error.forbiddenHint': 'この Ta の所有者または管理者が権限を与えることができます',
71
71
  'ta.error.forbiddenAsk': '申し込む',
72
72
  'ta.error.limit': 'この Ta で同時に作業している人が多すぎます。少しの間、もう一度試してください',
73
+ 'ta.error.deviceNotWaiting': 'このデバイスは許可待ちではありません。すでに許可されたか、削除された可能性があります',
73
74
  'ta.error.forbiddenNever': 'これはアクセスを許可されたすべての人に対して制限されています',
74
75
  'ta.notices': '通知',
75
76
  'ta.notice.picture': '拡張が提供する画像(スキャンする QR コードなど)',