@datalayer/agent-runtimes 1.5.20 → 1.5.22

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 (305) hide show
  1. package/dist-embed/chunks/{AgentDetails-DZyyuD5F.js → AgentDetails-B6vekLFY.js} +1 -1
  2. package/dist-embed/chunks/{AgentDetailsDialog-DaQyQxlm.js → AgentDetailsDialog-C-o8qFsS.js} +1 -1
  3. package/dist-embed/chunks/{AgentInspector-CBNiiRtv.js → AgentInspector-EiBHJgc9.js} +1 -1
  4. package/dist-embed/chunks/{AgentInspectorDialog-BxMOAc7K.js → AgentInspectorDialog-3fbLXnLP.js} +1 -1
  5. package/dist-embed/chunks/{CellSidebarExtension-Dwe7PfXi.js → CellSidebarExtension-BBXRIRgA.js} +7 -7
  6. package/dist-embed/chunks/ChatView-BjZ993Ch.js +32 -0
  7. package/dist-embed/chunks/{ContextPie-n1y886z-.js → ContextPie-Daf19Ivt.js} +1 -1
  8. package/dist-embed/chunks/{DeckComponent-BSeEBNHt.js → DeckComponent-C76a8LYD.js} +2 -2
  9. package/dist-embed/chunks/{DocumentView-OIdQEk_n.js → DocumentView-BZhbQkbP.js} +1 -1
  10. package/dist-embed/chunks/{EphemeralDocument-C-uLD1W7.js → EphemeralDocument-Bzv1mPpG.js} +1 -1
  11. package/dist-embed/chunks/{EphemeralNotebook-C_peDfqf.js → EphemeralNotebook-C4_wmSgk.js} +1 -1
  12. package/dist-embed/chunks/{ExcalidrawComponent-DHSxnPc9.js → ExcalidrawComponent-DVOnRDkN.js} +1 -1
  13. package/dist-embed/chunks/{ExcalidrawModal-BpsfNG-u.js → ExcalidrawModal-B0h_-M3l.js} +1 -1
  14. package/dist-embed/chunks/{JupyterLexicalExtension-BUSLnJVL.js → JupyterLexicalExtension-B2PQrLXS.js} +9 -9
  15. package/dist-embed/chunks/{KernelVariables-Cu7UeFhT.js → KernelVariables-trZsXNAi.js} +1 -1
  16. package/dist-embed/chunks/{LexicalToolRegistry-CNg1T5sQ.js → LexicalToolRegistry-8wJyLumb.js} +4 -4
  17. package/dist-embed/chunks/{NotebookToolSurfaces-Cm6-oE_W.js → NotebookToolSurfaces-BuKcXArX.js} +1 -1
  18. package/dist-embed/chunks/{NotebookView-Be2lNZjS.js → NotebookView-Em4y6Een.js} +1 -1
  19. package/dist-embed/chunks/{Output-OIgTyxpD.js → Output-DA8Udq91.js} +1 -1
  20. package/dist-embed/chunks/{SandboxDetailsDialog-BMq0tlcE.js → SandboxDetailsDialog-o2z6YFyb.js} +1 -1
  21. package/dist-embed/chunks/{SchemaForm-D3mmq2C1.js → SchemaForm-DCt_mqR1.js} +1 -1
  22. package/dist-embed/chunks/{WidgetVariableView-DnuwkCHl.js → WidgetVariableView-CDEFi0p0.js} +1 -1
  23. package/dist-embed/chunks/{YouTubePlugin-Bum16ua6.js → YouTubePlugin-DxRPFzvS.js} +1 -1
  24. package/dist-embed/chunks/{abnfDiagram-VCTEODGH-Dac38D-P.js → abnfDiagram-VCTEODGH-Cit223SC.js} +1 -1
  25. package/dist-embed/chunks/{abnfDiagram-VCTEODGH-BMkFygW4.js → abnfDiagram-VCTEODGH-CsoEWluu.js} +1 -1
  26. package/dist-embed/chunks/{ar-SA-G6X2FPQ2-JDFjD_Dk.js → ar-SA-G6X2FPQ2-CjJtC55z.js} +1 -1
  27. package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-D7VBU0uf.js → architectureDiagram-5GKGNRK7-DfqpfKOB.js} +1 -1
  28. package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-DXJTBh9S.js → architectureDiagram-5GKGNRK7-DyQuZM-c.js} +1 -1
  29. package/dist-embed/chunks/{az-AZ-76LH7QW2-AbN1w5Zy.js → az-AZ-76LH7QW2-B7KkL6wt.js} +1 -1
  30. package/dist-embed/chunks/{bg-BG-XCXSNQG7-BULkJsTf.js → bg-BG-XCXSNQG7-D7UwtEhO.js} +1 -1
  31. package/dist-embed/chunks/{blockDiagram-868be97b-Bk9MNjmt.js → blockDiagram-868be97b-jJKAH_Up.js} +1 -1
  32. package/dist-embed/chunks/{blockDiagram-I7D4REHJ-CKjKQ6Dq.js → blockDiagram-I7D4REHJ-BcQwB7-r.js} +1 -1
  33. package/dist-embed/chunks/{blockDiagram-I7D4REHJ-BwenaP7n.js → blockDiagram-I7D4REHJ-z3xnLtdG.js} +1 -1
  34. package/dist-embed/chunks/{bn-BD-2XOGV67Q-B6EtUyIk.js → bn-BD-2XOGV67Q-pDDWE9Mn.js} +1 -1
  35. package/dist-embed/chunks/{c4Diagram-3f4bdde3-BGoSdP5p.js → c4Diagram-3f4bdde3-DU_-LipO.js} +1 -1
  36. package/dist-embed/chunks/{c4Diagram-7LVT6UL2-DlkcVfDa.js → c4Diagram-7LVT6UL2-BeMfCOG_.js} +1 -1
  37. package/dist-embed/chunks/{c4Diagram-7LVT6UL2-BZRokUDB.js → c4Diagram-7LVT6UL2-DjfnLrWZ.js} +1 -1
  38. package/dist-embed/chunks/{ca-ES-6MX7JW3Y-BZ0wzUck.js → ca-ES-6MX7JW3Y-By1uEeFx.js} +1 -1
  39. package/dist-embed/chunks/{celltoolbartracker-CCRqu43G.js → celltoolbartracker-DcYHi8Du.js} +1 -1
  40. package/dist-embed/chunks/{chunk-2Q5K7J3B-DLu9zZx0.js → chunk-2Q5K7J3B-BGvvv_gg.js} +1 -1
  41. package/dist-embed/chunks/{chunk-2Q5K7J3B-CfYiHpfd.js → chunk-2Q5K7J3B-YWpfqKnX.js} +1 -1
  42. package/dist-embed/chunks/{chunk-5VM5RSS4-yHAygNq4.js → chunk-5VM5RSS4-4bCWL_eZ.js} +1 -1
  43. package/dist-embed/chunks/{chunk-5VM5RSS4-dV5IUPYK.js → chunk-5VM5RSS4-t-8mwHFb.js} +1 -1
  44. package/dist-embed/chunks/{chunk-F27PBJKO-BArvzx7H.js → chunk-F27PBJKO-3yGsHIDd.js} +1 -1
  45. package/dist-embed/chunks/{chunk-F27PBJKO-BeY8iI19.js → chunk-F27PBJKO-De9ONU-g.js} +1 -1
  46. package/dist-embed/chunks/{chunk-IMKFNOWR-BJRUyuXy.js → chunk-IMKFNOWR-Bvbi7lre.js} +1 -1
  47. package/dist-embed/chunks/{chunk-IMKFNOWR-iUeFNxCU.js → chunk-IMKFNOWR-DA2KJGep.js} +1 -1
  48. package/dist-embed/chunks/{chunk-JWPE2WC7-BDUBU4vN.js → chunk-JWPE2WC7-CVkDZh_H.js} +1 -1
  49. package/dist-embed/chunks/{chunk-JWPE2WC7-Djk-1JPJ.js → chunk-JWPE2WC7-w_AaYpEU.js} +1 -1
  50. package/dist-embed/chunks/{chunk-POPQ4Y6H-E4731IOt.js → chunk-POPQ4Y6H-C1mg0obI.js} +1 -1
  51. package/dist-embed/chunks/{chunk-POPQ4Y6H-CibXbz_c.js → chunk-POPQ4Y6H-DnstozKC.js} +1 -1
  52. package/dist-embed/chunks/{chunk-SVP7TREG-o7JviCXQ.js → chunk-SVP7TREG-CVLd6GtA.js} +1 -1
  53. package/dist-embed/chunks/{chunk-SVP7TREG-DeRyA6Ek.js → chunk-SVP7TREG-DmKkKduL.js} +1 -1
  54. package/dist-embed/chunks/{chunk-TICWLB2K-Zk_gUXIu.js → chunk-TICWLB2K-C-lEt3p0.js} +1 -1
  55. package/dist-embed/chunks/{chunk-TICWLB2K-BIhZcpwn.js → chunk-TICWLB2K-xv7MPgmq.js} +1 -1
  56. package/dist-embed/chunks/{chunk-XXDRQBXY-DATpHkZD.js → chunk-XXDRQBXY-Cq8wF2xQ.js} +1 -1
  57. package/dist-embed/chunks/{chunk-XXDRQBXY-Cp6f69YK.js → chunk-XXDRQBXY-j7xuWjIK.js} +1 -1
  58. package/dist-embed/chunks/{classDiagram-ZZMXUADV-BfpWJKcC.js → classDiagram-ZZMXUADV-DRPRMTvC.js} +1 -1
  59. package/dist-embed/chunks/{classDiagram-ZZMXUADV-DcutslOq.js → classDiagram-ZZMXUADV-Dvh08RMu.js} +1 -1
  60. package/dist-embed/chunks/{classDiagram-f62afe4f-BVLyWZwA.js → classDiagram-f62afe4f-B8-b8b-t.js} +1 -1
  61. package/dist-embed/chunks/{classDiagram-v2-604399ef-CgcAzr_L.js → classDiagram-v2-604399ef-CHogX84-.js} +1 -1
  62. package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-BfpWJKcC.js → classDiagram-v2-VYDZK3BY-DRPRMTvC.js} +1 -1
  63. package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-DcutslOq.js → classDiagram-v2-VYDZK3BY-Dvh08RMu.js} +1 -1
  64. package/dist-embed/chunks/{code-block-IT6T5CEO-D5_yhrdD.js → code-block-IT6T5CEO-Dbm1cj5T.js} +1 -1
  65. package/dist-embed/chunks/{component-DoyMsR16.js → component-CsXw-w1P.js} +3 -3
  66. package/dist-embed/chunks/{cose-bilkent-JH36ORCC-B-LvsoyE.js → cose-bilkent-JH36ORCC-BrisaBwh.js} +1 -1
  67. package/dist-embed/chunks/{cose-bilkent-JH36ORCC-DhPsWJev.js → cose-bilkent-JH36ORCC-DGpwW9PH.js} +1 -1
  68. package/dist-embed/chunks/{createText-aed3d8b3-CnP7VdTn.js → createText-aed3d8b3-C8C5hNtS.js} +1 -1
  69. package/dist-embed/chunks/{cs-CZ-2BRQDIVT-CHIiQJ-9.js → cs-CZ-2BRQDIVT-TB9QxoL2.js} +1 -1
  70. package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-B4k-OykO.js → cynefinDiagram-5FMLGOSQ-B37BRKcq.js} +1 -1
  71. package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-D4zzGd7W.js → cynefinDiagram-5FMLGOSQ-NXny6Mot.js} +1 -1
  72. package/dist-embed/chunks/{da-DK-5WZEPLOC-dfN2SAKQ.js → da-DK-5WZEPLOC-CLl8TZ2P.js} +1 -1
  73. package/dist-embed/chunks/{dagre-GXQ25YYZ-BlWkzzlo.js → dagre-GXQ25YYZ-b03jeXc5.js} +1 -1
  74. package/dist-embed/chunks/{dagre-GXQ25YYZ-DUrWhbsC.js → dagre-GXQ25YYZ-mM6SsGs8.js} +1 -1
  75. package/dist-embed/chunks/{de-DE-XR44H4JA-BKsKfmfo.js → de-DE-XR44H4JA-6gY_Hl4H.js} +1 -1
  76. package/dist-embed/chunks/{diagram-S7CK7UJ4-BuRBzTwI.js → diagram-S7CK7UJ4-C8TF_Y_V.js} +1 -1
  77. package/dist-embed/chunks/{diagram-S7CK7UJ4-FxHXDIYr.js → diagram-S7CK7UJ4-fpaH_1xM.js} +1 -1
  78. package/dist-embed/chunks/{diagram-UQ7AKVKN-CeDT8Vz4.js → diagram-UQ7AKVKN-CcqaQfbU.js} +1 -1
  79. package/dist-embed/chunks/{diagram-UQ7AKVKN-FxYHrvzF.js → diagram-UQ7AKVKN-G8fspx37.js} +1 -1
  80. package/dist-embed/chunks/{diagram-VSXAHHWV-C2icUdkA.js → diagram-VSXAHHWV-B3Q41FOl.js} +1 -1
  81. package/dist-embed/chunks/{diagram-VSXAHHWV-Cv0WAiv8.js → diagram-VSXAHHWV-DLhWEHn-.js} +1 -1
  82. package/dist-embed/chunks/{diagram-VX7I27RA-AoxkG7BW.js → diagram-VX7I27RA-Dnbm3teD.js} +1 -1
  83. package/dist-embed/chunks/{diagram-VX7I27RA-D6VPVMhu.js → diagram-VX7I27RA-Dy-IHeZr.js} +1 -1
  84. package/dist-embed/chunks/{diagram-Z3DM3KII-DxunLDOr.js → diagram-Z3DM3KII-BkiB9_Ay.js} +1 -1
  85. package/dist-embed/chunks/{diagram-Z3DM3KII-CHxtPQ6F.js → diagram-Z3DM3KII-hE5FTtNp.js} +1 -1
  86. package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-CfsTBJc5.js → ebnfDiagram-PWID7BFC-DJhj6Mbd.js} +1 -1
  87. package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-CmJlfM6d.js → ebnfDiagram-PWID7BFC-DZiCEGSK.js} +1 -1
  88. package/dist-embed/chunks/{edges-b2856ca0-Cl5rq6T8.js → edges-b2856ca0-DuBY_rn3.js} +1 -1
  89. package/dist-embed/chunks/{el-GR-BZB4AONW-Cs0zPSU1.js → el-GR-BZB4AONW-CFGi_gqP.js} +1 -1
  90. package/dist-embed/chunks/{erDiagram-5d81789a-C0jmz-br.js → erDiagram-5d81789a-BYOejxuX.js} +1 -1
  91. package/dist-embed/chunks/{erDiagram-RLTQ6QDP-Dyljy6tN.js → erDiagram-RLTQ6QDP-Bg2UfSBM.js} +1 -1
  92. package/dist-embed/chunks/{erDiagram-RLTQ6QDP-FFD_URlX.js → erDiagram-RLTQ6QDP-v1tF2vX5.js} +1 -1
  93. package/dist-embed/chunks/{es-ES-U4NZUMDT-fGOqRf0o.js → es-ES-U4NZUMDT-D_HQumEp.js} +1 -1
  94. package/dist-embed/chunks/{eu-ES-A7QVB2H4-CLZ09rVe.js → eu-ES-A7QVB2H4-CvUID20p.js} +1 -1
  95. package/dist-embed/chunks/{fa-IR-HGAKTJCU-Cjimbc8n.js → fa-IR-HGAKTJCU-C7_Vi5QP.js} +1 -1
  96. package/dist-embed/chunks/{fi-FI-Z5N7JZ37-ZXNEW916.js → fi-FI-Z5N7JZ37-SBYxKS7Q.js} +1 -1
  97. package/dist-embed/chunks/{flowDb-185abca5-Cden9aoH.js → flowDb-185abca5-C_IywhMB.js} +1 -1
  98. package/dist-embed/chunks/{flowDiagram-1629c991-Bar9YxSW.js → flowDiagram-1629c991-C8JQo90r.js} +1 -1
  99. package/dist-embed/chunks/{flowDiagram-HODETNUW-bg09n0_F.js → flowDiagram-HODETNUW-BigtRRvu.js} +1 -1
  100. package/dist-embed/chunks/{flowDiagram-HODETNUW-02Xo2-6n.js → flowDiagram-HODETNUW-Cd1y1bVx.js} +1 -1
  101. package/dist-embed/chunks/{flowDiagram-v2-1d953310-C6FnOAb2.js → flowDiagram-v2-1d953310-DTH8N-sj.js} +1 -1
  102. package/dist-embed/chunks/{flowchart-elk-definition-6df44142-DcmMV2Wi.js → flowchart-elk-definition-6df44142-W8s7oFgJ.js} +1 -1
  103. package/dist-embed/chunks/{fr-FR-RHASNOE6-DQaq_g67.js → fr-FR-RHASNOE6-fAErz4Nf.js} +1 -1
  104. package/dist-embed/chunks/{ganttDiagram-3b0b3873-BN61xNrz.js → ganttDiagram-3b0b3873-D_XwfPDh.js} +1 -1
  105. package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-BCLyiaOJ.js → ganttDiagram-EL5Y4UJY-BIsU1Bcw.js} +1 -1
  106. package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-JviVPOnF.js → ganttDiagram-EL5Y4UJY-VT_s02F9.js} +1 -1
  107. package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-CzBMuAvA.js → gitGraphDiagram-WWUBYQGX-BDdr_2gq.js} +1 -1
  108. package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-CNc3l-2t.js → gitGraphDiagram-WWUBYQGX-BvxzF9hn.js} +1 -1
  109. package/dist-embed/chunks/{gitGraphDiagram-f01e8bc2-7ecaKDp7.js → gitGraphDiagram-f01e8bc2-UBa5a0HV.js} +1 -1
  110. package/dist-embed/chunks/{gl-ES-HMX3MZ6V-BlrLF7Sk.js → gl-ES-HMX3MZ6V-DCciQOEM.js} +1 -1
  111. package/dist-embed/chunks/{he-IL-6SHJWFNN-DLfo2nov.js → he-IL-6SHJWFNN-CuQhQVb2.js} +1 -1
  112. package/dist-embed/chunks/{hi-IN-IWLTKZ5I-BcbS0I1h.js → hi-IN-IWLTKZ5I-BlH8AK2z.js} +1 -1
  113. package/dist-embed/chunks/{hu-HU-A5ZG7DT2-B_-3TehM.js → hu-HU-A5ZG7DT2-BaBGhZVQ.js} +1 -1
  114. package/dist-embed/chunks/{id-ID-SAP4L64H-C920eBs5.js → id-ID-SAP4L64H-Dkm1zS1g.js} +1 -1
  115. package/dist-embed/chunks/{index-9bae90f3-_mZDJyzh.js → index-9bae90f3-CvHGNDGk.js} +1 -1
  116. package/dist-embed/chunks/{index-W-qUA31l.js → index-B9aqZrHy.js} +1 -1
  117. package/dist-embed/chunks/{index-DbHMJ-IM.js → index-BDs-ntTo.js} +1 -1
  118. package/dist-embed/chunks/{index-D1CRwrf9.js → index-BQp4l7hT.js} +2 -2
  119. package/dist-embed/chunks/{index-D_-7qr4x.js → index-BcdbHyzT.js} +1 -1
  120. package/dist-embed/chunks/{index-DmKOrT_f.js → index-BqDJ3hYN.js} +1 -1
  121. package/dist-embed/chunks/{index-CuqMWXgT.js → index-CFP9psRB.js} +3 -3
  122. package/dist-embed/chunks/{index-C8N5z7FZ.js → index-CUAnjzKL.js} +1 -1
  123. package/dist-embed/chunks/{index-k3ISgWrJ.js → index-CWwj0zW9.js} +1 -1
  124. package/dist-embed/chunks/{index-DV2fNvY7.js → index-CecqH6mN.js} +1 -1
  125. package/dist-embed/chunks/{index-C3zGthUI.js → index-CoxYszKx.js} +1 -1
  126. package/dist-embed/chunks/{index-7V4MgoX0.js → index-CozDzMOf.js} +1 -1
  127. package/dist-embed/chunks/{index-C2UmIEOV.js → index-CrL-deXT.js} +1 -1
  128. package/dist-embed/chunks/{index-CW0DxnfF.js → index-CtEseCtc.js} +1 -1
  129. package/dist-embed/chunks/{index-OZDJ7kli.js → index-D2vkNPmG.js} +1 -1
  130. package/dist-embed/chunks/{index-MNZ1LVAM.js → index-D5xVRNk8.js} +1 -1
  131. package/dist-embed/chunks/{index-DmYrjwOw.js → index-D8wHLHbt.js} +1 -1
  132. package/dist-embed/chunks/{index-B0VC_nl2.js → index-DAZUOPnd.js} +1 -1
  133. package/dist-embed/chunks/{index-BbtA7ppb.js → index-DE_JTiwB.js} +1 -1
  134. package/dist-embed/chunks/{index-CLojGXLe.js → index-DMll0Yzi.js} +1 -1
  135. package/dist-embed/chunks/{index-DcbXB4Ou.js → index-DN-cizG6.js} +1 -1
  136. package/dist-embed/chunks/{index-DMTXHmrU.js → index-DPHM1WLM.js} +1 -1
  137. package/dist-embed/chunks/{index-Dyv67BU9.js → index-DSN70XMH.js} +2 -2
  138. package/dist-embed/chunks/{index-CGhVy6OJ.js → index-Dc5AqaeZ.js} +1 -1
  139. package/dist-embed/chunks/{index-B3qU5V3s.js → index-DdmqZZnv.js} +1 -1
  140. package/dist-embed/chunks/{index-BST3vALX.js → index-DlYw1KQn.js} +5 -5
  141. package/dist-embed/chunks/{index-C3p2Hbbg.js → index-Dobs-OKl.js} +1 -1
  142. package/dist-embed/chunks/{index-oJ3M8HYJ.js → index-Dp3JEvYy.js} +1 -1
  143. package/dist-embed/chunks/{index-D95mZTII.js → index-DsMBsL3g.js} +1 -1
  144. package/dist-embed/chunks/{index-BVdp0AG7.js → index-DvyxBamA.js} +4 -4
  145. package/dist-embed/chunks/{index-BMqDh5WU.js → index-SsFECYMb.js} +1 -1
  146. package/dist-embed/chunks/{index-DqwL86GY.js → index-YVrQYH-H.js} +12 -12
  147. package/dist-embed/chunks/{index-DSts8s_N.js → index-a9o1fYab.js} +1 -1
  148. package/dist-embed/chunks/{index-BVkaRzYN.js → index-bC_5dTbf.js} +4 -4
  149. package/dist-embed/chunks/{index--rbc1jdS.js → index-jJxXKHoT.js} +1 -1
  150. package/dist-embed/chunks/{index.esm-Dy7cyZyH.js → index.esm-p0OnSU9h.js} +1 -1
  151. package/dist-embed/chunks/{index.esm-jFa95d0B.js → index.esm-q_fIJH5v.js} +1 -1
  152. package/dist-embed/chunks/{infoDiagram-27XIBGKW-CuQ0a02I.js → infoDiagram-27XIBGKW-DIeaDzEK.js} +1 -1
  153. package/dist-embed/chunks/{infoDiagram-27XIBGKW-CDc0DV-6.js → infoDiagram-27XIBGKW-DZ6Xhv3K.js} +1 -1
  154. package/dist-embed/chunks/{infoDiagram-a29d40f1-BKWmVk4B.js → infoDiagram-a29d40f1-B9PMyz4X.js} +1 -1
  155. package/dist-embed/chunks/{isEqual-SWNqZJZT.js → isEqual-Cwjr2skl.js} +1 -1
  156. package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-CPu6wHAG.js → ishikawaDiagram-5VMMS53U-BP4Q8nEu.js} +1 -1
  157. package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-BY7eKNmA.js → ishikawaDiagram-5VMMS53U-CwrdITPn.js} +1 -1
  158. package/dist-embed/chunks/{it-IT-JPQ66NNP-CsJELR-H.js → it-IT-JPQ66NNP-BrcctIsI.js} +1 -1
  159. package/dist-embed/chunks/{ja-JP-DBVTYXUO-Bh4bW0cv.js → ja-JP-DBVTYXUO-CKuJ3Sod.js} +1 -1
  160. package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-6CRYfcQL.js → journeyDiagram-3NMN7TZE-iJrCUeL0.js} +1 -1
  161. package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-Cv_KZqY3.js → journeyDiagram-3NMN7TZE-wI34jsXX.js} +1 -1
  162. package/dist-embed/chunks/{journeyDiagram-95396277-yJruA0Fm.js → journeyDiagram-95396277-B6WhL2Fl.js} +1 -1
  163. package/dist-embed/chunks/{kaa-6HZHGXH3-BmDtc0g0.js → kaa-6HZHGXH3-ChFYZBwI.js} +1 -1
  164. package/dist-embed/chunks/{kab-KAB-ZGHBKWFO-Bluox3dD.js → kab-KAB-ZGHBKWFO-C7C7EuVk.js} +1 -1
  165. package/dist-embed/chunks/{kanban-definition-UXKFOSKX-Biauy1A4.js → kanban-definition-UXKFOSKX-B8AB0LN4.js} +1 -1
  166. package/dist-embed/chunks/{kanban-definition-UXKFOSKX-Dps45ZlJ.js → kanban-definition-UXKFOSKX-gqU76cK9.js} +1 -1
  167. package/dist-embed/chunks/{kk-KZ-P5N5QNE5-EZjFhsK8.js → kk-KZ-P5N5QNE5-Bff18CC1.js} +1 -1
  168. package/dist-embed/chunks/{km-KH-HSX4SM5Z-BpZu76AC.js → km-KH-HSX4SM5Z-DU2YQt8I.js} +1 -1
  169. package/dist-embed/chunks/{ko-KR-MTYHY66A-C5JZPTHd.js → ko-KR-MTYHY66A-CQruDlRn.js} +1 -1
  170. package/dist-embed/chunks/{ku-TR-6OUDTVRD-BUaf6TOB.js → ku-TR-6OUDTVRD-DoySMeIi.js} +1 -1
  171. package/dist-embed/chunks/{layout-C8INuwYa.js → layout-CJFemkl6.js} +1 -1
  172. package/dist-embed/chunks/{layout-CEbgEIwd.js → layout-DbdaqszO.js} +1 -1
  173. package/dist-embed/chunks/{lexicalHooks-DFMSPigW.js → lexicalHooks-Pqoe8h_O.js} +1 -1
  174. package/dist-embed/chunks/{lt-LT-XHIRWOB4-CuGmKRQr.js → lt-LT-XHIRWOB4-72Vmr8iW.js} +1 -1
  175. package/dist-embed/chunks/{lv-LV-5QDEKY6T-EYERw_NP.js → lv-LV-5QDEKY6T-CxtO97qO.js} +1 -1
  176. package/dist-embed/chunks/{mermaid.core-BeAq5EQp.js → mermaid.core-CAzPWd8O.js} +3 -3
  177. package/dist-embed/chunks/{mermaid.core-hzdTpjmh.js → mermaid.core-DaZxhAXO.js} +5 -5
  178. package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-iB7eW5x9.js → mindmap-definition-YA3MSWOX-D8W0sJ7P.js} +1 -1
  179. package/dist-embed/chunks/{mindmap-definition-YA3MSWOX--O06aygF.js → mindmap-definition-YA3MSWOX-DPl-uWpT.js} +1 -1
  180. package/dist-embed/chunks/{mindmap-definition-e4c1d938-DCwgMhNw.js → mindmap-definition-e4c1d938-CGXwlH4A.js} +1 -1
  181. package/dist-embed/chunks/{mr-IN-CRQNXWMA-SKx4bMeU.js → mr-IN-CRQNXWMA-BNGEl_QE.js} +1 -1
  182. package/dist-embed/chunks/{my-MM-5M5IBNSE-BG-vgEXz.js → my-MM-5M5IBNSE-4wIAMvGF.js} +1 -1
  183. package/dist-embed/chunks/{nb-NO-T6EIAALU-BbW-11AI.js → nb-NO-T6EIAALU-z-1s9yX9.js} +1 -1
  184. package/dist-embed/chunks/{nl-NL-IS3SIHDZ-CSKGpuSJ.js → nl-NL-IS3SIHDZ-CYKGEVB8.js} +1 -1
  185. package/dist-embed/chunks/{nn-NO-6E72VCQL-P1tnp9TQ.js → nn-NO-6E72VCQL-DwQFIFpO.js} +1 -1
  186. package/dist-embed/chunks/{oc-FR-POXYY2M6-vpu8tuQT.js → oc-FR-POXYY2M6-mH2n3eM_.js} +1 -1
  187. package/dist-embed/chunks/{pa-IN-N4M65BXN-CIpdGll2.js → pa-IN-N4M65BXN-DbixE6jQ.js} +1 -1
  188. package/dist-embed/chunks/{pegDiagram-XKGWAZYB-Bon6jQ3L.js → pegDiagram-XKGWAZYB-D3qs3UBw.js} +1 -1
  189. package/dist-embed/chunks/{pegDiagram-XKGWAZYB-ZPizxhEX.js → pegDiagram-XKGWAZYB-DJmZupPa.js} +1 -1
  190. package/dist-embed/chunks/{percentages-BXMCSKIN-hVEpOtFm.js → percentages-BXMCSKIN-5Q9KX_WU.js} +5 -5
  191. package/dist-embed/chunks/{pieDiagram-E7YTZNPT-C0Pc9GUi.js → pieDiagram-E7YTZNPT-C58cd6s7.js} +1 -1
  192. package/dist-embed/chunks/{pieDiagram-E7YTZNPT-Di8dEHt9.js → pieDiagram-E7YTZNPT-CrZQ-dOy.js} +1 -1
  193. package/dist-embed/chunks/{pieDiagram-c941bede-C--hwbRv.js → pieDiagram-c941bede-Dn3GMx6q.js} +1 -1
  194. package/dist-embed/chunks/{pl-PL-T2D74RX3-Ckyj0Mzv.js → pl-PL-T2D74RX3-jOVonFYe.js} +1 -1
  195. package/dist-embed/chunks/{pt-BR-5N22H2LF-3jDc9_Aa.js → pt-BR-5N22H2LF-Cx4MrqgK.js} +1 -1
  196. package/dist-embed/chunks/{pt-PT-UZXXM6DQ-lhLbXf7Q.js → pt-PT-UZXXM6DQ-B2PzNwuF.js} +1 -1
  197. package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-D0QYtpIp.js → quadrantDiagram-AXDQQJYC-CJn8hkR8.js} +1 -1
  198. package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-Ffo3hgR0.js → quadrantDiagram-AXDQQJYC-haT-kxqE.js} +1 -1
  199. package/dist-embed/chunks/{quadrantDiagram-cf8b8fe0-Bqmed-0s.js → quadrantDiagram-cf8b8fe0-B3wudq14.js} +1 -1
  200. package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-BMC9Ldnh.js → railroadDiagram-O6MQD6OU-T23yIHww.js} +1 -1
  201. package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-aTc7bF4I.js → railroadDiagram-O6MQD6OU-Ty6XXjBy.js} +1 -1
  202. package/dist-embed/chunks/{renderer-CR6Lxa3d.js → renderer-Au1S-H5k.js} +1 -1
  203. package/dist-embed/chunks/{requirementDiagram-53bda41b-DExdw0ey.js → requirementDiagram-53bda41b-B-eAYQ6c.js} +1 -1
  204. package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-DBj1iVv5.js → requirementDiagram-BXWQKSXE-CgkHdmYF.js} +1 -1
  205. package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-mBFLHcqA.js → requirementDiagram-BXWQKSXE-fpBmgh7Q.js} +1 -1
  206. package/dist-embed/chunks/{ro-RO-JPDTUUEW-Dy9oeW3b.js → ro-RO-JPDTUUEW-BCQxuLcc.js} +1 -1
  207. package/dist-embed/chunks/{ru-RU-B4JR7IUQ-CK16-wfD.js → ru-RU-B4JR7IUQ-CqSiHvqj.js} +1 -1
  208. package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-9W9X5V7a.js → sankeyDiagram-P5KCCOFB-DEGMK43Q.js} +1 -1
  209. package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-DzaadHXz.js → sankeyDiagram-P5KCCOFB-hDbZE81L.js} +1 -1
  210. package/dist-embed/chunks/{sankeyDiagram-c3ef121a-B6u8wnkU.js → sankeyDiagram-c3ef121a-O14jOeqO.js} +1 -1
  211. package/dist-embed/chunks/{sequenceDiagram-82a5b84f-Bq8bvLh8.js → sequenceDiagram-82a5b84f-BFFzLElQ.js} +1 -1
  212. package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-BNfJw8_y.js → sequenceDiagram-WJ2MYXX4-MrC4K4SC.js} +1 -1
  213. package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-B76NTf4c.js → sequenceDiagram-WJ2MYXX4-wongMGVN.js} +1 -1
  214. package/dist-embed/chunks/{sessions-XxjScqnJ.js → sessions-BRALW9Yv.js} +1 -1
  215. package/dist-embed/chunks/{si-LK-N5RQ5JYF-AJdaUbzl.js → si-LK-N5RQ5JYF-Dbgk5YHt.js} +1 -1
  216. package/dist-embed/chunks/{sizeCapture-INFHLROL-KZBUxNmb.js → sizeCapture-INFHLROL-CiOiAAo5.js} +1 -1
  217. package/dist-embed/chunks/{sizeCapture-INFHLROL-DQ5s0TIW.js → sizeCapture-INFHLROL-j4-sCda0.js} +1 -1
  218. package/dist-embed/chunks/{sk-SK-C5VTKIMK-Bk82hIVU.js → sk-SK-C5VTKIMK-OBAaNvVw.js} +1 -1
  219. package/dist-embed/chunks/{sl-SI-NN7IZMDC-DSFcvf6W.js → sl-SI-NN7IZMDC-DqLxi4IM.js} +1 -1
  220. package/dist-embed/chunks/{stateDiagram-43e79a5f-BiTTNI1Z.js → stateDiagram-43e79a5f-BZm5gFdu.js} +1 -1
  221. package/dist-embed/chunks/{stateDiagram-D77RDMKH-lndPMO3D.js → stateDiagram-D77RDMKH-D7_xyy8n.js} +1 -1
  222. package/dist-embed/chunks/{stateDiagram-D77RDMKH-D4hQpdZ2.js → stateDiagram-D77RDMKH-DXrbH1aM.js} +1 -1
  223. package/dist-embed/chunks/{stateDiagram-v2-2041ed4f-BbFiQEfG.js → stateDiagram-v2-2041ed4f-DiXOgJsK.js} +1 -1
  224. package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-pqcRT12A.js → stateDiagram-v2-MP3YSRHH-DLsY6ysL.js} +1 -1
  225. package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-C-kIBdBJ.js → stateDiagram-v2-MP3YSRHH-ngWpJn6k.js} +1 -1
  226. package/dist-embed/chunks/{styles-455b33cd-U9lx7mAf.js → styles-455b33cd-CrHizSU7.js} +1 -1
  227. package/dist-embed/chunks/{styles-f932cba9-S-lYZYdK.js → styles-f932cba9-YuCN7fSa.js} +1 -1
  228. package/dist-embed/chunks/{styles-fcc2142b-DfudfB3j.js → styles-fcc2142b-tjrOPOh4.js} +1 -1
  229. package/dist-embed/chunks/{subset-shared.chunk-f2gmZjeG.js → subset-shared.chunk-Du2agLgk.js} +1 -1
  230. package/dist-embed/chunks/{subset-worker.chunk-De1CPIQ6.js → subset-worker.chunk-BXR8pgHc.js} +1 -1
  231. package/dist-embed/chunks/{sv-SE-XGPEYMSR-BbGfLHIi.js → sv-SE-XGPEYMSR-BbgHKxhC.js} +1 -1
  232. package/dist-embed/chunks/{svgDrawCommon-148a3cd9-ClgHG0vb.js → svgDrawCommon-148a3cd9-DTqtvo5_.js} +1 -1
  233. package/dist-embed/chunks/{swimlanes-42K2YHIH-OqZ4t-07.js → swimlanes-42K2YHIH-B289Mbni.js} +1 -1
  234. package/dist-embed/chunks/{swimlanes-42K2YHIH-CjV1bdPk.js → swimlanes-42K2YHIH-B3H_wpMu.js} +1 -1
  235. package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-9twpvQtj.js → swimlanesDiagram-VR7AAH4N-D0ZHzw-_.js} +1 -1
  236. package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-BdS4NGOx.js → swimlanesDiagram-VR7AAH4N-qWg-2xN_.js} +1 -1
  237. package/dist-embed/chunks/{ta-IN-2NMHFXQM-BWMJgnI2.js → ta-IN-2NMHFXQM-0pH7gQyu.js} +1 -1
  238. package/dist-embed/chunks/{th-TH-HPSO5L25-DiP_CZXl.js → th-TH-HPSO5L25-Dvbu09CU.js} +1 -1
  239. package/dist-embed/chunks/{timeline-definition-24CTP7MA-B7uSaXDu.js → timeline-definition-24CTP7MA-DUc18SdK.js} +1 -1
  240. package/dist-embed/chunks/{timeline-definition-24CTP7MA-Cs4Bwobu.js → timeline-definition-24CTP7MA-DpMq7g2g.js} +1 -1
  241. package/dist-embed/chunks/{timeline-definition-7545f45a-CHrBluu1.js → timeline-definition-7545f45a--4ypi4BE.js} +1 -1
  242. package/dist-embed/chunks/{tr-TR-DEFEU3FU-CKMBvOkr.js → tr-TR-DEFEU3FU-B6YS3iEB.js} +1 -1
  243. package/dist-embed/chunks/{uk-UA-QMV73CPH-CQL0E0jU.js → uk-UA-QMV73CPH-DMG9vIVp.js} +1 -1
  244. package/dist-embed/chunks/{vennDiagram-4TSXK5OY-uwWpr4uC.js → vennDiagram-4TSXK5OY-CS12EGJw.js} +1 -1
  245. package/dist-embed/chunks/{vennDiagram-4TSXK5OY-CHSyRZN_.js → vennDiagram-4TSXK5OY-CvEXE1xX.js} +1 -1
  246. package/dist-embed/chunks/{vi-VN-M7AON7JQ-BpvEBNJo.js → vi-VN-M7AON7JQ-DB3ZrpeP.js} +1 -1
  247. package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-0UuvD-IO.js → wardleyDiagram-VM6X3IG4-8LfGni9_.js} +1 -1
  248. package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-zIfOyYBf.js → wardleyDiagram-VM6X3IG4-Bj02LzjH.js} +1 -1
  249. package/dist-embed/chunks/{xychartDiagram-3f383b91-ChbRPzo8.js → xychartDiagram-3f383b91-CE_OY5QR.js} +1 -1
  250. package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-hCGgyjir.js → xychartDiagram-S5SC5T6Z-BdZi5x4a.js} +1 -1
  251. package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-q9gcUSF1.js → xychartDiagram-S5SC5T6Z-DXqC0l3r.js} +1 -1
  252. package/dist-embed/chunks/{zh-CN-LNUGB5OW-DWmzAIjK.js → zh-CN-LNUGB5OW-VV-lg83H.js} +1 -1
  253. package/dist-embed/chunks/{zh-HK-E62DVLB3-CQ-xPzHX.js → zh-HK-E62DVLB3-DLoyC6Q9.js} +1 -1
  254. package/dist-embed/chunks/{zh-TW-RAJ6MFWO-DvlSTykD.js → zh-TW-RAJ6MFWO-DhFllgOW.js} +1 -1
  255. package/dist-embed/datalayer-app-main.js +54 -54
  256. package/lib/apps/apps/records.d.ts +0 -29
  257. package/lib/apps/apps/records.js +11 -34
  258. package/lib/apps/apps/threads.d.ts +2 -21
  259. package/lib/apps/apps/threads.js +0 -75
  260. package/lib/apps/embed/embedSession.d.ts +0 -8
  261. package/lib/apps/embed/embedSession.js +1 -38
  262. package/lib/apps/embed/visitorApp.d.ts +23 -4
  263. package/lib/apps/embed/visitorApp.js +43 -5
  264. package/lib/apps/plugins/chat/ChatView.js +15 -3
  265. package/lib/chat/ChatFloating.js +4 -1
  266. package/lib/chat/base/ChatBase.js +12 -4
  267. package/lib/chat/base/fullContextMessages.js +1 -1
  268. package/lib/chat/prompt/InputPrompt.d.ts +6 -1
  269. package/lib/chat/prompt/InputPrompt.js +12 -2
  270. package/lib/hooks/useAgUi.js +1 -1
  271. package/lib/hooks/useToolApprovals.d.ts +1 -1
  272. package/lib/hooks/useToolApprovals.js +1 -1
  273. package/lib/{protocols → portable}/agUiRefusal.d.ts +1 -1
  274. package/lib/{protocols → portable}/agUiRefusal.js +1 -1
  275. package/lib/portable/agui.d.ts +72 -0
  276. package/lib/portable/agui.js +174 -0
  277. package/lib/portable/conversation.d.ts +124 -0
  278. package/lib/portable/conversation.js +357 -0
  279. package/lib/portable/index.d.ts +11 -6
  280. package/lib/portable/index.js +14 -11
  281. package/lib/portable/records.d.ts +27 -0
  282. package/lib/portable/records.js +46 -0
  283. package/lib/portable/sessions.d.ts +92 -0
  284. package/lib/portable/sessions.js +134 -0
  285. package/lib/portable/thread.d.ts +41 -0
  286. package/lib/portable/thread.js +102 -0
  287. package/lib/protocols/AGUIAdapter.d.ts +0 -2
  288. package/lib/protocols/AGUIAdapter.js +39 -74
  289. package/lib/voice/ComposerVoice.d.ts +15 -2
  290. package/lib/voice/ComposerVoice.js +23 -17
  291. package/lib/voice/VoiceMenu.d.ts +27 -0
  292. package/lib/voice/VoiceMenu.js +32 -0
  293. package/lib/voice/chatVoice.js +2 -2
  294. package/lib/voice/choices.d.ts +33 -0
  295. package/lib/voice/choices.js +70 -0
  296. package/lib/voice/index.d.ts +4 -0
  297. package/lib/voice/index.js +3 -0
  298. package/lib/voice/settings.d.ts +17 -1
  299. package/lib/voice/settings.js +64 -1
  300. package/lib/voice/useVoiceSettings.d.ts +6 -0
  301. package/lib/voice/useVoiceSettings.js +25 -0
  302. package/package.json +1 -1
  303. package/dist-embed/chunks/ChatView-C2La9033.js +0 -32
  304. /package/lib/{utils → portable}/approvals.d.ts +0 -0
  305. /package/lib/{utils → portable}/approvals.js +0 -0
@@ -0,0 +1,357 @@
1
+ /*
2
+ * Copyright (c) 2025-2026 Datalayer, Inc.
3
+ * Distributed under the terms of the Modified BSD License.
4
+ */
5
+ /**
6
+ * A conversation as a run stream builds it, for a client that draws it
7
+ * natively (Datalayer Mobile): one pure reducer over the AG-UI events of an
8
+ * application's session or an agent's run, and the person's own actions.
9
+ *
10
+ * It reads the stream as the web chat reads it — `TEXT_MESSAGE_*` into one
11
+ * message streamed in place, `TOOL_CALL_*` into a collapsed row whose result
12
+ * is read by `toolResultOf`, `STEP_*` into a step row, a `MESSAGES_SNAPSHOT`
13
+ * through `messagesOfThread`, a `reactor.ui` op on the run refused — and adds
14
+ * what a session says besides: `loop.session`, the question its application
15
+ * asks (`RUN_FINISHED` with `result.asking`, LOOP `loop.ask`), and a turn
16
+ * that ended without words said by how it ended (`answered`, `stopped`,
17
+ * `gone`).
18
+ *
19
+ * Bounded: a long tool run cannot grow it without end. Each tool's arguments
20
+ * and result keep their first `TOOL_TEXT_LIMIT` characters, an answer its
21
+ * first `MESSAGE_TEXT_LIMIT`, the conversation its last `ITEM_LIMIT` rows
22
+ * (`dropped` counts the rest), and an event it does not draw is kept only as
23
+ * its type and name, the last `DIAGNOSTIC_LIMIT` of them — never its payload.
24
+ *
25
+ * @module portable/conversation
26
+ */
27
+ import { REACTOR_UI_NAME, toolResultOf, UI_ON_RUN, } from './agui';
28
+ import { RUN_END_WORDS } from './records';
29
+ import { messagesOfThread } from './thread';
30
+ /** How many rows a conversation keeps: its newest. */
31
+ export const ITEM_LIMIT = 400;
32
+ /** How many characters of an answer are kept. */
33
+ export const MESSAGE_TEXT_LIMIT = 100_000;
34
+ /** How many characters of a tool's arguments, and of its result, are kept. */
35
+ export const TOOL_TEXT_LIMIT = 4_000;
36
+ /** How many events it does not draw are kept, by type and name. */
37
+ export const DIAGNOSTIC_LIMIT = 50;
38
+ /** What is said after a text cut at its limit. */
39
+ export const CUT_MARK = '… (cut: too long to keep on this device)';
40
+ /** A conversation with nothing in it yet. */
41
+ export const emptyConversation = () => ({
42
+ items: [],
43
+ running: false,
44
+ session: null,
45
+ asking: null,
46
+ dropped: 0,
47
+ diagnostics: [],
48
+ turnRows: 0,
49
+ });
50
+ const text = (value) => typeof value === 'string' ? value : '';
51
+ const cut = (value, limit) => value.length > limit ? `${value.slice(0, limit)}${CUT_MARK}` : value;
52
+ /** Text appended to what is kept, never past its limit. */
53
+ const appended = (kept, delta, limit) => {
54
+ if (kept.endsWith(CUT_MARK)) {
55
+ return kept;
56
+ }
57
+ return cut(kept + delta, limit);
58
+ };
59
+ /** A result in words. */
60
+ function said(result) {
61
+ if (result === undefined || result === null) {
62
+ return '';
63
+ }
64
+ return typeof result === 'string' ? result : JSON.stringify(result);
65
+ }
66
+ /** The question an application asks, as `RUN_FINISHED`'s `result.asking` or a session says it. */
67
+ export function questionOf(raw) {
68
+ if (!raw || typeof raw !== 'object') {
69
+ return null;
70
+ }
71
+ const asked = raw;
72
+ const kind = asked.kind;
73
+ if (kind !== 'text' &&
74
+ kind !== 'choice' &&
75
+ kind !== 'form' &&
76
+ kind !== 'file') {
77
+ throw new Error(`The application asks something no client knows: ${String(kind)}.`);
78
+ }
79
+ const strings = (value) => Array.isArray(value)
80
+ ? value.filter((item) => typeof item === 'string')
81
+ : [];
82
+ const schema = asked.schema;
83
+ return {
84
+ kind,
85
+ prompt: text(asked.prompt),
86
+ options: strings(asked.options),
87
+ schema: schema && typeof schema === 'object' && !Array.isArray(schema)
88
+ ? schema
89
+ : null,
90
+ accept: strings(asked.accept),
91
+ };
92
+ }
93
+ function withItems(state, items, added = 0) {
94
+ const over = items.length - ITEM_LIMIT;
95
+ return {
96
+ ...state,
97
+ items: over > 0 ? items.slice(over) : items,
98
+ dropped: state.dropped + Math.max(0, over),
99
+ turnRows: state.turnRows + added,
100
+ };
101
+ }
102
+ function changed(state, id, change) {
103
+ const at = state.items.findIndex(item => item.id === id);
104
+ if (at < 0) {
105
+ return null;
106
+ }
107
+ const items = state.items.slice();
108
+ items[at] = change(items[at]);
109
+ return { ...state, items };
110
+ }
111
+ function noted(state, event) {
112
+ const entry = {
113
+ type: event.type,
114
+ name: text(event.name) || text(event.activityType),
115
+ };
116
+ return {
117
+ ...state,
118
+ diagnostics: [...state.diagnostics, entry].slice(-DIAGNOSTIC_LIMIT),
119
+ };
120
+ }
121
+ let rowCount = 0;
122
+ const rowId = (prefix) => `${prefix}-${Date.now().toString(36)}-${(rowCount += 1)}`;
123
+ /** The person's prompt, added before it is sent: its own row. */
124
+ export function withPrompt(state, id, words) {
125
+ return withItems({ ...state, asking: null }, [
126
+ ...state.items,
127
+ { kind: 'message', id, role: 'user', text: words, streaming: false },
128
+ ]);
129
+ }
130
+ /**
131
+ * The turn ended without the stream saying so: the person stopped it
132
+ * (`stopped`), or its client went before the answer (`gone`). What streamed
133
+ * stops streaming; a turn that said nothing is said by how it ended.
134
+ */
135
+ export function withTurnEnded(state, end) {
136
+ const items = state.items.map(item => item.kind === 'message' && item.streaming
137
+ ? { ...item, streaming: false }
138
+ : item.kind === 'tool' && item.status === 'running'
139
+ ? { ...item, status: 'error', error: RUN_END_WORDS[end] }
140
+ : item.kind === 'step' && item.status === 'running'
141
+ ? { ...item, status: 'complete' }
142
+ : item);
143
+ const ended = { ...state, items, running: false };
144
+ return withItems(ended, [
145
+ ...items,
146
+ { kind: 'end', id: rowId('end'), end, words: RUN_END_WORDS[end] },
147
+ ]);
148
+ }
149
+ /** A failure said in the conversation (a refusal, a stream cut short): the turn stops with it. */
150
+ export function withError(state, words) {
151
+ const items = state.items.map(item => item.kind === 'message' && item.streaming
152
+ ? { ...item, streaming: false }
153
+ : item.kind === 'tool' && item.status === 'running'
154
+ ? { ...item, status: 'error' }
155
+ : item.kind === 'step' && item.status === 'running'
156
+ ? { ...item, status: 'complete' }
157
+ : item);
158
+ return withItems({ ...state, running: false }, [
159
+ ...items,
160
+ { kind: 'error', id: rowId('error'), text: words },
161
+ ]);
162
+ }
163
+ /** A conversation with one more event of its stream. */
164
+ export function reduceConversation(state, event) {
165
+ switch (event.type) {
166
+ case 'RUN_STARTED':
167
+ return { ...state, running: true, asking: null, turnRows: 0 };
168
+ case 'TEXT_MESSAGE_START': {
169
+ const id = text(event.messageId) || rowId('message');
170
+ if (state.items.some(item => item.id === id)) {
171
+ return state;
172
+ }
173
+ const role = event.role === 'user' ? 'user' : 'assistant';
174
+ return withItems(state, [
175
+ ...state.items,
176
+ { kind: 'message', id, role, text: '', streaming: true },
177
+ ], 1);
178
+ }
179
+ case 'TEXT_MESSAGE_CONTENT':
180
+ case 'TEXT_MESSAGE_CHUNK': {
181
+ const delta = text(event.delta);
182
+ const id = text(event.messageId);
183
+ const grown = changed(state, id, item => item.kind === 'message'
184
+ ? { ...item, text: appended(item.text, delta, MESSAGE_TEXT_LIMIT) }
185
+ : item);
186
+ if (grown) {
187
+ return grown;
188
+ }
189
+ return withItems(state, [
190
+ ...state.items,
191
+ {
192
+ kind: 'message',
193
+ id: id || rowId('message'),
194
+ role: event.role === 'user' ? 'user' : 'assistant',
195
+ text: cut(delta, MESSAGE_TEXT_LIMIT),
196
+ streaming: event.type === 'TEXT_MESSAGE_CONTENT',
197
+ },
198
+ ], 1);
199
+ }
200
+ case 'TEXT_MESSAGE_END':
201
+ return (changed(state, text(event.messageId), item => item.kind === 'message' ? { ...item, streaming: false } : item) ?? state);
202
+ case 'TOOL_CALL_START': {
203
+ const id = text(event.toolCallId) || rowId('tool');
204
+ if (state.items.some(item => item.id === id)) {
205
+ return state;
206
+ }
207
+ return withItems(state, [
208
+ ...state.items,
209
+ {
210
+ kind: 'tool',
211
+ id,
212
+ name: text(event.toolCallName) || text(event.name),
213
+ args: '',
214
+ status: 'running',
215
+ result: '',
216
+ error: '',
217
+ },
218
+ ], 1);
219
+ }
220
+ case 'TOOL_CALL_ARGS':
221
+ return (changed(state, text(event.toolCallId), item => item.kind === 'tool'
222
+ ? {
223
+ ...item,
224
+ args: appended(item.args, text(event.delta), TOOL_TEXT_LIMIT),
225
+ }
226
+ : item) ?? state);
227
+ case 'TOOL_CALL_END':
228
+ return state;
229
+ case 'TOOL_CALL_RESULT': {
230
+ const result = toolResultOf(event.content);
231
+ return (changed(state, text(event.toolCallId), item => item.kind === 'tool'
232
+ ? {
233
+ ...item,
234
+ status: result.success ? 'complete' : 'error',
235
+ result: cut(said(result.result), TOOL_TEXT_LIMIT),
236
+ error: result.error ?? '',
237
+ }
238
+ : item) ?? noted(state, event));
239
+ }
240
+ case 'STEP_STARTED': {
241
+ const name = text(event.stepName) || text(event.name);
242
+ return withItems(state, [
243
+ ...state.items,
244
+ { kind: 'step', id: rowId('step'), name, status: 'running' },
245
+ ], 1);
246
+ }
247
+ case 'STEP_FINISHED': {
248
+ const name = text(event.stepName) || text(event.name);
249
+ const at = state.items
250
+ .map((item, index) => ({ item, index }))
251
+ .reverse()
252
+ .find(({ item }) => item.kind === 'step' &&
253
+ item.name === name &&
254
+ item.status === 'running');
255
+ if (!at) {
256
+ return noted(state, event);
257
+ }
258
+ const items = state.items.slice();
259
+ items[at.index] = {
260
+ ...at.item,
261
+ status: 'complete',
262
+ };
263
+ return { ...state, items };
264
+ }
265
+ case 'MESSAGES_SNAPSHOT': {
266
+ const messages = messagesOfThread(event.messages);
267
+ return withItems({ ...state, dropped: 0 }, messages.map(message => ({
268
+ kind: 'message',
269
+ id: message.id,
270
+ role: message.role === 'user'
271
+ ? 'user'
272
+ : 'assistant',
273
+ text: cut(typeof message.content === 'string' ? message.content : '', MESSAGE_TEXT_LIMIT),
274
+ streaming: false,
275
+ })),
276
+ // The conversation said again is what this turn says (a resume):
277
+ // never also said as a wordless answer.
278
+ 1);
279
+ }
280
+ case 'CUSTOM': {
281
+ if (event.name === REACTOR_UI_NAME) {
282
+ return withError(state, UI_ON_RUN);
283
+ }
284
+ if (event.name === 'loop.session' &&
285
+ event.value &&
286
+ typeof event.value === 'object') {
287
+ const session = event.value;
288
+ return {
289
+ ...state,
290
+ session,
291
+ asking: questionOf(session.asking) ?? state.asking,
292
+ };
293
+ }
294
+ return noted(state, event);
295
+ }
296
+ case 'ACTIVITY_SNAPSHOT':
297
+ case 'ACTIVITY_DELTA':
298
+ if (event.activityType === REACTOR_UI_NAME) {
299
+ return withError(state, UI_ON_RUN);
300
+ }
301
+ return noted(state, event);
302
+ case 'RUN_FINISHED': {
303
+ const result = event.result && typeof event.result === 'object'
304
+ ? event.result
305
+ : {};
306
+ const asking = questionOf(result.asking);
307
+ const items = state.items.map(item => item.kind === 'message' && item.streaming
308
+ ? { ...item, streaming: false }
309
+ : item);
310
+ const finished = { ...state, items, running: false, asking };
311
+ if (asking || state.turnRows > 0) {
312
+ return finished;
313
+ }
314
+ // Answered without a word: said by how it ended (RUN_END_WORDS).
315
+ return withItems(finished, [
316
+ ...items,
317
+ {
318
+ kind: 'end',
319
+ id: rowId('end'),
320
+ end: 'answered',
321
+ words: RUN_END_WORDS.answered,
322
+ },
323
+ ]);
324
+ }
325
+ case 'RUN_ERROR':
326
+ return withError(state, text(event.message) || 'Run failed');
327
+ default:
328
+ return noted(state, event);
329
+ }
330
+ }
331
+ /** The question in words with what answers it, for a screen reader or a row. */
332
+ export function questionWords(question) {
333
+ switch (question.kind) {
334
+ case 'choice':
335
+ return `${question.prompt} (${question.options.join(' or ')})`;
336
+ case 'file':
337
+ return `${question.prompt} (a file: ${question.accept.join(', ') || 'any file'})`;
338
+ default:
339
+ return question.prompt;
340
+ }
341
+ }
342
+ /** The fields a form question asks, in order, with their titles: what a native form draws. */
343
+ export function formFieldsOf(schema) {
344
+ const properties = schema?.properties && typeof schema.properties === 'object'
345
+ ? schema.properties
346
+ : {};
347
+ const required = Array.isArray(schema?.required)
348
+ ? schema?.required
349
+ : [];
350
+ return Object.entries(properties).map(([name, field]) => ({
351
+ name,
352
+ title: text(field?.title) || name,
353
+ type: text(field?.type) || 'string',
354
+ options: Array.isArray(field?.enum) ? field.enum.map(String) : [],
355
+ required: required.includes(name),
356
+ }));
357
+ }
@@ -1,11 +1,16 @@
1
1
  /**
2
2
  * What any JavaScript runtime can import from Agent Runtimes: no React, DOM,
3
- * Jupyter or Node built-in. Re-exports only; the mobile app reaches Agent
4
- * Runtimes through this entry alone.
3
+ * Jupyter, Reactor or Node module. Every module it reaches at run time lives
4
+ * in this folder (a test holds it to that), so that Datalayer Mobile's Metro
5
+ * graph takes `lib/portable/*` and nothing else of Agent Runtimes.
5
6
  *
6
7
  * @module portable
7
8
  */
8
- export { messageOfApproval, normalizeApproval, whyAsked, type ApprovalArgs, type ApprovalRecord, type MessageAsked, } from '../utils/approvals';
9
- export { AGUIAdapter, type AGUIAdapterConfig } from '../protocols/AGUIAdapter';
10
- export { createActivityMessage, createAssistantMessage, createUserMessage, generateMessageId, type ChatMessage, type ChatMessageDelta, type ChatMessageInput, type ChatThread, type ContentPart, type MessageRole, type ToolCallStatus, } from '../types/messages';
11
- export type { ProtocolAdapterConfig, ProtocolConnectionState, ProtocolEvent, ProtocolEventHandler, } from '../types/protocol';
9
+ export { messageOfApproval, normalizeApproval, whyAsked, type ApprovalArgs, type ApprovalRecord, type MessageAsked, } from './approvals';
10
+ export { AgUiFrames, endsRun, eventsOfStream, NOT_STREAMING, REACTOR_UI_NAME, readRunStream, RUN_CUT_SHORT, toolResultOf, UI_ON_RUN, type AgUiEvent, type ToolResultSaid, } from './agui';
11
+ export { AG_UI_NOT_ALLOWED, AG_UI_NOT_ON_RUNTIME, agUiRefusal, refusalBody, refusalDetail, } from './agUiRefusal';
12
+ export { ASKED_FOR_TAG, askedOf, RUN_END_WORDS } from './records';
13
+ export { messagesOfThread, openThread, snapshotOfStream, THREAD_WORDS, } from './thread';
14
+ export { CUT_MARK, DIAGNOSTIC_LIMIT, emptyConversation, formFieldsOf, ITEM_LIMIT, MESSAGE_TEXT_LIMIT, questionOf, questionWords, reduceConversation, TOOL_TEXT_LIMIT, withError, withPrompt, withTurnEnded, type ConversationItem, type ConversationQuestion, type ConversationState, type TurnEnd, } from './conversation';
15
+ export { agentRunClient, agentRuntimesUrlOf, appSessionsClient, RuntimeRefusal, type AgentRunClient, type AgentTurn, type AppSessionsClient, type RuntimeClientOptions, type SessionStart, type StreamOptions, } from './sessions';
16
+ export type { ChatMessage } from '../types/messages';
@@ -2,19 +2,22 @@
2
2
  * Copyright (c) 2025-2026 Datalayer, Inc.
3
3
  * Distributed under the terms of the Modified BSD License.
4
4
  */
5
- /*
6
- * Copyright (c) 2026 Datalayer, Inc.
7
- * Distributed under the terms of the Modified BSD License.
8
- */
9
5
  /**
10
6
  * What any JavaScript runtime can import from Agent Runtimes: no React, DOM,
11
- * Jupyter or Node built-in. Re-exports only; the mobile app reaches Agent
12
- * Runtimes through this entry alone.
7
+ * Jupyter, Reactor or Node module. Every module it reaches at run time lives
8
+ * in this folder (a test holds it to that), so that Datalayer Mobile's Metro
9
+ * graph takes `lib/portable/*` and nothing else of Agent Runtimes.
13
10
  *
14
11
  * @module portable
15
12
  */
16
- export { messageOfApproval, normalizeApproval, whyAsked, } from '../utils/approvals';
17
- // The AG-UI stream client and the messages it builds; a phone passes a
18
- // streaming `fetch` in the adapter's config.
19
- export { AGUIAdapter } from '../protocols/AGUIAdapter';
20
- export { createActivityMessage, createAssistantMessage, createUserMessage, generateMessageId, } from '../types/messages';
13
+ export { messageOfApproval, normalizeApproval, whyAsked, } from './approvals';
14
+ // A run's stream, read as every client reads it.
15
+ export { AgUiFrames, endsRun, eventsOfStream, NOT_STREAMING, REACTOR_UI_NAME, readRunStream, RUN_CUT_SHORT, toolResultOf, UI_ON_RUN, } from './agui';
16
+ export { AG_UI_NOT_ALLOWED, AG_UI_NOT_ON_RUNTIME, agUiRefusal, refusalBody, refusalDetail, } from './agUiRefusal';
17
+ // The record's words, and a person's conversation read again.
18
+ export { ASKED_FOR_TAG, askedOf, RUN_END_WORDS } from './records';
19
+ export { messagesOfThread, openThread, snapshotOfStream, THREAD_WORDS, } from './thread';
20
+ // A conversation as its stream builds it, for a native client.
21
+ export { CUT_MARK, DIAGNOSTIC_LIMIT, emptyConversation, formFieldsOf, ITEM_LIMIT, MESSAGE_TEXT_LIMIT, questionOf, questionWords, reduceConversation, TOOL_TEXT_LIMIT, withError, withPrompt, withTurnEnded, } from './conversation';
22
+ // The runtime's routes a native client drives.
23
+ export { agentRunClient, agentRuntimesUrlOf, appSessionsClient, RuntimeRefusal, } from './sessions';
@@ -0,0 +1,27 @@
1
+ /**
2
+ * The words of an application's record that every client shows the same:
3
+ * how a run ended, and what a person asked without what the runtime told the
4
+ * application before their words. Read by the web's record feed
5
+ * (`apps/apps/records`), the chat and Datalayer Mobile.
6
+ *
7
+ * @module portable/records
8
+ */
9
+ /**
10
+ * How a run ended, in the `output` entry every run ends with, kept whatever
11
+ * the application's `record.include` says (PAP_DATALAYER R-01): its words
12
+ * only when it keeps `outputs`.
13
+ */
14
+ export declare const RUN_END_WORDS: Record<string, string>;
15
+ /**
16
+ * The mark around what the runtime tells an application of a turn a personal
17
+ * agent asked over PAP or PACT, before the request (`asked_for_said`,
18
+ * `ASKED_FOR_TAG` in agent_runtimes.loop.apps.pap_company).
19
+ */
20
+ export declare const ASKED_FOR_TAG = "asked-for";
21
+ /**
22
+ * What a person asked, as they are shown it: without what the runtime told
23
+ * the application before their words (PAP_DATALAYER, decided 2026-10-14).
24
+ * The record keeps it for the application's builder; the person never wrote
25
+ * it, so *Your conversations* and a thread opened again leave it out.
26
+ */
27
+ export declare function askedOf(text: string): string;
@@ -0,0 +1,46 @@
1
+ /*
2
+ * Copyright (c) 2025-2026 Datalayer, Inc.
3
+ * Distributed under the terms of the Modified BSD License.
4
+ */
5
+ /**
6
+ * The words of an application's record that every client shows the same:
7
+ * how a run ended, and what a person asked without what the runtime told the
8
+ * application before their words. Read by the web's record feed
9
+ * (`apps/apps/records`), the chat and Datalayer Mobile.
10
+ *
11
+ * @module portable/records
12
+ */
13
+ /**
14
+ * How a run ended, in the `output` entry every run ends with, kept whatever
15
+ * the application's `record.include` says (PAP_DATALAYER R-01): its words
16
+ * only when it keeps `outputs`.
17
+ */
18
+ export const RUN_END_WORDS = {
19
+ answered: 'Answered',
20
+ stopped: 'Stopped',
21
+ gone: 'Its client went before the answer',
22
+ };
23
+ /**
24
+ * The mark around what the runtime tells an application of a turn a personal
25
+ * agent asked over PAP or PACT, before the request (`asked_for_said`,
26
+ * `ASKED_FOR_TAG` in agent_runtimes.loop.apps.pap_company).
27
+ */
28
+ export const ASKED_FOR_TAG = 'asked-for';
29
+ /**
30
+ * What a person asked, as they are shown it: without what the runtime told
31
+ * the application before their words (PAP_DATALAYER, decided 2026-10-14).
32
+ * The record keeps it for the application's builder; the person never wrote
33
+ * it, so *Your conversations* and a thread opened again leave it out.
34
+ */
35
+ export function askedOf(text) {
36
+ const open = `<${ASKED_FOR_TAG}>`;
37
+ const close = `</${ASKED_FOR_TAG}>`;
38
+ if (!text.startsWith(open)) {
39
+ return text;
40
+ }
41
+ const end = text.indexOf(close);
42
+ if (end < 0) {
43
+ throw new Error(`What was asked opens <${ASKED_FOR_TAG}> and never closes it.`);
44
+ }
45
+ return text.slice(end + close.length).trimStart();
46
+ }
@@ -0,0 +1,92 @@
1
+ /**
2
+ * The clients a native app talks to a runtime with: an application's
3
+ * sessions (`/api/v1/apps/sessions`, the Session API) and a standalone agent's
4
+ * AG-UI mount (`/api/v1/ag-ui/{agent}/`). Each streaming route's events are
5
+ * handed to `onEvent` as they arrive (`readRunStream`); a refusal is thrown
6
+ * as a `RuntimeRefusal` with its status and the runtime's own sentence.
7
+ *
8
+ * Nothing is read from a page: the runtime's address, the token and a
9
+ * `fetch` that streams are given (`{ baseUrl, getAccessToken, fetch }`).
10
+ *
11
+ * @module portable/sessions
12
+ */
13
+ import type { ChatMessage } from '../types/messages';
14
+ import { type AgUiEvent } from './agui';
15
+ /** Where a runtime is, and as whom it is asked. */
16
+ export type RuntimeClientOptions = {
17
+ /** The runtime's agent-runtimes address (`…/agent-runtimes/<runtime>`). */
18
+ baseUrl: string;
19
+ getAccessToken: () => string | undefined;
20
+ /** A `fetch` whose response body streams. */
21
+ fetch: typeof fetch;
22
+ };
23
+ /** A streaming request's listener and its cancellation. */
24
+ export type StreamOptions = {
25
+ onEvent: (event: AgUiEvent) => void;
26
+ signal?: AbortSignal;
27
+ };
28
+ /** A route that refused: its status and the runtime's sentence. */
29
+ export declare class RuntimeRefusal extends Error {
30
+ readonly status: number;
31
+ constructor(status: number, message: string);
32
+ }
33
+ /** What starting a session names: the application's agent and what it runs. */
34
+ export type SessionStart = {
35
+ /** The agent the runtime made for the application. */
36
+ agent: string;
37
+ deploymentUid?: string;
38
+ appUid?: string;
39
+ version?: number;
40
+ /** The first message. */
41
+ opener: string;
42
+ /** The session's uid, when the client chose it. */
43
+ session?: string;
44
+ };
45
+ /**
46
+ * An application's sessions on the runtime that runs it: start, message,
47
+ * settings, resume (streamed), and stop, end, read (JSON).
48
+ */
49
+ export declare function appSessionsClient(options: RuntimeClientOptions): {
50
+ /** Start a session with its first message. */
51
+ start: (start: SessionStart, streaming: StreamOptions) => Promise<void>;
52
+ /** The next turn, or the answer to what the application asked (text, a choice). */
53
+ message: (uid: string, text: string, streaming: StreamOptions) => Promise<void>;
54
+ /** A settings change: also what answers a form the application asked. */
55
+ changeSettings: (uid: string, values: Record<string, unknown>, streaming: StreamOptions) => Promise<void>;
56
+ /** Resume a stopped session — or, with its agent, one the runtime no longer holds, from its record. */
57
+ resume: (uid: string, agent: string, streaming: StreamOptions) => Promise<void>;
58
+ /** Stop: what runs is cancelled; the session waits to be resumed. */
59
+ stop: (uid: string) => Promise<Record<string, unknown>>;
60
+ /** End the conversation for good; its record stays. */
61
+ end: (uid: string) => Promise<Record<string, unknown>>;
62
+ /** What the session is: its state (`open`, `running`, `waiting`, `stopped`) and what it asks. */
63
+ describe: (uid: string) => Promise<Record<string, unknown>>;
64
+ /** Its conversation as a person reads it (`messagesOfThread`). */
65
+ messages: (uid: string) => Promise<ChatMessage[]>;
66
+ };
67
+ export type AppSessionsClient = ReturnType<typeof appSessionsClient>;
68
+ /** One turn of a conversation, as an agent's AG-UI run is sent it. */
69
+ export type AgentTurn = {
70
+ id: string;
71
+ role: 'user' | 'assistant';
72
+ content: string;
73
+ };
74
+ /**
75
+ * A standalone agent over its AG-UI mount: a run carries the conversation so
76
+ * far, and stopping it terminates the thread's run on the runtime. A raw
77
+ * agent has no session, record or question of an application's.
78
+ */
79
+ export declare function agentRunClient(options: RuntimeClientOptions & {
80
+ agent: string;
81
+ }): {
82
+ run: (threadId: string, runId: string, messages: AgentTurn[], streaming: StreamOptions) => Promise<void>;
83
+ /** Stop the thread's run on the runtime (`POST /api/v1/ag-ui/terminate`). */
84
+ terminate: (threadId: string) => Promise<void>;
85
+ };
86
+ export type AgentRunClient = ReturnType<typeof agentRunClient>;
87
+ /**
88
+ * A runtime's agent-runtimes address from its ingress, as the runtimes
89
+ * service gives it (`…/jupyter/server/<runtime>` → `…/agent-runtimes/<runtime>`,
90
+ * `build_agent_runtimes_base_url`). Refused when there is none.
91
+ */
92
+ export declare function agentRuntimesUrlOf(ingress: string): string;