@celljs/ta 4.15.0 → 4.15.1

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 (242) hide show
  1. package/dist/cli.mjs +77 -3
  2. package/dist/pi/CHANGELOG.md +7 -0
  3. package/dist/pi/package.json +1 -1
  4. package/dist/pi/packages/ta-3d/README.en.md +11 -0
  5. package/dist/pi/packages/ta-3d/README.md +11 -0
  6. package/dist/pi/packages/ta-3d/extension/index.mjs +120 -0
  7. package/dist/pi/packages/ta-3d/lib/extension.d.ts +15 -0
  8. package/dist/pi/packages/ta-3d/lib/extension.js +24 -0
  9. package/dist/pi/packages/ta-3d/lib/i18n.d.ts +19 -0
  10. package/dist/pi/packages/ta-3d/lib/i18n.js +50 -0
  11. package/dist/pi/packages/ta-3d/lib/index.d.ts +7 -0
  12. package/dist/pi/packages/ta-3d/lib/index.js +22 -0
  13. package/dist/pi/packages/ta-3d/lib/react.d.ts +8 -0
  14. package/dist/pi/packages/ta-3d/lib/react.js +8 -0
  15. package/dist/pi/packages/ta-3d/lib/scene-card.d.ts +4 -0
  16. package/dist/pi/packages/ta-3d/lib/scene-card.js +60 -0
  17. package/dist/pi/packages/ta-3d/lib/scene-prompt.d.ts +7 -0
  18. package/dist/pi/packages/ta-3d/lib/scene-prompt.js +15 -0
  19. package/dist/pi/packages/ta-3d/lib/scene-protocol.d.ts +5 -0
  20. package/dist/pi/packages/ta-3d/lib/scene-protocol.js +8 -0
  21. package/dist/pi/packages/ta-3d/lib/scene-spec.d.ts +59 -0
  22. package/dist/pi/packages/ta-3d/lib/scene-spec.js +141 -0
  23. package/dist/pi/packages/ta-3d/lib/scene-view.d.ts +57 -0
  24. package/dist/pi/packages/ta-3d/lib/scene-view.js +339 -0
  25. package/dist/pi/packages/ta-3d/lib/style.d.ts +4 -0
  26. package/dist/pi/packages/ta-3d/lib/style.js +33 -0
  27. package/dist/pi/packages/ta-3d/package.json +58 -0
  28. package/dist/pi/packages/ta-3d/web/index.js +660 -0
  29. package/dist/pi/packages/ta-agents/README.en.md +2 -2
  30. package/dist/pi/packages/ta-agents/README.md +2 -2
  31. package/dist/pi/packages/ta-agents/extension/index.mjs +198 -6
  32. package/dist/pi/packages/ta-agents/lib/acp-agent.d.ts +4 -0
  33. package/dist/pi/packages/ta-agents/lib/acp-agent.js +20 -2
  34. package/dist/pi/packages/ta-agents/lib/acp-protocol.d.ts +14 -5
  35. package/dist/pi/packages/ta-agents/lib/acp-protocol.js +7 -0
  36. package/dist/pi/packages/ta-agents/lib/agent-bindings.d.ts +13 -0
  37. package/dist/pi/packages/ta-agents/lib/agent-bindings.js +29 -4
  38. package/dist/pi/packages/ta-agents/lib/agent-prompt.d.ts +2 -0
  39. package/dist/pi/packages/ta-agents/lib/agent-prompt.js +5 -0
  40. package/dist/pi/packages/ta-agents/lib/agent-session.d.ts +16 -4
  41. package/dist/pi/packages/ta-agents/lib/agent-session.js +34 -4
  42. package/dist/pi/packages/ta-agents/lib/agent-sign-in.d.ts +28 -0
  43. package/dist/pi/packages/ta-agents/lib/agent-sign-in.js +62 -0
  44. package/dist/pi/packages/ta-agents/lib/agent-streamer.d.ts +7 -0
  45. package/dist/pi/packages/ta-agents/lib/agent-streamer.js +40 -3
  46. package/dist/pi/packages/ta-agents/lib/extension.js +12 -0
  47. package/dist/pi/packages/ta-agents/lib/texts.d.ts +43 -0
  48. package/dist/pi/packages/ta-agents/lib/texts.js +47 -0
  49. package/dist/pi/packages/ta-agents/package.json +1 -1
  50. package/dist/pi/packages/ta-bots/host/index.mjs +33 -4
  51. package/dist/pi/packages/ta-bots/lib/bot-service.d.ts +6 -0
  52. package/dist/pi/packages/ta-bots/lib/bot-service.js +27 -2
  53. package/dist/pi/packages/ta-bots/lib/bot-store.d.ts +8 -1
  54. package/dist/pi/packages/ta-bots/lib/bot-store.js +16 -2
  55. package/dist/pi/packages/ta-bots/lib/weixin-channel.js +3 -1
  56. package/dist/pi/packages/ta-bots/package.json +1 -1
  57. package/dist/pi/packages/ta-changes/package.json +1 -1
  58. package/dist/pi/packages/ta-channels/package.json +1 -1
  59. package/dist/pi/packages/ta-computer-use/package.json +1 -1
  60. package/dist/pi/packages/ta-cron/lib/tasks-view.js +4 -2
  61. package/dist/pi/packages/ta-cron/package.json +1 -1
  62. package/dist/pi/packages/ta-cron/web/index.js +8 -4
  63. package/dist/pi/packages/ta-extensions/package.json +1 -1
  64. package/dist/pi/packages/ta-games/package.json +1 -1
  65. package/dist/pi/packages/ta-glance/extension/index.mjs +1 -0
  66. package/dist/pi/packages/ta-glance/lib/glance-prompt.d.ts +1 -1
  67. package/dist/pi/packages/ta-glance/lib/glance-prompt.js +1 -0
  68. package/dist/pi/packages/ta-glance/package.json +1 -1
  69. package/dist/pi/packages/ta-initiative/lib/inbox.js +47 -29
  70. package/dist/pi/packages/ta-initiative/lib/style.d.ts +1 -1
  71. package/dist/pi/packages/ta-initiative/lib/style.js +27 -14
  72. package/dist/pi/packages/ta-initiative/package.json +1 -1
  73. package/dist/pi/packages/ta-initiative/web/index.js +92 -50
  74. package/dist/pi/packages/ta-launcher/package.json +1 -1
  75. package/dist/pi/packages/ta-manual/package.json +1 -1
  76. package/dist/pi/packages/ta-moments/package.json +1 -1
  77. package/dist/pi/packages/ta-nearby/lib/page.js +1 -1
  78. package/dist/pi/packages/ta-nearby/package.json +1 -1
  79. package/dist/pi/packages/ta-nearby/web/index.js +3 -4
  80. package/dist/pi/packages/ta-notify/lib/settings.js +9 -2
  81. package/dist/pi/packages/ta-notify/package.json +1 -1
  82. package/dist/pi/packages/ta-notify/web/index.js +18 -6
  83. package/dist/pi/packages/ta-plot/README.en.md +12 -0
  84. package/dist/pi/packages/ta-plot/README.md +12 -0
  85. package/dist/pi/packages/ta-plot/extension/index.mjs +121 -0
  86. package/dist/pi/packages/ta-plot/lib/extension.d.ts +15 -0
  87. package/dist/pi/packages/ta-plot/lib/extension.js +24 -0
  88. package/dist/pi/packages/ta-plot/lib/i18n.d.ts +14 -0
  89. package/dist/pi/packages/ta-plot/lib/i18n.js +30 -0
  90. package/dist/pi/packages/ta-plot/lib/index.d.ts +7 -0
  91. package/dist/pi/packages/ta-plot/lib/index.js +25 -0
  92. package/dist/pi/packages/ta-plot/lib/plot-expression.d.ts +16 -0
  93. package/dist/pi/packages/ta-plot/lib/plot-expression.js +209 -0
  94. package/dist/pi/packages/ta-plot/lib/plot-painter.d.ts +28 -0
  95. package/dist/pi/packages/ta-plot/lib/plot-painter.js +208 -0
  96. package/dist/pi/packages/ta-plot/lib/plot-prompt.d.ts +7 -0
  97. package/dist/pi/packages/ta-plot/lib/plot-prompt.js +16 -0
  98. package/dist/pi/packages/ta-plot/lib/plot-protocol.d.ts +7 -0
  99. package/dist/pi/packages/ta-plot/lib/plot-protocol.js +10 -0
  100. package/dist/pi/packages/ta-plot/lib/plot-scene.d.ts +65 -0
  101. package/dist/pi/packages/ta-plot/lib/plot-scene.js +427 -0
  102. package/dist/pi/packages/ta-plot/lib/plot-spec.d.ts +86 -0
  103. package/dist/pi/packages/ta-plot/lib/plot-spec.js +165 -0
  104. package/dist/pi/packages/ta-plot/lib/plot-view.d.ts +4 -0
  105. package/dist/pi/packages/ta-plot/lib/plot-view.js +205 -0
  106. package/dist/pi/packages/ta-plot/lib/react.d.ts +8 -0
  107. package/dist/pi/packages/ta-plot/lib/react.js +8 -0
  108. package/dist/pi/packages/ta-plot/lib/style.d.ts +4 -0
  109. package/dist/pi/packages/ta-plot/lib/style.js +47 -0
  110. package/dist/pi/packages/ta-plot/package.json +57 -0
  111. package/dist/pi/packages/ta-plot/web/index.js +1320 -0
  112. package/dist/pi/packages/ta-recall/package.json +1 -1
  113. package/dist/pi/packages/ta-rooms/lib/doubles-view.js +8 -1
  114. package/dist/pi/packages/ta-rooms/lib/style.d.ts +1 -1
  115. package/dist/pi/packages/ta-rooms/lib/style.js +1 -0
  116. package/dist/pi/packages/ta-rooms/package.json +1 -1
  117. package/dist/pi/packages/ta-rooms/web/index.js +17 -5
  118. package/dist/pi/packages/ta-share/lib/share-dialog.js +3 -1
  119. package/dist/pi/packages/ta-share/lib/style.d.ts +1 -1
  120. package/dist/pi/packages/ta-share/lib/style.js +1 -0
  121. package/dist/pi/packages/ta-share/package.json +1 -1
  122. package/dist/pi/packages/ta-share/web/index.js +6 -2
  123. package/dist/pi/packages/ta-sync/lib/panel.js +4 -1
  124. package/dist/pi/packages/ta-sync/lib/style.d.ts +1 -1
  125. package/dist/pi/packages/ta-sync/lib/style.js +1 -0
  126. package/dist/pi/packages/ta-sync/package.json +1 -1
  127. package/dist/pi/packages/ta-sync/web/index.js +9 -3
  128. package/dist/pi/packages/ta-sync-cloud/package.json +1 -1
  129. package/dist/pi/packages/ta-team/lib/dialogs.js +6 -3
  130. package/dist/pi/packages/ta-team/package.json +1 -1
  131. package/dist/pi/packages/ta-team/web/index.js +11 -6
  132. package/dist/pi/packages/ta-workspace/package.json +1 -1
  133. package/dist/public/assets/{abnfDiagram-S7VZAUFO-sclOP11q.js → abnfDiagram-S7VZAUFO-CD8CaArq.js} +1 -1
  134. package/dist/public/assets/{architecture-WOLXFQ4H-Bitg4Dpy.js → architecture-WOLXFQ4H-f2a9bodL.js} +1 -1
  135. package/dist/public/assets/{architectureDiagram-YGSQEFNW-Hc0W5khF.js → architectureDiagram-YGSQEFNW-BCWH9CwO.js} +1 -1
  136. package/dist/public/assets/{blockDiagram-APKKGZFW-D2ZWatLV.js → blockDiagram-APKKGZFW-fUamQMeJ.js} +1 -1
  137. package/dist/public/assets/{browser-D-etIMuL.js → browser-CrMa174j.js} +1 -1
  138. package/dist/public/assets/{c4Diagram-KJ2TOQU5-CWEcyfwV.js → c4Diagram-KJ2TOQU5-CkLtnwp1.js} +1 -1
  139. package/dist/public/assets/{chunk-6MUBBAK2-CWbrJHxK.js → chunk-6MUBBAK2-cwcGPuAH.js} +1 -1
  140. package/dist/public/assets/{chunk-AXFCVDMN-DJQdD4iX.js → chunk-AXFCVDMN-DNkmkYfC.js} +1 -1
  141. package/dist/public/assets/{chunk-BG4553SI-CYiiJcBj.js → chunk-BG4553SI-C8qbbr2Z.js} +1 -1
  142. package/dist/public/assets/{chunk-DQASFODM-NrNC1UeX.js → chunk-DQASFODM-C-PJ2CrJ.js} +1 -1
  143. package/dist/public/assets/{chunk-HFQBQIA3-BIHXOwS2.js → chunk-HFQBQIA3-BYcgxNEL.js} +1 -1
  144. package/dist/public/assets/{chunk-KQLB2F66-CcU_AFwQ.js → chunk-KQLB2F66-BTDNzrRl.js} +1 -1
  145. package/dist/public/assets/{chunk-KS47KZWR-DGfNbbcL.js → chunk-KS47KZWR-1sGg1pKP.js} +1 -1
  146. package/dist/public/assets/{chunk-LEVMRMFU-B4PSS_Pp.js → chunk-LEVMRMFU-7lAsFwHT.js} +1 -1
  147. package/dist/public/assets/{chunk-M57EVK23-1555_mm4.js → chunk-M57EVK23-C8K-ltig.js} +1 -1
  148. package/dist/public/assets/{chunk-OY52VR5R-zbNEbYJ8.js → chunk-OY52VR5R-CBe1QL_V.js} +1 -1
  149. package/dist/public/assets/{chunk-QB3YPZ4I-C-nNDGuN.js → chunk-QB3YPZ4I-COhYyyE_.js} +1 -1
  150. package/dist/public/assets/{chunk-R3KSYZAL-DcXXuhbl.js → chunk-R3KSYZAL-CREAgaSS.js} +1 -1
  151. package/dist/public/assets/{chunk-STOXU5M4-Bb77QkUj.js → chunk-STOXU5M4-CTl0P8_C.js} +1 -1
  152. package/dist/public/assets/{chunk-TU62E6Q5-D8IJkNq5.js → chunk-TU62E6Q5-B_GG7baF.js} +1 -1
  153. package/dist/public/assets/{chunk-X4PVCEUW-BzejexgB.js → chunk-X4PVCEUW-CDrSpVOj.js} +1 -1
  154. package/dist/public/assets/{chunk-XXDRQBXY-D2GPHyll.js → chunk-XXDRQBXY-sKeiDEnC.js} +1 -1
  155. package/dist/public/assets/{classDiagram-v2-L25IHNXF-CUEzxxI8.js → classDiagram-v2-L25IHNXF-Cqo1O5FQ.js} +1 -1
  156. package/dist/public/assets/{cose-bilkent-JH36ORCC-CJdgJyUw.js → cose-bilkent-JH36ORCC-CTSKeRBe.js} +1 -1
  157. package/dist/public/assets/cynefin-EF2NZ3EQ-CP12ndt7.js +1 -0
  158. package/dist/public/assets/{cynefinDiagram-L36ESFBY-D0F_9jN8.js → cynefinDiagram-L36ESFBY-67xEPyP9.js} +1 -1
  159. package/dist/public/assets/{d3-selection-BoARy1rP.js → d3-selection-BUiX-3qh.js} +1 -1
  160. package/dist/public/assets/{dagre-SPEB5RXH-CzI5gZOv.js → dagre-SPEB5RXH-DDw-u3Kg.js} +1 -1
  161. package/dist/public/assets/{diagram-3B7GL73J-BCtNcE7M.js → diagram-3B7GL73J-BBFInaCs.js} +1 -1
  162. package/dist/public/assets/{diagram-DNEMPZML-DV9U4KeH.js → diagram-DNEMPZML-ZdnFKM7-.js} +1 -1
  163. package/dist/public/assets/{diagram-L3MUGCDN-DHU45Sd4.js → diagram-L3MUGCDN-CPb04hOv.js} +1 -1
  164. package/dist/public/assets/{diagram-LA4NIPWU-Ba5oVP56.js → diagram-LA4NIPWU-P9wHFGDS.js} +1 -1
  165. package/dist/public/assets/{diagram-MHCOC4E2-B1Nk6qet.js → diagram-MHCOC4E2-Ce_Cr-t6.js} +1 -1
  166. package/dist/public/assets/{diagram-XPFHEONP-DFwA3q09.js → diagram-XPFHEONP-CfS34OHW.js} +1 -1
  167. package/dist/public/assets/{dist-Col1xVDT.js → dist-6pZqZEaM.js} +1 -1
  168. package/dist/public/assets/{ebnfDiagram-UZSYDL2S-BuBgxBJ2.js → ebnfDiagram-UZSYDL2S-BkHabCn2.js} +1 -1
  169. package/dist/public/assets/{editor.api-BLlyFz5x.js → editor.api-CO4Q0NKb.js} +1 -1
  170. package/dist/public/assets/{elk-XV6XMXQE-BPEI--zX.js → elk-XV6XMXQE-JpreOVeR.js} +1 -1
  171. package/dist/public/assets/{erDiagram-EYBAPDEH-Cci0kYUw.js → erDiagram-EYBAPDEH-DDFJwzHx.js} +1 -1
  172. package/dist/public/assets/{eventmodeling-K75KTNOO-B0eT5X1_.js → eventmodeling-K75KTNOO-DsnkF6Zc.js} +1 -1
  173. package/dist/public/assets/flowDiagram-MALGAFMO-Djxeacjw.js +1 -0
  174. package/dist/public/assets/{freemarker2-CAZGFA3W.js → freemarker2-Cm4NK652.js} +1 -1
  175. package/dist/public/assets/{ganttDiagram-23REXITY-DEm85e1I.js → ganttDiagram-23REXITY-C7eedoYb.js} +1 -1
  176. package/dist/public/assets/gitGraph-VSP46ZUC-qlWN7ijl.js +1 -0
  177. package/dist/public/assets/{gitGraphDiagram-STJD7YCW-DJAZD2LR.js → gitGraphDiagram-STJD7YCW-Cuh3ih-z.js} +1 -1
  178. package/dist/public/assets/{handlebars-Agkl4nGr.js → handlebars-BnE51DUi.js} +1 -1
  179. package/dist/public/assets/{html-Cu-CsqZI.js → html-7koekDfa.js} +1 -1
  180. package/dist/public/assets/{index-TeLHaE4u.js → index-CQG1XddL.js} +2 -2
  181. package/dist/public/assets/info-OHQRW6UA-jN69V28z.js +1 -0
  182. package/dist/public/assets/{infoDiagram-KBXO4MBG-4zHsBnIy.js → infoDiagram-KBXO4MBG-BY3iq7I8.js} +1 -1
  183. package/dist/public/assets/{ishikawaDiagram-M35NCXHK-Bg8OYLGr.js → ishikawaDiagram-M35NCXHK-COjlz24y.js} +1 -1
  184. package/dist/public/assets/{javascript-BdMDRX8l.js → javascript-BUZgUhdn.js} +1 -1
  185. package/dist/public/assets/{journeyDiagram-OPLOXDXO-B2xtzmpE.js → journeyDiagram-OPLOXDXO-DReJE04Q.js} +1 -1
  186. package/dist/public/assets/{jsonMode-Dg92qQvX.js → jsonMode-qPeVDBDp.js} +1 -1
  187. package/dist/public/assets/{kanban-definition-BZKZHSQY-DQ4N7t_w.js → kanban-definition-BZKZHSQY-BB0_ePvg.js} +1 -1
  188. package/dist/public/assets/{liquid-BydEnYkh.js → liquid-CNKL9dLX.js} +1 -1
  189. package/dist/public/assets/{mdx-XZXeM7ll.js → mdx-D1_UzrBc.js} +1 -1
  190. package/dist/public/assets/{mermaid-parser.core-H24--uw9.js → mermaid-parser.core-DiE3z_tV.js} +3 -3
  191. package/dist/public/assets/{mermaid.core-BmCrSjUU.js → mermaid.core-CBCRrLdl.js} +4 -4
  192. package/dist/public/assets/{mindmap-definition-I2QAS2VK-CGQXKItp.js → mindmap-definition-I2QAS2VK-D-Y5fKl1.js} +1 -1
  193. package/dist/public/assets/module-BEbKICB1.js +2475 -0
  194. package/dist/public/assets/module-Egyx6Otv.js +1 -0
  195. package/dist/public/assets/{monaco-DP8M_Ttp.js → monaco--czRbHhk.js} +3 -3
  196. package/dist/public/assets/packet-JDAUHWVQ-Cl8QuXQJ.js +1 -0
  197. package/dist/public/assets/{pegDiagram-FD4XPPHP-CXKRGFUs.js → pegDiagram-FD4XPPHP-1jx5jc73.js} +1 -1
  198. package/dist/public/assets/pie-XZMESJXO-kVGJsGZe.js +1 -0
  199. package/dist/public/assets/{pieDiagram-J4AKIIQI-9XEDP1wR.js → pieDiagram-J4AKIIQI-DGv_WCCu.js} +1 -1
  200. package/dist/public/assets/{python-C-0PA82u.js → python-DNZu5LjV.js} +1 -1
  201. package/dist/public/assets/{quadrantDiagram-XTYBLID2-C-uxTp-5.js → quadrantDiagram-XTYBLID2-BgY0lf8V.js} +1 -1
  202. package/dist/public/assets/radar-ABXABTNO-Dw71L-n8.js +1 -0
  203. package/dist/public/assets/railroad-I3PHUGI6-DkaUvI4_.js +1 -0
  204. package/dist/public/assets/{railroad-abnf-LNEFI6M7-CTft_ST0.js → railroad-abnf-LNEFI6M7-tZ7rJxwM.js} +1 -1
  205. package/dist/public/assets/{railroad-ebnf-DWYD2UWJ-DfRJhL7G.js → railroad-ebnf-DWYD2UWJ-JO6n_1TK.js} +1 -1
  206. package/dist/public/assets/{railroad-peg-JR7BVNR7-DFePx4YD.js → railroad-peg-JR7BVNR7-Bf0PG2YJ.js} +1 -1
  207. package/dist/public/assets/{railroadDiagram-MRQ6NCDL-BmK1KUsT.js → railroadDiagram-MRQ6NCDL-BMjog84X.js} +1 -1
  208. package/dist/public/assets/{razor-DEKNSiT7.js → razor-DU-x8qSP.js} +1 -1
  209. package/dist/public/assets/{requirementDiagram-Y7LWUY3S-Ds27pS9Y.js → requirementDiagram-Y7LWUY3S-CktbbWjr.js} +1 -1
  210. package/dist/public/assets/{sankeyDiagram-WGJFYUXA-e2OTzBma.js → sankeyDiagram-WGJFYUXA-CQonOre7.js} +1 -1
  211. package/dist/public/assets/{sequenceDiagram-5NDRBG5M-BcoIpxF6.js → sequenceDiagram-5NDRBG5M-CAe8-JvA.js} +1 -1
  212. package/dist/public/assets/{stateDiagram-v2-FJ4FJNEA-CNr67mC9.js → stateDiagram-v2-FJ4FJNEA-BrkqOuRm.js} +1 -1
  213. package/dist/public/assets/{swimlanes-UMQ2AFYF-DKPgHCev.js → swimlanes-UMQ2AFYF-sLpgHBKo.js} +1 -1
  214. package/dist/public/assets/swimlanesDiagram-OMPLPG4O-amBdr5Wc.js +8 -0
  215. package/dist/public/assets/{timeline-definition-SEUHKTQE-BcCmuE6C.js → timeline-definition-SEUHKTQE-CHE0x-WN.js} +1 -1
  216. package/dist/public/assets/treeView-D4JQ5SDB-DKLyFqZk.js +1 -0
  217. package/dist/public/assets/treemap-SAJKECNS-CRG6ogj8.js +1 -0
  218. package/dist/public/assets/{typescript-B1Uk3m6A.js → typescript-BrNT2oWW.js} +1 -1
  219. package/dist/public/assets/{usecaseDiagram-AFA6YXN4-BpCD8dP7.js → usecaseDiagram-AFA6YXN4-DwkFRI5R.js} +1 -1
  220. package/dist/public/assets/{vennDiagram-NNMJR3RB-CQjX5_-8.js → vennDiagram-NNMJR3RB-BquQVmJq.js} +1 -1
  221. package/dist/public/assets/wardley-7MLQ67FV-D2jQfflX.js +1 -0
  222. package/dist/public/assets/{wardleyDiagram-S7YFUSEH-D7gYo9fV.js → wardleyDiagram-S7YFUSEH-sNYFUfMe.js} +1 -1
  223. package/dist/public/assets/{xml-DBh_LekU.js → xml-BY65QKv7.js} +1 -1
  224. package/dist/public/assets/{xychartDiagram-GGNKY7IX-B_1aOZKU.js → xychartDiagram-GGNKY7IX-CnWEYuid.js} +1 -1
  225. package/dist/public/assets/{yaml-BE55tHva.js → yaml-BMovUwzO.js} +1 -1
  226. package/dist/public/index.html +1 -1
  227. package/dist/serve/index.mjs +1959 -466
  228. package/package.json +39 -37
  229. package/dist/public/assets/cynefin-EF2NZ3EQ-DBnkPRHn.js +0 -1
  230. package/dist/public/assets/flowDiagram-MALGAFMO-CmMdmAxj.js +0 -1
  231. package/dist/public/assets/gitGraph-VSP46ZUC-DKo3OVhR.js +0 -1
  232. package/dist/public/assets/info-OHQRW6UA-tKl26QqM.js +0 -1
  233. package/dist/public/assets/module-1mERtQ0Z.js +0 -1
  234. package/dist/public/assets/module-BxIQdJqY.js +0 -2449
  235. package/dist/public/assets/packet-JDAUHWVQ-CnBx3hR7.js +0 -1
  236. package/dist/public/assets/pie-XZMESJXO-hogxgeR2.js +0 -1
  237. package/dist/public/assets/radar-ABXABTNO-CdWiN8Cw.js +0 -1
  238. package/dist/public/assets/railroad-I3PHUGI6-DnYOBI5V.js +0 -1
  239. package/dist/public/assets/swimlanesDiagram-OMPLPG4O-U0uzjboz.js +0 -8
  240. package/dist/public/assets/treeView-D4JQ5SDB-4ppY0Rs5.js +0 -1
  241. package/dist/public/assets/treemap-SAJKECNS-CAvLAs7q.js +0 -1
  242. package/dist/public/assets/wardley-7MLQ67FV-D_F3qmRJ.js +0 -1
package/dist/cli.mjs CHANGED
@@ -4079,7 +4079,7 @@ var init_exec_rpc = __esm(() => {
4079
4079
  });
4080
4080
 
4081
4081
  // ../../ta-packages/ta-exec/esm/node/local-exec-environment.js
4082
- import { spawn as spawn2 } from "node:child_process";
4082
+ import { spawn as spawn3 } from "node:child_process";
4083
4083
  import { appendFile, mkdir, readdir, readFile, rm, stat, writeFile } from "node:fs/promises";
4084
4084
  import { resolve as resolve3 } from "node:path";
4085
4085
 
@@ -4091,7 +4091,7 @@ class LocalExecEnvironment {
4091
4091
  exec(command, options = {}) {
4092
4092
  var _a, _b;
4093
4093
  const [shell, ...args] = process.platform === "win32" ? ["cmd.exe", "/d", "/s", "/c"] : ["/bin/sh", "-c"];
4094
- const child = spawn2(shell, [...args, command], {
4094
+ const child = spawn3(shell, [...args, command], {
4095
4095
  cwd: resolve3(this.cwd, (_a = options.cwd) !== null && _a !== undefined ? _a : "."),
4096
4096
  env: (_b = options.env) !== null && _b !== undefined ? _b : process.env,
4097
4097
  stdio: ["ignore", "pipe", "pipe"],
@@ -4125,7 +4125,7 @@ class LocalExecEnvironment {
4125
4125
  }
4126
4126
  spawn(command, args, options = {}) {
4127
4127
  var _a, _b;
4128
- const child = spawn2(command, args, {
4128
+ const child = spawn3(command, args, {
4129
4129
  cwd: resolve3(this.cwd, (_a = options.cwd) !== null && _a !== undefined ? _a : "."),
4130
4130
  env: (_b = options.env) !== null && _b !== undefined ? _b : process.env,
4131
4131
  stdio: ["pipe", "pipe", "pipe"]
@@ -4814,6 +4814,73 @@ class SessionLockExtension {
4814
4814
  }
4815
4815
  }
4816
4816
 
4817
+ // ../../ta-packages/ta-harness/esm/node/serve-restart.js
4818
+ import { spawn as spawn2 } from "node:child_process";
4819
+ var SERVE_RESTART_EXIT_CODE = 75;
4820
+ var KEY = Symbol.for("celljs.ta.serve-restart");
4821
+ var TaServeRestart;
4822
+ (function(TaServeRestart2) {
4823
+ function prepare(plan, process2 = nodeProcess()) {
4824
+ globalThis[KEY] = { plan, process: process2, requested: false };
4825
+ }
4826
+ TaServeRestart2.prepare = prepare;
4827
+ function supported() {
4828
+ return prepared() !== undefined;
4829
+ }
4830
+ TaServeRestart2.supported = supported;
4831
+ function request() {
4832
+ const state = prepared();
4833
+ if (!state) {
4834
+ return false;
4835
+ }
4836
+ if (!state.requested) {
4837
+ state.requested = true;
4838
+ state.process.onExit(() => replace(state.plan, state.process));
4839
+ state.process.stop();
4840
+ }
4841
+ return true;
4842
+ }
4843
+ TaServeRestart2.request = request;
4844
+ function replace(plan, process2) {
4845
+ if (plan.supervised) {
4846
+ process2.setExitCode(SERVE_RESTART_EXIT_CODE);
4847
+ return;
4848
+ }
4849
+ const [file, ...args] = plan.command;
4850
+ if (process2.execve) {
4851
+ try {
4852
+ process2.execve(file, [file, ...args], plan.env);
4853
+ return;
4854
+ } catch (error) {
4855
+ console.error(`ta serve: could not start again in place (${error instanceof Error ? error.message : error}); starting a new process.`);
4856
+ }
4857
+ }
4858
+ process2.spawnDetached(plan.command, plan.env);
4859
+ }
4860
+ TaServeRestart2.replace = replace;
4861
+ function prepared() {
4862
+ return globalThis[KEY];
4863
+ }
4864
+ function nodeProcess() {
4865
+ const { execve } = process;
4866
+ return {
4867
+ execve: typeof execve === "function" ? execve.bind(process) : undefined,
4868
+ spawnDetached: ([file, ...args], env) => spawn2(file, args, { env, stdio: "inherit", detached: true }).unref(),
4869
+ onExit: (listener) => process.once("exit", listener),
4870
+ setExitCode: (code) => {
4871
+ process.exitCode = code;
4872
+ },
4873
+ stop: () => {
4874
+ if (process.listenerCount("SIGTERM") > 0) {
4875
+ process.emit("SIGTERM", "SIGTERM");
4876
+ } else {
4877
+ process.exit(0);
4878
+ }
4879
+ }
4880
+ };
4881
+ }
4882
+ })(TaServeRestart || (TaServeRestart = {}));
4883
+
4817
4884
  // ../../ta-packages/ta-harness/esm/node/serve-state.js
4818
4885
  import { chmodSync, mkdirSync, readFileSync as readFileSync2, writeFileSync } from "node:fs";
4819
4886
  import { createServer } from "node:net";
@@ -5039,6 +5106,8 @@ var TaPackages;
5039
5106
  "@celljs/ta-recall",
5040
5107
  "@celljs/ta-initiative",
5041
5108
  "@celljs/ta-glance",
5109
+ "@celljs/ta-plot",
5110
+ "@celljs/ta-3d",
5042
5111
  "@celljs/ta-games",
5043
5112
  "@celljs/ta-bots",
5044
5113
  "@celljs/ta-agents",
@@ -5338,6 +5407,11 @@ var TaCli;
5338
5407
  process.exitCode = 1;
5339
5408
  return;
5340
5409
  }
5410
+ TaServeRestart.prepare({
5411
+ command: [process.execPath, ...process.execArgv, ...process.argv.slice(1)],
5412
+ env: { ...process.env },
5413
+ supervised: Boolean(process.env.TA_SERVE_STDIN_LIFELINE)
5414
+ });
5341
5415
  if (process.env.TA_SERVE_STDIN_LIFELINE) {
5342
5416
  delete process.env.TA_SERVE_STDIN_LIFELINE;
5343
5417
  process.stdin.once("end", () => process.kill(process.pid, "SIGTERM"));
@@ -1,5 +1,12 @@
1
1
  # @celljs/ta
2
2
 
3
+ ## 4.15.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 31376bc: 3D in replies: Function plot draws surfaces z = f(x, y) and curves in space in 3D, turned by dragging; the new built-in 3D view draws `ta-3d` scenes of shapes, lines, arrows and glTF models of the workspace. Web extensions get the Box icon.
8
+ - 3f14e01: Function plot comes with Ta: functions and curves of replies are drawn as animated plots (`ta-plot` blocks), with params to drag and families of curves; its expressions are parsed, never run. Web extensions get the ChartSpline icon.
9
+
3
10
  ## 4.15.0
4
11
 
5
12
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celljs/ta",
3
- "version": "4.15.0",
3
+ "version": "4.15.1",
4
4
  "type": "module",
5
5
  "piConfig": {
6
6
  "name": "ta",
@@ -0,0 +1,11 @@
1
+ # Cell - Ta 3D
2
+
3
+ A pi package that comes with Ta (on by default; Settings → Extensions of the web client turns it off): 3D view. When a reply shows something solid, Ta draws it as a 3D scene to turn.
4
+
5
+ - **Scenes**: under the Ta service, every turn's system prompt gets a `<ta-3d>` section: to show a 3D model, a structure, a layout, a molecule or an object of parts, Ta writes a `ta-3d` block (JSON): shapes (box, sphere, cylinder, cone, torus, plane, capsule), lines through points, arrows and groups, each with a position, rotation, scale, color, opacity, metal, roughness and label, spinning (`spin`) or bobbing (`bob`) if asked.
6
+ - **Models of the workspace**: `{"shape": "model", "src": "models/robot.glb"}` loads a glTF 2.0 model of the conversation's directory (a .glb, or a .gltf of embedded files), scaled to `size`, centered, its first animation playing; through a relay and on a phone too (`files.loadable`). One that does not load is told of in the card, without its URL.
7
+ - **Seeing it**: lit, with a shadow on the ground, the camera fit to it; it turns slowly until dragged; a pinch (of a trackpad too) zooms, a wheel still scrolls the conversation; it sleeps while out of sight (`ui.Game3D`).
8
+ - **Data only**: a block holds data: colors are CSS colors, models paths of the workspace (no web addresses), at most 400 objects nested 6 deep.
9
+ - **Elsewhere**: functions and surfaces z = f(x, y) are `ta-plot`'s; external agents (ta-agents) get the section too.
10
+
11
+ The format is in `web-src/scene-spec.ts`, the prompt in `web-src/scene-prompt.ts`.
@@ -0,0 +1,11 @@
1
+ # Cell - Ta 3D
2
+
3
+ Ta 自带的 pi 包(默认开启,可在 Web 客户端的 设置 → 扩展 关闭):3D 展示。回复里要展示立体的东西时,Ta 直接画成可以转动的 3D 场景。
4
+
5
+ - **场景**:在 Ta 服务下,每一轮的系统提示里多一段 `<ta-3d>`:要展示 3D 模型、结构、布局、分子、由部件拼成的物体时,写一个 `ta-3d` 代码块(JSON):基本形状(方块、球、圆柱、圆锥、圆环、平面、胶囊)、穿过一组点的线、箭头、分组,各自有位置、旋转、缩放、颜色、透明度、金属感、粗糙度、标签,还能自转(`spin`)和上下浮动(`bob`)。
6
+ - **工作区的模型**:`{"shape": "model", "src": "models/robot.glb"}` 加载对话目录里的 glTF 2.0 模型(.glb,或内嵌资源的 .gltf),按 `size` 缩放、居中,播放第一段动画;经中继和手机也能加载(`files.loadable`)。加载不了时卡片说明原因,不显示文件地址。
7
+ - **看**:有灯光和地面阴影,相机自动对准内容;慢慢自转,拖动就转、停止自转;双指(触控板捏合)缩放,滚轮仍滚动对话;看不见时休眠(`ui.Game3D`)。
8
+ - **只读数据**:块里只有数据,颜色只认 CSS 颜色,模型只认工作区路径(不加载网址),物体最多 400 个、嵌套最多 6 层。
9
+ - **别处**:函数和曲面 z = f(x, y) 归 `ta-plot`;外部 Agent(ta-agents)也会拿到这段写法。
10
+
11
+ 格式见 `web-src/scene-spec.ts`,提示词见 `web-src/scene-prompt.ts`。
@@ -0,0 +1,120 @@
1
+ // ../ta-protocol/esm/common/ta-extension-host.js
2
+ var TA_HOST_EVENT = "ta:host";
3
+ var TaHostUtil;
4
+ (function(TaHostUtil2) {
5
+ TaHostUtil2.WAIT_MS = 1000;
6
+ function reach(events, name, waitMs = TaHostUtil2.WAIT_MS) {
7
+ return new Promise((resolve) => {
8
+ let heard = false;
9
+ let answered = false;
10
+ const timer = setTimeout(() => resolve(undefined), waitMs);
11
+ const request = {
12
+ name,
13
+ heard: () => {
14
+ heard = true;
15
+ },
16
+ resolve: (answer) => {
17
+ answered = true;
18
+ clearTimeout(timer);
19
+ resolve(answer);
20
+ }
21
+ };
22
+ events.emit(TA_HOST_EVENT, request);
23
+ if (!heard && !answered) {
24
+ clearTimeout(timer);
25
+ resolve(undefined);
26
+ }
27
+ });
28
+ }
29
+ TaHostUtil2.reach = reach;
30
+ function marked(systemPrompt, mark) {
31
+ return role(systemPrompt).includes(mark);
32
+ }
33
+ TaHostUtil2.marked = marked;
34
+ function role(systemPrompt) {
35
+ if (!systemPrompt) {
36
+ return "";
37
+ }
38
+ const open = `<addendum>
39
+ `;
40
+ const start = systemPrompt.indexOf(open);
41
+ const context = systemPrompt.indexOf(`<project_context>
42
+ `);
43
+ if (start < 0 || context >= 0 && context < start) {
44
+ return "";
45
+ }
46
+ const end = systemPrompt.indexOf(`
47
+ </addendum>`, start);
48
+ return systemPrompt.slice(start + open.length, end < 0 ? undefined : end);
49
+ }
50
+ TaHostUtil2.role = role;
51
+ })(TaHostUtil || (TaHostUtil = {}));
52
+ var TA_ASK_ENTRY = "ta-ask";
53
+ var TaAskUtil;
54
+ (function(TaAskUtil2) {
55
+ const LENGTH = 120;
56
+ function entry(question) {
57
+ const line = question.replace(/\s+/g, " ").trim();
58
+ return { question: line.length > LENGTH ? `${line.slice(0, LENGTH - 1)}…` : line };
59
+ }
60
+ TaAskUtil2.entry = entry;
61
+ function asking(entries) {
62
+ var _a;
63
+ for (let i = entries.length - 1;i >= 0; i--) {
64
+ const entry2 = entries[i];
65
+ if (entry2.type === "message" && ((_a = entry2.message) === null || _a === undefined ? undefined : _a.role) === "user") {
66
+ return;
67
+ }
68
+ if (entry2.type === "custom" && entry2.customType === TA_ASK_ENTRY) {
69
+ return read(entry2);
70
+ }
71
+ }
72
+ return;
73
+ }
74
+ TaAskUtil2.asking = asking;
75
+ function next(asked, entry2) {
76
+ var _a;
77
+ if (entry2.type === "message" && ((_a = entry2.message) === null || _a === undefined ? undefined : _a.role) === "user") {
78
+ return;
79
+ }
80
+ return entry2.type === "custom" && entry2.customType === TA_ASK_ENTRY ? read(entry2) : asked;
81
+ }
82
+ TaAskUtil2.next = next;
83
+ function read(found) {
84
+ var _a;
85
+ const question = (_a = found.data) === null || _a === undefined ? undefined : _a.question;
86
+ if (typeof question !== "string" || !question.trim()) {
87
+ return;
88
+ }
89
+ const at = found.timestamp ? Date.parse(found.timestamp) : Number.NaN;
90
+ return { question: entry(question).question, at: Number.isNaN(at) ? 0 : at };
91
+ }
92
+ })(TaAskUtil || (TaAskUtil = {}));
93
+
94
+ // web-src/scene-protocol.ts
95
+ var NAME = "@celljs/ta-3d";
96
+ var LANGUAGE = "ta-3d";
97
+
98
+ // web-src/scene-prompt.ts
99
+ var SCENE_PROMPT = `To show the user something in 3D (a 3D model of the workspace, a structure, a layout, a molecule, an object made of shapes, how parts fit together), write a fenced block of language ${LANGUAGE} holding JSON rather than describing it; Ta draws it, lit, with a shadow, turning slowly; the user turns it by dragging. Functions and surfaces z = f(x, y) go in a ta-plot block instead.
100
+ {"title"?: string, "objects": [...], "camera"?: {"position": [x, y, z], "target"?: [x, y, z]}, "rotate"?: false, "ground"?: false, "background"?: color}
101
+ An object: {"shape": "box" | "sphere" | "cylinder" | "cone" | "torus" | "plane" | "capsule" | "line" | "arrow" | "model" | "group", "position"?: [x, y, z], "rotation"?: [degrees about x, y, z], "scale"?: number | [x, y, z], "color"?: CSS color, "opacity"?, "metal"?: 0..1, "rough"?: 0..1, "wireframe"?, "label"?: short text over it, "spin"?: [degrees a second about x, y, z], "bob"?: height it bobs, "children"?: [objects, placed relative to it]}.
102
+ Sizes: box and plane "size": [width, height, depth] (or a number); sphere "radius"; cylinder, cone, capsule "radius" and "height"; torus "radius" and "tube"; line "points" (through them) and arrow "points" (from the first to the last), with a thin "radius"?.
103
+ A model is {"shape": "model", "src": "path/in/the/workspace.glb", "size"?: its largest side, default 1}: glTF 2.0, a .glb or a .gltf with embedded files, centered at its position, its first animation playing; check the file exists first. Y is up; keep the scene within a few units of the origin; the camera fits it when not given. Labels and title in the user's language, short.`;
104
+
105
+ // web-src/extension.ts
106
+ function activate(pi) {
107
+ let served;
108
+ const underServe = () => served ??= TaHostUtil.reach(pi.events, NAME).then((answer) => answer !== undefined);
109
+ pi.on("session_start", () => {
110
+ underServe();
111
+ });
112
+ pi.on("before_agent_start", async (event) => {
113
+ if (await underServe()) {
114
+ event.systemPromptOptions.sections = { ...event.systemPromptOptions.sections, [LANGUAGE]: SCENE_PROMPT };
115
+ }
116
+ });
117
+ }
118
+ export {
119
+ activate as default
120
+ };
@@ -0,0 +1,15 @@
1
+ /** The little of pi's extension API this uses. */
2
+ interface Pi {
3
+ events: {
4
+ emit(event: string, data: unknown): void;
5
+ };
6
+ on(event: string, handler: (event: never) => unknown): unknown;
7
+ }
8
+ /**
9
+ * The pi extension, in every session: tells the model to show what is best seen in 3D as a `ta-3d` block
10
+ * (SCENE_PROMPT), a section of pi's system prompt of its own. Only under ta serve, whose pages draw the scenes; under
11
+ * `ta` alone, in a terminal, the prompt stays as pi's.
12
+ */
13
+ export default function activate(pi: Pi): void;
14
+ export {};
15
+ //# sourceMappingURL=extension.d.ts.map
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = activate;
4
+ const ta_extension_host_1 = require("@celljs/ta-protocol/lib/common/ta-extension-host");
5
+ const scene_prompt_1 = require("./scene-prompt");
6
+ const scene_protocol_1 = require("./scene-protocol");
7
+ /**
8
+ * The pi extension, in every session: tells the model to show what is best seen in 3D as a `ta-3d` block
9
+ * (SCENE_PROMPT), a section of pi's system prompt of its own. Only under ta serve, whose pages draw the scenes; under
10
+ * `ta` alone, in a terminal, the prompt stays as pi's.
11
+ */
12
+ function activate(pi) {
13
+ let served;
14
+ const underServe = () => (served !== null && served !== void 0 ? served : (served = ta_extension_host_1.TaHostUtil.reach(pi.events, scene_protocol_1.NAME).then(answer => answer !== undefined)));
15
+ pi.on('session_start', () => {
16
+ void underServe();
17
+ });
18
+ pi.on('before_agent_start', async (event) => {
19
+ if (await underServe()) {
20
+ event.systemPromptOptions.sections = { ...event.systemPromptOptions.sections, [scene_protocol_1.LANGUAGE]: scene_prompt_1.SCENE_PROMPT };
21
+ }
22
+ });
23
+ }
24
+ //# sourceMappingURL=extension.js.map
@@ -0,0 +1,19 @@
1
+ import { type TaLanguage } from '@celljs/ta-protocol/lib/common/language';
2
+ import type { Language } from '@celljs/ta-web/lib/browser/extension/web-extension-api';
3
+ declare const EN: {
4
+ building: string;
5
+ failed: string;
6
+ model: string;
7
+ missing: string;
8
+ unreadable: string;
9
+ hint: string;
10
+ };
11
+ type Words = typeof EN;
12
+ /** The words of each language of Ta, checked by scripts/check-i18n.ts. */
13
+ export declare const WORDS: Readonly<Record<TaLanguage, Words>>;
14
+ export declare namespace SceneWords {
15
+ function of(language: Language): Words;
16
+ function format(text: string, values: Record<string, string>): string;
17
+ }
18
+ export {};
19
+ //# sourceMappingURL=i18n.d.ts.map
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SceneWords = exports.WORDS = void 0;
4
+ const language_1 = require("@celljs/ta-protocol/lib/common/language");
5
+ const EN = {
6
+ building: 'Building the scene…',
7
+ failed: 'This scene cannot be shown: {reason}',
8
+ model: '{path} did not load: {reason}',
9
+ missing: 'no such file',
10
+ unreadable: 'not a glTF model it can read',
11
+ hint: 'Drag to turn · pinch to zoom',
12
+ };
13
+ const ZH = {
14
+ building: '正在搭建场景…',
15
+ failed: '这个场景显示不出来:{reason}',
16
+ model: '{path} 没能加载:{reason}',
17
+ missing: '文件不存在',
18
+ unreadable: '不是能读取的 glTF 模型',
19
+ hint: '拖动旋转 · 双指缩放',
20
+ };
21
+ const ZH_TW = {
22
+ building: '正在搭建場景…',
23
+ failed: '這個場景顯示不出來:{reason}',
24
+ model: '{path} 沒能載入:{reason}',
25
+ missing: '檔案不存在',
26
+ unreadable: '不是能讀取的 glTF 模型',
27
+ hint: '拖動旋轉 · 雙指縮放',
28
+ };
29
+ const JA = {
30
+ building: 'シーンを組み立て中…',
31
+ failed: 'このシーンは表示できません:{reason}',
32
+ model: '{path} を読み込めませんでした:{reason}',
33
+ missing: 'ファイルがありません',
34
+ unreadable: '読み込める glTF モデルではありません',
35
+ hint: 'ドラッグで回転 · ピンチで拡大縮小',
36
+ };
37
+ /** The words of each language of Ta, checked by scripts/check-i18n.ts. */
38
+ exports.WORDS = { 'zh-CN': ZH, 'zh-TW': ZH_TW, 'en-US': EN, 'ja-JP': JA };
39
+ var SceneWords;
40
+ (function (SceneWords) {
41
+ function of(language) {
42
+ return language_1.TaLanguageUtil.pick(language, exports.WORDS);
43
+ }
44
+ SceneWords.of = of;
45
+ function format(text, values) {
46
+ return text.replace(/\{(\w+)\}/g, (all, name) => { var _a; return (_a = values[name]) !== null && _a !== void 0 ? _a : all; });
47
+ }
48
+ SceneWords.format = format;
49
+ })(SceneWords || (exports.SceneWords = SceneWords = {}));
50
+ //# sourceMappingURL=i18n.js.map
@@ -0,0 +1,7 @@
1
+ import type { WebExtensionAPI } from '@celljs/ta-web/lib/browser/extension/web-extension-api';
2
+ /**
3
+ * The page side of 3D view: a `ta-3d` block of a reply drawn as a scene on the 3D engine of the page. The pi
4
+ * extension (extension.ts) tells the model to write such a block for what is best seen in 3D.
5
+ */
6
+ export default function activate(pi: WebExtensionAPI): () => void;
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = activate;
4
+ const react_1 = require("./react");
5
+ const scene_card_1 = require("./scene-card");
6
+ const scene_protocol_1 = require("./scene-protocol");
7
+ const style_1 = require("./style");
8
+ /**
9
+ * The page side of 3D view: a `ta-3d` block of a reply drawn as a scene on the 3D engine of the page. The pi
10
+ * extension (extension.ts) tells the model to write such a block for what is best seen in 3D.
11
+ */
12
+ function activate(pi) {
13
+ (0, react_1.bind)(pi.React);
14
+ // An older app shows the block as code.
15
+ if (!pi.registerCodeRenderer || !pi.ui.Game3D) {
16
+ return () => undefined;
17
+ }
18
+ const removeStyle = (0, style_1.injectStyle)();
19
+ pi.registerCodeRenderer(scene_protocol_1.LANGUAGE, (0, scene_card_1.sceneCard)(pi));
20
+ return removeStyle;
21
+ }
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,8 @@
1
+ import type * as ReactModule from 'react';
2
+ /**
3
+ * The React of the page, which a web extension cannot import: `activate` binds it before anything
4
+ * renders. The JSX of this package compiles to `React.createElement` (tsconfig.json).
5
+ */
6
+ export declare let React: typeof ReactModule;
7
+ export declare function bind(react: typeof ReactModule): void;
8
+ //# sourceMappingURL=react.d.ts.map
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.React = void 0;
4
+ exports.bind = bind;
5
+ function bind(react) {
6
+ exports.React = react;
7
+ }
8
+ //# sourceMappingURL=react.js.map
@@ -0,0 +1,4 @@
1
+ import type { WebCodeRendererProps, WebExtensionAPI } from '@celljs/ta-web/lib/browser/extension/web-extension-api';
2
+ /** The renderer of a `ta-3d` block: the scene once the block is closed, what is wrong with it when it cannot be shown. */
3
+ export declare function sceneCard(pi: WebExtensionAPI): React.ComponentType<WebCodeRendererProps>;
4
+ //# sourceMappingURL=scene-card.d.ts.map
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sceneCard = sceneCard;
4
+ const i18n_1 = require("./i18n");
5
+ const react_1 = require("./react");
6
+ const scene_spec_1 = require("./scene-spec");
7
+ const scene_view_1 = require("./scene-view");
8
+ /** The renderer of a `ta-3d` block: the scene once the block is closed, what is wrong with it when it cannot be shown. */
9
+ function sceneCard(pi) {
10
+ const Markdown = pi.ui.Markdown;
11
+ function View({ scene }) {
12
+ const words = i18n_1.SceneWords.of(pi.ui.language);
13
+ const cwd = pi.ui.useCwd();
14
+ const [failed, setFailed] = react_1.React.useState([]);
15
+ const host = react_1.React.useMemo(() => ({
16
+ // A file of the directory of the conversation, as the page loads it (a blob: of its bytes through a relay).
17
+ modelUrl: async (src) => pi.files.loadable(await pi.workspace.fileUrl(src, cwd)),
18
+ failed: (src, error) => {
19
+ var _a;
20
+ // Never the URL it was loaded by: it holds the secret part that serves the files.
21
+ const reason = /\b404\b|not found|ENOENT/i.test(String((_a = error === null || error === void 0 ? void 0 : error.message) !== null && _a !== void 0 ? _a : error)) ? words.missing : words.unreadable;
22
+ setFailed(list => [...list, i18n_1.SceneWords.format(words.model, { path: src, reason })]);
23
+ },
24
+ }), [cwd, words]);
25
+ const setup = react_1.React.useCallback((context) => new scene_view_1.SceneView(context, scene, host), [scene, host]);
26
+ const Game3D = pi.ui.Game3D;
27
+ return (react_1.React.createElement("div", { className: "t3d-card" },
28
+ scene.title ? react_1.React.createElement("div", { className: "t3d-title" }, scene.title) : null,
29
+ react_1.React.createElement("div", { className: "t3d-view" }, Game3D ? react_1.React.createElement(Game3D, { setup: setup }) : null),
30
+ failed.map(text => (react_1.React.createElement("div", { key: text, className: "t3d-failed" }, text))),
31
+ react_1.React.createElement("div", { className: "t3d-hint" }, words.hint)));
32
+ }
33
+ return function SceneBlock({ code, closed }) {
34
+ var _a;
35
+ const words = i18n_1.SceneWords.of(pi.ui.language);
36
+ const read = react_1.React.useMemo(() => {
37
+ if (!closed) {
38
+ return undefined;
39
+ }
40
+ try {
41
+ return { scene: scene_spec_1.SceneSpec.read(code) };
42
+ }
43
+ catch (error) {
44
+ return { error: error instanceof Error ? error.message : String(error) };
45
+ }
46
+ }, [code, closed]);
47
+ if (!read) {
48
+ return (react_1.React.createElement("div", { className: "t3d-card t3d-writing" },
49
+ react_1.React.createElement("span", { className: "ta-spinner" }),
50
+ react_1.React.createElement("span", null, words.building)));
51
+ }
52
+ if (!read.scene) {
53
+ return (react_1.React.createElement("div", null,
54
+ react_1.React.createElement("div", { className: "t3d-failed" }, i18n_1.SceneWords.format(words.failed, { reason: (_a = read.error) !== null && _a !== void 0 ? _a : '' })),
55
+ react_1.React.createElement(Markdown, { text: `\`\`\`json\n${code}\n\`\`\`` })));
56
+ }
57
+ return react_1.React.createElement(View, { scene: read.scene });
58
+ };
59
+ }
60
+ //# sourceMappingURL=scene-card.js.map
@@ -0,0 +1,7 @@
1
+ /**
2
+ * What the model is told on every turn under ta serve, the section `<ta-3d>` of the system prompt: show what is best
3
+ * seen in 3D as a `ta-3d` block, which the web extension draws. In English, as the rest of the system prompt; kept the
4
+ * same from turn to turn, so that the cache of the prompt holds.
5
+ */
6
+ export declare const SCENE_PROMPT = "To show the user something in 3D (a 3D model of the workspace, a structure, a layout, a molecule, an object made of shapes, how parts fit together), write a fenced block of language ta-3d holding JSON rather than describing it; Ta draws it, lit, with a shadow, turning slowly; the user turns it by dragging. Functions and surfaces z = f(x, y) go in a ta-plot block instead.\n{\"title\"?: string, \"objects\": [...], \"camera\"?: {\"position\": [x, y, z], \"target\"?: [x, y, z]}, \"rotate\"?: false, \"ground\"?: false, \"background\"?: color}\nAn object: {\"shape\": \"box\" | \"sphere\" | \"cylinder\" | \"cone\" | \"torus\" | \"plane\" | \"capsule\" | \"line\" | \"arrow\" | \"model\" | \"group\", \"position\"?: [x, y, z], \"rotation\"?: [degrees about x, y, z], \"scale\"?: number | [x, y, z], \"color\"?: CSS color, \"opacity\"?, \"metal\"?: 0..1, \"rough\"?: 0..1, \"wireframe\"?, \"label\"?: short text over it, \"spin\"?: [degrees a second about x, y, z], \"bob\"?: height it bobs, \"children\"?: [objects, placed relative to it]}.\nSizes: box and plane \"size\": [width, height, depth] (or a number); sphere \"radius\"; cylinder, cone, capsule \"radius\" and \"height\"; torus \"radius\" and \"tube\"; line \"points\" (through them) and arrow \"points\" (from the first to the last), with a thin \"radius\"?.\nA model is {\"shape\": \"model\", \"src\": \"path/in/the/workspace.glb\", \"size\"?: its largest side, default 1}: glTF 2.0, a .glb or a .gltf with embedded files, centered at its position, its first animation playing; check the file exists first. Y is up; keep the scene within a few units of the origin; the camera fits it when not given. Labels and title in the user's language, short.";
7
+ //# sourceMappingURL=scene-prompt.d.ts.map
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SCENE_PROMPT = void 0;
4
+ const scene_protocol_1 = require("./scene-protocol");
5
+ /**
6
+ * What the model is told on every turn under ta serve, the section `<ta-3d>` of the system prompt: show what is best
7
+ * seen in 3D as a `ta-3d` block, which the web extension draws. In English, as the rest of the system prompt; kept the
8
+ * same from turn to turn, so that the cache of the prompt holds.
9
+ */
10
+ exports.SCENE_PROMPT = `To show the user something in 3D (a 3D model of the workspace, a structure, a layout, a molecule, an object made of shapes, how parts fit together), write a fenced block of language ${scene_protocol_1.LANGUAGE} holding JSON rather than describing it; Ta draws it, lit, with a shadow, turning slowly; the user turns it by dragging. Functions and surfaces z = f(x, y) go in a ta-plot block instead.
11
+ {"title"?: string, "objects": [...], "camera"?: {"position": [x, y, z], "target"?: [x, y, z]}, "rotate"?: false, "ground"?: false, "background"?: color}
12
+ An object: {"shape": "box" | "sphere" | "cylinder" | "cone" | "torus" | "plane" | "capsule" | "line" | "arrow" | "model" | "group", "position"?: [x, y, z], "rotation"?: [degrees about x, y, z], "scale"?: number | [x, y, z], "color"?: CSS color, "opacity"?, "metal"?: 0..1, "rough"?: 0..1, "wireframe"?, "label"?: short text over it, "spin"?: [degrees a second about x, y, z], "bob"?: height it bobs, "children"?: [objects, placed relative to it]}.
13
+ Sizes: box and plane "size": [width, height, depth] (or a number); sphere "radius"; cylinder, cone, capsule "radius" and "height"; torus "radius" and "tube"; line "points" (through them) and arrow "points" (from the first to the last), with a thin "radius"?.
14
+ A model is {"shape": "model", "src": "path/in/the/workspace.glb", "size"?: its largest side, default 1}: glTF 2.0, a .glb or a .gltf with embedded files, centered at its position, its first animation playing; check the file exists first. Y is up; keep the scene within a few units of the origin; the camera fits it when not given. Labels and title in the user's language, short.`;
15
+ //# sourceMappingURL=scene-prompt.js.map
@@ -0,0 +1,5 @@
1
+ /** The name of the package. */
2
+ export declare const NAME = "@celljs/ta-3d";
3
+ /** The language of the fenced block of a scene in a reply: ```ta-3d, with JSON in it. */
4
+ export declare const LANGUAGE = "ta-3d";
5
+ //# sourceMappingURL=scene-protocol.d.ts.map
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LANGUAGE = exports.NAME = void 0;
4
+ /** The name of the package. */
5
+ exports.NAME = '@celljs/ta-3d';
6
+ /** The language of the fenced block of a scene in a reply: ```ta-3d, with JSON in it. */
7
+ exports.LANGUAGE = 'ta-3d';
8
+ //# sourceMappingURL=scene-protocol.js.map
@@ -0,0 +1,59 @@
1
+ export type Vec3 = readonly [number, number, number];
2
+ export declare const SHAPES: readonly ['box', 'sphere', 'cylinder', 'cone', 'torus', 'plane', 'capsule', 'line', 'arrow', 'model', 'group'];
3
+ export type SceneShape = (typeof SHAPES)[number];
4
+ /** A thing of a scene: a shape, a line, a model of the workspace, or a group of things. */
5
+ export interface SceneObject {
6
+ shape: SceneShape;
7
+ /** Width, height and depth of a box or a plane; of the bounding box a model is fit into. */
8
+ size: Vec3;
9
+ radius: number;
10
+ /** Of a cylinder, a cone, a capsule. */
11
+ height: number;
12
+ /** Of a torus, its tube. */
13
+ tube: number;
14
+ position: Vec3;
15
+ /** In degrees, about x, y and z. */
16
+ rotation: Vec3;
17
+ scale: Vec3;
18
+ color?: string;
19
+ opacity: number;
20
+ metal: number;
21
+ rough: number;
22
+ wireframe: boolean;
23
+ /** A word over it, facing the camera. */
24
+ label?: string;
25
+ /** Of a line (through them) and an arrow (from the first to the last). */
26
+ points: Vec3[];
27
+ /** Of a model: its path in the workspace, a .glb, or a .gltf of embedded files. */
28
+ src?: string;
29
+ /** Degrees a second it turns about x, y and z. */
30
+ spin: Vec3;
31
+ /** How high it bobs up and down, in units of the scene. */
32
+ bob: number;
33
+ children: SceneObject[];
34
+ }
35
+ /** What the renderer draws of a `ta-3d` block. */
36
+ export interface Scene {
37
+ title?: string;
38
+ background?: string;
39
+ /** Where the camera is and what it looks at; fit to what is shown when none was written. */
40
+ camera?: {
41
+ position: Vec3;
42
+ target: Vec3;
43
+ };
44
+ /** The scene turns slowly until the user drags it. */
45
+ rotate: boolean;
46
+ /** A soft shadow under it. */
47
+ ground: boolean;
48
+ objects: SceneObject[];
49
+ /** Whether anything moves of itself (spin, bob, an animation of a model, rotate). */
50
+ moving: boolean;
51
+ /** The paths of the models it loads. */
52
+ models: string[];
53
+ }
54
+ export declare namespace SceneSpec {
55
+ /** Throws an Error that says what is wrong for a block it cannot draw. */
56
+ function read(code: string): Scene;
57
+ function walk(objects: readonly SceneObject[], visit: (thing: SceneObject) => void): void;
58
+ }
59
+ //# sourceMappingURL=scene-spec.d.ts.map