@celljs/ta 4.9.1 → 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 (673) hide show
  1. package/README.en.md +3 -1
  2. package/README.md +3 -1
  3. package/dist/cli.mjs +1753 -75
  4. package/dist/gateway.mjs +311 -25
  5. package/dist/pi/CHANGELOG.md +30 -0
  6. package/dist/pi/dist/bundle/chunks/anthropic-messages-CA3HHOL3.js +6 -0
  7. package/dist/pi/dist/bundle/chunks/{azure-openai-responses-FSC6BAW3.js → azure-openai-responses-76TWS6DT.js} +1 -1
  8. package/dist/pi/dist/bundle/chunks/bedrock-converse-stream.js +3 -3
  9. package/dist/pi/dist/bundle/chunks/chunk-4KSTFUIK.js +19 -0
  10. package/dist/pi/dist/bundle/chunks/chunk-4UNPP53I.js +55 -0
  11. package/dist/pi/dist/bundle/chunks/chunk-AUUCDC7R.js +4 -0
  12. package/dist/pi/dist/bundle/chunks/{chunk-V6KH5QG4.js → chunk-BAC3QPNW.js} +1 -1
  13. package/dist/pi/dist/bundle/chunks/{chunk-4EYXVSA5.js → chunk-FF6XOTWB.js} +9 -9
  14. package/dist/pi/dist/bundle/chunks/chunk-FMPAMX2W.js +82 -0
  15. package/dist/pi/dist/bundle/chunks/chunk-GFUN2N5K.js +2 -0
  16. package/dist/pi/dist/bundle/chunks/chunk-IEBK4HQA.js +2 -0
  17. package/dist/pi/dist/bundle/chunks/{chunk-C2WU32PX.js → chunk-IQUU5XIT.js} +1 -1
  18. package/dist/pi/dist/bundle/chunks/{chunk-EBFHJFEE.js → chunk-LQLJ7CDW.js} +1 -1
  19. package/dist/pi/dist/bundle/chunks/chunk-MMDXLZVS.js +30 -0
  20. package/dist/pi/dist/bundle/chunks/{chunk-GN3QYODH.js → chunk-QN4TOIZN.js} +1 -1
  21. package/dist/pi/dist/bundle/chunks/chunk-RKNK4Y6L.js +2 -0
  22. package/dist/pi/dist/bundle/chunks/{chunk-B46VJEHW.js → chunk-V7SLUK6A.js} +1 -1
  23. package/dist/pi/dist/bundle/chunks/chunk-VEJDBY3O.js +1237 -0
  24. package/dist/pi/dist/bundle/chunks/chunk-VKJQ6CME.js +8 -0
  25. package/dist/pi/dist/bundle/chunks/{chunk-3TGLJEWK.js → chunk-WL4TUXY7.js} +1 -1
  26. package/dist/pi/dist/bundle/chunks/{chunk-YZKQS34S.js → chunk-Y55SJART.js} +5 -1
  27. package/dist/pi/dist/bundle/chunks/{chunk-EOO47QGR.js → chunk-ZBIZYD6W.js} +1 -1
  28. package/dist/pi/dist/bundle/chunks/chunk-ZG74NES2.js +2 -0
  29. package/dist/pi/dist/bundle/chunks/chunk-ZGYS4UTC.js +2 -0
  30. package/dist/pi/dist/bundle/chunks/{cli-MCOUW5WS.js → cli-7RHMDOHL.js} +7 -7
  31. package/dist/pi/dist/bundle/chunks/{cloudflare-workers-ai-system-one-WLAFJSP6.js → cloudflare-workers-ai-system-one-U4J7D646.js} +1 -1
  32. package/dist/pi/dist/bundle/chunks/codemode-worker.js +2 -0
  33. package/dist/pi/dist/bundle/chunks/{easter-egg-3d-WMBNSJ4M.js → easter-egg-3d-GEVPKQF6.js} +1 -1
  34. package/dist/pi/dist/bundle/chunks/{execute-4CEBORGZ.js → execute-L2EEDV3L.js} +5 -3
  35. package/dist/pi/dist/bundle/chunks/github-copilot.js +1 -1
  36. package/dist/pi/dist/bundle/chunks/{google-generative-ai-INGKNW72.js → google-generative-ai-D5B6W47J.js} +1 -1
  37. package/dist/pi/dist/bundle/chunks/{google-vertex-IBTX6MBF.js → google-vertex-U4H5YDEW.js} +1 -1
  38. package/dist/pi/dist/bundle/chunks/{llama-cpp-classify-V5U3QKXI.js → llama-cpp-classify-EJXCQRUQ.js} +1 -1
  39. package/dist/pi/dist/bundle/chunks/{mistral-conversations-S4OWXIXQ.js → mistral-conversations-S277EKLB.js} +1 -1
  40. package/dist/pi/dist/bundle/chunks/openai-codex-responses-TEQRB65N.js +10 -0
  41. package/dist/pi/dist/bundle/chunks/{openai-completions-EJNYB6IX.js → openai-completions-HRZOSLBO.js} +3 -3
  42. package/dist/pi/dist/bundle/chunks/{openai-decisions-IXI34BYG.js → openai-decisions-F66BDLOM.js} +1 -1
  43. package/dist/pi/dist/bundle/chunks/openai-responses-BAKFWTGE.js +4 -0
  44. package/dist/pi/dist/bundle/chunks/{openrouter-images-PISKSFMS.js → openrouter-images-VXF5TVIK.js} +1 -1
  45. package/dist/pi/dist/bundle/chunks/{pi-messages-NORUKF4E.js → pi-messages-UBJKNDRN.js} +1 -1
  46. package/dist/pi/dist/bundle/chunks/{runtime-FQB7RU7U.js → runtime-J5ZSBGTX.js} +1 -1
  47. package/dist/pi/dist/bundle/chunks/{typesafe-system-one-CHVC2UUI.js → typesafe-system-one-56TEMIHL.js} +1 -1
  48. package/dist/pi/dist/bundle/chunks/virtual-modules-KITQRTYM.js +2 -0
  49. package/dist/pi/dist/bundle/cli-runtime.js +1 -1
  50. package/dist/pi/dist/bundle/index.js +1 -1
  51. package/dist/pi/dist/bundle/rpc-entry.js +1 -1
  52. package/dist/pi/docs/cli.md +14 -1
  53. package/dist/pi/docs/extensions.md +27 -7
  54. package/dist/pi/docs/keybindings.md +1 -1
  55. package/dist/pi/docs/llama-cpp.md +5 -8
  56. package/dist/pi/docs/models-configuration.md +6 -1
  57. package/dist/pi/docs/models.md +2 -1
  58. package/dist/pi/docs/prompt-templates.md +1 -1
  59. package/dist/pi/docs/providers.md +1 -1
  60. package/dist/pi/docs/rpc.md +4 -2
  61. package/dist/pi/docs/sessions.md +7 -1
  62. package/dist/pi/docs/settings.md +1 -1
  63. package/dist/pi/docs/tui.md +1 -1
  64. package/dist/pi/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  65. package/dist/pi/examples/extensions/custom-provider-anthropic/package.json +1 -1
  66. package/dist/pi/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  67. package/dist/pi/examples/extensions/gondolin/package-lock.json +2 -2
  68. package/dist/pi/examples/extensions/gondolin/package.json +1 -1
  69. package/dist/pi/examples/extensions/plan-mode/index.ts +23 -13
  70. package/dist/pi/examples/extensions/plan-mode/utils.ts +42 -16
  71. package/dist/pi/examples/extensions/subagent/README.md +14 -11
  72. package/dist/pi/examples/extensions/subagent/index.ts +392 -171
  73. package/dist/pi/examples/extensions/with-deps/package-lock.json +2 -2
  74. package/dist/pi/examples/extensions/with-deps/package.json +1 -1
  75. package/dist/pi/examples/tsconfig.json +63 -35
  76. package/dist/pi/package.json +1 -1
  77. package/dist/pi/packages/ta-agents/extension/index.mjs +185 -140
  78. package/dist/pi/packages/ta-agents/lib/acp-agent.js +30 -10
  79. package/dist/pi/packages/ta-agents/lib/agent-bindings.d.ts +2 -0
  80. package/dist/pi/packages/ta-agents/lib/agent-bindings.js +4 -0
  81. package/dist/pi/packages/ta-agents/lib/agent-catalog.d.ts +2 -2
  82. package/dist/pi/packages/ta-agents/lib/agent-catalog.js +4 -4
  83. package/dist/pi/packages/ta-agents/lib/agent-prompt.d.ts +6 -0
  84. package/dist/pi/packages/ta-agents/lib/agent-prompt.js +19 -0
  85. package/dist/pi/packages/ta-agents/lib/agent-session.d.ts +2 -0
  86. package/dist/pi/packages/ta-agents/lib/agent-session.js +2 -0
  87. package/dist/pi/packages/ta-agents/lib/agent-streamer.js +7 -0
  88. package/dist/pi/packages/ta-agents/lib/agent-tool.js +3 -2
  89. package/dist/pi/packages/ta-agents/lib/extension.js +15 -1
  90. package/dist/pi/packages/ta-agents/lib/texts.d.ts +4 -0
  91. package/dist/pi/packages/ta-agents/lib/texts.js +4 -0
  92. package/dist/pi/packages/ta-agents/package.json +3 -3
  93. package/dist/pi/packages/ta-bots/extension/index.mjs +31 -253
  94. package/dist/pi/packages/ta-bots/host/index.mjs +189 -1
  95. package/dist/pi/packages/ta-bots/lib/bots-protocol.d.ts +2 -0
  96. package/dist/pi/packages/ta-bots/lib/bots-protocol.js +3 -1
  97. package/dist/pi/packages/ta-bots/lib/bots-view.js +24 -12
  98. package/dist/pi/packages/ta-bots/lib/composer.js +1 -0
  99. package/dist/pi/packages/ta-bots/lib/extension.js +10 -17
  100. package/dist/pi/packages/ta-bots/lib/i18n.d.ts +1 -0
  101. package/dist/pi/packages/ta-bots/lib/i18n.js +2 -0
  102. package/dist/pi/packages/ta-bots/lib/index.js +2 -0
  103. package/dist/pi/packages/ta-bots/lib/style.d.ts +1 -1
  104. package/dist/pi/packages/ta-bots/lib/style.js +1 -0
  105. package/dist/pi/packages/ta-bots/lib/text-util.js +8 -1
  106. package/dist/pi/packages/ta-bots/lib/tool-line.d.ts +8 -0
  107. package/dist/pi/packages/ta-bots/lib/tool-line.js +19 -0
  108. package/dist/pi/packages/ta-bots/package.json +1 -1
  109. package/dist/pi/packages/ta-bots/web/index.js +47 -16
  110. package/dist/pi/packages/ta-changes/extension/index.mjs +23 -13
  111. package/dist/pi/packages/ta-changes/lib/card.js +18 -4
  112. package/dist/pi/packages/ta-changes/lib/changes-protocol.d.ts +0 -4
  113. package/dist/pi/packages/ta-changes/lib/changes-protocol.js +1 -5
  114. package/dist/pi/packages/ta-changes/lib/extension.js +5 -13
  115. package/dist/pi/packages/ta-changes/package.json +1 -1
  116. package/dist/pi/packages/ta-changes/web/index.js +16 -3
  117. package/dist/pi/packages/ta-channels/README.en.md +6 -5
  118. package/dist/pi/packages/ta-channels/README.md +6 -5
  119. package/dist/pi/packages/ta-channels/extension/index.mjs +350 -28
  120. package/dist/pi/packages/ta-channels/host/index.mjs +638 -43
  121. package/dist/pi/packages/ta-channels/lib/agent-cards.d.ts +19 -0
  122. package/dist/pi/packages/ta-channels/lib/agent-cards.js +58 -0
  123. package/dist/pi/packages/ta-channels/lib/agent-menu.d.ts +2 -2
  124. package/dist/pi/packages/ta-channels/lib/agent-menu.js +20 -6
  125. package/dist/pi/packages/ta-channels/lib/card.d.ts +27 -0
  126. package/dist/pi/packages/ta-channels/lib/card.js +178 -0
  127. package/dist/pi/packages/ta-channels/lib/channels-model.d.ts +65 -13
  128. package/dist/pi/packages/ta-channels/lib/channels-model.js +15 -6
  129. package/dist/pi/packages/ta-channels/lib/channels-util.d.ts +31 -2
  130. package/dist/pi/packages/ta-channels/lib/channels-util.js +100 -6
  131. package/dist/pi/packages/ta-channels/lib/channels.d.ts +28 -18
  132. package/dist/pi/packages/ta-channels/lib/channels.js +65 -65
  133. package/dist/pi/packages/ta-channels/lib/create.js +14 -4
  134. package/dist/pi/packages/ta-channels/lib/extension.d.ts +8 -0
  135. package/dist/pi/packages/ta-channels/lib/extension.js +104 -18
  136. package/dist/pi/packages/ta-channels/lib/faces.d.ts +2 -0
  137. package/dist/pi/packages/ta-channels/lib/faces.js +7 -1
  138. package/dist/pi/packages/ta-channels/lib/handoff-view.d.ts +19 -0
  139. package/dist/pi/packages/ta-channels/lib/handoff-view.js +113 -0
  140. package/dist/pi/packages/ta-channels/lib/handoff.d.ts +67 -0
  141. package/dist/pi/packages/ta-channels/lib/handoff.js +114 -0
  142. package/dist/pi/packages/ta-channels/lib/host.d.ts +1 -1
  143. package/dist/pi/packages/ta-channels/lib/host.js +1 -1
  144. package/dist/pi/packages/ta-channels/lib/i18n.d.ts +49 -8
  145. package/dist/pi/packages/ta-channels/lib/i18n.js +98 -16
  146. package/dist/pi/packages/ta-channels/lib/index.js +10 -1
  147. package/dist/pi/packages/ta-channels/lib/member-tools.d.ts +23 -0
  148. package/dist/pi/packages/ta-channels/lib/member-tools.js +56 -0
  149. package/dist/pi/packages/ta-channels/lib/members.js +6 -2
  150. package/dist/pi/packages/ta-channels/lib/more-menu.d.ts +3 -2
  151. package/dist/pi/packages/ta-channels/lib/more-menu.js +21 -29
  152. package/dist/pi/packages/ta-channels/lib/notice.d.ts +25 -0
  153. package/dist/pi/packages/ta-channels/lib/notice.js +101 -0
  154. package/dist/pi/packages/ta-channels/lib/room.js +26 -10
  155. package/dist/pi/packages/ta-channels/lib/sidebar.d.ts +1 -6
  156. package/dist/pi/packages/ta-channels/lib/sidebar.js +257 -84
  157. package/dist/pi/packages/ta-channels/lib/style.d.ts +1 -1
  158. package/dist/pi/packages/ta-channels/lib/style.js +151 -40
  159. package/dist/pi/packages/ta-channels/lib/tasks.js +3 -4
  160. package/dist/pi/packages/ta-channels/lib/team.d.ts +58 -10
  161. package/dist/pi/packages/ta-channels/lib/team.js +159 -38
  162. package/dist/pi/packages/ta-channels/lib/tool-lines.d.ts +22 -0
  163. package/dist/pi/packages/ta-channels/lib/tool-lines.js +113 -0
  164. package/dist/pi/packages/ta-channels/lib/views.d.ts +54 -1
  165. package/dist/pi/packages/ta-channels/lib/views.js +129 -1
  166. package/dist/pi/packages/ta-channels/package.json +2 -1
  167. package/dist/pi/packages/ta-channels/web/index.js +1792 -439
  168. package/dist/pi/packages/ta-computer-use/package.json +7 -2
  169. package/dist/pi/packages/ta-cron/README.en.md +6 -4
  170. package/dist/pi/packages/ta-cron/README.md +6 -4
  171. package/dist/pi/packages/ta-cron/extension/index.mjs +416 -44
  172. package/dist/pi/packages/ta-cron/host/index.mjs +30 -3
  173. package/dist/pi/packages/ta-cron/lib/chat-task.d.ts +48 -0
  174. package/dist/pi/packages/ta-cron/lib/chat-task.js +133 -0
  175. package/dist/pi/packages/ta-cron/lib/commands.d.ts +2 -1
  176. package/dist/pi/packages/ta-cron/lib/commands.js +10 -4
  177. package/dist/pi/packages/ta-cron/lib/composer.d.ts +11 -0
  178. package/dist/pi/packages/ta-cron/lib/composer.js +58 -0
  179. package/dist/pi/packages/ta-cron/lib/cron-protocol.d.ts +10 -3
  180. package/dist/pi/packages/ta-cron/lib/cron-protocol.js +6 -3
  181. package/dist/pi/packages/ta-cron/lib/editor.js +65 -30
  182. package/dist/pi/packages/ta-cron/lib/extension.d.ts +2 -0
  183. package/dist/pi/packages/ta-cron/lib/extension.js +33 -13
  184. package/dist/pi/packages/ta-cron/lib/i18n.d.ts +30 -1
  185. package/dist/pi/packages/ta-cron/lib/i18n.js +60 -2
  186. package/dist/pi/packages/ta-cron/lib/index.js +4 -0
  187. package/dist/pi/packages/ta-cron/lib/page.d.ts +38 -4
  188. package/dist/pi/packages/ta-cron/lib/page.js +131 -4
  189. package/dist/pi/packages/ta-cron/lib/react.d.ts +3 -0
  190. package/dist/pi/packages/ta-cron/lib/react.js +8 -0
  191. package/dist/pi/packages/ta-cron/lib/scheduler.js +3 -2
  192. package/dist/pi/packages/ta-cron/lib/style.d.ts +1 -1
  193. package/dist/pi/packages/ta-cron/lib/style.js +168 -50
  194. package/dist/pi/packages/ta-cron/lib/task-extension.d.ts +15 -0
  195. package/dist/pi/packages/ta-cron/lib/task-extension.js +56 -0
  196. package/dist/pi/packages/ta-cron/lib/task-util.d.ts +4 -0
  197. package/dist/pi/packages/ta-cron/lib/task-util.js +31 -1
  198. package/dist/pi/packages/ta-cron/lib/tasks-view.d.ts +4 -1
  199. package/dist/pi/packages/ta-cron/lib/tasks-view.js +107 -67
  200. package/dist/pi/packages/ta-cron/lib/tool-line.d.ts +9 -0
  201. package/dist/pi/packages/ta-cron/lib/tool-line.js +40 -0
  202. package/dist/pi/packages/ta-cron/lib/tool.d.ts +5 -1
  203. package/dist/pi/packages/ta-cron/lib/tool.js +6 -3
  204. package/dist/pi/packages/ta-cron/package.json +12 -1
  205. package/dist/pi/packages/ta-cron/web/index.js +1346 -415
  206. package/dist/pi/packages/ta-extensions/README.en.md +4 -2
  207. package/dist/pi/packages/ta-extensions/README.md +4 -2
  208. package/dist/pi/packages/ta-extensions/host/index.mjs +3 -2
  209. package/dist/pi/packages/ta-extensions/lib/actions.d.ts +4 -0
  210. package/dist/pi/packages/ta-extensions/lib/actions.js +16 -5
  211. package/dist/pi/packages/ta-extensions/lib/composer.d.ts +17 -0
  212. package/dist/pi/packages/ta-extensions/lib/composer.js +84 -0
  213. package/dist/pi/packages/ta-extensions/lib/extensions-util.d.ts +5 -0
  214. package/dist/pi/packages/ta-extensions/lib/extensions-util.js +10 -0
  215. package/dist/pi/packages/ta-extensions/lib/i18n.d.ts +9 -0
  216. package/dist/pi/packages/ta-extensions/lib/i18n.js +18 -0
  217. package/dist/pi/packages/ta-extensions/lib/index.js +4 -0
  218. package/dist/pi/packages/ta-extensions/lib/make-model.d.ts +20 -0
  219. package/dist/pi/packages/ta-extensions/lib/make-model.js +43 -0
  220. package/dist/pi/packages/ta-extensions/lib/market-parts.js +8 -2
  221. package/dist/pi/packages/ta-extensions/lib/market-style.d.ts +1 -1
  222. package/dist/pi/packages/ta-extensions/lib/market-style.js +4 -5
  223. package/dist/pi/packages/ta-extensions/lib/market-util.d.ts +2 -2
  224. package/dist/pi/packages/ta-extensions/lib/market-util.js +2 -2
  225. package/dist/pi/packages/ta-extensions/lib/page.js +52 -23
  226. package/dist/pi/packages/ta-extensions/lib/react.d.ts +3 -0
  227. package/dist/pi/packages/ta-extensions/lib/react.js +8 -0
  228. package/dist/pi/packages/ta-extensions/lib/settings.d.ts +4 -0
  229. package/dist/pi/packages/ta-extensions/lib/settings.js +44 -0
  230. package/dist/pi/packages/ta-extensions/lib/style.d.ts +1 -1
  231. package/dist/pi/packages/ta-extensions/lib/style.js +13 -6
  232. package/dist/pi/packages/ta-extensions/package.json +6 -1
  233. package/dist/pi/packages/ta-extensions/skills/ta-package/SKILL.md +25 -10
  234. package/dist/pi/packages/ta-extensions/web/index.js +459 -47
  235. package/dist/pi/packages/ta-games/README.en.md +47 -0
  236. package/dist/pi/packages/ta-games/README.md +47 -0
  237. package/dist/pi/packages/ta-games/host/index.mjs +65 -0
  238. package/dist/pi/packages/ta-games/lib/games-view.d.ts +16 -0
  239. package/dist/pi/packages/ta-games/lib/games-view.js +77 -0
  240. package/dist/pi/packages/ta-games/lib/host.d.ts +36 -0
  241. package/dist/pi/packages/ta-games/lib/host.js +83 -0
  242. package/dist/pi/packages/ta-games/lib/i18n.d.ts +35 -0
  243. package/dist/pi/packages/ta-games/lib/i18n.js +71 -0
  244. package/dist/pi/packages/ta-games/lib/ideas.d.ts +6 -0
  245. package/dist/pi/packages/ta-games/lib/ideas.js +62 -0
  246. package/dist/pi/packages/ta-games/lib/index.d.ts +7 -0
  247. package/dist/pi/packages/ta-games/lib/index.js +24 -0
  248. package/dist/pi/packages/ta-games/lib/make-game.d.ts +23 -0
  249. package/dist/pi/packages/ta-games/lib/make-game.js +67 -0
  250. package/dist/pi/packages/ta-games/lib/react.d.ts +11 -0
  251. package/dist/pi/packages/ta-games/lib/react.js +16 -0
  252. package/dist/pi/packages/ta-games/lib/style.d.ts +4 -0
  253. package/dist/pi/packages/ta-games/lib/style.js +33 -0
  254. package/dist/pi/packages/ta-games/package.json +60 -0
  255. package/dist/pi/packages/ta-games/skills/ta-game/SKILL.md +127 -0
  256. package/dist/pi/packages/ta-games/skills/ta-game/examples/dino-run/package.json +22 -0
  257. package/dist/pi/packages/ta-games/skills/ta-game/examples/dino-run/web.js +389 -0
  258. package/dist/pi/packages/ta-games/skills/ta-game/examples/stack/package.json +22 -0
  259. package/dist/pi/packages/ta-games/skills/ta-game/examples/stack/web.js +423 -0
  260. package/dist/pi/packages/ta-games/skills/ta-game/phaser/LICENSE.md +22 -0
  261. package/dist/pi/packages/ta-games/skills/ta-game/phaser/actions-and-utilities/SKILL.md +343 -0
  262. package/dist/pi/packages/ta-games/skills/ta-game/phaser/animations/SKILL.md +481 -0
  263. package/dist/pi/packages/ta-games/skills/ta-game/phaser/audio-and-sound/SKILL.md +453 -0
  264. package/dist/pi/packages/ta-games/skills/ta-game/phaser/cameras/SKILL.md +497 -0
  265. package/dist/pi/packages/ta-games/skills/ta-game/phaser/cameras/references/REFERENCE.md +128 -0
  266. package/dist/pi/packages/ta-games/skills/ta-game/phaser/curves-and-paths/SKILL.md +359 -0
  267. package/dist/pi/packages/ta-games/skills/ta-game/phaser/data-manager/SKILL.md +406 -0
  268. package/dist/pi/packages/ta-games/skills/ta-game/phaser/events-system/SKILL.md +497 -0
  269. package/dist/pi/packages/ta-games/skills/ta-game/phaser/filters-and-postfx/SKILL.md +449 -0
  270. package/dist/pi/packages/ta-games/skills/ta-game/phaser/game-object-components/SKILL.md +478 -0
  271. package/dist/pi/packages/ta-games/skills/ta-game/phaser/game-object-components/references/REFERENCE.md +76 -0
  272. package/dist/pi/packages/ta-games/skills/ta-game/phaser/game-setup-and-config/SKILL.md +485 -0
  273. package/dist/pi/packages/ta-games/skills/ta-game/phaser/geometry-and-math/SKILL.md +497 -0
  274. package/dist/pi/packages/ta-games/skills/ta-game/phaser/graphics-and-shapes/SKILL.md +473 -0
  275. package/dist/pi/packages/ta-games/skills/ta-game/phaser/groups-and-containers/SKILL.md +418 -0
  276. package/dist/pi/packages/ta-games/skills/ta-game/phaser/input-keyboard-mouse-touch/SKILL.md +500 -0
  277. package/dist/pi/packages/ta-games/skills/ta-game/phaser/input-keyboard-mouse-touch/references/REFERENCE.md +372 -0
  278. package/dist/pi/packages/ta-games/skills/ta-game/phaser/loading-assets/SKILL.md +474 -0
  279. package/dist/pi/packages/ta-games/skills/ta-game/phaser/loading-assets/references/REFERENCE.md +148 -0
  280. package/dist/pi/packages/ta-games/skills/ta-game/phaser/particles/SKILL.md +499 -0
  281. package/dist/pi/packages/ta-games/skills/ta-game/phaser/particles/references/REFERENCE.md +17 -0
  282. package/dist/pi/packages/ta-games/skills/ta-game/phaser/physics-arcade/SKILL.md +468 -0
  283. package/dist/pi/packages/ta-games/skills/ta-game/phaser/physics-matter/SKILL.md +499 -0
  284. package/dist/pi/packages/ta-games/skills/ta-game/phaser/render-textures/SKILL.md +441 -0
  285. package/dist/pi/packages/ta-games/skills/ta-game/phaser/scale-and-responsive/SKILL.md +371 -0
  286. package/dist/pi/packages/ta-games/skills/ta-game/phaser/scenes/SKILL.md +450 -0
  287. package/dist/pi/packages/ta-games/skills/ta-game/phaser/scenes/references/REFERENCE.md +78 -0
  288. package/dist/pi/packages/ta-games/skills/ta-game/phaser/sprites-and-images/SKILL.md +417 -0
  289. package/dist/pi/packages/ta-games/skills/ta-game/phaser/sprites-and-images/references/REFERENCE.md +160 -0
  290. package/dist/pi/packages/ta-games/skills/ta-game/phaser/text-and-bitmaptext/SKILL.md +460 -0
  291. package/dist/pi/packages/ta-games/skills/ta-game/phaser/tilemaps/SKILL.md +440 -0
  292. package/dist/pi/packages/ta-games/skills/ta-game/phaser/time-and-timers/SKILL.md +496 -0
  293. package/dist/pi/packages/ta-games/skills/ta-game/phaser/tweens/SKILL.md +414 -0
  294. package/dist/pi/packages/ta-games/skills/ta-game/phaser/v3-to-v4-migration/SKILL.md +430 -0
  295. package/dist/pi/packages/ta-games/skills/ta-game/phaser/v4-new-features/SKILL.md +384 -0
  296. package/dist/pi/packages/ta-games/skills/ta-game/phaser/v4-new-features/references/REFERENCE.md +69 -0
  297. package/dist/pi/packages/ta-games/web/index.js +431 -0
  298. package/dist/pi/packages/ta-glance/README.en.md +11 -0
  299. package/dist/pi/packages/ta-glance/README.md +11 -0
  300. package/dist/pi/packages/ta-glance/extension/index.mjs +67 -0
  301. package/dist/pi/packages/ta-glance/lib/card.d.ts +8 -0
  302. package/dist/pi/packages/ta-glance/lib/card.js +268 -0
  303. package/dist/pi/packages/ta-glance/lib/extension.d.ts +15 -0
  304. package/dist/pi/packages/ta-glance/lib/extension.js +24 -0
  305. package/dist/pi/packages/ta-glance/lib/glance-json.d.ts +9 -0
  306. package/dist/pi/packages/ta-glance/lib/glance-json.js +85 -0
  307. package/dist/pi/packages/ta-glance/lib/glance-prompt.d.ts +7 -0
  308. package/dist/pi/packages/ta-glance/lib/glance-prompt.js +34 -0
  309. package/dist/pi/packages/ta-glance/lib/glance-protocol.d.ts +98 -0
  310. package/dist/pi/packages/ta-glance/lib/glance-protocol.js +8 -0
  311. package/dist/pi/packages/ta-glance/lib/glance-spec.d.ts +6 -0
  312. package/dist/pi/packages/ta-glance/lib/glance-spec.js +204 -0
  313. package/dist/pi/packages/ta-glance/lib/glance-util.d.ts +3 -0
  314. package/dist/pi/packages/ta-glance/lib/glance-util.js +12 -0
  315. package/dist/pi/packages/ta-glance/lib/i18n.d.ts +22 -0
  316. package/dist/pi/packages/ta-glance/lib/i18n.js +41 -0
  317. package/dist/pi/packages/ta-glance/lib/index.d.ts +7 -0
  318. package/dist/pi/packages/ta-glance/lib/index.js +22 -0
  319. package/dist/pi/packages/ta-glance/lib/react.d.ts +8 -0
  320. package/dist/pi/packages/ta-glance/lib/react.js +8 -0
  321. package/dist/pi/packages/ta-glance/lib/style.d.ts +4 -0
  322. package/dist/pi/packages/ta-glance/lib/style.js +164 -0
  323. package/dist/pi/packages/ta-glance/package.json +53 -0
  324. package/dist/pi/packages/ta-glance/web/index.js +933 -0
  325. package/dist/pi/packages/ta-launcher/lib/actions.d.ts +4 -4
  326. package/dist/pi/packages/ta-launcher/lib/actions.js +7 -3
  327. package/dist/pi/packages/ta-launcher/lib/launcher-util.d.ts +7 -7
  328. package/dist/pi/packages/ta-launcher/lib/launcher-util.js +11 -8
  329. package/dist/pi/packages/ta-launcher/lib/launcher-view.js +13 -7
  330. package/dist/pi/packages/ta-launcher/lib/react.d.ts +3 -0
  331. package/dist/pi/packages/ta-launcher/lib/react.js +8 -0
  332. package/dist/pi/packages/ta-launcher/lib/style.d.ts +1 -1
  333. package/dist/pi/packages/ta-launcher/lib/style.js +6 -4
  334. package/dist/pi/packages/ta-launcher/package.json +1 -1
  335. package/dist/pi/packages/ta-launcher/web/index.js +34 -17
  336. package/dist/pi/packages/ta-manual/README.en.md +10 -0
  337. package/dist/pi/packages/ta-manual/README.md +10 -0
  338. package/dist/pi/packages/ta-manual/lib/i18n.d.ts +15 -0
  339. package/dist/pi/packages/ta-manual/lib/i18n.js +31 -0
  340. package/dist/pi/packages/ta-manual/lib/index.d.ts +7 -0
  341. package/dist/pi/packages/ta-manual/lib/index.js +24 -0
  342. package/dist/pi/packages/ta-manual/lib/manual-util.d.ts +18 -0
  343. package/dist/pi/packages/ta-manual/lib/manual-util.js +40 -0
  344. package/dist/pi/packages/ta-manual/lib/manual-view.d.ts +9 -0
  345. package/dist/pi/packages/ta-manual/lib/manual-view.js +81 -0
  346. package/dist/pi/packages/ta-manual/lib/pictures-a.d.ts +2 -0
  347. package/dist/pi/packages/ta-manual/lib/pictures-a.js +263 -0
  348. package/dist/pi/packages/ta-manual/lib/pictures-b.d.ts +2 -0
  349. package/dist/pi/packages/ta-manual/lib/pictures-b.js +216 -0
  350. package/dist/pi/packages/ta-manual/lib/pictures.d.ts +9 -0
  351. package/dist/pi/packages/ta-manual/lib/pictures.js +16 -0
  352. package/dist/pi/packages/ta-manual/lib/react.d.ts +8 -0
  353. package/dist/pi/packages/ta-manual/lib/react.js +8 -0
  354. package/dist/pi/packages/ta-manual/lib/scene.d.ts +68 -0
  355. package/dist/pi/packages/ta-manual/lib/scene.js +115 -0
  356. package/dist/pi/packages/ta-manual/lib/style.d.ts +4 -0
  357. package/dist/pi/packages/ta-manual/lib/style.js +47 -0
  358. package/dist/pi/packages/ta-manual/lib/topics.d.ts +42 -0
  359. package/dist/pi/packages/ta-manual/lib/topics.js +354 -0
  360. package/dist/pi/packages/ta-manual/package.json +54 -0
  361. package/dist/pi/packages/ta-manual/skills/ta-manual/SKILL.md +119 -0
  362. package/dist/pi/packages/ta-manual/web/index.js +2223 -0
  363. package/dist/pi/packages/ta-notify/README.en.md +29 -0
  364. package/dist/pi/packages/ta-notify/README.md +29 -0
  365. package/dist/pi/packages/ta-notify/extension/index.mjs +259 -0
  366. package/dist/pi/packages/ta-notify/host/index.mjs +163 -0
  367. package/dist/pi/packages/ta-notify/lib/ask-card.d.ts +9 -0
  368. package/dist/pi/packages/ta-notify/lib/ask-card.js +40 -0
  369. package/dist/pi/packages/ta-notify/lib/extension.d.ts +24 -0
  370. package/dist/pi/packages/ta-notify/lib/extension.js +102 -0
  371. package/dist/pi/packages/ta-notify/lib/host.d.ts +4 -0
  372. package/dist/pi/packages/ta-notify/lib/host.js +9 -0
  373. package/dist/pi/packages/ta-notify/lib/i18n.d.ts +31 -0
  374. package/dist/pi/packages/ta-notify/lib/i18n.js +63 -0
  375. package/dist/pi/packages/ta-notify/lib/index.d.ts +8 -0
  376. package/dist/pi/packages/ta-notify/lib/index.js +29 -0
  377. package/dist/pi/packages/ta-notify/lib/notify-protocol.d.ts +74 -0
  378. package/dist/pi/packages/ta-notify/lib/notify-protocol.js +23 -0
  379. package/dist/pi/packages/ta-notify/lib/notify-service.d.ts +21 -0
  380. package/dist/pi/packages/ta-notify/lib/notify-service.js +75 -0
  381. package/dist/pi/packages/ta-notify/lib/notify-util.d.ts +39 -0
  382. package/dist/pi/packages/ta-notify/lib/notify-util.js +119 -0
  383. package/dist/pi/packages/ta-notify/lib/react.d.ts +8 -0
  384. package/dist/pi/packages/ta-notify/lib/react.js +8 -0
  385. package/dist/pi/packages/ta-notify/lib/server-texts.d.ts +9 -0
  386. package/dist/pi/packages/ta-notify/lib/server-texts.js +22 -0
  387. package/dist/pi/packages/ta-notify/lib/settings.d.ts +8 -0
  388. package/dist/pi/packages/ta-notify/lib/settings.js +85 -0
  389. package/dist/pi/packages/ta-notify/lib/style.d.ts +4 -0
  390. package/dist/pi/packages/ta-notify/lib/style.js +29 -0
  391. package/dist/pi/packages/ta-notify/lib/tool-line.d.ts +9 -0
  392. package/dist/pi/packages/ta-notify/lib/tool-line.js +20 -0
  393. package/dist/pi/packages/ta-notify/lib/tool.d.ts +37 -0
  394. package/dist/pi/packages/ta-notify/lib/tool.js +46 -0
  395. package/dist/pi/packages/ta-notify/lib/watcher.d.ts +15 -0
  396. package/dist/pi/packages/ta-notify/lib/watcher.js +81 -0
  397. package/dist/pi/packages/ta-notify/package.json +55 -0
  398. package/dist/pi/packages/ta-notify/web/index.js +436 -0
  399. package/dist/pi/packages/ta-recall/README.en.md +19 -0
  400. package/dist/pi/packages/ta-recall/README.md +19 -0
  401. package/dist/pi/packages/ta-recall/extension/index.mjs +614 -0
  402. package/dist/pi/packages/ta-recall/host/index.mjs +820 -0
  403. package/dist/pi/packages/ta-recall/lib/brief-card.d.ts +21 -0
  404. package/dist/pi/packages/ta-recall/lib/brief-card.js +67 -0
  405. package/dist/pi/packages/ta-recall/lib/brief-home.d.ts +49 -0
  406. package/dist/pi/packages/ta-recall/lib/brief-home.js +143 -0
  407. package/dist/pi/packages/ta-recall/lib/brief-seen.d.ts +9 -0
  408. package/dist/pi/packages/ta-recall/lib/brief-seen.js +26 -0
  409. package/dist/pi/packages/ta-recall/lib/brief-util.d.ts +64 -0
  410. package/dist/pi/packages/ta-recall/lib/brief-util.js +179 -0
  411. package/dist/pi/packages/ta-recall/lib/chat-icons.d.ts +8 -0
  412. package/dist/pi/packages/ta-recall/lib/chat-icons.js +56 -0
  413. package/dist/pi/packages/ta-recall/lib/composer.d.ts +7 -0
  414. package/dist/pi/packages/ta-recall/lib/composer.js +38 -0
  415. package/dist/pi/packages/ta-recall/lib/conversation-index.d.ts +25 -0
  416. package/dist/pi/packages/ta-recall/lib/conversation-index.js +72 -0
  417. package/dist/pi/packages/ta-recall/lib/conversation-util.d.ts +16 -0
  418. package/dist/pi/packages/ta-recall/lib/conversation-util.js +109 -0
  419. package/dist/pi/packages/ta-recall/lib/conversations.d.ts +11 -0
  420. package/dist/pi/packages/ta-recall/lib/conversations.js +46 -0
  421. package/dist/pi/packages/ta-recall/lib/extension.d.ts +24 -0
  422. package/dist/pi/packages/ta-recall/lib/extension.js +131 -0
  423. package/dist/pi/packages/ta-recall/lib/host.d.ts +4 -0
  424. package/dist/pi/packages/ta-recall/lib/host.js +11 -0
  425. package/dist/pi/packages/ta-recall/lib/i18n.d.ts +41 -0
  426. package/dist/pi/packages/ta-recall/lib/i18n.js +83 -0
  427. package/dist/pi/packages/ta-recall/lib/index.d.ts +9 -0
  428. package/dist/pi/packages/ta-recall/lib/index.js +45 -0
  429. package/dist/pi/packages/ta-recall/lib/react.d.ts +11 -0
  430. package/dist/pi/packages/ta-recall/lib/react.js +16 -0
  431. package/dist/pi/packages/ta-recall/lib/recall-protocol.d.ts +186 -0
  432. package/dist/pi/packages/ta-recall/lib/recall-protocol.js +60 -0
  433. package/dist/pi/packages/ta-recall/lib/recall-service.d.ts +42 -0
  434. package/dist/pi/packages/ta-recall/lib/recall-service.js +241 -0
  435. package/dist/pi/packages/ta-recall/lib/search-source.d.ts +7 -0
  436. package/dist/pi/packages/ta-recall/lib/search-source.js +49 -0
  437. package/dist/pi/packages/ta-recall/lib/search-util.d.ts +30 -0
  438. package/dist/pi/packages/ta-recall/lib/search-util.js +167 -0
  439. package/dist/pi/packages/ta-recall/lib/server-texts.d.ts +7 -0
  440. package/dist/pi/packages/ta-recall/lib/server-texts.js +17 -0
  441. package/dist/pi/packages/ta-recall/lib/settings.d.ts +4 -0
  442. package/dist/pi/packages/ta-recall/lib/settings.js +77 -0
  443. package/dist/pi/packages/ta-recall/lib/skill-card.d.ts +9 -0
  444. package/dist/pi/packages/ta-recall/lib/skill-card.js +51 -0
  445. package/dist/pi/packages/ta-recall/lib/skill-util.d.ts +19 -0
  446. package/dist/pi/packages/ta-recall/lib/skill-util.js +110 -0
  447. package/dist/pi/packages/ta-recall/lib/stored.d.ts +5 -0
  448. package/dist/pi/packages/ta-recall/lib/stored.js +28 -0
  449. package/dist/pi/packages/ta-recall/lib/style.d.ts +4 -0
  450. package/dist/pi/packages/ta-recall/lib/style.js +48 -0
  451. package/dist/pi/packages/ta-recall/lib/tool-line.d.ts +10 -0
  452. package/dist/pi/packages/ta-recall/lib/tool-line.js +23 -0
  453. package/dist/pi/packages/ta-recall/lib/tool.d.ts +63 -0
  454. package/dist/pi/packages/ta-recall/lib/tool.js +71 -0
  455. package/dist/pi/packages/ta-recall/package.json +55 -0
  456. package/dist/pi/packages/ta-recall/web/index.js +1038 -0
  457. package/dist/pi/packages/ta-rooms/README.en.md +23 -0
  458. package/dist/pi/packages/ta-rooms/README.md +23 -0
  459. package/dist/pi/packages/ta-rooms/lib/dialogs.d.ts +39 -0
  460. package/dist/pi/packages/ta-rooms/lib/dialogs.js +235 -0
  461. package/dist/pi/packages/ta-rooms/lib/i18n.d.ts +101 -0
  462. package/dist/pi/packages/ta-rooms/lib/i18n.js +203 -0
  463. package/dist/pi/packages/ta-rooms/lib/index.d.ts +9 -0
  464. package/dist/pi/packages/ta-rooms/lib/index.js +85 -0
  465. package/dist/pi/packages/ta-rooms/lib/members-view.d.ts +3 -0
  466. package/dist/pi/packages/ta-rooms/lib/members-view.js +64 -0
  467. package/dist/pi/packages/ta-rooms/lib/page.d.ts +105 -0
  468. package/dist/pi/packages/ta-rooms/lib/page.js +306 -0
  469. package/dist/pi/packages/ta-rooms/lib/react.d.ts +8 -0
  470. package/dist/pi/packages/ta-rooms/lib/react.js +8 -0
  471. package/dist/pi/packages/ta-rooms/lib/room-view.d.ts +17 -0
  472. package/dist/pi/packages/ta-rooms/lib/room-view.js +150 -0
  473. package/dist/pi/packages/ta-rooms/lib/rooms-page.d.ts +8 -0
  474. package/dist/pi/packages/ta-rooms/lib/rooms-page.js +174 -0
  475. package/dist/pi/packages/ta-rooms/lib/style.d.ts +4 -0
  476. package/dist/pi/packages/ta-rooms/lib/style.js +154 -0
  477. package/dist/pi/packages/ta-rooms/package.json +50 -0
  478. package/dist/pi/packages/ta-rooms/web/index.js +1932 -0
  479. package/dist/pi/packages/ta-share/README.en.md +27 -0
  480. package/dist/pi/packages/ta-share/README.md +27 -0
  481. package/dist/pi/packages/ta-share/extension/index.mjs +184 -0
  482. package/dist/pi/packages/ta-share/host/index.mjs +364 -0
  483. package/dist/pi/packages/ta-share/lib/extension.d.ts +15 -0
  484. package/dist/pi/packages/ta-share/lib/extension.js +115 -0
  485. package/dist/pi/packages/ta-share/lib/host.d.ts +4 -0
  486. package/dist/pi/packages/ta-share/lib/host.js +9 -0
  487. package/dist/pi/packages/ta-share/lib/i18n.d.ts +106 -0
  488. package/dist/pi/packages/ta-share/lib/i18n.js +213 -0
  489. package/dist/pi/packages/ta-share/lib/index.d.ts +9 -0
  490. package/dist/pi/packages/ta-share/lib/index.js +77 -0
  491. package/dist/pi/packages/ta-share/lib/page.d.ts +48 -0
  492. package/dist/pi/packages/ta-share/lib/page.js +105 -0
  493. package/dist/pi/packages/ta-share/lib/react.d.ts +8 -0
  494. package/dist/pi/packages/ta-share/lib/react.js +8 -0
  495. package/dist/pi/packages/ta-share/lib/server-texts.d.ts +14 -0
  496. package/dist/pi/packages/ta-share/lib/server-texts.js +52 -0
  497. package/dist/pi/packages/ta-share/lib/share-dialog.d.ts +18 -0
  498. package/dist/pi/packages/ta-share/lib/share-dialog.js +233 -0
  499. package/dist/pi/packages/ta-share/lib/share-protocol.d.ts +86 -0
  500. package/dist/pi/packages/ta-share/lib/share-protocol.js +30 -0
  501. package/dist/pi/packages/ta-share/lib/share-service.d.ts +50 -0
  502. package/dist/pi/packages/ta-share/lib/share-service.js +130 -0
  503. package/dist/pi/packages/ta-share/lib/shared-view.d.ts +18 -0
  504. package/dist/pi/packages/ta-share/lib/shared-view.js +225 -0
  505. package/dist/pi/packages/ta-share/lib/shares-page.d.ts +3 -0
  506. package/dist/pi/packages/ta-share/lib/shares-page.js +54 -0
  507. package/dist/pi/packages/ta-share/lib/snapshot.d.ts +30 -0
  508. package/dist/pi/packages/ta-share/lib/snapshot.js +195 -0
  509. package/dist/pi/packages/ta-share/lib/style.d.ts +4 -0
  510. package/dist/pi/packages/ta-share/lib/style.js +111 -0
  511. package/dist/pi/packages/ta-share/package.json +56 -0
  512. package/dist/pi/packages/ta-share/web/index.js +1197 -0
  513. package/dist/pi/packages/ta-workspace/README.md +2 -2
  514. package/dist/pi/packages/ta-workspace/README.zh-cn.md +2 -2
  515. package/dist/pi/packages/ta-workspace/lib/browser-common.d.ts +1 -1
  516. package/dist/pi/packages/ta-workspace/lib/browser-common.js +29 -30
  517. package/dist/pi/packages/ta-workspace/lib/browser-tool-line.d.ts +15 -0
  518. package/dist/pi/packages/ta-workspace/lib/browser-tool-line.js +70 -0
  519. package/dist/pi/packages/ta-workspace/lib/bytes.d.ts +11 -0
  520. package/dist/pi/packages/ta-workspace/lib/bytes.js +40 -0
  521. package/dist/pi/packages/ta-workspace/lib/common.d.ts +2 -1
  522. package/dist/pi/packages/ta-workspace/lib/common.js +15 -37
  523. package/dist/pi/packages/ta-workspace/lib/editors.js +40 -4
  524. package/dist/pi/packages/ta-workspace/lib/i18n.d.ts +14 -4
  525. package/dist/pi/packages/ta-workspace/lib/i18n.js +31 -11
  526. package/dist/pi/packages/ta-workspace/lib/index.js +17 -0
  527. package/dist/pi/packages/ta-workspace/lib/launcher.d.ts +9 -0
  528. package/dist/pi/packages/ta-workspace/lib/launcher.js +39 -0
  529. package/dist/pi/packages/ta-workspace/lib/preview.d.ts +22 -3
  530. package/dist/pi/packages/ta-workspace/lib/preview.js +150 -22
  531. package/dist/pi/packages/ta-workspace/lib/style.d.ts +1 -1
  532. package/dist/pi/packages/ta-workspace/lib/style.js +70 -41
  533. package/dist/pi/packages/ta-workspace/lib/terminal-sessions.d.ts +15 -4
  534. package/dist/pi/packages/ta-workspace/lib/terminal-sessions.js +31 -9
  535. package/dist/pi/packages/ta-workspace/lib/terminal.d.ts +3 -2
  536. package/dist/pi/packages/ta-workspace/lib/terminal.js +51 -21
  537. package/dist/pi/packages/ta-workspace/lib/util/keys.d.ts +18 -0
  538. package/dist/pi/packages/ta-workspace/lib/util/keys.js +23 -0
  539. package/dist/pi/packages/ta-workspace/lib/util/preview.d.ts +46 -0
  540. package/dist/pi/packages/ta-workspace/lib/util/preview.js +106 -1
  541. package/dist/pi/packages/ta-workspace/lib/util/terminal.d.ts +5 -0
  542. package/dist/pi/packages/ta-workspace/lib/util/terminal.js +14 -0
  543. package/dist/pi/packages/ta-workspace/package.json +1 -1
  544. package/dist/pi/packages/ta-workspace/web/index.js +1032 -382
  545. package/dist/public/assets/OrbitControls-DVf70a7w.js +1 -0
  546. package/dist/public/assets/{abnfDiagram-S7VZAUFO-EVMX_yOb.js → abnfDiagram-S7VZAUFO-D9uU0Tx2.js} +1 -1
  547. package/dist/public/assets/{architecture-WOLXFQ4H-CDgbgZ_o.js → architecture-WOLXFQ4H-f7Nm7EIo.js} +1 -1
  548. package/dist/public/assets/{architectureDiagram-YGSQEFNW-dHreaCWz.js → architectureDiagram-YGSQEFNW-DSAqlcms.js} +1 -1
  549. package/dist/public/assets/{blockDiagram-APKKGZFW-D6FhzBDq.js → blockDiagram-APKKGZFW-C0lPIW9g.js} +1 -1
  550. package/dist/public/assets/browser-WLpgVYno.js +12 -0
  551. package/dist/public/assets/{c4Diagram-KJ2TOQU5-BFpcr8Cs.js → c4Diagram-KJ2TOQU5-CDcZ7mJq.js} +1 -1
  552. package/dist/public/assets/{chunk-6MUBBAK2-BczXkMV-.js → chunk-6MUBBAK2-CXPuyqPL.js} +1 -1
  553. package/dist/public/assets/{chunk-AXFCVDMN-CjJsv3jB.js → chunk-AXFCVDMN-Du6JRX1x.js} +1 -1
  554. package/dist/public/assets/{chunk-BG4553SI-FBaleaLz.js → chunk-BG4553SI-D592E55X.js} +1 -1
  555. package/dist/public/assets/{chunk-DQASFODM-BFdXY5sX.js → chunk-DQASFODM-BW2r2SL4.js} +1 -1
  556. package/dist/public/assets/{chunk-HFQBQIA3-C5cwK-Fg.js → chunk-HFQBQIA3-C3yoe54R.js} +1 -1
  557. package/dist/public/assets/{chunk-KQLB2F66-BUek3IRk.js → chunk-KQLB2F66-DF8gfYCy.js} +1 -1
  558. package/dist/public/assets/{chunk-KS47KZWR-BxsYBzt6.js → chunk-KS47KZWR-C8CRMTv1.js} +1 -1
  559. package/dist/public/assets/{chunk-LEVMRMFU-Bdcwz9fS.js → chunk-LEVMRMFU-BDcMKiwj.js} +1 -1
  560. package/dist/public/assets/{chunk-M57EVK23-kkpP5oug.js → chunk-M57EVK23-CKJPBygc.js} +1 -1
  561. package/dist/public/assets/{chunk-OY52VR5R-CFhQgxmD.js → chunk-OY52VR5R-B3ZWH07L.js} +1 -1
  562. package/dist/public/assets/{chunk-QB3YPZ4I-BVXqu0eC.js → chunk-QB3YPZ4I-DI-z4UPL.js} +1 -1
  563. package/dist/public/assets/{chunk-R3KSYZAL-B7SUqqLI.js → chunk-R3KSYZAL-Bg4-haAc.js} +1 -1
  564. package/dist/public/assets/{chunk-STOXU5M4-B3abfbnH.js → chunk-STOXU5M4-l_SHib3p.js} +1 -1
  565. package/dist/public/assets/{chunk-TU62E6Q5-C9NqnUav.js → chunk-TU62E6Q5-BINu9tIm.js} +1 -1
  566. package/dist/public/assets/{chunk-X4PVCEUW-BeLfETDx.js → chunk-X4PVCEUW-BQn-mvV5.js} +1 -1
  567. package/dist/public/assets/{chunk-XXDRQBXY-DXai1i8p.js → chunk-XXDRQBXY-uvpAu0Ys.js} +1 -1
  568. package/dist/public/assets/{classDiagram-v2-L25IHNXF-Zj6ne_tC.js → classDiagram-v2-L25IHNXF-BIowooW1.js} +1 -1
  569. package/dist/public/assets/{cose-bilkent-JH36ORCC-C0-TjqfJ.js → cose-bilkent-JH36ORCC-BTyx1Mh2.js} +1 -1
  570. package/dist/public/assets/cynefin-EF2NZ3EQ-Dg54eFzZ.js +1 -0
  571. package/dist/public/assets/{cynefinDiagram-L36ESFBY-BnqxfzPa.js → cynefinDiagram-L36ESFBY-D64EU9I0.js} +1 -1
  572. package/dist/public/assets/{d3-selection-DfFLTR9d.js → d3-selection-CN9k6_B9.js} +1 -1
  573. package/dist/public/assets/{dagre-SPEB5RXH-kI17e5cH.js → dagre-SPEB5RXH-FCbz2-Kk.js} +1 -1
  574. package/dist/public/assets/{diagram-3B7GL73J-DgPjeLA5.js → diagram-3B7GL73J-OhHUSI7j.js} +1 -1
  575. package/dist/public/assets/{diagram-DNEMPZML-CRhPfa0I.js → diagram-DNEMPZML-Be4xMtp6.js} +1 -1
  576. package/dist/public/assets/{diagram-L3MUGCDN-ExuTg12b.js → diagram-L3MUGCDN-CmKSs3aG.js} +1 -1
  577. package/dist/public/assets/{diagram-LA4NIPWU-Dgx5xNiY.js → diagram-LA4NIPWU-D1C32rMN.js} +1 -1
  578. package/dist/public/assets/{diagram-MHCOC4E2-BuifkUTl.js → diagram-MHCOC4E2-BjoE6JXs.js} +1 -1
  579. package/dist/public/assets/{diagram-XPFHEONP-CFEaBo7z.js → diagram-XPFHEONP-B22k4v8R.js} +1 -1
  580. package/dist/public/assets/{dist-C-iJHcSK.js → dist-DcBP8Cf6.js} +1 -1
  581. package/dist/public/assets/{ebnfDiagram-UZSYDL2S-D-hp5yNt.js → ebnfDiagram-UZSYDL2S-Tn-K8-X7.js} +1 -1
  582. package/dist/public/assets/{editor.api-BopUWpqY.js → editor.api-Bz4sjRz_.js} +1 -1
  583. package/dist/public/assets/{elk-XV6XMXQE-CBbk_IpU.js → elk-XV6XMXQE-COnQsWlN.js} +1 -1
  584. package/dist/public/assets/{erDiagram-EYBAPDEH-B02R_WWE.js → erDiagram-EYBAPDEH-c53dJilq.js} +1 -1
  585. package/dist/public/assets/{eventmodeling-K75KTNOO-aCZfYnCI.js → eventmodeling-K75KTNOO-DaFpPPks.js} +1 -1
  586. package/dist/public/assets/flowDiagram-MALGAFMO-V5qkYWIO.js +1 -0
  587. package/dist/public/assets/{freemarker2-DMN60LeK.js → freemarker2-BLxfRHsw.js} +1 -1
  588. package/dist/public/assets/{ganttDiagram-23REXITY-DioU8TlD.js → ganttDiagram-23REXITY-Md-SavIS.js} +1 -1
  589. package/dist/public/assets/gitGraph-VSP46ZUC-1q8ldRXU.js +1 -0
  590. package/dist/public/assets/{gitGraphDiagram-STJD7YCW--q3ctg6y.js → gitGraphDiagram-STJD7YCW-CMSwTghO.js} +1 -1
  591. package/dist/public/assets/{handlebars-B_-qdvpB.js → handlebars-sNpu01kP.js} +1 -1
  592. package/dist/public/assets/{html-BN8Ah3Js.js → html-C_tKd-uP.js} +1 -1
  593. package/dist/public/assets/{index-B3A--ac8.js → index-Bn86rI4n.js} +2 -2
  594. package/dist/public/assets/info-OHQRW6UA-Crere6sx.js +1 -0
  595. package/dist/public/assets/{infoDiagram-KBXO4MBG-CGXteYo9.js → infoDiagram-KBXO4MBG-CwgNj-7i.js} +1 -1
  596. package/dist/public/assets/{ishikawaDiagram-M35NCXHK-DM2LmOAc.js → ishikawaDiagram-M35NCXHK-BSlzQNMN.js} +1 -1
  597. package/dist/public/assets/{javascript-BlizGb0q.js → javascript-l3qKw0L-.js} +1 -1
  598. package/dist/public/assets/{journeyDiagram-OPLOXDXO-CNITRtGl.js → journeyDiagram-OPLOXDXO-B09LPEnF.js} +1 -1
  599. package/dist/public/assets/{jsonMode-CEUmT5sN.js → jsonMode-5SQQn1EX.js} +1 -1
  600. package/dist/public/assets/{kanban-definition-BZKZHSQY-BPUuS9um.js → kanban-definition-BZKZHSQY-BiW4aJ29.js} +1 -1
  601. package/dist/public/assets/{liquid-BbyLjUbE.js → liquid-BGyTIIUt.js} +1 -1
  602. package/dist/public/assets/{mdx-DiQz7Q35.js → mdx-8tGjz4em.js} +1 -1
  603. package/dist/public/assets/{mermaid-parser.core-Dum100hC.js → mermaid-parser.core-CctN5b0z.js} +3 -3
  604. package/dist/public/assets/{mermaid.core-BWmWf6XO.js → mermaid.core-7ERSdZ4-.js} +4 -4
  605. package/dist/public/assets/{mindmap-definition-I2QAS2VK-L8HyYUDY.js → mindmap-definition-I2QAS2VK-D-GOUwW1.js} +1 -1
  606. package/dist/public/assets/module-DEqsdd00.js +1 -0
  607. package/dist/public/assets/module-TWc52XwT.js +2244 -0
  608. package/dist/public/assets/{monaco-zOOyBmxy.js → monaco-B_9hlk78.js} +3 -3
  609. package/dist/public/assets/packet-JDAUHWVQ-qMf5LkHT.js +1 -0
  610. package/dist/public/assets/{pegDiagram-FD4XPPHP-CTZKPo0Z.js → pegDiagram-FD4XPPHP-Dmy1fWB3.js} +1 -1
  611. package/dist/public/assets/phaser.esm-BxCDEWDb.js +3202 -0
  612. package/dist/public/assets/pie-XZMESJXO-BjqLn4qm.js +1 -0
  613. package/dist/public/assets/{pieDiagram-J4AKIIQI-DAeT3dFi.js → pieDiagram-J4AKIIQI-CXFHLYTg.js} +1 -1
  614. package/dist/public/assets/{python-C984gt98.js → python-e-JK0s5M.js} +1 -1
  615. package/dist/public/assets/{quadrantDiagram-XTYBLID2--PXxwV1Z.js → quadrantDiagram-XTYBLID2-RQvEpGWO.js} +1 -1
  616. package/dist/public/assets/radar-ABXABTNO-DWO6t_4C.js +1 -0
  617. package/dist/public/assets/railroad-I3PHUGI6-D1XOJPWy.js +1 -0
  618. package/dist/public/assets/{railroad-abnf-LNEFI6M7-BYcFfrCa.js → railroad-abnf-LNEFI6M7-CDOSPZwX.js} +1 -1
  619. package/dist/public/assets/{railroad-ebnf-DWYD2UWJ-Cd33qxAm.js → railroad-ebnf-DWYD2UWJ-BTrNQ0DX.js} +1 -1
  620. package/dist/public/assets/{railroad-peg-JR7BVNR7-C5TpzaU8.js → railroad-peg-JR7BVNR7-B7NtVofS.js} +1 -1
  621. package/dist/public/assets/{railroadDiagram-MRQ6NCDL-DlWwjbhH.js → railroadDiagram-MRQ6NCDL-DsDrT0Jf.js} +1 -1
  622. package/dist/public/assets/{razor-BBqMR1Qn.js → razor-DtSPwumi.js} +1 -1
  623. package/dist/public/assets/{requirementDiagram-Y7LWUY3S-CsYBy9HS.js → requirementDiagram-Y7LWUY3S-BQh0hFuA.js} +1 -1
  624. package/dist/public/assets/{sankeyDiagram-WGJFYUXA-Baxyb5p9.js → sankeyDiagram-WGJFYUXA-BUXNAQEF.js} +1 -1
  625. package/dist/public/assets/{sequenceDiagram-5NDRBG5M-Cq6VeBT_.js → sequenceDiagram-5NDRBG5M-05f-N5V_.js} +1 -1
  626. package/dist/public/assets/{stateDiagram-v2-FJ4FJNEA-O60WKaE7.js → stateDiagram-v2-FJ4FJNEA-D6V1fGWV.js} +1 -1
  627. package/dist/public/assets/{swimlanes-UMQ2AFYF-C2nf1-Cc.js → swimlanes-UMQ2AFYF-DWhlPvKs.js} +1 -1
  628. package/dist/public/assets/swimlanesDiagram-OMPLPG4O-CRn5uHsY.js +8 -0
  629. package/dist/public/assets/three.module-CeVBJVoU.js +4225 -0
  630. package/dist/public/assets/{timeline-definition-SEUHKTQE-DEfUG6YH.js → timeline-definition-SEUHKTQE-CMdocOui.js} +1 -1
  631. package/dist/public/assets/treeView-D4JQ5SDB-D09wHNzT.js +1 -0
  632. package/dist/public/assets/treemap-SAJKECNS-ChxAT7Fq.js +1 -0
  633. package/dist/public/assets/{typescript-Gtq7f0aU.js → typescript-65jNyipU.js} +1 -1
  634. package/dist/public/assets/{usecaseDiagram-AFA6YXN4-Gw9DyJcx.js → usecaseDiagram-AFA6YXN4-BQTHUX1f.js} +1 -1
  635. package/dist/public/assets/{vennDiagram-NNMJR3RB-Clb3MLWF.js → vennDiagram-NNMJR3RB-BULkVTfA.js} +1 -1
  636. package/dist/public/assets/wardley-7MLQ67FV-DfSjKzbJ.js +1 -0
  637. package/dist/public/assets/{wardleyDiagram-S7YFUSEH-BrTRpwu2.js → wardleyDiagram-S7YFUSEH-Cek6l8lz.js} +1 -1
  638. package/dist/public/assets/{xml-Bx3nk7iG.js → xml-DWBejfu-.js} +1 -1
  639. package/dist/public/assets/{xychartDiagram-GGNKY7IX-BfjTcIsb.js → xychartDiagram-GGNKY7IX-ujnZQTWA.js} +1 -1
  640. package/dist/public/assets/{yaml-dFLE_rSl.js → yaml-CwRCT7q1.js} +1 -1
  641. package/dist/public/index.html +1 -1
  642. package/dist/public/launch.svg +46 -42
  643. package/dist/serve/index.mjs +8244 -3756
  644. package/package.json +33 -26
  645. package/dist/pi/dist/bundle/chunks/anthropic-messages-BWGCKOF4.js +0 -6
  646. package/dist/pi/dist/bundle/chunks/chunk-44DLKSKE.js +0 -1232
  647. package/dist/pi/dist/bundle/chunks/chunk-62VOPMLK.js +0 -65
  648. package/dist/pi/dist/bundle/chunks/chunk-7O7QKK6A.js +0 -2
  649. package/dist/pi/dist/bundle/chunks/chunk-CHWNPHIS.js +0 -82
  650. package/dist/pi/dist/bundle/chunks/chunk-NL4X6LBY.js +0 -4
  651. package/dist/pi/dist/bundle/chunks/chunk-NZY7EIPA.js +0 -4
  652. package/dist/pi/dist/bundle/chunks/chunk-R2EGYMOO.js +0 -7
  653. package/dist/pi/dist/bundle/chunks/chunk-UKVNB6C4.js +0 -2
  654. package/dist/pi/dist/bundle/chunks/chunk-USJZMAIR.js +0 -2
  655. package/dist/pi/dist/bundle/chunks/chunk-VOLAXWGI.js +0 -2
  656. package/dist/pi/dist/bundle/chunks/openai-codex-responses-QAWLOQSN.js +0 -10
  657. package/dist/pi/dist/bundle/chunks/openai-responses-MD3562FB.js +0 -4
  658. package/dist/pi/dist/bundle/chunks/virtual-modules-O76XM3OB.js +0 -2
  659. package/dist/public/assets/browser-y6EDNUmc.js +0 -12
  660. package/dist/public/assets/cynefin-EF2NZ3EQ-CoY4CrZu.js +0 -1
  661. package/dist/public/assets/flowDiagram-MALGAFMO-CATkJShO.js +0 -1
  662. package/dist/public/assets/gitGraph-VSP46ZUC-g4yHXXxx.js +0 -1
  663. package/dist/public/assets/info-OHQRW6UA-CKADJjz4.js +0 -1
  664. package/dist/public/assets/module-CH7IXa5L.js +0 -1781
  665. package/dist/public/assets/module-DNAasuMC.js +0 -1
  666. package/dist/public/assets/packet-JDAUHWVQ-CpKMhX4K.js +0 -1
  667. package/dist/public/assets/pie-XZMESJXO-CW-zGDRd.js +0 -1
  668. package/dist/public/assets/radar-ABXABTNO-Cg8W433p.js +0 -1
  669. package/dist/public/assets/railroad-I3PHUGI6-DriMt2PQ.js +0 -1
  670. package/dist/public/assets/swimlanesDiagram-OMPLPG4O-B46JxqS8.js +0 -8
  671. package/dist/public/assets/treeView-D4JQ5SDB-1LhEWwC9.js +0 -1
  672. package/dist/public/assets/treemap-SAJKECNS-D3t3N7nS.js +0 -1
  673. package/dist/public/assets/wardley-7MLQ67FV-D3sAsd8p.js +0 -1
@@ -0,0 +1,133 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChatTask = exports.TASK_BLOCK = void 0;
4
+ const cron_protocol_1 = require("./cron-protocol");
5
+ const i18n_1 = require("./i18n");
6
+ const schedule_util_1 = require("./schedule-util");
7
+ const tool_1 = require("./tool");
8
+ /** The language of the fenced block in which Ta writes the task; the pi extension creates it from there. */
9
+ exports.TASK_BLOCK = 'ta-cron-task';
10
+ /** Starts the context of the ask, with the schedule picked, if any: how the pi extension knows the ask. */
11
+ const MARK = /\[ta-cron:from-chat(?: (\{[^}]*\}))?\]/;
12
+ /**
13
+ * Making what a conversation did a scheduled task, from the + of its message box. The page asks Ta in that
14
+ * conversation: a line in the user's language, which the conversation shows, after a `<context>` block for
15
+ * the model, which the pages of Ta leave out (TaMessageContext of @celljs/ta-protocol, not bundled here).
16
+ * Ta answers with the task in a `ta-cron-task` block, and the pi extension creates it (extension.ts): so it
17
+ * works with any model, another coding agent too, which has no tool schedule_task.
18
+ */
19
+ var ChatTask;
20
+ (function (ChatTask) {
21
+ function message(language, schedule) {
22
+ const words = i18n_1.CronWords.of(language);
23
+ const ask = schedule ? i18n_1.CronWords.format(words.fromChatAsk, { when: schedule_util_1.ScheduleUtil.describe(schedule, language) }) : words.fromChatAskWhen;
24
+ return `<context>\n${context(schedule)}\n</context>\n${ask}`;
25
+ }
26
+ ChatTask.message = message;
27
+ function context(schedule) {
28
+ const fence = '```';
29
+ return [
30
+ schedule ? `[ta-cron:from-chat ${JSON.stringify(schedule)}]` : '[ta-cron:from-chat]',
31
+ schedule
32
+ ? `The user wants what was done in this conversation made a scheduled task of Ta that does it again and again, ${schedule_util_1.ScheduleUtil.describe(schedule, 'en-US')}.`
33
+ : 'The user wants what was done in this conversation made a scheduled task of Ta that does it again and again, and has not said how often: unless the conversation says it, ask, with two or three choices that suit the work, and write the task once you know.',
34
+ '- Each run is a new conversation in this directory with nobody watching, and it does not see this one: write a prompt complete in itself, with the goal, the repository, branch, files, commands, links and other specifics found here, the steps that worked, and what its last answer should report (short: what it found, what changed since the run before, what needs the user).',
35
+ '- Leave out what was only tried and dropped, and what holds only this once: say "since the last run" or "yesterday" rather than a date.',
36
+ `- Say in a line or two what the task does, then end your answer with it in a fenced block of the language ${exports.TASK_BLOCK}, which Ta reads to create the task: do not create it with ${tool_1.CronTool.NAME} or a command. A longer fence when the prompt has one of its own:`,
37
+ `${fence}${exports.TASK_BLOCK}`,
38
+ 'name: <short, for the list>',
39
+ schedule
40
+ ? 'when: <only when the user asked for another time since: 30m, 2h, @daily, or five fields of cron>'
41
+ : 'when: <30m, 2h, @daily, or five fields of cron, as 0 9 * * 1-5>',
42
+ '---',
43
+ '<the prompt>',
44
+ fence,
45
+ '- When the conversation holds nothing worth doing again, say so, ask what the task should do, and leave the block out until you know.',
46
+ ].join('\n');
47
+ }
48
+ ChatTask.context = context;
49
+ /** The last `ta-cron-task` block of an answer; undefined when it has none or it says no prompt. Throws on a schedule it cannot read. */
50
+ function find(text) {
51
+ const lines = text.split(/\r?\n/);
52
+ let found;
53
+ for (let index = 0; index < lines.length; index++) {
54
+ const open = /^\s*(`{3,})\s*([\w-]+)\s*$/.exec(lines[index]);
55
+ if ((open === null || open === void 0 ? void 0 : open[2]) !== exports.TASK_BLOCK) {
56
+ continue;
57
+ }
58
+ const close = new RegExp(`^\\s*${open[1]}\`*\\s*$`);
59
+ const end = lines.findIndex((line, at) => at > index && close.test(line));
60
+ found = lines.slice(index + 1, end < 0 ? lines.length : end);
61
+ index = end < 0 ? lines.length : end;
62
+ }
63
+ return found && parse(found);
64
+ }
65
+ ChatTask.find = find;
66
+ function parse(lines) {
67
+ var _a;
68
+ const rule = lines.findIndex(line => line.trim() === '---');
69
+ const head = rule < 0 ? [] : lines.slice(0, rule);
70
+ const prompt = lines
71
+ .slice(rule + 1)
72
+ .join('\n')
73
+ .trim();
74
+ if (!prompt) {
75
+ return undefined;
76
+ }
77
+ const field = (key) => head.map(line => { var _a; return (_a = new RegExp(`^\\s*${key}\\s*:\\s*(.*)$`, 'i').exec(line)) === null || _a === void 0 ? void 0 : _a[1].trim(); }).find(value => value !== undefined);
78
+ const name = (_a = field('name')) !== null && _a !== void 0 ? _a : '';
79
+ const when = field('when');
80
+ return { name, prompt, schedule: when ? schedule(when) : undefined };
81
+ }
82
+ /** `30m` is an interval; `@daily` or five fields, cron. */
83
+ function schedule(text) {
84
+ const when = text.replace(/^["'`]|["'`]$/g, '').trim();
85
+ if (schedule_util_1.Duration.parse(when) !== undefined) {
86
+ return schedule_util_1.ScheduleUtil.check({ kind: 'interval', every: when });
87
+ }
88
+ return schedule_util_1.ScheduleUtil.check({ kind: 'cron', expression: when });
89
+ }
90
+ ChatTask.schedule = schedule;
91
+ /**
92
+ * The ask a turn that wrote a task answers: the latest one on the branch with no task created since, and
93
+ * the schedule it picked; undefined when there is none. Its answer may come turns later, once the user
94
+ * said how often.
95
+ */
96
+ function pending(entries) {
97
+ var _a, _b;
98
+ for (let index = entries.length - 1; index >= 0; index--) {
99
+ const entry = entries[index];
100
+ const custom = entry.type === 'custom_message' ? entry : ((_a = entry.message) === null || _a === void 0 ? void 0 : _a.role) === 'custom' ? entry.message : undefined;
101
+ if ((custom === null || custom === void 0 ? void 0 : custom.customType) === cron_protocol_1.REPLY_TYPE && created(custom.details)) {
102
+ return undefined;
103
+ }
104
+ if (entry.type !== 'message' || ((_b = entry.message) === null || _b === void 0 ? void 0 : _b.role) !== 'user') {
105
+ continue;
106
+ }
107
+ const mark = MARK.exec(text(entry.message.content));
108
+ if (mark) {
109
+ return { schedule: mark[1] ? schedule_util_1.ScheduleUtil.check(JSON.parse(mark[1])) : undefined };
110
+ }
111
+ }
112
+ return undefined;
113
+ }
114
+ ChatTask.pending = pending;
115
+ /** The text of a message, as pi keeps it: a string, or parts of which some are text. */
116
+ function text(content) {
117
+ if (typeof content === 'string') {
118
+ return content;
119
+ }
120
+ return Array.isArray(content)
121
+ ? content
122
+ .filter((part) => (part === null || part === void 0 ? void 0 : part.type) === 'text' && typeof part.text === 'string')
123
+ .map(part => part.text)
124
+ .join('\n')
125
+ : '';
126
+ }
127
+ ChatTask.text = text;
128
+ function created(details) {
129
+ const reply = details;
130
+ return (reply === null || reply === void 0 ? void 0 : reply.kind) === 'task' && reply.event === 'created';
131
+ }
132
+ })(ChatTask || (exports.ChatTask = ChatTask = {}));
133
+ //# sourceMappingURL=chat-task.js.map
@@ -6,10 +6,11 @@ export interface Flags {
6
6
  model?: string;
7
7
  thinking?: string;
8
8
  cwd?: string;
9
+ timeout?: string;
9
10
  }
10
11
  export declare const ACTIONS: readonly ['add', 'list', 'show', 'runs', 'run', 'enable', 'disable', 'set', 'remove', 'clear', 'help'];
11
12
  export type Action = (typeof ACTIONS)[number];
12
- export declare const HELP = "Scheduled tasks: each run is a conversation of its own in the Ta service, which runs them while it runs.\n\n/loop <when> <prompt> repeat: 30m, 2h, @daily, @hourly, or a cron expression in quotes (\"0 9 * * 1-5\")\n/remind in <duration> <prompt> once, after a while: in 45m\n/remind at <time> <prompt> once, at a time: at 15:30, at 2026-11-12 09:00\n/schedule add <when> <prompt> as /loop\n/schedule list the tasks\n/schedule show <task> a task and its last runs\n/schedule run <task> run it now; its schedule stays\n/schedule enable|disable <task>\n/schedule set <task> [flags] change it; a value of - clears the flag\n/schedule remove <task>\n/schedule clear remove the tasks of this directory\n\nA task is its id, the start of it, or its name. Flags at the end of a prompt:\n--name <name> --notify always|error|never --model <provider/model> --thinking <level> --cwd <directory>";
13
+ export declare const HELP = "Scheduled tasks: each run is a conversation of its own in the Ta service, which runs them while it runs.\n\n/loop <when> <prompt> repeat: 30m, 2h, @daily, @hourly, or a cron expression in quotes (\"0 9 * * 1-5\")\n/remind in <duration> <prompt> once, after a while: in 45m\n/remind at <time> <prompt> once, at a time: at 15:30, at 2026-11-12 09:00\n/schedule add <when> <prompt> as /loop\n/schedule list the tasks\n/schedule show <task> a task and its last runs\n/schedule run <task> run it now; its schedule stays\n/schedule enable|disable <task>\n/schedule set <task> [flags] change it; a value of - clears the flag\n/schedule remove <task>\n/schedule clear remove the tasks of this directory\n\nA task is its id, the start of it, or its name. Flags at the end of a prompt:\n--name <name> --notify always|error|never --model <provider/model> --thinking <level> --cwd <directory>\n--timeout <duration> how long a run may take before it is stopped, 5m to 4h; default 30m";
13
14
  /** The arguments of the commands, read: what is wrong throws with a message for the user. */
14
15
  export declare namespace CommandParser {
15
16
  /** The flags at the end, and the text before them as it was typed. */
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CronText = exports.CommandParser = exports.HELP = exports.ACTIONS = void 0;
4
4
  const cron_expression_1 = require("./cron-expression");
5
5
  const schedule_util_1 = require("./schedule-util");
6
- const FLAG_NAMES = ['name', 'notify', 'model', 'thinking', 'cwd'];
6
+ const FLAG_NAMES = ['name', 'notify', 'model', 'thinking', 'cwd', 'timeout'];
7
7
  const TRAILING_FLAG = new RegExp(`(?:^|\\s)--(${FLAG_NAMES.join('|')})(?:=|\\s+)("[^"]*"|'[^']*'|\\S*)\\s*$`);
8
8
  exports.ACTIONS = ['add', 'list', 'show', 'runs', 'run', 'enable', 'disable', 'set', 'remove', 'clear', 'help'];
9
9
  exports.HELP = `Scheduled tasks: each run is a conversation of its own in the Ta service, which runs them while it runs.
@@ -21,7 +21,8 @@ exports.HELP = `Scheduled tasks: each run is a conversation of its own in the Ta
21
21
  /schedule clear remove the tasks of this directory
22
22
 
23
23
  A task is its id, the start of it, or its name. Flags at the end of a prompt:
24
- --name <name> --notify always|error|never --model <provider/model> --thinking <level> --cwd <directory>`;
24
+ --name <name> --notify always|error|never --model <provider/model> --thinking <level> --cwd <directory>
25
+ --timeout <duration> how long a run may take before it is stopped, 5m to 4h; default 30m`;
25
26
  /** The arguments of the commands, read: what is wrong throws with a message for the user. */
26
27
  var CommandParser;
27
28
  (function (CommandParser) {
@@ -104,8 +105,11 @@ var CommandParser;
104
105
  if (flags.notify !== undefined) {
105
106
  patch.notify = value(flags.notify);
106
107
  }
108
+ if (flags.timeout !== undefined) {
109
+ patch.timeout = value(flags.timeout);
110
+ }
107
111
  if (Object.keys(patch).length === 0) {
108
- throw new Error('Say what changes: --name, --notify, --model, --thinking or --cwd.');
112
+ throw new Error('Say what changes: --name, --notify, --model, --thinking, --cwd or --timeout.');
109
113
  }
110
114
  return { ref: rest, patch };
111
115
  }
@@ -171,6 +175,7 @@ var CommandParser;
171
175
  ...(flags.model ? { model: flags.model } : {}),
172
176
  ...(flags.thinking ? { thinking: flags.thinking } : {}),
173
177
  ...(flags.notify ? { notify: flags.notify } : {}),
178
+ ...(flags.timeout ? { timeout: flags.timeout } : {}),
174
179
  };
175
180
  }
176
181
  function unquote(value) {
@@ -212,7 +217,8 @@ var CronText;
212
217
  ? `next ${schedule_util_1.ScheduleUtil.clock(new Date(task.nextRunAt), now)}`
213
218
  : 'done';
214
219
  const last = task.lastStatus && task.lastStatus !== 'running' ? `, last ${task.lastStatus}` : '';
215
- return `${task.id} ${task.name} (${schedule_util_1.ScheduleUtil.describe(task.schedule, 'en', now)}; ${state}${last}) in ${task.cwd}`;
220
+ const timeout = task.timeout ? `, stops after ${task.timeout}` : '';
221
+ return `${task.id} ${task.name} (${schedule_util_1.ScheduleUtil.describe(task.schedule, 'en', now)}; ${state}${last}${timeout}) in ${task.cwd}`;
216
222
  }
217
223
  CronText.task = task;
218
224
  function run(run, now = new Date()) {
@@ -0,0 +1,11 @@
1
+ import type { WebComposerAddon } from '@celljs/ta-web/lib/browser/extension/web-extension-api';
2
+ import { type Schedule } from './cron-protocol';
3
+ /** The rules the + offers, at a time of day people start work; another one Ta asks for. */
4
+ export declare const PRESETS: readonly Schedule[];
5
+ /**
6
+ * The + of the message box of a conversation: Make a scheduled task, a list of how often, which asks Ta, in
7
+ * that conversation (after a reply that runs), to write what it did as a task (chat-task.ts). Not in a run
8
+ * of a task, which cannot schedule more.
9
+ */
10
+ export declare function composerAddon(): WebComposerAddon;
11
+ //# sourceMappingURL=composer.d.ts.map
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PRESETS = void 0;
4
+ exports.composerAddon = composerAddon;
5
+ const chat_task_1 = require("./chat-task");
6
+ const cron_protocol_1 = require("./cron-protocol");
7
+ const page_1 = require("./page");
8
+ // biome-ignore lint/correctness/noUnusedImports: the JSX below compiles to React.createElement (jsxFactory)
9
+ const react_1 = require("./react");
10
+ const schedule_util_1 = require("./schedule-util");
11
+ /** The rules the + offers, at a time of day people start work; another one Ta asks for. */
12
+ exports.PRESETS = [
13
+ { kind: 'cron', expression: '0 * * * *' },
14
+ { kind: 'cron', expression: '0 9 * * *' },
15
+ { kind: 'cron', expression: '0 9 * * 1-5' },
16
+ { kind: 'cron', expression: '0 9 * * 1' },
17
+ ];
18
+ /**
19
+ * The + of the message box of a conversation: Make a scheduled task, a list of how often, which asks Ta, in
20
+ * that conversation (after a reply that runs), to write what it did as a task (chat-task.ts). Not in a run
21
+ * of a task, which cannot schedule more.
22
+ */
23
+ function composerAddon() {
24
+ const send = (conversation, schedule) => void page_1.pi.server
25
+ .prompt(conversation.sessionId, {
26
+ clientMessageId: `ta-cron-chat:${Date.now()}`,
27
+ message: chat_task_1.ChatTask.message(page_1.pi.ui.language, schedule),
28
+ streamingBehavior: 'followUp',
29
+ })
30
+ .catch(error => page_1.pi.ui.notify((0, page_1.t)('failedAction', { message: (0, page_1.message)(error) }), 'error'));
31
+ return {
32
+ actions: conversation => {
33
+ if (conversation.group === cron_protocol_1.NAME) {
34
+ return [];
35
+ }
36
+ const AlarmClock = (0, page_1.icon)('AlarmClock');
37
+ const group = (0, page_1.t)('fromChatWhen');
38
+ return [
39
+ {
40
+ key: 'make-task',
41
+ label: (0, page_1.t)('fromChat'),
42
+ detail: (0, page_1.t)('fromChatDetail'),
43
+ icon: react_1.React.createElement(AlarmClock, { size: 16 }),
44
+ items: [
45
+ ...exports.PRESETS.map(schedule => ({
46
+ key: `make-task:${schedule.kind === 'cron' ? schedule.expression : ''}`,
47
+ label: schedule_util_1.ScheduleUtil.describe(schedule, page_1.pi.ui.language),
48
+ group,
49
+ run: () => send(conversation, schedule),
50
+ })),
51
+ { key: 'make-task:ask', label: (0, page_1.t)('fromChatOther'), detail: (0, page_1.t)('fromChatOtherDetail'), group, run: () => send(conversation) },
52
+ ],
53
+ },
54
+ ];
55
+ },
56
+ };
57
+ }
58
+ //# sourceMappingURL=composer.js.map
@@ -1,9 +1,9 @@
1
1
  /** The name of the package: of its data, its host and the group of the conversations of its runs. */
2
2
  export declare const NAME = "@celljs/ta-cron";
3
- /** TA_HOST_EVENT of @celljs/ta-protocol, which the bundle of the pi extension does not import. */
4
- export declare const TA_HOST_EVENT = "ta:host";
5
3
  /** The custom message by which the commands answer: shown in the conversation, never read by the model. */
6
4
  export declare const REPLY_TYPE = "ta-cron";
5
+ /** Ta's tool to schedule prompts (tool.ts); the page draws its calls (tool-line.ts). */
6
+ export declare const TOOL_NAME = "schedule_task";
7
7
  /**
8
8
  * The start of what a run adds to the system prompt: the pi extension finds it there and keeps its tool
9
9
  * and commands out of the run, so that a scheduled run never schedules more work.
@@ -37,6 +37,8 @@ export interface Task {
37
37
  thinking?: string;
38
38
  /** Default: `always` for a task that runs once, `error` for one that repeats. */
39
39
  notify?: NotifyLevel;
40
+ /** How long a run may take before it is stopped, as `90m` or `2h`; default RUN_TIMEOUT_MS. */
41
+ timeout?: string;
40
42
  enabled: boolean;
41
43
  /** ISO time of the next run; none once a task that ran once is done, or when its rule has no next time. */
42
44
  nextRunAt?: string;
@@ -82,9 +84,10 @@ export interface TaskInput {
82
84
  model?: string;
83
85
  thinking?: string;
84
86
  notify?: NotifyLevel;
87
+ timeout?: string;
85
88
  enabled?: boolean;
86
89
  }
87
- /** What changes a task: a field left out stays; `''` (or `null`) clears model, thinking and notify. */
90
+ /** What changes a task: a field left out stays; `''` (or `null`) clears model, thinking, notify and timeout. */
88
91
  export interface TaskPatch {
89
92
  name?: string;
90
93
  prompt?: string;
@@ -93,6 +96,7 @@ export interface TaskPatch {
93
96
  model?: string | null;
94
97
  thinking?: string | null;
95
98
  notify?: NotifyLevel | '' | null;
99
+ timeout?: string | null;
96
100
  enabled?: boolean;
97
101
  }
98
102
  /**
@@ -152,6 +156,9 @@ export declare namespace Limits {
152
156
  const MIN_INTERVAL_MS = 60000;
153
157
  /** A run that takes longer is stopped and fails. */
154
158
  const RUN_TIMEOUT_MS: number;
159
+ /** The bounds of the timeout a task may set. */
160
+ const RUN_TIMEOUT_MIN_MS: number;
161
+ const RUN_TIMEOUT_MAX_MS: number;
155
162
  /** A task that runs once and whose time passed by more than this while the Ta service was not running is missed, not run. */
156
163
  const GRACE_MS: number;
157
164
  /** Runs at the same time; the others wait for one to end. */
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Limits = exports.Keys = exports.RUN_MARK = exports.REPLY_TYPE = exports.TA_HOST_EVENT = exports.NAME = void 0;
3
+ exports.Limits = exports.Keys = exports.RUN_MARK = exports.TOOL_NAME = exports.REPLY_TYPE = exports.NAME = void 0;
4
4
  /** The name of the package: of its data, its host and the group of the conversations of its runs. */
5
5
  exports.NAME = '@celljs/ta-cron';
6
- /** TA_HOST_EVENT of @celljs/ta-protocol, which the bundle of the pi extension does not import. */
7
- exports.TA_HOST_EVENT = 'ta:host';
8
6
  /** The custom message by which the commands answer: shown in the conversation, never read by the model. */
9
7
  exports.REPLY_TYPE = 'ta-cron';
8
+ /** Ta's tool to schedule prompts (tool.ts); the page draws its calls (tool-line.ts). */
9
+ exports.TOOL_NAME = 'schedule_task';
10
10
  /**
11
11
  * The start of what a run adds to the system prompt: the pi extension finds it there and keeps its tool
12
12
  * and commands out of the run, so that a scheduled run never schedules more work.
@@ -30,6 +30,9 @@ var Limits;
30
30
  Limits.MIN_INTERVAL_MS = 60000;
31
31
  /** A run that takes longer is stopped and fails. */
32
32
  Limits.RUN_TIMEOUT_MS = 30 * 60000;
33
+ /** The bounds of the timeout a task may set. */
34
+ Limits.RUN_TIMEOUT_MIN_MS = 5 * 60000;
35
+ Limits.RUN_TIMEOUT_MAX_MS = 4 * 60 * 60000;
33
36
  /** A task that runs once and whose time passed by more than this while the Ta service was not running is missed, not run. */
34
37
  Limits.GRACE_MS = 5 * 60000;
35
38
  /** Runs at the same time; the others wait for one to end. */
@@ -17,10 +17,27 @@ const NOTIFY = [
17
17
  ['error', 'notifyError'],
18
18
  ['never', 'notifyNever'],
19
19
  ];
20
+ /** The names of the days of the week in the language of the page, made once: a letter typed in the dialog renders it again. */
21
+ const DAY_NAMES = new Map();
20
22
  function weekdayNames() {
21
- const format = new Intl.DateTimeFormat(page_1.pi.ui.language === 'zh-CN' ? 'zh-CN' : 'en', { weekday: 'short' });
22
- // 2023-01-01 was a Sunday.
23
- return Array.from({ length: 7 }, (_, day) => format.format(new Date(2023, 0, 1 + day)));
23
+ const language = page_1.pi.ui.language;
24
+ let names = DAY_NAMES.get(language);
25
+ if (!names) {
26
+ const format = new Intl.DateTimeFormat(language === 'zh-CN' ? 'zh-CN' : 'en', { weekday: 'short' });
27
+ // 2023-01-01 was a Sunday.
28
+ names = Array.from({ length: 7 }, (_, day) => format.format(new Date(2023, 0, 1 + day)));
29
+ DAY_NAMES.set(language, names);
30
+ }
31
+ return names;
32
+ }
33
+ /** The parts of the form the rule reads: what its next run, and whether it has one, depend on. */
34
+ function ruleKey(form) {
35
+ return [form.mode, form.repeat, form.amount, form.unit, form.time, form.weekday, form.cron, form.at].join('|');
36
+ }
37
+ /** The next run of the form, worked out again when its rule changes, not at every letter typed in its prompt. */
38
+ function usePreview(form) {
39
+ const key = ruleKey(form);
40
+ return react_1.React.useMemo(() => form_util_1.FormUtil.preview(form, new Date()), [key]);
24
41
  }
25
42
  function Segments({ value, options, onChange }) {
26
43
  return (react_1.React.createElement("div", { className: "tcr-segments" }, options.map(([key, label]) => (react_1.React.createElement("button", { key: key, type: "button", "aria-pressed": value === key, className: "tcr-segment", onClick: () => onChange(key) }, label)))));
@@ -39,7 +56,7 @@ function ModelFields({ form, set, cwd }) {
39
56
  }
40
57
  /** The controls of when a task runs, with the next time it would. */
41
58
  function When({ form, set }) {
42
- const preview = form_util_1.FormUtil.preview(form, new Date());
59
+ const preview = usePreview(form);
43
60
  const days = weekdayNames();
44
61
  let rule = null;
45
62
  if (form.mode === 'once') {
@@ -58,15 +75,17 @@ function When({ form, set }) {
58
75
  form.repeat === 'weekly' && (react_1.React.createElement("select", { className: "tcr-input", value: form.weekday, onChange: event => set({ weekday: Number(event.target.value) }) }, days.map((day, index) => (react_1.React.createElement("option", { key: day, value: index }, day))))),
59
76
  react_1.React.createElement("input", { className: "tcr-input", type: "time", value: form.time, onChange: event => set({ time: event.target.value }) })));
60
77
  }
78
+ const kind = form.mode === 'once' ? 'once' : form.repeat;
79
+ const kinds = [...REPEATS.map((repeat) => [repeat, (0, page_1.t)(repeat)]), ['once', (0, page_1.t)('once')]];
80
+ const Clock = (0, page_1.icon)('Clock');
81
+ const bad = !preview.next;
61
82
  return (react_1.React.createElement("div", { className: "tcr-field" },
62
83
  react_1.React.createElement("div", { className: "tcr-label" }, (0, page_1.t)('when')),
63
- react_1.React.createElement(Segments, { value: form.mode, options: [
64
- ['repeat', (0, page_1.t)('repeat')],
65
- ['once', (0, page_1.t)('once')],
66
- ], onChange: mode => set({ mode }) }),
67
- form.mode === 'repeat' && react_1.React.createElement(Segments, { value: form.repeat, options: REPEATS.map(kind => [kind, (0, page_1.t)(kind)]), onChange: repeat => set({ repeat }) }),
84
+ react_1.React.createElement(Segments, { value: kind, options: kinds, onChange: next => set(next === 'once' ? { mode: 'once' } : { mode: 'repeat', repeat: next }) }),
68
85
  rule,
69
- react_1.React.createElement("div", { className: `tcr-preview${preview.error === undefined ? '' : ' tcr-bad'}` }, preview.next ? (0, page_1.t)('preview', { time: schedule_util_1.ScheduleUtil.clock(preview.next) }) : preview.error || (0, page_1.t)('noNext'))));
86
+ react_1.React.createElement("div", { className: `tcr-preview${bad ? ' tcr-bad' : ''}`, role: "status" },
87
+ react_1.React.createElement(Clock, { size: 13 }),
88
+ preview.next ? (0, page_1.t)('preview', { time: schedule_util_1.ScheduleUtil.clock(preview.next) }) : preview.error || (0, page_1.t)('noNext'))));
70
89
  }
71
90
  /** The dialog of a task: what Ta does, when, where, and when it tells the user. */
72
91
  function TaskEditor({ client, editing, onClose }) {
@@ -85,8 +104,11 @@ function TaskEditor({ client, editing, onClose }) {
85
104
  const [picking, setPicking] = react_1.React.useState(false);
86
105
  const [more, setMore] = react_1.React.useState(!!(form.name && editing.task) || !!form.notify);
87
106
  const [saving, setSaving] = react_1.React.useState(false);
107
+ // A phone raises its keyboard over the dialog as it opens: the field waits, and the dialog stays whole.
108
+ const touch = page_1.pi.ui.useDevice().touch;
88
109
  const set = (change) => setForm(current => ({ ...current, ...change }));
89
- const valid = form.prompt.trim().length > 0 && !!form_util_1.FormUtil.preview(form, new Date()).next;
110
+ const preview = usePreview(form);
111
+ const valid = form.prompt.trim().length > 0 && !!preview.next;
90
112
  const save = async () => {
91
113
  if (!valid || saving) {
92
114
  return;
@@ -95,10 +117,10 @@ function TaskEditor({ client, editing, onClose }) {
95
117
  try {
96
118
  const input = form_util_1.FormUtil.input(form);
97
119
  if (editing.task) {
98
- await client.call('update', editing.task.id, { ...input, name: form.name, model: form.model, thinking: form.thinking, notify: form.notify });
120
+ await client.update(editing.task.id, { ...input, name: form.name, model: form.model, thinking: form.thinking, notify: form.notify });
99
121
  }
100
122
  else {
101
- await client.call('add', input);
123
+ await client.add(input);
102
124
  // Asked once, on a click: the page tells of runs that end while it is hidden.
103
125
  if (typeof Notification !== 'undefined' && Notification.permission === 'default') {
104
126
  void Notification.requestPermission().catch(() => undefined);
@@ -113,28 +135,41 @@ function TaskEditor({ client, editing, onClose }) {
113
135
  setSaving(false);
114
136
  }
115
137
  };
138
+ const Folder = (0, page_1.icon)('Folder');
139
+ const Chevron = (0, page_1.icon)('ChevronDown');
140
+ const key = /Mac|iPhone|iPad/.test(navigator.platform) ? '⌘' : 'Ctrl';
116
141
  return (react_1.React.createElement(Dialog, { title: editing.task ? (0, page_1.t)('editTask') : (0, page_1.t)('newTask'), onClose: onClose },
117
142
  react_1.React.createElement("div", { className: "tcr-form" },
118
- react_1.React.createElement("label", { className: "tcr-field" },
119
- react_1.React.createElement("span", { className: "tcr-label" }, (0, page_1.t)('prompt')),
120
- react_1.React.createElement("textarea", { className: "tcr-input tcr-prompt", rows: 4, value: form.prompt, placeholder: (0, page_1.t)('promptPlaceholder'), autoFocus: true, onChange: event => set({ prompt: event.target.value }), onKeyDown: event => (event.metaKey || event.ctrlKey) && event.key === 'Enter' && void save() })),
121
- react_1.React.createElement(When, { form: form, set: set }),
122
- react_1.React.createElement("div", { className: "tcr-field" },
123
- react_1.React.createElement("span", { className: "tcr-label" }, (0, page_1.t)('directory')),
124
- react_1.React.createElement("button", { type: "button", className: "tcr-input tcr-folder", title: form.cwd, onClick: () => setPicking(true) },
125
- (0, page_1.basename)(form.cwd || cwd),
126
- react_1.React.createElement("span", { className: "tcr-folder-path" }, form.cwd || cwd))),
127
- react_1.React.createElement(ModelFields, { form: form, set: set, cwd: form.cwd || cwd }),
128
- more ? (react_1.React.createElement("div", { className: "tcr-grid" },
129
- react_1.React.createElement("label", { className: "tcr-field" },
130
- react_1.React.createElement("span", { className: "tcr-label" }, (0, page_1.t)('name')),
131
- react_1.React.createElement("input", { className: "tcr-input", value: form.name, placeholder: (0, page_1.t)('namePlaceholder'), onChange: event => set({ name: event.target.value }) })),
143
+ react_1.React.createElement("div", { className: "tcr-form-body" },
132
144
  react_1.React.createElement("label", { className: "tcr-field" },
133
- react_1.React.createElement("span", { className: "tcr-label" }, (0, page_1.t)('notify')),
134
- react_1.React.createElement("select", { className: "tcr-input", value: form.notify, onChange: event => set({ notify: event.target.value }) }, NOTIFY.map(([level, word]) => (react_1.React.createElement("option", { key: level, value: level }, (0, page_1.t)(word)))))))) : (react_1.React.createElement("button", { type: "button", className: "tcr-link", onClick: () => setMore(true) }, (0, page_1.t)('more'))),
145
+ react_1.React.createElement("span", { className: "tcr-label" }, (0, page_1.t)('prompt')),
146
+ react_1.React.createElement("textarea", { className: "tcr-input tcr-prompt", rows: 5, value: form.prompt, placeholder: (0, page_1.t)('promptPlaceholder'), autoFocus: !touch, onChange: event => set({ prompt: event.target.value }), onKeyDown: event => (event.metaKey || event.ctrlKey) && event.key === 'Enter' && void save() })),
147
+ react_1.React.createElement(When, { form: form, set: set }),
148
+ react_1.React.createElement("div", { className: "tcr-field" },
149
+ react_1.React.createElement("span", { className: "tcr-label" }, (0, page_1.t)('directory')),
150
+ react_1.React.createElement("button", { type: "button", className: "tcr-input tcr-folder", title: form.cwd || cwd, onClick: () => setPicking(true) },
151
+ react_1.React.createElement(Folder, { size: 15 }),
152
+ react_1.React.createElement("span", { className: "tcr-folder-name" }, (0, page_1.basename)(form.cwd || cwd)),
153
+ react_1.React.createElement("span", { className: "tcr-folder-path" }, `\u200e${form.cwd || cwd}\u200e`))),
154
+ react_1.React.createElement(ModelFields, { form: form, set: set, cwd: form.cwd || cwd }),
155
+ react_1.React.createElement("div", { className: `tcr-options${more ? ' tcr-open' : ''}` },
156
+ react_1.React.createElement("button", { type: "button", className: "tcr-more-toggle", "aria-expanded": more, onClick: () => setMore(!more) },
157
+ react_1.React.createElement("span", { className: "tcr-chevron", "aria-hidden": "true" },
158
+ react_1.React.createElement(Chevron, { size: 14 })),
159
+ (0, page_1.t)('moreOptions')),
160
+ more && (react_1.React.createElement("div", { className: "tcr-grid" },
161
+ react_1.React.createElement("label", { className: "tcr-field" },
162
+ react_1.React.createElement("span", { className: "tcr-label" }, (0, page_1.t)('name')),
163
+ react_1.React.createElement("input", { className: "tcr-input", value: form.name, placeholder: (0, page_1.t)('namePlaceholder'), onChange: event => set({ name: event.target.value }) })),
164
+ react_1.React.createElement("label", { className: "tcr-field" },
165
+ react_1.React.createElement("span", { className: "tcr-label" }, (0, page_1.t)('notify')),
166
+ react_1.React.createElement("select", { className: "tcr-input", value: form.notify, onChange: event => set({ notify: event.target.value }) }, NOTIFY.map(([level, word]) => (react_1.React.createElement("option", { key: level, value: level }, (0, page_1.t)(word)))))))))),
135
167
  react_1.React.createElement("div", { className: "tcr-actions" },
168
+ !touch && react_1.React.createElement("span", { className: "tcr-shortcut" }, (0, page_1.t)('shortcut', { key, action: editing.task ? (0, page_1.t)('save') : (0, page_1.t)('create') })),
136
169
  react_1.React.createElement("button", { type: "button", className: "tcr-button", onClick: onClose }, (0, page_1.t)('cancel')),
137
- react_1.React.createElement("button", { type: "button", className: "tcr-button tcr-primary", disabled: !valid || saving, onClick: () => void save() }, editing.task ? (0, page_1.t)('save') : (0, page_1.t)('create')))),
170
+ react_1.React.createElement("button", { type: "button", className: saving ? 'tcr-button tcr-primary ta-busy' : 'tcr-button tcr-primary', "aria-busy": saving || undefined, disabled: !valid || saving, onClick: () => void save() },
171
+ editing.task ? (0, page_1.t)('save') : (0, page_1.t)('create'),
172
+ saving && react_1.React.createElement("span", { className: "ta-spinner ta-busy-mark ta-on-brand" })))),
138
173
  picking && (react_1.React.createElement(FolderPicker, { initial: form.cwd || cwd, onPick: path => {
139
174
  set({ cwd: path });
140
175
  setPicking(false);
@@ -15,6 +15,8 @@ interface Pi {
15
15
  content: string;
16
16
  display: boolean;
17
17
  details: unknown;
18
+ }, options?: {
19
+ triggerTurn?: boolean;
18
20
  }): void;
19
21
  }
20
22
  /**
@@ -2,12 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NOT_IN_RUN = exports.NO_SCHEDULER = exports.NO_SERVER = void 0;
4
4
  exports.default = activate;
5
+ const ta_extension_host_1 = require("@celljs/ta-protocol/lib/common/ta-extension-host");
6
+ const chat_task_1 = require("./chat-task");
5
7
  const commands_1 = require("./commands");
6
8
  const cron_protocol_1 = require("./cron-protocol");
7
9
  const server_texts_1 = require("./server-texts");
8
10
  const tool_1 = require("./tool");
9
- /** Under the Ta service the host answers at once; `ta` alone has nobody to answer. */
10
- const HOST_WAIT_MS = 1000;
11
11
  exports.NO_SERVER = 'Scheduled tasks need the Ta service, which runs them: start it with `ta serve` (or open Ta Desktop) and talk to Ta in its page.';
12
12
  exports.NO_SCHEDULER = 'The scheduler did not start in the Ta service; its log says why.';
13
13
  exports.NOT_IN_RUN = 'This is a scheduled run: it does not schedule more work. Say in your summary what should be scheduled.';
@@ -18,16 +18,11 @@ exports.NOT_IN_RUN = 'This is a scheduled run: it does not schedule more work. S
18
18
  */
19
19
  function activate(pi) {
20
20
  let reached;
21
- const reach = () => (reached !== null && reached !== void 0 ? reached : (reached = new Promise(resolve => {
22
- const timer = setTimeout(() => resolve({ answered: false }), HOST_WAIT_MS);
23
- pi.events.emit(cron_protocol_1.TA_HOST_EVENT, {
24
- name: cron_protocol_1.NAME,
25
- resolve: (answer) => {
26
- clearTimeout(timer);
27
- resolve({ answered: true, host: answer.host, scheduler: answer.service });
28
- },
29
- });
30
- })));
21
+ const reach = () => (reached !== null && reached !== void 0 ? reached : (reached = ta_extension_host_1.TaHostUtil.reach(pi.events, cron_protocol_1.NAME).then(answer => ({
22
+ answered: !!answer,
23
+ host: answer === null || answer === void 0 ? void 0 : answer.host,
24
+ scheduler: answer === null || answer === void 0 ? void 0 : answer.service,
25
+ }))));
31
26
  const isRun = (ctx) => ctx.getSystemPrompt().includes(cron_protocol_1.RUN_MARK);
32
27
  const scheduler = async (ctx) => {
33
28
  if (isRun(ctx)) {
@@ -66,7 +61,7 @@ function activate(pi) {
66
61
  return { content: [{ type: 'text', text }], details: undefined };
67
62
  },
68
63
  });
69
- const reply = (answer) => pi.sendMessage({ customType: cron_protocol_1.REPLY_TYPE, content: commands_1.CronText.reply(answer), display: true, details: answer });
64
+ const reply = (answer, options) => pi.sendMessage({ customType: cron_protocol_1.REPLY_TYPE, content: commands_1.CronText.reply(answer), display: true, details: answer }, options);
70
65
  const command = (name, description, handle, completions) => pi.registerCommand(name, {
71
66
  description,
72
67
  getArgumentCompletions: completions,
@@ -84,6 +79,31 @@ function activate(pi) {
84
79
  const cwd = (_a = input.cwd) !== null && _a !== void 0 ? _a : (await found.cwd());
85
80
  return { kind: 'task', event: 'created', task: await found.scheduler.add({ ...input, ...(cwd ? { cwd } : {}) }) };
86
81
  };
82
+ // A task Ta wrote from a conversation, as the + of its message box asked (chat-task.ts): created here, for
83
+ // every model, and answered with a card, after the turn so as not to start another. The latest answer of the
84
+ // turn with a block: a message the user sent while Ta answered goes on in the same turn, after the task.
85
+ pi.on('agent_end', async (event, ctx) => {
86
+ var _a;
87
+ if (isRun(ctx)) {
88
+ return;
89
+ }
90
+ try {
91
+ const draft = [...event.messages]
92
+ .reverse()
93
+ .filter(message => message.role === 'assistant')
94
+ .map(message => chat_task_1.ChatTask.find(chat_task_1.ChatTask.text(message.content)))
95
+ .find(found => found !== undefined);
96
+ const ask = draft && chat_task_1.ChatTask.pending(ctx.sessionManager.getBranch());
97
+ const schedule = (_a = draft === null || draft === void 0 ? void 0 : draft.schedule) !== null && _a !== void 0 ? _a : ask === null || ask === void 0 ? void 0 : ask.schedule;
98
+ if (!draft || !ask || !schedule) {
99
+ return;
100
+ }
101
+ reply(await create({ name: draft.name || undefined, prompt: draft.prompt, schedule }, await scheduler(ctx)), { triggerTurn: false });
102
+ }
103
+ catch (error) {
104
+ reply({ kind: 'error', message: error instanceof Error ? error.message : String(error) }, { triggerTurn: false });
105
+ }
106
+ });
87
107
  command('loop', 'Run a prompt on a schedule: /loop 30m <prompt>, /loop @daily <prompt>, /loop "0 9 * * 1-5" <prompt>', (args, found) => create(commands_1.CommandParser.repeating(args), found), prefix => commands_1.CommandParser.loopCompletions(prefix));
88
108
  command('remind', 'Run a prompt once: /remind in 45m <prompt>, /remind at 15:30 <prompt>', (args, found) => create(commands_1.CommandParser.reminder(args, new Date()), found));
89
109
  let known = [];
@@ -27,7 +27,6 @@ declare const EN: {
27
27
  name: string;
28
28
  namePlaceholder: string;
29
29
  when: string;
30
- repeat: string;
31
30
  once: string;
32
31
  every: string;
33
32
  daily: string;
@@ -76,6 +75,36 @@ declare const EN: {
76
75
  failedAction: string;
77
76
  help: string;
78
77
  serviceNeeded: string;
78
+ makeExtension: string;
79
+ makeExtensionHint: string;
80
+ extensionAsk: string;
81
+ promptLabel: string;
82
+ showAll: string;
83
+ showLess: string;
84
+ stats: string;
85
+ statsFailed: string;
86
+ lastRun: string;
87
+ moreOptions: string;
88
+ shortcut: string;
89
+ modelFailed: string;
90
+ fromChat: string;
91
+ fromChatDetail: string;
92
+ fromChatWhen: string;
93
+ fromChatOther: string;
94
+ fromChatOtherDetail: string;
95
+ fromChatAsk: string;
96
+ fromChatAskWhen: string;
97
+ toolAdd: string;
98
+ toolUpdate: string;
99
+ toolList: string;
100
+ toolShow: string;
101
+ toolEnable: string;
102
+ toolDisable: string;
103
+ toolDelete: string;
104
+ toolRun: string;
105
+ toolRuns: string;
106
+ toolClear: string;
107
+ toolOther: string;
79
108
  };
80
109
  export type Words = {
81
110
  readonly [K in keyof typeof EN]: string;