@celljs/ta 4.15.1 → 4.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. package/dist/cli.mjs +7 -3
  2. package/dist/gateway.mjs +2047 -288
  3. package/dist/pi/CHANGELOG.md +15 -0
  4. package/dist/pi/package.json +1 -1
  5. package/dist/pi/packages/ta-3d/package.json +1 -1
  6. package/dist/pi/packages/ta-agents/extension/index.mjs +8 -6
  7. package/dist/pi/packages/ta-agents/lib/acp-protocol.d.ts +2 -0
  8. package/dist/pi/packages/ta-agents/lib/acp-protocol.js +5 -0
  9. package/dist/pi/packages/ta-agents/lib/agent-session.d.ts +0 -2
  10. package/dist/pi/packages/ta-agents/lib/agent-session.js +1 -5
  11. package/dist/pi/packages/ta-agents/lib/agent-turn.d.ts +7 -2
  12. package/dist/pi/packages/ta-agents/lib/agent-turn.js +8 -4
  13. package/dist/pi/packages/ta-agents/package.json +1 -1
  14. package/dist/pi/packages/ta-bots/host/index.mjs +40 -3
  15. package/dist/pi/packages/ta-bots/package.json +1 -1
  16. package/dist/pi/packages/ta-changes/package.json +1 -1
  17. package/dist/pi/packages/ta-channels/host/index.mjs +41 -3
  18. package/dist/pi/packages/ta-channels/package.json +1 -1
  19. package/dist/pi/packages/ta-computer-use/package.json +1 -1
  20. package/dist/pi/packages/ta-cron/package.json +1 -1
  21. package/dist/pi/packages/ta-extensions/package.json +1 -1
  22. package/dist/pi/packages/ta-extensions/web/index.js +40 -3
  23. package/dist/pi/packages/ta-games/package.json +1 -1
  24. package/dist/pi/packages/ta-glance/README.en.md +2 -0
  25. package/dist/pi/packages/ta-glance/README.md +2 -0
  26. package/dist/pi/packages/ta-glance/extension/index.mjs +110 -21
  27. package/dist/pi/packages/ta-glance/lib/card.js +88 -8
  28. package/dist/pi/packages/ta-glance/lib/glance-prompt.d.ts +1 -1
  29. package/dist/pi/packages/ta-glance/lib/glance-prompt.js +7 -4
  30. package/dist/pi/packages/ta-glance/lib/glance-protocol.d.ts +34 -2
  31. package/dist/pi/packages/ta-glance/lib/glance-protocol.js +39 -1
  32. package/dist/pi/packages/ta-glance/lib/glance-spec.js +93 -19
  33. package/dist/pi/packages/ta-glance/lib/glance-util.d.ts +13 -0
  34. package/dist/pi/packages/ta-glance/lib/glance-util.js +28 -0
  35. package/dist/pi/packages/ta-glance/lib/style.d.ts +1 -1
  36. package/dist/pi/packages/ta-glance/lib/style.js +65 -2
  37. package/dist/pi/packages/ta-glance/package.json +1 -1
  38. package/dist/pi/packages/ta-glance/web/index.js +330 -34
  39. package/dist/pi/packages/ta-initiative/package.json +1 -1
  40. package/dist/pi/packages/ta-launcher/package.json +1 -1
  41. package/dist/pi/packages/ta-manual/package.json +1 -1
  42. package/dist/pi/packages/ta-moments/extension/index.mjs +40 -3
  43. package/dist/pi/packages/ta-moments/host/index.mjs +40 -3
  44. package/dist/pi/packages/ta-moments/package.json +1 -1
  45. package/dist/pi/packages/ta-moments/web/index.js +40 -3
  46. package/dist/pi/packages/ta-nearby/package.json +1 -1
  47. package/dist/pi/packages/ta-notify/package.json +1 -1
  48. package/dist/pi/packages/ta-plot/package.json +1 -1
  49. package/dist/pi/packages/ta-recall/package.json +1 -1
  50. package/dist/pi/packages/ta-rooms/package.json +1 -1
  51. package/dist/pi/packages/ta-share/package.json +1 -1
  52. package/dist/pi/packages/ta-sync/package.json +1 -1
  53. package/dist/pi/packages/ta-sync-cloud/package.json +1 -1
  54. package/dist/pi/packages/ta-team/package.json +1 -1
  55. package/dist/pi/packages/ta-workspace/package.json +1 -1
  56. package/dist/pi/packages/ta-workspace/web/index.js +40 -3
  57. package/dist/public/assets/{abnfDiagram-S7VZAUFO-CD8CaArq.js → abnfDiagram-S7VZAUFO-FSEuUCgT.js} +1 -1
  58. package/dist/public/assets/{architecture-WOLXFQ4H-f2a9bodL.js → architecture-WOLXFQ4H-Do_DyWCg.js} +1 -1
  59. package/dist/public/assets/{architectureDiagram-YGSQEFNW-BCWH9CwO.js → architectureDiagram-YGSQEFNW-D-N2qDs4.js} +1 -1
  60. package/dist/public/assets/{blockDiagram-APKKGZFW-fUamQMeJ.js → blockDiagram-APKKGZFW-Ds6DzHNZ.js} +1 -1
  61. package/dist/public/assets/{browser-CrMa174j.js → browser-KlrZxPbE.js} +1 -1
  62. package/dist/public/assets/{c4Diagram-KJ2TOQU5-CkLtnwp1.js → c4Diagram-KJ2TOQU5-D5ZdqxrP.js} +1 -1
  63. package/dist/public/assets/{chunk-6MUBBAK2-cwcGPuAH.js → chunk-6MUBBAK2-CWOwhB3b.js} +1 -1
  64. package/dist/public/assets/{chunk-AXFCVDMN-DNkmkYfC.js → chunk-AXFCVDMN-Dr6p2RGg.js} +1 -1
  65. package/dist/public/assets/{chunk-BG4553SI-C8qbbr2Z.js → chunk-BG4553SI-DUCV_pmW.js} +1 -1
  66. package/dist/public/assets/{chunk-DQASFODM-C-PJ2CrJ.js → chunk-DQASFODM-Yxd3jIXM.js} +1 -1
  67. package/dist/public/assets/{chunk-HFQBQIA3-BYcgxNEL.js → chunk-HFQBQIA3-C24I15MF.js} +1 -1
  68. package/dist/public/assets/{chunk-KQLB2F66-BTDNzrRl.js → chunk-KQLB2F66-Dxk-aejD.js} +1 -1
  69. package/dist/public/assets/{chunk-KS47KZWR-1sGg1pKP.js → chunk-KS47KZWR-DPyr7gb8.js} +1 -1
  70. package/dist/public/assets/{chunk-LEVMRMFU-7lAsFwHT.js → chunk-LEVMRMFU-D_mEFJGR.js} +1 -1
  71. package/dist/public/assets/{chunk-M57EVK23-C8K-ltig.js → chunk-M57EVK23-DfMFxQib.js} +1 -1
  72. package/dist/public/assets/{chunk-OY52VR5R-CBe1QL_V.js → chunk-OY52VR5R-O9W83Laa.js} +1 -1
  73. package/dist/public/assets/{chunk-QB3YPZ4I-COhYyyE_.js → chunk-QB3YPZ4I-IdikGcw1.js} +1 -1
  74. package/dist/public/assets/{chunk-R3KSYZAL-CREAgaSS.js → chunk-R3KSYZAL-DLpaFCvz.js} +1 -1
  75. package/dist/public/assets/{chunk-STOXU5M4-CTl0P8_C.js → chunk-STOXU5M4-Lx-CZ4Ql.js} +1 -1
  76. package/dist/public/assets/{chunk-TU62E6Q5-B_GG7baF.js → chunk-TU62E6Q5-DCnr5NsA.js} +1 -1
  77. package/dist/public/assets/{chunk-X4PVCEUW-CDrSpVOj.js → chunk-X4PVCEUW-Ct7aUJFY.js} +1 -1
  78. package/dist/public/assets/{chunk-XXDRQBXY-sKeiDEnC.js → chunk-XXDRQBXY-CQhxfoYw.js} +1 -1
  79. package/dist/public/assets/{classDiagram-v2-L25IHNXF-Cqo1O5FQ.js → classDiagram-v2-L25IHNXF-DPSu5qYq.js} +1 -1
  80. package/dist/public/assets/{cose-bilkent-JH36ORCC-CTSKeRBe.js → cose-bilkent-JH36ORCC-CFimsFsN.js} +1 -1
  81. package/dist/public/assets/cynefin-EF2NZ3EQ-Dcc0sCHf.js +1 -0
  82. package/dist/public/assets/{cynefinDiagram-L36ESFBY-67xEPyP9.js → cynefinDiagram-L36ESFBY-CiAWhkVp.js} +1 -1
  83. package/dist/public/assets/{d3-selection-BUiX-3qh.js → d3-selection-C8RIDfkO.js} +1 -1
  84. package/dist/public/assets/{dagre-SPEB5RXH-DDw-u3Kg.js → dagre-SPEB5RXH-l1nRD1Fx.js} +1 -1
  85. package/dist/public/assets/{diagram-3B7GL73J-BBFInaCs.js → diagram-3B7GL73J-ipqtnhoX.js} +1 -1
  86. package/dist/public/assets/{diagram-DNEMPZML-ZdnFKM7-.js → diagram-DNEMPZML-VpIcHRUP.js} +1 -1
  87. package/dist/public/assets/{diagram-L3MUGCDN-CPb04hOv.js → diagram-L3MUGCDN-8VdVmcS6.js} +1 -1
  88. package/dist/public/assets/{diagram-LA4NIPWU-P9wHFGDS.js → diagram-LA4NIPWU-Bej-aiF0.js} +1 -1
  89. package/dist/public/assets/{diagram-MHCOC4E2-Ce_Cr-t6.js → diagram-MHCOC4E2-D8gW4bVQ.js} +1 -1
  90. package/dist/public/assets/{diagram-XPFHEONP-CfS34OHW.js → diagram-XPFHEONP-BMevAJ1M.js} +1 -1
  91. package/dist/public/assets/{dist-6pZqZEaM.js → dist-DBKJcjvW.js} +1 -1
  92. package/dist/public/assets/{ebnfDiagram-UZSYDL2S-BkHabCn2.js → ebnfDiagram-UZSYDL2S-C3HDTOzn.js} +1 -1
  93. package/dist/public/assets/{editor.api-CO4Q0NKb.js → editor.api-BMWdjwhK.js} +1 -1
  94. package/dist/public/assets/{elk-XV6XMXQE-JpreOVeR.js → elk-XV6XMXQE-XOOPrVin.js} +1 -1
  95. package/dist/public/assets/{erDiagram-EYBAPDEH-DDFJwzHx.js → erDiagram-EYBAPDEH-Cr-vwx1l.js} +1 -1
  96. package/dist/public/assets/{eventmodeling-K75KTNOO-DsnkF6Zc.js → eventmodeling-K75KTNOO-DbPhpfxn.js} +1 -1
  97. package/dist/public/assets/flowDiagram-MALGAFMO-CDXqnHAQ.js +1 -0
  98. package/dist/public/assets/{freemarker2-Cm4NK652.js → freemarker2-6h_1-8qB.js} +1 -1
  99. package/dist/public/assets/{ganttDiagram-23REXITY-C7eedoYb.js → ganttDiagram-23REXITY-C7kNPXx3.js} +1 -1
  100. package/dist/public/assets/gitGraph-VSP46ZUC-KPsoB6Z1.js +1 -0
  101. package/dist/public/assets/{gitGraphDiagram-STJD7YCW-Cuh3ih-z.js → gitGraphDiagram-STJD7YCW-CVnEJEZr.js} +1 -1
  102. package/dist/public/assets/{handlebars-BnE51DUi.js → handlebars-F4lp3oLr.js} +1 -1
  103. package/dist/public/assets/{html-7koekDfa.js → html-Dj6f8B_g.js} +1 -1
  104. package/dist/public/assets/{index-CQG1XddL.js → index-DnNrrk68.js} +2 -2
  105. package/dist/public/assets/info-OHQRW6UA-CtM6s0SQ.js +1 -0
  106. package/dist/public/assets/{infoDiagram-KBXO4MBG-BY3iq7I8.js → infoDiagram-KBXO4MBG-DcttQWdp.js} +1 -1
  107. package/dist/public/assets/{ishikawaDiagram-M35NCXHK-COjlz24y.js → ishikawaDiagram-M35NCXHK-BSUYTZf6.js} +1 -1
  108. package/dist/public/assets/{javascript-BUZgUhdn.js → javascript-b_BkOE5Y.js} +1 -1
  109. package/dist/public/assets/{journeyDiagram-OPLOXDXO-DReJE04Q.js → journeyDiagram-OPLOXDXO-BCfd5-6n.js} +1 -1
  110. package/dist/public/assets/{jsonMode-qPeVDBDp.js → jsonMode-Cq5QJbVZ.js} +1 -1
  111. package/dist/public/assets/{kanban-definition-BZKZHSQY-BB0_ePvg.js → kanban-definition-BZKZHSQY-B3nenaw_.js} +1 -1
  112. package/dist/public/assets/{liquid-CNKL9dLX.js → liquid-CGuZI_Aa.js} +1 -1
  113. package/dist/public/assets/{mdx-D1_UzrBc.js → mdx-Dt9yTqnf.js} +1 -1
  114. package/dist/public/assets/{mermaid-parser.core-DiE3z_tV.js → mermaid-parser.core-CquzROwT.js} +3 -3
  115. package/dist/public/assets/{mermaid.core-CBCRrLdl.js → mermaid.core-Bx-e_Scq.js} +4 -4
  116. package/dist/public/assets/{mindmap-definition-I2QAS2VK-D-Y5fKl1.js → mindmap-definition-I2QAS2VK-DyeewbnH.js} +1 -1
  117. package/dist/public/assets/module-C-ofp7U4.js +1 -0
  118. package/dist/public/assets/module-dnDlIzeV.js +2616 -0
  119. package/dist/public/assets/{monaco--czRbHhk.js → monaco-nvIdDTWu.js} +3 -3
  120. package/dist/public/assets/packet-JDAUHWVQ-XKjiwdar.js +1 -0
  121. package/dist/public/assets/{pegDiagram-FD4XPPHP-1jx5jc73.js → pegDiagram-FD4XPPHP-B884_KoR.js} +1 -1
  122. package/dist/public/assets/pie-XZMESJXO-MuCMavHL.js +1 -0
  123. package/dist/public/assets/{pieDiagram-J4AKIIQI-DGv_WCCu.js → pieDiagram-J4AKIIQI-I40wRwyy.js} +1 -1
  124. package/dist/public/assets/{python-DNZu5LjV.js → python-Djw4wvG9.js} +1 -1
  125. package/dist/public/assets/{quadrantDiagram-XTYBLID2-BgY0lf8V.js → quadrantDiagram-XTYBLID2-DyNOImfk.js} +1 -1
  126. package/dist/public/assets/radar-ABXABTNO-Cq12GHJS.js +1 -0
  127. package/dist/public/assets/railroad-I3PHUGI6-CfeMswZU.js +1 -0
  128. package/dist/public/assets/{railroad-abnf-LNEFI6M7-tZ7rJxwM.js → railroad-abnf-LNEFI6M7-3G0zWzgf.js} +1 -1
  129. package/dist/public/assets/{railroad-ebnf-DWYD2UWJ-JO6n_1TK.js → railroad-ebnf-DWYD2UWJ-B5XRDRWS.js} +1 -1
  130. package/dist/public/assets/{railroad-peg-JR7BVNR7-Bf0PG2YJ.js → railroad-peg-JR7BVNR7-rcIioIyH.js} +1 -1
  131. package/dist/public/assets/{railroadDiagram-MRQ6NCDL-BMjog84X.js → railroadDiagram-MRQ6NCDL-CDM2ahQM.js} +1 -1
  132. package/dist/public/assets/{razor-DU-x8qSP.js → razor-CStezNUn.js} +1 -1
  133. package/dist/public/assets/{requirementDiagram-Y7LWUY3S-CktbbWjr.js → requirementDiagram-Y7LWUY3S-hbb6WtfM.js} +1 -1
  134. package/dist/public/assets/{sankeyDiagram-WGJFYUXA-CQonOre7.js → sankeyDiagram-WGJFYUXA-DLV3Aoae.js} +1 -1
  135. package/dist/public/assets/{sequenceDiagram-5NDRBG5M-CAe8-JvA.js → sequenceDiagram-5NDRBG5M-BWxOV5U9.js} +1 -1
  136. package/dist/public/assets/{stateDiagram-v2-FJ4FJNEA-BrkqOuRm.js → stateDiagram-v2-FJ4FJNEA-C-TaUPaQ.js} +1 -1
  137. package/dist/public/assets/{swimlanes-UMQ2AFYF-sLpgHBKo.js → swimlanes-UMQ2AFYF-CJY0BFmc.js} +1 -1
  138. package/dist/public/assets/swimlanesDiagram-OMPLPG4O-DdFDl6aK.js +8 -0
  139. package/dist/public/assets/{timeline-definition-SEUHKTQE-CHE0x-WN.js → timeline-definition-SEUHKTQE-CUfQb8Gv.js} +1 -1
  140. package/dist/public/assets/treeView-D4JQ5SDB-BQ4uUy4s.js +1 -0
  141. package/dist/public/assets/treemap-SAJKECNS-BFTTkjF9.js +1 -0
  142. package/dist/public/assets/{typescript-BrNT2oWW.js → typescript-B7kmi8MF.js} +1 -1
  143. package/dist/public/assets/{usecaseDiagram-AFA6YXN4-DwkFRI5R.js → usecaseDiagram-AFA6YXN4-BKTVAp-G.js} +1 -1
  144. package/dist/public/assets/{vennDiagram-NNMJR3RB-BquQVmJq.js → vennDiagram-NNMJR3RB-CN1RxNTS.js} +1 -1
  145. package/dist/public/assets/wardley-7MLQ67FV-BbyzsA8S.js +1 -0
  146. package/dist/public/assets/{wardleyDiagram-S7YFUSEH-sNYFUfMe.js → wardleyDiagram-S7YFUSEH-JJ6qcpu1.js} +1 -1
  147. package/dist/public/assets/{xml-BY65QKv7.js → xml-DVamlHEU.js} +1 -1
  148. package/dist/public/assets/{xychartDiagram-GGNKY7IX-CnWEYuid.js → xychartDiagram-GGNKY7IX-BNakYgUZ.js} +1 -1
  149. package/dist/public/assets/{yaml-BMovUwzO.js → yaml-BihGeFrM.js} +1 -1
  150. package/dist/public/index.html +1 -1
  151. package/dist/serve/index.mjs +5965 -5227
  152. package/package.json +39 -39
  153. package/dist/public/assets/cynefin-EF2NZ3EQ-CP12ndt7.js +0 -1
  154. package/dist/public/assets/flowDiagram-MALGAFMO-Djxeacjw.js +0 -1
  155. package/dist/public/assets/gitGraph-VSP46ZUC-qlWN7ijl.js +0 -1
  156. package/dist/public/assets/info-OHQRW6UA-jN69V28z.js +0 -1
  157. package/dist/public/assets/module-BEbKICB1.js +0 -2475
  158. package/dist/public/assets/module-Egyx6Otv.js +0 -1
  159. package/dist/public/assets/packet-JDAUHWVQ-Cl8QuXQJ.js +0 -1
  160. package/dist/public/assets/pie-XZMESJXO-kVGJsGZe.js +0 -1
  161. package/dist/public/assets/radar-ABXABTNO-Dw71L-n8.js +0 -1
  162. package/dist/public/assets/railroad-I3PHUGI6-DkaUvI4_.js +0 -1
  163. package/dist/public/assets/swimlanesDiagram-OMPLPG4O-amBdr5Wc.js +0 -8
  164. package/dist/public/assets/treeView-D4JQ5SDB-DKLyFqZk.js +0 -1
  165. package/dist/public/assets/treemap-SAJKECNS-CRG6ogj8.js +0 -1
  166. package/dist/public/assets/wardley-7MLQ67FV-D2jQfflX.js +0 -1
@@ -1,5 +1,20 @@
1
1
  # @celljs/ta
2
2
 
3
+ ## 4.16.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 0c55cb1: Cloud workspaces, as Remote SSH without ssh: Ta on a computer works in the directories of its account's sandbox on a Ta gateway (or of any Ta service), `ta://<name>/<path>`, its agent staying on the computer. On the gateway, Settings, Environment, Use it from another Ta makes a token of one's account; in the other Ta, Settings, Remote hosts, Add a cloud workspace takes the gateway's address, the token and a name, checked by connecting first and kept where only its user reads it. The gateway forwards `/api/exec` to the sandbox (counted as a page connected; refused while suspended or out of minutes), whose ta serve answers it with its exec server for its owner's token alone.
8
+ - 60332f5: ta gateway gives its sandboxes models, and holds members to tokens a month: models.json of the gateway (pi's format, keys by the name of a variable of its environment) lists the providers; each sandbox gets a model key of its own (TA_MODEL_PROXY_URL and TA_MODEL_PROXY_KEY), with which its ta serve puts those providers in its models.json at the gateway's /api/models. The gateway passes each call with the provider's key, which no sandbox has, counts the tokens and dollars the answer tells (OpenAI, the responses API, Anthropic, Google, streams too), and refuses the calls of a member past monthlyTokens with words pi does not retry. The console shows the models of the gateway, the tokens of each account against its limit, and takes the limit in the defaults and per account.
9
+
10
+ ## 4.15.2
11
+
12
+ ### Patch Changes
13
+
14
+ - bdbc0f1: Ta Desktop tells of its updates: a notice once a new build is put in place (click to restart), once one could not be (with why, and Move Ta to the Applications folder when it runs where it cannot be replaced, without downloading it), and once after it restarted on a new build.
15
+ - 5fe6480: A console of `ta gateway` for its administrators, under Discover: the accounts, how many run and are connected, those waiting to be let in; the providers of sandboxes; each account's Ta with what its sandbox takes (CPU and memory, from Docker), to start, restart or stop, with its log; and a link that lets someone in, as `ta gateway link` prints. Agents too: how many work and wait across the gateway and for each account, and for each conversation of an account's Ta its status, model, messages, tool calls, tokens, cost and context, never what was said. TaGatewayServer gains getTenantAgents, getConsole, startTenant, restartTenant, getTenantLogs and createSignInLink; a provider of sandboxes may tell usage and logs (docker by its Engine API, local from its output, command by a `logs` command).
16
+ - b000300: ta gateway has roles, limits and an audit: owners (TA_GATEWAY_ADMINS) make admins in the console, admins manage members only; each method needs a role. Members get free minutes a month (counted by the gateway as their sandbox runs; out of them it stops until the next month or minutes given), messages a minute (past them RATE_LIMITED), pages at once, the sandboxes they may pick and whether a Ta service of their own; an administrator can suspend an account. The console has tabs (Overview, Accounts, Policy): tokens and dollars over a day, a week or a month by model and account, accounts to filter and sort with their minutes, the latest tool calls and failures of each agent, the defaults, the managers and the audit. TaUsageServer of ta serve tells what its agents took by hour and what one did lately, never what was said.
17
+
3
18
  ## 4.15.1
4
19
 
5
20
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celljs/ta",
3
- "version": "4.15.1",
3
+ "version": "4.16.0",
4
4
  "type": "module",
5
5
  "piConfig": {
6
6
  "name": "ta",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celljs/ta-3d",
3
- "version": "4.15.1",
3
+ "version": "4.16.0",
4
4
  "description": "A pi package for Ta: 3D scenes and models of replies, drawn by the 3D engine of the page and turned by dragging",
5
5
  "keywords": [
6
6
  "pi-package"
@@ -37,6 +37,10 @@ var Acp;
37
37
  return options?.find((option) => option.category === category) ?? options?.find((option) => option.id === category);
38
38
  }
39
39
  Acp.optionOf = optionOf;
40
+ function own(meta) {
41
+ return !Object.keys(meta ?? {}).some((key) => /(parentToolCallId|memberEvent)$/.test(key));
42
+ }
43
+ Acp.own = own;
40
44
  })(Acp ||= {});
41
45
 
42
46
  // src/agent-bindings.ts
@@ -275,7 +279,7 @@ class AgentTurn {
275
279
  }
276
280
  open() {
277
281
  for (const run of this.tools.values()) {
278
- if (!run.done && !run.left && !this.stepped.has(run.id)) {
282
+ if (!run.done && !run.left && !run.others && !this.stepped.has(run.id)) {
279
283
  return true;
280
284
  }
281
285
  }
@@ -283,7 +287,7 @@ class AgentTurn {
283
287
  }
284
288
  step() {
285
289
  for (const run of this.tools.values()) {
286
- if (!run.done && !run.left) {
290
+ if (!run.done && !run.left && !run.others) {
287
291
  this.stepped.add(run.id);
288
292
  }
289
293
  }
@@ -334,6 +338,7 @@ class AgentTurn {
334
338
  output: "",
335
339
  done: false,
336
340
  left: false,
341
+ others: !Acp.own(update._meta),
337
342
  complete: false,
338
343
  terminal: "",
339
344
  updatedAt: Date.now()
@@ -581,7 +586,7 @@ class AgentSession {
581
586
  this.callbacks.title?.(this.title);
582
587
  }
583
588
  const phase = AgentSession.phase(meta);
584
- if (phase && !ids.some((id) => this.earlier.has(id)) && AgentSession.own(meta)) {
589
+ if (phase && !ids.some((id) => this.earlier.has(id)) && Acp.own(meta)) {
585
590
  this.phase(this.turn, phase, meta);
586
591
  }
587
592
  if (meta && Object.keys(meta).some((key) => /unsolicitedTurn$/.test(key)) && !this.turn) {
@@ -801,9 +806,6 @@ class AgentSession {
801
806
  static internal(meta) {
802
807
  return Object.entries(meta ?? {}).some(([key, value]) => /isCompactInternal$/.test(key) && value === true);
803
808
  }
804
- static own(meta) {
805
- return !Object.keys(meta ?? {}).some((key) => /(parentToolCallId|memberEvent)$/.test(key));
806
- }
807
809
  static requestIds(meta) {
808
810
  return Object.entries(meta ?? {}).filter(([key, value]) => /requestId$/i.test(key) && typeof value === "string" && value).map(([, value]) => value);
809
811
  }
@@ -163,5 +163,7 @@ export declare namespace Acp {
163
163
  function values(option: ConfigOption | undefined): SelectValue[];
164
164
  /** The option of a category: the id is the key the protocol gives, the category what it means. */
165
165
  function optionOf(options: ConfigOption[] | undefined, category: string): ConfigOption | undefined;
166
+ /** Whether an update is of the session's own agent, not of a subagent (`…parentToolCallId`) or a teammate (`…memberEvent`). */
167
+ function own(meta: Record<string, unknown> | undefined): boolean;
166
168
  }
167
169
  //# sourceMappingURL=acp-protocol.d.ts.map
@@ -51,5 +51,10 @@ var Acp;
51
51
  return (_a = options === null || options === void 0 ? void 0 : options.find(option => option.category === category)) !== null && _a !== void 0 ? _a : options === null || options === void 0 ? void 0 : options.find(option => option.id === category);
52
52
  }
53
53
  Acp.optionOf = optionOf;
54
+ /** Whether an update is of the session's own agent, not of a subagent (`…parentToolCallId`) or a teammate (`…memberEvent`). */
55
+ function own(meta) {
56
+ return !Object.keys(meta !== null && meta !== void 0 ? meta : {}).some(key => /(parentToolCallId|memberEvent)$/.test(key));
57
+ }
58
+ Acp.own = own;
54
59
  })(Acp || (exports.Acp = Acp = {}));
55
60
  //# sourceMappingURL=acp-protocol.js.map
@@ -136,8 +136,6 @@ export declare class AgentSession {
136
136
  }): number | undefined;
137
137
  /** Whether an update is the agent's own bookkeeping, not for the user: the summary of a compaction (`<agent>/isCompactInternal`). */
138
138
  static internal(meta: Record<string, unknown> | undefined): boolean;
139
- /** Whether an update is of the session's own agent, not of a subagent (`…parentToolCallId`) or a teammate (`…memberEvent`). */
140
- static own(meta: Record<string, unknown> | undefined): boolean;
141
139
  static requestIds(meta: Record<string, unknown> | undefined): string[];
142
140
  /** What the agent says it is doing, if it says (CodeBuddy Code: `_meta['codebuddy.ai/agentPhase'].phase`). */
143
141
  /** What an agent's `retrying` phase says of the retry (`…agentPhase` `retry`: `{ reason, attempt }`). */
@@ -67,7 +67,7 @@ class AgentSession {
67
67
  }
68
68
  const phase = AgentSession.phase(meta);
69
69
  // A phase of a request before this prompt (the end of a compaction, say) is not this turn's, nor one of a subagent or a teammate.
70
- if (phase && !ids.some(id => this.earlier.has(id)) && AgentSession.own(meta)) {
70
+ if (phase && !ids.some(id => this.earlier.has(id)) && acp_protocol_1.Acp.own(meta)) {
71
71
  this.phase(this.turn, phase, meta);
72
72
  }
73
73
  if (meta && Object.keys(meta).some(key => /unsolicitedTurn$/.test(key)) && !this.turn) {
@@ -339,10 +339,6 @@ class AgentSession {
339
339
  static internal(meta) {
340
340
  return Object.entries(meta !== null && meta !== void 0 ? meta : {}).some(([key, value]) => /isCompactInternal$/.test(key) && value === true);
341
341
  }
342
- /** Whether an update is of the session's own agent, not of a subagent (`…parentToolCallId`) or a teammate (`…memberEvent`). */
343
- static own(meta) {
344
- return !Object.keys(meta !== null && meta !== void 0 ? meta : {}).some(key => /(parentToolCallId|memberEvent)$/.test(key));
345
- }
346
342
  static requestIds(meta) {
347
343
  return Object.entries(meta !== null && meta !== void 0 ? meta : {})
348
344
  .filter(([key, value]) => /requestId$/i.test(key) && typeof value === 'string' && value)
@@ -31,6 +31,8 @@ export interface ToolRun {
31
31
  done: boolean;
32
32
  /** The agent went on to its next step without saying the call ended: it dropped it (a call of a tool it does not have, say). */
33
33
  left: boolean;
34
+ /** A call of a subagent or a teammate of the agent, which goes on while the agent itself takes its next steps. */
35
+ others: boolean;
34
36
  /** Its arguments are all there: the agent said so, or announced the call with them before running it. */
35
37
  complete: boolean;
36
38
  /** What its terminal printed, as some agents report it (Codex: `_meta.terminal_output_delta`). */
@@ -94,9 +96,12 @@ export declare class AgentTurn {
94
96
  settle(id: string, quietMs: number, signal?: AbortSignal): Promise<void>;
95
97
  /** The call once it ended, the agent went on without it, or the turn ended. */
96
98
  waitTool(id: string, signal?: AbortSignal): Promise<ToolRun | undefined>;
97
- /** Calls the agent started that neither ended nor were dropped, nor stepped past. */
99
+ /** Calls the agent itself started that neither ended nor were dropped, nor stepped past. */
98
100
  open(): boolean;
99
- /** The agent asks its model again: the calls before are over, said so or not, once their end had time to come. */
101
+ /**
102
+ * The agent asks its model again: its calls before are over, said so or not, once their end had time to come.
103
+ * Those of its subagents and teammates are not: they work on meanwhile.
104
+ */
100
105
  step(): void;
101
106
  /** The calls stepped past that did not end are dropped. */
102
107
  protected leave(): void;
@@ -116,20 +116,23 @@ class AgentTurn {
116
116
  await this.changed(signal);
117
117
  }
118
118
  }
119
- /** Calls the agent started that neither ended nor were dropped, nor stepped past. */
119
+ /** Calls the agent itself started that neither ended nor were dropped, nor stepped past. */
120
120
  open() {
121
121
  for (const run of this.tools.values()) {
122
- if (!run.done && !run.left && !this.stepped.has(run.id)) {
122
+ if (!run.done && !run.left && !run.others && !this.stepped.has(run.id)) {
123
123
  return true;
124
124
  }
125
125
  }
126
126
  return false;
127
127
  }
128
- /** The agent asks its model again: the calls before are over, said so or not, once their end had time to come. */
128
+ /**
129
+ * The agent asks its model again: its calls before are over, said so or not, once their end had time to come.
130
+ * Those of its subagents and teammates are not: they work on meanwhile.
131
+ */
129
132
  step() {
130
133
  var _a, _b;
131
134
  for (const run of this.tools.values()) {
132
- if (!run.done && !run.left) {
135
+ if (!run.done && !run.left && !run.others) {
133
136
  this.stepped.add(run.id);
134
137
  }
135
138
  }
@@ -184,6 +187,7 @@ class AgentTurn {
184
187
  output: '',
185
188
  done: false,
186
189
  left: false,
190
+ others: !acp_protocol_1.Acp.own(update._meta),
187
191
  complete: false,
188
192
  terminal: '',
189
193
  updatedAt: Date.now(),
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celljs/ta-agents",
3
- "version": "4.15.1",
3
+ "version": "4.16.0",
4
4
  "description": "A pi package for Ta: other coding agents (CodeBuddy Code, Claude Code, Codex and any agent that speaks ACP) as models to pick, each running a conversation on its own harness",
5
5
  "keywords": [
6
6
  "pi-package"
@@ -287,15 +287,47 @@ var TaGatewayServer = Symbol("TaGatewayServer");
287
287
  var TaLocation;
288
288
  (function(TaLocation2) {
289
289
  TaLocation2.SSH = "ssh://";
290
+ TaLocation2.CLOUD = "ta://";
291
+ const CLOUD_NAME = /^[a-z0-9][a-z0-9-]{0,39}$/;
290
292
  const HOST = /^(?!-)[\w.@:%+[\]-]+$/;
291
293
  function isRemote(location) {
292
- return location.startsWith(TaLocation2.SSH);
294
+ return location.startsWith(TaLocation2.SSH) || location.startsWith(TaLocation2.CLOUD);
293
295
  }
294
296
  TaLocation2.isRemote = isRemote;
297
+ function isCloud(host2) {
298
+ return !!host2 && host2.startsWith(TaLocation2.CLOUD);
299
+ }
300
+ TaLocation2.isCloud = isCloud;
301
+ function isCloudName(name) {
302
+ return CLOUD_NAME.test(name);
303
+ }
304
+ TaLocation2.isCloudName = isCloudName;
305
+ function cloud(name, path2 = "") {
306
+ return `${TaLocation2.CLOUD}${name}${path2 ? normalize(path2) : ""}`;
307
+ }
308
+ TaLocation2.cloud = cloud;
309
+ function cloudName(hostOrLocation) {
310
+ if (!hostOrLocation.startsWith(TaLocation2.CLOUD)) {
311
+ return;
312
+ }
313
+ const rest = hostOrLocation.slice(TaLocation2.CLOUD.length);
314
+ const slash = rest.indexOf("/");
315
+ return slash < 0 ? rest : rest.slice(0, slash);
316
+ }
317
+ TaLocation2.cloudName = cloudName;
295
318
  function parse(location) {
319
+ var _a;
296
320
  if (!isRemote(location)) {
297
321
  return;
298
322
  }
323
+ if (location.startsWith(TaLocation2.CLOUD)) {
324
+ const name = (_a = cloudName(location)) !== null && _a !== undefined ? _a : "";
325
+ if (!isCloudName(name)) {
326
+ throw new Error(`${JSON.stringify(location)} names no cloud workspace: write ta://<name>/<path>.`);
327
+ }
328
+ const path3 = location.slice(TaLocation2.CLOUD.length + name.length);
329
+ return { host: `${TaLocation2.CLOUD}${name}`, path: path3 ? normalize(path3) : "" };
330
+ }
299
331
  const rest = location.slice(TaLocation2.SSH.length);
300
332
  const slash = rest.indexOf("/");
301
333
  const host2 = slash < 0 ? rest : rest.slice(0, slash);
@@ -307,7 +339,7 @@ var TaLocation;
307
339
  }
308
340
  TaLocation2.parse = parse;
309
341
  function isHost(host2) {
310
- return HOST.test(host2);
342
+ return isCloud(host2) ? isCloudName(host2.slice(TaLocation2.CLOUD.length)) : HOST.test(host2);
311
343
  }
312
344
  TaLocation2.isHost = isHost;
313
345
  const FLAGS = /^-[46AaCfGgKkMNnqsTtVvXxYy]+$/;
@@ -371,10 +403,13 @@ var TaLocation;
371
403
  }
372
404
  TaLocation2.readHost = readHost;
373
405
  function ssh(host2, path2 = "") {
374
- return `${TaLocation2.SSH}${host2}${path2 ? normalize(path2) : ""}`;
406
+ return isCloud(host2) ? `${host2}${path2 ? normalize(path2) : ""}` : `${TaLocation2.SSH}${host2}${path2 ? normalize(path2) : ""}`;
375
407
  }
376
408
  TaLocation2.ssh = ssh;
377
409
  function hostLabel(host2) {
410
+ if (isCloud(host2)) {
411
+ return host2.slice(TaLocation2.CLOUD.length);
412
+ }
378
413
  const name = host2.replace(/^[^@]*@/, "").replace(/^\[(.*)\](?::\d+)?$/, "$1").replace(/^([^:]*):\d+$/, "$1");
379
414
  return /^[\d.]+$/.test(name) || name.includes(":") ? name : name.split(".")[0] || name;
380
415
  }
@@ -907,6 +942,8 @@ var TaActionUtil;
907
942
  }
908
943
  TaActionUtil2.inside = inside;
909
944
  })(TaActionUtil || (TaActionUtil = {}));
945
+ // ../ta-protocol/esm/common/usage-protocol.js
946
+ var TaUsageServer = Symbol("TaUsageServer");
910
947
  // ../ta-protocol/esm/common/workspace-protocol.js
911
948
  var TaWorkspaceServer = Symbol("TaWorkspaceServer");
912
949
  var TaTerminalServer = Symbol("TaTerminalServer");
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celljs/ta-bots",
3
- "version": "4.15.1",
3
+ "version": "4.16.0",
4
4
  "description": "A pi package for Ta: bots of WeChat (ClawBot) and WeCom connected to the double, an agent or a conversation, messages and files both ways",
5
5
  "keywords": [
6
6
  "pi-package"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celljs/ta-changes",
3
- "version": "4.15.1",
3
+ "version": "4.16.0",
4
4
  "description": "A pi package for Ta: the files each reply changed, with their diffs, and a button that takes the changes of a reply back",
5
5
  "keywords": [
6
6
  "pi-package"
@@ -46,15 +46,47 @@ var TaLanguageUtil;
46
46
  var TaLocation;
47
47
  (function(TaLocation2) {
48
48
  TaLocation2.SSH = "ssh://";
49
+ TaLocation2.CLOUD = "ta://";
50
+ const CLOUD_NAME = /^[a-z0-9][a-z0-9-]{0,39}$/;
49
51
  const HOST = /^(?!-)[\w.@:%+[\]-]+$/;
50
52
  function isRemote(location) {
51
- return location.startsWith(TaLocation2.SSH);
53
+ return location.startsWith(TaLocation2.SSH) || location.startsWith(TaLocation2.CLOUD);
52
54
  }
53
55
  TaLocation2.isRemote = isRemote;
56
+ function isCloud(host2) {
57
+ return !!host2 && host2.startsWith(TaLocation2.CLOUD);
58
+ }
59
+ TaLocation2.isCloud = isCloud;
60
+ function isCloudName(name) {
61
+ return CLOUD_NAME.test(name);
62
+ }
63
+ TaLocation2.isCloudName = isCloudName;
64
+ function cloud(name, path2 = "") {
65
+ return `${TaLocation2.CLOUD}${name}${path2 ? normalize(path2) : ""}`;
66
+ }
67
+ TaLocation2.cloud = cloud;
68
+ function cloudName(hostOrLocation) {
69
+ if (!hostOrLocation.startsWith(TaLocation2.CLOUD)) {
70
+ return;
71
+ }
72
+ const rest = hostOrLocation.slice(TaLocation2.CLOUD.length);
73
+ const slash = rest.indexOf("/");
74
+ return slash < 0 ? rest : rest.slice(0, slash);
75
+ }
76
+ TaLocation2.cloudName = cloudName;
54
77
  function parse(location) {
78
+ var _a;
55
79
  if (!isRemote(location)) {
56
80
  return;
57
81
  }
82
+ if (location.startsWith(TaLocation2.CLOUD)) {
83
+ const name = (_a = cloudName(location)) !== null && _a !== undefined ? _a : "";
84
+ if (!isCloudName(name)) {
85
+ throw new Error(`${JSON.stringify(location)} names no cloud workspace: write ta://<name>/<path>.`);
86
+ }
87
+ const path3 = location.slice(TaLocation2.CLOUD.length + name.length);
88
+ return { host: `${TaLocation2.CLOUD}${name}`, path: path3 ? normalize(path3) : "" };
89
+ }
58
90
  const rest = location.slice(TaLocation2.SSH.length);
59
91
  const slash = rest.indexOf("/");
60
92
  const host2 = slash < 0 ? rest : rest.slice(0, slash);
@@ -66,7 +98,7 @@ var TaLocation;
66
98
  }
67
99
  TaLocation2.parse = parse;
68
100
  function isHost(host2) {
69
- return HOST.test(host2);
101
+ return isCloud(host2) ? isCloudName(host2.slice(TaLocation2.CLOUD.length)) : HOST.test(host2);
70
102
  }
71
103
  TaLocation2.isHost = isHost;
72
104
  const FLAGS = /^-[46AaCfGgKkMNnqsTtVvXxYy]+$/;
@@ -130,10 +162,13 @@ var TaLocation;
130
162
  }
131
163
  TaLocation2.readHost = readHost;
132
164
  function ssh(host2, path2 = "") {
133
- return `${TaLocation2.SSH}${host2}${path2 ? normalize(path2) : ""}`;
165
+ return isCloud(host2) ? `${host2}${path2 ? normalize(path2) : ""}` : `${TaLocation2.SSH}${host2}${path2 ? normalize(path2) : ""}`;
134
166
  }
135
167
  TaLocation2.ssh = ssh;
136
168
  function hostLabel(host2) {
169
+ if (isCloud(host2)) {
170
+ return host2.slice(TaLocation2.CLOUD.length);
171
+ }
137
172
  const name = host2.replace(/^[^@]*@/, "").replace(/^\[(.*)\](?::\d+)?$/, "$1").replace(/^([^:]*):\d+$/, "$1");
138
173
  return /^[\d.]+$/.test(name) || name.includes(":") ? name : name.split(".")[0] || name;
139
174
  }
@@ -238,6 +273,7 @@ var TaErrorCode = {
238
273
  CANCELLED: "CELL_TA_CANCELLED",
239
274
  NOT_SIGNED_IN: "CELL_TA_NOT_SIGNED_IN",
240
275
  ENVIRONMENT_FAILED: "CELL_TA_ENVIRONMENT_FAILED",
276
+ RATE_LIMITED: "CELL_TA_RATE_LIMITED",
241
277
  FORBIDDEN: "CELL_TA_FORBIDDEN",
242
278
  LIMIT: "CELL_TA_LIMIT",
243
279
  CONNECTION_LOST: "CELL_TA_CONNECTION_LOST"
@@ -684,6 +720,8 @@ var TaActionUtil;
684
720
  }
685
721
  TaActionUtil2.inside = inside;
686
722
  })(TaActionUtil || (TaActionUtil = {}));
723
+ // ../ta-protocol/esm/common/usage-protocol.js
724
+ var TaUsageServer = Symbol("TaUsageServer");
687
725
  // ../ta-protocol/esm/common/workspace-protocol.js
688
726
  var TaWorkspaceServer = Symbol("TaWorkspaceServer");
689
727
  var TaTerminalServer = Symbol("TaTerminalServer");
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celljs/ta-channels",
3
- "version": "4.15.1",
3
+ "version": "4.16.0",
4
4
  "description": "A pi package for Ta: agents with roles of their own and channels where the user, Ta and the agents talk; Ta builds the team for what the user wants",
5
5
  "keywords": [
6
6
  "pi-package"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celljs/ta-computer-use",
3
- "version": "4.15.1",
3
+ "version": "4.16.0",
4
4
  "description": "A pi package for Ta: the desktop apps of this computer, used in the background through Cua Driver, which starts only when the agent first needs it",
5
5
  "keywords": [
6
6
  "pi-package"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celljs/ta-cron",
3
- "version": "4.15.1",
3
+ "version": "4.16.0",
4
4
  "description": "A pi package for Ta: prompts that run on a schedule, once, every so often or by a cron expression, each run in a conversation of its own in the Ta service",
5
5
  "keywords": [
6
6
  "pi-package"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celljs/ta-extensions",
3
- "version": "4.15.1",
3
+ "version": "4.16.0",
4
4
  "description": "A pi package for Ta: the page of extensions, where the user makes one by saying what it should do, and hands extensions on or takes them in as one file",
5
5
  "keywords": [
6
6
  "pi-package"
@@ -873,15 +873,47 @@ var TaGatewayServer = Symbol("TaGatewayServer");
873
873
  var TaLocation;
874
874
  (function(TaLocation2) {
875
875
  TaLocation2.SSH = "ssh://";
876
+ TaLocation2.CLOUD = "ta://";
877
+ const CLOUD_NAME = /^[a-z0-9][a-z0-9-]{0,39}$/;
876
878
  const HOST = /^(?!-)[\w.@:%+[\]-]+$/;
877
879
  function isRemote(location) {
878
- return location.startsWith(TaLocation2.SSH);
880
+ return location.startsWith(TaLocation2.SSH) || location.startsWith(TaLocation2.CLOUD);
879
881
  }
880
882
  TaLocation2.isRemote = isRemote;
883
+ function isCloud(host2) {
884
+ return !!host2 && host2.startsWith(TaLocation2.CLOUD);
885
+ }
886
+ TaLocation2.isCloud = isCloud;
887
+ function isCloudName(name) {
888
+ return CLOUD_NAME.test(name);
889
+ }
890
+ TaLocation2.isCloudName = isCloudName;
891
+ function cloud(name, path2 = "") {
892
+ return `${TaLocation2.CLOUD}${name}${path2 ? normalize(path2) : ""}`;
893
+ }
894
+ TaLocation2.cloud = cloud;
895
+ function cloudName(hostOrLocation) {
896
+ if (!hostOrLocation.startsWith(TaLocation2.CLOUD)) {
897
+ return;
898
+ }
899
+ const rest = hostOrLocation.slice(TaLocation2.CLOUD.length);
900
+ const slash = rest.indexOf("/");
901
+ return slash < 0 ? rest : rest.slice(0, slash);
902
+ }
903
+ TaLocation2.cloudName = cloudName;
881
904
  function parse(location) {
905
+ var _a;
882
906
  if (!isRemote(location)) {
883
907
  return;
884
908
  }
909
+ if (location.startsWith(TaLocation2.CLOUD)) {
910
+ const name = (_a = cloudName(location)) !== null && _a !== undefined ? _a : "";
911
+ if (!isCloudName(name)) {
912
+ throw new Error(`${JSON.stringify(location)} names no cloud workspace: write ta://<name>/<path>.`);
913
+ }
914
+ const path3 = location.slice(TaLocation2.CLOUD.length + name.length);
915
+ return { host: `${TaLocation2.CLOUD}${name}`, path: path3 ? normalize(path3) : "" };
916
+ }
885
917
  const rest = location.slice(TaLocation2.SSH.length);
886
918
  const slash = rest.indexOf("/");
887
919
  const host2 = slash < 0 ? rest : rest.slice(0, slash);
@@ -893,7 +925,7 @@ var TaLocation;
893
925
  }
894
926
  TaLocation2.parse = parse;
895
927
  function isHost(host2) {
896
- return HOST.test(host2);
928
+ return isCloud(host2) ? isCloudName(host2.slice(TaLocation2.CLOUD.length)) : HOST.test(host2);
897
929
  }
898
930
  TaLocation2.isHost = isHost;
899
931
  const FLAGS = /^-[46AaCfGgKkMNnqsTtVvXxYy]+$/;
@@ -957,10 +989,13 @@ var TaLocation;
957
989
  }
958
990
  TaLocation2.readHost = readHost;
959
991
  function ssh(host2, path2 = "") {
960
- return `${TaLocation2.SSH}${host2}${path2 ? normalize(path2) : ""}`;
992
+ return isCloud(host2) ? `${host2}${path2 ? normalize(path2) : ""}` : `${TaLocation2.SSH}${host2}${path2 ? normalize(path2) : ""}`;
961
993
  }
962
994
  TaLocation2.ssh = ssh;
963
995
  function hostLabel(host2) {
996
+ if (isCloud(host2)) {
997
+ return host2.slice(TaLocation2.CLOUD.length);
998
+ }
964
999
  const name = host2.replace(/^[^@]*@/, "").replace(/^\[(.*)\](?::\d+)?$/, "$1").replace(/^([^:]*):\d+$/, "$1");
965
1000
  return /^[\d.]+$/.test(name) || name.includes(":") ? name : name.split(".")[0] || name;
966
1001
  }
@@ -1492,6 +1527,8 @@ var TaActionUtil;
1492
1527
  }
1493
1528
  TaActionUtil2.inside = inside;
1494
1529
  })(TaActionUtil || (TaActionUtil = {}));
1530
+ // ../ta-protocol/esm/common/usage-protocol.js
1531
+ var TaUsageServer = Symbol("TaUsageServer");
1495
1532
  // ../ta-protocol/esm/common/workspace-protocol.js
1496
1533
  var TaWorkspaceServer = Symbol("TaWorkspaceServer");
1497
1534
  var TaTerminalServer = Symbol("TaTerminalServer");
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celljs/ta-games",
3
- "version": "4.15.1",
3
+ "version": "4.16.0",
4
4
  "description": "A pi package for Ta: games and game-like extensions on Phaser and Three.js, the game engines of Ta's web page, with the ta-game skill and the Games page",
5
5
  "keywords": [
6
6
  "pi-package"
@@ -6,6 +6,8 @@ A pi package that comes with Ta (on by default; Settings → Extensions of the w
6
6
  - **Results as a card**: when a reply reports work done, results, a comparison, choices to make, or several facts or relations, Ta writes a `ta-glance` block (JSON) after the first line, which the web client draws as a card: key numbers, files changed (opened by a click), steps, before and after, bars, a flow, a Mermaid diagram, a table, choices to tap, risks and to-dos, buttons of what to ask next, folded details. The card grows as the reply streams.
7
7
  - **Waiting for you**: a turn whose reply ends with a card of choices (`options`) or `status: "blocked"` is marked in the session with a `ta-ask` entry (`TA_ASK_ENTRY`, which the model never reads): the list of chats, its tab, the double's tasks and Quick open show that the conversation waits for you to decide, until you answer, by a tap or in words. Until then the card is framed in blue with a ?; once answered it shows the choice on every device, after a reload too (`WebCodeRendererProps.answer`).
8
8
  - **Elsewhere**: the preview of the list of conversations shows the first line; replies to WeChat and WeCom bots draw no card and stay short paragraphs; `ta` in a terminal replies as before. External agents (ta-agents) get the section too.
9
+ - **Charts**: a key number may have a small line of its values over time (`trend`), and a card may have a line chart (`line`, up to 4 series) and the parts of a whole (`share`), drawn in plain SVG, with no library.
10
+ - **Icons**: a key number, a node of a flow, a choice, a note and a thing to ask next may have a lucide icon (`icon`), to tell items apart at a glance; the prompt gives the model 31 common ones and tells it never to write an emoji. An icon the page does not have is not drawn.
9
11
 
10
12
  The card's format is in `web-src/glance-protocol.ts`, the prompt in `web-src/glance-prompt.ts`. Other packages draw cards for fenced blocks of their own languages with `registerCodeRenderer`.
11
13
 
@@ -6,6 +6,8 @@ Ta 自带的 pi 包(默认开启,可在 Web 客户端的 设置 → 扩展
6
6
  - **结果画成卡片**:汇报完成的工作、结果、对比、要你选的方案、多个事实或关系时,Ta 在第一行之后写一个 `ta-glance` 代码块(JSON),Web 把它画成卡片:关键数字、改了的文件(点开)、步骤、前后对比、横条、流程、Mermaid 关系图、表格、可点选的方案、风险与待办、下一步按钮、折叠的细节。卡片随回复流式长出来。
7
7
  - **待你决定**:一轮回复以带选项(`options`)或 `status: "blocked"` 的卡片结束时,pi 扩展在会话里记一条 `ta-ask`(`TA_ASK_ENTRY`,模型读不到),对话列表、标签、分身任务和快捷打开就显示这个对话在等你决定,直到你回答(点选或打字都算)。卡片在你回答前用蓝框和问号标出;回答后各设备都显示已选,刷新也保留(`WebCodeRendererProps.answer`)。
8
8
  - **别处**:对话列表的预览显示第一行结论;发到微信、企业微信机器人的回复不画卡片,照常是短段落;终端里的 `ta` 回复照旧。外部 Agent(ta-agents)也会拿到这段写法。
9
+ - **图表**:关键数字可以带一条小走势线(`trend`),还有趋势线(`line`,最多 4 条)和占比(`share`),用原生 SVG 画、不加依赖。
10
+ - **图标**:关键数字、流程节点、方案、提示、下一步可以带一个 lucide 图标(`icon`),一眼分清各项说的是什么;提示词给模型 31 个常用图标,并要求不用 emoji。页面没有的图标不画。
9
11
 
10
12
  卡片的格式见 `web-src/glance-protocol.ts`,提示词见 `web-src/glance-prompt.ts`。别的包也能用 `registerCodeRenderer` 为自己的代码块语言画卡片。
11
13