@datalayer/agent-runtimes 1.5.7 → 1.5.9

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 (272) hide show
  1. package/dist-embed/chunks/{AgentDetails-KezohVQI.js → AgentDetails-CMBy5o1q.js} +1 -1
  2. package/dist-embed/chunks/{AgentDetailsDialog-CklhMnk7.js → AgentDetailsDialog-D2vH2Nrd.js} +1 -1
  3. package/dist-embed/chunks/{AgentInspector-CtCaRc1L.js → AgentInspector-Bd0oHNAX.js} +1 -1
  4. package/dist-embed/chunks/{AgentInspectorDialog-DB9cx3Gd.js → AgentInspectorDialog-BJUgBPAE.js} +1 -1
  5. package/dist-embed/chunks/{CellSidebarExtension-CfaJL6DQ.js → CellSidebarExtension-CYOVwk1t.js} +6 -6
  6. package/dist-embed/chunks/ChatView-DIdw1rtZ.js +32 -0
  7. package/dist-embed/chunks/{ContextPie-1vP4f-3N.js → ContextPie-B9mAKJc2.js} +1 -1
  8. package/dist-embed/chunks/{DeckComponent-82GVdsoi.js → DeckComponent-CbmzVWcF.js} +2 -2
  9. package/dist-embed/chunks/{DocumentView-SrJloJDo.js → DocumentView-BqsGfNys.js} +1 -1
  10. package/dist-embed/chunks/{EphemeralDocument-t1KulOH8.js → EphemeralDocument-DLaNvwm_.js} +1 -1
  11. package/dist-embed/chunks/{EphemeralNotebook-Co-WQWCc.js → EphemeralNotebook-jnqAJFPI.js} +1 -1
  12. package/dist-embed/chunks/{ExcalidrawComponent-5NeLUYVB.js → ExcalidrawComponent-Cb8yeXqu.js} +1 -1
  13. package/dist-embed/chunks/{ExcalidrawModal-9ZnOB03n.js → ExcalidrawModal-DaPSGYek.js} +1 -1
  14. package/dist-embed/chunks/{JupyterLexicalExtension-Cize8RXy.js → JupyterLexicalExtension-BQINjIFV.js} +9 -9
  15. package/dist-embed/chunks/{KernelVariables-Cl57Zze1.js → KernelVariables-CGQkS5EX.js} +1 -1
  16. package/dist-embed/chunks/{LexicalToolRegistry-CoM9ROsx.js → LexicalToolRegistry-BJ6mpMWn.js} +1 -1
  17. package/dist-embed/chunks/{NotebookToolSurfaces-CWfppxBN.js → NotebookToolSurfaces-DiPifvaW.js} +1 -1
  18. package/dist-embed/chunks/{NotebookView-DOf_K74b.js → NotebookView-IX0wNuX8.js} +1 -1
  19. package/dist-embed/chunks/{Output-9DKTscSv.js → Output-B9XAhyoF.js} +1 -1
  20. package/dist-embed/chunks/{SandboxDetailsDialog-BCfDm6MB.js → SandboxDetailsDialog-COCpmo8m.js} +1 -1
  21. package/dist-embed/chunks/{SchemaForm-BOYPrvf8.js → SchemaForm-WIwdKnrk.js} +1 -1
  22. package/dist-embed/chunks/{WidgetVariableView-BTOwHP78.js → WidgetVariableView-BoGROi-A.js} +1 -1
  23. package/dist-embed/chunks/{YouTubePlugin-Bs4zZIB1.js → YouTubePlugin-BEQBWMwx.js} +1 -1
  24. package/dist-embed/chunks/{abnfDiagram-VCTEODGH-D5p59vS_.js → abnfDiagram-VCTEODGH-CG18Hf18.js} +1 -1
  25. package/dist-embed/chunks/{abnfDiagram-VCTEODGH-DRYbUvhc.js → abnfDiagram-VCTEODGH-D3_T0Lze.js} +1 -1
  26. package/dist-embed/chunks/{ar-SA-G6X2FPQ2-D6XRzkBS.js → ar-SA-G6X2FPQ2-BDWXsTdt.js} +1 -1
  27. package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-DQGv0imf.js → architectureDiagram-5GKGNRK7-B1QPAYO8.js} +1 -1
  28. package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-B7ITKDup.js → architectureDiagram-5GKGNRK7-B5kSsKje.js} +1 -1
  29. package/dist-embed/chunks/{az-AZ-76LH7QW2-DBTdUiqp.js → az-AZ-76LH7QW2-BGchGiT7.js} +1 -1
  30. package/dist-embed/chunks/{bg-BG-XCXSNQG7-DuhcsaSL.js → bg-BG-XCXSNQG7-vCII6Zuq.js} +1 -1
  31. package/dist-embed/chunks/{blockDiagram-868be97b-DYe-XTjy.js → blockDiagram-868be97b-BvM0ptp7.js} +1 -1
  32. package/dist-embed/chunks/{blockDiagram-I7D4REHJ-y7tEFo3j.js → blockDiagram-I7D4REHJ-B8BmxOM4.js} +1 -1
  33. package/dist-embed/chunks/{blockDiagram-I7D4REHJ-IltJXCd6.js → blockDiagram-I7D4REHJ-ClwWG8yx.js} +1 -1
  34. package/dist-embed/chunks/{bn-BD-2XOGV67Q-CPFeLVSN.js → bn-BD-2XOGV67Q-Beu9yUTu.js} +1 -1
  35. package/dist-embed/chunks/{c4Diagram-3f4bdde3-Bybp0wky.js → c4Diagram-3f4bdde3-S92W2yOx.js} +1 -1
  36. package/dist-embed/chunks/{c4Diagram-7LVT6UL2-DpaHndz8.js → c4Diagram-7LVT6UL2-CNWW_-u7.js} +1 -1
  37. package/dist-embed/chunks/{c4Diagram-7LVT6UL2-CizxVqqX.js → c4Diagram-7LVT6UL2-nSCKKLuX.js} +1 -1
  38. package/dist-embed/chunks/{ca-ES-6MX7JW3Y-gDR_kEC6.js → ca-ES-6MX7JW3Y-CnEo6YQi.js} +1 -1
  39. package/dist-embed/chunks/{celltoolbartracker-DLF4PWyW.js → celltoolbartracker-CO6V5FhH.js} +1 -1
  40. package/dist-embed/chunks/{chunk-2Q5K7J3B-BI6lURun.js → chunk-2Q5K7J3B--r8j4N5L.js} +1 -1
  41. package/dist-embed/chunks/{chunk-2Q5K7J3B-DWoLSrj9.js → chunk-2Q5K7J3B-D3fTIaw3.js} +1 -1
  42. package/dist-embed/chunks/{chunk-5VM5RSS4-SleuNqDC.js → chunk-5VM5RSS4-D76mXyWz.js} +1 -1
  43. package/dist-embed/chunks/{chunk-5VM5RSS4-CDh4wYym.js → chunk-5VM5RSS4-QmrgOATO.js} +1 -1
  44. package/dist-embed/chunks/{chunk-F27PBJKO-h_FwJMTr.js → chunk-F27PBJKO-DdSgBnK0.js} +1 -1
  45. package/dist-embed/chunks/{chunk-F27PBJKO-AvWsNGYY.js → chunk-F27PBJKO-DvNrStTM.js} +1 -1
  46. package/dist-embed/chunks/{chunk-IMKFNOWR-DGRceKiU.js → chunk-IMKFNOWR-DpxND1Ct.js} +1 -1
  47. package/dist-embed/chunks/{chunk-IMKFNOWR-Hx4a5yny.js → chunk-IMKFNOWR-DwqmSZhU.js} +1 -1
  48. package/dist-embed/chunks/{chunk-JWPE2WC7-A4gy2qc4.js → chunk-JWPE2WC7-i7V3vMtZ.js} +1 -1
  49. package/dist-embed/chunks/{chunk-JWPE2WC7-BuJactJo.js → chunk-JWPE2WC7-jla8jvq5.js} +1 -1
  50. package/dist-embed/chunks/{chunk-POPQ4Y6H-CFM-817s.js → chunk-POPQ4Y6H-BGCugXU7.js} +1 -1
  51. package/dist-embed/chunks/{chunk-POPQ4Y6H-CmRF80iG.js → chunk-POPQ4Y6H-ofrenTaa.js} +1 -1
  52. package/dist-embed/chunks/{chunk-SVP7TREG-CryZx9JE.js → chunk-SVP7TREG-2Q2uQyQk.js} +1 -1
  53. package/dist-embed/chunks/{chunk-SVP7TREG-DSNzmytH.js → chunk-SVP7TREG-BIxxVjkU.js} +1 -1
  54. package/dist-embed/chunks/{chunk-TICWLB2K-DyGS3fIj.js → chunk-TICWLB2K-BqA5q52L.js} +1 -1
  55. package/dist-embed/chunks/{chunk-TICWLB2K-CEaDF8ZJ.js → chunk-TICWLB2K-LNiCmYq5.js} +1 -1
  56. package/dist-embed/chunks/{chunk-XXDRQBXY-8Cnzpdjz.js → chunk-XXDRQBXY-CNMg_gvd.js} +1 -1
  57. package/dist-embed/chunks/{chunk-XXDRQBXY-DxQBcVOz.js → chunk-XXDRQBXY-CqtfA3WC.js} +1 -1
  58. package/dist-embed/chunks/{classDiagram-ZZMXUADV-yvP3zMO3.js → classDiagram-ZZMXUADV-Co0jT9i-.js} +1 -1
  59. package/dist-embed/chunks/{classDiagram-ZZMXUADV-BQkO1UYr.js → classDiagram-ZZMXUADV-D6z_X195.js} +1 -1
  60. package/dist-embed/chunks/{classDiagram-f62afe4f-AYfpYKtp.js → classDiagram-f62afe4f-lN62p17q.js} +1 -1
  61. package/dist-embed/chunks/{classDiagram-v2-604399ef-BWyNcT_y.js → classDiagram-v2-604399ef-B_QJ6H8h.js} +1 -1
  62. package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-yvP3zMO3.js → classDiagram-v2-VYDZK3BY-Co0jT9i-.js} +1 -1
  63. package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-BQkO1UYr.js → classDiagram-v2-VYDZK3BY-D6z_X195.js} +1 -1
  64. package/dist-embed/chunks/{code-block-IT6T5CEO-F4BSIGY6.js → code-block-IT6T5CEO-BA38Km-f.js} +1 -1
  65. package/dist-embed/chunks/{component-DMQ8W8n1.js → component-Chor_J7e.js} +1 -1
  66. package/dist-embed/chunks/{cose-bilkent-JH36ORCC-C3HC0XIY.js → cose-bilkent-JH36ORCC-B5H1cwBa.js} +1 -1
  67. package/dist-embed/chunks/{cose-bilkent-JH36ORCC-MVxlcfpd.js → cose-bilkent-JH36ORCC-C3cTgEcU.js} +1 -1
  68. package/dist-embed/chunks/{createText-aed3d8b3-CEJODAXJ.js → createText-aed3d8b3-BtgHeyNs.js} +1 -1
  69. package/dist-embed/chunks/{cs-CZ-2BRQDIVT-BXQxcYp6.js → cs-CZ-2BRQDIVT-ClBKH9_y.js} +1 -1
  70. package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-DNRKTIHx.js → cynefinDiagram-5FMLGOSQ-DPQLh9z7.js} +1 -1
  71. package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-D87ENxS0.js → cynefinDiagram-5FMLGOSQ-sdsAonZm.js} +1 -1
  72. package/dist-embed/chunks/{da-DK-5WZEPLOC-Ck3vidj3.js → da-DK-5WZEPLOC-BqFDUAty.js} +1 -1
  73. package/dist-embed/chunks/{dagre-GXQ25YYZ-BOhThFKd.js → dagre-GXQ25YYZ-Bwf_WjLM.js} +1 -1
  74. package/dist-embed/chunks/{dagre-GXQ25YYZ-DscCD5Uq.js → dagre-GXQ25YYZ-DHF-9-7e.js} +1 -1
  75. package/dist-embed/chunks/{de-DE-XR44H4JA-CPZgrOuc.js → de-DE-XR44H4JA-6dsEQn7Z.js} +1 -1
  76. package/dist-embed/chunks/{diagram-S7CK7UJ4-zDQduoQy.js → diagram-S7CK7UJ4-C-N7Ei3I.js} +1 -1
  77. package/dist-embed/chunks/{diagram-S7CK7UJ4-CUhme3Bl.js → diagram-S7CK7UJ4-DEqGRBMT.js} +1 -1
  78. package/dist-embed/chunks/{diagram-UQ7AKVKN-BxhQPjAM.js → diagram-UQ7AKVKN-CvSBE0YU.js} +1 -1
  79. package/dist-embed/chunks/{diagram-UQ7AKVKN-Byi-v8UN.js → diagram-UQ7AKVKN-DACyxI-v.js} +1 -1
  80. package/dist-embed/chunks/{diagram-VSXAHHWV-au-v2v9D.js → diagram-VSXAHHWV-DFze2xro.js} +1 -1
  81. package/dist-embed/chunks/{diagram-VSXAHHWV-CqihYkDH.js → diagram-VSXAHHWV-DOb69VtE.js} +1 -1
  82. package/dist-embed/chunks/{diagram-VX7I27RA-Cd5PaF_n.js → diagram-VX7I27RA-8EKYM_Sx.js} +1 -1
  83. package/dist-embed/chunks/{diagram-VX7I27RA-ETzwrw79.js → diagram-VX7I27RA-CVTSdYyZ.js} +1 -1
  84. package/dist-embed/chunks/{diagram-Z3DM3KII-DkbsvY2A.js → diagram-Z3DM3KII-B-689FF6.js} +1 -1
  85. package/dist-embed/chunks/{diagram-Z3DM3KII-AcMuRFo5.js → diagram-Z3DM3KII-DyiBmBFy.js} +1 -1
  86. package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-DuWfMZcD.js → ebnfDiagram-PWID7BFC-DcKvqn_h.js} +1 -1
  87. package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-BrEs-SB2.js → ebnfDiagram-PWID7BFC-gj8dgCWR.js} +1 -1
  88. package/dist-embed/chunks/{edges-b2856ca0-Czd3-xvj.js → edges-b2856ca0-BqGGNnb4.js} +1 -1
  89. package/dist-embed/chunks/{el-GR-BZB4AONW-CjQSkw0P.js → el-GR-BZB4AONW-DOMW2ttY.js} +1 -1
  90. package/dist-embed/chunks/{erDiagram-5d81789a-JegaF4gy.js → erDiagram-5d81789a-Bf1Ik49K.js} +1 -1
  91. package/dist-embed/chunks/{erDiagram-RLTQ6QDP-xubaXuKR.js → erDiagram-RLTQ6QDP-B0PyZB_3.js} +1 -1
  92. package/dist-embed/chunks/{erDiagram-RLTQ6QDP-Cpn6_cd1.js → erDiagram-RLTQ6QDP-GSu-_IUJ.js} +1 -1
  93. package/dist-embed/chunks/{es-ES-U4NZUMDT-CQz3Tsxk.js → es-ES-U4NZUMDT-DeyWqjw1.js} +1 -1
  94. package/dist-embed/chunks/{eu-ES-A7QVB2H4-DPwxHXvP.js → eu-ES-A7QVB2H4-CUGbZ0Pv.js} +1 -1
  95. package/dist-embed/chunks/{fa-IR-HGAKTJCU-DlQyRFJP.js → fa-IR-HGAKTJCU-Br8UEVO1.js} +1 -1
  96. package/dist-embed/chunks/{fi-FI-Z5N7JZ37-BL9Dv0rT.js → fi-FI-Z5N7JZ37-BSHjwo8G.js} +1 -1
  97. package/dist-embed/chunks/{flowDb-185abca5-BN_8lgCO.js → flowDb-185abca5-U9PwWSO4.js} +1 -1
  98. package/dist-embed/chunks/{flowDiagram-1629c991-YRlRqB59.js → flowDiagram-1629c991-BecgzQgp.js} +1 -1
  99. package/dist-embed/chunks/{flowDiagram-HODETNUW-lW-icIxi.js → flowDiagram-HODETNUW-2vih3kWM.js} +1 -1
  100. package/dist-embed/chunks/{flowDiagram-HODETNUW-CzRvxVGK.js → flowDiagram-HODETNUW-tcAkcGh4.js} +1 -1
  101. package/dist-embed/chunks/{flowDiagram-v2-1d953310-DBFSFroi.js → flowDiagram-v2-1d953310-Bdmc9G3m.js} +1 -1
  102. package/dist-embed/chunks/{flowchart-elk-definition-6df44142-RjL83g27.js → flowchart-elk-definition-6df44142-oWOWsVNc.js} +1 -1
  103. package/dist-embed/chunks/{fr-FR-RHASNOE6-xB7HyFVv.js → fr-FR-RHASNOE6-BukqZYPz.js} +1 -1
  104. package/dist-embed/chunks/{ganttDiagram-3b0b3873-Dowe9cKl.js → ganttDiagram-3b0b3873-B7lmD9r9.js} +1 -1
  105. package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-CNQPBdAP.js → ganttDiagram-EL5Y4UJY-D0E7se_Z.js} +1 -1
  106. package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-CLaynGwe.js → ganttDiagram-EL5Y4UJY-DDbqMevq.js} +1 -1
  107. package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-CupHqYWl.js → gitGraphDiagram-WWUBYQGX-DK3EJl5z.js} +1 -1
  108. package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-CDuBbPX3.js → gitGraphDiagram-WWUBYQGX-DnVwXJWu.js} +1 -1
  109. package/dist-embed/chunks/{gitGraphDiagram-f01e8bc2-C06Sje1n.js → gitGraphDiagram-f01e8bc2-B9vpLy6R.js} +1 -1
  110. package/dist-embed/chunks/{gl-ES-HMX3MZ6V-BX50ltap.js → gl-ES-HMX3MZ6V-BxVOJiaI.js} +1 -1
  111. package/dist-embed/chunks/{he-IL-6SHJWFNN-DR3hLzYG.js → he-IL-6SHJWFNN-Dv2VRxlJ.js} +1 -1
  112. package/dist-embed/chunks/{hi-IN-IWLTKZ5I-C3bSDqVc.js → hi-IN-IWLTKZ5I-CFo5RUMz.js} +1 -1
  113. package/dist-embed/chunks/{hu-HU-A5ZG7DT2--mRUDQG6.js → hu-HU-A5ZG7DT2-ul3dS3un.js} +1 -1
  114. package/dist-embed/chunks/{id-ID-SAP4L64H-D6psdwdp.js → id-ID-SAP4L64H-ItVb-zwI.js} +1 -1
  115. package/dist-embed/chunks/{index-qsUgit40.js → index-7FNjj0f2.js} +1 -1
  116. package/dist-embed/chunks/{index-9bae90f3-BY7E8HZU.js → index-9bae90f3-D9849sgo.js} +1 -1
  117. package/dist-embed/chunks/{index-DToDguC3.js → index-B-L6ocEV.js} +1 -1
  118. package/dist-embed/chunks/{index-C01nR1dW.js → index-B0wMyD8Y.js} +1 -1
  119. package/dist-embed/chunks/{index-BzXMsI1v.js → index-B5zrJYwn.js} +6 -6
  120. package/dist-embed/chunks/{index-DcZQ2Oqj.js → index-B764si9c.js} +1 -1
  121. package/dist-embed/chunks/{index-3O3ob63z.js → index-BM6oRiO1.js} +1 -1
  122. package/dist-embed/chunks/{index-DVUMPcVw.js → index-BNFRRs9d.js} +1 -1
  123. package/dist-embed/chunks/{index-D0DBuFMt.js → index-BOYhJnrD.js} +1 -1
  124. package/dist-embed/chunks/{index-CA8D7U2s.js → index-BT4vYFeY.js} +1 -1
  125. package/dist-embed/chunks/{index-C8IekrmL.js → index-BfUXEHI0.js} +1 -1
  126. package/dist-embed/chunks/{index-DvWWLOj6.js → index-BiTIdbkn.js} +1 -1
  127. package/dist-embed/chunks/{index-BhU2ra4k.js → index-BkKEXqQS.js} +1 -1
  128. package/dist-embed/chunks/{index-CpcHHQd7.js → index-BqMoyzEk.js} +1 -1
  129. package/dist-embed/chunks/{index-D1lY79hS.js → index-BrD9dtoV.js} +1 -1
  130. package/dist-embed/chunks/{index-B063q-PC.js → index-CRpZyQIR.js} +4 -4
  131. package/dist-embed/chunks/{index-BblwlEJB.js → index-CZdWsyNw.js} +1 -1
  132. package/dist-embed/chunks/{index-Azo_wV3K.js → index-CjM49jS0.js} +1 -1
  133. package/dist-embed/chunks/{index-rfsiH_M6.js → index-Cp2aJ2ZR.js} +1 -1
  134. package/dist-embed/chunks/{index-Cknn3VQD.js → index-Cql9gOsL.js} +1 -1
  135. package/dist-embed/chunks/{index-jy9kOmqu.js → index-CsgaCZaW.js} +1 -1
  136. package/dist-embed/chunks/{index-DB46n9Tf.js → index-CsxlyZef.js} +1 -1
  137. package/dist-embed/chunks/{index-MTdX216X.js → index-D2LvuQlP.js} +1 -1
  138. package/dist-embed/chunks/{index-s3hayhRS.js → index-DQQXY-7d.js} +2 -2
  139. package/dist-embed/chunks/{index-B0KVfQGJ.js → index-DSF21-29.js} +1 -1
  140. package/dist-embed/chunks/{index-BYMZi_1t.js → index-DSvebR7d.js} +1 -1
  141. package/dist-embed/chunks/{index-a51XM5L8.js → index-DoBEQ07P.js} +3 -3
  142. package/dist-embed/chunks/{index-kpqZuE4J.js → index-O2jaI8TY.js} +1 -1
  143. package/dist-embed/chunks/{index-C6wF35Kk.js → index-QZ3sHHT3.js} +1 -1
  144. package/dist-embed/chunks/{index-BlWZloLe.js → index-TEcp7-f6.js} +2 -2
  145. package/dist-embed/chunks/{index-EpYurdzk.js → index-YlGTgJvL.js} +5 -5
  146. package/dist-embed/chunks/{index-CUL9WiLS.js → index-bm8APcDZ.js} +1 -1
  147. package/dist-embed/chunks/{index-BipXK1tF.js → index-jh9S19of.js} +1 -1
  148. package/dist-embed/chunks/{index-C643Hfu1.js → index-oGqh9y23.js} +1 -1
  149. package/dist-embed/chunks/{index-BdvS7Q4t.js → index-xiH3WzLm.js} +1 -1
  150. package/dist-embed/chunks/{index.esm-CWygaJYM.js → index.esm-B7KoTOBb.js} +1 -1
  151. package/dist-embed/chunks/{index.esm-DYeUXS4c.js → index.esm-CkSite-X.js} +1 -1
  152. package/dist-embed/chunks/{infoDiagram-27XIBGKW-Ctm-zk09.js → infoDiagram-27XIBGKW-DDO50Ria.js} +1 -1
  153. package/dist-embed/chunks/{infoDiagram-27XIBGKW-DRzH33_4.js → infoDiagram-27XIBGKW-O3q53Qe2.js} +1 -1
  154. package/dist-embed/chunks/{infoDiagram-a29d40f1-c78-ZMuT.js → infoDiagram-a29d40f1-jOvOHUyu.js} +1 -1
  155. package/dist-embed/chunks/{isEqual-niFNV5MZ.js → isEqual-CGLTk7wU.js} +1 -1
  156. package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-DKv5KL85.js → ishikawaDiagram-5VMMS53U-DuiWhpVW.js} +1 -1
  157. package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-CILSTTqm.js → ishikawaDiagram-5VMMS53U-IzmbYzxv.js} +1 -1
  158. package/dist-embed/chunks/{it-IT-JPQ66NNP-BfrG_atL.js → it-IT-JPQ66NNP-BuCUBzia.js} +1 -1
  159. package/dist-embed/chunks/{ja-JP-DBVTYXUO-sahpmNGY.js → ja-JP-DBVTYXUO-BhtQz4sy.js} +1 -1
  160. package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-CSMQRlsr.js → journeyDiagram-3NMN7TZE-DGLcsVfC.js} +1 -1
  161. package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-DlMPiHSP.js → journeyDiagram-3NMN7TZE-sO-Cfp65.js} +1 -1
  162. package/dist-embed/chunks/{journeyDiagram-95396277-VzHClVrX.js → journeyDiagram-95396277-CA4bGq0G.js} +1 -1
  163. package/dist-embed/chunks/{kaa-6HZHGXH3-BrkhtXQj.js → kaa-6HZHGXH3-B_TI8Aa0.js} +1 -1
  164. package/dist-embed/chunks/{kab-KAB-ZGHBKWFO-DwtFIV_I.js → kab-KAB-ZGHBKWFO-BsSg_l-j.js} +1 -1
  165. package/dist-embed/chunks/{kanban-definition-UXKFOSKX-BkxvAXq2.js → kanban-definition-UXKFOSKX-0wjvwDqk.js} +1 -1
  166. package/dist-embed/chunks/{kanban-definition-UXKFOSKX-esf1amn7.js → kanban-definition-UXKFOSKX-CDtLkjnU.js} +1 -1
  167. package/dist-embed/chunks/{kk-KZ-P5N5QNE5-UxN1LGH5.js → kk-KZ-P5N5QNE5-B7XK5OQq.js} +1 -1
  168. package/dist-embed/chunks/{km-KH-HSX4SM5Z-B7lolfpy.js → km-KH-HSX4SM5Z-Cm2LA9F8.js} +1 -1
  169. package/dist-embed/chunks/{ko-KR-MTYHY66A-CnxefCaN.js → ko-KR-MTYHY66A-CL5s99y5.js} +1 -1
  170. package/dist-embed/chunks/{ku-TR-6OUDTVRD-Bt7bmFnv.js → ku-TR-6OUDTVRD-CiijvKHq.js} +1 -1
  171. package/dist-embed/chunks/{layout-D7Mk1riq.js → layout-BBbB54WC.js} +1 -1
  172. package/dist-embed/chunks/{layout-Sl9Lf6Ae.js → layout-CzrlbzeK.js} +1 -1
  173. package/dist-embed/chunks/{lexicalHooks-DKF-DsxG.js → lexicalHooks-DQxNZEiJ.js} +1 -1
  174. package/dist-embed/chunks/{lt-LT-XHIRWOB4-D6qkXs9m.js → lt-LT-XHIRWOB4-CcA_Z5jR.js} +1 -1
  175. package/dist-embed/chunks/{lv-LV-5QDEKY6T-D8g27j86.js → lv-LV-5QDEKY6T-CAQS9wGm.js} +1 -1
  176. package/dist-embed/chunks/{mermaid.core-BhiOhb5K.js → mermaid.core-DfgoT1cz.js} +3 -3
  177. package/dist-embed/chunks/{mermaid.core-CRlujv29.js → mermaid.core-s-D09gpV.js} +5 -5
  178. package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-eCxs0BsL.js → mindmap-definition-YA3MSWOX-B6_K5ZvV.js} +1 -1
  179. package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-BJQsz4H1.js → mindmap-definition-YA3MSWOX-BCiSPRJk.js} +1 -1
  180. package/dist-embed/chunks/{mindmap-definition-e4c1d938-DoGG9eDO.js → mindmap-definition-e4c1d938-D7gmABiC.js} +1 -1
  181. package/dist-embed/chunks/{mr-IN-CRQNXWMA-CMbVGyJm.js → mr-IN-CRQNXWMA-DMAAvsDA.js} +1 -1
  182. package/dist-embed/chunks/{my-MM-5M5IBNSE-B-KPsx1j.js → my-MM-5M5IBNSE-t2TKqrjW.js} +1 -1
  183. package/dist-embed/chunks/{nb-NO-T6EIAALU-Cl7QLAt7.js → nb-NO-T6EIAALU-Bi3ZI-HQ.js} +1 -1
  184. package/dist-embed/chunks/{nl-NL-IS3SIHDZ-Brzte_o2.js → nl-NL-IS3SIHDZ-B8UdlW1K.js} +1 -1
  185. package/dist-embed/chunks/{nn-NO-6E72VCQL-CzCKEx02.js → nn-NO-6E72VCQL-Bt87hI27.js} +1 -1
  186. package/dist-embed/chunks/{oc-FR-POXYY2M6-DA72PkVY.js → oc-FR-POXYY2M6-009NL0Pk.js} +1 -1
  187. package/dist-embed/chunks/{pa-IN-N4M65BXN-CzkFYtL0.js → pa-IN-N4M65BXN-BfUtS2yt.js} +1 -1
  188. package/dist-embed/chunks/{pegDiagram-XKGWAZYB-CD3xZvKE.js → pegDiagram-XKGWAZYB-BX0ZYMng.js} +1 -1
  189. package/dist-embed/chunks/{pegDiagram-XKGWAZYB-CV-d6HkK.js → pegDiagram-XKGWAZYB-CBrnWUaX.js} +1 -1
  190. package/dist-embed/chunks/{percentages-BXMCSKIN-mjCCp4uI.js → percentages-BXMCSKIN-CfzulzOv.js} +5 -5
  191. package/dist-embed/chunks/{pieDiagram-E7YTZNPT-toANOh_O.js → pieDiagram-E7YTZNPT-B1My5W85.js} +1 -1
  192. package/dist-embed/chunks/{pieDiagram-E7YTZNPT-DipS--g7.js → pieDiagram-E7YTZNPT-Ct8dzoLU.js} +1 -1
  193. package/dist-embed/chunks/{pieDiagram-c941bede-DytniBrW.js → pieDiagram-c941bede-7DZ-Bl8U.js} +1 -1
  194. package/dist-embed/chunks/{pl-PL-T2D74RX3-F4ebFTYK.js → pl-PL-T2D74RX3-DbtOl9_x.js} +1 -1
  195. package/dist-embed/chunks/{pt-BR-5N22H2LF-B5i8LuE4.js → pt-BR-5N22H2LF-B1pjR1_T.js} +1 -1
  196. package/dist-embed/chunks/{pt-PT-UZXXM6DQ-BQ7hfRRg.js → pt-PT-UZXXM6DQ-takC7TRa.js} +1 -1
  197. package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-D_j5dzK-.js → quadrantDiagram-AXDQQJYC-B1mlT7fN.js} +1 -1
  198. package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-DlhtjZ-k.js → quadrantDiagram-AXDQQJYC-B7p4unpj.js} +1 -1
  199. package/dist-embed/chunks/{quadrantDiagram-cf8b8fe0-BQ2yjLYu.js → quadrantDiagram-cf8b8fe0-CTMh_Ad5.js} +1 -1
  200. package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-CZFkdwSz.js → railroadDiagram-O6MQD6OU-CJEwr5d9.js} +1 -1
  201. package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-aWlxxhLc.js → railroadDiagram-O6MQD6OU-xr8bPIl7.js} +1 -1
  202. package/dist-embed/chunks/{renderer-2D5v6hpK.js → renderer-Ba0Cwb4p.js} +1 -1
  203. package/dist-embed/chunks/{requirementDiagram-53bda41b-CWV_b9FE.js → requirementDiagram-53bda41b-Dv1Piop_.js} +1 -1
  204. package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-EVwiX2gg.js → requirementDiagram-BXWQKSXE-Bw89vFiC.js} +1 -1
  205. package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-BSF51uZZ.js → requirementDiagram-BXWQKSXE-rabT3v-j.js} +1 -1
  206. package/dist-embed/chunks/{ro-RO-JPDTUUEW-BdcZRS6h.js → ro-RO-JPDTUUEW-DkkqyFBF.js} +1 -1
  207. package/dist-embed/chunks/{ru-RU-B4JR7IUQ-Cta1z8f6.js → ru-RU-B4JR7IUQ-CikD-ITp.js} +1 -1
  208. package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-BqD6w06O.js → sankeyDiagram-P5KCCOFB-5SpI76uK.js} +1 -1
  209. package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-t6rHaBZJ.js → sankeyDiagram-P5KCCOFB-D--cx9I2.js} +1 -1
  210. package/dist-embed/chunks/{sankeyDiagram-c3ef121a-C9O52Zx9.js → sankeyDiagram-c3ef121a-DbhtSWkB.js} +1 -1
  211. package/dist-embed/chunks/{sequenceDiagram-82a5b84f-Dga-BwWi.js → sequenceDiagram-82a5b84f-DpxBSKAk.js} +1 -1
  212. package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-ih6W0378.js → sequenceDiagram-WJ2MYXX4-DGNwWgf8.js} +1 -1
  213. package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-DphVeQVS.js → sequenceDiagram-WJ2MYXX4-D_wK-z7a.js} +1 -1
  214. package/dist-embed/chunks/{sessions-APuuDN3K.js → sessions-DQkTozai.js} +1 -1
  215. package/dist-embed/chunks/{si-LK-N5RQ5JYF-DYy_OKHx.js → si-LK-N5RQ5JYF-BqlWRhwK.js} +1 -1
  216. package/dist-embed/chunks/{sizeCapture-INFHLROL-o0dzt8-T.js → sizeCapture-INFHLROL-4Uh8JUjf.js} +1 -1
  217. package/dist-embed/chunks/{sizeCapture-INFHLROL-CxIMCruL.js → sizeCapture-INFHLROL-g-K-6XON.js} +1 -1
  218. package/dist-embed/chunks/{sk-SK-C5VTKIMK-B4A8rgzq.js → sk-SK-C5VTKIMK-DGsmi02E.js} +1 -1
  219. package/dist-embed/chunks/{sl-SI-NN7IZMDC-Dn2yU1RA.js → sl-SI-NN7IZMDC-HFz45GOs.js} +1 -1
  220. package/dist-embed/chunks/{stateDiagram-43e79a5f-RBFnM6HD.js → stateDiagram-43e79a5f-DxbV4jP9.js} +1 -1
  221. package/dist-embed/chunks/{stateDiagram-D77RDMKH-R5RRRvFY.js → stateDiagram-D77RDMKH-C_wYpqah.js} +1 -1
  222. package/dist-embed/chunks/{stateDiagram-D77RDMKH-DUbaZs3a.js → stateDiagram-D77RDMKH-D-l3u-WY.js} +1 -1
  223. package/dist-embed/chunks/{stateDiagram-v2-2041ed4f-O5FpnsEz.js → stateDiagram-v2-2041ed4f-BzxzaDdI.js} +1 -1
  224. package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-xKTLvXGN.js → stateDiagram-v2-MP3YSRHH-BGYkOvTS.js} +1 -1
  225. package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-CxTXB7mT.js → stateDiagram-v2-MP3YSRHH-IEMNMwm0.js} +1 -1
  226. package/dist-embed/chunks/{styles-455b33cd-D4Xv2qYx.js → styles-455b33cd-C42Lyulv.js} +1 -1
  227. package/dist-embed/chunks/{styles-f932cba9-BRIqeB8k.js → styles-f932cba9-Bf6H3IMq.js} +1 -1
  228. package/dist-embed/chunks/{styles-fcc2142b-CSNd2DtU.js → styles-fcc2142b-OZg6fE-p.js} +1 -1
  229. package/dist-embed/chunks/{subset-shared.chunk-SugOGKH0.js → subset-shared.chunk-KC0vshev.js} +1 -1
  230. package/dist-embed/chunks/{subset-worker.chunk-CHn-RJwQ.js → subset-worker.chunk-CXZAV_Z5.js} +1 -1
  231. package/dist-embed/chunks/{sv-SE-XGPEYMSR-DIGNKjA1.js → sv-SE-XGPEYMSR-yEdPvwHy.js} +1 -1
  232. package/dist-embed/chunks/{svgDrawCommon-148a3cd9-ioBjWI45.js → svgDrawCommon-148a3cd9-D9MRwoYw.js} +1 -1
  233. package/dist-embed/chunks/{swimlanes-42K2YHIH-DID4P1mJ.js → swimlanes-42K2YHIH-CPkom4Q8.js} +1 -1
  234. package/dist-embed/chunks/{swimlanes-42K2YHIH-BPXSOfWl.js → swimlanes-42K2YHIH-DJLFcHMt.js} +1 -1
  235. package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-C5LAWW5q.js → swimlanesDiagram-VR7AAH4N-BJOhuN-y.js} +1 -1
  236. package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-B216TpFb.js → swimlanesDiagram-VR7AAH4N-BRTtY1QX.js} +1 -1
  237. package/dist-embed/chunks/{ta-IN-2NMHFXQM-h5n2V9ms.js → ta-IN-2NMHFXQM-0i424YGX.js} +1 -1
  238. package/dist-embed/chunks/{th-TH-HPSO5L25-DPUFV7b6.js → th-TH-HPSO5L25-BidF5zNO.js} +1 -1
  239. package/dist-embed/chunks/{timeline-definition-24CTP7MA-CsrTDzso.js → timeline-definition-24CTP7MA-BasSLg-_.js} +1 -1
  240. package/dist-embed/chunks/{timeline-definition-24CTP7MA-Y3tUsmSp.js → timeline-definition-24CTP7MA-BfGIJi1H.js} +1 -1
  241. package/dist-embed/chunks/{timeline-definition-7545f45a-Dwe7O50H.js → timeline-definition-7545f45a-BWwgvKxJ.js} +1 -1
  242. package/dist-embed/chunks/{tr-TR-DEFEU3FU-BezJkdMx.js → tr-TR-DEFEU3FU-BoHR9SlC.js} +1 -1
  243. package/dist-embed/chunks/{uk-UA-QMV73CPH-CqILlosm.js → uk-UA-QMV73CPH-DfRkqqO0.js} +1 -1
  244. package/dist-embed/chunks/{vennDiagram-4TSXK5OY-BhVdyHxt.js → vennDiagram-4TSXK5OY-D1T__rd2.js} +1 -1
  245. package/dist-embed/chunks/{vennDiagram-4TSXK5OY-ClTlC2ql.js → vennDiagram-4TSXK5OY-DMIYCfJ-.js} +1 -1
  246. package/dist-embed/chunks/{vi-VN-M7AON7JQ-CnkPVQ0a.js → vi-VN-M7AON7JQ-CvZ4wpTw.js} +1 -1
  247. package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-kS16z5iB.js → wardleyDiagram-VM6X3IG4-CiKuFI26.js} +1 -1
  248. package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-DbWIMpvU.js → wardleyDiagram-VM6X3IG4-DtlNUHLy.js} +1 -1
  249. package/dist-embed/chunks/{xychartDiagram-3f383b91-DYoT_EjG.js → xychartDiagram-3f383b91-DzyuxW4K.js} +1 -1
  250. package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-KeQp-cQ1.js → xychartDiagram-S5SC5T6Z-BIeFUHrS.js} +1 -1
  251. package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-CdwuwQAF.js → xychartDiagram-S5SC5T6Z-p6pYRkk6.js} +1 -1
  252. package/dist-embed/chunks/{zh-CN-LNUGB5OW-CNdfctAT.js → zh-CN-LNUGB5OW-Cx1Azgu2.js} +1 -1
  253. package/dist-embed/chunks/{zh-HK-E62DVLB3-DEXwa5-T.js → zh-HK-E62DVLB3-DMjy1d4Z.js} +1 -1
  254. package/dist-embed/chunks/{zh-TW-RAJ6MFWO-BF7cCYAK.js → zh-TW-RAJ6MFWO-J-YjINmR.js} +1 -1
  255. package/dist-embed/datalayer-app-main.js +22 -22
  256. package/lib/apps/apps/appspec.d.ts +10 -1
  257. package/lib/apps/apps/appspec.js +104 -7
  258. package/lib/apps/core/index.d.ts +26 -0
  259. package/lib/apps/core/index.js +20 -0
  260. package/lib/apps/plugins/chat/ChatView.js +21 -4
  261. package/lib/protocols/mcp/client.d.ts +73 -0
  262. package/lib/protocols/mcp/client.js +136 -0
  263. package/lib/protocols/mcp/index.d.ts +1 -0
  264. package/lib/protocols/mcp/index.js +3 -1
  265. package/lib/protocols/web-bot-auth/tap.d.ts +56 -0
  266. package/lib/protocols/web-bot-auth/tap.js +185 -0
  267. package/lib/specs/apps.js +56 -26
  268. package/lib/specs/appspecSchema.js +180 -5
  269. package/lib/specs/protocols.js +5 -5
  270. package/lib/types/agentspecs.d.ts +66 -3
  271. package/package.json +3 -1
  272. package/dist-embed/chunks/ChatView-B3QqHhAP.js +0 -32
@@ -921,7 +921,7 @@ export const APPSPEC_SCHEMA = {
921
921
  },
922
922
  AppPact: {
923
923
  additionalProperties: false,
924
- description: 'PACT: the businesses it asks for each person (AGENT_PROTOCOLS PI-01).',
924
+ description: 'PACT: the businesses it asks for each person (AGENT_PROTOCOLS PI-01), and\nwhether it answers as one (PR-13).',
925
925
  properties: {
926
926
  connections: {
927
927
  description: 'Businesses, over PACT',
@@ -931,10 +931,50 @@ export const APPSPEC_SCHEMA = {
931
931
  title: 'Connections',
932
932
  type: 'array',
933
933
  },
934
+ business: {
935
+ $ref: '#/$defs/AppPactBusiness',
936
+ description: 'As a business',
937
+ },
934
938
  },
935
939
  title: 'AppPact',
936
940
  type: 'object',
937
941
  },
942
+ AppPactBusiness: {
943
+ additionalProperties: false,
944
+ description: "The application answers as a PACT business (AGENT_PROTOCOLS PR-13, PI-32; decided 2026-10-13).\n\nPublished at its deployment's own address: its A2A Agent Card names\nDatalayer as the Provider and the application's owner as the Brand; its\nA2A interface verifies each personal-agent JWT against a registered\nissuer's keys (§3.1); with `scopes`, a person delegates to a personal agent\nthrough the Provider's device-code sign-in — their Datalayer sign-in — and\nevery answer under their delegation carries a signed receipt (§5).",
945
+ properties: {
946
+ enabled: {
947
+ default: false,
948
+ description: 'Whether it is published as a business at Ship',
949
+ title: 'Enabled',
950
+ type: 'boolean',
951
+ },
952
+ brand: {
953
+ default: '',
954
+ description: "The Brand's name on its card: the application's `owner` when unsaid",
955
+ title: 'Brand',
956
+ type: 'string',
957
+ },
958
+ scopes: {
959
+ additionalProperties: {
960
+ type: 'string',
961
+ },
962
+ description: 'What a person may let a personal agent do, `{scope: what the person is shown}`: `bookings:read: See your bookings`; none, it answers personal agents alone',
963
+ title: 'Scopes',
964
+ type: 'object',
965
+ },
966
+ registered_agents: {
967
+ description: 'The personal agents it accepts, each its issuer and its keys',
968
+ items: {
969
+ $ref: '#/$defs/AppPactRegisteredAgent',
970
+ },
971
+ title: 'Registered Agents',
972
+ type: 'array',
973
+ },
974
+ },
975
+ title: 'AppPactBusiness',
976
+ type: 'object',
977
+ },
938
978
  AppPactConnection: {
939
979
  additionalProperties: false,
940
980
  description: "A business the application asks for each person, over PACT 1.0 (AGENT_PROTOCOLS PI-01).\n\nThe Brand is named by its domain — its Agent Card is at\n`https://<brand>/.well-known/agent-card.json` (PACT §2.1) — and its\nProvider's `audience`, which the Provider assigns at registration and\nthe personal-agent JWT carries (§3.1). Always in each person's own name:\nPACT acts for a person. No credential is ever part of a spec.",
@@ -972,6 +1012,25 @@ export const APPSPEC_SCHEMA = {
972
1012
  title: 'AppPactConnection',
973
1013
  type: 'object',
974
1014
  },
1015
+ AppPactRegisteredAgent: {
1016
+ additionalProperties: false,
1017
+ description: 'A personal agent the business accepts (PACT 1.0 §3.1): its issuer, and where its keys are.\n\nRegistered by the Maker, as `pap.company.registered_agents` (AGENT_PROTOCOLS PR-13,\ndecided 2026-10-13): a personal-agent JWT is verified against the keys of a registered\nissuer only, and any other is refused.',
1018
+ properties: {
1019
+ issuer: {
1020
+ description: "The personal agent's `iss`, an HTTPS URL",
1021
+ title: 'Issuer',
1022
+ type: 'string',
1023
+ },
1024
+ jwks_uri: {
1025
+ description: 'Where its public keys are (a JWKS), an HTTPS URL',
1026
+ title: 'Jwks Uri',
1027
+ type: 'string',
1028
+ },
1029
+ },
1030
+ required: ['issuer', 'jwks_uri'],
1031
+ title: 'AppPactRegisteredAgent',
1032
+ type: 'object',
1033
+ },
975
1034
  AppPage: {
976
1035
  additionalProperties: false,
977
1036
  description: "A widget's page written in its code (LOOP P-05): `@app.page`.\n\nIts inputs are a form, drawn on the page; as one changes, the function\nof its code runs again on them and the page shows what it returned, in\nplace. Without its file nothing runs it, and validation says so.",
@@ -1057,8 +1116,22 @@ export const APPSPEC_SCHEMA = {
1057
1116
  },
1058
1117
  AppPap: {
1059
1118
  additionalProperties: false,
1060
- description: 'Personal Agent Protocol: the companies it works with, and whether it is one.',
1119
+ description: 'Personal Agent Protocol: the companies it works with, and whether it is one.\n\nA `pap` block names the profile it is written for (PAP_DATALAYER S-03): one\nDatalayer speaks, or it is refused in a sentence. An application without the\nblock has none.',
1061
1120
  properties: {
1121
+ profile: {
1122
+ anyOf: [
1123
+ {
1124
+ const: 'draft-01',
1125
+ type: 'string',
1126
+ },
1127
+ {
1128
+ type: 'null',
1129
+ },
1130
+ ],
1131
+ default: null,
1132
+ description: 'The Personal Agent Protocol profile it is written for: `draft-01`',
1133
+ title: 'Profile',
1134
+ },
1062
1135
  connections: {
1063
1136
  description: 'Companies, as a personal agent',
1064
1137
  items: {
@@ -1203,7 +1276,7 @@ export const APPSPEC_SCHEMA = {
1203
1276
  },
1204
1277
  AppPapOperation: {
1205
1278
  additionalProperties: false,
1206
- description: "Something a personal agent may ask the application to do for the person,\ndone only once they confirm its exact terms (PAP_DATALAYER B-04, Operations v1).\n\nAsked by a personal agent, the application's agent does not call `tool`:\nthe call is proposed, its arguments the terms, and the person confirms\nthat revision before the tool runs, with those arguments and only once.",
1279
+ description: "Something a personal agent may ask the application to do for the person,\ndone only once they confirm its exact terms (PAP_DATALAYER B-04, Operations v1).\n\nAsked by a personal agent, the application's agent does not call `tool`:\nthe call is proposed, its arguments the terms, and the person confirms\nthat revision before the tool runs, with those arguments and only once.\nAn operation that `allows` instead gives a standing permission once the\nperson confirms it (R-07): it calls no tool, and is asked for through the\napplication's API or its server for agents.",
1207
1280
  properties: {
1208
1281
  action: {
1209
1282
  description: "The action's name at this company, e.g. `orders.exchange`",
@@ -1211,9 +1284,29 @@ export const APPSPEC_SCHEMA = {
1211
1284
  type: 'string',
1212
1285
  },
1213
1286
  tool: {
1287
+ anyOf: [
1288
+ {
1289
+ type: 'string',
1290
+ },
1291
+ {
1292
+ type: 'null',
1293
+ },
1294
+ ],
1295
+ default: null,
1214
1296
  description: "The application's tool that does it, called with the terms",
1215
1297
  title: 'Tool',
1216
- type: 'string',
1298
+ },
1299
+ allows: {
1300
+ anyOf: [
1301
+ {
1302
+ $ref: '#/$defs/AppPapStanding',
1303
+ },
1304
+ {
1305
+ type: 'null',
1306
+ },
1307
+ ],
1308
+ default: null,
1309
+ description: 'Instead of a tool: the standing permission confirming it gives (R-07)',
1217
1310
  },
1218
1311
  summary: {
1219
1312
  description: 'What the person is shown, with `{term}` for each term, e.g. `Exchange order {order_id} for size {size}`; never written by the model',
@@ -1227,10 +1320,86 @@ export const APPSPEC_SCHEMA = {
1227
1320
  type: 'boolean',
1228
1321
  },
1229
1322
  },
1230
- required: ['action', 'tool', 'summary'],
1323
+ required: ['action', 'summary'],
1231
1324
  title: 'AppPapOperation',
1232
1325
  type: 'object',
1233
1326
  },
1327
+ AppPapStanding: {
1328
+ additionalProperties: false,
1329
+ description: "An operation whose effect is a standing permission (PAP_DATALAYER R-07, the Ledgerly pattern).\n\nConfirmed by the person, it is recorded as the approval in advance they\nwould give in Datalayer: this application may confirm, at the company of\none of its own connections and in the person's account there, operations\nof that class whose terms stay within these limits, so many times, for so\nmany days — and the person reads it back and withdraws it there.",
1330
+ properties: {
1331
+ connection: {
1332
+ description: 'The id of its own company connection the permission is used at',
1333
+ title: 'Connection',
1334
+ type: 'string',
1335
+ },
1336
+ action: {
1337
+ $ref: '#/$defs/PapStandingAction',
1338
+ description: 'What confirming there does: `write`, or `buy`',
1339
+ },
1340
+ limits: {
1341
+ description: 'Every term bounded, 1 to 20',
1342
+ items: {
1343
+ $ref: '#/$defs/AppPapStandingLimit',
1344
+ },
1345
+ title: 'Limits',
1346
+ type: 'array',
1347
+ },
1348
+ uses: {
1349
+ description: 'The term of this operation giving how many times, at most',
1350
+ title: 'Uses',
1351
+ type: 'string',
1352
+ },
1353
+ days: {
1354
+ description: 'The term of this operation giving for how many days, at most 90',
1355
+ title: 'Days',
1356
+ type: 'string',
1357
+ },
1358
+ },
1359
+ required: ['connection', 'action', 'limits', 'uses', 'days'],
1360
+ title: 'AppPapStanding',
1361
+ type: 'object',
1362
+ },
1363
+ AppPapStandingLimit: {
1364
+ additionalProperties: false,
1365
+ description: "One bound of a standing permission: a term of the other company's operations,\nbounded by a term of this one — its maximum, or the one value allowed.",
1366
+ properties: {
1367
+ path: {
1368
+ description: "The other company's term, by its dotted path: `amount.amount`, `payee`",
1369
+ title: 'Path',
1370
+ type: 'string',
1371
+ },
1372
+ maximum: {
1373
+ anyOf: [
1374
+ {
1375
+ type: 'string',
1376
+ },
1377
+ {
1378
+ type: 'null',
1379
+ },
1380
+ ],
1381
+ default: null,
1382
+ description: 'The term of this operation giving its maximum',
1383
+ title: 'Maximum',
1384
+ },
1385
+ allowed: {
1386
+ anyOf: [
1387
+ {
1388
+ type: 'string',
1389
+ },
1390
+ {
1391
+ type: 'null',
1392
+ },
1393
+ ],
1394
+ default: null,
1395
+ description: 'The term of this operation giving the value allowed',
1396
+ title: 'Allowed',
1397
+ },
1398
+ },
1399
+ required: ['path'],
1400
+ title: 'AppPapStandingLimit',
1401
+ type: 'object',
1402
+ },
1234
1403
  AppPermissions: {
1235
1404
  additionalProperties: false,
1236
1405
  description: 'What the application may reach beside its connections. Nothing, unless said.',
@@ -2209,6 +2378,12 @@ export const APPSPEC_SCHEMA = {
2209
2378
  title: 'PapSignIn',
2210
2379
  type: 'string',
2211
2380
  },
2381
+ PapStandingAction: {
2382
+ description: "What a standing permission lets the application confirm at another company (R-02's classes).",
2383
+ enum: ['write', 'buy'],
2384
+ title: 'PapStandingAction',
2385
+ type: 'string',
2386
+ },
2212
2387
  RecordItem: {
2213
2388
  description: 'What an application may keep of what it did.',
2214
2389
  enum: [
@@ -128,16 +128,16 @@ export const TAP_PROTOCOL_0_0_1 = {
128
128
  id: 'tap',
129
129
  version: '0.0.1',
130
130
  name: 'Trusted Agent Protocol',
131
- description: 'An agent-recognition profile over Web Bot Auth for merchants. Planned: nothing is built until its profile is confirmed.',
131
+ description: "An agent-recognition profile over Web Bot Auth for merchants: a signature tagged agent-browser-auth to browse or agent-payer-auth to pay. Built as a draft from Visa's public Merchant Specifications (2026-10-13) in agent-runtimes; planned for applications until Visa confirms it.",
132
132
  publisher: 'Visa',
133
133
  layer: 'identity',
134
- specUrl: 'https://developer.visa.com',
135
- specVersion: 'none yet',
134
+ specUrl: 'https://developer.visa.com/capabilities/trusted-agent-protocol/trusted-agent-protocol-specifications',
135
+ specVersion: 'draft (Merchant Specifications, read 2026-10-13)',
136
136
  status: 'planned',
137
137
  connects: 'Merchants that recognise an agent by its signature',
138
138
  packages: {
139
- python: [],
140
- typescript: [],
139
+ python: ['agent-runtimes'],
140
+ typescript: ['@datalayer/agent-runtimes', 'http-message-sig'],
141
141
  },
142
142
  protocolTools: [],
143
143
  };
@@ -499,23 +499,62 @@ export interface AppPapCompanySpec {
499
499
  */
500
500
  operations: AppPapOperationSpec[];
501
501
  }
502
+ /**
503
+ * One bound of a standing permission (PAP_DATALAYER R-07): a term of the other
504
+ * company's operations, by its dotted path, bounded by a term of this one —
505
+ * its maximum, or the one value allowed (one of the two).
506
+ */
507
+ export interface AppPapStandingLimitSpec {
508
+ path: string;
509
+ maximum?: string;
510
+ allowed?: string;
511
+ }
512
+ /**
513
+ * What an operation gives instead of calling a tool (PAP_DATALAYER R-07, the
514
+ * Ledgerly pattern): once the person confirms it, the application may confirm,
515
+ * at one of its own company connections and in their account there, what stays
516
+ * within these bounds — recorded as the approval in advance they would give in
517
+ * Datalayer.
518
+ */
519
+ export interface AppPapStandingSpec {
520
+ /** The id of one of its own company connections (`as: user`, `write`). */
521
+ connection: string;
522
+ /** What confirming there does. */
523
+ action: 'write' | 'buy';
524
+ /** Every term bounded, 1 to 20. */
525
+ limits: AppPapStandingLimitSpec[];
526
+ /** The term of this operation giving how many times, at most. */
527
+ uses: string;
528
+ /** The term of this operation giving for how many days, at most 90. */
529
+ days: string;
530
+ }
502
531
  /**
503
532
  * Something a personal agent may ask the application to do for the person,
504
533
  * done only once they confirm its exact terms (PAP_DATALAYER B-04): the call
505
- * of `tool` is proposed instead of made, its arguments the terms.
534
+ * of `tool` is proposed instead of made, its arguments the terms — or, for one
535
+ * that `allows`, a standing permission given (R-07).
506
536
  */
507
537
  export interface AppPapOperationSpec {
508
538
  /** The action's name at this company: `orders.exchange`. */
509
539
  action: string;
510
- /** The application's tool that does it, called with the terms. */
540
+ /** The application's tool that does it, called with the terms; `''` for one that `allows`. */
511
541
  tool: string;
542
+ /** Instead of a tool: the standing permission confirming it gives (R-07). */
543
+ allows?: AppPapStandingSpec;
512
544
  /** What the person is shown, `{term}` for each term; never the model's. */
513
545
  summary: string;
514
546
  /** Whether only the person may confirm it, never an approval in advance. */
515
547
  userApprovalRequired: boolean;
516
548
  }
549
+ /**
550
+ * A Personal Agent Protocol profile Datalayer speaks: a draft the PAP SDK
551
+ * implements (`draft-01` is its `PROTOCOL_PROFILE` 0.1; PAP_DATALAYER S-03).
552
+ */
553
+ export type PapProfile = 'draft-01';
517
554
  /** Personal Agent Protocol: the companies it works with, and whether it is one. */
518
555
  export interface AppPapSpec {
556
+ /** The profile its `pap` block is written for: one Datalayer speaks, or the block is refused. */
557
+ profile: PapProfile;
519
558
  connections: AppPapConnectionSpec[];
520
559
  company: AppPapCompanySpec;
521
560
  }
@@ -536,9 +575,33 @@ export interface AppPactConnectionSpec {
536
575
  /** The Brand's scopes it may ask the person for: `orders:read`. */
537
576
  scopes: string[];
538
577
  }
539
- /** PACT: the businesses it asks for each person. */
578
+ /** A personal agent a PACT business accepts (PACT 1.0 §3.1): its issuer and its keys. */
579
+ export interface AppPactRegisteredAgentSpec {
580
+ /** The personal agent's `iss`, an HTTPS URL. */
581
+ issuer: string;
582
+ /** Where its public keys are (a JWKS), an HTTPS URL. */
583
+ jwksUri: string;
584
+ }
585
+ /**
586
+ * The application as a PACT business (AGENT_PROTOCOLS PR-13, PI-32): its card
587
+ * names Datalayer as the Provider and its owner as the Brand; it accepts the
588
+ * personal agents its Maker registered, and a person delegates the scopes it
589
+ * offers through their Datalayer sign-in.
590
+ */
591
+ export interface AppPactBusinessSpec {
592
+ /** Whether it is published as a business at Ship. */
593
+ enabled: boolean;
594
+ /** The Brand's name on its card: the application's `owner` when empty. */
595
+ brand: string;
596
+ /** What a person may let a personal agent do, `{scope: what the person is shown}`. */
597
+ scopes: Record<string, string>;
598
+ registeredAgents: AppPactRegisteredAgentSpec[];
599
+ }
600
+ /** PACT: the businesses it asks for each person, and whether it answers as one. */
540
601
  export interface AppPactSpec {
541
602
  connections: AppPactConnectionSpec[];
603
+ /** As a business (PR-13): absent or not `enabled`, it is none. Read, it is always said. */
604
+ business?: AppPactBusinessSpec;
542
605
  }
543
606
  /** The most one purchase may cost at a merchant (AGENT_PROTOCOLS PI-22). */
544
607
  export interface AppSpendLimitSpec {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datalayer/agent-runtimes",
3
- "version": "1.5.7",
3
+ "version": "1.5.9",
4
4
  "type": "module",
5
5
  "workspaces": [
6
6
  ".",
@@ -188,6 +188,7 @@
188
188
  "@lumino/widgets": "^2.7.3",
189
189
  "@mcp-ui/client": "^5.17.1",
190
190
  "@modelcontextprotocol/ext-apps": "^0.2.2",
191
+ "@modelcontextprotocol/sdk": "^1.32.1",
191
192
  "@primer/behaviors": "^1.8.4",
192
193
  "@primer/brand-primitives": "^0.51.0",
193
194
  "@primer/css": "^21.5.1",
@@ -242,6 +243,7 @@
242
243
  "embla-carousel-react": "^8.6.0",
243
244
  "fuse.js": "^7.0.0",
244
245
  "html2canvas": "^1.4.1",
246
+ "http-message-sig": "0.3.0",
245
247
  "input-otp": "^1.4.2",
246
248
  "jose": "^6.2.12",
247
249
  "jwt-decode": "^2.2.0",
@@ -1,32 +0,0 @@
1
- import{E as N,eN as ao,r as o,j as t,eO as io,eP as ro,b_ as bn,B as f,H as lt,T as H,c as G,cu as At,eu as Lt,eQ as ae,co as ct,e as lo,eR as co,eS as uo,e3 as fo,eT as po,aH as mo,dX as Tn,dV as go,dY as zt,eU as ho,eV as bo,eW as xo,eX as So,eY as xn,eZ as vo,e_ as yo,e$ as Co,d3 as wo,a_ as ko,f0 as jo,f1 as Eo,f2 as Io,f3 as To,f4 as Ro,f5 as Ao,x as Pt,f6 as Po,f7 as Mo,f8 as $o,f9 as Uo,fa as Oo,fb as Fo,fc as Lo,fd as zo,fe as _o,ff as No,fg as Bo,fh as Vo,fi as Ho,fj as Wo,fk as Do,fl as Go,fm as Ko,fn as Yo,fo as qo,fp as De,fq as Jo,fr as Qo,fs as Xo,ft as Zo,fu as Sn,fv as es,fw as Te,fx as ts,fy as ns,a$ as dt,fz as os,fA as ss,fB as vn,fC as as,fD as is,eC as rs,fE as Mt,fF as Re,fG as ls,fH as cs,fI as ds,fJ as us,fK as fs,fL as ps,fM as ms,fN as gs,fO as hs,fP as bs,fQ as xs,fR as Ss,fS as $t,fT as vs,fU as ys,I as Cs,fV as ws,fW as ks,fX as yn,fY as js,fZ as Es,f_ as Is,f$ as _t,g0 as Ts,g1 as Rs,ek as Ut,g2 as As,g3 as Ps}from"../datalayer-app-main.js";import{S as Ms,E as $s,a as Us}from"./SignInIcon-4HkE48mS.js";import{F as Os,a as Fs,b as Ls}from"./LinkedInGreyIcon-BoWXE-HS.js";function Rn(){const n=N(ao);return o.useMemo(()=>n.map(s=>s.value),[n])}const Ot={github:{name:"github",oauth2CallbackServerRoute:"jupyter_iam/oauth2/callback",oauth2CallbackUIRoute:"/iam/oauth2/github/callback"},google:{name:"google",oauth2CallbackServerRoute:"jupyter_iam/oauth2/callback",oauth2CallbackUIRoute:"/iam/oauth2/google/callback"},linkedin:{name:"linkedin",oauth2CallbackServerRoute:"jupyter_iam/oauth2/callback",oauth2CallbackUIRoute:"/iam/oauth2/linkedin/callback"}},Cn=()=>{if(typeof document>"u")return"";const n=document.getElementById("datalayer-config-data");if(!n?.textContent)return"";try{const s=JSON.parse(n.textContent);return String(s?.iamUrl||"").replace(/\/$/,"")}catch{return""}},zs=(n,s="Unable to start social sign-in.")=>{if(n instanceof Error&&n.message)return n.message;if(typeof n=="string"&&n.trim())return n;if(n&&typeof n=="object"&&"message"in n){const c=n.message;if(typeof c=="string"&&c.trim())return c}return s},_s=po`
2
- .signin-input-theme-scope input:-webkit-autofill,
3
- .signin-input-theme-scope input:-webkit-autofill:hover,
4
- .signin-input-theme-scope input:-webkit-autofill:focus,
5
- .signin-input-theme-scope input:-webkit-autofill:active,
6
- .signin-input-theme-scope input:-webkit-autofill:disabled,
7
- .signin-input-theme-scope textarea:-webkit-autofill,
8
- .signin-input-theme-scope textarea:-webkit-autofill:hover,
9
- .signin-input-theme-scope textarea:-webkit-autofill:focus,
10
- .signin-input-theme-scope textarea:-webkit-autofill:active,
11
- .signin-input-theme-scope textarea:-webkit-autofill:disabled {
12
- -webkit-text-fill-color: var(--fgColor-default) !important;
13
- caret-color: var(--fgColor-default) !important;
14
- -webkit-box-shadow: 0 0 0 1000px var(--bgColor-default) inset !important;
15
- box-shadow: 0 0 0 1000px var(--bgColor-default) inset !important;
16
- background-color: var(--bgColor-default) !important;
17
- transition: background-color 9999s ease-in-out 0s !important;
18
- }
19
-
20
- .signin-input-theme-scope input:disabled,
21
- .signin-input-theme-scope textarea:disabled {
22
- -webkit-text-fill-color: var(--fgColor-muted) !important;
23
- -webkit-box-shadow: 0 0 0 1000px var(--bgColor-default) inset !important;
24
- box-shadow: 0 0 0 1000px var(--bgColor-default) inset !important;
25
- background-color: var(--bgColor-default) !important;
26
- opacity: 1 !important;
27
- }
28
- `,Ns=({onSignIn:n,onApiKeySignIn:s,loginUrl:c,name:a,title:d="Datalayer OTEL",description:b="Sign in to access the observability dashboard.",icon:S,leadingIcon:C=t.jsx(fo,{size:24}),github:p=!1,google:K=!1,linkedin:B=!1,apiKey:Ge=!1,signUp:F=!0,socialSignInNavigationTarget:Z,asDoc:v=!1,fillHeight:I=!0,hideHero:ee=!1,calloutTitle:Ae,calloutDescription:Ke,passwordToggleLabel:ie="Sign in with a password",signUpTitle:Nt="Don't have an account?",signUpDescription:Y="Create a free Datalayer account with your email address.",signUpLabel:ut="Sign up with email",signUpHref:Pe="https://datalayer.ai/signup",onSignUp:V,forgotPasswordHref:q="/password",forgotPasswordLabel:Me="Forgot password?",showForgotPassword:ft=!0,socialButtonMarginTop:x=3,actionButtonMaxWidth:J=320})=>{const te=v&&!ee,Ye=a??(v&&d==="Datalayer OTEL"?"Datalayer Sign In":d),pt=S??(v?t.jsx(Ms,{size:24}):C),L=o.useMemo(()=>{if(c)return c;const i=Cn();return i?`${i}/api/iam/v1/login`:"/api/iam/v1/login"},[c]),[W,Se]=o.useState(""),[re,mt]=o.useState(""),[qe,le]=o.useState(!1),[ce,Je]=o.useState(!1),[k,ve]=o.useState(!1),[de,$e]=o.useState(!1),[Ue,Qe]=o.useState(null),[z,ye]=o.useState(null),[ne,Xe]=o.useState(""),[ue,Ze]=o.useState(null),[Oe,M]=o.useState(null),{enqueueToast:fe}=io(),[pe,E]=o.useState(!1),[Q,oe]=o.useState(""),D=o.useRef(null),Fe=o.useCallback(i=>ro()?bn.URLExt.join(bn.PageConfig.getBaseUrl(),i.oauth2CallbackServerRoute):`${window.location.protocol}//${window.location.hostname}${window.location.port?`:${window.location.port}`:""}${i.oauth2CallbackUIRoute}`,[]),me=o.useMemo(()=>{if(typeof window>"u")return"/";const i=`${window.location.pathname}${window.location.search}${window.location.hash}`;return i.startsWith("/")?i:"/"},[]),Ce=o.useCallback(async i=>{if(!de){M(null),Qe(i.name),$e(!0);try{const g=Cn(),m=new URLSearchParams({provider:i.name,callback_uri:Fe(i)}),R=Z===void 0?void 0:String(Z||"").trim(),y=R===void 0?me&&me!=="/"?me:void 0:R&&R.startsWith("/")&&!R.startsWith("//")?R:void 0;y&&m.set("post_auth_redirect",y);const ze=`${g||""}/api/iam/v1/oauth2/authz/url?${m.toString()}`,j=await fetch(ze),se=await j.json(),_e=se?.autorization_url;if(!j.ok||!_e)throw new Error(se?.message||"Unable to start social sign-in.");window.location.assign(_e)}catch(g){const m=zs(g);M(m),fe(m,{variant:"error"}),Qe(null),$e(!1)}}},[Fe,me,fe,de,Z]);o.useEffect(()=>{pe&&D.current?.focus()},[pe]);const $=o.useCallback(()=>{E(!1),oe("")},[]),gt=o.useCallback(()=>{!Q.trim()||!s||(s(Q.trim()),$())},[Q,s,$]),ht=o.useCallback(()=>{if(V){V();return}window.location.assign(Pe)},[V,Pe]),bt=o.useCallback(()=>{if(q){if(q.startsWith("http://")||q.startsWith("https://")){window.open(q,"_blank","noopener,noreferrer");return}window.location.assign(q)}},[q]),Le=o.useCallback(async()=>{if(!(v||!W||!re||k)){ve(!0),M(null);try{const i=await fetch(L,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({handle:W,password:re})});if(!i.ok)throw new Error(`HTTP ${i.status}`);const g=await i.json();if(g.success&&g.token){const m=String(g?.user?.id||g?.user?.uid||"").trim();if(!!g?.user?.mfaUrl&&m){ye(m),Ze(g.token),M(null);return}n&&n(g.token,W)}else M(g.message||"Invalid username or password.")}catch(i){M(i instanceof Error?i.message:String(i))}finally{ve(!1)}}},[v,W,re,k,L,n]),ge=o.useCallback(async()=>{if(!(v||k||!z||!ne.trim()||!ue)){ve(!0),M(null);try{const i=new URL(L,window.location.origin),g=i.pathname.endsWith("/api/iam/v1/login")?i.href.replace(/\/api\/iam\/v1\/login$/,""):`${i.origin}`,m=await fetch(`${g}/api/iam/v1/users/${z}/mfa/validate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userUid:z,code:ne.trim()})}),R=await m.json();if(!m.ok||!R?.success)throw new Error(R?.message||"Failed to validate your MFA code.");n&&n(ue,W)}catch(i){const g=i instanceof Error?i.message:String(i);M(g),fe(g,{variant:"error"})}finally{ve(!1)}}},[v,fe,W,k,L,ne,ue,z,n]),we=o.useCallback(i=>{i.key==="Enter"&&(z?ge():Le())},[z,Le,ge]),he=de||k||v;return t.jsxs(f,{className:"signin-input-theme-scope",display:"flex",alignItems:ee||te||!I?"flex-start":"center",justifyContent:"center",minHeight:ee||te||!I?"auto":"100vh",bg:ee?"transparent":"canvas.default",color:"fg.default",py:ee?0:te?2:4,children:[t.jsx(_s,{}),t.jsxs(f,{width:"100%",maxWidth:440,p:0,children:[!ee&&t.jsxs(t.Fragment,{children:[t.jsxs(f,{display:"flex",alignItems:"center",gap:2,mb:te?2:3,justifyContent:"center",children:[pt,t.jsx(lt,{sx:{fontSize:3},children:Ye})]}),t.jsx(H,{as:"p",sx:{fontSize:1,color:"fg.muted",mb:te?2:3,textAlign:"center"},children:b})]}),(Ae||Ke)&&t.jsxs(f,{mb:3,textAlign:"center",children:[Ae&&t.jsx(lt,{as:"h3",sx:{fontSize:2,mb:1},children:Ae}),Ke&&t.jsx(H,{sx:{color:"fg.muted",fontSize:1},children:Ke})]}),!z&&(p||K||B)&&t.jsxs(t.Fragment,{children:[p&&t.jsx(G,{block:!0,size:"large",leadingVisual:Ue==="github"?()=>t.jsx(At,{size:"small"}):Os,disabled:he,onClick:()=>Ce(Ot.github),sx:{mt:x,maxWidth:J,mx:"auto"},children:"Sign in with GitHub"}),K&&t.jsx(G,{block:!0,size:"large",leadingVisual:Ue==="google"?()=>t.jsx(At,{size:"small"}):Fs,disabled:he,onClick:()=>Ce(Ot.google),sx:{mt:x,maxWidth:J,mx:"auto"},children:"Sign in with Google"}),B&&t.jsx(G,{block:!0,size:"large",leadingVisual:Ue==="linkedin"?()=>t.jsx(At,{size:"small"}):Ls,disabled:he,onClick:()=>Ce(Ot.linkedin),sx:{mt:x,maxWidth:J,mx:"auto"},children:"Sign in with LinkedIn"})]}),!z&&!qe&&t.jsx(f,{mt:3,display:"flex",justifyContent:"center",children:t.jsx(G,{leadingVisual:Lt,size:"large",block:!0,disabled:v||k||de,onClick:()=>le(!0),sx:{maxWidth:J,mx:"auto"},children:ie})}),!z&&qe&&t.jsxs(f,{mt:4,children:[t.jsxs(ae,{required:!0,sx:{mb:3},children:[t.jsx(ae.Label,{children:"Username"}),t.jsx(ct,{autoFocus:!0,block:!0,placeholder:"Your username",value:W,disabled:k||v,onChange:i=>Se(i.target.value),onKeyDown:we})]}),t.jsxs(ae,{required:!0,sx:{mb:3},children:[t.jsx(ae.Label,{children:"Password"}),t.jsx(ct,{block:!0,placeholder:"Your password",type:ce?"text":"password",value:re,disabled:k||v,onChange:i=>mt(i.target.value),onKeyDown:we,trailingAction:t.jsx(ct.Action,{onClick:()=>Je(!ce),disabled:k||v,icon:ce?$s:Us,"aria-label":ce?"Hide password":"Show password",sx:{color:"var(--fgColor-muted)"}})})]}),t.jsxs(f,{display:"flex",alignItems:"center",justifyContent:"space-between",mt:3,children:[t.jsx(G,{variant:"primary",disabled:k||v||!W||!re,onClick:Le,children:k?"Signing in…":"Sign In"}),ft&&t.jsx(lo,{as:"button",sx:{fontSize:1,cursor:v?"not-allowed":"pointer",background:"none",border:"none",opacity:v?.6:1},onClick:()=>{v||k||bt()},children:Me})]})]}),z&&t.jsxs(t.Fragment,{children:[t.jsxs(ae,{required:!0,sx:{mb:3,mt:2},children:[t.jsx(ae.Label,{children:"MFA Code"}),t.jsx(ct,{autoFocus:!0,block:!0,placeholder:"Your MFA code",value:ne,disabled:k||v,onChange:i=>Xe(i.target.value),onKeyDown:we})]}),t.jsx(G,{variant:"primary",block:!0,disabled:k||v||!ne.trim(),onClick:ge,sx:{maxWidth:J,mx:"auto"},children:k?"Validating…":"Validate MFA Code"})]}),Oe&&t.jsx(H,{sx:{color:"danger.fg",fontSize:1,mt:3,display:"block"},children:Oe}),F&&t.jsxs(f,{mt:4,pt:4,textAlign:"center",borderTop:"1px solid",borderColor:"border.muted",children:[t.jsx(lt,{as:"h3",sx:{fontSize:2,mb:2},children:Nt}),t.jsx(H,{as:"p",sx:{color:"fg.muted",fontSize:1,mb:3},children:Y}),t.jsx(f,{display:"flex",justifyContent:"center",children:t.jsx(G,{variant:"primary",size:"large",leadingVisual:co,disabled:v||k,onClick:ht,children:ut})})]}),Ge&&s&&t.jsxs(t.Fragment,{children:[t.jsxs(f,{display:"flex",alignItems:"center",gap:2,my:3,children:[t.jsx(f,{flex:1,height:"1px",bg:"border.default"}),t.jsx(H,{sx:{fontSize:0,color:"fg.muted"},children:"or"}),t.jsx(f,{flex:1,height:"1px",bg:"border.default"})]}),t.jsx(G,{block:!0,leadingVisual:Lt,disabled:v||k||de,onClick:()=>E(!0),sx:{maxWidth:J,mx:"auto"},children:"Sign in with an API Key"}),pe&&t.jsx(f,{role:"dialog","aria-modal":"true","aria-labelledby":"signin-api-key-title",onKeyDown:i=>{i.key==="Escape"&&$()},onClick:$,position:"fixed",inset:0,zIndex:200,p:3,bg:"canvas.backdrop",display:"flex",alignItems:"center",justifyContent:"center",children:t.jsxs(f,{as:"form",onClick:i=>i.stopPropagation(),onSubmit:i=>{i.preventDefault(),gt()},width:"min(560px, 100%)",p:3,borderRadius:2,border:"1px solid",borderColor:"border.default",bg:"canvas.overlay",color:"fg.default",boxShadow:"shadow.large",children:[t.jsx(lt,{id:"signin-api-key-title",sx:{fontSize:2,mb:2},children:"Enter your API Key"}),t.jsxs(ae,{required:!0,children:[t.jsx(ae.Label,{children:"API Key"}),t.jsx(uo,{block:!0,required:!0,autoFocus:!0,placeholder:"Paste your API key here",value:Q,onInput:i=>oe(i.currentTarget.value),ref:D})]}),t.jsxs(f,{mt:3,display:"flex",justifyContent:"flex-end",gap:2,children:[t.jsx(G,{type:"button",onClick:$,children:"Cancel"}),t.jsx(G,{type:"submit",variant:"primary",disabled:!Q.trim(),children:"Authenticate"})]})]})})]})]})]})};function Bs(n){const{agentId:s,instructions:c,model:a,frontendTools:d,inference:b,subagents:S,sharing:C,onSubagentEvent:p,modeEffect:K}=n;return{type:"browser-vercel-ai",endpoint:"",agentId:s,enableConfigQuery:!1,options:{instructions:c,model:a,frontendTools:d,inference:b,subagents:S,sharing:C,onSubagentEvent:p,modeEffect:K}}}const wn=mo((n,s)=>({pending:void 0,suggest:(c,a)=>{const d=c.trim();d&&n({pending:{text:d,submit:a?.submit??!1,nonce:(s().pending?.nonce??0)+1}})},consume:()=>n({pending:void 0})}));function Vs({agentName:n,sandboxStillRuns:s=!1,temporary:c=!0,onSignedIn:a,onSignUp:d}){const{configuration:b}=Tn(),S=o.useCallback(C=>{go.getState().checkIAMToken(C),a?.()},[a]);return t.jsx(f,{height:"100%",minHeight:0,overflowY:"auto",bg:"canvas.default",px:4,py:4,children:t.jsxs(f,{maxWidth:440,mx:"auto",children:[t.jsxs(f,{display:"flex",alignItems:"center",justifyContent:"center",gap:2,color:"attention.fg",mb:2,children:[t.jsx(Lt,{size:20}),t.jsx(H,{sx:{fontSize:2,fontWeight:"semibold",color:"fg.default"},children:c?"This demo runs on a shared key":"Your key has expired"})]}),t.jsxs(H,{as:"p",sx:{fontSize:1,color:"fg.muted",textAlign:"center",mb:3},children:[c?`${n??"The agent"} has used the time this key allows. Sign in to point your own agent at it, use your own data, and drop the time limit.`:`${n??"The agent"} stopped because your session ran out.`,s?" Your notebook is still running in this page.":""]}),t.jsx(Ns,{hideHero:!0,fillHeight:!1,calloutTitle:"Sign in to keep going",github:!0,google:!0,linkedin:!0,socialSignInNavigationTarget:typeof window>"u"?void 0:`${window.location.pathname}${window.location.search}`,loginUrl:b?.iamUrl?`${b.iamUrl}/api/iam/v1/login`:void 0,onSignIn:S,onSignUp:d})]})})}const Hs="https://r1.datalayer.run";function Ws(n=!0){const{configuration:s}=Tn(),c=zt(C=>C.token),a=s?.aiInferenceUrl||Hs,d=ho(a,n&&!c),b=c||d.token,S=o.useMemo(()=>({inferenceUrl:a,token:b||void 0}),[a,b]);return{inference:S,needsSignIn:bo(S),anonymous:d,inferenceUrl:a}}const Ds={name:"general-purpose",description:"A capable generalist for a task none of the specialists covers: research, reasoning, drafting, checking.",instructions:"You are a capable general-purpose assistant. Carry out the task you are given completely and report the result plainly, saying what you could not do."};function kn(n){const s=n?.subagents;if(!s)return[];const c=(s.subagents??[]).map(a=>{const d=a.ref?xo(a.ref):void 0;return{name:a.name,description:a.description||d?.description||a.name,instructions:a.instructions??d?.systemPrompt,model:a.model??d?.model??s.defaultModel,icon:d?.icon}});return s.includeGeneralPurpose?[...c,Ds]:c}function Gs(n){return n.replace(/^datalayer_/,"").replace(/_lexical$/,"")}function Ks(n){const s=Gs(n);return/^executeCodeIn(Notebook|Document)$/.test(s)||/^(read|list)[A-Z]/.test(s)}function Ys(n,s){return n.filter(c=>s?.has(c.name)||Ks(c.name))}function qs(n,s){const c=a=>s&&a.value.id===`${s}-tools`?0:a.value.id==="notebook-tools"?1:2;return n.map((a,d)=>({entry:a,index:d,rank:c(a)})).sort((a,d)=>a.rank-d.rank||a.index-d.index).map(a=>a.entry)}function Js(n,s,c){if(!c||!n.endsWith("-tools"))return!1;const a=n.slice(0,-6);return s.has(a)&&a!==c}const Qs={type:"object",properties:{}};function Xs(n,s){const c=new Set(n.toolset);return n.commands.filter(a=>c.has(a.name)).map(a=>({name:a.name,description:a.description,parameters:a.parameters??Qs,location:"frontend",handler:async d=>{if(!s)throw new Error(`${a.name}: the ${n.plugin??n.id} plugin is not mounted on this page.`);const b=Object.keys(d??{}).length>0?d:void 0,S=await s.executeCommand(a.command,b);return S===void 0?{ok:!0,command:a.command,argument:b}:S}}))}function An(n,s){return n.flatMap(c=>Xs(c,s))}function Zs(){const n=So(),s=Rn();return o.useMemo(()=>An(s,n),[s,n])}const jn={opening:"Opening your conversation…",notOpened:n=>`Your conversation could not be opened, so this is a new one: ${n}`};function ea(n){let s;for(const c of n.split(/\r?\n\r?\n/)){const a=c.split(/\r?\n/).filter(d=>d.startsWith("data:")).map(d=>d.slice(5).trim()).join("");if(a)try{const d=JSON.parse(a);d.type==="MESSAGES_SNAPSHOT"&&Array.isArray(d.messages)&&(s=d.messages)}catch{}}return s}async function En(n){try{const s=await n.json();if(typeof s.detail=="string"&&s.detail)return s.detail}catch{}return`${n.status}`}async function ta({agentBaseUrl:n,agentId:s,uid:c,token:a,fetcher:d=fetch}){const b=`${n.replace(/\/+$/,"")}/api/v1/apps/sessions/${encodeURIComponent(c)}`,S=a?{Authorization:`Bearer ${a}`}:{},C=await d(`${b}/messages`,{headers:S});if(C.ok){const B=await C.json();return xn(B.messages)}if(C.status!==404)throw new Error(await En(C));const p=await d(`${b}/resume`,{method:"POST",headers:{"Content-Type":"application/json",...S},body:JSON.stringify({agent:s})});if(!p.ok)throw new Error(await En(p));const K=ea(await p.text());if(!K)throw new Error(`The runtime said nothing of session ${c}.`);return xn(K)}const na="var(--theme-accent)";function Pn({face:n,size:s}){return typeof n=="string"?t.jsx(vo,{emoji:n,size:s,label:""}):t.jsx(t.Fragment,{children:n})}function oa({face:n,size:s,state:c}){const a=c==="thinking"||c==="working",d=c==="paused";return t.jsxs(f,{as:"span","aria-hidden":!0,"data-presence":c,position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:s+8,height:s+8,flexShrink:0,fontSize:s,lineHeight:1,children:[t.jsx(f,{as:"span",position:"absolute",inset:0,borderRadius:"50%",boxShadow:d?"none":`0 0 0 2px ${na}`,border:d?"2px dashed":"none",borderColor:"border.default",opacity:a||c==="waiting"||d?.9:0,transition:"opacity var(--theme-motion-status, 0ms) var(--theme-motion-easing, ease)",animation:a?"loopPresenceBreath 1.8s ease-in-out infinite":"none",reducedMotion:{animation:"none"},sx:{"@keyframes loopPresenceBreath":{"0%, 100%":{transform:"scale(0.92)",opacity:.35},"50%":{transform:"scale(1.06)",opacity:.9}}}}),t.jsx(f,{as:"span",display:"inline-flex",opacity:d?.55:1,filter:d?"grayscale(0.6)":"none",transition:"opacity var(--theme-motion-status, 0ms) var(--theme-motion-easing, ease)",children:t.jsx(Pn,{face:n,size:s})})]})}function sa({state:n}){return t.jsx(H,{role:"status","aria-live":"polite","data-presence-line":n,sx:{fontSize:0,color:n==="waiting"?"fg.default":"fg.muted",fontWeight:n==="waiting"?"semibold":"normal",whiteSpace:"nowrap",flexShrink:0},children:yo[n]})}const aa=_t(void 0),ia=_t(""),ra=_t({}),X="",la=1400,In=parseInt(As["--loop-face-large"],10);function pa({workspace:n}){const s=Co(),c=wo(),a=o.useRef(null),{setViewControls:d}=n,[b,S]=o.useState(null),C=ko(),p=C.getConfig(jo),K=p?.placeholder||s.placeholder,B=p?.defaultSurface??"notebook",Ge=C.getConfig(Eo),[F,Z]=o.useState(X),v=o.useRef(!1),I=N(Io),ee=N(To),Ae=N(Ro),ie=N(Ao)[0]?.value,Y=Pt(ie?.promptStance??aa)??ie?.prompt,ut=N(Po),Pe=Mo(ut[0]?.value),V=o.useRef(Pe);V.current=Pe;const q=o.useRef(""),Me=N($o),ft=o.useMemo(()=>Uo(()=>Me.reduce((e,r)=>({...e,...r.value.extras.value}),{})),[Me]),x=Pt(Me.length>0?ft:ra),J=o.useRef(new Set),te=Oo(Ts,n),Ye=!te.allowed,pt=Ye?te.reason??"Chat is unavailable for this sandbox":void 0,[L,W]=o.useState(!1),[Se,re]=o.useState(!1),[mt,qe]=o.useState({open:!1,pendingApproval:!1}),le=Fo(L,mt,p?.presence?.paused===!0),ce=p?.presence?.onPresence;o.useEffect(()=>{ce?.(le),V.current?.setPresence(le)},[ce,le]);const Je=o.useRef(p?.presence?.onSaying);Je.current=p?.presence?.onSaying;const k=o.useRef({answering:!1}),ve=o.useCallback(e=>{a.current=e,re(!!e)},[]),de=o.useCallback(e=>{const{open:r,pendingApproval:l}=Lo(e);qe(xe=>xe.open===r&&xe.pendingApproval===l?xe:{open:r,pendingApproval:l});const h={saying:_o(e),answering:zo(e)},u=k.current;(u.saying?.id!==h.saying?.id||u.saying?.text!==h.saying?.text||u.answering!==h.answering)&&(k.current=h,Je.current?.(h));const O=V.current;if(!O)return;O.items(e);const P=new Set(["complete","completed","done","error","failed","cancelled","canceled","rejected","denied","stopped"]),A={insertcell:"adding a cell",updatecell:"editing a cell",runcell:"running a cell",deletecells:"removing cells",readallcells:"reading the notebook",readcell:"reading a cell",executecode:"running code",insertblock:"adding a block",updateblock:"editing a block",runblock:"running a block",readdocument:"reading the document"};let w;for(let xe=e.length-1;xe>=0;xe-=1){const rt=e[xe];if(typeof rt.toolName=="string"&&rt.toolCallId){P.has(String(rt.status).toLowerCase())||(w=rt);break}}if(!w){O.activity(void 0);return}const Rt=w.toolName.toLowerCase().replace(/^datalayer_/,"").replace(/_lexical$/,"").replace(/[^a-z]/g,""),so=A[Rt]??`using ${w.toolName}`;O.activity(`${q.current||"The agent"} is ${so}…`)},[]),$e=o.useRef(x);$e.current=x;const Ue=o.useCallback(e=>{Bn(e),V.current?.usage(e),$e.current.onUsage?.(e)},[]),Qe=o.useCallback(e=>{W(e),e||V.current?.end("done")},[]),z=o.useCallback(e=>{const r=V.current;if(!r)return;let l=-1;for(let u=e.length-1;u>=0;u-=1)if(e[u].role==="user"){l=u;break}const h=e.slice(l+1).filter(u=>u.role==="assistant").map(No).filter(u=>u.trim().length>0).join(`
29
-
30
- `);r.assistant(h)},[]),ye=o.useRef([]),ne=o.useRef(!1),Xe=o.useRef(void 0),ue=o.useRef(void 0),Ze=N(Bo),Oe=o.useRef(Ze);Oe.current=Ze;const M=o.useCallback((e,r)=>{if(ue.current)return ue.current;const l=Vo(Oe.current.map(O=>O.value),r),h=l?.loop;if(ne.current&&h?.files&&h.files.length>0){const O=Xe.current;if(!O)return"A file is given to an application running on a runtime: run it on Datalayer or on your machine to give it one.";let P;try{P=h.files.map(A=>({file:Wo(String(A.name??"")),base64:Ho(String(A.data_url??""))}))}catch(A){return A instanceof Error?A.message:String(A)}O.execute(Do(P)).then(A=>{if(!A.success){S(`The files could not be put in the sandbox: ${A.error??"it failed"}.`);return}M(`${e}
31
-
32
- ${Go(P.map(w=>w.file))}`,{...l,loop:Object.fromEntries(Object.entries(h).filter(([w])=>w!=="files"))})});return}V.current?.begin(e,a.current?.thread());const u=a.current?.send;if(!u){ye.current.push([e,l]);return}u(e,l)},[]);o.useEffect(()=>{d(Se?{busy:L,stop:a.current?.stop,newChat:a.current?.newChat,send:M}:null)},[L,Se,d,M]),o.useEffect(()=>()=>d(null),[d]),o.useEffect(()=>n.prompts.subscribe(M),[n.prompts,M]),o.useEffect(()=>{if(!Se||ye.current.length===0)return;const e=ye.current.splice(0,ye.current.length);for(const[r,l]of e)a.current?.send(r,l)},[Se]);const fe=o.useRef(!1),pe=o.useCallback(async e=>{fe.current||(fe.current=!0,Ge?.firstPromptHook?.()),S(null);const r=await n.submit(e);if(!r.handled){S(r.reason??null);return}Et(""),r.result?.content&&S(r.result.content)},[n,Ge?.firstPromptHook]),E=o.useMemo(()=>I.find(e=>e.value.surfaceId===F)?.value,[I,F]),Q=o.useCallback(e=>{v.current=!0,Z(e)},[]);o.useEffect(()=>Ko(Q),[Q]),o.useEffect(()=>{Yo(I.map(e=>e.value.surfaceId))},[I]),o.useEffect(()=>{qo(F&&F!==X?F:Ps)},[F]);const oe=o.useMemo(()=>B===X||B==="none"?void 0:I.find(e=>e.value.surfaceId===B),[I,B]);o.useEffect(()=>{v.current||!oe||De(oe.value,n)&&Z(B)},[oe,n,B]);const[D,Fe]=o.useState(null),me=o.useRef(null),Ce=p?.fullScreenTopOffset??0,{fullScreen:$,usingApi:gt,toggle:ht,topOffsetPx:bt}=Jo(me,{forceOverlay:!!Ce,topOffset:Ce}),[Le,ge]=o.useState(!1),we=o.useRef(!1);o.useEffect(()=>{!L||we.current||$||(we.current=!0,ge(!0))},[L,$]),o.useEffect(()=>{$&&ge(!1)},[$]),o.useEffect(()=>{E&&!De(E,n)&&(Fe(E.surfaceId),Z(X))},[E,n]);const he=o.useMemo(()=>{if(D)return I.find(e=>e.value.surfaceId===D)?.value;if(!v.current&&F===X)return oe?.value},[I,D,F,oe]);o.useEffect(()=>{if(!D||F!==X)return;const e=I.find(r=>r.value.surfaceId===D);e&&De(e.value,n)&&(Fe(null),Z(D))},[I,F,D,n]);const i=n.agentId?.trim()||"default",g=Qo(n.sandbox.target??"local");ne.current=g;const m=Xo(),R=Pt(m?.selected??ia),y=m?.members.find(e=>e.id===R),xt=N(Zo)[0]?.value,ze=xt?.specId,j=Sn(y?.specId??i)??(ze?Sn(ze):void 0),se=y?void 0:xt,_e=g&&!y?Is(ze,j):void 0;q.current=y?.name??j?.name??i;const Bt=N(es),Vt=x.hiddenOpeners,Ht=x.hideOpeners,St=x.openers,vt=o.useMemo(()=>{if(Ht)return[];const e=new Set(Vt??[]),r=w=>e.size===0?w:w.filter(Rt=>!e.has(Rt.text));if(St)return r(St);const l=Bt.flatMap(w=>w.value.suggestions);if(l.length>0)return r(l);const h=r(j?.suggestions??[]),u=r(m?.team.suggestions??[]);if(u.length===0)return h;const O=new Set(u.map(w=>w.text)),P=m?.team.name??"Team",A=y?.name??j?.name??i;return[...u.map(w=>({...w,group:P})),...h.filter(w=>!O.has(w.text)).map(w=>({...w,group:A}))]},[Bt,m,j,y,i,Vt,Ht,St]),et=o.useMemo(()=>vt.map(e=>({title:e.summary??e.text,message:e.message??e.text,group:e.group})),[vt]),yt=Te(j?.icon),_=p?.presence,Mn=Te(m?.team.icon),Wt=N(ts),tt=o.useMemo(()=>{const e=[],r=new Map,l=new Set,h=new Set(I.map(u=>u.value.surfaceId));for(const u of qs(Wt,E?.surfaceId)){if(Js(u.value.id,h,E?.surfaceId))continue;let O;try{O=u.value.tools(n)}catch(P){console.warn(`[loop] frontend tools from '${u.plugin}' failed:`,P);continue}for(const P of O){const A=r.get(P.name);if(A){console.warn(`[loop] frontend tool '${P.name}' from '${u.plugin}' is shadowed by the one from '${A}'.`);continue}r.set(P.name,u.plugin),e.push(P),u.value.chatView&&l.add(P.name)}}for(const u of x.frontendTools??[])r.has(u.name)||(r.set(u.name,"chat-extras"),e.push(u),l.add(u.name));return E?e:Ys(e,l)},[Wt,n.surfaceId,n.agentId,x.frontendTools,E?.surfaceId,I]),Ct=Zs(),Ne=o.useMemo(()=>{if(Ct.length===0)return tt;const e=new Set(tt.map(r=>r.name));return[...tt,...Ct.filter(r=>!e.has(r.name))]},[tt,Ct]),Dt=Rn(),wt=x.agentToolBundles,$n=o.useMemo(()=>{const e=x.frontendTools??[];if(!wt?.length)return x.frontendTools;const r=An(Dt.filter(h=>wt.includes(h.id)),C),l=new Set(e.map(h=>h.name));return[...e,...r.filter(h=>!l.has(h.name))]},[x.frontendTools,wt,Dt,C]);Xe.current=g&&Ne.some(e=>e.name===ns)?C.getOutput(dt)?.sandbox:void 0;const T=os(n.sandbox,n.serverUrl),Gt=N(ss),Un=o.useMemo(()=>Gt.filter(e=>e.value.composer).map(e=>({name:e.value.name,description:e.value.description})),[Gt]),On=o.useMemo(()=>{if(!m||!y)return kn(j).map(l=>({name:l.name,description:l.description,icon:Te(l.icon)}));const e=m.members.map(l=>({name:l.name,description:l.description,emoji:l.emoji,icon:Te(l.icon),disabled:l.id===y.id,disabledReason:l.id===y.id?`You are already talking to ${l.name}`:void 0})),r=vn(m.team,y.id).filter(l=>!m.members.some(h=>h.name===l.name)).map(l=>({name:l.name,description:l.description,icon:Te(l.icon)}));return[...e,...r]},[m,y,j]),{inference:Kt,anonymous:Fn}=Ws(g),Ln=zt(e=>e.user),kt=g&&Fn.status==="expired",Yt=!Ln,Be=as();ue.current=Be.disabled?Be.disableReason||"This conversation is closed here.":void 0;const jt=T===void 0?is(n.sandbox,s):void 0,nt=Ye||kt||!!_e||!!jt||Be.disabled,qt=kt?Yt?s.demoKeyExpired:s.keyExpired:_e??jt??pt??(Be.disabled?Be.disableReason:void 0),[Jt,Et]=o.useState(""),[zn,Qt]=o.useState(),ot=zn??se?.model??j?.model??n.model??"",ke=rs(),Xt=o.useRef(ke),Zt=o.useRef(R),en=o.useRef(ke);en.current=ke,o.useEffect(()=>{Zt.current!==R&&(Zt.current=R,Xt.current=en.current,Qt(void 0))},[R]);const _n=ke&&ke!==Xt.current?ke:null,[Nn,Bn]=o.useState(),Vn=_n??Nn??null,Hn=Mt(Re.inpromptMenu),Wn=Mt(Re.promptAction),Dn=Mt(Re.chatHeader),Gn=o.useMemo(()=>m?.members.map(e=>({id:e.id,name:e.name,description:e.description,icon:Te(e.icon)}))??[],[m]),be=wn(e=>e.pending),[tn,Kn]=o.useState(0);o.useEffect(()=>ls(()=>Kn(e=>e+1)),[]),o.useEffect(()=>{be&&(Et(be.text),wn.getState().consume(),be.submit&&pe(be.text))},[be]);const je=!!(se?.createPayload?.app_spec||C.getConfig(dt)?.datalayerCreatePayload?.app_spec),Yn=zt(e=>e.token),nn=C.getConfig(dt)?.datalayerVisitors,qn=cs(nn),Jn=C.getConfig(dt)?.embedToken,Ve=nn?qn.token:Jn||Yn,U=p?.thread,[Ee,on]=o.useState(null),Qn=!!(U?.fromRuntime&&Ee?.given!==U.id);o.useEffect(()=>{if(!U?.fromRuntime||!je||!T)return;let e=!0;return(async()=>{let r="";for(let l=0;l<4&&e;l+=1)try{const h=await ta({agentBaseUrl:T,agentId:i,uid:U.id,token:Ve});e&&on({given:U.id,thread:{...U,fromRuntime:!1,messages:h}});return}catch(h){r=h instanceof Error?h.message:String(h),await new Promise(u=>setTimeout(u,1500))}e&&on({given:U.id,thread:{id:ds(),messages:[],onStarted:U.onStarted},said:jn.notOpened(r)})})(),()=>{e=!1}},[U?.id,U?.fromRuntime,je,T,i,Ve]);const sn=U?.fromRuntime?Ee?.given===U.id?Ee.thread:void 0:U,It=o.useMemo(()=>g?Bs({agentId:y?.specId??i,instructions:us(j,se?.instructions),model:ot||void 0,inference:Kt,frontendTools:Ne,subagents:m&&y?vn(m.team,y.id):kn(j),sharing:m?.sharing,onSubagentEvent:e=>Rs.getState().appendSubagentEvent(e),modeEffect:se?.modeEffect}):T!==void 0?{type:"ag-ui",endpoint:je?`${T}/api/v1/apps/agents/${encodeURIComponent(i)}/ag-ui/`:`${T}/api/v1/ag-ui/${i}/`,...je&&Ve?{authToken:Ve}:{},...je?{uiSocket:`${T.replace(/^http/,"ws")}/api/v1/apps/ui`,uiFiles:`${T}/api/v1/apps/agents/${encodeURIComponent(i)}/files`}:{},agentId:i,configEndpoint:`${T}/api/v1/configure`,enableConfigQuery:!0}:void 0,[i,g,Kt,y,Ne,m,j,se,ot,T,je,Ve]),st=fs(!g,It?.type==="ag-ui"?It.configEndpoint:void 0,void 0,i),He=ps(),at=ms(i),[an,rn]=o.useState(void 0),[Xn,Zn]=o.useState(void 0);o.useEffect(()=>{if(g||T===void 0)return;let e=!1;return fetch(`${T}/api/v1/configure/models?agent_id=${encodeURIComponent(i)}`).then(r=>r.ok?r.json():null).then(r=>{e||(rn(r?gs(r):[]),Zn(r?hs(r):void 0))}).catch(()=>{e||rn([])}),()=>{e=!0}},[T,i,g]);const eo=o.useMemo(()=>bs(an,()=>Object.values(xs).filter(e=>e.available&&Ss(e)).map(e=>({id:e.id,name:e.name,provider:e.provider}))),[an]),ln=o.useMemo(()=>{const e=st.data?.builtinTools??[],r=new Set(e.map(l=>l.name));return{runtime:e,frontend:Ne.filter(l=>!r.has(l.name)).map(l=>({id:l.name,name:l.name}))}},[st.data?.builtinTools,Ne]),cn=o.useMemo(()=>new Set((He.data?.skills??[]).filter(e=>e.status==="enabled"||e.status==="loaded").map(e=>e.id)),[He.data]),to=o.useCallback(async e=>{Qt(e),!(g||T===void 0)&&await fetch(`${T}/api/v1/configure/inference/provider`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({model:e})}).catch(()=>{})},[T,g]),dn=p?.promptPlacement==="bottom-chat",no=p?.promptPlacement==="floating",Ie=p?.promptPlacement==="top",We=p?.hidePrompt===!0||x.hidePrompt===!0,oo={onSend:()=>{pe(Jt)},input:Jt,setInput:Et,focusTrigger:be||tn?(be?.nonce??0)+tn:void 0,placement:no||Y==="floating"||Y==="floating-top"||Y==="floating-bottom"?"floating":"docked",floatingAnchor:Y==="floating-top"?"top":"bottom",isLoading:L,onStop:()=>n.viewControls.stop?.(),placeholder:qt??K,typingSuggestions:vt.map(e=>e.text),suggestions:et,disableInputPrompt:nt,connectionConfirmed:!nt,padding:Ie||Y==="floating-top"||Y==="floating-bottom"||Y==="docked-top"?2:3,promptVariant:"lexical",autoFocus:p?.autoFocusPrompt??!0,mentionableAgents:On,promptCommands:Un,headerContent:Hn.length>0?t.jsx($t,{slot:Re.inpromptMenu,props:{workspace:n}}):void 0,footerExtras:Wn.length>0?t.jsx($t,{slot:Re.promptAction,props:{workspace:n}}):void 0,showAgentsMenu:!_,showInlineAgentsMenu:!1,agents:Gn,selectedAgentId:R,onSelectAgent:e=>m?.select(e),showTokenUsage:x.showTokenUsage??p?.showTokenUsage??!0,showContextRing:!0,agentUsage:Vn??void 0,showModelSelector:!_,models:eo,decisions:Xn,selectedModel:ot,onModelSelect:e=>{to(e)},showToolsMenu:!_,availableTools:ln.runtime,availableFrontendTools:ln.frontend,mcpServers:st.data?.mcpServers??[],mcpStatusData:x.mcpStatusData??void 0,showSkillsMenu:!_,skills:He.data?.skills??[],skillsLoading:He.isLoading,enabledSkills:cn,onToggleSkill:e=>cn.has(e)?at.disableSkill(e):at.enableSkill(e),onToggleAllSkills:(e,r)=>e.forEach(l=>r?at.enableSkill(l):at.disableSkill(l)),codemodeEnabled:x.codemodeEnabled??!1,onToggleCodemode:x.onToggleCodemode,isA2AProtocol:!1,hasConfigData:!!st.data,hasSkillsData:!!He.data},un=ee[0]?.value.Component,Tt=Ae[0]?.value.Component,it=un?t.jsx(un,{workspace:n,composer:oo}):null,fn=I.length>0&&p?.showSurfaceSelector!==!1?t.jsx(ca,{surfaces:I.map(e=>e.value),active:E?.surfaceId??he?.surfaceId??X,onChange:Q,workspace:n}):null,pn=t.jsxs(t.Fragment,{children:[I.map(e=>{const r=e.value,l=E?.surfaceId===r.surfaceId;return l||J.current.has(r.surfaceId)||De(r,n)?(J.current.add(r.surfaceId),t.jsx(f,{sx:l?{flex:"1 1 0",minWidth:0,minHeight:0}:{position:"absolute",inset:0,visibility:"hidden",pointerEvents:"none",zIndex:-1},children:t.jsx(vs,{load:r.load,props:{surfaceId:r.surfaceId,workspace:n},fallback:t.jsxs(Ft,{children:["Loading ",r.title,"…"]}),errorFallback:u=>t.jsxs(Ft,{children:[r.title," failed to load: ",u.message]})})},r.surfaceId)):null}),!E&&he?t.jsx(f,{flex:"1 1 0",minWidth:0,minHeight:0,children:t.jsxs(Ft,{children:["Starting ",he.title,"…"]})}):null]}),mn=t.jsx(t.Fragment,{children:t.jsxs(f,{flex:Ie&&E?"0 0 34%":"1 1 0",maxWidth:Ie&&E?460:void 0,minWidth:0,minHeight:0,display:"flex",flexDirection:"column",borderLeft:E?"1px solid":void 0,borderColor:"border.default",position:"relative",children:[x.errorBanner?t.jsx(f,{flexShrink:0,px:3,py:2,fontSize:1,borderBottom:"1px solid",bg:x.errorBanner.variant==="warning"?"attention.subtle":"danger.subtle",color:x.errorBanner.variant==="warning"?"attention.fg":"danger.fg",borderColor:x.errorBanner.variant==="warning"?"attention.muted":"danger.muted",children:x.errorBanner.message}):null,Ee?.said&&Ee.given===U?.id?t.jsx(H,{as:"p",role:"status",sx:{m:0,px:3,py:2,fontSize:1,color:"fg.muted"},children:Ee.said}):null,t.jsx(f,{flex:"1 1 auto",minHeight:0,display:"flex",children:Qn?t.jsx(H,{as:"p",role:"status",sx:{m:0,p:3,fontSize:1,color:"fg.muted"},children:jn.opening}):t.jsx(ys,{themeVariant:p?.themeVariant,themeOverrides:p?.themeOverrides,colorMode:p?.colorMode,thread:sn,disabled:nt,disableReason:qt,protocol:It,frontendTools:g?void 0:$n,initialModel:ot||void 0,title:_?.name??y?.name??j?.name??i,description:_?.welcome??j?.description,brandIcon:_?.face?t.jsx(oa,{face:_.face,size:20,state:le}):t.jsx(yt,{size:20}),headerContent:_&&!jt?t.jsx(sa,{state:le}):void 0,emptyState:{icon:_?.face?t.jsx("span",{"aria-hidden":!0,style:{fontSize:In,lineHeight:1},children:t.jsx(Pn,{face:_.face,size:In})}):t.jsx(yt,{size:48}),title:_?.name??y?.name??j?.name??i,...m&&y?{sections:[{group:m.team.name,icon:t.jsx(Mn,{size:48}),title:m.team.name,subtitle:m.team.description},{group:y.name,icon:t.jsx(yt,{size:32}),title:y.name,subtitle:j?.description}]}:null},suggestions:Ie||ie||p?.suggestionLabels===!1?[]:et,showHeader:!p?.hideHeader&&!!Tt,headerButtons:{showNewChat:p?.headerButtons?.newChat??!1,showClear:p?.headerButtons?.clear??!1},renderHeader:Tt?e=>t.jsx(Tt,{workspace:n,header:n.chatViewModes?{...e,chatViewMode:n.chatViewModes.value,onChatViewModeChange:n.chatViewModes.onChange,offeredViewModes:n.chatViewModes.offered}:e}):void 0,showInformation:!0,headerActions:t.jsxs(f,{display:"inline-flex",alignItems:"center",gap:2,children:[n.chatHeaderActions,Dn.length>0?t.jsx($t,{slot:Re.chatHeader,props:{workspace:n}}):null,t.jsx(Cs,{icon:$?ws:ks,"aria-label":$?"Exit full screen":"Enter full screen",variant:"invisible",size:"small",onClick:()=>{ge(!1),ht()},sx:Le?{"@keyframes dla-fullscreen-hint":{"0%, 100%":{opacity:1},"50%":{opacity:.4}},"&&":{bg:`color-mix(in srgb, ${c.primary} 16%, transparent)`,boxShadow:`inset 0 0 0 1.5px ${c.primary}`,animation:`dla-fullscreen-hint ${la}ms ease-in-out infinite`},"@media (prefers-reduced-motion: reduce)":{"&&":{animation:"none"}}}:void 0})]}),showInput:!1,onSendReady:ve,notebookToolSurfacesId:E?void 0:n.surfaceId,showTurnFooter:x.showTokenUsage??p?.showTokenUsage??!0,onContextSnapshot:Ue,onLoadingChange:Qe,onItemsChange:z,onDisplayItemsChange:de,enableStreaming:!0},sn?.id)}),dn&&!We?it:null]})}),gn=p?.suggestionLabels!==!1&&et.length>0?t.jsx(f,{"aria-label":s.suggestedPrompts,display:"flex",flexWrap:"wrap",gap:2,px:2,pb:"6px",children:et.map(e=>t.jsx(f,{as:"button",type:"button",title:e.message,disabled:L||nt,onClick:()=>{pe(e.message)},appearance:"none",font:"inherit",fontSize:0,fontWeight:"semibold",lineHeight:1.25,px:"10px",py:"5px",width:yn,flex:`0 0 ${yn}px`,borderRadius:"999px",border:"1px solid",bg:"canvas.subtle",whiteSpace:"nowrap",sx:{borderColor:"border.default",color:"fg.default",cursor:"pointer","&:hover:not(:disabled)":{borderColor:"accent.fg",color:"accent.fg"},"&:disabled":{opacity:.5,cursor:"default"}},children:t.jsx(js,{title:e.title,maxWidth:"100%",sx:{minWidth:0},children:e.title})},e.title))}):null,hn=b?t.jsx(f,{flex:"0 0 auto",px:3,py:2,borderTop:"1px solid",borderColor:"border.default",bg:"canvas.subtle",fontSize:1,maxHeight:"40%",overflowY:"auto",children:b}):null;return t.jsxs(f,{ref:me,sx:{height:"100%",minHeight:0,display:"flex",flexDirection:"column",position:"relative",...$?{bg:"canvas.default"}:null,...$&&!gt.current?{position:"fixed",top:bt,right:0,bottom:0,left:0,height:"auto",zIndex:1e3}:null},children:[ie?t.jsx(ie.Component,{workspace:n,editors:pn,hasEditor:!!E,transcript:mn,prompt:We?null:it,chips:We?null:gn,picker:fn,transient:hn}):t.jsxs(t.Fragment,{children:[Ie&&!We?t.jsxs(f,{flex:"0 0 auto",borderBottom:"1px solid",borderColor:"border.default",children:[it,gn]}):null,fn,t.jsxs(f,{flex:"1 1 auto",minHeight:0,display:"flex",position:"relative",children:[pn,mn]}),hn,dn||We||Ie?null:it]}),kt?t.jsx(f,{position:"absolute",inset:0,zIndex:5,bg:"canvas.default",display:"flex",flexDirection:"column",minHeight:0,children:t.jsx(Vs,{agentName:y?.name??j?.name,sandboxStillRuns:g,temporary:Yt,onSignedIn:()=>Es.getState().clear()})}):null]})}function ca({surfaces:n,active:s,onChange:c,workspace:a}){const d=[...n].sort((b,S)=>(b.order??100)-(S.order??100));return t.jsxs(f,{flex:"0 0 auto",display:"flex",alignItems:"center",gap:2,px:3,py:2,borderBottom:"1px solid",borderColor:"border.default",children:[t.jsx(H,{sx:{fontSize:0,color:"fg.muted"},children:"Beside the chat"}),t.jsxs(Ut,{"aria-label":"Editor beside the chat",size:"small",children:[t.jsx(Ut.Button,{selected:s===X,onClick:()=>c(X),children:"Chat"}),d.map(b=>{const S=De(b,a),C=S?void 0:b.unavailableReason?.(a)??"Not available right now";return t.jsx(Ut.Button,{selected:s===b.surfaceId,"aria-disabled":!S,title:C??b.title,leadingIcon:b.icon,onClick:()=>{S&&c(b.surfaceId)},children:b.title},b.surfaceId)})]})]})}function Ft({children:n}){return t.jsx(f,{height:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"fg.muted",fontSize:1,px:3,textAlign:"center",children:n})}export{pa as default};