@celljs/ta 4.10.0 → 4.11.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 (559) hide show
  1. package/README.en.md +3 -1
  2. package/README.md +3 -1
  3. package/dist/cli.mjs +1675 -51
  4. package/dist/gateway.mjs +167 -5
  5. package/dist/pi/CHANGELOG.md +23 -0
  6. package/dist/pi/package.json +1 -1
  7. package/dist/pi/packages/ta-agents/extension/index.mjs +166 -139
  8. package/dist/pi/packages/ta-agents/lib/acp-agent.js +30 -10
  9. package/dist/pi/packages/ta-agents/lib/agent-catalog.d.ts +2 -2
  10. package/dist/pi/packages/ta-agents/lib/agent-catalog.js +4 -4
  11. package/dist/pi/packages/ta-agents/lib/agent-prompt.d.ts +6 -0
  12. package/dist/pi/packages/ta-agents/lib/agent-prompt.js +19 -0
  13. package/dist/pi/packages/ta-agents/lib/agent-session.d.ts +2 -0
  14. package/dist/pi/packages/ta-agents/lib/agent-session.js +2 -0
  15. package/dist/pi/packages/ta-agents/lib/agent-streamer.js +7 -0
  16. package/dist/pi/packages/ta-agents/lib/agent-tool.js +3 -2
  17. package/dist/pi/packages/ta-agents/package.json +1 -1
  18. package/dist/pi/packages/ta-bots/extension/index.mjs +31 -299
  19. package/dist/pi/packages/ta-bots/host/index.mjs +143 -1
  20. package/dist/pi/packages/ta-bots/lib/bots-protocol.d.ts +2 -0
  21. package/dist/pi/packages/ta-bots/lib/bots-protocol.js +3 -1
  22. package/dist/pi/packages/ta-bots/lib/bots-view.js +24 -12
  23. package/dist/pi/packages/ta-bots/lib/composer.js +1 -0
  24. package/dist/pi/packages/ta-bots/lib/extension.js +10 -17
  25. package/dist/pi/packages/ta-bots/lib/i18n.d.ts +1 -0
  26. package/dist/pi/packages/ta-bots/lib/i18n.js +2 -0
  27. package/dist/pi/packages/ta-bots/lib/index.js +2 -0
  28. package/dist/pi/packages/ta-bots/lib/style.d.ts +1 -1
  29. package/dist/pi/packages/ta-bots/lib/style.js +1 -0
  30. package/dist/pi/packages/ta-bots/lib/text-util.js +8 -1
  31. package/dist/pi/packages/ta-bots/lib/tool-line.d.ts +8 -0
  32. package/dist/pi/packages/ta-bots/lib/tool-line.js +19 -0
  33. package/dist/pi/packages/ta-bots/package.json +1 -1
  34. package/dist/pi/packages/ta-bots/web/index.js +47 -16
  35. package/dist/pi/packages/ta-changes/extension/index.mjs +23 -13
  36. package/dist/pi/packages/ta-changes/lib/card.js +18 -4
  37. package/dist/pi/packages/ta-changes/lib/changes-protocol.d.ts +0 -4
  38. package/dist/pi/packages/ta-changes/lib/changes-protocol.js +1 -5
  39. package/dist/pi/packages/ta-changes/lib/extension.js +5 -13
  40. package/dist/pi/packages/ta-changes/package.json +1 -1
  41. package/dist/pi/packages/ta-changes/web/index.js +16 -3
  42. package/dist/pi/packages/ta-channels/README.en.md +4 -3
  43. package/dist/pi/packages/ta-channels/README.md +4 -3
  44. package/dist/pi/packages/ta-channels/extension/index.mjs +350 -28
  45. package/dist/pi/packages/ta-channels/host/index.mjs +588 -43
  46. package/dist/pi/packages/ta-channels/lib/agent-cards.d.ts +19 -0
  47. package/dist/pi/packages/ta-channels/lib/agent-cards.js +58 -0
  48. package/dist/pi/packages/ta-channels/lib/agent-menu.d.ts +2 -2
  49. package/dist/pi/packages/ta-channels/lib/agent-menu.js +20 -6
  50. package/dist/pi/packages/ta-channels/lib/card.d.ts +27 -0
  51. package/dist/pi/packages/ta-channels/lib/card.js +178 -0
  52. package/dist/pi/packages/ta-channels/lib/channels-model.d.ts +65 -13
  53. package/dist/pi/packages/ta-channels/lib/channels-model.js +15 -6
  54. package/dist/pi/packages/ta-channels/lib/channels-util.d.ts +31 -2
  55. package/dist/pi/packages/ta-channels/lib/channels-util.js +100 -6
  56. package/dist/pi/packages/ta-channels/lib/channels.d.ts +28 -18
  57. package/dist/pi/packages/ta-channels/lib/channels.js +65 -65
  58. package/dist/pi/packages/ta-channels/lib/create.js +3 -1
  59. package/dist/pi/packages/ta-channels/lib/extension.d.ts +8 -0
  60. package/dist/pi/packages/ta-channels/lib/extension.js +104 -18
  61. package/dist/pi/packages/ta-channels/lib/faces.d.ts +2 -0
  62. package/dist/pi/packages/ta-channels/lib/faces.js +6 -0
  63. package/dist/pi/packages/ta-channels/lib/handoff-view.d.ts +19 -0
  64. package/dist/pi/packages/ta-channels/lib/handoff-view.js +113 -0
  65. package/dist/pi/packages/ta-channels/lib/handoff.d.ts +67 -0
  66. package/dist/pi/packages/ta-channels/lib/handoff.js +114 -0
  67. package/dist/pi/packages/ta-channels/lib/host.d.ts +1 -1
  68. package/dist/pi/packages/ta-channels/lib/host.js +1 -1
  69. package/dist/pi/packages/ta-channels/lib/i18n.d.ts +45 -0
  70. package/dist/pi/packages/ta-channels/lib/i18n.js +90 -0
  71. package/dist/pi/packages/ta-channels/lib/index.js +10 -1
  72. package/dist/pi/packages/ta-channels/lib/member-tools.d.ts +23 -0
  73. package/dist/pi/packages/ta-channels/lib/member-tools.js +56 -0
  74. package/dist/pi/packages/ta-channels/lib/members.js +6 -2
  75. package/dist/pi/packages/ta-channels/lib/notice.d.ts +25 -0
  76. package/dist/pi/packages/ta-channels/lib/notice.js +101 -0
  77. package/dist/pi/packages/ta-channels/lib/room.js +13 -2
  78. package/dist/pi/packages/ta-channels/lib/sidebar.d.ts +1 -6
  79. package/dist/pi/packages/ta-channels/lib/sidebar.js +132 -69
  80. package/dist/pi/packages/ta-channels/lib/style.d.ts +1 -1
  81. package/dist/pi/packages/ta-channels/lib/style.js +69 -4
  82. package/dist/pi/packages/ta-channels/lib/team.d.ts +58 -10
  83. package/dist/pi/packages/ta-channels/lib/team.js +159 -38
  84. package/dist/pi/packages/ta-channels/lib/tool-lines.d.ts +22 -0
  85. package/dist/pi/packages/ta-channels/lib/tool-lines.js +113 -0
  86. package/dist/pi/packages/ta-channels/lib/views.d.ts +21 -16
  87. package/dist/pi/packages/ta-channels/lib/views.js +60 -31
  88. package/dist/pi/packages/ta-channels/package.json +2 -1
  89. package/dist/pi/packages/ta-channels/web/index.js +1507 -309
  90. package/dist/pi/packages/ta-computer-use/package.json +6 -1
  91. package/dist/pi/packages/ta-cron/README.en.md +4 -2
  92. package/dist/pi/packages/ta-cron/README.md +4 -2
  93. package/dist/pi/packages/ta-cron/extension/index.mjs +416 -44
  94. package/dist/pi/packages/ta-cron/host/index.mjs +24 -3
  95. package/dist/pi/packages/ta-cron/lib/chat-task.d.ts +48 -0
  96. package/dist/pi/packages/ta-cron/lib/chat-task.js +133 -0
  97. package/dist/pi/packages/ta-cron/lib/commands.d.ts +2 -1
  98. package/dist/pi/packages/ta-cron/lib/commands.js +10 -4
  99. package/dist/pi/packages/ta-cron/lib/composer.d.ts +11 -0
  100. package/dist/pi/packages/ta-cron/lib/composer.js +58 -0
  101. package/dist/pi/packages/ta-cron/lib/cron-protocol.d.ts +10 -3
  102. package/dist/pi/packages/ta-cron/lib/cron-protocol.js +6 -3
  103. package/dist/pi/packages/ta-cron/lib/editor.js +5 -3
  104. package/dist/pi/packages/ta-cron/lib/extension.d.ts +2 -0
  105. package/dist/pi/packages/ta-cron/lib/extension.js +33 -13
  106. package/dist/pi/packages/ta-cron/lib/i18n.d.ts +18 -0
  107. package/dist/pi/packages/ta-cron/lib/i18n.js +36 -0
  108. package/dist/pi/packages/ta-cron/lib/index.js +4 -0
  109. package/dist/pi/packages/ta-cron/lib/page.d.ts +5 -1
  110. package/dist/pi/packages/ta-cron/lib/page.js +12 -0
  111. package/dist/pi/packages/ta-cron/lib/react.d.ts +3 -0
  112. package/dist/pi/packages/ta-cron/lib/react.js +8 -0
  113. package/dist/pi/packages/ta-cron/lib/scheduler.js +3 -2
  114. package/dist/pi/packages/ta-cron/lib/style.d.ts +1 -1
  115. package/dist/pi/packages/ta-cron/lib/style.js +11 -13
  116. package/dist/pi/packages/ta-cron/lib/task-util.d.ts +2 -0
  117. package/dist/pi/packages/ta-cron/lib/task-util.js +20 -1
  118. package/dist/pi/packages/ta-cron/lib/tasks-view.js +6 -2
  119. package/dist/pi/packages/ta-cron/lib/tool-line.d.ts +9 -0
  120. package/dist/pi/packages/ta-cron/lib/tool-line.js +40 -0
  121. package/dist/pi/packages/ta-cron/lib/tool.d.ts +5 -1
  122. package/dist/pi/packages/ta-cron/lib/tool.js +6 -3
  123. package/dist/pi/packages/ta-cron/package.json +12 -1
  124. package/dist/pi/packages/ta-cron/web/index.js +661 -254
  125. package/dist/pi/packages/ta-extensions/README.en.md +1 -1
  126. package/dist/pi/packages/ta-extensions/README.md +1 -1
  127. package/dist/pi/packages/ta-extensions/host/index.mjs +3 -2
  128. package/dist/pi/packages/ta-extensions/lib/actions.d.ts +4 -0
  129. package/dist/pi/packages/ta-extensions/lib/actions.js +13 -4
  130. package/dist/pi/packages/ta-extensions/lib/extensions-util.d.ts +5 -0
  131. package/dist/pi/packages/ta-extensions/lib/extensions-util.js +10 -0
  132. package/dist/pi/packages/ta-extensions/lib/market-parts.js +8 -2
  133. package/dist/pi/packages/ta-extensions/lib/market-style.d.ts +1 -1
  134. package/dist/pi/packages/ta-extensions/lib/market-style.js +4 -5
  135. package/dist/pi/packages/ta-extensions/lib/market-util.d.ts +2 -2
  136. package/dist/pi/packages/ta-extensions/lib/market-util.js +2 -2
  137. package/dist/pi/packages/ta-extensions/lib/page.js +12 -7
  138. package/dist/pi/packages/ta-extensions/lib/react.d.ts +3 -0
  139. package/dist/pi/packages/ta-extensions/lib/react.js +8 -0
  140. package/dist/pi/packages/ta-extensions/lib/style.d.ts +1 -1
  141. package/dist/pi/packages/ta-extensions/lib/style.js +3 -2
  142. package/dist/pi/packages/ta-extensions/package.json +6 -1
  143. package/dist/pi/packages/ta-extensions/skills/ta-package/SKILL.md +19 -8
  144. package/dist/pi/packages/ta-extensions/web/index.js +191 -22
  145. package/dist/pi/packages/ta-games/README.en.md +47 -0
  146. package/dist/pi/packages/ta-games/README.md +47 -0
  147. package/dist/pi/packages/ta-games/host/index.mjs +65 -0
  148. package/dist/pi/packages/ta-games/lib/games-view.d.ts +16 -0
  149. package/dist/pi/packages/ta-games/lib/games-view.js +77 -0
  150. package/dist/pi/packages/ta-games/lib/host.d.ts +36 -0
  151. package/dist/pi/packages/ta-games/lib/host.js +83 -0
  152. package/dist/pi/packages/ta-games/lib/i18n.d.ts +35 -0
  153. package/dist/pi/packages/ta-games/lib/i18n.js +71 -0
  154. package/dist/pi/packages/ta-games/lib/ideas.d.ts +6 -0
  155. package/dist/pi/packages/ta-games/lib/ideas.js +62 -0
  156. package/dist/pi/packages/ta-games/lib/index.d.ts +7 -0
  157. package/dist/pi/packages/ta-games/lib/index.js +24 -0
  158. package/dist/pi/packages/ta-games/lib/make-game.d.ts +23 -0
  159. package/dist/pi/packages/ta-games/lib/make-game.js +67 -0
  160. package/dist/pi/packages/ta-games/lib/react.d.ts +11 -0
  161. package/dist/pi/packages/ta-games/lib/react.js +16 -0
  162. package/dist/pi/packages/ta-games/lib/style.d.ts +4 -0
  163. package/dist/pi/packages/ta-games/lib/style.js +33 -0
  164. package/dist/pi/packages/ta-games/package.json +60 -0
  165. package/dist/pi/packages/ta-games/skills/ta-game/SKILL.md +127 -0
  166. package/dist/pi/packages/ta-games/skills/ta-game/examples/dino-run/package.json +22 -0
  167. package/dist/pi/packages/ta-games/skills/ta-game/examples/dino-run/web.js +389 -0
  168. package/dist/pi/packages/ta-games/skills/ta-game/examples/stack/package.json +22 -0
  169. package/dist/pi/packages/ta-games/skills/ta-game/examples/stack/web.js +423 -0
  170. package/dist/pi/packages/ta-games/skills/ta-game/phaser/LICENSE.md +22 -0
  171. package/dist/pi/packages/ta-games/skills/ta-game/phaser/actions-and-utilities/SKILL.md +343 -0
  172. package/dist/pi/packages/ta-games/skills/ta-game/phaser/animations/SKILL.md +481 -0
  173. package/dist/pi/packages/ta-games/skills/ta-game/phaser/audio-and-sound/SKILL.md +453 -0
  174. package/dist/pi/packages/ta-games/skills/ta-game/phaser/cameras/SKILL.md +497 -0
  175. package/dist/pi/packages/ta-games/skills/ta-game/phaser/cameras/references/REFERENCE.md +128 -0
  176. package/dist/pi/packages/ta-games/skills/ta-game/phaser/curves-and-paths/SKILL.md +359 -0
  177. package/dist/pi/packages/ta-games/skills/ta-game/phaser/data-manager/SKILL.md +406 -0
  178. package/dist/pi/packages/ta-games/skills/ta-game/phaser/events-system/SKILL.md +497 -0
  179. package/dist/pi/packages/ta-games/skills/ta-game/phaser/filters-and-postfx/SKILL.md +449 -0
  180. package/dist/pi/packages/ta-games/skills/ta-game/phaser/game-object-components/SKILL.md +478 -0
  181. package/dist/pi/packages/ta-games/skills/ta-game/phaser/game-object-components/references/REFERENCE.md +76 -0
  182. package/dist/pi/packages/ta-games/skills/ta-game/phaser/game-setup-and-config/SKILL.md +485 -0
  183. package/dist/pi/packages/ta-games/skills/ta-game/phaser/geometry-and-math/SKILL.md +497 -0
  184. package/dist/pi/packages/ta-games/skills/ta-game/phaser/graphics-and-shapes/SKILL.md +473 -0
  185. package/dist/pi/packages/ta-games/skills/ta-game/phaser/groups-and-containers/SKILL.md +418 -0
  186. package/dist/pi/packages/ta-games/skills/ta-game/phaser/input-keyboard-mouse-touch/SKILL.md +500 -0
  187. package/dist/pi/packages/ta-games/skills/ta-game/phaser/input-keyboard-mouse-touch/references/REFERENCE.md +372 -0
  188. package/dist/pi/packages/ta-games/skills/ta-game/phaser/loading-assets/SKILL.md +474 -0
  189. package/dist/pi/packages/ta-games/skills/ta-game/phaser/loading-assets/references/REFERENCE.md +148 -0
  190. package/dist/pi/packages/ta-games/skills/ta-game/phaser/particles/SKILL.md +499 -0
  191. package/dist/pi/packages/ta-games/skills/ta-game/phaser/particles/references/REFERENCE.md +17 -0
  192. package/dist/pi/packages/ta-games/skills/ta-game/phaser/physics-arcade/SKILL.md +468 -0
  193. package/dist/pi/packages/ta-games/skills/ta-game/phaser/physics-matter/SKILL.md +499 -0
  194. package/dist/pi/packages/ta-games/skills/ta-game/phaser/render-textures/SKILL.md +441 -0
  195. package/dist/pi/packages/ta-games/skills/ta-game/phaser/scale-and-responsive/SKILL.md +371 -0
  196. package/dist/pi/packages/ta-games/skills/ta-game/phaser/scenes/SKILL.md +450 -0
  197. package/dist/pi/packages/ta-games/skills/ta-game/phaser/scenes/references/REFERENCE.md +78 -0
  198. package/dist/pi/packages/ta-games/skills/ta-game/phaser/sprites-and-images/SKILL.md +417 -0
  199. package/dist/pi/packages/ta-games/skills/ta-game/phaser/sprites-and-images/references/REFERENCE.md +160 -0
  200. package/dist/pi/packages/ta-games/skills/ta-game/phaser/text-and-bitmaptext/SKILL.md +460 -0
  201. package/dist/pi/packages/ta-games/skills/ta-game/phaser/tilemaps/SKILL.md +440 -0
  202. package/dist/pi/packages/ta-games/skills/ta-game/phaser/time-and-timers/SKILL.md +496 -0
  203. package/dist/pi/packages/ta-games/skills/ta-game/phaser/tweens/SKILL.md +414 -0
  204. package/dist/pi/packages/ta-games/skills/ta-game/phaser/v3-to-v4-migration/SKILL.md +430 -0
  205. package/dist/pi/packages/ta-games/skills/ta-game/phaser/v4-new-features/SKILL.md +384 -0
  206. package/dist/pi/packages/ta-games/skills/ta-game/phaser/v4-new-features/references/REFERENCE.md +69 -0
  207. package/dist/pi/packages/ta-games/web/index.js +431 -0
  208. package/dist/pi/packages/ta-glance/README.en.md +11 -0
  209. package/dist/pi/packages/ta-glance/README.md +11 -0
  210. package/dist/pi/packages/ta-glance/extension/index.mjs +67 -0
  211. package/dist/pi/packages/ta-glance/lib/card.d.ts +8 -0
  212. package/dist/pi/packages/ta-glance/lib/card.js +268 -0
  213. package/dist/pi/packages/ta-glance/lib/extension.d.ts +15 -0
  214. package/dist/pi/packages/ta-glance/lib/extension.js +24 -0
  215. package/dist/pi/packages/ta-glance/lib/glance-json.d.ts +9 -0
  216. package/dist/pi/packages/ta-glance/lib/glance-json.js +85 -0
  217. package/dist/pi/packages/ta-glance/lib/glance-prompt.d.ts +7 -0
  218. package/dist/pi/packages/ta-glance/lib/glance-prompt.js +34 -0
  219. package/dist/pi/packages/ta-glance/lib/glance-protocol.d.ts +98 -0
  220. package/dist/pi/packages/ta-glance/lib/glance-protocol.js +8 -0
  221. package/dist/pi/packages/ta-glance/lib/glance-spec.d.ts +6 -0
  222. package/dist/pi/packages/ta-glance/lib/glance-spec.js +204 -0
  223. package/dist/pi/packages/ta-glance/lib/glance-util.d.ts +3 -0
  224. package/dist/pi/packages/ta-glance/lib/glance-util.js +12 -0
  225. package/dist/pi/packages/ta-glance/lib/i18n.d.ts +22 -0
  226. package/dist/pi/packages/ta-glance/lib/i18n.js +41 -0
  227. package/dist/pi/packages/ta-glance/lib/index.d.ts +7 -0
  228. package/dist/pi/packages/ta-glance/lib/index.js +22 -0
  229. package/dist/pi/packages/ta-glance/lib/react.d.ts +8 -0
  230. package/dist/pi/packages/ta-glance/lib/react.js +8 -0
  231. package/dist/pi/packages/ta-glance/lib/style.d.ts +4 -0
  232. package/dist/pi/packages/ta-glance/lib/style.js +164 -0
  233. package/dist/pi/packages/ta-glance/package.json +53 -0
  234. package/dist/pi/packages/ta-glance/web/index.js +933 -0
  235. package/dist/pi/packages/ta-launcher/lib/actions.d.ts +4 -4
  236. package/dist/pi/packages/ta-launcher/lib/actions.js +7 -3
  237. package/dist/pi/packages/ta-launcher/lib/launcher-util.d.ts +7 -7
  238. package/dist/pi/packages/ta-launcher/lib/launcher-util.js +11 -8
  239. package/dist/pi/packages/ta-launcher/lib/launcher-view.js +13 -7
  240. package/dist/pi/packages/ta-launcher/lib/react.d.ts +3 -0
  241. package/dist/pi/packages/ta-launcher/lib/react.js +8 -0
  242. package/dist/pi/packages/ta-launcher/lib/style.d.ts +1 -1
  243. package/dist/pi/packages/ta-launcher/lib/style.js +6 -4
  244. package/dist/pi/packages/ta-launcher/package.json +1 -1
  245. package/dist/pi/packages/ta-launcher/web/index.js +34 -17
  246. package/dist/pi/packages/ta-manual/README.en.md +10 -0
  247. package/dist/pi/packages/ta-manual/README.md +10 -0
  248. package/dist/pi/packages/ta-manual/lib/i18n.d.ts +15 -0
  249. package/dist/pi/packages/ta-manual/lib/i18n.js +31 -0
  250. package/dist/pi/packages/ta-manual/lib/index.d.ts +7 -0
  251. package/dist/pi/packages/ta-manual/lib/index.js +24 -0
  252. package/dist/pi/packages/ta-manual/lib/manual-util.d.ts +18 -0
  253. package/dist/pi/packages/ta-manual/lib/manual-util.js +40 -0
  254. package/dist/pi/packages/ta-manual/lib/manual-view.d.ts +9 -0
  255. package/dist/pi/packages/ta-manual/lib/manual-view.js +81 -0
  256. package/dist/pi/packages/ta-manual/lib/pictures-a.d.ts +2 -0
  257. package/dist/pi/packages/ta-manual/lib/pictures-a.js +263 -0
  258. package/dist/pi/packages/ta-manual/lib/pictures-b.d.ts +2 -0
  259. package/dist/pi/packages/ta-manual/lib/pictures-b.js +216 -0
  260. package/dist/pi/packages/ta-manual/lib/pictures.d.ts +9 -0
  261. package/dist/pi/packages/ta-manual/lib/pictures.js +16 -0
  262. package/dist/pi/packages/ta-manual/lib/react.d.ts +8 -0
  263. package/dist/pi/packages/ta-manual/lib/react.js +8 -0
  264. package/dist/pi/packages/ta-manual/lib/scene.d.ts +68 -0
  265. package/dist/pi/packages/ta-manual/lib/scene.js +115 -0
  266. package/dist/pi/packages/ta-manual/lib/style.d.ts +4 -0
  267. package/dist/pi/packages/ta-manual/lib/style.js +47 -0
  268. package/dist/pi/packages/ta-manual/lib/topics.d.ts +42 -0
  269. package/dist/pi/packages/ta-manual/lib/topics.js +354 -0
  270. package/dist/pi/packages/ta-manual/package.json +54 -0
  271. package/dist/pi/packages/ta-manual/skills/ta-manual/SKILL.md +119 -0
  272. package/dist/pi/packages/ta-manual/web/index.js +2223 -0
  273. package/dist/pi/packages/ta-notify/README.en.md +29 -0
  274. package/dist/pi/packages/ta-notify/README.md +29 -0
  275. package/dist/pi/packages/ta-notify/extension/index.mjs +259 -0
  276. package/dist/pi/packages/ta-notify/host/index.mjs +163 -0
  277. package/dist/pi/packages/ta-notify/lib/ask-card.d.ts +9 -0
  278. package/dist/pi/packages/ta-notify/lib/ask-card.js +40 -0
  279. package/dist/pi/packages/ta-notify/lib/extension.d.ts +24 -0
  280. package/dist/pi/packages/ta-notify/lib/extension.js +102 -0
  281. package/dist/pi/packages/ta-notify/lib/host.d.ts +4 -0
  282. package/dist/pi/packages/ta-notify/lib/host.js +9 -0
  283. package/dist/pi/packages/ta-notify/lib/i18n.d.ts +31 -0
  284. package/dist/pi/packages/ta-notify/lib/i18n.js +63 -0
  285. package/dist/pi/packages/ta-notify/lib/index.d.ts +8 -0
  286. package/dist/pi/packages/ta-notify/lib/index.js +29 -0
  287. package/dist/pi/packages/ta-notify/lib/notify-protocol.d.ts +74 -0
  288. package/dist/pi/packages/ta-notify/lib/notify-protocol.js +23 -0
  289. package/dist/pi/packages/ta-notify/lib/notify-service.d.ts +21 -0
  290. package/dist/pi/packages/ta-notify/lib/notify-service.js +75 -0
  291. package/dist/pi/packages/ta-notify/lib/notify-util.d.ts +39 -0
  292. package/dist/pi/packages/ta-notify/lib/notify-util.js +119 -0
  293. package/dist/pi/packages/ta-notify/lib/react.d.ts +8 -0
  294. package/dist/pi/packages/ta-notify/lib/react.js +8 -0
  295. package/dist/pi/packages/ta-notify/lib/server-texts.d.ts +9 -0
  296. package/dist/pi/packages/ta-notify/lib/server-texts.js +22 -0
  297. package/dist/pi/packages/ta-notify/lib/settings.d.ts +8 -0
  298. package/dist/pi/packages/ta-notify/lib/settings.js +85 -0
  299. package/dist/pi/packages/ta-notify/lib/style.d.ts +4 -0
  300. package/dist/pi/packages/ta-notify/lib/style.js +29 -0
  301. package/dist/pi/packages/ta-notify/lib/tool-line.d.ts +9 -0
  302. package/dist/pi/packages/ta-notify/lib/tool-line.js +20 -0
  303. package/dist/pi/packages/ta-notify/lib/tool.d.ts +37 -0
  304. package/dist/pi/packages/ta-notify/lib/tool.js +46 -0
  305. package/dist/pi/packages/ta-notify/lib/watcher.d.ts +15 -0
  306. package/dist/pi/packages/ta-notify/lib/watcher.js +81 -0
  307. package/dist/pi/packages/ta-notify/package.json +55 -0
  308. package/dist/pi/packages/ta-notify/web/index.js +436 -0
  309. package/dist/pi/packages/ta-recall/README.en.md +19 -0
  310. package/dist/pi/packages/ta-recall/README.md +19 -0
  311. package/dist/pi/packages/ta-recall/extension/index.mjs +614 -0
  312. package/dist/pi/packages/ta-recall/host/index.mjs +820 -0
  313. package/dist/pi/packages/ta-recall/lib/brief-card.d.ts +21 -0
  314. package/dist/pi/packages/ta-recall/lib/brief-card.js +67 -0
  315. package/dist/pi/packages/ta-recall/lib/brief-home.d.ts +49 -0
  316. package/dist/pi/packages/ta-recall/lib/brief-home.js +143 -0
  317. package/dist/pi/packages/ta-recall/lib/brief-seen.d.ts +9 -0
  318. package/dist/pi/packages/ta-recall/lib/brief-seen.js +26 -0
  319. package/dist/pi/packages/ta-recall/lib/brief-util.d.ts +64 -0
  320. package/dist/pi/packages/ta-recall/lib/brief-util.js +179 -0
  321. package/dist/pi/packages/ta-recall/lib/chat-icons.d.ts +8 -0
  322. package/dist/pi/packages/ta-recall/lib/chat-icons.js +56 -0
  323. package/dist/pi/packages/ta-recall/lib/composer.d.ts +7 -0
  324. package/dist/pi/packages/ta-recall/lib/composer.js +38 -0
  325. package/dist/pi/packages/ta-recall/lib/conversation-index.d.ts +25 -0
  326. package/dist/pi/packages/ta-recall/lib/conversation-index.js +72 -0
  327. package/dist/pi/packages/ta-recall/lib/conversation-util.d.ts +16 -0
  328. package/dist/pi/packages/ta-recall/lib/conversation-util.js +109 -0
  329. package/dist/pi/packages/ta-recall/lib/conversations.d.ts +11 -0
  330. package/dist/pi/packages/ta-recall/lib/conversations.js +46 -0
  331. package/dist/pi/packages/ta-recall/lib/extension.d.ts +24 -0
  332. package/dist/pi/packages/ta-recall/lib/extension.js +131 -0
  333. package/dist/pi/packages/ta-recall/lib/host.d.ts +4 -0
  334. package/dist/pi/packages/ta-recall/lib/host.js +11 -0
  335. package/dist/pi/packages/ta-recall/lib/i18n.d.ts +41 -0
  336. package/dist/pi/packages/ta-recall/lib/i18n.js +83 -0
  337. package/dist/pi/packages/ta-recall/lib/index.d.ts +9 -0
  338. package/dist/pi/packages/ta-recall/lib/index.js +45 -0
  339. package/dist/pi/packages/ta-recall/lib/react.d.ts +11 -0
  340. package/dist/pi/packages/ta-recall/lib/react.js +16 -0
  341. package/dist/pi/packages/ta-recall/lib/recall-protocol.d.ts +186 -0
  342. package/dist/pi/packages/ta-recall/lib/recall-protocol.js +60 -0
  343. package/dist/pi/packages/ta-recall/lib/recall-service.d.ts +42 -0
  344. package/dist/pi/packages/ta-recall/lib/recall-service.js +241 -0
  345. package/dist/pi/packages/ta-recall/lib/search-source.d.ts +7 -0
  346. package/dist/pi/packages/ta-recall/lib/search-source.js +49 -0
  347. package/dist/pi/packages/ta-recall/lib/search-util.d.ts +30 -0
  348. package/dist/pi/packages/ta-recall/lib/search-util.js +167 -0
  349. package/dist/pi/packages/ta-recall/lib/server-texts.d.ts +7 -0
  350. package/dist/pi/packages/ta-recall/lib/server-texts.js +17 -0
  351. package/dist/pi/packages/ta-recall/lib/settings.d.ts +4 -0
  352. package/dist/pi/packages/ta-recall/lib/settings.js +77 -0
  353. package/dist/pi/packages/ta-recall/lib/skill-card.d.ts +9 -0
  354. package/dist/pi/packages/ta-recall/lib/skill-card.js +51 -0
  355. package/dist/pi/packages/ta-recall/lib/skill-util.d.ts +19 -0
  356. package/dist/pi/packages/ta-recall/lib/skill-util.js +110 -0
  357. package/dist/pi/packages/ta-recall/lib/stored.d.ts +5 -0
  358. package/dist/pi/packages/ta-recall/lib/stored.js +28 -0
  359. package/dist/pi/packages/ta-recall/lib/style.d.ts +4 -0
  360. package/dist/pi/packages/ta-recall/lib/style.js +48 -0
  361. package/dist/pi/packages/ta-recall/lib/tool-line.d.ts +10 -0
  362. package/dist/pi/packages/ta-recall/lib/tool-line.js +23 -0
  363. package/dist/pi/packages/ta-recall/lib/tool.d.ts +63 -0
  364. package/dist/pi/packages/ta-recall/lib/tool.js +71 -0
  365. package/dist/pi/packages/ta-recall/package.json +55 -0
  366. package/dist/pi/packages/ta-recall/web/index.js +1038 -0
  367. package/dist/pi/packages/ta-rooms/README.en.md +23 -0
  368. package/dist/pi/packages/ta-rooms/README.md +23 -0
  369. package/dist/pi/packages/ta-rooms/lib/dialogs.d.ts +39 -0
  370. package/dist/pi/packages/ta-rooms/lib/dialogs.js +235 -0
  371. package/dist/pi/packages/ta-rooms/lib/i18n.d.ts +101 -0
  372. package/dist/pi/packages/ta-rooms/lib/i18n.js +203 -0
  373. package/dist/pi/packages/ta-rooms/lib/index.d.ts +9 -0
  374. package/dist/pi/packages/ta-rooms/lib/index.js +85 -0
  375. package/dist/pi/packages/ta-rooms/lib/members-view.d.ts +3 -0
  376. package/dist/pi/packages/ta-rooms/lib/members-view.js +64 -0
  377. package/dist/pi/packages/ta-rooms/lib/page.d.ts +105 -0
  378. package/dist/pi/packages/ta-rooms/lib/page.js +306 -0
  379. package/dist/pi/packages/ta-rooms/lib/react.d.ts +8 -0
  380. package/dist/pi/packages/ta-rooms/lib/react.js +8 -0
  381. package/dist/pi/packages/ta-rooms/lib/room-view.d.ts +17 -0
  382. package/dist/pi/packages/ta-rooms/lib/room-view.js +150 -0
  383. package/dist/pi/packages/ta-rooms/lib/rooms-page.d.ts +8 -0
  384. package/dist/pi/packages/ta-rooms/lib/rooms-page.js +174 -0
  385. package/dist/pi/packages/ta-rooms/lib/style.d.ts +4 -0
  386. package/dist/pi/packages/ta-rooms/lib/style.js +154 -0
  387. package/dist/pi/packages/ta-rooms/package.json +50 -0
  388. package/dist/pi/packages/ta-rooms/web/index.js +1932 -0
  389. package/dist/pi/packages/ta-share/README.en.md +27 -0
  390. package/dist/pi/packages/ta-share/README.md +27 -0
  391. package/dist/pi/packages/ta-share/extension/index.mjs +184 -0
  392. package/dist/pi/packages/ta-share/host/index.mjs +364 -0
  393. package/dist/pi/packages/ta-share/lib/extension.d.ts +15 -0
  394. package/dist/pi/packages/ta-share/lib/extension.js +115 -0
  395. package/dist/pi/packages/ta-share/lib/host.d.ts +4 -0
  396. package/dist/pi/packages/ta-share/lib/host.js +9 -0
  397. package/dist/pi/packages/ta-share/lib/i18n.d.ts +106 -0
  398. package/dist/pi/packages/ta-share/lib/i18n.js +213 -0
  399. package/dist/pi/packages/ta-share/lib/index.d.ts +9 -0
  400. package/dist/pi/packages/ta-share/lib/index.js +77 -0
  401. package/dist/pi/packages/ta-share/lib/page.d.ts +48 -0
  402. package/dist/pi/packages/ta-share/lib/page.js +105 -0
  403. package/dist/pi/packages/ta-share/lib/react.d.ts +8 -0
  404. package/dist/pi/packages/ta-share/lib/react.js +8 -0
  405. package/dist/pi/packages/ta-share/lib/server-texts.d.ts +14 -0
  406. package/dist/pi/packages/ta-share/lib/server-texts.js +52 -0
  407. package/dist/pi/packages/ta-share/lib/share-dialog.d.ts +18 -0
  408. package/dist/pi/packages/ta-share/lib/share-dialog.js +233 -0
  409. package/dist/pi/packages/ta-share/lib/share-protocol.d.ts +86 -0
  410. package/dist/pi/packages/ta-share/lib/share-protocol.js +30 -0
  411. package/dist/pi/packages/ta-share/lib/share-service.d.ts +50 -0
  412. package/dist/pi/packages/ta-share/lib/share-service.js +130 -0
  413. package/dist/pi/packages/ta-share/lib/shared-view.d.ts +18 -0
  414. package/dist/pi/packages/ta-share/lib/shared-view.js +225 -0
  415. package/dist/pi/packages/ta-share/lib/shares-page.d.ts +3 -0
  416. package/dist/pi/packages/ta-share/lib/shares-page.js +54 -0
  417. package/dist/pi/packages/ta-share/lib/snapshot.d.ts +30 -0
  418. package/dist/pi/packages/ta-share/lib/snapshot.js +195 -0
  419. package/dist/pi/packages/ta-share/lib/style.d.ts +4 -0
  420. package/dist/pi/packages/ta-share/lib/style.js +111 -0
  421. package/dist/pi/packages/ta-share/package.json +56 -0
  422. package/dist/pi/packages/ta-share/web/index.js +1197 -0
  423. package/dist/pi/packages/ta-workspace/README.md +1 -1
  424. package/dist/pi/packages/ta-workspace/README.zh-cn.md +1 -1
  425. package/dist/pi/packages/ta-workspace/lib/browser-common.d.ts +1 -1
  426. package/dist/pi/packages/ta-workspace/lib/browser-common.js +29 -30
  427. package/dist/pi/packages/ta-workspace/lib/browser-tool-line.d.ts +15 -0
  428. package/dist/pi/packages/ta-workspace/lib/browser-tool-line.js +70 -0
  429. package/dist/pi/packages/ta-workspace/lib/editors.js +29 -2
  430. package/dist/pi/packages/ta-workspace/lib/i18n.d.ts +13 -2
  431. package/dist/pi/packages/ta-workspace/lib/i18n.js +29 -7
  432. package/dist/pi/packages/ta-workspace/lib/index.js +2 -0
  433. package/dist/pi/packages/ta-workspace/lib/preview.d.ts +10 -1
  434. package/dist/pi/packages/ta-workspace/lib/preview.js +136 -11
  435. package/dist/pi/packages/ta-workspace/lib/style.d.ts +1 -1
  436. package/dist/pi/packages/ta-workspace/lib/style.js +56 -40
  437. package/dist/pi/packages/ta-workspace/lib/terminal-sessions.d.ts +15 -4
  438. package/dist/pi/packages/ta-workspace/lib/terminal-sessions.js +31 -9
  439. package/dist/pi/packages/ta-workspace/lib/terminal.d.ts +3 -2
  440. package/dist/pi/packages/ta-workspace/lib/terminal.js +51 -21
  441. package/dist/pi/packages/ta-workspace/lib/util/preview.d.ts +27 -0
  442. package/dist/pi/packages/ta-workspace/lib/util/preview.js +74 -0
  443. package/dist/pi/packages/ta-workspace/lib/util/terminal.d.ts +5 -0
  444. package/dist/pi/packages/ta-workspace/lib/util/terminal.js +14 -0
  445. package/dist/pi/packages/ta-workspace/package.json +1 -1
  446. package/dist/pi/packages/ta-workspace/web/index.js +823 -341
  447. package/dist/public/assets/OrbitControls-DVf70a7w.js +1 -0
  448. package/dist/public/assets/{abnfDiagram-S7VZAUFO-BmIko5tV.js → abnfDiagram-S7VZAUFO-D9uU0Tx2.js} +1 -1
  449. package/dist/public/assets/{architecture-WOLXFQ4H-XgsdQ7ul.js → architecture-WOLXFQ4H-f7Nm7EIo.js} +1 -1
  450. package/dist/public/assets/{architectureDiagram-YGSQEFNW--sVhMS03.js → architectureDiagram-YGSQEFNW-DSAqlcms.js} +1 -1
  451. package/dist/public/assets/{blockDiagram-APKKGZFW-8f9b-9k2.js → blockDiagram-APKKGZFW-C0lPIW9g.js} +1 -1
  452. package/dist/public/assets/{browser-DOHZ0JCf.js → browser-WLpgVYno.js} +1 -1
  453. package/dist/public/assets/{c4Diagram-KJ2TOQU5-CwYQ0Jfy.js → c4Diagram-KJ2TOQU5-CDcZ7mJq.js} +1 -1
  454. package/dist/public/assets/{chunk-6MUBBAK2-7Y9ezehi.js → chunk-6MUBBAK2-CXPuyqPL.js} +1 -1
  455. package/dist/public/assets/{chunk-AXFCVDMN-CZIH4pWz.js → chunk-AXFCVDMN-Du6JRX1x.js} +1 -1
  456. package/dist/public/assets/{chunk-BG4553SI-DsNATY2m.js → chunk-BG4553SI-D592E55X.js} +1 -1
  457. package/dist/public/assets/{chunk-DQASFODM-CoXkfYE-.js → chunk-DQASFODM-BW2r2SL4.js} +1 -1
  458. package/dist/public/assets/{chunk-HFQBQIA3-C5OLqki8.js → chunk-HFQBQIA3-C3yoe54R.js} +1 -1
  459. package/dist/public/assets/{chunk-KQLB2F66-DMHuYGEF.js → chunk-KQLB2F66-DF8gfYCy.js} +1 -1
  460. package/dist/public/assets/{chunk-KS47KZWR-BKeOttO1.js → chunk-KS47KZWR-C8CRMTv1.js} +1 -1
  461. package/dist/public/assets/{chunk-LEVMRMFU-D6zCwkk7.js → chunk-LEVMRMFU-BDcMKiwj.js} +1 -1
  462. package/dist/public/assets/{chunk-M57EVK23-B5-QqcZg.js → chunk-M57EVK23-CKJPBygc.js} +1 -1
  463. package/dist/public/assets/{chunk-OY52VR5R-DQrq3n0T.js → chunk-OY52VR5R-B3ZWH07L.js} +1 -1
  464. package/dist/public/assets/{chunk-QB3YPZ4I-j6ZT7EDR.js → chunk-QB3YPZ4I-DI-z4UPL.js} +1 -1
  465. package/dist/public/assets/{chunk-R3KSYZAL-D5MXUO36.js → chunk-R3KSYZAL-Bg4-haAc.js} +1 -1
  466. package/dist/public/assets/{chunk-STOXU5M4-DaBkw4dD.js → chunk-STOXU5M4-l_SHib3p.js} +1 -1
  467. package/dist/public/assets/{chunk-TU62E6Q5-vXcRfGci.js → chunk-TU62E6Q5-BINu9tIm.js} +1 -1
  468. package/dist/public/assets/{chunk-X4PVCEUW-CIh6H4Y2.js → chunk-X4PVCEUW-BQn-mvV5.js} +1 -1
  469. package/dist/public/assets/{chunk-XXDRQBXY-C_Vwv1FM.js → chunk-XXDRQBXY-uvpAu0Ys.js} +1 -1
  470. package/dist/public/assets/{classDiagram-v2-L25IHNXF-DccDWEJn.js → classDiagram-v2-L25IHNXF-BIowooW1.js} +1 -1
  471. package/dist/public/assets/{cose-bilkent-JH36ORCC-BX47lumZ.js → cose-bilkent-JH36ORCC-BTyx1Mh2.js} +1 -1
  472. package/dist/public/assets/cynefin-EF2NZ3EQ-Dg54eFzZ.js +1 -0
  473. package/dist/public/assets/{cynefinDiagram-L36ESFBY-BE6WOGxW.js → cynefinDiagram-L36ESFBY-D64EU9I0.js} +1 -1
  474. package/dist/public/assets/{d3-selection-ZcE6yRN5.js → d3-selection-CN9k6_B9.js} +1 -1
  475. package/dist/public/assets/{dagre-SPEB5RXH-CE6SOOcN.js → dagre-SPEB5RXH-FCbz2-Kk.js} +1 -1
  476. package/dist/public/assets/{diagram-3B7GL73J-xC8VtiYL.js → diagram-3B7GL73J-OhHUSI7j.js} +1 -1
  477. package/dist/public/assets/{diagram-DNEMPZML-4dmcBbjL.js → diagram-DNEMPZML-Be4xMtp6.js} +1 -1
  478. package/dist/public/assets/{diagram-L3MUGCDN-D14Yn3sQ.js → diagram-L3MUGCDN-CmKSs3aG.js} +1 -1
  479. package/dist/public/assets/{diagram-LA4NIPWU-GxSXIhsK.js → diagram-LA4NIPWU-D1C32rMN.js} +1 -1
  480. package/dist/public/assets/{diagram-MHCOC4E2-Cm7Prlpc.js → diagram-MHCOC4E2-BjoE6JXs.js} +1 -1
  481. package/dist/public/assets/{diagram-XPFHEONP-mkUnnKFu.js → diagram-XPFHEONP-B22k4v8R.js} +1 -1
  482. package/dist/public/assets/{dist-acJS-BlA.js → dist-DcBP8Cf6.js} +1 -1
  483. package/dist/public/assets/{ebnfDiagram-UZSYDL2S-m77ua3UQ.js → ebnfDiagram-UZSYDL2S-Tn-K8-X7.js} +1 -1
  484. package/dist/public/assets/{editor.api-CljTm-EQ.js → editor.api-Bz4sjRz_.js} +1 -1
  485. package/dist/public/assets/{elk-XV6XMXQE-DsQY1hw9.js → elk-XV6XMXQE-COnQsWlN.js} +1 -1
  486. package/dist/public/assets/{erDiagram-EYBAPDEH-CV8gJM0P.js → erDiagram-EYBAPDEH-c53dJilq.js} +1 -1
  487. package/dist/public/assets/{eventmodeling-K75KTNOO-C1pymbUr.js → eventmodeling-K75KTNOO-DaFpPPks.js} +1 -1
  488. package/dist/public/assets/flowDiagram-MALGAFMO-V5qkYWIO.js +1 -0
  489. package/dist/public/assets/{freemarker2-DYJXaMHN.js → freemarker2-BLxfRHsw.js} +1 -1
  490. package/dist/public/assets/{ganttDiagram-23REXITY-CppxOWRh.js → ganttDiagram-23REXITY-Md-SavIS.js} +1 -1
  491. package/dist/public/assets/gitGraph-VSP46ZUC-1q8ldRXU.js +1 -0
  492. package/dist/public/assets/{gitGraphDiagram-STJD7YCW-CrQrZhcP.js → gitGraphDiagram-STJD7YCW-CMSwTghO.js} +1 -1
  493. package/dist/public/assets/{handlebars-DZCnH9e2.js → handlebars-sNpu01kP.js} +1 -1
  494. package/dist/public/assets/{html-DuzouNES.js → html-C_tKd-uP.js} +1 -1
  495. package/dist/public/assets/{index-B7OYKvCE.js → index-Bn86rI4n.js} +2 -2
  496. package/dist/public/assets/info-OHQRW6UA-Crere6sx.js +1 -0
  497. package/dist/public/assets/{infoDiagram-KBXO4MBG-6pby19tQ.js → infoDiagram-KBXO4MBG-CwgNj-7i.js} +1 -1
  498. package/dist/public/assets/{ishikawaDiagram-M35NCXHK-Duf8c8rQ.js → ishikawaDiagram-M35NCXHK-BSlzQNMN.js} +1 -1
  499. package/dist/public/assets/{javascript-2d_L6cVd.js → javascript-l3qKw0L-.js} +1 -1
  500. package/dist/public/assets/{journeyDiagram-OPLOXDXO-Dvv-xzNo.js → journeyDiagram-OPLOXDXO-B09LPEnF.js} +1 -1
  501. package/dist/public/assets/{jsonMode-CFadYXyI.js → jsonMode-5SQQn1EX.js} +1 -1
  502. package/dist/public/assets/{kanban-definition-BZKZHSQY-Dsk6F-TT.js → kanban-definition-BZKZHSQY-BiW4aJ29.js} +1 -1
  503. package/dist/public/assets/{liquid-Din4CF34.js → liquid-BGyTIIUt.js} +1 -1
  504. package/dist/public/assets/{mdx-DivDuCWI.js → mdx-8tGjz4em.js} +1 -1
  505. package/dist/public/assets/{mermaid-parser.core-BfCv4CYZ.js → mermaid-parser.core-CctN5b0z.js} +3 -3
  506. package/dist/public/assets/{mermaid.core-DC20ZwJj.js → mermaid.core-7ERSdZ4-.js} +4 -4
  507. package/dist/public/assets/{mindmap-definition-I2QAS2VK-DRZRrJU_.js → mindmap-definition-I2QAS2VK-D-GOUwW1.js} +1 -1
  508. package/dist/public/assets/module-DEqsdd00.js +1 -0
  509. package/dist/public/assets/module-TWc52XwT.js +2244 -0
  510. package/dist/public/assets/{monaco-D1d6MOPe.js → monaco-B_9hlk78.js} +3 -3
  511. package/dist/public/assets/packet-JDAUHWVQ-qMf5LkHT.js +1 -0
  512. package/dist/public/assets/{pegDiagram-FD4XPPHP-DcGr3Tbk.js → pegDiagram-FD4XPPHP-Dmy1fWB3.js} +1 -1
  513. package/dist/public/assets/phaser.esm-BxCDEWDb.js +3202 -0
  514. package/dist/public/assets/pie-XZMESJXO-BjqLn4qm.js +1 -0
  515. package/dist/public/assets/{pieDiagram-J4AKIIQI-GF7pu6ch.js → pieDiagram-J4AKIIQI-CXFHLYTg.js} +1 -1
  516. package/dist/public/assets/{python-BQbTTTT5.js → python-e-JK0s5M.js} +1 -1
  517. package/dist/public/assets/{quadrantDiagram-XTYBLID2-D-bcu7Ey.js → quadrantDiagram-XTYBLID2-RQvEpGWO.js} +1 -1
  518. package/dist/public/assets/radar-ABXABTNO-DWO6t_4C.js +1 -0
  519. package/dist/public/assets/railroad-I3PHUGI6-D1XOJPWy.js +1 -0
  520. package/dist/public/assets/{railroad-abnf-LNEFI6M7-BiBHsI-K.js → railroad-abnf-LNEFI6M7-CDOSPZwX.js} +1 -1
  521. package/dist/public/assets/{railroad-ebnf-DWYD2UWJ-zKjrfkHs.js → railroad-ebnf-DWYD2UWJ-BTrNQ0DX.js} +1 -1
  522. package/dist/public/assets/{railroad-peg-JR7BVNR7-DKuVn0GT.js → railroad-peg-JR7BVNR7-B7NtVofS.js} +1 -1
  523. package/dist/public/assets/{railroadDiagram-MRQ6NCDL-Cyn-16mJ.js → railroadDiagram-MRQ6NCDL-DsDrT0Jf.js} +1 -1
  524. package/dist/public/assets/{razor-DiLk54O0.js → razor-DtSPwumi.js} +1 -1
  525. package/dist/public/assets/{requirementDiagram-Y7LWUY3S-CwU2EBkW.js → requirementDiagram-Y7LWUY3S-BQh0hFuA.js} +1 -1
  526. package/dist/public/assets/{sankeyDiagram-WGJFYUXA-ajf00HyW.js → sankeyDiagram-WGJFYUXA-BUXNAQEF.js} +1 -1
  527. package/dist/public/assets/{sequenceDiagram-5NDRBG5M-DiX_OIAw.js → sequenceDiagram-5NDRBG5M-05f-N5V_.js} +1 -1
  528. package/dist/public/assets/{stateDiagram-v2-FJ4FJNEA-CV5bRqB7.js → stateDiagram-v2-FJ4FJNEA-D6V1fGWV.js} +1 -1
  529. package/dist/public/assets/{swimlanes-UMQ2AFYF-BGQKSlj7.js → swimlanes-UMQ2AFYF-DWhlPvKs.js} +1 -1
  530. package/dist/public/assets/swimlanesDiagram-OMPLPG4O-CRn5uHsY.js +8 -0
  531. package/dist/public/assets/three.module-CeVBJVoU.js +4225 -0
  532. package/dist/public/assets/{timeline-definition-SEUHKTQE-DhQoApff.js → timeline-definition-SEUHKTQE-CMdocOui.js} +1 -1
  533. package/dist/public/assets/treeView-D4JQ5SDB-D09wHNzT.js +1 -0
  534. package/dist/public/assets/treemap-SAJKECNS-ChxAT7Fq.js +1 -0
  535. package/dist/public/assets/{typescript-COQ1g-up.js → typescript-65jNyipU.js} +1 -1
  536. package/dist/public/assets/{usecaseDiagram-AFA6YXN4-CmLFzjie.js → usecaseDiagram-AFA6YXN4-BQTHUX1f.js} +1 -1
  537. package/dist/public/assets/{vennDiagram-NNMJR3RB-DOa6JR5K.js → vennDiagram-NNMJR3RB-BULkVTfA.js} +1 -1
  538. package/dist/public/assets/wardley-7MLQ67FV-DfSjKzbJ.js +1 -0
  539. package/dist/public/assets/{wardleyDiagram-S7YFUSEH-BV7EEShp.js → wardleyDiagram-S7YFUSEH-Cek6l8lz.js} +1 -1
  540. package/dist/public/assets/{xml-BbvtjuaG.js → xml-DWBejfu-.js} +1 -1
  541. package/dist/public/assets/{xychartDiagram-GGNKY7IX-DtMpPbsq.js → xychartDiagram-GGNKY7IX-ujnZQTWA.js} +1 -1
  542. package/dist/public/assets/{yaml-Bw8NFga9.js → yaml-CwRCT7q1.js} +1 -1
  543. package/dist/public/index.html +1 -1
  544. package/dist/serve/index.mjs +5853 -2164
  545. package/package.json +32 -25
  546. package/dist/public/assets/cynefin-EF2NZ3EQ-MaI-3dMQ.js +0 -1
  547. package/dist/public/assets/flowDiagram-MALGAFMO-shBnAQFk.js +0 -1
  548. package/dist/public/assets/gitGraph-VSP46ZUC-BtQWboBz.js +0 -1
  549. package/dist/public/assets/info-OHQRW6UA-CDSLjba_.js +0 -1
  550. package/dist/public/assets/module-BAQaY56j.js +0 -1
  551. package/dist/public/assets/module-DxRGg3ED.js +0 -1947
  552. package/dist/public/assets/packet-JDAUHWVQ-dYb4P9eU.js +0 -1
  553. package/dist/public/assets/pie-XZMESJXO-CIompBnc.js +0 -1
  554. package/dist/public/assets/radar-ABXABTNO-DiJl7BtK.js +0 -1
  555. package/dist/public/assets/railroad-I3PHUGI6-B5cRBukM.js +0 -1
  556. package/dist/public/assets/swimlanesDiagram-OMPLPG4O-DxXlavVT.js +0 -8
  557. package/dist/public/assets/treeView-D4JQ5SDB-BOP6mkZC.js +0 -1
  558. package/dist/public/assets/treemap-SAJKECNS-BJxuPMz3.js +0 -1
  559. package/dist/public/assets/wardley-7MLQ67FV-jqlowjVL.js +0 -1
@@ -20,7 +20,7 @@ A small tool for now, which the user wants to use for a while rather than keep (
20
20
  web.js the web extension, if the package shows something on the web page
21
21
  ```
22
22
 
23
- List in `pi` only the parts that exist. A web extension with only pages, used now and then, can start when one of them opens rather than with the page: `"webActivation": "open"` in `pi` (temporary ones always do); it is then in Quick open, not in the navigation, and what else it registers is there only while it runs. Also give `pi` what the user reads in the lists of extensions, in the user's language and English: `"title": {"en": "Timer", "zh-CN": "计时器"}`, `"summary"` (one sentence: what it does and where it shows), and `"icon"`, the name of one of `pi.ui.icons`. The pi extension is an ordinary pi extension: read pi's extension documentation (its path is in your instructions) before writing one.
23
+ List in `pi` only the parts that exist. A web extension with only pages, used now and then, can start when one of them opens rather than with the page: `"webActivation": "open"` in `pi` (temporary ones always do); it is then in Quick open, not in the navigation, and what else it registers is there only while it runs. Also give `pi` what the user reads in the lists of extensions, in the user's language and English: `"title": {"en": "Timer", "zh-CN": "计时器"}`, `"summary"` (one sentence: what it does and where it shows), and `"icon"`, the name of one of `pi.ui.icons`; `"category": "game"` for a game, which the Games page then lists (instead of Discover or the navigation). A package whose page lists the extensions of a kind says so: `"lists": ["<kind>"]`, and those are then found only there and in Quick open. Its commands and skills keep their description in English, which pi and the model read; the `/` menu shows them in the user's language from `"descriptions"`, by the name in the menu: `{"standup": {"zh-CN": "汇总今天的进展"}, "skill:standup": {"zh-CN": "…"}}`. The pi extension is an ordinary pi extension: read pi's extension documentation (its path is in your instructions) before writing one.
24
24
 
25
25
  ## The web extension
26
26
 
@@ -45,39 +45,50 @@ export default function (pi) {
45
45
 
46
46
  - `React`: the React of the page. Use it for components and hooks; never bring another.
47
47
  - `ui.setWidget(key, Component, options?)`: a widget. `options.placement` is `'aboveEditor'` (default) or `'belowEditor'`, around the message box as in pi, or `'panel'`, a card in the cards tab of the workbench on the right (it opens when the first card comes): the place for what stays in view, like a timer or a list; `options.title` titles a card. `setWidget(key, undefined)` removes it.
48
- - `registerView(name, { title, render, icon?, location?, order?, head?, pages?, menu? })`: a view of its own; `render` is a component, `icon` a component that draws an icon of `size` pixels in `currentColor` (take one of `ui.icons`). `location: 'page'` (default) fills the main area, with an icon in the navigation on the left; `'sidebar'` is a list of the sidebar: its icon is at the top of the navigation, above the one of the chats (a tab at the bottom of a phone, before the chats), and it fills the sidebar when picked; `'panel'` is a tool of the workbench beside the conversation, as the explorer or the terminal of an IDE: the workbench's `+` and its empty state list it, and it opens as one of its tabs. `'board'` is a card of the board, which a phone brings out with a swipe to the left over its first tab (a button of the navigation elsewhere), for what is good to see at a glance (what runs, what is next): the user takes cards off, puts them back and orders them; render a few lines, no title. `'launcher'` is a section of Quick open, under Recent and Mine. A `sidebar` or `panel` view gets a title and scrolling: render only the content. `order` sorts the views, smaller first (default 100). `head` is a component for the top bar in place of the title: for a `sidebar` view, the row at the top of the sidebar (a search, a button to add), or the middle of a page's bar beside the menu and the workbench button. `pages`, on a `sidebar` view, lists the pages it leads to (ids `<package name>/<view name>`; `assistant/assistant` is the double): the navigation leaves them out. `menu`, on a page, returns its actions as sections of `{ key, label, icon?, disabled?, danger?, run }`; it is called each time the menu opens, and the sidebar view that lists the page draws it as a … on hover.
48
+ - `registerView(name, { title, render, icon?, location?, order?, head?, pages?, menu? })`: a view of its own; `render` is a component, `icon` a component that draws an icon of `size` pixels in `currentColor` (take one of `ui.icons`). `location: 'page'` (default) fills the main area, with an icon in the navigation on the left; `'sidebar'` is a list of the sidebar: its icon is at the top of the navigation, above the one of the chats (a tab at the bottom of a phone, before the chats), and it fills the sidebar when picked; `'panel'` is a tool of the workbench beside the conversation, as the explorer or the terminal of an IDE: the workbench's `+` and its empty state list it, and it opens as one of its tabs. `'board'` is a card of the board, which a phone brings out with a swipe to the left over its first tab (a button of the navigation elsewhere), for what is good to see at a glance (what runs, what is next): the user takes cards off, puts them back and orders them; render a few lines, no title. `'launcher'` is a section of Quick open, under Recent and Mine. A `sidebar` or `panel` view gets a title and scrolling: render only the content; a `page` scrolls itself (its root `{ height: '100%', overflowY: 'auto' }` when it can be taller than the window). `order` sorts the views, smaller first (default 100). `head` is a component for the top bar in place of the title: for a `sidebar` view, the row at the top of the sidebar (a search, a button to add), or the middle of a page's bar beside the menu and the workbench button. `pages`, on a `sidebar` view, lists the pages it leads to (ids `<package name>/<view name>`; `assistant/assistant` is the double): the navigation leaves them out. `menu`, on a page, returns its actions as sections of `{ key, label, icon?, disabled?, danger?, run }`; it is called each time the menu opens, and the sidebar view that lists the page draws it as a … on hover.
49
49
  - `registerMessageRenderer(customType, Component)`: shows the messages the pi extension sends with `pi.sendMessage({ customType, content, display: true, details })`; the component gets `{ message }`, `message.details` holds the data.
50
+ - `registerCodeRenderer(language, Component)`: draws the fenced blocks of that language (` ```name `) in replies and in `ui.Markdown`, as a card of the package's own: the component gets `{ code, language, closed }`, `closed` false while the reply still streams the block (the code may stop anywhere); when it throws, the block shows as code. The way to have the model show something rather than write it: tell it in a `<ta-…>` section of the system prompt (`before_agent_start` of the pi extension) to write such a block, as `@celljs/ta-glance` does with `ta-glance`. Newer than some Ta apps: `pi.registerCodeRenderer?.(…)`.
50
51
  - `registerTool({ name, description, parameters, execute(toolCallId, params) })`: a tool the model can call in the conversations the page opens, which runs in the browser; `parameters` is a JSON schema of an object; `execute` returns the text the model reads, or throws.
51
- - `registerOpener(link => boolean)`: opens what links of replies point to: `{ type: 'file', cwd, path, selection? }` (`selection` is `{ startLine, startColumn?, endLine?, endColumn? }`, from 1), `{ type: 'directory', cwd, path }` or `{ type: 'url', url }`; return `true` when it opened it, else the next opener is asked. @celljs/ta-workspace opens files, directories and pages already; register one only for links the package shows its own way.
52
- - `registerComposerAddon({ actions?(conversation), above?, subscribe?(listener) })`: adds to the message box of every conversation (the double's, an agent's, any other): `actions` gives a section of entries of its + menu (`{ key, label, icon?, detail?, run() }`, or `items` for a list shown in its place, entries with `checked` and `group`); `above` is a component drawn above the box with `{ conversation }`; `subscribe` tells the boxes to read `actions` again. `conversation` is `{ sessionId, sessionFile?, cwd?, kind: 'double' | 'chat', group?, title? }`.
52
+ - `registerToolRenderer((toolName, next) => renderer | undefined)`: how calls of tools read in conversations, as pi's `registerToolRenderer` does in a terminal; for the tools of the package's pi extension, of `registerTool`, or any other. `renderer.renderCall(args)` returns `{ verb, target?, code?, icon? }`: the verb in the language of the page (`ui.language`), what it is on, `code` for a command set in monospace, `icon` a component drawn at `size` pixels before the target (keep one component per target, not a new one each call). Without one a tool shows its name. `next()` is what the resolvers after it would use: return `next()` for the tools that are not yours.
53
+ - `registerOpener(link => boolean)`: opens what links of replies point to: `{ type: 'file', cwd, path, selection? }` (`selection` is `{ startLine, startColumn?, endLine?, endColumn? }`, from 1), `{ type: 'directory', cwd, path }` or `{ type: 'url', url }`; return `true` when it opened it, else the next opener is asked. @celljs/ta-workspace opens files, directories and pages already; register one only for links the package shows its own way. `registerOpener(opener, { specific: true })` is for links of its own kind only (a link of a share): it is asked first, and also for a link that goes out of Ta (scanned, opened with Cmd or Ctrl, pasted in Quick open).
54
+ - `registerSessionMenu(session => items)`: entries of the menu of a conversation in a list (a right click or a held finger on its row), `session` being `{ sessionId?, sessionFile?, cwd, title, group? }`; items `{ key, label, icon?, disabled?, danger?, run }`. `ui.custom(({ close }) => …)` shows a component of the extension over the page wherever the user is, as pi's `ctx.ui.custom`: draw a `ui.Dialog` in it; it returns a function that takes it away. Both are newer than some Ta apps: `pi.registerSessionMenu?.(…)`, `pi.ui.custom ?? fallback`.
55
+ - `registerComposerAddon({ actions?(conversation), above?, subscribe?(listener) })`: adds to the message box of every conversation (the double's, an agent's, any other): `actions` gives entries of its + menu (`{ key, label, icon?, detail?, run() }`, or `items` for a list shown in its place, entries with `checked` and `group`). Every entry is a tile of the menu's grid, four by two a page that swipes sideways, so more entries never make the menu taller: an icon above a short label (2 to 6 characters in Chinese; a longer one goes in `title`, and `detail` shows on hover only). A setting of the conversation has `setting: true` and its value as `detail`, shown under the label; one that is on or off has `toggle: true` and `checked` (its icon lit, on or off under it; the menu stays open); `above` is a component drawn above the box with `{ conversation }`; `subscribe` tells the boxes to read `actions` again. `conversation` is `{ sessionId, sessionFile?, cwd?, kind: 'double' | 'chat', group?, title? }`.
56
+ - `registerChatIcon({ icon(chat), subscribe?(listener) })`: an icon for conversations of the package that are no agent (a brief it writes, a question it asks), by `chat.sessionFile`: `{ icon, tint?, archiveDays? }` (`archiveDays`: archived sooner than the user's setting, for a question asked in passing), a tile in the lists and on their notices in place of the letter of the directory; answer at once from what the extension holds, and call the listener when that changes. Newer than some Ta apps: `pi.registerChatIcon?.(…)`.
57
+ - `registerHomeItems({ items(), subscribe(listener) })`: rows of the double's home, under the double (`{ id, title, detail?, icon, tint?, at?, unseen?, open() }`), for what the user looks at each day (a daily brief): not tasks (`registerTasks`) nor a conversation of the lists alone; `unseen` is the amber dot of a row. The page lists them with `ui.useHomeItems()`. `ui.pinChat(sessionFile, pinned?)` pins a conversation the extension made to the top of the lists, once (the user may unpin it). Both newer than some Ta apps: `pi.registerHomeItems?.(…)`, `pi.ui.pinChat?.(…)`.
53
58
  - `registerSettings({ title, icon?, rows })`: a section of Ta's settings, after its own, for what the user sets once (a model the extension uses, a choice it makes); `rows` are `{ key, label, description?, render, stacked? }`, `render` the component of the control (beside the label, under it with `stacked`), its value kept with `storage`. Do not add one for what a page of the extension shows anyway.
54
59
  - `on(type, handler)`: events of the conversation shown, as pi sends them (`agent_start`, `agent_end`, `message_end`, `tool_execution_end`, ...).
55
60
  - `sendUserMessage(text)`: sends a message to the conversation shown as if the user typed it; `'/name args'` runs a command of a pi extension.
56
61
  - `switchSession(sessionId, opening?)`: shows another open session of ta serve (an id of `server.listSessions()`) as the conversation; on a phone the drawer closes. Pass a promise of the id for a session still opening (`{ title, cwd }` in `opening` says what it is): it is in front at once, showing that it opens, so a click never waits on the server.
57
62
  - `reloadExtensions()`: after the extension installed, imported, turned on or off (`packages.setPackageEnabled(id, enabled)`) or removed a package itself (`packages.installPackage`, `packages.removePackage`), loads the web extensions and the pi extensions of the conversation again, as the end of a reply does. `packages.listPackages()` lists every package Ta loads, with what each holds.
58
63
  - `ui.notify(message, type?)`: a short notice; `type` is `'info'`, `'warning'` or `'error'`. `ui.confirm(title, message?, { confirmLabel?, danger? })` asks before going ahead and resolves with the answer; `danger` for what cannot be undone.
64
+ - `ui.notifySession({ key, sessionId?, sessionFile?, cwd?, level, text, options?, actions? })`: tells the user what a conversation said, as a messenger tells of a message; `level` is `'ask'` (it needs them), `'failed'` or `'done'`. The page decides how: nothing while they look at that conversation (nor for a task the double follows, unless it asks), on a phone or a tablet nothing pops up (the unread dots of the list and of the Chats tab tell), on a computer a banner with its face and name while the page is in front (a tap opens it; `options` are answers sent as their message, once from whichever page), a notice of the system otherwise. Give each piece of news one `key` on every page; call it with `?.` for an older Ta app. The built-in `ta-notify` already tells of every turn, failure, dialog and `notify_user`: use this only for news of your own.
59
65
  - `ui.input(title, placeholder?, { value? })` and `ui.editor(title, prefill?)`: ask for one line or several, as pi's; they resolve with the text, or `undefined` when the user cancelled.
60
66
  - `ui.openEditor({ id, title, render, icon?, onClose? }, { preview?, preserveFocus? })`: a tab beside the conversation, for a file, a diff, a page or anything to read at length; opening an id that is open shows it again. With `preview` (a single click), the next preview takes its place until it is kept (`ui.pinEditor(id)`, or a double click on it). `ui.setEditorDirty(id, dirty)` marks it changed and not saved: the user is asked before it closes. `ui.closeEditor(id)` closes it; `onClose` runs when the user does. `ui.useActiveEditor()`: a React hook, the id of the tab shown.
61
67
  - `ui.CodeEditor` (`{ path, value, readOnly?, line?, column?, endColumn?, selection?, onChange?, onSave? }`; `selection`, `{ startLine, startColumn?, endLine?, endColumn? }`, selects those lines and shows them in the middle) and `ui.DiffEditor` (`{ path, original, modified, inline?, readOnly?, onChange?, onSave?, onDiff? }`): Monaco, bundled with the page, for the text of a file and the change between two texts.
68
+ - `ui.Game` (`{ config(Phaser, page), onReady?(game) }`) and `ui.Game3D` (`{ setup(context), onReady?(context) }`): a game on Phaser 4 or a 3D one on Three.js, the game engines of the page; read the ta-game skill before making one. An element that takes the touches that start on it (a canvas to draw on, a joystick; a game has it already) carries the attribute `data-own-gestures`: Ta's slides then start only from an edge of the screen there, and a held finger opens no menu. `ui.FullScreen` (`{ children, className?, style? }`) covers all of the page while it is mounted, the shell and the notch too (pad what you draw by `env(safe-area-inset-*)`), above the keyboard; its touches are all its own, even at an edge, so give the user a button out. Mount it once around what it shows, not around a toggle (its children would start again), and write `pi.ui.FullScreen ?? Fallback` for an app older than it.
62
69
  - `ui.createTerminal({ cols?, rows?, cwd? })`: a terminal as VS Code's (xterm.js on WebGL, in the page's theme), loaded the first time one is made; URLs and paths of files in it (`src/a.ts:10:5`) open with Cmd or Ctrl + click, paths from `cwd` or the directory the shell reports (OSC 7): `write(data)` the program's output, `onData(listener)` what the user types, `onResize(listener)` its new size in characters, `attach(element)` shows it in an element with a size and `position: relative` (returns the function that takes it out; it keeps its screen meanwhile), `focus()`, `dispose()`. `pi.terminals` runs a shell of the server behind it.
70
+ - `ui.useDevice()`: a React hook, where the page runs: `{ layout, touch, handheld, keyboard }`, `layout` being `'compact'` (a phone, a narrow window: the navigation a drawer, the workbench over the conversation), `'medium'` or `'expanded'`; `touch` a finger, `handheld` a phone, `keyboard` the on-screen keyboard open. The root carries the same as `data-layout`, `data-touch`, `data-handheld` and `data-keyboard`, for styles (`:root[data-handheld] .my-row { … }`). Adapt how things look by these, never by a width, `matchMedia` or a user agent of your own.
71
+ - What only some devices have: `ui.scanCode` and `ui.scan` only in the Ta app on a phone; `ui.desktop` (the file manager, the user's browsers), `ui.debugWebview` and `ui.supportsWebview` only in Ta Desktop; elsewhere they are `undefined` (`supportsWebview` false). A package loads on every device, so check for what it needs where it uses it (`pi.ui.scanCode && h(ScanButton)`) and let the rest work without it. Register views, widgets and settings on every device and let their components draw what fits: the function of the extension runs once, and a window is resized, a tablet turns, so what it registered by the layout of that moment would stay wrong. Register a tool only where what it runs on is there (`if (pi.ui.scanCode) pi.registerTool(…)`), and say in its description what it needs: a conversation keeps the tools of the page that opened it, and a call of one waits until a page that has the tool is in the conversation.
63
72
  - `ui.useCwd()`: a React hook, the directory of the conversation shown; the default directory while a page, Discover or the lists of a phone are in front. `ui.useSessionId()`: the session of the conversation shown.
64
73
  - `ui.showView(id)`: shows a view of any extension by its id, a page in the main area or a workbench tool as its tab; `''` shows the conversation again. `ui.useView(id)`: a React hook, `{ title, location, shown, menu? }` while that view is loaded, else `undefined`.
65
- - `ui.Composer`: the message box of every conversation, `{ placeholder?, onSend(text), mentions?, mentionLabel?, actions? }`: `mentions` (`{ name, detail? }[]`) is what `@` lists; `actions` are sections of its + menu, entries `{ key, label, icon?, detail?, insert? | run() }` (`insert` puts text at the caret). Use it for any conversation an extension shows, rather than a box of its own. `ui.Markdown` (`{ text }`) renders messages as the conversations do. `ui.Empty` (`{ title, hint?, compact?, tone?, picture?, children? }`) is what an empty list or view shows, as Ta's own lists: a short title without a full stop, at most one quieter hint, centered in its parent (a column of flex); `compact` in a menu, picker or dialog; `picture` above it where seeing what will be there helps (a first page, a list the user fills). Use it rather than text of your own. `ui.Picture` (`{ width?, height?, frame?, className?, children }`, 160 by 96 in a rounded frame unless told) is a small picture as Ta's own: draw a few `rect`, `circle`, `path` and `text` in it with the classes `ta-pic-pane` (a surface), `ta-pic-line` (a bar of text), `ta-pic-box` (an outline), `ta-pic-accent` (what it is about), `ta-pic-mark` (green), `ta-pic-soft` (half of it), `ta-pic-dot`, `ta-pic-bad` (red), `ta-pic-path` (a dashed way), `ta-pic-stroke` (a green line), `ta-pic-tick` (a line on green) and `ta-pic-text` (code), never colors of your own, so it follows the theme. `ui.PictureCards` (`{ cards, columns?, compactColumns? }`, cards `{ key, picture, label, hint?, title?, disabled?, onPick() }`) is a row of them to pick from, as the suggestions of an empty conversation. `ui.Dialog` (`{ title, onClose, children }`) is a dialog over the whole page, as Ta's own: use it to make or change things rather than a form in a sidebar.
66
- - `ui.usePages()`: a React hook, every page there is (`{ id, extension, title, icon?, state, onOpen, place, usedAt?, source?, temporary? }`), what Quick open lists; `ui.stopExtension(name)` stops one that started on open, `ui.forgetPage(id)` takes one out of Recent. `openTemporary(source, 'link')` opens a package of npm or Git without installing it and shows its first page: ask the user first. `ui.useContextMenu()`: a React hook, `[menu, open]`: render `menu`, and call `open(event, sections)` from `onContextMenu` (a long press on a touch screen is one), sections of `{ key, label, icon?, disabled?, danger?, run }`. `ui.shareExtension({ title, source?, packageId? })` opens Ta's dialog that shares an extension (a link and its QR code), `ui.openShared(text)` opens such a link after asking, and `registerSearch({ key, title, order?, remote?, search(query, offset), subscribe? })` adds a section to the search of Quick open (entries `{ key, title, detail?, icon?, tint?, action?, open(), menu? }`). `ui.QrCode` (`{ text }`) draws a QR code; `ui.ImageViewer` (`{ src, alt?, className?, onLoad?, onBackground? }`) shows a picture to zoom and drag, as the previews of the workbench do (it fills a column of flex); `ui.scanCode?.(instructions)`, only in the Ta app, scans one with the camera.
74
+ - `ui.Composer`: the message box of every conversation, with its microphone and its hold to talk, `{ placeholder?, onSend(text), mentions?, mentionLabel?, actions?, voiceSends?, onTalkSent?(), onListening?(listening), working?, onStop?(), after? }`: `mentions` (`{ name, detail? }[]`) is what `@` lists; `actions` are sections of its + menu, entries `{ key, label, icon?, detail?, setting?, toggle?, checked?, insert? | run() }` (`insert` puts text at the caret; tiles, `setting` and `toggle` as above). As the double's box: `voiceSends` sends what the microphone hears at once, `onTalkSent` says a message was said by voice (read its answer aloud with `ui.voice`), `onListening` says the user talks now, `working` makes the send button stop (`onStop`) while nothing is typed, `after` are buttons of the page before the microphone. Use it for any conversation an extension shows, rather than a box of its own. `ui.HoldToTalk` (`{ onSend(text), onEdit?(text), hints?, title?, className?, children }`) is a button held to talk, as the bar of the message box: the page dims and listens with its own recognizer (the app's on iOS), 取消 and 编辑 to slide onto; it renders nothing where the page cannot listen. `ui.voice` (`canListen()`, `canSpeak()`, `speak(text, onEnd?)`, `hush()`) reads aloud in the voice of the settings. Never a `SpeechRecognition` or `speechSynthesis` of your own. A page that is a conversation may take a message from another extension: `ui.useView(id).send?.(text)` (the double's page, `assistant/assistant`, has it; its answer comes as the view's `preview`). `ui.Markdown` (`{ text }`) renders messages as the conversations do. `ui.Empty` (`{ title, hint?, compact?, tone?, picture?, children? }`) is what an empty list or view shows, as Ta's own lists: a short title without a full stop, at most one quieter hint, centered in its parent (a column of flex); `compact` in a menu, picker or dialog; `picture` above it where seeing what will be there helps (a first page, a list the user fills). Use it rather than text of your own. `ui.Picture` (`{ width?, height?, frame?, className?, children }`, 160 by 96 in a rounded frame unless told) is a small picture as Ta's own: draw a few `rect`, `circle`, `path` and `text` in it with the classes `ta-pic-pane` (a surface), `ta-pic-line` (a bar of text), `ta-pic-box` (an outline), `ta-pic-accent` (what it is about), `ta-pic-mark` (green), `ta-pic-soft` (half of it), `ta-pic-dot`, `ta-pic-bad` (red), `ta-pic-path` (a dashed way), `ta-pic-stroke` (a green line), `ta-pic-tick` (a line on green) and `ta-pic-text` (code), never colors of your own, so it follows the theme. `ui.PictureCards` (`{ cards, columns?, compactColumns? }`, cards `{ key, picture, label, hint?, title?, disabled?, onPick() }`) is a row of them to pick from, as the suggestions of an empty conversation. `ui.Dialog` (`{ title, onClose, children }`) is a dialog over the whole page, as Ta's own: use it to make or change things rather than a form in a sidebar.
75
+ - `ui.usePages()`: a React hook, every page there is (`{ id, extension, title, icon?, state, onOpen, place, usedAt?, source?, temporary? }`), what Quick open lists; `ui.stopExtension(name)` stops one that started on open, `ui.forgetPage(id)` takes one out of Recent. `openTemporary(source, 'link')` opens a package of npm or Git without installing it and shows its first page: ask the user first. `ui.useContextMenu()`: a React hook, `[menu, open]`: render `menu`, and call `open(event, sections)` from `onContextMenu` (a long press on a touch screen is one), sections of `{ key, label, icon?, disabled?, danger?, run }`. `ui.shareExtension({ title, source?, packageId? })` opens Ta's dialog that shares an extension (a link and its QR code), `ui.openShared(text)` opens such a link after asking, and `registerSearch({ key, title, order?, remote?, search(query, offset), subscribe? })` adds a section to the search of Quick open (entries `{ key, title, detail?, icon?, tint?, action?, open(), menu? }`). `ui.QrCode` (`{ text }`) draws a QR code; `ui.ImageViewer` (`{ src, alt?, className?, onLoad?, onBackground?, onPrevious?, onNext?, autoFocus? }`) shows a picture to zoom and drag, as the previews of the workbench do (it fills a column of flex; `onPrevious` / `onNext` go to the pictures beside it, by side buttons and ← →); `ui.scanCode?.(instructions)`, only in the Ta app, scans one with the camera; `ui.scan?.()` is the Scan of the page itself (Discover, the + of the first list), which opens what the code carries (a computer, a link of an extension, a page, text to copy).
76
+ - What waits on ta serve says so, so that the user sees the click took: `ui.useBusy()`, a React hook, `[busy, run]`; `run(action)` stays busy until what `action` returns settles and runs nothing else meanwhile (a second click). Mark what waits with the page's classes, which show it only once it took a moment: `ta-busy` on a button with `<span className="ta-spinner ta-busy-mark" />` in it (add `ta-on-brand` on a button of the brand's color), `ta-pending` on a row being taken away, `<span className="ta-spinner ta-later" />` for a spinner of its own. `ui.Switch` (`{ checked, onChange, label, disabled? }`) is the page's switch: an `onChange` that returns a promise moves it at once, its knob turning until done. Both are newer than some Ta apps: `(pi.ui.useBusy ?? fallback)()`, `pi.ui.Switch ?? fallback`.
67
77
  - `ui.Avatar`: Ta's avatar, the Cell logo, as a component `{ size?, mood?, mark? }`; `mark`, one or two characters, tells agents apart. Use it wherever Ta speaks, and draw Ta no other way.
68
78
  - `ui.icons`: the lucide icons of the page by name (`Plus`, `Hash`, `Search`, `Files`, ...): a web extension cannot import them. Check for one before using it: the list only grows.
69
79
  - `storage.get(key)` and `storage.set(key, value)`: small JSON values kept on the server for the package, so they stay across browsers and devices; setting `null` removes a key. A package keeps at most 4 MB there. `storage.onChange(keys => ...)` hears keys changed by other pages or the server. `storage.directory(cwd)` has the same methods for values of one directory (use `ui.useCwd()`), such as the folders open in a tree: keep there what belongs to a directory, and in `storage` what belongs to the user.
70
80
  - `ui.theme` (`'light'` or `'dark'`) and `ui.language` (`'zh-CN'` or `'en-US'`): write the words of the extension in the language of the page.
71
81
  - `files`: the bytes of a file, for what the page cannot load by URL. `files.byUrl` is false when the page is not served by ta serve itself (the app on a phone, a page through a relay): then a URL of `workspace.fileUrl` (an image, a page) does not load, and `files.read(url)` gives `{ type, size, data }` instead — over the WebSocket, sealed end to end. Use it for pictures and pages of the workspace that must show anywhere.
72
82
  - The services of ta serve, for what the rest cannot do, all on its one connection: `server` (sessions: the commands of pi's RPC mode, `listSessions`, `openSession`, `prompt`, ...), `workspace` (files and programs of a directory: `listDirectory`, `readFile`, `writeFile`, `fileUrl`, `findFiles`, `runCommand`), `terminals` (`openTerminal`, `writeTerminal`, ...; output by `onTerminalData`) and `packages` (`listPackages`, `installPackage`, `removePackage`, and for temporary packages `openTemporaryPackage`, `updateTemporaryPackage`, `installTemporaryPackage`).
83
+ - `rooms`: rooms shared with other Ta through the relay, end to end (docs/design/ta-link.md 3), for playing or working together: `createRoom({ kind, title, view? })` (`kind` your own, to find your rooms by; `view` the page "Open" shows), `invite(room)` (a link and, with `ui.QrCode`, its code; the owner only), `join(link)` (ask the user first: it only asks the owner, who answers in their own Ta), `listRooms()` (`{ id, kind, title, owner, status, connected, members: [{ member, name, online, self, owner }] }`), `send(room, data, to?)` (JSON, 64 KB, to every other member or one), `getState(room)` and `setState(room, key, value, version?)` (with `version`, only if it is still that one: `{ ok, version }`; read again and set again when `ok` is false), `leave(room)`. `onRoomEvent(event => …, { messages? })` hears `message`, `state`, `request` and `rooms` (read the list again); pass `messages: false` where you only list rooms. Never call `answer` but on the user's word: the Rooms page (@celljs/ta-rooms) asks them. Newer than some Ta apps: `pi.rooms?.…`, `pi.onRoomEvent?.(…)`.
73
84
 
74
- Look like the page: inherit its font, and use its colors through CSS variables, which follow the light and dark theme: `var(--ta-text)`, `var(--ta-secondary)`, `var(--ta-muted)`, `var(--ta-card)`, `var(--ta-raised)`, `var(--ta-border)`, `var(--ta-accent)`, `var(--ta-red)`. Radius 8px for controls. Write a font size in px as `calc(13px * var(--ta-font-scale))` (a line height in px too), so that it follows the font size of the settings; the messages of a conversation and its field carry the class `ta-conversation`, which adds the font size of conversations. Keep data the extension must remember with `pi.storage`; `localStorage` only for what belongs to one browser, under keys that start with the package name.
85
+ Look like the page: inherit its font, and use its colors through CSS variables, which follow the light and dark theme: `var(--ta-text)`, `var(--ta-secondary)`, `var(--ta-muted)`, `var(--ta-card)`, `var(--ta-raised)`, `var(--ta-border)`, `var(--ta-accent)`, `var(--ta-red)`; a tile or a letter in a color of its own as `var(--ta-tint-<n>)` under `var(--ta-tint-ink-<n>)`, with `<n>` from 0 to 8 (taken from the colors of the agents' faces: blue, red, yellow, green, orange, violet, teal, pink, sky). Radius 8px for controls. A button is the page's: 32px high, `1px solid var(--ta-border)`, transparent, `font-weight: 500`; a segmented control a track of `var(--ta-raised)` with its chosen segment on `var(--ta-segment)`. Write a font size in px as `calc(13px * var(--ta-font-scale))` (a line height in px too), so that it follows the font size of the settings; the messages of a conversation and its field carry the class `ta-conversation`, which adds the font size of conversations. Keep data the extension must remember with `pi.storage`; `localStorage` only for what belongs to one browser, under keys that start with the package name.
75
86
 
76
87
  The two halves talk through the conversation: the web extension sends `/command args` with `sendUserMessage`; the pi extension answers with `pi.sendMessage` and a `customType` the web extension renders.
77
88
 
78
89
  ## Packages that come with Ta
79
90
 
80
- Ta comes with some packages of its own, which are on until the user turns them off in Settings → Extensions: `@celljs/ta-workspace` (the explorer, search, source control, terminals and browser beside the conversation), `@celljs/ta-channels` (agents and channels), `@celljs/ta-computer-use` (desktop apps through Cua Driver), `@celljs/ta-changes` (the files each reply changed, their diffs, and undo), `@celljs/ta-cron` (prompts that run on a schedule, with the Scheduled page, `/loop`, `/remind`, `/schedule` and the tool `schedule_task`), `@celljs/ta-bots` (bots of WeChat and WeCom connected to the double, an agent or a conversation, with the tool `bot_send_file`), `@celljs/ta-agents` (other coding agents such as CodeBuddy Code, Claude Code and Codex as models), `@celljs/ta-launcher` (Quick open: Recent and Mine, and links of extensions opened without installing) and `@celljs/ta-extensions` (this skill, and the Extensions page in the navigation, which lists the user's packages to change, export or remove and imports others). Do not copy or change them; build a new package for something new. The web page calls packages "extensions": use that word with the user.
91
+ Ta comes with some packages of its own, which are on until the user turns them off in Settings → Extensions: `@celljs/ta-workspace` (the explorer, search, source control, terminals and browser beside the conversation), `@celljs/ta-channels` (agents and channels), `@celljs/ta-computer-use` (desktop apps through Cua Driver), `@celljs/ta-changes` (the files each reply changed, their diffs, and undo), `@celljs/ta-cron` (prompts that run on a schedule, with the Scheduled page, `/loop`, `/remind`, `/schedule` and the tool `schedule_task`), `@celljs/ta-games` (the Games page, and the ta-game skill: games and game-like extensions on Phaser and Three.js, the engines of the page, `ui.Game` and `ui.Game3D`), `@celljs/ta-bots` (bots of WeChat and WeCom connected to the double, an agent or a conversation, with the tool `bot_send_file`), `@celljs/ta-agents` (other coding agents such as CodeBuddy Code, Claude Code and Codex as models), `@celljs/ta-manual` (the User manual page under Discover and the ta-manual skill: how to use Ta, a picture and a sentence for each step), `@celljs/ta-launcher` (Quick open: Recent and Mine, and links of extensions opened without installing), `@celljs/ta-share` (conversations, pages and files shared by links, My shares, and the tool `share_link`), `@celljs/ta-rooms` (the Rooms page under Discover: who asks to join, the user's rooms and Ta friends, and links that invite) and `@celljs/ta-extensions` (this skill, and the Extensions page in the navigation, which lists the user's packages to change, export or remove and imports others). Do not copy or change them; build a new package for something new. The web page calls packages "extensions": use that word with the user.
81
92
 
82
93
  A web extension can read and drive the scheduled tasks of `@celljs/ta-cron`, to show what a task finds in a page of its own: `pi.packages.callPackageHost('@celljs/ta-cron', method, params)` with `list` (the tasks: `{ id, name, prompt, schedule, cwd, enabled, nextRunAt?, lastRunAt?, lastStatus?, runCount, failCount }`), `get` `[id]`, `runs` `[id, limit?]` (newest first: `{ id, status, trigger, startedAt, endedAt?, summary?, error?, sessionFile? }`, `status` one of `running`, `success`, `error`, `missed`; `summary` is the last answer of the run, at most 4000 characters), `run` `[id]` (now; resolves once it started), `setEnabled` `[id, enabled]` and `update` `[id, patch]` (the fields of the update of `schedule_task`). Read them again when the page shows and every few seconds while a run is `running`; the task keeps its schedule, so the extension schedules nothing of its own.
83
94
 
@@ -1,6 +1,12 @@
1
1
  // web-src/extensions-util.ts
2
2
  var ExtensionsUtil;
3
3
  ((ExtensionsUtil) => {
4
+ function request(text, ask) {
5
+ const typed = text.trim();
6
+ const command = /^(\/\S+)\s*([\s\S]*)$/.exec(typed);
7
+ return command ? `${command[1]} ${ask(command[2].trim())}` : ask(typed);
8
+ }
9
+ ExtensionsUtil.request = request;
4
10
  function group(packages) {
5
11
  const byName = (a, b) => a.name.localeCompare(b.name);
6
12
  return {
@@ -334,14 +340,19 @@ class PackagesStore {
334
340
  return () => this.listeners.delete(listener);
335
341
  }
336
342
  patch(id, change) {
337
- this.current = { packages: this.current.packages?.map((pkg) => pkg.id === id ? { ...pkg, ...change } : pkg) };
343
+ this.current = { ...this.current, packages: this.current.packages?.map((pkg) => pkg.id === id ? { ...pkg, ...change } : pkg) };
344
+ this.publish();
345
+ }
346
+ setRemoving(id, on) {
347
+ const others = (this.current.removing ?? []).filter((other) => other !== id);
348
+ this.current = { ...this.current, removing: on ? [...others, id] : others };
338
349
  this.publish();
339
350
  }
340
351
  async load() {
341
352
  try {
342
- this.current = { packages: (await this.pi.packages.listPackages()).filter((pkg) => pkg.origin !== "temporary") };
353
+ this.current = { ...this.current, packages: (await this.pi.packages.listPackages()).filter((pkg) => pkg.origin !== "temporary") };
343
354
  } catch (error) {
344
- this.current = { packages: this.current.packages ?? [] };
355
+ this.current = { ...this.current, packages: this.current.packages ?? [] };
345
356
  this.pi.ui.notify(error instanceof Error ? error.message : String(error), "error");
346
357
  }
347
358
  this.publish();
@@ -366,7 +377,7 @@ class ExtensionActions {
366
377
  return ExtensionWords.of(this.pi.ui.language);
367
378
  }
368
379
  make(text) {
369
- return this.converse(ExtensionWords.fill(this.words.makePrompt, { text: text.trim() }));
380
+ return this.converse(ExtensionsUtil.request(text, (request) => ExtensionWords.fill(this.words.makePrompt, { text: request })));
370
381
  }
371
382
  async change(pkg) {
372
383
  const words = this.words;
@@ -396,11 +407,13 @@ class ExtensionActions {
396
407
  danger: true
397
408
  });
398
409
  if (confirmed) {
410
+ this.store.setRemoving(pkg.id, true);
399
411
  await this.guard(async () => {
400
412
  await this.pi.packages.removePackage(pkg.id);
401
413
  await this.changed();
402
414
  this.pi.ui.notify(ExtensionWords.fill(words.removed, { name: pkg.name }));
403
415
  });
416
+ this.store.setRemoving(pkg.id, false);
404
417
  }
405
418
  }
406
419
  async setEnabled(pkg, enabled) {
@@ -508,6 +521,10 @@ var React;
508
521
  function bind(react) {
509
522
  React = react;
510
523
  }
524
+ var idle = () => [false, async (action) => await action()];
525
+ function useBusy(ui) {
526
+ return (ui.useBusy ?? idle)();
527
+ }
511
528
 
512
529
  // web-src/composer.tsx
513
530
  var ConversationExtension;
@@ -850,8 +867,64 @@ var TaPackageTextUtil;
850
867
  var TaRelayServer = Symbol("TaRelayServer");
851
868
  // ../ta-protocol/esm/common/remote-protocol.js
852
869
  var TaRemoteServer = Symbol("TaRemoteServer");
870
+ // ../ta-protocol/esm/common/room-protocol.js
871
+ var TaRoomServer = Symbol("TaRoomServer");
872
+ var TaRoomWatchUtil;
873
+ (function(TaRoomWatchUtil2) {
874
+ function of(messages, state) {
875
+ const prefixes = Array.isArray(state) ? state.filter((prefix) => typeof prefix === "string" && prefix.length > 0) : [];
876
+ return { messages: messages !== false, state: [...new Set(prefixes)].sort() };
877
+ }
878
+ TaRoomWatchUtil2.of = of;
879
+ function union(watches) {
880
+ let messages = false;
881
+ const state = [];
882
+ for (const watch of watches) {
883
+ messages || (messages = watch.messages);
884
+ state.push(...watch.state);
885
+ }
886
+ return of(messages, messages ? [] : state);
887
+ }
888
+ TaRoomWatchUtil2.union = union;
889
+ function same(a, b) {
890
+ return a === b || !!a && !!b && a.messages === b.messages && a.state.join(`
891
+ `) === b.state.join(`
892
+ `);
893
+ }
894
+ TaRoomWatchUtil2.same = same;
895
+ function hears(watch, event) {
896
+ if (event.type === "message") {
897
+ return watch.messages;
898
+ }
899
+ if (event.type === "state") {
900
+ return watch.messages || watch.state.some((prefix) => event.key.startsWith(prefix));
901
+ }
902
+ return true;
903
+ }
904
+ TaRoomWatchUtil2.hears = hears;
905
+ })(TaRoomWatchUtil || (TaRoomWatchUtil = {}));
853
906
  // ../ta-protocol/esm/common/settings-protocol.js
854
907
  var TaSettingsServer = Symbol("TaSettingsServer");
908
+ // ../ta-protocol/esm/common/ta-extension-host.js
909
+ var TA_HOST_EVENT = "ta:host";
910
+ var TaHostUtil;
911
+ (function(TaHostUtil2) {
912
+ TaHostUtil2.WAIT_MS = 1000;
913
+ function reach(events, name, waitMs = TaHostUtil2.WAIT_MS) {
914
+ return new Promise((resolve) => {
915
+ const timer = setTimeout(() => resolve(undefined), waitMs);
916
+ const request = {
917
+ name,
918
+ resolve: (answer) => {
919
+ clearTimeout(timer);
920
+ resolve(answer);
921
+ }
922
+ };
923
+ events.emit(TA_HOST_EVENT, request);
924
+ });
925
+ }
926
+ TaHostUtil2.reach = reach;
927
+ })(TaHostUtil || (TaHostUtil = {}));
855
928
  // ../ta-protocol/esm/common/ta-protocol.js
856
929
  var TaServer = Symbol("TaServer");
857
930
  var TaClient = Symbol("TaClient");
@@ -866,6 +939,15 @@ var TaErrorUtil;
866
939
  }
867
940
  TaErrorUtil2.code = code;
868
941
  })(TaErrorUtil || (TaErrorUtil = {}));
942
+ var TaSlashCommandUtil;
943
+ (function(TaSlashCommandUtil2) {
944
+ function description(command, language) {
945
+ var _a, _b;
946
+ const { descriptions } = command;
947
+ return (_b = (_a = descriptions === null || descriptions === undefined ? undefined : descriptions[language]) !== null && _a !== undefined ? _a : descriptions === null || descriptions === undefined ? undefined : descriptions[language.split("-")[0]]) !== null && _b !== undefined ? _b : command.description;
948
+ }
949
+ TaSlashCommandUtil2.description = description;
950
+ })(TaSlashCommandUtil || (TaSlashCommandUtil = {}));
869
951
  var TaMessageContext;
870
952
  (function(TaMessageContext2) {
871
953
  const BLOCK = /^<context>\n?[\s\S]*?\n?<\/context>\n?/;
@@ -896,6 +978,78 @@ var TaImageNote;
896
978
  }
897
979
  TaImageNote2.strip = strip;
898
980
  })(TaImageNote || (TaImageNote = {}));
981
+ var TaImageSize;
982
+ (function(TaImageSize2) {
983
+ const JPEG_BYTES = 256 * 1024;
984
+ function of(base64) {
985
+ var _a, _b, _c;
986
+ let bytes;
987
+ try {
988
+ const binary = atob(base64.slice(0, Math.ceil(JPEG_BYTES * 4 / 3 / 4) * 4));
989
+ bytes = Uint8Array.from(binary, (char) => char.charCodeAt(0));
990
+ } catch (_d) {
991
+ return;
992
+ }
993
+ const size = (_c = (_b = (_a = png(bytes)) !== null && _a !== undefined ? _a : gif(bytes)) !== null && _b !== undefined ? _b : webp(bytes)) !== null && _c !== undefined ? _c : jpeg(bytes);
994
+ return size && size.width > 0 && size.height > 0 ? size : undefined;
995
+ }
996
+ TaImageSize2.of = of;
997
+ function u16be(bytes, at) {
998
+ return bytes[at] << 8 | bytes[at + 1];
999
+ }
1000
+ function u16le(bytes, at) {
1001
+ return bytes[at] | bytes[at + 1] << 8;
1002
+ }
1003
+ function u24le(bytes, at) {
1004
+ return bytes[at] | bytes[at + 1] << 8 | bytes[at + 2] << 16;
1005
+ }
1006
+ function u32be(bytes, at) {
1007
+ return (bytes[at] << 24 | bytes[at + 1] << 16 | bytes[at + 2] << 8 | bytes[at + 3]) >>> 0;
1008
+ }
1009
+ function text(bytes, at, length) {
1010
+ return String.fromCharCode(...bytes.subarray(at, at + length));
1011
+ }
1012
+ function png(bytes) {
1013
+ return bytes.length >= 24 && bytes[0] === 137 && text(bytes, 1, 3) === "PNG" ? { width: u32be(bytes, 16), height: u32be(bytes, 20) } : undefined;
1014
+ }
1015
+ function gif(bytes) {
1016
+ return bytes.length >= 10 && text(bytes, 0, 3) === "GIF" ? { width: u16le(bytes, 6), height: u16le(bytes, 8) } : undefined;
1017
+ }
1018
+ function webp(bytes) {
1019
+ if (bytes.length < 30 || text(bytes, 0, 4) !== "RIFF" || text(bytes, 8, 4) !== "WEBP") {
1020
+ return;
1021
+ }
1022
+ switch (text(bytes, 12, 4)) {
1023
+ case "VP8 ":
1024
+ return { width: u16le(bytes, 26) & 16383, height: u16le(bytes, 28) & 16383 };
1025
+ case "VP8L": {
1026
+ const bits = bytes[21] | bytes[22] << 8 | bytes[23] << 16 | bytes[24] << 24;
1027
+ return { width: (bits & 16383) + 1, height: (bits >> 14 & 16383) + 1 };
1028
+ }
1029
+ case "VP8X":
1030
+ return { width: u24le(bytes, 24) + 1, height: u24le(bytes, 27) + 1 };
1031
+ default:
1032
+ return;
1033
+ }
1034
+ }
1035
+ function jpeg(bytes) {
1036
+ if (bytes[0] !== 255 || bytes[1] !== 216) {
1037
+ return;
1038
+ }
1039
+ let at = 2;
1040
+ while (at + 9 < bytes.length) {
1041
+ if (bytes[at] !== 255) {
1042
+ return;
1043
+ }
1044
+ const marker = bytes[at + 1];
1045
+ if (marker >= 192 && marker <= 207 && marker !== 196 && marker !== 200 && marker !== 204) {
1046
+ return { width: u16be(bytes, at + 7), height: u16be(bytes, at + 5) };
1047
+ }
1048
+ at += 2 + u16be(bytes, at + 2);
1049
+ }
1050
+ return;
1051
+ }
1052
+ })(TaImageSize || (TaImageSize = {}));
899
1053
  var TaAgentSummary;
900
1054
  (function(TaAgentSummary2) {
901
1055
  const START = /^\s*<conversation_history_summary>/;
@@ -1104,7 +1258,7 @@ var MarketUtil;
1104
1258
  for (let i = 0;i < name.length; i++) {
1105
1259
  hash = hash * 31 + name.charCodeAt(i) | 0;
1106
1260
  }
1107
- return { letters, hue: Math.abs(hash) % 360 };
1261
+ return { letters, tint: Math.abs(hash) % 9 };
1108
1262
  }
1109
1263
  MarketUtil.monogram = monogram;
1110
1264
  function repositoryUrl(repository) {
@@ -1184,11 +1338,17 @@ function useMarketStatus(context, name) {
1184
1338
  return !pkg ? { kind: "none" } : pkg.origin === "builtin" ? { kind: "builtin" } : { kind: "installed", pkg };
1185
1339
  }
1186
1340
  function PackageFace({ name, size }) {
1187
- const { letters, hue } = MarketUtil.monogram(name);
1341
+ const { letters, tint } = MarketUtil.monogram(name);
1188
1342
  return /* @__PURE__ */ React.createElement("span", {
1189
1343
  className: "tax-face",
1190
1344
  "aria-hidden": "true",
1191
- style: { width: size, height: size, fontSize: Math.round(size * 0.36), ["--tax-hue"]: hue }
1345
+ style: {
1346
+ width: size,
1347
+ height: size,
1348
+ fontSize: Math.round(size * 0.36),
1349
+ ["--tax-tint"]: `var(--ta-tint-${tint})`,
1350
+ ["--tax-ink"]: `var(--ta-tint-ink-${tint})`
1351
+ }
1192
1352
  }, letters);
1193
1353
  }
1194
1354
  function PackageName({ name }) {
@@ -1836,7 +1996,7 @@ function ExtensionsPage({ context }) {
1836
1996
  function MineView({ context }) {
1837
1997
  const { pi, store, actions, importing } = context;
1838
1998
  const words = actions.words;
1839
- const { packages } = React.useSyncExternalStore((listener) => store.subscribe(listener), () => store.state);
1999
+ const { packages, removing } = React.useSyncExternalStore((listener) => store.subscribe(listener), () => store.state);
1840
2000
  const [starting, setStarting] = React.useState(false);
1841
2001
  const groups = ExtensionsUtil.group(packages ?? []);
1842
2002
  const Composer = pi.ui.Composer;
@@ -1859,7 +2019,8 @@ function MineView({ context }) {
1859
2019
  size: 20
1860
2020
  }), " ", words.heroTitle), /* @__PURE__ */ React.createElement("p", null, words.heroText), /* @__PURE__ */ React.createElement(Composer, {
1861
2021
  placeholder: words.placeholder,
1862
- onSend: make
2022
+ onSend: make,
2023
+ commands: true
1863
2024
  }), /* @__PURE__ */ React.createElement("div", {
1864
2025
  className: "tax-kinds"
1865
2026
  }, /* @__PURE__ */ React.createElement(PictureCards, {
@@ -1906,7 +2067,8 @@ function MineView({ context }) {
1906
2067
  key: pkg.id,
1907
2068
  pi,
1908
2069
  actions,
1909
- pkg
2070
+ pkg,
2071
+ removing: !!removing?.includes(pkg.id)
1910
2072
  })))), groups.installed.length > 0 && /* @__PURE__ */ React.createElement("section", {
1911
2073
  className: "tax-section"
1912
2074
  }, /* @__PURE__ */ React.createElement("div", {
@@ -1919,7 +2081,8 @@ function MineView({ context }) {
1919
2081
  key: pkg.id,
1920
2082
  pi,
1921
2083
  actions,
1922
- pkg
2084
+ pkg,
2085
+ removing: !!removing?.includes(pkg.id)
1923
2086
  })))), /* @__PURE__ */ React.createElement("section", {
1924
2087
  className: "tax-section"
1925
2088
  }, /* @__PURE__ */ React.createElement("div", {
@@ -1953,8 +2116,9 @@ function ShareSteps({ pi, actions }) {
1953
2116
  className: "tax-note"
1954
2117
  }, words.shareMore));
1955
2118
  }
1956
- function PackageRow({ pi, actions, pkg }) {
2119
+ function PackageRow({ pi, actions, pkg, removing }) {
1957
2120
  const words = actions.words;
2121
+ const [switching, run] = useBusy(pi.ui);
1958
2122
  const { touch, handheld } = pi.ui.useDevice();
1959
2123
  const [menu, openMenu] = pi.ui.useContextMenu();
1960
2124
  const mine = pkg.origin === "directory";
@@ -1993,7 +2157,8 @@ function PackageRow({ pi, actions, pkg }) {
1993
2157
  className: "tax-item",
1994
2158
  actions: [{ key: "remove", label: words.remove, danger: true, run: () => void remove.run() }]
1995
2159
  }, /* @__PURE__ */ React.createElement("div", {
1996
- className: `tax-row${pkg.enabled ? "" : " tax-off"}`,
2160
+ className: `tax-row${pkg.enabled ? "" : " tax-off"}${removing ? " ta-pending" : ""}`,
2161
+ "aria-busy": removing || undefined,
1997
2162
  onContextMenu: (event) => openMenu(event, items)
1998
2163
  }, /* @__PURE__ */ React.createElement("span", {
1999
2164
  className: "tax-icon"
@@ -2037,11 +2202,15 @@ function PackageRow({ pi, actions, pkg }) {
2037
2202
  })), /* @__PURE__ */ React.createElement("input", {
2038
2203
  type: "checkbox",
2039
2204
  role: "switch",
2040
- className: "tax-switch",
2205
+ className: `ta-switch tax-switch${switching || removing ? " ta-busy" : ""}`,
2041
2206
  "aria-label": ExtensionWords.fill(words.turnOn, { name: title }),
2042
2207
  "aria-checked": pkg.enabled,
2208
+ "aria-busy": switching || undefined,
2043
2209
  checked: pkg.enabled,
2044
- onChange: (event) => void actions.setEnabled(pkg, event.target.checked)
2210
+ onChange: (event) => {
2211
+ const on = event.target.checked;
2212
+ run(() => actions.setEnabled(pkg, on));
2213
+ }
2045
2214
  })), menu);
2046
2215
  }
2047
2216
 
@@ -2221,11 +2390,11 @@ class Signal {
2221
2390
 
2222
2391
  // web-src/market-style.ts
2223
2392
  var MARKET_STYLE = `
2224
- .tax-tabs { display: inline-flex; align-self: flex-start; gap: 2px; margin-bottom: -10px; padding: 3px; border-radius: 10px; background: var(--ta-chip); }
2393
+ .tax-tabs { display: inline-flex; align-self: flex-start; gap: 2px; margin-bottom: -10px; padding: 3px; border-radius: 10px; background: var(--ta-raised); }
2225
2394
  .tax-tab { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 14px 0 11px; border: 0; border-radius: 7px; background: none; color: var(--ta-secondary); font: inherit; font-size: calc(13px * var(--ta-font-scale)); font-weight: 500; cursor: pointer; transition: background 140ms, color 140ms, box-shadow 140ms; }
2226
2395
  .tax-tab:hover { color: var(--ta-text); }
2227
- .tax-tab.tax-active { background: var(--ta-hover-strong); color: var(--ta-text); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
2228
- :root[data-theme='light'] .tax-tab.tax-active { background: var(--ta-card); box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 0 0 .5px rgba(0, 0, 0, .06); }
2396
+ /* As the segmented controls of the page (its settings). */
2397
+ .tax-tab.tax-active { background: var(--ta-segment, var(--ta-card)); color: var(--ta-text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px var(--ta-border); }
2229
2398
  .tax-tab:focus-visible { outline: 2px solid var(--ta-border-focus); outline-offset: 1px; }
2230
2399
  .tax-empty-action { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 22px 16px; }
2231
2400
  .tax-market { display: flex; flex-direction: column; gap: 14px; }
@@ -2259,8 +2428,7 @@ var MARKET_STYLE = `
2259
2428
  .tax-card-description { display: -webkit-box; margin: 0; overflow: hidden; color: var(--ta-secondary); font-size: calc(12.5px * var(--ta-font-scale)); line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
2260
2429
  .tax-card-foot { display: flex; align-items: center; gap: 6px; margin-top: auto; min-height: 17px; }
2261
2430
  .tax-card-time { margin-left: auto; color: var(--ta-muted); font-size: calc(11.5px * var(--ta-font-scale)); white-space: nowrap; }
2262
- .tax-face { display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 26%; background: hsl(var(--tax-hue) 70% 50% / .13); color: hsl(var(--tax-hue) 55% 38%); font-weight: 700; letter-spacing: -.02em; user-select: none; }
2263
- :root:not([data-theme='light']) .tax-face { background: hsl(var(--tax-hue) 60% 55% / .17); color: hsl(var(--tax-hue) 75% 74%); }
2431
+ .tax-face { display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 26%; background: var(--tax-tint); color: var(--tax-ink); font-weight: 700; letter-spacing: -.02em; user-select: none; }
2264
2432
  .tax-install { display: inline-flex; align-items: center; justify-content: center; gap: 5px; flex: none; height: 28px; padding: 0 14px; border: 0; border-radius: 14px; background: color-mix(in srgb, var(--ta-green) 14%, transparent); color: color-mix(in srgb, var(--ta-green) 82%, var(--ta-text)); font: inherit; font-size: calc(12.5px * var(--ta-font-scale)); font-weight: 600; white-space: nowrap; cursor: pointer; transition: background 140ms, color 140ms, transform 120ms var(--ta-ease), filter 140ms; }
2265
2433
  .tax-install:hover { background: color-mix(in srgb, var(--ta-green) 24%, transparent); }
2266
2434
  .tax-install:active { transform: scale(.95); }
@@ -2327,8 +2495,9 @@ var STYLE = `
2327
2495
  .tax-section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 30px; }
2328
2496
  .tax-section-head h2 { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--ta-secondary); font-size: calc(12.5px * var(--ta-font-scale)); font-weight: 600; }
2329
2497
  .tax-count { padding: 0 6px; border-radius: 8px; background: var(--ta-chip); color: var(--ta-muted); font-size: calc(11px * var(--ta-font-scale)); font-weight: 500; line-height: calc(16px * var(--ta-font-scale)); }
2330
- .tax-button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 1px solid var(--ta-border-muted); border-radius: 8px; background: var(--ta-raised); color: var(--ta-text); font: inherit; font-size: calc(13px * var(--ta-font-scale)); cursor: pointer; transition: background 120ms, border-color 120ms; }
2331
- .tax-button:hover { background: var(--ta-hover); border-color: var(--ta-border); }
2498
+ /* As the buttons of the page (.ta-button). */
2499
+ .tax-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--ta-border); border-radius: 8px; background: transparent; color: var(--ta-text); font: inherit; font-size: calc(13px * var(--ta-font-scale)); font-weight: 500; white-space: nowrap; cursor: pointer; transition: background 120ms, border-color 120ms; }
2500
+ .tax-button:hover:not(:disabled) { background: var(--ta-hover); }
2332
2501
  .tax-button:disabled { opacity: .55; cursor: default; }
2333
2502
  .tax-list { --ta-swipe-bg: var(--ta-main); border: 1px solid var(--ta-border-muted); border-radius: 12px; overflow: hidden; }
2334
2503
  .tax-row { position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 14px; }
@@ -0,0 +1,47 @@
1
+ # Cell - Ta Games
2
+
3
+ A pi package that comes with Ta (on by default; Settings → Extensions turns it off): games. Ta's web page has two game engines, Phaser 4 for 2D (`pi.ui.Game`) and Three.js for 3D (`pi.ui.Game3D`); on them, this package has:
4
+
5
+ - **The Games page**, under Discover and in Quick open (started on open: loaded only when opened). At the top, every extension that is a game (a package whose `package.json` says `"pi": { "category": "game" }`: the examples, those Ta made, those of the market), opened with a tap (its package says `"lists": ["game"]`, so the games themselves are not under Discover or in the navigation, only here and in Quick open); below, "Have Ta make one": Snake, Breakout, a 3D maze, the scheduled tasks drawn as a little world, each opening a new conversation in which Ta makes it.
6
+ - **Two example games**: Dino Run (2D, Phaser: a pixel dinosaur jumps cacti that come faster and faster, with space or a tap) and Stack (3D, Three.js: a tap drops the block that slides over the tower, what hangs over is cut off). They are ordinary extensions, each one `web.js` of plain JavaScript as Ta writes games, in `skills/ta-game/examples/`. The first time the Games page opens they are copied to `~/.ta/agent/extensions/`, and are then the user's own: turned off, deleted, shared or changed by Ta each on its own; one deleted is not put back by itself, "Install the examples" at the top right of the Games page does. Each keeps its best score in its package data, the same on every device.
7
+ - **The `ta-game` skill**, which teaches Ta to write games and extensions that play like games (a pet in a card of the board, a widget that moves, scores and rewards) with `pi.ui.Game` and `pi.ui.Game3D`: no import and no engine of its own, one code for touch and mouse, the colors of the theme, asleep out of sight, best scores in `pi.storage`, and what most often differs from Phaser 3 to 4 and from older Three.js to r187. Saying "make a Snake game" in a conversation uses it too.
8
+ - **Phaser's topics**: the 28 topics the npm package of Phaser 4 writes for coding agents (scenes, input, tweens, physics, particles...), copied at build time to `skills/ta-game/phaser/` (`scripts/phaser-skills.mjs`). Under the directory of a skill, pi does not take them for skills: they cost nothing in every conversation, and Ta reads them when needed.
9
+
10
+ The least a game with `pi.ui.Game` takes:
11
+
12
+ ```js
13
+ export default function (pi) {
14
+ const h = pi.React.createElement;
15
+ function Page() {
16
+ const config = pi.React.useCallback((Phaser, page) => ({
17
+ width: 480,
18
+ height: 270,
19
+ scene: { create() { this.add.circle(240, 135, 14, page.colors.green); } },
20
+ }), []);
21
+ return h('div', { style: { display: 'flex', flexDirection: 'column', height: '100%' } }, h(pi.ui.Game, { config }));
22
+ }
23
+ pi.registerView('ball', { title: 'Ball', render: Page });
24
+ }
25
+ ```
26
+
27
+ The least a 3D game takes:
28
+
29
+ ```js
30
+ const setup = ({ THREE, scene, camera, page }) => {
31
+ camera.position.set(3, 3, 5);
32
+ camera.lookAt(0, 0, 0);
33
+ scene.add(new THREE.HemisphereLight(0xffffff, 0x707070, 1.8));
34
+ const cube = new THREE.Mesh(new THREE.BoxGeometry(1, 1, 1), new THREE.MeshLambertMaterial({ color: page.colors.green }));
35
+ scene.add(cube);
36
+ return { update(seconds) { cube.rotation.y += seconds; } };
37
+ };
38
+ // h(pi.ui.Game3D, { setup })
39
+ ```
40
+
41
+ The choice of the engines and the design: docs/design/ta-games.md. The package holds a web extension (`pi.web`), skills (`pi.skills`) and a server side (`pi.host`, which copies the examples), and uses only the public `WebExtensionAPI` and `TaExtensionHost`. The rules of the examples (`DinoRules`, `StackRules`) are apart from what draws them, tested by `web-src/examples.spec.ts`, which loads their `web.js`.
42
+
43
+ ## Limits
44
+
45
+ - 3D is Three.js itself and OrbitControls: no loader of models, post-processing or physics.
46
+ - Browsers allow a few WebGL contexts at once (Chrome some 16): with many games shown at once, the first ones lose their picture.
47
+ - Other coding agents (`@celljs/ta-agents`) do not see pi's skills: the message of "Have Ta make one" names the files of both SKILL.md; when asking in a conversation, tell it to read them.
@@ -0,0 +1,47 @@
1
+ # Cell - Ta Games
2
+
3
+ Ta 自带的 pi 包(默认开启,可在 Web 客户端的 设置 → 扩展 关闭):游戏。Ta Web 的页面自带两个游戏引擎:2D 的 Phaser 4(`pi.ui.Game`)和 3D 的 Three.js(`pi.ui.Game3D`),这个包在它们之上提供:
4
+
5
+ - **"游戏"页**:在"发现"和快捷打开里(按需启动:点开才加载)。上面列出所有游戏扩展(`package.json` 里写了 `"pi": { "category": "game" }` 的包:示例、Ta 做的、市场装的),点一下打开(包里的 `"lists": ["game"]` 认领这一类,各个游戏不再出现在"发现"和导航栏里,只在这一页和快捷打开里);下面是"让 Ta 做一个":贪吃蛇、打砖块、3D 迷宫、把定时任务画成小世界,点一下就开一个新对话让 Ta 做。
6
+ - **两个示例游戏**:恐龙快跑(2D,Phaser:像素恐龙跳过越来越快的仙人掌,空格键或轻点起跳)和叠方块(3D,Three.js:轻点放下在塔顶滑动的方块,伸出去的部分被切掉)。它们是普通的扩展,只有一个纯 JavaScript 的 `web.js`,和 Ta 写出来的游戏一样,放在 `skills/ta-game/examples/`。第一次打开"游戏"页时复制到 `~/.ta/agent/extensions/`,之后就是用户自己的扩展,可以单独关掉、删除、分享,或让 Ta 修改;删掉的不会再自动装回,"游戏"页右上角的"安装示例游戏"可以重新装。最高分存各自的包数据,各设备同步。
7
+ - **`ta-game` 技能**:教 Ta 用 `pi.ui.Game` 和 `pi.ui.Game3D` 写游戏和游戏风格的扩展(看板卡片里的宠物、会动的小组件、积分与奖励):不 import、不自带引擎、触摸与鼠标一套、跟随主题、看不见时休眠、最高分存 `pi.storage`,以及 Phaser 3 到 4、旧版 Three.js 到 r187 的常见差异。直接在对话里说"做一个贪吃蛇"也会用到它。
8
+ - **Phaser 的主题文档**:Phaser 4 的 npm 包给 coding agent 写的 28 个主题(场景、输入、补间、物理、粒子……),构建时复制到 `skills/ta-game/phaser/`(`scripts/phaser-skills.mjs`)。它们在技能目录下面,pi 不把它们当作技能,不占每次对话的提示,Ta 需要时去读。
9
+
10
+ 用 `pi.ui.Game` 的最小写法:
11
+
12
+ ```js
13
+ export default function (pi) {
14
+ const h = pi.React.createElement;
15
+ function Page() {
16
+ const config = pi.React.useCallback((Phaser, page) => ({
17
+ width: 480,
18
+ height: 270,
19
+ scene: { create() { this.add.circle(240, 135, 14, page.colors.green); } },
20
+ }), []);
21
+ return h('div', { style: { display: 'flex', flexDirection: 'column', height: '100%' } }, h(pi.ui.Game, { config }));
22
+ }
23
+ pi.registerView('ball', { title: 'Ball', render: Page });
24
+ }
25
+ ```
26
+
27
+ 3D 的最小写法:
28
+
29
+ ```js
30
+ const setup = ({ THREE, scene, camera, page }) => {
31
+ camera.position.set(3, 3, 5);
32
+ camera.lookAt(0, 0, 0);
33
+ scene.add(new THREE.HemisphereLight(0xffffff, 0x707070, 1.8));
34
+ const cube = new THREE.Mesh(new THREE.BoxGeometry(1, 1, 1), new THREE.MeshLambertMaterial({ color: page.colors.green }));
35
+ scene.add(cube);
36
+ return { update(seconds) { cube.rotation.y += seconds; } };
37
+ };
38
+ // h(pi.ui.Game3D, { setup })
39
+ ```
40
+
41
+ 选型和设计见 docs/design/ta-games.md。包里有 Web 扩展(`pi.web`)、技能(`pi.skills`)和服务端(`pi.host`,复制示例),只用公开的 `WebExtensionAPI` 和 `TaExtensionHost`。示例的规则(`DinoRules`、`StackRules`)与绘制分开,由 `web-src/examples.spec.ts` 直接加载 `web.js` 来测。
42
+
43
+ ## 限制
44
+
45
+ - 3D 只有 Three.js 本体和 OrbitControls:没有模型加载器、后期处理和物理引擎。
46
+ - 浏览器同时能用的 WebGL 上下文有限(Chrome 约 16 个),同时显示很多游戏时最早的会丢失画面。
47
+ - 外部 Agent(`@celljs/ta-agents`)看不到 pi 的技能:"让 Ta 做一个"的消息里写明了两份 SKILL.md 的路径;在对话里直接说时,可以提醒它读这两份文件。