@datalayer/agent-runtimes 1.5.21 → 1.5.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-embed/chunks/{AgentDetails-C7tCazwB.js → AgentDetails-Xvq2IvHg.js} +1 -1
- package/dist-embed/chunks/{AgentDetailsDialog-Cwps4GeH.js → AgentDetailsDialog-DmtKB_5z.js} +1 -1
- package/dist-embed/chunks/{AgentInspector-Gk7jbg8t.js → AgentInspector-EiBHJgc9.js} +1 -1
- package/dist-embed/chunks/{AgentInspectorDialog-BSSDOFrT.js → AgentInspectorDialog-3fbLXnLP.js} +1 -1
- package/dist-embed/chunks/{CellSidebarExtension-p2BAkwis.js → CellSidebarExtension-CDnzN9Cb.js} +8 -8
- package/dist-embed/chunks/ChatView-BjZ993Ch.js +32 -0
- package/dist-embed/chunks/{ContextPie-bd_YOjzP.js → ContextPie-DdsXl5s7.js} +1 -1
- package/dist-embed/chunks/{DeckComponent-4gxuEH4A.js → DeckComponent-Cb4_dZpN.js} +2 -2
- package/dist-embed/chunks/{DocumentView-BZSYqTh_.js → DocumentView-Caxb2xz-.js} +1 -1
- package/dist-embed/chunks/{EphemeralDocument-Cevnk5OF.js → EphemeralDocument-DIHjR5l8.js} +1 -1
- package/dist-embed/chunks/{EphemeralNotebook-JvALIbK2.js → EphemeralNotebook-1Rwa3anx.js} +1 -1
- package/dist-embed/chunks/{ExcalidrawComponent-CbghNk-F.js → ExcalidrawComponent-vJQwgcUt.js} +1 -1
- package/dist-embed/chunks/{ExcalidrawModal-BOVvWzYQ.js → ExcalidrawModal-BDgjdSz2.js} +1 -1
- package/dist-embed/chunks/{JupyterLexicalExtension-CRccZ2h7.js → JupyterLexicalExtension-_7FM5Om8.js} +28 -28
- package/dist-embed/chunks/{KernelVariables-ompObBEM.js → KernelVariables-CKIqy599.js} +1 -1
- package/dist-embed/chunks/{LexicalToolRegistry-BlBEZPP4.js → LexicalToolRegistry-8wJyLumb.js} +1 -1
- package/dist-embed/chunks/{NotebookToolSurfaces-DP8sWqVy.js → NotebookToolSurfaces-YAM1bvZS.js} +1 -1
- package/dist-embed/chunks/{NotebookView-DC6BDVEp.js → NotebookView-C8RCvsR1.js} +1 -1
- package/dist-embed/chunks/{Output-C4hBhZ5k.js → Output-BWClePP-.js} +1 -1
- package/dist-embed/chunks/{SandboxDetailsDialog-CX8wvCLJ.js → SandboxDetailsDialog-CDSxIC0-.js} +1 -1
- package/dist-embed/chunks/{SchemaForm-BuhXDyz6.js → SchemaForm-CO_2yGg2.js} +1 -1
- package/dist-embed/chunks/{WidgetVariableView-C2X5Ehcg.js → WidgetVariableView--osoOLv8.js} +1 -1
- package/dist-embed/chunks/{YouTubePlugin-CjgOnMCz.js → YouTubePlugin-BB7Z7INn.js} +1 -1
- package/dist-embed/chunks/{abnfDiagram-VCTEODGH-kzVu7pzT.js → abnfDiagram-VCTEODGH-faK2fyHC.js} +1 -1
- package/dist-embed/chunks/{ar-SA-G6X2FPQ2-ArgZTGSp.js → ar-SA-G6X2FPQ2-D6Ko4I2x.js} +1 -1
- package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-DVZUrWEx.js → architectureDiagram-5GKGNRK7-DBMLRsbO.js} +1 -1
- package/dist-embed/chunks/{az-AZ-76LH7QW2-DQgz6n32.js → az-AZ-76LH7QW2-B3UhxnSz.js} +1 -1
- package/dist-embed/chunks/{bg-BG-XCXSNQG7-Cx0dPt6-.js → bg-BG-XCXSNQG7-BS-QRZjB.js} +1 -1
- package/dist-embed/chunks/{blockDiagram-868be97b-DEQh5CUO.js → blockDiagram-868be97b-BXBoGds2.js} +1 -1
- package/dist-embed/chunks/{blockDiagram-I7D4REHJ-C6gbEBfg.js → blockDiagram-I7D4REHJ-BNkBA3Vb.js} +1 -1
- package/dist-embed/chunks/{bn-BD-2XOGV67Q-BkekmuYO.js → bn-BD-2XOGV67Q-DNg0uIV0.js} +1 -1
- package/dist-embed/chunks/{c4Diagram-3f4bdde3-CUcRctJE.js → c4Diagram-3f4bdde3-4OdTwU_t.js} +1 -1
- package/dist-embed/chunks/{c4Diagram-7LVT6UL2-DSQiEaxC.js → c4Diagram-7LVT6UL2-BGpBMrvl.js} +1 -1
- package/dist-embed/chunks/{ca-ES-6MX7JW3Y-Yr14RtMP.js → ca-ES-6MX7JW3Y-Bn4yHfTY.js} +1 -1
- package/dist-embed/chunks/{celltoolbartracker-Bx9x9aeh.js → celltoolbartracker-DcYHi8Du.js} +1 -1
- package/dist-embed/chunks/{chunk-2Q5K7J3B-DbzMjK_L.js → chunk-2Q5K7J3B-P4f8Cifn.js} +1 -1
- package/dist-embed/chunks/{chunk-5VM5RSS4-rEZEdbpi.js → chunk-5VM5RSS4-BVaSZr_4.js} +1 -1
- package/dist-embed/chunks/{chunk-F27PBJKO-BH7lDumP.js → chunk-F27PBJKO-C-90E7AT.js} +1 -1
- package/dist-embed/chunks/{chunk-IMKFNOWR-BA-vmq_V.js → chunk-IMKFNOWR--OZX7QCt.js} +1 -1
- package/dist-embed/chunks/{chunk-JWPE2WC7-BfRI4eJ2.js → chunk-JWPE2WC7-OHowekj4.js} +1 -1
- package/dist-embed/chunks/{chunk-POPQ4Y6H-B7pT6rUf.js → chunk-POPQ4Y6H-BgLsR3l7.js} +1 -1
- package/dist-embed/chunks/{chunk-SVP7TREG-BxpYXJab.js → chunk-SVP7TREG-kM9Erqyf.js} +1 -1
- package/dist-embed/chunks/{chunk-TICWLB2K-LCiyX33a.js → chunk-TICWLB2K-pVdCft0o.js} +1 -1
- package/dist-embed/chunks/{chunk-XXDRQBXY-islJGiCO.js → chunk-XXDRQBXY-BSfKSQ7y.js} +1 -1
- package/dist-embed/chunks/{classDiagram-ZZMXUADV-C7-Ca_nP.js → classDiagram-ZZMXUADV-Dq0Eb9fh.js} +1 -1
- package/dist-embed/chunks/{classDiagram-f62afe4f-BaJUb6H9.js → classDiagram-f62afe4f-C8j4XsQw.js} +1 -1
- package/dist-embed/chunks/{classDiagram-v2-604399ef-s6LKeK41.js → classDiagram-v2-604399ef-BVT78aGU.js} +1 -1
- package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-C7-Ca_nP.js → classDiagram-v2-VYDZK3BY-Dq0Eb9fh.js} +1 -1
- package/dist-embed/chunks/{code-block-IT6T5CEO-BieLU8ls.js → code-block-IT6T5CEO-Dbm1cj5T.js} +1 -1
- package/dist-embed/chunks/{component-p2xkjXeh.js → component-CsXw-w1P.js} +1 -1
- package/dist-embed/chunks/{cose-bilkent-JH36ORCC-BkezndW_.js → cose-bilkent-JH36ORCC-DEGpy0W8.js} +1 -1
- package/dist-embed/chunks/{createText-aed3d8b3-Dw8k7JC8.js → createText-aed3d8b3-BukHQ1P8.js} +1 -1
- package/dist-embed/chunks/{cs-CZ-2BRQDIVT-DYR-S6bD.js → cs-CZ-2BRQDIVT-DUGnyonZ.js} +1 -1
- package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-DqoI6t3s.js → cynefinDiagram-5FMLGOSQ-CnZ3wqXe.js} +1 -1
- package/dist-embed/chunks/{da-DK-5WZEPLOC-DhaHIgKI.js → da-DK-5WZEPLOC-Is8nybqO.js} +1 -1
- package/dist-embed/chunks/{dagre-GXQ25YYZ-pcAHu_bK.js → dagre-GXQ25YYZ-Dbp_O7kO.js} +1 -1
- package/dist-embed/chunks/{de-DE-XR44H4JA-CJpRH2Fy.js → de-DE-XR44H4JA-D54sMa4L.js} +1 -1
- package/dist-embed/chunks/{diagram-S7CK7UJ4-W17wgXHY.js → diagram-S7CK7UJ4-DHPFd83P.js} +1 -1
- package/dist-embed/chunks/{diagram-UQ7AKVKN-mH7QBO8y.js → diagram-UQ7AKVKN-BqXFRP10.js} +1 -1
- package/dist-embed/chunks/{diagram-VSXAHHWV-CFHqpDaB.js → diagram-VSXAHHWV-DO0toZBQ.js} +1 -1
- package/dist-embed/chunks/{diagram-VX7I27RA-DQ6XlKLw.js → diagram-VX7I27RA-Diuc1eIf.js} +1 -1
- package/dist-embed/chunks/{diagram-Z3DM3KII-Cenqf76m.js → diagram-Z3DM3KII-DtauJWd2.js} +1 -1
- package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-Cqmnghct.js → ebnfDiagram-PWID7BFC-SU3uN2_2.js} +1 -1
- package/dist-embed/chunks/{edges-b2856ca0-ChO7JKaP.js → edges-b2856ca0-DbD0XDJS.js} +1 -1
- package/dist-embed/chunks/{el-GR-BZB4AONW-DPGB1p8K.js → el-GR-BZB4AONW-CvM3SWat.js} +1 -1
- package/dist-embed/chunks/{erDiagram-5d81789a-jzhAXdZi.js → erDiagram-5d81789a-C-Tzt4MD.js} +1 -1
- package/dist-embed/chunks/{erDiagram-RLTQ6QDP-hAbP0vV0.js → erDiagram-RLTQ6QDP-C_c-qnRZ.js} +1 -1
- package/dist-embed/chunks/{es-ES-U4NZUMDT-CLztgM3g.js → es-ES-U4NZUMDT-BZDRRuRf.js} +1 -1
- package/dist-embed/chunks/{eu-ES-A7QVB2H4--ffZf65_.js → eu-ES-A7QVB2H4-DAmknI9y.js} +1 -1
- package/dist-embed/chunks/{fa-IR-HGAKTJCU-Cwwej6FC.js → fa-IR-HGAKTJCU-CQhKri4O.js} +1 -1
- package/dist-embed/chunks/{fi-FI-Z5N7JZ37-Tw-dUSxy.js → fi-FI-Z5N7JZ37-DzEDoP64.js} +1 -1
- package/dist-embed/chunks/{flowDb-185abca5-DDUaXZ_Q.js → flowDb-185abca5-Di4aD0Mg.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-1629c991-DpvDtFPK.js → flowDiagram-1629c991-fImernS2.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-HODETNUW-DENY4Bvt.js → flowDiagram-HODETNUW-DzoskzA4.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-v2-1d953310-TxFSXMN7.js → flowDiagram-v2-1d953310-P1qDfDo-.js} +1 -1
- package/dist-embed/chunks/{flowchart-elk-definition-6df44142-BGFxwidp.js → flowchart-elk-definition-6df44142-CXebTCvX.js} +1 -1
- package/dist-embed/chunks/{fr-FR-RHASNOE6-CT1NyjSV.js → fr-FR-RHASNOE6-DiSkyvEB.js} +1 -1
- package/dist-embed/chunks/{ganttDiagram-3b0b3873-DJqKtGUz.js → ganttDiagram-3b0b3873-Bupos8HO.js} +1 -1
- package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-Ddh9hVkO.js → ganttDiagram-EL5Y4UJY-e3WDalFj.js} +1 -1
- package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-B3BVHs36.js → gitGraphDiagram-WWUBYQGX-Ck49f0H9.js} +1 -1
- package/dist-embed/chunks/{gitGraphDiagram-f01e8bc2-vOvP_sU8.js → gitGraphDiagram-f01e8bc2-DM8FMetI.js} +1 -1
- package/dist-embed/chunks/{gl-ES-HMX3MZ6V-BKTaXj_2.js → gl-ES-HMX3MZ6V-3AJMzY-I.js} +1 -1
- package/dist-embed/chunks/{he-IL-6SHJWFNN-BJ5SwTG5.js → he-IL-6SHJWFNN-Cuh5an4X.js} +1 -1
- package/dist-embed/chunks/{hi-IN-IWLTKZ5I-D5ZQxogx.js → hi-IN-IWLTKZ5I-BbeuFB83.js} +1 -1
- package/dist-embed/chunks/{hu-HU-A5ZG7DT2-CoAAAzpy.js → hu-HU-A5ZG7DT2-C1OMfhob.js} +1 -1
- package/dist-embed/chunks/{id-ID-SAP4L64H-DFWbGjYj.js → id-ID-SAP4L64H-BzKILJTZ.js} +1 -1
- package/dist-embed/chunks/{index-9bae90f3-YA-Pbv-C.js → index-9bae90f3-l9tb84fw.js} +1 -1
- package/dist-embed/chunks/{index-CIDdX0nc.js → index-BFdE0KFI.js} +1 -1
- package/dist-embed/chunks/{index-Db1qHC1a.js → index-BMandbJB.js} +1 -1
- package/dist-embed/chunks/{index-BTeNnRc_.js → index-BO6VQLH6.js} +4 -4
- package/dist-embed/chunks/{index-1MXuxaax.js → index-BTnG8qrO.js} +1 -1
- package/dist-embed/chunks/{index-BVzIb3Wy.js → index-BktUM85c.js} +1 -1
- package/dist-embed/chunks/{index-BuyZwxeT.js → index-CAd5YQQl.js} +1 -1
- package/dist-embed/chunks/{index-DMf0f7ny.js → index-CFP9psRB.js} +2 -2
- package/dist-embed/chunks/{index-DPzPvDBn.js → index-CKFrz1es.js} +1 -1
- package/dist-embed/chunks/{index-DTCcg1ap.js → index-CM7xo08K.js} +1 -1
- package/dist-embed/chunks/{index-8Jy3Vws8.js → index-CPpm1tqJ.js} +6 -6
- package/dist-embed/chunks/{index-B0MhQWhs.js → index-CRZ1qthh.js} +1 -1
- package/dist-embed/chunks/{index-FbZJIbu_.js → index-CWwj0zW9.js} +1 -1
- package/dist-embed/chunks/{index-CCA_V9Td.js → index-Cu0bp_EI.js} +1 -1
- package/dist-embed/chunks/{index-BfMo5nXi.js → index-CyQgE_Es.js} +2 -2
- package/dist-embed/chunks/{index-BzQxauhZ.js → index-D4QM3qbA.js} +1 -1
- package/dist-embed/chunks/{index-D62kZnWZ.js → index-D64QvG43.js} +5 -5
- package/dist-embed/chunks/{index-JhvHCMRQ.js → index-DEjLPUAD.js} +1 -1
- package/dist-embed/chunks/{index-CkOZcvYl.js → index-DLimRfHQ.js} +1 -1
- package/dist-embed/chunks/{index-B0omKuYl.js → index-DN-cizG6.js} +1 -1
- package/dist-embed/chunks/{index-C7os26P7.js → index-DSN70XMH.js} +2 -2
- package/dist-embed/chunks/{index-CxIZHPCc.js → index-DY8mjz1l.js} +1 -1
- package/dist-embed/chunks/{index-BgWf1G8H.js → index-Dobs-OKl.js} +1 -1
- package/dist-embed/chunks/index-DyVR0igi.js +34 -0
- package/dist-embed/chunks/{index-6feFd5AZ.js → index-PqsSImlj.js} +1 -1
- package/dist-embed/chunks/{index-BNFZYAJT.js → index-SbFvdBPQ.js} +1 -1
- package/dist-embed/chunks/{index-B9vBhR-p.js → index-dYwQAVs_.js} +1 -1
- package/dist-embed/chunks/{index-DTbF6Y7O.js → index-f418CYn7.js} +1 -1
- package/dist-embed/chunks/{index-BL4KuFQP.js → index-f9WZsG2n.js} +1 -1
- package/dist-embed/chunks/{index-DSgHh0-i.js → index-noRoZrq5.js} +1 -1
- package/dist-embed/chunks/{index-B8y71UkT.js → index-wk9vl2uW.js} +1 -1
- package/dist-embed/chunks/{index-Dw1P-H6s.js → index-x45cMPwN.js} +1 -1
- package/dist-embed/chunks/{index.esm-B6P80s3J.js → index.esm-p0OnSU9h.js} +1 -1
- package/dist-embed/chunks/{infoDiagram-27XIBGKW-CZPNcDbH.js → infoDiagram-27XIBGKW-BjyM865y.js} +1 -1
- package/dist-embed/chunks/{infoDiagram-a29d40f1-Di_kmyTC.js → infoDiagram-a29d40f1-DXYFLipl.js} +1 -1
- package/dist-embed/chunks/{isEqual-D0eOPSLC.js → isEqual-Cwjr2skl.js} +1 -1
- package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-DD5TaPvH.js → ishikawaDiagram-5VMMS53U-Bb5g5HNe.js} +1 -1
- package/dist-embed/chunks/{it-IT-JPQ66NNP-C7p9bCWQ.js → it-IT-JPQ66NNP-DuG05fUR.js} +1 -1
- package/dist-embed/chunks/{ja-JP-DBVTYXUO-DupAM7Cv.js → ja-JP-DBVTYXUO-DeDfL3Bk.js} +1 -1
- package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-1NqbTyL4.js → journeyDiagram-3NMN7TZE-96VNFopN.js} +1 -1
- package/dist-embed/chunks/{journeyDiagram-95396277-xr9Xk_mL.js → journeyDiagram-95396277-CQ_kN2gp.js} +1 -1
- package/dist-embed/chunks/{kaa-6HZHGXH3-DrthOcPY.js → kaa-6HZHGXH3-BRKFVG6s.js} +1 -1
- package/dist-embed/chunks/{kab-KAB-ZGHBKWFO-C4hr0kbU.js → kab-KAB-ZGHBKWFO-Uqakmhz5.js} +1 -1
- package/dist-embed/chunks/{kanban-definition-UXKFOSKX-DlSwjr3b.js → kanban-definition-UXKFOSKX-BPsXEKm4.js} +1 -1
- package/dist-embed/chunks/{kk-KZ-P5N5QNE5-CrjDkh9r.js → kk-KZ-P5N5QNE5-DWMXMIAK.js} +1 -1
- package/dist-embed/chunks/{km-KH-HSX4SM5Z-JHWf7VZ6.js → km-KH-HSX4SM5Z-BXNl9QnV.js} +1 -1
- package/dist-embed/chunks/{ko-KR-MTYHY66A-CJ4JxKMG.js → ko-KR-MTYHY66A-BZgIqTuN.js} +1 -1
- package/dist-embed/chunks/{ku-TR-6OUDTVRD-YSlLPag_.js → ku-TR-6OUDTVRD-CQNa5i5U.js} +1 -1
- package/dist-embed/chunks/{layout-5FOjTADt.js → layout-Dq0J6INj.js} +1 -1
- package/dist-embed/chunks/{lexicalHooks-eqXJbnX9.js → lexicalHooks-Pqoe8h_O.js} +1 -1
- package/dist-embed/chunks/{lt-LT-XHIRWOB4-2v6r2YYq.js → lt-LT-XHIRWOB4-BQW2k7iv.js} +1 -1
- package/dist-embed/chunks/{lv-LV-5QDEKY6T-DVGd68q4.js → lv-LV-5QDEKY6T-B0HRRCC4.js} +1 -1
- package/dist-embed/chunks/{mermaid.core-BU1Nkb56.js → mermaid.core-B9dEBs01.js} +4 -4
- package/dist-embed/chunks/{mermaid.core-DY5DKOtx.js → mermaid.core-pflA3DMC.js} +2 -2
- package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-sSfUfKt8.js → mindmap-definition-YA3MSWOX-DwLQYAqQ.js} +1 -1
- package/dist-embed/chunks/{mindmap-definition-e4c1d938-btrk6STt.js → mindmap-definition-e4c1d938-CDWIPlcb.js} +1 -1
- package/dist-embed/chunks/{mr-IN-CRQNXWMA-D1q8zjMr.js → mr-IN-CRQNXWMA-DXR6sWSH.js} +1 -1
- package/dist-embed/chunks/{my-MM-5M5IBNSE-CCWuEpIN.js → my-MM-5M5IBNSE-BZ5_9oCm.js} +1 -1
- package/dist-embed/chunks/{nb-NO-T6EIAALU-eJ92wx2h.js → nb-NO-T6EIAALU-CBtv36wZ.js} +1 -1
- package/dist-embed/chunks/{nl-NL-IS3SIHDZ-DmkMgsvp.js → nl-NL-IS3SIHDZ-CcqE3cY8.js} +1 -1
- package/dist-embed/chunks/{nn-NO-6E72VCQL-CWYEaXBn.js → nn-NO-6E72VCQL-Cl9wPgpU.js} +1 -1
- package/dist-embed/chunks/{oc-FR-POXYY2M6-CayriaEZ.js → oc-FR-POXYY2M6-CQEkV2p1.js} +1 -1
- package/dist-embed/chunks/{pa-IN-N4M65BXN-CydiKcR8.js → pa-IN-N4M65BXN-CaE6yG0U.js} +1 -1
- package/dist-embed/chunks/{pegDiagram-XKGWAZYB--dcG-x2B.js → pegDiagram-XKGWAZYB-Cwo6HzRh.js} +1 -1
- package/dist-embed/chunks/{percentages-BXMCSKIN-fzYCDL7m.js → percentages-BXMCSKIN-Bk5xifLL.js} +3 -3
- package/dist-embed/chunks/{pieDiagram-E7YTZNPT-D-uncTun.js → pieDiagram-E7YTZNPT-BvBHesgq.js} +1 -1
- package/dist-embed/chunks/{pieDiagram-c941bede-BoVaJIdw.js → pieDiagram-c941bede-Bsn1Bxk5.js} +1 -1
- package/dist-embed/chunks/{pl-PL-T2D74RX3-DhiK4YSC.js → pl-PL-T2D74RX3-M1pQcF2j.js} +1 -1
- package/dist-embed/chunks/{pt-BR-5N22H2LF-CwSVxIqs.js → pt-BR-5N22H2LF-BFDHu72z.js} +1 -1
- package/dist-embed/chunks/{pt-PT-UZXXM6DQ-BnxquNJT.js → pt-PT-UZXXM6DQ-DFcZY1Gz.js} +1 -1
- package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-ClE_bWPS.js → quadrantDiagram-AXDQQJYC-AaQ_WgXa.js} +1 -1
- package/dist-embed/chunks/{quadrantDiagram-cf8b8fe0-V_e2KgDu.js → quadrantDiagram-cf8b8fe0-BhaNj-gz.js} +1 -1
- package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-CkhmY0tS.js → railroadDiagram-O6MQD6OU-BlWFu3pn.js} +1 -1
- package/dist-embed/chunks/{renderer-BwlsmtXF.js → renderer-Dy4lZ1KZ.js} +1 -1
- package/dist-embed/chunks/{requirementDiagram-53bda41b-BZw7Ipej.js → requirementDiagram-53bda41b-C2WctYyl.js} +1 -1
- package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-BXwXUXrr.js → requirementDiagram-BXWQKSXE-BpWNFdrw.js} +1 -1
- package/dist-embed/chunks/{ro-RO-JPDTUUEW-D3G2f_fQ.js → ro-RO-JPDTUUEW-BGm_Xwik.js} +1 -1
- package/dist-embed/chunks/{ru-RU-B4JR7IUQ-SnVfNwaW.js → ru-RU-B4JR7IUQ-BsrZ_x8p.js} +1 -1
- package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-0B_Kvjm2.js → sankeyDiagram-P5KCCOFB-DnT5kYW5.js} +1 -1
- package/dist-embed/chunks/{sankeyDiagram-c3ef121a-e1QLivkZ.js → sankeyDiagram-c3ef121a-3FD4GIJS.js} +1 -1
- package/dist-embed/chunks/{sequenceDiagram-82a5b84f-N-16oABv.js → sequenceDiagram-82a5b84f-CZQmoHAd.js} +1 -1
- package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-CtbkJYCv.js → sequenceDiagram-WJ2MYXX4-0HHgJN0L.js} +1 -1
- package/dist-embed/chunks/{sessions-C9DBCyZI.js → sessions-BRALW9Yv.js} +1 -1
- package/dist-embed/chunks/{si-LK-N5RQ5JYF-Da7Bfexz.js → si-LK-N5RQ5JYF-BfaYS44g.js} +1 -1
- package/dist-embed/chunks/{sizeCapture-INFHLROL-B3xt8UaI.js → sizeCapture-INFHLROL-CIF2j9e_.js} +1 -1
- package/dist-embed/chunks/{sk-SK-C5VTKIMK-BB-Ks1b-.js → sk-SK-C5VTKIMK-D-K9yMTN.js} +1 -1
- package/dist-embed/chunks/{sl-SI-NN7IZMDC-DF3fUKHX.js → sl-SI-NN7IZMDC-B48XvZUw.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-43e79a5f-BJcJNr41.js → stateDiagram-43e79a5f-CMlUXY1x.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-D77RDMKH-LjWP-fRB.js → stateDiagram-D77RDMKH-CkICPC-C.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-v2-2041ed4f-DTEruWg2.js → stateDiagram-v2-2041ed4f-BcO6vvJA.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-_xCQcvgo.js → stateDiagram-v2-MP3YSRHH-BFlXwfgz.js} +1 -1
- package/dist-embed/chunks/{styles-455b33cd-OIhmfs6N.js → styles-455b33cd-BfyZJvzN.js} +1 -1
- package/dist-embed/chunks/{styles-f932cba9-CwLjreIv.js → styles-f932cba9-k2wfF-9Q.js} +1 -1
- package/dist-embed/chunks/{styles-fcc2142b-DP74dQpR.js → styles-fcc2142b-z3csTkbW.js} +1 -1
- package/dist-embed/chunks/{subset-shared.chunk-Cf9zgTA9.js → subset-shared.chunk-DzA7mJjZ.js} +1 -1
- package/dist-embed/chunks/{subset-worker.chunk-WYW3AHku.js → subset-worker.chunk-CsTEdHAt.js} +1 -1
- package/dist-embed/chunks/{sv-SE-XGPEYMSR-CeR-pJHy.js → sv-SE-XGPEYMSR-DfhLO_Vt.js} +1 -1
- package/dist-embed/chunks/{svgDrawCommon-148a3cd9-CgE5QJIv.js → svgDrawCommon-148a3cd9-NqUFgQ9x.js} +1 -1
- package/dist-embed/chunks/{swimlanes-42K2YHIH-CZyflHYJ.js → swimlanes-42K2YHIH-B6pxWv6a.js} +1 -1
- package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-Bmr6N4fj.js → swimlanesDiagram-VR7AAH4N-B9ThT6OH.js} +1 -1
- package/dist-embed/chunks/{ta-IN-2NMHFXQM-lmsodGuU.js → ta-IN-2NMHFXQM-EZA_oxSt.js} +1 -1
- package/dist-embed/chunks/{th-TH-HPSO5L25-DQCWr96I.js → th-TH-HPSO5L25-G9vy_zQH.js} +1 -1
- package/dist-embed/chunks/{timeline-definition-24CTP7MA-DqY5EM6p.js → timeline-definition-24CTP7MA-DVcslyxd.js} +1 -1
- package/dist-embed/chunks/{timeline-definition-7545f45a-B8wMEyZY.js → timeline-definition-7545f45a-IhzNtIcW.js} +1 -1
- package/dist-embed/chunks/{tr-TR-DEFEU3FU-CqnvlGZW.js → tr-TR-DEFEU3FU-DBj_G5CD.js} +1 -1
- package/dist-embed/chunks/{uk-UA-QMV73CPH-DdWFjbHe.js → uk-UA-QMV73CPH-DN7lMu5H.js} +1 -1
- package/dist-embed/chunks/{vennDiagram-4TSXK5OY-63-O_xI8.js → vennDiagram-4TSXK5OY-KKysbuVs.js} +1 -1
- package/dist-embed/chunks/{vi-VN-M7AON7JQ-CydTT0Fi.js → vi-VN-M7AON7JQ-LoT02qgd.js} +1 -1
- package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-C9vLUvHf.js → wardleyDiagram-VM6X3IG4-CTed9ps7.js} +1 -1
- package/dist-embed/chunks/{xychartDiagram-3f383b91-BfoQg8n9.js → xychartDiagram-3f383b91-CsxcWMT8.js} +1 -1
- package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-BZr3T3n_.js → xychartDiagram-S5SC5T6Z-Kpqryflz.js} +1 -1
- package/dist-embed/chunks/{zh-CN-LNUGB5OW-DEn1TFfK.js → zh-CN-LNUGB5OW-CjexwOqT.js} +1 -1
- package/dist-embed/chunks/{zh-HK-E62DVLB3-DJQRmOHH.js → zh-HK-E62DVLB3-B0ys_HV6.js} +1 -1
- package/dist-embed/chunks/{zh-TW-RAJ6MFWO-B7s9vmSf.js → zh-TW-RAJ6MFWO-tQJWLJuU.js} +1 -1
- package/dist-embed/datalayer-app-main.js +19 -19
- package/lib/apps/apps/records.d.ts +0 -29
- package/lib/apps/apps/records.js +11 -34
- package/lib/apps/apps/threads.d.ts +2 -21
- package/lib/apps/apps/threads.js +0 -75
- package/lib/apps/embed/embedSession.d.ts +0 -8
- package/lib/apps/embed/embedSession.js +1 -38
- package/lib/apps/embed/visitorApp.d.ts +22 -3
- package/lib/apps/embed/visitorApp.js +42 -4
- package/lib/apps/plugins/chat/ChatView.js +2 -1
- package/lib/chat/base/ChatBase.js +1 -1
- package/lib/chat/base/fullContextMessages.js +1 -1
- package/lib/hooks/useAgUi.js +1 -1
- package/lib/hooks/useToolApprovals.d.ts +1 -1
- package/lib/hooks/useToolApprovals.js +1 -1
- package/lib/{protocols → portable}/agUiRefusal.d.ts +1 -1
- package/lib/{protocols → portable}/agUiRefusal.js +1 -1
- package/lib/portable/agui.d.ts +72 -0
- package/lib/portable/agui.js +174 -0
- package/lib/portable/conversation.d.ts +124 -0
- package/lib/portable/conversation.js +357 -0
- package/lib/portable/index.d.ts +11 -6
- package/lib/portable/index.js +14 -11
- package/lib/portable/records.d.ts +27 -0
- package/lib/portable/records.js +46 -0
- package/lib/portable/sessions.d.ts +92 -0
- package/lib/portable/sessions.js +134 -0
- package/lib/portable/thread.d.ts +41 -0
- package/lib/portable/thread.js +102 -0
- package/lib/protocols/AGUIAdapter.d.ts +0 -2
- package/lib/protocols/AGUIAdapter.js +39 -74
- package/package.json +1 -1
- package/dist-embed/chunks/ChatView-fHb_i4kH.js +0 -32
- package/dist-embed/chunks/index-DpJpQnPn.js +0 -34
- /package/lib/{utils → portable}/approvals.d.ts +0 -0
- /package/lib/{utils → portable}/approvals.js +0 -0
package/lib/portable/index.js
CHANGED
|
@@ -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
|
|
12
|
-
*
|
|
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 '
|
|
17
|
-
//
|
|
18
|
-
|
|
19
|
-
export {
|
|
20
|
-
|
|
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;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025-2026 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
import { readRunStream } from './agui';
|
|
6
|
+
import { agUiRefusal, refusalBody } from './agUiRefusal';
|
|
7
|
+
import { messagesOfThread } from './thread';
|
|
8
|
+
/** A route that refused: its status and the runtime's sentence. */
|
|
9
|
+
export class RuntimeRefusal extends Error {
|
|
10
|
+
status;
|
|
11
|
+
constructor(status, message) {
|
|
12
|
+
super(message);
|
|
13
|
+
this.status = status;
|
|
14
|
+
this.name = 'RuntimeRefusal';
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function clientOf({ baseUrl, getAccessToken, fetch: fetcher, }) {
|
|
18
|
+
const root = baseUrl.replace(/\/+$/, '');
|
|
19
|
+
const headers = (extra = {}) => {
|
|
20
|
+
const token = getAccessToken();
|
|
21
|
+
return {
|
|
22
|
+
...extra,
|
|
23
|
+
...(token ? { Authorization: `Bearer ${token}` } : {}),
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
const refused = async (response) => {
|
|
27
|
+
throw new RuntimeRefusal(response.status, agUiRefusal(response.status, response.statusText, await refusalBody(response)));
|
|
28
|
+
};
|
|
29
|
+
const json = async (path, method = 'GET') => {
|
|
30
|
+
const response = await fetcher(`${root}${path}`, {
|
|
31
|
+
method,
|
|
32
|
+
headers: headers({ Accept: 'application/json' }),
|
|
33
|
+
});
|
|
34
|
+
if (!response.ok) {
|
|
35
|
+
return refused(response);
|
|
36
|
+
}
|
|
37
|
+
return (await response.json());
|
|
38
|
+
};
|
|
39
|
+
const stream = async (path, body, { onEvent, signal }, method = 'POST') => {
|
|
40
|
+
const response = await fetcher(`${root}${path}`, {
|
|
41
|
+
method,
|
|
42
|
+
headers: headers({
|
|
43
|
+
'Content-Type': 'application/json',
|
|
44
|
+
Accept: 'text/event-stream',
|
|
45
|
+
}),
|
|
46
|
+
body: JSON.stringify(body),
|
|
47
|
+
signal,
|
|
48
|
+
});
|
|
49
|
+
if (!response.ok) {
|
|
50
|
+
return refused(response);
|
|
51
|
+
}
|
|
52
|
+
await readRunStream(response, onEvent);
|
|
53
|
+
};
|
|
54
|
+
return { json, stream, refused, headers, root, fetcher };
|
|
55
|
+
}
|
|
56
|
+
const at = (uid) => `/api/v1/apps/sessions/${encodeURIComponent(uid)}`;
|
|
57
|
+
/**
|
|
58
|
+
* An application's sessions on the runtime that runs it: start, message,
|
|
59
|
+
* settings, resume (streamed), and stop, end, read (JSON).
|
|
60
|
+
*/
|
|
61
|
+
export function appSessionsClient(options) {
|
|
62
|
+
const { json, stream } = clientOf(options);
|
|
63
|
+
return {
|
|
64
|
+
/** Start a session with its first message. */
|
|
65
|
+
start: (start, streaming) => stream('/api/v1/apps/sessions', {
|
|
66
|
+
agent: start.agent,
|
|
67
|
+
...(start.deploymentUid
|
|
68
|
+
? { deployment_uid: start.deploymentUid }
|
|
69
|
+
: {}),
|
|
70
|
+
...(start.appUid ? { app_uid: start.appUid } : {}),
|
|
71
|
+
...(start.version ? { version: start.version } : {}),
|
|
72
|
+
...(start.session ? { session: start.session } : {}),
|
|
73
|
+
opener: start.opener,
|
|
74
|
+
}, streaming),
|
|
75
|
+
/** The next turn, or the answer to what the application asked (text, a choice). */
|
|
76
|
+
message: (uid, text, streaming) => stream(`${at(uid)}/messages`, { text }, streaming),
|
|
77
|
+
/** A settings change: also what answers a form the application asked. */
|
|
78
|
+
changeSettings: (uid, values, streaming) => stream(`${at(uid)}/settings`, { values }, streaming, 'PUT'),
|
|
79
|
+
/** Resume a stopped session — or, with its agent, one the runtime no longer holds, from its record. */
|
|
80
|
+
resume: (uid, agent, streaming) => stream(`${at(uid)}/resume`, { agent }, streaming),
|
|
81
|
+
/** Stop: what runs is cancelled; the session waits to be resumed. */
|
|
82
|
+
stop: (uid) => json(`${at(uid)}/stop`, 'POST'),
|
|
83
|
+
/** End the conversation for good; its record stays. */
|
|
84
|
+
end: (uid) => json(`${at(uid)}/end`, 'POST'),
|
|
85
|
+
/** What the session is: its state (`open`, `running`, `waiting`, `stopped`) and what it asks. */
|
|
86
|
+
describe: (uid) => json(at(uid)),
|
|
87
|
+
/** Its conversation as a person reads it (`messagesOfThread`). */
|
|
88
|
+
messages: async (uid) => messagesOfThread((await json(`${at(uid)}/messages`)).messages),
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* A standalone agent over its AG-UI mount: a run carries the conversation so
|
|
93
|
+
* far, and stopping it terminates the thread's run on the runtime. A raw
|
|
94
|
+
* agent has no session, record or question of an application's.
|
|
95
|
+
*/
|
|
96
|
+
export function agentRunClient(options) {
|
|
97
|
+
const { stream, refused, root, headers, fetcher } = clientOf(options);
|
|
98
|
+
return {
|
|
99
|
+
run: (threadId, runId, messages, streaming) => stream(`/api/v1/ag-ui/${encodeURIComponent(options.agent)}/`, {
|
|
100
|
+
threadId,
|
|
101
|
+
runId,
|
|
102
|
+
messages,
|
|
103
|
+
state: null,
|
|
104
|
+
tools: [],
|
|
105
|
+
context: [],
|
|
106
|
+
forwardedProps: null,
|
|
107
|
+
}, streaming),
|
|
108
|
+
/** Stop the thread's run on the runtime (`POST /api/v1/ag-ui/terminate`). */
|
|
109
|
+
terminate: async (threadId) => {
|
|
110
|
+
const response = await fetcher(`${root}/api/v1/ag-ui/terminate`, {
|
|
111
|
+
method: 'POST',
|
|
112
|
+
headers: headers({ 'Content-Type': 'application/json' }),
|
|
113
|
+
body: JSON.stringify({ thread_id: threadId }),
|
|
114
|
+
});
|
|
115
|
+
if (!response.ok) {
|
|
116
|
+
await refused(response);
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* A runtime's agent-runtimes address from its ingress, as the runtimes
|
|
123
|
+
* service gives it (`…/jupyter/server/<runtime>` → `…/agent-runtimes/<runtime>`,
|
|
124
|
+
* `build_agent_runtimes_base_url`). Refused when there is none.
|
|
125
|
+
*/
|
|
126
|
+
export function agentRuntimesUrlOf(ingress) {
|
|
127
|
+
const base = ingress.trim().replace(/\/+$/, '');
|
|
128
|
+
if (!/^https?:\/\//.test(base)) {
|
|
129
|
+
throw new Error(`The runtime gave no address to reach its agents: ${ingress || 'none'}.`);
|
|
130
|
+
}
|
|
131
|
+
return base.includes('/jupyter/server/')
|
|
132
|
+
? base.replace('/jupyter/server/', '/agent-runtimes/')
|
|
133
|
+
: base;
|
|
134
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A person's conversation with an application, read again: the person-facing
|
|
3
|
+
* projection of a session's thread, and the thread opened from the runtime
|
|
4
|
+
* that holds it — or resumed from its record (LOOP P-24, D-13, R-04).
|
|
5
|
+
*
|
|
6
|
+
* The web chat (`ChatView`, an embed after its page reloads) and Datalayer
|
|
7
|
+
* Mobile open a thread with these, so that what a person reads of their own
|
|
8
|
+
* conversation is the same on each. Pure: the network is the `fetch` given.
|
|
9
|
+
*
|
|
10
|
+
* @module portable/thread
|
|
11
|
+
*/
|
|
12
|
+
import type { ChatMessage } from '../types/messages';
|
|
13
|
+
/** What opening a thread says, in a person's words. */
|
|
14
|
+
export declare const THREAD_WORDS: {
|
|
15
|
+
readonly opening: "Opening your conversation…";
|
|
16
|
+
readonly notOpened: (detail: string) => string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* A session's conversation as a person reads it, from the AG-UI messages the
|
|
20
|
+
* runtime says (`GET …/sessions/{uid}/messages`, a `MESSAGES_SNAPSHOT`): what
|
|
21
|
+
* was said and answered, in words. A turn a personal agent asked is shown
|
|
22
|
+
* without what the runtime told the application before the person's words
|
|
23
|
+
* (`askedOf`, decided 2026-10-14). What its messages showed comes on the
|
|
24
|
+
* conversation's ui socket (REACTOR_UI RU-W), never here: a `reactor.ui`
|
|
25
|
+
* activity in a thread is refused.
|
|
26
|
+
*/
|
|
27
|
+
export declare function messagesOfThread(messages: unknown): ChatMessage[];
|
|
28
|
+
/** The AG-UI messages a session-API stream's `MESSAGES_SNAPSHOT` carries, if one does. */
|
|
29
|
+
export declare function snapshotOfStream(text: string): unknown[] | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* A thread's conversation, read from the runtime its application runs on:
|
|
32
|
+
* held there, or resumed from its record. Throws the runtime's sentence when
|
|
33
|
+
* neither answers.
|
|
34
|
+
*/
|
|
35
|
+
export declare function openThread({ agentBaseUrl, agentId, uid, token, fetcher, }: {
|
|
36
|
+
agentBaseUrl: string;
|
|
37
|
+
agentId: string;
|
|
38
|
+
uid: string;
|
|
39
|
+
token?: string | null;
|
|
40
|
+
fetcher?: typeof fetch;
|
|
41
|
+
}): Promise<ChatMessage[]>;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025-2026 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
import { eventsOfStream, REACTOR_UI_NAME } from './agui';
|
|
6
|
+
import { askedOf } from './records';
|
|
7
|
+
/** What opening a thread says, in a person's words. */
|
|
8
|
+
export const THREAD_WORDS = {
|
|
9
|
+
opening: 'Opening your conversation…',
|
|
10
|
+
notOpened: (detail) => `Your conversation could not be opened, so this is a new one: ${detail}`,
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* A session's conversation as a person reads it, from the AG-UI messages the
|
|
14
|
+
* runtime says (`GET …/sessions/{uid}/messages`, a `MESSAGES_SNAPSHOT`): what
|
|
15
|
+
* was said and answered, in words. A turn a personal agent asked is shown
|
|
16
|
+
* without what the runtime told the application before the person's words
|
|
17
|
+
* (`askedOf`, decided 2026-10-14). What its messages showed comes on the
|
|
18
|
+
* conversation's ui socket (REACTOR_UI RU-W), never here: a `reactor.ui`
|
|
19
|
+
* activity in a thread is refused.
|
|
20
|
+
*/
|
|
21
|
+
export function messagesOfThread(messages) {
|
|
22
|
+
if (!Array.isArray(messages)) {
|
|
23
|
+
return [];
|
|
24
|
+
}
|
|
25
|
+
const drawn = [];
|
|
26
|
+
for (const message of messages) {
|
|
27
|
+
if (!message || typeof message !== 'object') {
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
const { id, role, content, activityType } = message;
|
|
31
|
+
if (role === 'activity' && activityType === REACTOR_UI_NAME) {
|
|
32
|
+
throw new Error(`Activity ${String(id)}: what a message showed comes on the ui socket (REACTOR_UI RU-W)`);
|
|
33
|
+
}
|
|
34
|
+
if ((role === 'user' || role === 'assistant') &&
|
|
35
|
+
typeof id === 'string' &&
|
|
36
|
+
typeof content === 'string' &&
|
|
37
|
+
content.trim()) {
|
|
38
|
+
drawn.push({
|
|
39
|
+
id,
|
|
40
|
+
role,
|
|
41
|
+
content: role === 'user' ? askedOf(content) : content,
|
|
42
|
+
createdAt: new Date(),
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return drawn;
|
|
47
|
+
}
|
|
48
|
+
/** The AG-UI messages a session-API stream's `MESSAGES_SNAPSHOT` carries, if one does. */
|
|
49
|
+
export function snapshotOfStream(text) {
|
|
50
|
+
let found;
|
|
51
|
+
for (const event of eventsOfStream(text)) {
|
|
52
|
+
if (event.type === 'MESSAGES_SNAPSHOT' && Array.isArray(event.messages)) {
|
|
53
|
+
found = event.messages;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return found;
|
|
57
|
+
}
|
|
58
|
+
async function detailOf(response) {
|
|
59
|
+
try {
|
|
60
|
+
const body = (await response.json());
|
|
61
|
+
if (typeof body.detail === 'string' && body.detail) {
|
|
62
|
+
return body.detail;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
catch {
|
|
66
|
+
// No sentence: the status says it.
|
|
67
|
+
}
|
|
68
|
+
return `${response.status}`;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* A thread's conversation, read from the runtime its application runs on:
|
|
72
|
+
* held there, or resumed from its record. Throws the runtime's sentence when
|
|
73
|
+
* neither answers.
|
|
74
|
+
*/
|
|
75
|
+
export async function openThread({ agentBaseUrl, agentId, uid, token, fetcher = fetch, }) {
|
|
76
|
+
const base = `${agentBaseUrl.replace(/\/+$/, '')}/api/v1/apps/sessions/${encodeURIComponent(uid)}`;
|
|
77
|
+
const authorization = token
|
|
78
|
+
? { Authorization: `Bearer ${token}` }
|
|
79
|
+
: {};
|
|
80
|
+
const held = await fetcher(`${base}/messages`, { headers: authorization });
|
|
81
|
+
if (held.ok) {
|
|
82
|
+
const body = (await held.json());
|
|
83
|
+
return messagesOfThread(body.messages);
|
|
84
|
+
}
|
|
85
|
+
if (held.status !== 404) {
|
|
86
|
+
throw new Error(await detailOf(held));
|
|
87
|
+
}
|
|
88
|
+
// Not held here: resumed from its record, under the same uid.
|
|
89
|
+
const resumed = await fetcher(`${base}/resume`, {
|
|
90
|
+
method: 'POST',
|
|
91
|
+
headers: { 'Content-Type': 'application/json', ...authorization },
|
|
92
|
+
body: JSON.stringify({ agent: agentId }),
|
|
93
|
+
});
|
|
94
|
+
if (!resumed.ok) {
|
|
95
|
+
throw new Error(await detailOf(resumed));
|
|
96
|
+
}
|
|
97
|
+
const snapshot = snapshotOfStream(await resumed.text());
|
|
98
|
+
if (!snapshot) {
|
|
99
|
+
throw new Error(`The runtime said nothing of session ${uid}.`);
|
|
100
|
+
}
|
|
101
|
+
return messagesOfThread(snapshot);
|
|
102
|
+
}
|
|
@@ -7,8 +7,6 @@ import type { ProtocolAdapterConfig } from '../types';
|
|
|
7
7
|
import type { ChatMessage } from '../types/messages';
|
|
8
8
|
import type { ToolDefinition, ToolExecutionResult } from '../types/tools';
|
|
9
9
|
import { BaseProtocolAdapter } from './BaseProtocolAdapter';
|
|
10
|
-
/** What the page says when a run's stream closes before the run said how it ended. */
|
|
11
|
-
export declare const RUN_CUT_SHORT = "The run stopped before it finished, without an answer or an error: send it again.";
|
|
12
10
|
/**
|
|
13
11
|
* AG-UI specific configuration
|
|
14
12
|
*/
|
|
@@ -3,11 +3,9 @@
|
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
5
|
import { generateMessageId, createAssistantMessage } from '../types/messages';
|
|
6
|
-
import { agUiRefusal, refusalBody } from '
|
|
6
|
+
import { agUiRefusal, refusalBody } from '../portable/agUiRefusal';
|
|
7
|
+
import { AgUiFrames, endsRun, REACTOR_UI_NAME, RUN_CUT_SHORT, toolResultOf, UI_ON_RUN, } from '../portable/agui';
|
|
7
8
|
import { BaseProtocolAdapter } from './BaseProtocolAdapter';
|
|
8
|
-
import { AGUI_NAME } from '@datalayer/reactor/ui';
|
|
9
|
-
/** What the page says when a run's stream closes before the run said how it ended. */
|
|
10
|
-
export const RUN_CUT_SHORT = 'The run stopped before it finished, without an answer or an error: send it again.';
|
|
11
9
|
/**
|
|
12
10
|
* AG-UI protocol adapter
|
|
13
11
|
* Uses HTTP POST with SSE streaming for responses
|
|
@@ -434,7 +432,8 @@ export class AGUIAdapter extends BaseProtocolAdapter {
|
|
|
434
432
|
throw new Error('Response body is not readable');
|
|
435
433
|
}
|
|
436
434
|
const decoder = new TextDecoder();
|
|
437
|
-
|
|
435
|
+
// The stream's frames, read as every client reads them (portable/agui).
|
|
436
|
+
const frames = new AgUiFrames(data => console.warn('[AGUIAdapter] Failed to parse event data:', data));
|
|
438
437
|
// Always start fresh — each turn gets its own message bubble.
|
|
439
438
|
// Continuations will naturally appear AFTER the tool calls in the
|
|
440
439
|
// display because they create a new message that is appended at the
|
|
@@ -459,56 +458,41 @@ export class AGUIAdapter extends BaseProtocolAdapter {
|
|
|
459
458
|
// or the network — and the page says so instead of waiting for an answer
|
|
460
459
|
// that is not coming (a Preview gave no answer for minutes, 2026-10-12).
|
|
461
460
|
let ended = false;
|
|
461
|
+
const handle = (events) => {
|
|
462
|
+
for (const event of events) {
|
|
463
|
+
if (endsRun(event)) {
|
|
464
|
+
ended = true;
|
|
465
|
+
}
|
|
466
|
+
this.handleAGUIEvent(event, {
|
|
467
|
+
getCurrentMessageId: () => currentMessageId,
|
|
468
|
+
setCurrentMessageId: id => {
|
|
469
|
+
currentMessageId = id;
|
|
470
|
+
},
|
|
471
|
+
getCurrentContent: () => currentContent,
|
|
472
|
+
appendContent: content => {
|
|
473
|
+
currentContent += content;
|
|
474
|
+
},
|
|
475
|
+
resetContent: () => {
|
|
476
|
+
currentContent = '';
|
|
477
|
+
},
|
|
478
|
+
appendTurnContent: content => {
|
|
479
|
+
currentTurnContent += content;
|
|
480
|
+
},
|
|
481
|
+
getCurrentTurnContent: () => currentTurnContent,
|
|
482
|
+
});
|
|
483
|
+
}
|
|
484
|
+
};
|
|
462
485
|
try {
|
|
463
486
|
while (true) {
|
|
464
487
|
const { done, value } = await reader.read();
|
|
465
488
|
if (done) {
|
|
489
|
+
handle(frames.end());
|
|
466
490
|
if (!ended) {
|
|
467
491
|
throw new Error(RUN_CUT_SHORT);
|
|
468
492
|
}
|
|
469
493
|
break;
|
|
470
494
|
}
|
|
471
|
-
|
|
472
|
-
const lines = buffer.split('\n');
|
|
473
|
-
buffer = lines.pop() || '';
|
|
474
|
-
for (const line of lines) {
|
|
475
|
-
if (line.startsWith('event: ')) {
|
|
476
|
-
// Event type (currently unused)
|
|
477
|
-
// const eventType = line.slice(7);
|
|
478
|
-
// Handle event type if needed
|
|
479
|
-
}
|
|
480
|
-
else if (line.startsWith('data: ')) {
|
|
481
|
-
const data = line.slice(6);
|
|
482
|
-
try {
|
|
483
|
-
const event = JSON.parse(data);
|
|
484
|
-
const kind = event.type;
|
|
485
|
-
if (kind === 'RUN_FINISHED' || kind === 'RUN_ERROR') {
|
|
486
|
-
ended = true;
|
|
487
|
-
}
|
|
488
|
-
this.handleAGUIEvent(event, {
|
|
489
|
-
getCurrentMessageId: () => currentMessageId,
|
|
490
|
-
setCurrentMessageId: id => {
|
|
491
|
-
currentMessageId = id;
|
|
492
|
-
},
|
|
493
|
-
getCurrentContent: () => currentContent,
|
|
494
|
-
appendContent: content => {
|
|
495
|
-
currentContent += content;
|
|
496
|
-
},
|
|
497
|
-
resetContent: () => {
|
|
498
|
-
currentContent = '';
|
|
499
|
-
},
|
|
500
|
-
appendTurnContent: content => {
|
|
501
|
-
currentTurnContent += content;
|
|
502
|
-
},
|
|
503
|
-
getCurrentTurnContent: () => currentTurnContent,
|
|
504
|
-
});
|
|
505
|
-
}
|
|
506
|
-
catch (e) {
|
|
507
|
-
// Non-JSON data, might be raw content
|
|
508
|
-
console.warn('[AGUIAdapter] Failed to parse event data:', e);
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
}
|
|
495
|
+
handle(frames.push(decoder.decode(value, { stream: true })));
|
|
512
496
|
}
|
|
513
497
|
}
|
|
514
498
|
finally {
|
|
@@ -531,7 +515,7 @@ export class AGUIAdapter extends BaseProtocolAdapter {
|
|
|
531
515
|
refuseUiOnRun() {
|
|
532
516
|
this.emit({
|
|
533
517
|
type: 'error',
|
|
534
|
-
error: new Error(
|
|
518
|
+
error: new Error(UI_ON_RUN),
|
|
535
519
|
timestamp: new Date(),
|
|
536
520
|
});
|
|
537
521
|
}
|
|
@@ -678,36 +662,17 @@ export class AGUIAdapter extends BaseProtocolAdapter {
|
|
|
678
662
|
// Tool execution result with actual output
|
|
679
663
|
// AG-UI uses camelCase (toolCallId)
|
|
680
664
|
const toolCallId = event.toolCallId || event.tool_call_id;
|
|
681
|
-
let content = event.content;
|
|
682
|
-
// Parse JSON content if it's a string
|
|
683
|
-
if (typeof content === 'string') {
|
|
684
|
-
try {
|
|
685
|
-
content = JSON.parse(content);
|
|
686
|
-
}
|
|
687
|
-
catch {
|
|
688
|
-
// Keep as string if not valid JSON
|
|
689
|
-
}
|
|
690
|
-
}
|
|
691
665
|
if (toolCallId) {
|
|
692
|
-
//
|
|
693
|
-
//
|
|
694
|
-
const
|
|
695
|
-
const isError = contentObj?.execution_ok === false ||
|
|
696
|
-
contentObj?.code_error != null ||
|
|
697
|
-
(contentObj?.error != null && !contentObj?.success);
|
|
698
|
-
const errorMessage = contentObj?.execution_error ||
|
|
699
|
-
contentObj?.error ||
|
|
700
|
-
(contentObj?.code_error
|
|
701
|
-
? `${contentObj.code_error?.name || 'Error'}: ${contentObj.code_error?.value || ''}`
|
|
702
|
-
: undefined);
|
|
703
|
-
// Emit tool result event with the actual content
|
|
666
|
+
// Read as every client reads it (portable/agui): JSON when it is,
|
|
667
|
+
// failed when the execution result says so.
|
|
668
|
+
const said = toolResultOf(event.content);
|
|
704
669
|
this.emit({
|
|
705
670
|
type: 'tool-result',
|
|
706
671
|
toolResult: {
|
|
707
672
|
toolCallId,
|
|
708
|
-
success:
|
|
709
|
-
result:
|
|
710
|
-
error:
|
|
673
|
+
success: said.success,
|
|
674
|
+
result: said.result,
|
|
675
|
+
error: said.error,
|
|
711
676
|
},
|
|
712
677
|
timestamp: new Date(),
|
|
713
678
|
});
|
|
@@ -741,14 +706,14 @@ export class AGUIAdapter extends BaseProtocolAdapter {
|
|
|
741
706
|
// `reactor.ui` ops come over the conversation's ui socket, never
|
|
742
707
|
// the run stream (REACTOR_UI RU-W): one here is refused. Any other
|
|
743
708
|
// activity is nobody's here.
|
|
744
|
-
if (event.activityType ===
|
|
709
|
+
if (event.activityType === REACTOR_UI_NAME) {
|
|
745
710
|
this.refuseUiOnRun();
|
|
746
711
|
}
|
|
747
712
|
break;
|
|
748
713
|
}
|
|
749
714
|
case 'CUSTOM': {
|
|
750
715
|
const name = event.name;
|
|
751
|
-
if (name ===
|
|
716
|
+
if (name === REACTOR_UI_NAME) {
|
|
752
717
|
this.refuseUiOnRun();
|
|
753
718
|
break;
|
|
754
719
|
}
|