@celljs/ta 4.15.0 → 4.15.2
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.
- package/dist/cli.mjs +79 -4
- package/dist/gateway.mjs +1320 -178
- package/dist/pi/CHANGELOG.md +15 -0
- package/dist/pi/package.json +1 -1
- package/dist/pi/packages/ta-3d/README.en.md +11 -0
- package/dist/pi/packages/ta-3d/README.md +11 -0
- package/dist/pi/packages/ta-3d/extension/index.mjs +120 -0
- package/dist/pi/packages/ta-3d/lib/extension.d.ts +15 -0
- package/dist/pi/packages/ta-3d/lib/extension.js +24 -0
- package/dist/pi/packages/ta-3d/lib/i18n.d.ts +19 -0
- package/dist/pi/packages/ta-3d/lib/i18n.js +50 -0
- package/dist/pi/packages/ta-3d/lib/index.d.ts +7 -0
- package/dist/pi/packages/ta-3d/lib/index.js +22 -0
- package/dist/pi/packages/ta-3d/lib/react.d.ts +8 -0
- package/dist/pi/packages/ta-3d/lib/react.js +8 -0
- package/dist/pi/packages/ta-3d/lib/scene-card.d.ts +4 -0
- package/dist/pi/packages/ta-3d/lib/scene-card.js +60 -0
- package/dist/pi/packages/ta-3d/lib/scene-prompt.d.ts +7 -0
- package/dist/pi/packages/ta-3d/lib/scene-prompt.js +15 -0
- package/dist/pi/packages/ta-3d/lib/scene-protocol.d.ts +5 -0
- package/dist/pi/packages/ta-3d/lib/scene-protocol.js +8 -0
- package/dist/pi/packages/ta-3d/lib/scene-spec.d.ts +59 -0
- package/dist/pi/packages/ta-3d/lib/scene-spec.js +141 -0
- package/dist/pi/packages/ta-3d/lib/scene-view.d.ts +57 -0
- package/dist/pi/packages/ta-3d/lib/scene-view.js +339 -0
- package/dist/pi/packages/ta-3d/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-3d/lib/style.js +33 -0
- package/dist/pi/packages/ta-3d/package.json +58 -0
- package/dist/pi/packages/ta-3d/web/index.js +660 -0
- package/dist/pi/packages/ta-agents/README.en.md +2 -2
- package/dist/pi/packages/ta-agents/README.md +2 -2
- package/dist/pi/packages/ta-agents/extension/index.mjs +198 -6
- package/dist/pi/packages/ta-agents/lib/acp-agent.d.ts +4 -0
- package/dist/pi/packages/ta-agents/lib/acp-agent.js +20 -2
- package/dist/pi/packages/ta-agents/lib/acp-protocol.d.ts +14 -5
- package/dist/pi/packages/ta-agents/lib/acp-protocol.js +7 -0
- package/dist/pi/packages/ta-agents/lib/agent-bindings.d.ts +13 -0
- package/dist/pi/packages/ta-agents/lib/agent-bindings.js +29 -4
- package/dist/pi/packages/ta-agents/lib/agent-prompt.d.ts +2 -0
- package/dist/pi/packages/ta-agents/lib/agent-prompt.js +5 -0
- package/dist/pi/packages/ta-agents/lib/agent-session.d.ts +16 -4
- package/dist/pi/packages/ta-agents/lib/agent-session.js +34 -4
- package/dist/pi/packages/ta-agents/lib/agent-sign-in.d.ts +28 -0
- package/dist/pi/packages/ta-agents/lib/agent-sign-in.js +62 -0
- package/dist/pi/packages/ta-agents/lib/agent-streamer.d.ts +7 -0
- package/dist/pi/packages/ta-agents/lib/agent-streamer.js +40 -3
- package/dist/pi/packages/ta-agents/lib/extension.js +12 -0
- package/dist/pi/packages/ta-agents/lib/texts.d.ts +43 -0
- package/dist/pi/packages/ta-agents/lib/texts.js +47 -0
- package/dist/pi/packages/ta-agents/package.json +1 -1
- package/dist/pi/packages/ta-bots/host/index.mjs +35 -4
- package/dist/pi/packages/ta-bots/lib/bot-service.d.ts +6 -0
- package/dist/pi/packages/ta-bots/lib/bot-service.js +27 -2
- package/dist/pi/packages/ta-bots/lib/bot-store.d.ts +8 -1
- package/dist/pi/packages/ta-bots/lib/bot-store.js +16 -2
- package/dist/pi/packages/ta-bots/lib/weixin-channel.js +3 -1
- package/dist/pi/packages/ta-bots/package.json +1 -1
- package/dist/pi/packages/ta-changes/package.json +1 -1
- package/dist/pi/packages/ta-channels/host/index.mjs +3 -0
- package/dist/pi/packages/ta-channels/package.json +1 -1
- package/dist/pi/packages/ta-computer-use/package.json +1 -1
- package/dist/pi/packages/ta-cron/lib/tasks-view.js +4 -2
- package/dist/pi/packages/ta-cron/package.json +1 -1
- package/dist/pi/packages/ta-cron/web/index.js +8 -4
- package/dist/pi/packages/ta-extensions/package.json +1 -1
- package/dist/pi/packages/ta-extensions/web/index.js +2 -0
- package/dist/pi/packages/ta-games/package.json +1 -1
- package/dist/pi/packages/ta-glance/extension/index.mjs +1 -0
- package/dist/pi/packages/ta-glance/lib/glance-prompt.d.ts +1 -1
- package/dist/pi/packages/ta-glance/lib/glance-prompt.js +1 -0
- package/dist/pi/packages/ta-glance/package.json +1 -1
- package/dist/pi/packages/ta-initiative/lib/inbox.js +47 -29
- package/dist/pi/packages/ta-initiative/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-initiative/lib/style.js +27 -14
- package/dist/pi/packages/ta-initiative/package.json +1 -1
- package/dist/pi/packages/ta-initiative/web/index.js +92 -50
- package/dist/pi/packages/ta-launcher/package.json +1 -1
- package/dist/pi/packages/ta-manual/package.json +1 -1
- package/dist/pi/packages/ta-moments/extension/index.mjs +2 -0
- package/dist/pi/packages/ta-moments/host/index.mjs +2 -0
- package/dist/pi/packages/ta-moments/package.json +1 -1
- package/dist/pi/packages/ta-moments/web/index.js +2 -0
- package/dist/pi/packages/ta-nearby/lib/page.js +1 -1
- package/dist/pi/packages/ta-nearby/package.json +1 -1
- package/dist/pi/packages/ta-nearby/web/index.js +3 -4
- package/dist/pi/packages/ta-notify/lib/settings.js +9 -2
- package/dist/pi/packages/ta-notify/package.json +1 -1
- package/dist/pi/packages/ta-notify/web/index.js +18 -6
- package/dist/pi/packages/ta-plot/README.en.md +12 -0
- package/dist/pi/packages/ta-plot/README.md +12 -0
- package/dist/pi/packages/ta-plot/extension/index.mjs +121 -0
- package/dist/pi/packages/ta-plot/lib/extension.d.ts +15 -0
- package/dist/pi/packages/ta-plot/lib/extension.js +24 -0
- package/dist/pi/packages/ta-plot/lib/i18n.d.ts +14 -0
- package/dist/pi/packages/ta-plot/lib/i18n.js +30 -0
- package/dist/pi/packages/ta-plot/lib/index.d.ts +7 -0
- package/dist/pi/packages/ta-plot/lib/index.js +25 -0
- package/dist/pi/packages/ta-plot/lib/plot-expression.d.ts +16 -0
- package/dist/pi/packages/ta-plot/lib/plot-expression.js +209 -0
- package/dist/pi/packages/ta-plot/lib/plot-painter.d.ts +28 -0
- package/dist/pi/packages/ta-plot/lib/plot-painter.js +208 -0
- package/dist/pi/packages/ta-plot/lib/plot-prompt.d.ts +7 -0
- package/dist/pi/packages/ta-plot/lib/plot-prompt.js +16 -0
- package/dist/pi/packages/ta-plot/lib/plot-protocol.d.ts +7 -0
- package/dist/pi/packages/ta-plot/lib/plot-protocol.js +10 -0
- package/dist/pi/packages/ta-plot/lib/plot-scene.d.ts +65 -0
- package/dist/pi/packages/ta-plot/lib/plot-scene.js +427 -0
- package/dist/pi/packages/ta-plot/lib/plot-spec.d.ts +86 -0
- package/dist/pi/packages/ta-plot/lib/plot-spec.js +165 -0
- package/dist/pi/packages/ta-plot/lib/plot-view.d.ts +4 -0
- package/dist/pi/packages/ta-plot/lib/plot-view.js +205 -0
- package/dist/pi/packages/ta-plot/lib/react.d.ts +8 -0
- package/dist/pi/packages/ta-plot/lib/react.js +8 -0
- package/dist/pi/packages/ta-plot/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-plot/lib/style.js +47 -0
- package/dist/pi/packages/ta-plot/package.json +57 -0
- package/dist/pi/packages/ta-plot/web/index.js +1320 -0
- package/dist/pi/packages/ta-recall/package.json +1 -1
- package/dist/pi/packages/ta-rooms/lib/doubles-view.js +8 -1
- package/dist/pi/packages/ta-rooms/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-rooms/lib/style.js +1 -0
- package/dist/pi/packages/ta-rooms/package.json +1 -1
- package/dist/pi/packages/ta-rooms/web/index.js +17 -5
- package/dist/pi/packages/ta-share/lib/share-dialog.js +3 -1
- package/dist/pi/packages/ta-share/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-share/lib/style.js +1 -0
- package/dist/pi/packages/ta-share/package.json +1 -1
- package/dist/pi/packages/ta-share/web/index.js +6 -2
- package/dist/pi/packages/ta-sync/lib/panel.js +4 -1
- package/dist/pi/packages/ta-sync/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-sync/lib/style.js +1 -0
- package/dist/pi/packages/ta-sync/package.json +1 -1
- package/dist/pi/packages/ta-sync/web/index.js +9 -3
- package/dist/pi/packages/ta-sync-cloud/package.json +1 -1
- package/dist/pi/packages/ta-team/lib/dialogs.js +6 -3
- package/dist/pi/packages/ta-team/package.json +1 -1
- package/dist/pi/packages/ta-team/web/index.js +11 -6
- package/dist/pi/packages/ta-workspace/package.json +1 -1
- package/dist/pi/packages/ta-workspace/web/index.js +2 -0
- package/dist/public/assets/{abnfDiagram-S7VZAUFO-sclOP11q.js → abnfDiagram-S7VZAUFO-Dd51Bqbx.js} +1 -1
- package/dist/public/assets/{architecture-WOLXFQ4H-Bitg4Dpy.js → architecture-WOLXFQ4H-BbG3_x7_.js} +1 -1
- package/dist/public/assets/{architectureDiagram-YGSQEFNW-Hc0W5khF.js → architectureDiagram-YGSQEFNW-DbJO4t8I.js} +1 -1
- package/dist/public/assets/{blockDiagram-APKKGZFW-D2ZWatLV.js → blockDiagram-APKKGZFW-BwtrHF1f.js} +1 -1
- package/dist/public/assets/{browser-D-etIMuL.js → browser-CTbeNBsA.js} +1 -1
- package/dist/public/assets/{c4Diagram-KJ2TOQU5-CWEcyfwV.js → c4Diagram-KJ2TOQU5-CfBe5A0H.js} +1 -1
- package/dist/public/assets/{chunk-6MUBBAK2-CWbrJHxK.js → chunk-6MUBBAK2-C7R0mhrg.js} +1 -1
- package/dist/public/assets/{chunk-AXFCVDMN-DJQdD4iX.js → chunk-AXFCVDMN-VQgQruZT.js} +1 -1
- package/dist/public/assets/{chunk-BG4553SI-CYiiJcBj.js → chunk-BG4553SI-CkUi_vD5.js} +1 -1
- package/dist/public/assets/{chunk-DQASFODM-NrNC1UeX.js → chunk-DQASFODM-BAQq7ktk.js} +1 -1
- package/dist/public/assets/{chunk-HFQBQIA3-BIHXOwS2.js → chunk-HFQBQIA3-B1oF8lB7.js} +1 -1
- package/dist/public/assets/{chunk-KQLB2F66-CcU_AFwQ.js → chunk-KQLB2F66-DE5amcgT.js} +1 -1
- package/dist/public/assets/{chunk-KS47KZWR-DGfNbbcL.js → chunk-KS47KZWR-ev9S_csp.js} +1 -1
- package/dist/public/assets/{chunk-LEVMRMFU-B4PSS_Pp.js → chunk-LEVMRMFU-ziqnRvTG.js} +1 -1
- package/dist/public/assets/{chunk-M57EVK23-1555_mm4.js → chunk-M57EVK23-DaqPdEKA.js} +1 -1
- package/dist/public/assets/{chunk-OY52VR5R-zbNEbYJ8.js → chunk-OY52VR5R-DFOG8j6z.js} +1 -1
- package/dist/public/assets/{chunk-QB3YPZ4I-C-nNDGuN.js → chunk-QB3YPZ4I-eg35JLLN.js} +1 -1
- package/dist/public/assets/{chunk-R3KSYZAL-DcXXuhbl.js → chunk-R3KSYZAL-J73nie-R.js} +1 -1
- package/dist/public/assets/{chunk-STOXU5M4-Bb77QkUj.js → chunk-STOXU5M4-B8EvDZvB.js} +1 -1
- package/dist/public/assets/{chunk-TU62E6Q5-D8IJkNq5.js → chunk-TU62E6Q5-DyCM007V.js} +1 -1
- package/dist/public/assets/{chunk-X4PVCEUW-BzejexgB.js → chunk-X4PVCEUW-BBGeCNmA.js} +1 -1
- package/dist/public/assets/{chunk-XXDRQBXY-D2GPHyll.js → chunk-XXDRQBXY-CAtJ2Wph.js} +1 -1
- package/dist/public/assets/{classDiagram-v2-L25IHNXF-CUEzxxI8.js → classDiagram-v2-L25IHNXF-DhQM6yHy.js} +1 -1
- package/dist/public/assets/{cose-bilkent-JH36ORCC-CJdgJyUw.js → cose-bilkent-JH36ORCC-AqIcHabu.js} +1 -1
- package/dist/public/assets/cynefin-EF2NZ3EQ-yFytgtiy.js +1 -0
- package/dist/public/assets/{cynefinDiagram-L36ESFBY-D0F_9jN8.js → cynefinDiagram-L36ESFBY-7SyXzhRd.js} +1 -1
- package/dist/public/assets/{d3-selection-BoARy1rP.js → d3-selection-DsahLieG.js} +1 -1
- package/dist/public/assets/{dagre-SPEB5RXH-CzI5gZOv.js → dagre-SPEB5RXH-DalaGtMS.js} +1 -1
- package/dist/public/assets/{diagram-3B7GL73J-BCtNcE7M.js → diagram-3B7GL73J-BcY-qB9G.js} +1 -1
- package/dist/public/assets/{diagram-DNEMPZML-DV9U4KeH.js → diagram-DNEMPZML-NV7fbe0h.js} +1 -1
- package/dist/public/assets/{diagram-L3MUGCDN-DHU45Sd4.js → diagram-L3MUGCDN-BPx4GHoj.js} +1 -1
- package/dist/public/assets/{diagram-LA4NIPWU-Ba5oVP56.js → diagram-LA4NIPWU-BeUxqmw1.js} +1 -1
- package/dist/public/assets/{diagram-MHCOC4E2-B1Nk6qet.js → diagram-MHCOC4E2-Dlg1S5na.js} +1 -1
- package/dist/public/assets/{diagram-XPFHEONP-DFwA3q09.js → diagram-XPFHEONP-DQhRoMkK.js} +1 -1
- package/dist/public/assets/{dist-Col1xVDT.js → dist-CQU8zJh_.js} +1 -1
- package/dist/public/assets/{ebnfDiagram-UZSYDL2S-BuBgxBJ2.js → ebnfDiagram-UZSYDL2S-gVEs3Um2.js} +1 -1
- package/dist/public/assets/{editor.api-BLlyFz5x.js → editor.api-SQ1snuat.js} +1 -1
- package/dist/public/assets/{elk-XV6XMXQE-BPEI--zX.js → elk-XV6XMXQE-CHtlrPwu.js} +1 -1
- package/dist/public/assets/{erDiagram-EYBAPDEH-Cci0kYUw.js → erDiagram-EYBAPDEH-B0xok726.js} +1 -1
- package/dist/public/assets/{eventmodeling-K75KTNOO-B0eT5X1_.js → eventmodeling-K75KTNOO-CFwphA0e.js} +1 -1
- package/dist/public/assets/flowDiagram-MALGAFMO-Cwye_DsX.js +1 -0
- package/dist/public/assets/{freemarker2-CAZGFA3W.js → freemarker2-DJKO-X2B.js} +1 -1
- package/dist/public/assets/{ganttDiagram-23REXITY-DEm85e1I.js → ganttDiagram-23REXITY-B5wVGN1A.js} +1 -1
- package/dist/public/assets/gitGraph-VSP46ZUC-BYzb--zb.js +1 -0
- package/dist/public/assets/{gitGraphDiagram-STJD7YCW-DJAZD2LR.js → gitGraphDiagram-STJD7YCW-DEjNU1R_.js} +1 -1
- package/dist/public/assets/{handlebars-Agkl4nGr.js → handlebars-ChVN7JPd.js} +1 -1
- package/dist/public/assets/{html-Cu-CsqZI.js → html-CQ0znKSa.js} +1 -1
- package/dist/public/assets/{index-TeLHaE4u.js → index-CLlacdXR.js} +2 -2
- package/dist/public/assets/info-OHQRW6UA-na0qX3JP.js +1 -0
- package/dist/public/assets/{infoDiagram-KBXO4MBG-4zHsBnIy.js → infoDiagram-KBXO4MBG-CJtrS72M.js} +1 -1
- package/dist/public/assets/{ishikawaDiagram-M35NCXHK-Bg8OYLGr.js → ishikawaDiagram-M35NCXHK-qYI1QBsK.js} +1 -1
- package/dist/public/assets/{javascript-BdMDRX8l.js → javascript-B-DHbkyI.js} +1 -1
- package/dist/public/assets/{journeyDiagram-OPLOXDXO-B2xtzmpE.js → journeyDiagram-OPLOXDXO-BOQ2y2ZZ.js} +1 -1
- package/dist/public/assets/{jsonMode-Dg92qQvX.js → jsonMode-XuGC5N_z.js} +1 -1
- package/dist/public/assets/{kanban-definition-BZKZHSQY-DQ4N7t_w.js → kanban-definition-BZKZHSQY-BJ64tKdP.js} +1 -1
- package/dist/public/assets/{liquid-BydEnYkh.js → liquid-B0Ujylzc.js} +1 -1
- package/dist/public/assets/{mdx-XZXeM7ll.js → mdx-B19-V510.js} +1 -1
- package/dist/public/assets/{mermaid-parser.core-H24--uw9.js → mermaid-parser.core-Scb01iBq.js} +3 -3
- package/dist/public/assets/{mermaid.core-BmCrSjUU.js → mermaid.core-BMuvs7us.js} +4 -4
- package/dist/public/assets/{mindmap-definition-I2QAS2VK-CGQXKItp.js → mindmap-definition-I2QAS2VK-BYfOS3XN.js} +1 -1
- package/dist/public/assets/module-B3SKdB70.js +1 -0
- package/dist/public/assets/module-DOrYVZ7B.js +2615 -0
- package/dist/public/assets/{monaco-DP8M_Ttp.js → monaco-Bbe2os7m.js} +3 -3
- package/dist/public/assets/packet-JDAUHWVQ-jhCd70vR.js +1 -0
- package/dist/public/assets/{pegDiagram-FD4XPPHP-CXKRGFUs.js → pegDiagram-FD4XPPHP-D-Vlq9Gm.js} +1 -1
- package/dist/public/assets/pie-XZMESJXO-DV0NJFsI.js +1 -0
- package/dist/public/assets/{pieDiagram-J4AKIIQI-9XEDP1wR.js → pieDiagram-J4AKIIQI-_-94-aMD.js} +1 -1
- package/dist/public/assets/{python-C-0PA82u.js → python-CWnMIOYq.js} +1 -1
- package/dist/public/assets/{quadrantDiagram-XTYBLID2-C-uxTp-5.js → quadrantDiagram-XTYBLID2-BhFUbUYz.js} +1 -1
- package/dist/public/assets/radar-ABXABTNO-Co-Hlf34.js +1 -0
- package/dist/public/assets/railroad-I3PHUGI6-DKMPEjDD.js +1 -0
- package/dist/public/assets/{railroad-abnf-LNEFI6M7-CTft_ST0.js → railroad-abnf-LNEFI6M7-yUa9GGCQ.js} +1 -1
- package/dist/public/assets/{railroad-ebnf-DWYD2UWJ-DfRJhL7G.js → railroad-ebnf-DWYD2UWJ-xY4YiL8M.js} +1 -1
- package/dist/public/assets/{railroad-peg-JR7BVNR7-DFePx4YD.js → railroad-peg-JR7BVNR7-BYFYCUAQ.js} +1 -1
- package/dist/public/assets/{railroadDiagram-MRQ6NCDL-BmK1KUsT.js → railroadDiagram-MRQ6NCDL-C9FVhj0k.js} +1 -1
- package/dist/public/assets/{razor-DEKNSiT7.js → razor-bDtpN6EJ.js} +1 -1
- package/dist/public/assets/{requirementDiagram-Y7LWUY3S-Ds27pS9Y.js → requirementDiagram-Y7LWUY3S-DLmAg-6C.js} +1 -1
- package/dist/public/assets/{sankeyDiagram-WGJFYUXA-e2OTzBma.js → sankeyDiagram-WGJFYUXA-Bl5IpDk4.js} +1 -1
- package/dist/public/assets/{sequenceDiagram-5NDRBG5M-BcoIpxF6.js → sequenceDiagram-5NDRBG5M-Z-N0OiT_.js} +1 -1
- package/dist/public/assets/{stateDiagram-v2-FJ4FJNEA-CNr67mC9.js → stateDiagram-v2-FJ4FJNEA-ctKQz8Mo.js} +1 -1
- package/dist/public/assets/{swimlanes-UMQ2AFYF-DKPgHCev.js → swimlanes-UMQ2AFYF-CWLKnALg.js} +1 -1
- package/dist/public/assets/swimlanesDiagram-OMPLPG4O-CU76xJSu.js +8 -0
- package/dist/public/assets/{timeline-definition-SEUHKTQE-BcCmuE6C.js → timeline-definition-SEUHKTQE-DP8Ph_d6.js} +1 -1
- package/dist/public/assets/treeView-D4JQ5SDB-JMMnu_MW.js +1 -0
- package/dist/public/assets/treemap-SAJKECNS-CPlAD3X1.js +1 -0
- package/dist/public/assets/{typescript-B1Uk3m6A.js → typescript-CGpNlLbn.js} +1 -1
- package/dist/public/assets/{usecaseDiagram-AFA6YXN4-BpCD8dP7.js → usecaseDiagram-AFA6YXN4-DvFjNj3J.js} +1 -1
- package/dist/public/assets/{vennDiagram-NNMJR3RB-CQjX5_-8.js → vennDiagram-NNMJR3RB-3m2F2H-I.js} +1 -1
- package/dist/public/assets/wardley-7MLQ67FV-Dhc8wpLp.js +1 -0
- package/dist/public/assets/{wardleyDiagram-S7YFUSEH-D7gYo9fV.js → wardleyDiagram-S7YFUSEH-CsMntu16.js} +1 -1
- package/dist/public/assets/{xml-DBh_LekU.js → xml-ByiLoakX.js} +1 -1
- package/dist/public/assets/{xychartDiagram-GGNKY7IX-B_1aOZKU.js → xychartDiagram-GGNKY7IX-C80rxvM0.js} +1 -1
- package/dist/public/assets/{yaml-BE55tHva.js → yaml-Cz2Af5Rj.js} +1 -1
- package/dist/public/index.html +1 -1
- package/dist/serve/index.mjs +2589 -757
- package/package.json +39 -37
- package/dist/public/assets/cynefin-EF2NZ3EQ-DBnkPRHn.js +0 -1
- package/dist/public/assets/flowDiagram-MALGAFMO-CmMdmAxj.js +0 -1
- package/dist/public/assets/gitGraph-VSP46ZUC-DKo3OVhR.js +0 -1
- package/dist/public/assets/info-OHQRW6UA-tKl26QqM.js +0 -1
- package/dist/public/assets/module-1mERtQ0Z.js +0 -1
- package/dist/public/assets/module-BxIQdJqY.js +0 -2449
- package/dist/public/assets/packet-JDAUHWVQ-CnBx3hR7.js +0 -1
- package/dist/public/assets/pie-XZMESJXO-hogxgeR2.js +0 -1
- package/dist/public/assets/radar-ABXABTNO-CdWiN8Cw.js +0 -1
- package/dist/public/assets/railroad-I3PHUGI6-DnYOBI5V.js +0 -1
- package/dist/public/assets/swimlanesDiagram-OMPLPG4O-U0uzjboz.js +0 -8
- package/dist/public/assets/treeView-D4JQ5SDB-4ppY0Rs5.js +0 -1
- package/dist/public/assets/treemap-SAJKECNS-CAvLAs7q.js +0 -1
- package/dist/public/assets/wardley-7MLQ67FV-D_F3qmRJ.js +0 -1
|
@@ -0,0 +1,660 @@
|
|
|
1
|
+
// web-src/react.ts
|
|
2
|
+
var React;
|
|
3
|
+
function bind(react) {
|
|
4
|
+
React = react;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
// ../ta-protocol/esm/common/language.js
|
|
8
|
+
var TaLanguageUtil;
|
|
9
|
+
(function(TaLanguageUtil2) {
|
|
10
|
+
TaLanguageUtil2.ALL = ["zh-CN", "zh-TW", "en-US", "ja-JP"];
|
|
11
|
+
TaLanguageUtil2.NAMES = { "zh-CN": "简体中文", "zh-TW": "繁體中文", "en-US": "English", "ja-JP": "日本語" };
|
|
12
|
+
function of(tag) {
|
|
13
|
+
const said = (tag !== null && tag !== undefined ? tag : "").toLowerCase().replace(/_/g, "-");
|
|
14
|
+
if (/^zh(\b|-)/.test(said)) {
|
|
15
|
+
return /-hant\b/.test(said) || !/-hans\b/.test(said) && /-(tw|hk|mo)\b/.test(said) ? "zh-TW" : "zh-CN";
|
|
16
|
+
}
|
|
17
|
+
return /^ja(\b|-)/.test(said) ? "ja-JP" : "en-US";
|
|
18
|
+
}
|
|
19
|
+
TaLanguageUtil2.of = of;
|
|
20
|
+
function server(env = typeof process === "undefined" ? {} : process.env) {
|
|
21
|
+
return of(env.TA_LANGUAGE || env.LC_ALL || env.LC_MESSAGES || env.LANG);
|
|
22
|
+
}
|
|
23
|
+
TaLanguageUtil2.server = server;
|
|
24
|
+
function pick(language, words) {
|
|
25
|
+
return words[of(language)];
|
|
26
|
+
}
|
|
27
|
+
TaLanguageUtil2.pick = pick;
|
|
28
|
+
function say(words) {
|
|
29
|
+
return words[server()];
|
|
30
|
+
}
|
|
31
|
+
TaLanguageUtil2.say = say;
|
|
32
|
+
function chinese(language) {
|
|
33
|
+
return of(language).startsWith("zh");
|
|
34
|
+
}
|
|
35
|
+
TaLanguageUtil2.chinese = chinese;
|
|
36
|
+
function cjk(language) {
|
|
37
|
+
return of(language) !== "en-US";
|
|
38
|
+
}
|
|
39
|
+
TaLanguageUtil2.cjk = cjk;
|
|
40
|
+
function list(language, items) {
|
|
41
|
+
return items.join(cjk(language) ? "、" : ", ");
|
|
42
|
+
}
|
|
43
|
+
TaLanguageUtil2.list = list;
|
|
44
|
+
})(TaLanguageUtil || (TaLanguageUtil = {}));
|
|
45
|
+
|
|
46
|
+
// web-src/i18n.ts
|
|
47
|
+
var EN = {
|
|
48
|
+
building: "Building the scene…",
|
|
49
|
+
failed: "This scene cannot be shown: {reason}",
|
|
50
|
+
model: "{path} did not load: {reason}",
|
|
51
|
+
missing: "no such file",
|
|
52
|
+
unreadable: "not a glTF model it can read",
|
|
53
|
+
hint: "Drag to turn · pinch to zoom"
|
|
54
|
+
};
|
|
55
|
+
var ZH = {
|
|
56
|
+
building: "正在搭建场景…",
|
|
57
|
+
failed: "这个场景显示不出来:{reason}",
|
|
58
|
+
model: "{path} 没能加载:{reason}",
|
|
59
|
+
missing: "文件不存在",
|
|
60
|
+
unreadable: "不是能读取的 glTF 模型",
|
|
61
|
+
hint: "拖动旋转 · 双指缩放"
|
|
62
|
+
};
|
|
63
|
+
var ZH_TW = {
|
|
64
|
+
building: "正在搭建場景…",
|
|
65
|
+
failed: "這個場景顯示不出來:{reason}",
|
|
66
|
+
model: "{path} 沒能載入:{reason}",
|
|
67
|
+
missing: "檔案不存在",
|
|
68
|
+
unreadable: "不是能讀取的 glTF 模型",
|
|
69
|
+
hint: "拖動旋轉 · 雙指縮放"
|
|
70
|
+
};
|
|
71
|
+
var JA = {
|
|
72
|
+
building: "シーンを組み立て中…",
|
|
73
|
+
failed: "このシーンは表示できません:{reason}",
|
|
74
|
+
model: "{path} を読み込めませんでした:{reason}",
|
|
75
|
+
missing: "ファイルがありません",
|
|
76
|
+
unreadable: "読み込める glTF モデルではありません",
|
|
77
|
+
hint: "ドラッグで回転 · ピンチで拡大縮小"
|
|
78
|
+
};
|
|
79
|
+
var WORDS = { "zh-CN": ZH, "zh-TW": ZH_TW, "en-US": EN, "ja-JP": JA };
|
|
80
|
+
var SceneWords;
|
|
81
|
+
((SceneWords) => {
|
|
82
|
+
function of(language) {
|
|
83
|
+
return TaLanguageUtil.pick(language, WORDS);
|
|
84
|
+
}
|
|
85
|
+
SceneWords.of = of;
|
|
86
|
+
function format(text, values) {
|
|
87
|
+
return text.replace(/\{(\w+)\}/g, (all, name) => values[name] ?? all);
|
|
88
|
+
}
|
|
89
|
+
SceneWords.format = format;
|
|
90
|
+
})(SceneWords ||= {});
|
|
91
|
+
|
|
92
|
+
// web-src/scene-spec.ts
|
|
93
|
+
var SHAPES = ["box", "sphere", "cylinder", "cone", "torus", "plane", "capsule", "line", "arrow", "model", "group"];
|
|
94
|
+
var MAX_OBJECTS = 400;
|
|
95
|
+
var MAX_DEPTH = 6;
|
|
96
|
+
var MAX_POINTS = 500;
|
|
97
|
+
var SceneSpec;
|
|
98
|
+
((SceneSpec) => {
|
|
99
|
+
function read(code) {
|
|
100
|
+
const spec = object(JSON.parse(code));
|
|
101
|
+
if (!spec) {
|
|
102
|
+
throw new Error("A scene is a JSON object");
|
|
103
|
+
}
|
|
104
|
+
const count = { objects: 0 };
|
|
105
|
+
const objects = things(spec.objects, 0, count);
|
|
106
|
+
if (!objects.length) {
|
|
107
|
+
throw new Error("A scene has no objects");
|
|
108
|
+
}
|
|
109
|
+
const camera = object(spec.camera);
|
|
110
|
+
const position = camera ? vec(camera.position) : undefined;
|
|
111
|
+
const models = [];
|
|
112
|
+
let moving = false;
|
|
113
|
+
walk(objects, (thing) => {
|
|
114
|
+
if (thing.src) {
|
|
115
|
+
models.push(thing.src);
|
|
116
|
+
moving = true;
|
|
117
|
+
}
|
|
118
|
+
moving ||= thing.bob > 0 || thing.spin.some(Boolean);
|
|
119
|
+
});
|
|
120
|
+
const rotate = spec.rotate !== false;
|
|
121
|
+
return {
|
|
122
|
+
title: text(spec.title),
|
|
123
|
+
background: color(spec.background),
|
|
124
|
+
camera: position ? { position, target: vec(camera?.target) ?? [0, 0, 0] } : undefined,
|
|
125
|
+
rotate,
|
|
126
|
+
ground: spec.ground !== false,
|
|
127
|
+
objects,
|
|
128
|
+
moving: moving || rotate,
|
|
129
|
+
models
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
SceneSpec.read = read;
|
|
133
|
+
function walk(objects, visit) {
|
|
134
|
+
for (const thing of objects) {
|
|
135
|
+
visit(thing);
|
|
136
|
+
walk(thing.children, visit);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
SceneSpec.walk = walk;
|
|
140
|
+
})(SceneSpec ||= {});
|
|
141
|
+
function things(value, depth, count) {
|
|
142
|
+
if (!Array.isArray(value) || depth > MAX_DEPTH) {
|
|
143
|
+
return [];
|
|
144
|
+
}
|
|
145
|
+
const read = [];
|
|
146
|
+
for (const item of value) {
|
|
147
|
+
const spec = object(item);
|
|
148
|
+
if (!spec || count.objects >= MAX_OBJECTS) {
|
|
149
|
+
continue;
|
|
150
|
+
}
|
|
151
|
+
count.objects++;
|
|
152
|
+
read.push(thing(spec, depth, count));
|
|
153
|
+
}
|
|
154
|
+
return read;
|
|
155
|
+
}
|
|
156
|
+
function thing(spec, depth, count) {
|
|
157
|
+
const children = things(spec.children, depth + 1, count);
|
|
158
|
+
const src = path(spec.src ?? spec.model);
|
|
159
|
+
const named = SHAPES.find((shape2) => shape2 === spec.shape);
|
|
160
|
+
const shape = named ?? (src ? "model" : children.length ? "group" : "box");
|
|
161
|
+
if (shape === "model" && !src) {
|
|
162
|
+
throw new Error("A model has no src");
|
|
163
|
+
}
|
|
164
|
+
const points = (Array.isArray(spec.points) ? spec.points : []).slice(0, MAX_POINTS).map(vec).filter((point) => !!point);
|
|
165
|
+
if ((shape === "line" || shape === "arrow") && points.length < 2) {
|
|
166
|
+
throw new Error(`A ${shape} needs two points`);
|
|
167
|
+
}
|
|
168
|
+
const scale = typeof spec.scale === "number" && spec.scale > 0 ? [spec.scale, spec.scale, spec.scale] : vec(spec.scale) ?? [1, 1, 1];
|
|
169
|
+
return {
|
|
170
|
+
shape,
|
|
171
|
+
size: size(spec.size),
|
|
172
|
+
radius: positive(spec.radius, 0.5),
|
|
173
|
+
height: positive(spec.height, 1),
|
|
174
|
+
tube: positive(spec.tube, 0.15),
|
|
175
|
+
position: vec(spec.position) ?? [0, 0, 0],
|
|
176
|
+
rotation: vec(spec.rotation) ?? [0, 0, 0],
|
|
177
|
+
scale,
|
|
178
|
+
color: color(spec.color),
|
|
179
|
+
opacity: Number.isFinite(spec.opacity) ? Math.min(Math.max(spec.opacity, 0.05), 1) : 1,
|
|
180
|
+
metal: unit(spec.metal, 0.1),
|
|
181
|
+
rough: unit(spec.rough, 0.5),
|
|
182
|
+
wireframe: !!spec.wireframe,
|
|
183
|
+
label: text(spec.label),
|
|
184
|
+
points,
|
|
185
|
+
src: shape === "model" ? src : undefined,
|
|
186
|
+
spin: vec(spec.spin) ?? [0, 0, 0],
|
|
187
|
+
bob: Number.isFinite(spec.bob) ? Math.min(Math.max(spec.bob, 0), 100) : 0,
|
|
188
|
+
children
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
function object(value) {
|
|
192
|
+
return value && typeof value === "object" && !Array.isArray(value) ? value : undefined;
|
|
193
|
+
}
|
|
194
|
+
function text(value) {
|
|
195
|
+
return typeof value === "string" && value ? value.slice(0, 80) : undefined;
|
|
196
|
+
}
|
|
197
|
+
function color(value) {
|
|
198
|
+
return typeof value === "string" && /^(#[0-9a-f]{3,8}|[a-z]{3,20}|(rgb|hsl)a?\([\d\s.,%]+\))$/i.test(value.trim()) ? value.trim() : undefined;
|
|
199
|
+
}
|
|
200
|
+
function path(value) {
|
|
201
|
+
return typeof value === "string" && value && value.length < 500 && !/^[a-z][\w+.-]*:/i.test(value) ? value : undefined;
|
|
202
|
+
}
|
|
203
|
+
function vec(value) {
|
|
204
|
+
if (Array.isArray(value) && value.length === 3 && value.every(Number.isFinite)) {
|
|
205
|
+
return [value[0], value[1], value[2]];
|
|
206
|
+
}
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
function size(value) {
|
|
210
|
+
if (typeof value === "number" && value > 0) {
|
|
211
|
+
return [value, value, value];
|
|
212
|
+
}
|
|
213
|
+
const read = vec(value);
|
|
214
|
+
return read && read.every((part) => part > 0) ? read : [1, 1, 1];
|
|
215
|
+
}
|
|
216
|
+
function positive(value, fallback) {
|
|
217
|
+
return typeof value === "number" && value > 0 && Number.isFinite(value) ? value : fallback;
|
|
218
|
+
}
|
|
219
|
+
function unit(value, fallback) {
|
|
220
|
+
return typeof value === "number" && Number.isFinite(value) ? Math.min(Math.max(value, 0), 1) : fallback;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
// web-src/scene-view.ts
|
|
224
|
+
var PALETTE = ["#4f8cff", "#ff7a59", "#2bb673", "#b36bff", "#f5b400", "#00b8d9", "#e8578f", "#8a94a6"];
|
|
225
|
+
var DEGREE = Math.PI / 180;
|
|
226
|
+
|
|
227
|
+
class SceneView {
|
|
228
|
+
context;
|
|
229
|
+
scene;
|
|
230
|
+
host;
|
|
231
|
+
THREE;
|
|
232
|
+
root;
|
|
233
|
+
controls;
|
|
234
|
+
sun;
|
|
235
|
+
ground;
|
|
236
|
+
moving = [];
|
|
237
|
+
mixers = [];
|
|
238
|
+
labels = [];
|
|
239
|
+
fitted = true;
|
|
240
|
+
disposed = false;
|
|
241
|
+
constructor(context, scene, host) {
|
|
242
|
+
this.context = context;
|
|
243
|
+
this.scene = scene;
|
|
244
|
+
this.host = host;
|
|
245
|
+
const THREE = context.THREE;
|
|
246
|
+
this.THREE = THREE;
|
|
247
|
+
const { renderer, element } = context;
|
|
248
|
+
renderer.shadowMap.enabled = true;
|
|
249
|
+
renderer.shadowMap.type = THREE.PCFSoftShadowMap;
|
|
250
|
+
if (scene.background) {
|
|
251
|
+
context.scene.background = new THREE.Color(scene.background);
|
|
252
|
+
}
|
|
253
|
+
const camera = context.camera;
|
|
254
|
+
camera.fov = 40;
|
|
255
|
+
camera.near = 0.01;
|
|
256
|
+
camera.far = 1000;
|
|
257
|
+
camera.updateProjectionMatrix();
|
|
258
|
+
this.controls = new context.OrbitControls(camera, element);
|
|
259
|
+
this.controls.enableDamping = true;
|
|
260
|
+
this.controls.enableZoom = false;
|
|
261
|
+
this.controls.autoRotateSpeed = 0.8;
|
|
262
|
+
this.controls.addEventListener("start", () => {
|
|
263
|
+
this.controls.autoRotate = false;
|
|
264
|
+
this.fitted = false;
|
|
265
|
+
});
|
|
266
|
+
element.addEventListener("wheel", this.wheel, { passive: false });
|
|
267
|
+
context.scene.add(new THREE.HemisphereLight(16777215, 5595248, 1.7));
|
|
268
|
+
this.sun = new THREE.DirectionalLight(16777215, 1.8);
|
|
269
|
+
this.sun.castShadow = true;
|
|
270
|
+
this.sun.shadow.mapSize.set(1024, 1024);
|
|
271
|
+
this.sun.shadow.bias = -0.0005;
|
|
272
|
+
context.scene.add(this.sun, this.sun.target);
|
|
273
|
+
const fill = new THREE.DirectionalLight(16777215, 0.5);
|
|
274
|
+
fill.position.set(-3, 1, -2);
|
|
275
|
+
context.scene.add(fill);
|
|
276
|
+
this.ground = new THREE.Mesh(new THREE.CircleGeometry(1, 48), new THREE.ShadowMaterial({ opacity: 0.18 }));
|
|
277
|
+
this.ground.rotation.x = -Math.PI / 2;
|
|
278
|
+
this.ground.receiveShadow = true;
|
|
279
|
+
this.ground.visible = scene.ground;
|
|
280
|
+
context.scene.add(this.ground);
|
|
281
|
+
this.root = new THREE.Group;
|
|
282
|
+
context.scene.add(this.root);
|
|
283
|
+
scene.objects.forEach((thing2, index) => {
|
|
284
|
+
this.root.add(this.build(thing2, PALETTE[index % PALETTE.length]));
|
|
285
|
+
});
|
|
286
|
+
if (scene.camera) {
|
|
287
|
+
this.fitted = false;
|
|
288
|
+
camera.position.set(...scene.camera.position);
|
|
289
|
+
this.controls.target.set(...scene.camera.target);
|
|
290
|
+
}
|
|
291
|
+
this.fit();
|
|
292
|
+
this.page(context.page);
|
|
293
|
+
}
|
|
294
|
+
build(thing2, inherited) {
|
|
295
|
+
const { THREE } = this;
|
|
296
|
+
const color2 = thing2.color ?? inherited;
|
|
297
|
+
let object2;
|
|
298
|
+
if (thing2.shape === "group" || thing2.shape === "model") {
|
|
299
|
+
const group = new THREE.Group;
|
|
300
|
+
object2 = group;
|
|
301
|
+
thing2.children.forEach((child, index) => {
|
|
302
|
+
group.add(this.build(child, child.color ? color2 : thing2.color ? color2 : PALETTE[(PALETTE.indexOf(inherited) + index) % PALETTE.length]));
|
|
303
|
+
});
|
|
304
|
+
if (thing2.shape === "model" && thing2.src) {
|
|
305
|
+
this.load(thing2, group);
|
|
306
|
+
}
|
|
307
|
+
} else if (thing2.shape === "line" || thing2.shape === "arrow") {
|
|
308
|
+
object2 = this.path(thing2, color2);
|
|
309
|
+
} else {
|
|
310
|
+
object2 = new THREE.Mesh(this.geometry(thing2), this.material(thing2, color2));
|
|
311
|
+
object2.castShadow = true;
|
|
312
|
+
object2.receiveShadow = true;
|
|
313
|
+
thing2.children.forEach((child) => {
|
|
314
|
+
object2.add(this.build(child, child.color ?? color2));
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
object2.position.set(...thing2.position);
|
|
318
|
+
object2.rotation.set(thing2.rotation[0] * DEGREE, thing2.rotation[1] * DEGREE, thing2.rotation[2] * DEGREE);
|
|
319
|
+
object2.scale.set(...thing2.scale);
|
|
320
|
+
if (thing2.label) {
|
|
321
|
+
const label = SceneView.label(THREE, thing2.label);
|
|
322
|
+
label.position.set(0, this.top(thing2), 0);
|
|
323
|
+
object2.add(label);
|
|
324
|
+
this.labels.push(label);
|
|
325
|
+
}
|
|
326
|
+
if (thing2.bob || thing2.spin.some(Boolean)) {
|
|
327
|
+
this.moving.push({ object: object2, spin: thing2.spin, bob: thing2.bob, y: thing2.position[1], phase: this.moving.length * 0.7 });
|
|
328
|
+
}
|
|
329
|
+
return object2;
|
|
330
|
+
}
|
|
331
|
+
geometry(thing2) {
|
|
332
|
+
const { THREE } = this;
|
|
333
|
+
const [w, h, d] = thing2.size;
|
|
334
|
+
switch (thing2.shape) {
|
|
335
|
+
case "sphere":
|
|
336
|
+
return new THREE.SphereGeometry(thing2.radius, 48, 32);
|
|
337
|
+
case "cylinder":
|
|
338
|
+
return new THREE.CylinderGeometry(thing2.radius, thing2.radius, thing2.height, 48);
|
|
339
|
+
case "cone":
|
|
340
|
+
return new THREE.ConeGeometry(thing2.radius, thing2.height, 48);
|
|
341
|
+
case "torus":
|
|
342
|
+
return new THREE.TorusGeometry(thing2.radius, thing2.tube, 24, 96);
|
|
343
|
+
case "capsule":
|
|
344
|
+
return new THREE.CapsuleGeometry(thing2.radius, thing2.height, 12, 32);
|
|
345
|
+
case "plane":
|
|
346
|
+
return new THREE.PlaneGeometry(w, d === 1 && h !== 1 ? h : d);
|
|
347
|
+
default:
|
|
348
|
+
return new THREE.BoxGeometry(w, h, d);
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
material(thing2, color2) {
|
|
352
|
+
return new this.THREE.MeshStandardMaterial({
|
|
353
|
+
color: color2,
|
|
354
|
+
metalness: thing2.metal,
|
|
355
|
+
roughness: thing2.rough,
|
|
356
|
+
transparent: thing2.opacity < 1,
|
|
357
|
+
opacity: thing2.opacity,
|
|
358
|
+
wireframe: thing2.wireframe,
|
|
359
|
+
side: thing2.shape === "plane" ? this.THREE.DoubleSide : this.THREE.FrontSide
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
path(thing2, color2) {
|
|
363
|
+
const { THREE } = this;
|
|
364
|
+
const points = thing2.points.map((point) => new THREE.Vector3(...point));
|
|
365
|
+
const material = this.material(thing2, color2);
|
|
366
|
+
if (thing2.shape === "line") {
|
|
367
|
+
const path2 = new THREE.CurvePath;
|
|
368
|
+
for (let i = 1;i < points.length; i++) {
|
|
369
|
+
path2.add(new THREE.LineCurve3(points[i - 1], points[i]));
|
|
370
|
+
}
|
|
371
|
+
const mesh = new THREE.Mesh(new THREE.TubeGeometry(path2, Math.min(points.length * 4, 2000), Math.min(thing2.radius, 0.03), 8), material);
|
|
372
|
+
mesh.castShadow = true;
|
|
373
|
+
return mesh;
|
|
374
|
+
}
|
|
375
|
+
const from = points[0];
|
|
376
|
+
const to = points[points.length - 1];
|
|
377
|
+
const length = from.distanceTo(to) || 1;
|
|
378
|
+
const radius = Math.min(thing2.radius, length * 0.035);
|
|
379
|
+
const head = Math.min(length * 0.3, radius * 7);
|
|
380
|
+
const arrow = new THREE.Group;
|
|
381
|
+
const shaft = new THREE.Mesh(new THREE.CylinderGeometry(radius, radius, length - head, 16), material);
|
|
382
|
+
shaft.position.y = (length - head) / 2;
|
|
383
|
+
const tip = new THREE.Mesh(new THREE.ConeGeometry(radius * 2.6, head, 24), material);
|
|
384
|
+
tip.position.y = length - head / 2;
|
|
385
|
+
shaft.castShadow = tip.castShadow = true;
|
|
386
|
+
arrow.add(shaft, tip);
|
|
387
|
+
arrow.position.copy(from);
|
|
388
|
+
arrow.quaternion.setFromUnitVectors(new THREE.Vector3(0, 1, 0), to.clone().sub(from).normalize());
|
|
389
|
+
const holder = new THREE.Group;
|
|
390
|
+
holder.add(arrow);
|
|
391
|
+
return holder;
|
|
392
|
+
}
|
|
393
|
+
top(thing2) {
|
|
394
|
+
switch (thing2.shape) {
|
|
395
|
+
case "sphere":
|
|
396
|
+
case "torus":
|
|
397
|
+
return thing2.radius + 0.18;
|
|
398
|
+
case "cylinder":
|
|
399
|
+
case "cone":
|
|
400
|
+
return thing2.height / 2 + 0.18;
|
|
401
|
+
case "capsule":
|
|
402
|
+
return thing2.height / 2 + thing2.radius + 0.18;
|
|
403
|
+
case "line":
|
|
404
|
+
case "arrow":
|
|
405
|
+
return Math.max(...thing2.points.map((point) => point[1])) + 0.18;
|
|
406
|
+
default:
|
|
407
|
+
return thing2.size[1] / 2 + 0.18;
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
async load(thing2, holder) {
|
|
411
|
+
const src = thing2.src;
|
|
412
|
+
try {
|
|
413
|
+
const url = await this.host.modelUrl(src);
|
|
414
|
+
const loader = new this.context.GLTFLoader;
|
|
415
|
+
const gltf = await loader.loadAsync(url);
|
|
416
|
+
if (this.disposed) {
|
|
417
|
+
return;
|
|
418
|
+
}
|
|
419
|
+
const model = gltf.scene;
|
|
420
|
+
model.updateMatrixWorld(true);
|
|
421
|
+
const box = new this.THREE.Box3().setFromObject(model, true);
|
|
422
|
+
const extent = box.getSize(new this.THREE.Vector3);
|
|
423
|
+
const largest = Math.max(extent.x, extent.y, extent.z) || 1;
|
|
424
|
+
model.scale.multiplyScalar(Math.max(...thing2.size) / largest);
|
|
425
|
+
model.updateMatrixWorld(true);
|
|
426
|
+
const center = new this.THREE.Box3().setFromObject(model, true).getCenter(new this.THREE.Vector3);
|
|
427
|
+
model.position.sub(center);
|
|
428
|
+
model.traverse((child) => {
|
|
429
|
+
if (child.isMesh) {
|
|
430
|
+
child.castShadow = true;
|
|
431
|
+
child.receiveShadow = true;
|
|
432
|
+
}
|
|
433
|
+
});
|
|
434
|
+
holder.add(model);
|
|
435
|
+
if (gltf.animations.length) {
|
|
436
|
+
const mixer = new this.THREE.AnimationMixer(model);
|
|
437
|
+
mixer.clipAction(gltf.animations[0]).play();
|
|
438
|
+
this.mixers.push(mixer);
|
|
439
|
+
}
|
|
440
|
+
this.fit();
|
|
441
|
+
} catch (error) {
|
|
442
|
+
this.host.failed(src, error);
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
fit() {
|
|
446
|
+
const { THREE } = this;
|
|
447
|
+
this.root.updateMatrixWorld(true);
|
|
448
|
+
const box = new THREE.Box3;
|
|
449
|
+
this.root.traverse((child) => {
|
|
450
|
+
if (child.isMesh) {
|
|
451
|
+
box.expandByObject(child, true);
|
|
452
|
+
}
|
|
453
|
+
});
|
|
454
|
+
if (box.isEmpty()) {
|
|
455
|
+
box.set(new THREE.Vector3(-1, -1, -1), new THREE.Vector3(1, 1, 1));
|
|
456
|
+
}
|
|
457
|
+
const sphere = box.getBoundingSphere(new THREE.Sphere);
|
|
458
|
+
const radius = Math.max(sphere.radius, 0.1);
|
|
459
|
+
this.ground.position.set(sphere.center.x, box.min.y - radius * 0.002, sphere.center.z);
|
|
460
|
+
this.ground.scale.setScalar(radius * 2.2);
|
|
461
|
+
this.sun.position.copy(sphere.center).add(new THREE.Vector3(radius * 1.2, radius * 2.5, radius * 1.6));
|
|
462
|
+
this.sun.target.position.copy(sphere.center);
|
|
463
|
+
const shadow = this.sun.shadow.camera;
|
|
464
|
+
Object.assign(shadow, { left: -radius * 1.6, right: radius * 1.6, top: radius * 1.6, bottom: -radius * 1.6, near: 0.01, far: radius * 8 });
|
|
465
|
+
shadow.updateProjectionMatrix();
|
|
466
|
+
this.controls.minDistance = radius * 0.6;
|
|
467
|
+
this.controls.maxDistance = radius * 12;
|
|
468
|
+
if (!this.fitted) {
|
|
469
|
+
return;
|
|
470
|
+
}
|
|
471
|
+
const camera = this.context.camera;
|
|
472
|
+
const distance = radius / Math.sin(camera.fov * DEGREE / 2) * 1.08;
|
|
473
|
+
this.controls.target.copy(sphere.center);
|
|
474
|
+
camera.position.copy(sphere.center).add(new THREE.Vector3(1, 0.65, 1.25).normalize().multiplyScalar(distance));
|
|
475
|
+
camera.near = distance / 100;
|
|
476
|
+
camera.far = distance * 20;
|
|
477
|
+
camera.updateProjectionMatrix();
|
|
478
|
+
}
|
|
479
|
+
update(seconds, elapsed) {
|
|
480
|
+
for (const { object: object2, spin, bob, y, phase } of this.moving) {
|
|
481
|
+
object2.rotation.x += spin[0] * DEGREE * seconds;
|
|
482
|
+
object2.rotation.y += spin[1] * DEGREE * seconds;
|
|
483
|
+
object2.rotation.z += spin[2] * DEGREE * seconds;
|
|
484
|
+
if (bob) {
|
|
485
|
+
object2.position.y = y + Math.sin(elapsed * 2 + phase) * bob;
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
for (const mixer of this.mixers) {
|
|
489
|
+
mixer.update(seconds);
|
|
490
|
+
}
|
|
491
|
+
this.controls.update();
|
|
492
|
+
}
|
|
493
|
+
page(page) {
|
|
494
|
+
this.controls.autoRotate = this.scene.rotate && !page.reduceMotion;
|
|
495
|
+
const color2 = `#${page.colors.text.toString(16).padStart(6, "0")}`;
|
|
496
|
+
for (const label of this.labels) {
|
|
497
|
+
const old = label.material.map;
|
|
498
|
+
label.material.map = SceneView.texture(this.THREE, String(label.userData.text), color2);
|
|
499
|
+
old?.dispose();
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
dispose() {
|
|
503
|
+
this.disposed = true;
|
|
504
|
+
this.context.element.removeEventListener("wheel", this.wheel);
|
|
505
|
+
this.controls.dispose();
|
|
506
|
+
}
|
|
507
|
+
wheel = (event) => {
|
|
508
|
+
if (!event.ctrlKey) {
|
|
509
|
+
return;
|
|
510
|
+
}
|
|
511
|
+
event.preventDefault();
|
|
512
|
+
const { camera } = this.context;
|
|
513
|
+
const target = this.controls.target;
|
|
514
|
+
const offset = camera.position.clone().sub(target);
|
|
515
|
+
const distance = Math.min(Math.max(offset.length() * Math.exp(event.deltaY * 0.01), this.controls.minDistance), this.controls.maxDistance);
|
|
516
|
+
camera.position.copy(target).add(offset.setLength(distance));
|
|
517
|
+
this.fitted = false;
|
|
518
|
+
};
|
|
519
|
+
static label(THREE, text2) {
|
|
520
|
+
const sprite = new THREE.Sprite(new THREE.SpriteMaterial({ map: SceneView.texture(THREE, text2, "#888888"), depthTest: false, transparent: true }));
|
|
521
|
+
sprite.userData.text = text2;
|
|
522
|
+
const image = sprite.material.map?.image;
|
|
523
|
+
const height = 0.16;
|
|
524
|
+
sprite.scale.set(height * image.width / image.height, height, 1);
|
|
525
|
+
sprite.renderOrder = 10;
|
|
526
|
+
return sprite;
|
|
527
|
+
}
|
|
528
|
+
static texture(THREE, text2, color2) {
|
|
529
|
+
const canvas = document.createElement("canvas");
|
|
530
|
+
const context = canvas.getContext("2d");
|
|
531
|
+
const font = "600 40px system-ui, sans-serif";
|
|
532
|
+
if (context) {
|
|
533
|
+
context.font = font;
|
|
534
|
+
}
|
|
535
|
+
canvas.width = Math.ceil((context?.measureText(text2).width ?? 40) + 16);
|
|
536
|
+
canvas.height = 56;
|
|
537
|
+
if (context) {
|
|
538
|
+
context.font = font;
|
|
539
|
+
context.fillStyle = color2;
|
|
540
|
+
context.textBaseline = "middle";
|
|
541
|
+
context.fillText(text2, 8, 28);
|
|
542
|
+
}
|
|
543
|
+
const texture = new THREE.CanvasTexture(canvas);
|
|
544
|
+
texture.colorSpace = THREE.SRGBColorSpace;
|
|
545
|
+
return texture;
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
// web-src/scene-card.tsx
|
|
550
|
+
function sceneCard(pi) {
|
|
551
|
+
const Markdown = pi.ui.Markdown;
|
|
552
|
+
function View({ scene }) {
|
|
553
|
+
const words = SceneWords.of(pi.ui.language);
|
|
554
|
+
const cwd = pi.ui.useCwd();
|
|
555
|
+
const [failed, setFailed] = React.useState([]);
|
|
556
|
+
const host = React.useMemo(() => ({
|
|
557
|
+
modelUrl: async (src) => pi.files.loadable(await pi.workspace.fileUrl(src, cwd)),
|
|
558
|
+
failed: (src, error) => {
|
|
559
|
+
const reason = /\b404\b|not found|ENOENT/i.test(String(error?.message ?? error)) ? words.missing : words.unreadable;
|
|
560
|
+
setFailed((list) => [...list, SceneWords.format(words.model, { path: src, reason })]);
|
|
561
|
+
}
|
|
562
|
+
}), [cwd, words]);
|
|
563
|
+
const setup = React.useCallback((context) => new SceneView(context, scene, host), [scene, host]);
|
|
564
|
+
const Game3D = pi.ui.Game3D;
|
|
565
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
566
|
+
className: "t3d-card"
|
|
567
|
+
}, scene.title ? /* @__PURE__ */ React.createElement("div", {
|
|
568
|
+
className: "t3d-title"
|
|
569
|
+
}, scene.title) : null, /* @__PURE__ */ React.createElement("div", {
|
|
570
|
+
className: "t3d-view"
|
|
571
|
+
}, Game3D ? /* @__PURE__ */ React.createElement(Game3D, {
|
|
572
|
+
setup
|
|
573
|
+
}) : null), failed.map((text2) => /* @__PURE__ */ React.createElement("div", {
|
|
574
|
+
key: text2,
|
|
575
|
+
className: "t3d-failed"
|
|
576
|
+
}, text2)), /* @__PURE__ */ React.createElement("div", {
|
|
577
|
+
className: "t3d-hint"
|
|
578
|
+
}, words.hint));
|
|
579
|
+
}
|
|
580
|
+
return function SceneBlock({ code, closed }) {
|
|
581
|
+
const words = SceneWords.of(pi.ui.language);
|
|
582
|
+
const read = React.useMemo(() => {
|
|
583
|
+
if (!closed) {
|
|
584
|
+
return;
|
|
585
|
+
}
|
|
586
|
+
try {
|
|
587
|
+
return { scene: SceneSpec.read(code) };
|
|
588
|
+
} catch (error) {
|
|
589
|
+
return { error: error instanceof Error ? error.message : String(error) };
|
|
590
|
+
}
|
|
591
|
+
}, [code, closed]);
|
|
592
|
+
if (!read) {
|
|
593
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
594
|
+
className: "t3d-card t3d-writing"
|
|
595
|
+
}, /* @__PURE__ */ React.createElement("span", {
|
|
596
|
+
className: "ta-spinner"
|
|
597
|
+
}), /* @__PURE__ */ React.createElement("span", null, words.building));
|
|
598
|
+
}
|
|
599
|
+
if (!read.scene) {
|
|
600
|
+
return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", {
|
|
601
|
+
className: "t3d-failed"
|
|
602
|
+
}, SceneWords.format(words.failed, { reason: read.error ?? "" })), /* @__PURE__ */ React.createElement(Markdown, {
|
|
603
|
+
text: `\`\`\`json
|
|
604
|
+
${code}
|
|
605
|
+
\`\`\``
|
|
606
|
+
}));
|
|
607
|
+
}
|
|
608
|
+
return /* @__PURE__ */ React.createElement(View, {
|
|
609
|
+
scene: read.scene
|
|
610
|
+
});
|
|
611
|
+
};
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
// web-src/scene-protocol.ts
|
|
615
|
+
var LANGUAGE = "ta-3d";
|
|
616
|
+
|
|
617
|
+
// web-src/style.ts
|
|
618
|
+
var STYLE = `
|
|
619
|
+
/* A scene of a reply (\`\`\`ta-3d): a title, the view, what did not load, a hint under it. */
|
|
620
|
+
.t3d-card {
|
|
621
|
+
margin: 2px 0 12px;
|
|
622
|
+
padding: 12px;
|
|
623
|
+
max-width: 560px;
|
|
624
|
+
border: 1px solid var(--ta-border);
|
|
625
|
+
border-radius: 12px;
|
|
626
|
+
background: var(--ta-card);
|
|
627
|
+
color: var(--ta-text);
|
|
628
|
+
font-size: calc(13px * var(--ta-font-scale, 1));
|
|
629
|
+
line-height: 1.5;
|
|
630
|
+
}
|
|
631
|
+
.t3d-title { font-weight: 600; margin-bottom: 8px; }
|
|
632
|
+
.t3d-view { position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; cursor: grab; touch-action: none; }
|
|
633
|
+
.t3d-view:active { cursor: grabbing; }
|
|
634
|
+
.t3d-view > * { position: absolute; inset: 0; }
|
|
635
|
+
.t3d-hint, .t3d-failed { margin-top: 6px; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale, 1)); }
|
|
636
|
+
.t3d-writing { display: flex; align-items: center; gap: 8px; color: var(--ta-muted); }
|
|
637
|
+
`;
|
|
638
|
+
function injectStyle() {
|
|
639
|
+
const element = document.createElement("style");
|
|
640
|
+
element.dataset.taPackage = "ta-3d";
|
|
641
|
+
element.textContent = STYLE;
|
|
642
|
+
document.head.appendChild(element);
|
|
643
|
+
return () => element.remove();
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
// web-src/index.tsx
|
|
647
|
+
function activate(pi) {
|
|
648
|
+
bind(pi.React);
|
|
649
|
+
if (!pi.registerCodeRenderer || !pi.ui.Game3D) {
|
|
650
|
+
return () => {
|
|
651
|
+
return;
|
|
652
|
+
};
|
|
653
|
+
}
|
|
654
|
+
const removeStyle = injectStyle();
|
|
655
|
+
pi.registerCodeRenderer(LANGUAGE, sceneCard(pi));
|
|
656
|
+
return removeStyle;
|
|
657
|
+
}
|
|
658
|
+
export {
|
|
659
|
+
activate as default
|
|
660
|
+
};
|
|
@@ -14,7 +14,7 @@ The agents are reached over the [Agent Client Protocol](https://agentclientproto
|
|
|
14
14
|
| Claude Code | `claude` is installed | `npx -y @agentclientprotocol/claude-agent-acp` (the ACP project's adapter, with Claude Code's own login) |
|
|
15
15
|
| Codex | `codex` is installed | `npx -y @agentclientprotocol/codex-acp` (likewise, with Codex's own login) |
|
|
16
16
|
|
|
17
|
-
CodeBuddy Code works as in its own terminal: in PTC (code mode, its tools called through REPL; it declares `mainAgentSupport` / `toolModeSupport` and sets `CODEBUDDY_CODE_MODE_ENABLED=1`, without which ACP clients get the standard mode only), and a new session has full access (`options.mode`, which the settings change). npx fetches an adapter the first time it is used; the versions are pinned in the package. Each agent keeps its own login
|
|
17
|
+
CodeBuddy Code works as in its own terminal: in PTC (code mode, its tools called through REPL; it declares `mainAgentSupport` / `toolModeSupport` and sets `CODEBUDDY_CODE_MODE_ENABLED=1`, without which ACP clients get the standard mode only), and a new session has full access (`options.mode`, which the settings change). npx fetches an adapter the first time it is used; the versions are pinned in the package. Each agent keeps its own login. When it offers ways to sign in over ACP (CodeBuddy Code), a message sent while it is signed out asks first which way to sign in with; the agent opens its page in the browser of this computer, a notice of Ta Web has an Open button for it (for a phone or another device), and the turn goes on once signed in. Otherwise, or without a UI (`pi -p`), the conversation says which command to run in a terminal (`cbc`, `claude`, `codex login`).
|
|
18
18
|
|
|
19
19
|
## Use
|
|
20
20
|
|
|
@@ -50,7 +50,7 @@ Fields: `name`, `command`, `args`, `env`, `login` (the sign-in command to tell t
|
|
|
50
50
|
- **Sessions**: a pi session uses one session of each agent; its id is kept in the pi session (the custom entry `ta-agents.session`), and reopening the conversation loads it again (`session/load`). A fork, or going back to an earlier message in pi (`/tree`), starts a new session of the agent on the next turn and hands it the conversation so far as text; so does switching to an agent in the middle of a conversation (30,000 characters at most).
|
|
51
51
|
- **Processes**: the sessions of one agent in one directory share a process; by directory, because CodeBuddy Code runs commands where it was started rather than in the directory of the session. CodeBuddy Code itself runs a process for each conversation (about 650 MB), stopped when the conversation closes: a process of it answers only the session it opened or loaded last, and a prompt of another one waits forever, or ends at once with nothing while that one works. A process stops after 10 minutes without a turn, and starts again, loading its sessions, when it is needed. It keeps pi's process alive only while a request waits for its answer, so `pi -p` exits once it answered.
|
|
52
52
|
- **When the agent goes on by itself**: after a background task, an agent may start a turn on its own (CodeBuddy Code starts it with `unsolicitedTurn` in a `session_info_update` and ends it with `session_end`; other agents give no end, and the turn ends after 3 quiet seconds). The extension sends pi a message that is not shown, which starts a pi turn that shows it.
|
|
53
|
-
- **When the user talks while the agent works**:
|
|
53
|
+
- **When the user talks while the agent works**: once pi gives it to the turn, the extension puts it into the turn the agent runs with `session/steer` (an extension method of CodeBuddy Code), which the agent reads before it asks its model again. To an agent without it (`-32601`), it is kept and sent as the next turn as soon as this one ends; what is kept is named in a `ta-agents.queued` entry of the session, so that after a restart of Ta the next turn sends it first. Stopping sends `session/cancel`; the next turn waits for the agent to end the cancelled one (5 seconds at most).
|
|
54
54
|
- **Permissions**: as in pi, nothing is held back: a permission request of the agent is answered "allow once". With `permissions: "ask"` the user picks in the UI. The agent's own permission mode (CodeBuddy Code's settings, for example) still applies.
|
|
55
55
|
- **Compaction**: the agent manages its context. pi's automatic compaction is cancelled for conversations with an agent; compacting by hand (Compact in the + menu, or `/compact`) sends `/compact` to the agent, which compacts with its own command.
|
|
56
56
|
- **Title**: when the agent names its session (`session_info_update`) and the conversation has no name yet, it becomes the conversation's name, also when the title comes late.
|