@datalayer/agent-runtimes 1.5.52 → 1.5.54

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 (550) hide show
  1. package/dist-embed/chunks/ChatView-D4hFmYbm.js +32 -0
  2. package/dist-embed/chunks/{DeckComponent-C7AztSPA.js → DeckComponent-y0KZOMsH.js} +1 -1
  3. package/dist-embed/chunks/{DocumentView-DwpK2feQ.js → DocumentView-BKeO-v4k.js} +1 -1
  4. package/dist-embed/chunks/{EphemeralDocument-rusBlgBp.js → EphemeralDocument-BvbG68Jm.js} +1 -1
  5. package/dist-embed/chunks/{ExcalidrawComponent-Qv9LHutW.js → ExcalidrawComponent-DeNgg0ms.js} +1 -1
  6. package/dist-embed/chunks/{ExcalidrawModal-D6Mb9nmf.js → ExcalidrawModal-X6Yh6FKI.js} +1 -1
  7. package/dist-embed/chunks/{JupyterLexicalExtension-r47Jyrrd.js → JupyterLexicalExtension-Ght2bbbp.js} +5 -5
  8. package/dist-embed/chunks/{YouTubePlugin-4pUBJORX.js → YouTubePlugin-BnaV5Sxl.js} +1 -1
  9. package/dist-embed/chunks/{ar-SA-G6X2FPQ2-CD4X_3wm.js → ar-SA-G6X2FPQ2-DFML-KO4.js} +1 -1
  10. package/dist-embed/chunks/{az-AZ-76LH7QW2-oMbKQcB-.js → az-AZ-76LH7QW2-DTzTpRpk.js} +1 -1
  11. package/dist-embed/chunks/{bg-BG-XCXSNQG7-lSIB5dDU.js → bg-BG-XCXSNQG7-DMTmzgtc.js} +1 -1
  12. package/dist-embed/chunks/{bn-BD-2XOGV67Q-B5PkHAFO.js → bn-BD-2XOGV67Q-D1xy-Djm.js} +1 -1
  13. package/dist-embed/chunks/{ca-ES-6MX7JW3Y-BPeavtUl.js → ca-ES-6MX7JW3Y-hTO_csy7.js} +1 -1
  14. package/dist-embed/chunks/{cs-CZ-2BRQDIVT-DrBOFpi4.js → cs-CZ-2BRQDIVT-DBcXv81g.js} +1 -1
  15. package/dist-embed/chunks/{da-DK-5WZEPLOC-G5bUTE3Z.js → da-DK-5WZEPLOC-Rp51nhJX.js} +1 -1
  16. package/dist-embed/chunks/{de-DE-XR44H4JA-Drpt3qDZ.js → de-DE-XR44H4JA-DIgLamrP.js} +1 -1
  17. package/dist-embed/chunks/{el-GR-BZB4AONW-D4taPxaF.js → el-GR-BZB4AONW-XWt7TL7f.js} +1 -1
  18. package/dist-embed/chunks/{es-ES-U4NZUMDT-BvIGVphk.js → es-ES-U4NZUMDT-Bh1eks-u.js} +1 -1
  19. package/dist-embed/chunks/{eu-ES-A7QVB2H4-B8nvrNDk.js → eu-ES-A7QVB2H4-Bslg2HDc.js} +1 -1
  20. package/dist-embed/chunks/{fa-IR-HGAKTJCU-hwisHoU4.js → fa-IR-HGAKTJCU-9fGOejth.js} +1 -1
  21. package/dist-embed/chunks/{fi-FI-Z5N7JZ37-DKrDvTXs.js → fi-FI-Z5N7JZ37-DctXrD-R.js} +1 -1
  22. package/dist-embed/chunks/{fr-FR-RHASNOE6-DPtlBK_j.js → fr-FR-RHASNOE6-PUSl_g5c.js} +1 -1
  23. package/dist-embed/chunks/{gl-ES-HMX3MZ6V-B1ngwQkd.js → gl-ES-HMX3MZ6V-C5hGec18.js} +1 -1
  24. package/dist-embed/chunks/{he-IL-6SHJWFNN-BaoAQZ3f.js → he-IL-6SHJWFNN-rdU3Uatf.js} +1 -1
  25. package/dist-embed/chunks/{hi-IN-IWLTKZ5I-DzPeRmLM.js → hi-IN-IWLTKZ5I-CbVBP2OS.js} +1 -1
  26. package/dist-embed/chunks/{hu-HU-A5ZG7DT2-BgLcm8oA.js → hu-HU-A5ZG7DT2-BqNM3HXj.js} +1 -1
  27. package/dist-embed/chunks/{id-ID-SAP4L64H-egIA8l8_.js → id-ID-SAP4L64H-Z7074d-A.js} +1 -1
  28. package/dist-embed/chunks/{index-cYM4KfdD.js → index-2ciQBsIP.js} +1 -1
  29. package/dist-embed/chunks/{index-CkQ6IAoY.js → index-BIbnsdGY.js} +1 -1
  30. package/dist-embed/chunks/{index-Z2pxzg3H.js → index-BP84Dsqq.js} +1 -1
  31. package/dist-embed/chunks/{index-BzMt3uYX.js → index-BdQdhGo5.js} +1 -1
  32. package/dist-embed/chunks/{index-BKB97UwL.js → index-BpX_2Evh.js} +1 -1
  33. package/dist-embed/chunks/{index-CEbnhuIo.js → index-BrPjTG8-.js} +1 -1
  34. package/dist-embed/chunks/{index-Di3aBGLV.js → index-CAPuT1O_.js} +1 -1
  35. package/dist-embed/chunks/{index-5N0EOEHV.js → index-CC3OzP1C.js} +1 -1
  36. package/dist-embed/chunks/{index-D9_026K2.js → index-COWwWw7v.js} +1 -1
  37. package/dist-embed/chunks/{index-BTdq_niO.js → index-C_IEokTU.js} +1 -1
  38. package/dist-embed/chunks/{index-_H5U6gal.js → index-CalzGdbU.js} +1 -1
  39. package/dist-embed/chunks/{index-DVaPKQyL.js → index-CynaHotU.js} +1 -1
  40. package/dist-embed/chunks/{index-Cd5CgKFr.js → index-D4zET-qQ.js} +1 -1
  41. package/dist-embed/chunks/{index-BKOQQ5Ku.js → index-DJq5Nwi9.js} +1 -1
  42. package/dist-embed/chunks/{index-CZB8DyUw.js → index-Dx_VgK3b.js} +1 -1
  43. package/dist-embed/chunks/{index-BN8Bbau-.js → index-Dzf9vro3.js} +2 -2
  44. package/dist-embed/chunks/{index-DWfzdTZo.js → index-IGJ-OsCO.js} +1 -1
  45. package/dist-embed/chunks/{index-b6e3y1R-.js → index-mjwdOWLk.js} +1 -1
  46. package/dist-embed/chunks/{index-Gngo0bXi.js → index-wuTQQ7uK.js} +1 -1
  47. package/dist-embed/chunks/{index-CCRwowMu.js → index-zOsAyJ2Z.js} +1 -1
  48. package/dist-embed/chunks/{it-IT-JPQ66NNP-DDwc6pzw.js → it-IT-JPQ66NNP-CMr44eTw.js} +1 -1
  49. package/dist-embed/chunks/{ja-JP-DBVTYXUO-TrA2khDT.js → ja-JP-DBVTYXUO-DT0NU6hE.js} +1 -1
  50. package/dist-embed/chunks/{kaa-6HZHGXH3-GwFnOAIz.js → kaa-6HZHGXH3-C7H2NR4A.js} +1 -1
  51. package/dist-embed/chunks/{kab-KAB-ZGHBKWFO-xYS1Kjfb.js → kab-KAB-ZGHBKWFO-CNMStwQY.js} +1 -1
  52. package/dist-embed/chunks/{kk-KZ-P5N5QNE5-BwDJRk5I.js → kk-KZ-P5N5QNE5-D6IFMubV.js} +1 -1
  53. package/dist-embed/chunks/{km-KH-HSX4SM5Z-Di9J-9zc.js → km-KH-HSX4SM5Z-sh4HcGEj.js} +1 -1
  54. package/dist-embed/chunks/{ko-KR-MTYHY66A-BxF1Locw.js → ko-KR-MTYHY66A-Bgk5LE7Q.js} +1 -1
  55. package/dist-embed/chunks/{ku-TR-6OUDTVRD-mGflwIcv.js → ku-TR-6OUDTVRD-CoM0o1jW.js} +1 -1
  56. package/dist-embed/chunks/{lt-LT-XHIRWOB4-DWluphZ2.js → lt-LT-XHIRWOB4-1uHPL6b-.js} +1 -1
  57. package/dist-embed/chunks/{lv-LV-5QDEKY6T-D9EEzVQ9.js → lv-LV-5QDEKY6T-DYKbCrq6.js} +1 -1
  58. package/dist-embed/chunks/{mr-IN-CRQNXWMA-DoMvP_Jp.js → mr-IN-CRQNXWMA-C7qlI0yH.js} +1 -1
  59. package/dist-embed/chunks/{my-MM-5M5IBNSE-CPPbx93K.js → my-MM-5M5IBNSE-BWSQ_5V3.js} +1 -1
  60. package/dist-embed/chunks/{nb-NO-T6EIAALU-m2hgNNww.js → nb-NO-T6EIAALU-BVQfX-Pe.js} +1 -1
  61. package/dist-embed/chunks/{nl-NL-IS3SIHDZ-B809T0Iy.js → nl-NL-IS3SIHDZ-BXjyEe9g.js} +1 -1
  62. package/dist-embed/chunks/{nn-NO-6E72VCQL-DcMxKEVg.js → nn-NO-6E72VCQL-3eaL8woM.js} +1 -1
  63. package/dist-embed/chunks/{oc-FR-POXYY2M6-BZTBaY64.js → oc-FR-POXYY2M6-CDqoITm8.js} +1 -1
  64. package/dist-embed/chunks/{pa-IN-N4M65BXN-Cs4i3fnS.js → pa-IN-N4M65BXN-CoKaIMNa.js} +1 -1
  65. package/dist-embed/chunks/{percentages-BXMCSKIN-D82iCuEy.js → percentages-BXMCSKIN-X4aF_7zv.js} +3 -3
  66. package/dist-embed/chunks/{pl-PL-T2D74RX3-B3jg7qOY.js → pl-PL-T2D74RX3-DDD5SgtT.js} +1 -1
  67. package/dist-embed/chunks/{pt-BR-5N22H2LF-aCJuloaY.js → pt-BR-5N22H2LF-BIIRVQqv.js} +1 -1
  68. package/dist-embed/chunks/{pt-PT-UZXXM6DQ-8ZZdQp1P.js → pt-PT-UZXXM6DQ-HB1n3nNc.js} +1 -1
  69. package/dist-embed/chunks/{ro-RO-JPDTUUEW-BmyO5zyl.js → ro-RO-JPDTUUEW-CDxFIF2P.js} +1 -1
  70. package/dist-embed/chunks/{ru-RU-B4JR7IUQ-BneR_2Bm.js → ru-RU-B4JR7IUQ-CM2wpzEh.js} +1 -1
  71. package/dist-embed/chunks/{si-LK-N5RQ5JYF-CDB0IyVm.js → si-LK-N5RQ5JYF-u_f-pZ4T.js} +1 -1
  72. package/dist-embed/chunks/{sk-SK-C5VTKIMK-ypZmPMe_.js → sk-SK-C5VTKIMK-1MdhriDY.js} +1 -1
  73. package/dist-embed/chunks/{sl-SI-NN7IZMDC-D9OrZXr7.js → sl-SI-NN7IZMDC-BtkaEwYy.js} +1 -1
  74. package/dist-embed/chunks/{subset-shared.chunk-cQajIUFT.js → subset-shared.chunk-Ca3xPoZL.js} +1 -1
  75. package/dist-embed/chunks/{subset-worker.chunk-DEC9qaDu.js → subset-worker.chunk-CEgJtfh9.js} +1 -1
  76. package/dist-embed/chunks/{sv-SE-XGPEYMSR-CXBRqMMZ.js → sv-SE-XGPEYMSR-CX9l-s8b.js} +1 -1
  77. package/dist-embed/chunks/{ta-IN-2NMHFXQM-BuB9HEjH.js → ta-IN-2NMHFXQM-Bs3QMZdy.js} +1 -1
  78. package/dist-embed/chunks/{th-TH-HPSO5L25-Ci7wR5dZ.js → th-TH-HPSO5L25-yCfu_zLh.js} +1 -1
  79. package/dist-embed/chunks/{tr-TR-DEFEU3FU-CEJUT8zN.js → tr-TR-DEFEU3FU-PnpIJqSm.js} +1 -1
  80. package/dist-embed/chunks/{uk-UA-QMV73CPH-Ceh5JIiD.js → uk-UA-QMV73CPH--aODafpt.js} +1 -1
  81. package/dist-embed/chunks/{url-DuKx0yk0.js → url-CzjbCo42.js} +1 -1
  82. package/dist-embed/chunks/{vi-VN-M7AON7JQ-8-R9Ohxp.js → vi-VN-M7AON7JQ-BruA8Fg-.js} +1 -1
  83. package/dist-embed/chunks/{zh-CN-LNUGB5OW-D4q5wqKm.js → zh-CN-LNUGB5OW-DtbH5pJi.js} +1 -1
  84. package/dist-embed/chunks/{zh-HK-E62DVLB3-_UiIVKpk.js → zh-HK-E62DVLB3-CPacR6Re.js} +1 -1
  85. package/dist-embed/chunks/{zh-TW-RAJ6MFWO-DyXZ-PXI.js → zh-TW-RAJ6MFWO-CImbtPSf.js} +1 -1
  86. package/dist-embed/datalayer-app-main.js +82 -82
  87. package/lib/api/runtimes/environments.d.ts +2 -2
  88. package/lib/api/runtimes/environments.js +5 -5
  89. package/lib/api/runtimes/runtimes.d.ts +7 -7
  90. package/lib/api/runtimes/runtimes.js +5 -5
  91. package/lib/apps/__tests__/fixtures/sceneCheckCases.json +1 -1
  92. package/lib/apps/apps/AppBrowserSandbox.js +1 -1
  93. package/lib/apps/apps/AppComposer.d.ts +3 -3
  94. package/lib/apps/apps/AppComposer.js +3 -3
  95. package/lib/apps/apps/AppFeedback.d.ts +1 -1
  96. package/lib/apps/apps/AppKept.d.ts +1 -1
  97. package/lib/apps/apps/AppKept.js +1 -1
  98. package/lib/apps/apps/AppRenderer.d.ts +14 -14
  99. package/lib/apps/apps/AppRenderer.js +18 -20
  100. package/lib/apps/apps/AppRuntimePlugins.js +2 -3
  101. package/lib/apps/apps/agent.js +1 -1
  102. package/lib/apps/apps/appspec.d.ts +10 -10
  103. package/lib/apps/apps/appspec.js +35 -35
  104. package/lib/apps/apps/browserSandbox.d.ts +1 -1
  105. package/lib/apps/apps/checks.d.ts +16 -7
  106. package/lib/apps/apps/checks.js +65 -21
  107. package/lib/apps/apps/composer.d.ts +2 -2
  108. package/lib/apps/apps/composer.js +1 -1
  109. package/lib/apps/apps/computer.d.ts +3 -3
  110. package/lib/apps/apps/computer.js +1 -1
  111. package/lib/apps/apps/customComponents.d.ts +2 -2
  112. package/lib/apps/apps/customComponents.js +3 -3
  113. package/lib/apps/apps/feedback.d.ts +2 -2
  114. package/lib/apps/apps/hostTools.d.ts +3 -3
  115. package/lib/apps/apps/hostTools.js +2 -2
  116. package/lib/apps/apps/kept.d.ts +1 -1
  117. package/lib/apps/apps/language.d.ts +1 -1
  118. package/lib/apps/apps/pluginPair.d.ts +1 -1
  119. package/lib/apps/apps/records.js +1 -1
  120. package/lib/apps/apps/rules.d.ts +2 -2
  121. package/lib/apps/apps/rules.js +2 -2
  122. package/lib/apps/apps/saved.d.ts +1 -1
  123. package/lib/apps/apps/saved.js +1 -1
  124. package/lib/apps/apps/sceneChecks.js +3 -3
  125. package/lib/apps/apps/sceneYaml.js +1 -1
  126. package/lib/apps/apps/sessionRules.d.ts +7 -8
  127. package/lib/apps/apps/sessionRules.js +6 -7
  128. package/lib/apps/apps/settingsInputs.d.ts +1 -1
  129. package/lib/apps/apps/settingsInputs.js +1 -1
  130. package/lib/apps/apps/threads.d.ts +2 -2
  131. package/lib/apps/apps/threads.js +1 -1
  132. package/lib/apps/apps/uploads.d.ts +1 -1
  133. package/lib/apps/apps/visitorToken.d.ts +1 -1
  134. package/lib/apps/apps/visitorToken.js +2 -2
  135. package/lib/apps/core/a2uiComponents.js +1 -2
  136. package/lib/apps/core/appFiles.js +1 -1
  137. package/lib/apps/core/canvasBlocks.d.ts +1 -1
  138. package/lib/apps/core/canvasBlocks.js +1 -1
  139. package/lib/apps/core/canvasParts.d.ts +3 -3
  140. package/lib/apps/core/canvasParts.js +1 -1
  141. package/lib/apps/core/index.d.ts +23 -13
  142. package/lib/apps/core/index.js +5 -6
  143. package/lib/apps/embed/AppEmbed.d.ts +9 -9
  144. package/lib/apps/embed/AppEmbed.js +9 -10
  145. package/lib/apps/embed/LoopEmbed.d.ts +2 -3
  146. package/lib/apps/embed/datalayer-app.js +1 -1
  147. package/lib/apps/embed/element.js +11 -11
  148. package/lib/apps/embed/embedConfig.d.ts +8 -10
  149. package/lib/apps/embed/embedConfig.js +6 -7
  150. package/lib/apps/embed/embedSession.d.ts +3 -3
  151. package/lib/apps/embed/embedSession.js +2 -2
  152. package/lib/apps/embed/embeddedSecrets.d.ts +1 -1
  153. package/lib/apps/embed/embeddedSecrets.js +1 -1
  154. package/lib/apps/embed/hostBridge.d.ts +14 -14
  155. package/lib/apps/embed/hostBridge.js +9 -9
  156. package/lib/apps/embed/loader.js +2 -2
  157. package/lib/apps/embed/visitorApp.d.ts +1 -1
  158. package/lib/apps/index.d.ts +1 -1
  159. package/lib/apps/index.js +3 -3
  160. package/lib/apps/plugins/a2ui/A2uiView.js +1 -1
  161. package/lib/apps/plugins/a2ui-surface/AnswerShows.d.ts +2 -2
  162. package/lib/apps/plugins/a2ui-surface/AnswerShows.js +1 -1
  163. package/lib/apps/plugins/a2ui-surface/InlineSurface.d.ts +1 -1
  164. package/lib/apps/plugins/a2ui-surface/SurfaceToolResult.js +2 -2
  165. package/lib/apps/plugins/a2ui-surface/index.js +1 -1
  166. package/lib/apps/plugins/a2ui-surface/ownComponents.js +1 -1
  167. package/lib/apps/plugins/a2ui-surface/toolResult.d.ts +2 -2
  168. package/lib/apps/plugins/a2ui-surface/toolResult.js +2 -2
  169. package/lib/apps/plugins/agent-capacity/index.d.ts +2 -2
  170. package/lib/apps/plugins/agents/DatalayerAgentBridge.js +4 -4
  171. package/lib/apps/plugins/agents/appLaunch.d.ts +1 -1
  172. package/lib/apps/plugins/agents/plugin.d.ts +4 -4
  173. package/lib/apps/plugins/agents/switchable.js +1 -1
  174. package/lib/apps/plugins/app-activity/AppActivity.d.ts +1 -1
  175. package/lib/apps/plugins/app-components/index.d.ts +1 -2
  176. package/lib/apps/plugins/app-components/index.js +1 -2
  177. package/lib/apps/plugins/app-computer/AppComputer.d.ts +1 -1
  178. package/lib/apps/plugins/app-computer/AppComputer.js +2 -2
  179. package/lib/apps/plugins/app-elements/AppElements.d.ts +1 -2
  180. package/lib/apps/plugins/app-elements/AppElements.js +1 -1
  181. package/lib/apps/plugins/app-elements/QuestionView.d.ts +1 -2
  182. package/lib/apps/plugins/app-elements/QuestionView.js +1 -1
  183. package/lib/apps/plugins/app-elements/index.d.ts +2 -2
  184. package/lib/apps/plugins/app-elements/index.js +2 -2
  185. package/lib/apps/plugins/app-page/AppPage.d.ts +3 -3
  186. package/lib/apps/plugins/app-page/appPageModel.d.ts +5 -5
  187. package/lib/apps/plugins/app-page/appPageModel.js +1 -1
  188. package/lib/apps/plugins/app-page/index.d.ts +3 -3
  189. package/lib/apps/plugins/app-page/index.js +1 -1
  190. package/lib/apps/plugins/app-page/pageRun.d.ts +2 -2
  191. package/lib/apps/plugins/app-page/pageRun.js +2 -2
  192. package/lib/apps/plugins/app-rules/AppRulesCard.d.ts +11 -5
  193. package/lib/apps/plugins/app-rules/AppRulesCard.js +13 -5
  194. package/lib/apps/plugins/assistant/index.d.ts +2 -2
  195. package/lib/apps/plugins/assistant-characters/index.d.ts +2 -2
  196. package/lib/apps/plugins/assistant-characters/index.js +2 -2
  197. package/lib/apps/plugins/canvas-blocks/index.d.ts +1 -1
  198. package/lib/apps/plugins/canvas-blocks/index.js +1 -1
  199. package/lib/apps/plugins/canvas-parts/index.d.ts +5 -5
  200. package/lib/apps/plugins/canvas-parts/index.js +5 -5
  201. package/lib/apps/plugins/chat/ChatView.js +54 -37
  202. package/lib/apps/plugins/chat/index.d.ts +8 -8
  203. package/lib/apps/plugins/document/DocumentView.js +2 -2
  204. package/lib/apps/plugins/notebook/NotebookView.js +1 -1
  205. package/lib/apps/plugins/page-layout/SplitLayout.d.ts +1 -1
  206. package/lib/apps/plugins/pap-sign-in/PapSignInCard.d.ts +1 -1
  207. package/lib/apps/plugins/pap-sign-in/PapSignInCard.js +1 -1
  208. package/lib/apps/plugins/pap-sign-in/index.js +1 -1
  209. package/lib/apps/plugins/pap-sign-in/signIn.d.ts +1 -1
  210. package/lib/apps/plugins/pap-sign-in/signIn.js +1 -1
  211. package/lib/apps/plugins/plugins-panel/index.d.ts +1 -1
  212. package/lib/apps/plugins/plugins-panel/index.js +1 -1
  213. package/lib/apps/plugins/shield-displays/DiffCard.d.ts +2 -2
  214. package/lib/apps/plugins/shield-displays/TerminalCard.d.ts +1 -1
  215. package/lib/apps/plugins/shield-displays/index.js +3 -3
  216. package/lib/apps/presets.d.ts +9 -9
  217. package/lib/apps/presets.js +3 -3
  218. package/lib/apps/shell/LoopWorkspace.d.ts +1 -1
  219. package/lib/apps/shell/LoopWorkspace.js +9 -1
  220. package/lib/apps/shell/PluginToggles.d.ts +1 -1
  221. package/lib/apps/shell/SidebarRail.d.ts +1 -1
  222. package/lib/apps/shell/paneMotion.d.ts +1 -1
  223. package/lib/apps/shell/paneMotion.js +1 -1
  224. package/lib/chat/ChatFloating.d.ts +8 -9
  225. package/lib/chat/ChatFloating.js +4 -4
  226. package/lib/chat/ChatInline.js +1 -1
  227. package/lib/chat/ChatLanguage.d.ts +1 -1
  228. package/lib/chat/ChatLanguage.js +1 -1
  229. package/lib/chat/assistant/AssistantContextMenu.d.ts +1 -1
  230. package/lib/chat/assistant/AssistantStage.d.ts +4 -4
  231. package/lib/chat/assistant/AssistantStage.js +1 -1
  232. package/lib/chat/assistant/BalloonParts.d.ts +1 -1
  233. package/lib/chat/assistant/BalloonVisual.d.ts +1 -1
  234. package/lib/chat/assistant/SpeechBalloon.d.ts +2 -2
  235. package/lib/chat/assistant/SpriteCharacter.d.ts +1 -1
  236. package/lib/chat/assistant/characters.d.ts +2 -2
  237. package/lib/chat/assistant/formats/acf.js +1 -1
  238. package/lib/chat/assistant/formats/files.js +1 -1
  239. package/lib/chat/assistant/formats/index.d.ts +1 -1
  240. package/lib/chat/assistant/formats/index.js +1 -1
  241. package/lib/chat/assistant/formats/types.d.ts +1 -1
  242. package/lib/chat/assistant/state.d.ts +2 -2
  243. package/lib/chat/assistant/toolLine.js +1 -1
  244. package/lib/chat/base/ChatBase.js +28 -20
  245. package/lib/chat/base/conversationItems.d.ts +3 -3
  246. package/lib/chat/base/loopElement.d.ts +2 -2
  247. package/lib/chat/base/loopStep.d.ts +3 -3
  248. package/lib/chat/base/loopStep.js +1 -1
  249. package/lib/chat/base/loopWindow.d.ts +3 -3
  250. package/lib/chat/base/loopWindow.js +3 -3
  251. package/lib/chat/base/uiFiles.d.ts +1 -1
  252. package/lib/chat/base/uiFiles.js +1 -1
  253. package/lib/chat/base/uiOps.d.ts +1 -1
  254. package/lib/chat/base/uiOps.js +1 -1
  255. package/lib/chat/index.js +1 -1
  256. package/lib/chat/indicators/McpStatusIndicator.js +1 -1
  257. package/lib/chat/indicators/SkillsStatusIndicator.js +1 -1
  258. package/lib/chat/messages/ChatMessageList.d.ts +3 -4
  259. package/lib/chat/messages/ChatMessageList.js +2 -2
  260. package/lib/chat/messages/markdownWithoutHtml.d.ts +1 -1
  261. package/lib/chat/messages/markdownWithoutHtml.js +1 -1
  262. package/lib/chat/presence/Presence.d.ts +2 -2
  263. package/lib/chat/presence/Presence.js +1 -1
  264. package/lib/chat/presence/presenceStatus.d.ts +2 -2
  265. package/lib/chat/presence/presenceStatus.js +2 -2
  266. package/lib/chat/prompt/InputPrompt.d.ts +3 -3
  267. package/lib/chat/prompt/InputPromptBase.d.ts +1 -1
  268. package/lib/chat/prompt/InputPromptBase.js +1 -1
  269. package/lib/chat/prompt/InputPromptLexical.d.ts +1 -1
  270. package/lib/chat/styles/streamdownStyles.js +1 -1
  271. package/lib/chat/useViewportDrag.d.ts +1 -1
  272. package/lib/chat/viewModes.d.ts +1 -1
  273. package/lib/chat/viewModes.js +2 -2
  274. package/lib/chat/words.js +1 -1
  275. package/lib/client/mixins/RuntimesMixin.d.ts +3 -3
  276. package/lib/client/mixins/RuntimesMixin.js +3 -3
  277. package/lib/components/a2ui/custom/index.d.ts +3 -3
  278. package/lib/components/a2ui/custom/index.js +1 -1
  279. package/lib/components/a2ui/custom/sandbox.d.ts +2 -2
  280. package/lib/components/a2ui/custom/sandbox.js +2 -2
  281. package/lib/components/a2ui/datalayer/Chart.js +2 -2
  282. package/lib/components/a2ui/datalayer/Chat.js +1 -1
  283. package/lib/components/a2ui/datalayer/Download.js +1 -1
  284. package/lib/components/a2ui/datalayer/Evidence.js +1 -1
  285. package/lib/components/a2ui/datalayer/FileUpload.d.ts +1 -1
  286. package/lib/components/a2ui/datalayer/FileUpload.js +2 -2
  287. package/lib/components/a2ui/datalayer/Form.js +2 -2
  288. package/lib/components/a2ui/datalayer/SchemaForm.d.ts +1 -1
  289. package/lib/components/a2ui/datalayer/Table.js +1 -1
  290. package/lib/components/a2ui/datalayer/drawn.d.ts +1 -1
  291. package/lib/components/a2ui/datalayer/drawn.js +1 -1
  292. package/lib/components/a2ui/datalayer/formWidgets.js +1 -1
  293. package/lib/components/a2ui/datalayer/index.d.ts +1 -1
  294. package/lib/components/a2ui/datalayer/schema.d.ts +2 -2
  295. package/lib/components/a2ui/datalayer/schema.js +2 -2
  296. package/lib/components/a2ui/styles.js +1 -1
  297. package/lib/components/a2ui/visibleWhen.d.ts +3 -3
  298. package/lib/components/a2ui/visibleWhen.js +3 -3
  299. package/lib/components/code-sandboxes/CodeSandboxEnvironmentSelect.d.ts +1 -1
  300. package/lib/components/code-sandboxes/CodeSandboxLauncher.js +1 -1
  301. package/lib/components/code-sandboxes/CodeSandboxUtils.d.ts +1 -1
  302. package/lib/components/code-sandboxes/codeSandboxEnvironments.d.ts +2 -2
  303. package/lib/components/inspector/a2aSpans.d.ts +1 -1
  304. package/lib/components/inspector/a2aSpans.js +1 -1
  305. package/lib/components/teams/A2ATeamGraph.d.ts +3 -3
  306. package/lib/components/teams/A2ATeamGraph.js +1 -3
  307. package/lib/components/teams/AnswerSurfaces.d.ts +1 -1
  308. package/lib/components/teams/NotebookPreview.d.ts +1 -1
  309. package/lib/components/teams/SceneTranscript.d.ts +1 -1
  310. package/lib/components/teams/SceneView.d.ts +1 -1
  311. package/lib/components/teams/a2aTeamFlow.d.ts +1 -1
  312. package/lib/components/teams/a2aTeamFlow.js +1 -1
  313. package/lib/components/teams/sceneStage.d.ts +1 -1
  314. package/lib/components/teams/sceneTranscript.d.ts +1 -1
  315. package/lib/components/teams/useA2ATeam.d.ts +5 -5
  316. package/lib/components/teams/useA2ATeam.js +3 -3
  317. package/lib/config/AgentConfiguration.d.ts +1 -1
  318. package/lib/examples/AssistantExample.d.ts +1 -1
  319. package/lib/examples/AssistantExample.js +1 -1
  320. package/lib/examples/AssistantGalleryExample.d.ts +1 -1
  321. package/lib/examples/AssistantGalleryExample.js +1 -1
  322. package/lib/examples/LoopAppComputerExample.d.ts +1 -1
  323. package/lib/examples/LoopAppComputerExample.js +1 -1
  324. package/lib/examples/ProtocolSignedRequestsExample.d.ts +1 -1
  325. package/lib/examples/ProtocolSignedRequestsExample.js +1 -1
  326. package/lib/examples/ProtocolUcpCheckoutExample.d.ts +1 -1
  327. package/lib/examples/ProtocolUcpCheckoutExample.js +1 -1
  328. package/lib/examples/ScenesExample.d.ts +1 -1
  329. package/lib/examples/ScenesExample.js +1 -1
  330. package/lib/examples/ShieldHarnessExample.d.ts +1 -1
  331. package/lib/examples/ShieldHarnessExample.js +1 -1
  332. package/lib/examples/ShieldPolicyExample.d.ts +1 -1
  333. package/lib/examples/ShieldPolicyExample.js +1 -1
  334. package/lib/examples/VoiceChatExample.d.ts +1 -1
  335. package/lib/examples/VoiceChatExample.js +1 -1
  336. package/lib/examples/example-selector.js +3 -3
  337. package/lib/examples/exampleGroups.js +3 -3
  338. package/lib/examples/pap/PapSignInDisplayView.d.ts +1 -1
  339. package/lib/examples/pap/PapSignInDisplayView.js +1 -1
  340. package/lib/examples/pap/papSignInCases.js +1 -1
  341. package/lib/examples/protocols/signedRequestsDemo.d.ts +1 -1
  342. package/lib/examples/protocols/signedRequestsDemo.js +1 -1
  343. package/lib/examples/protocols/ucpCheckoutDemo.d.ts +1 -1
  344. package/lib/examples/protocols/ucpCheckoutDemo.js +1 -1
  345. package/lib/examples/shield/shieldHarness.d.ts +1 -1
  346. package/lib/examples/shield/shieldPolicyDemo.d.ts +2 -2
  347. package/lib/examples/shield/shieldPolicyDemo.js +1 -1
  348. package/lib/examples/utils/assistantGallery.d.ts +1 -1
  349. package/lib/examples/utils/clippyJsCharacters.js +2 -2
  350. package/lib/examples/utils/testSpriteCharacter.js +2 -2
  351. package/lib/hooks/ownRoutes.d.ts +1 -1
  352. package/lib/hooks/useAgentRuntimes.d.ts +1 -1
  353. package/lib/hooks/useChat.js +1 -1
  354. package/lib/index.js +1 -1
  355. package/lib/loop-example-main.js +1 -1
  356. package/lib/models/Environment.d.ts +11 -11
  357. package/lib/models/Environment.js +1 -1
  358. package/lib/models/RuntimeDTO.d.ts +1 -1
  359. package/lib/portable/activity.d.ts +2 -2
  360. package/lib/portable/activity.js +3 -3
  361. package/lib/portable/adapterEvents.d.ts +1 -1
  362. package/lib/portable/agUiRefusal.d.ts +1 -1
  363. package/lib/portable/agUiRefusal.js +1 -1
  364. package/lib/portable/agui.d.ts +2 -2
  365. package/lib/portable/agui.js +2 -2
  366. package/lib/portable/approvalCard.d.ts +1 -1
  367. package/lib/portable/approvalCard.js +1 -1
  368. package/lib/portable/approvals.d.ts +2 -2
  369. package/lib/portable/approvals.js +1 -1
  370. package/lib/portable/conversation.d.ts +2 -2
  371. package/lib/portable/conversation.js +1 -1
  372. package/lib/portable/direct.d.ts +2 -2
  373. package/lib/portable/displays.d.ts +2 -2
  374. package/lib/portable/displays.js +3 -3
  375. package/lib/portable/fixtures.d.ts +4 -5
  376. package/lib/portable/fixtures.js +4 -5
  377. package/lib/portable/hosts/agentClient.d.ts +5 -6
  378. package/lib/portable/hosts/agentClient.js +7 -7
  379. package/lib/portable/hosts/approvalRenderers.d.ts +6 -7
  380. package/lib/portable/hosts/approvalRenderers.js +2 -3
  381. package/lib/portable/hosts/client.d.ts +9 -6
  382. package/lib/portable/hosts/client.js +9 -8
  383. package/lib/portable/hosts/contracts.d.ts +2 -4
  384. package/lib/portable/hosts/contracts.js +2 -4
  385. package/lib/portable/hosts/contracts.json +2 -2
  386. package/lib/portable/hosts/deadLetters.js +2 -2
  387. package/lib/portable/hosts/deliveries.d.ts +2 -3
  388. package/lib/portable/hosts/forbiddenGraph.d.ts +4 -4
  389. package/lib/portable/hosts/forbiddenGraph.js +4 -4
  390. package/lib/portable/hosts/health.d.ts +3 -4
  391. package/lib/portable/hosts/health.js +3 -4
  392. package/lib/portable/hosts/index.d.ts +1 -1
  393. package/lib/portable/hosts/index.js +1 -1
  394. package/lib/portable/hosts/observability.d.ts +1 -1
  395. package/lib/portable/hosts/observability.js +3 -4
  396. package/lib/portable/hosts/postgresQueue.d.ts +2 -2
  397. package/lib/portable/hosts/postgresQueue.js +3 -3
  398. package/lib/portable/hosts/queue.d.ts +1 -1
  399. package/lib/portable/hosts/quotas.d.ts +2 -2
  400. package/lib/portable/hosts/quotas.js +2 -2
  401. package/lib/portable/hosts/rateLimit.d.ts +1 -1
  402. package/lib/portable/hosts/resolution.d.ts +2 -2
  403. package/lib/portable/hosts/schema.d.ts +1 -1
  404. package/lib/portable/hosts/schema.js +1 -1
  405. package/lib/portable/hosts/secretCipher.d.ts +2 -2
  406. package/lib/portable/hosts/sessionUid.js +1 -2
  407. package/lib/portable/hosts/turnState.d.ts +1 -1
  408. package/lib/portable/index.js +12 -12
  409. package/lib/portable/lifecycle.d.ts +3 -3
  410. package/lib/portable/presence.d.ts +3 -3
  411. package/lib/portable/protectedInput.d.ts +1 -1
  412. package/lib/portable/records.d.ts +2 -2
  413. package/lib/portable/records.js +2 -2
  414. package/lib/portable/runMeasures.d.ts +1 -1
  415. package/lib/portable/runMeasures.js +1 -1
  416. package/lib/portable/runtimes.d.ts +1 -1
  417. package/lib/portable/semantic-events.json +1 -1
  418. package/lib/portable/semantic.d.ts +1 -1
  419. package/lib/portable/semantic.js +1 -1
  420. package/lib/portable/semanticOfAgUi.d.ts +2 -2
  421. package/lib/portable/semanticOfAgUi.js +1 -1
  422. package/lib/portable/signIn.d.ts +5 -5
  423. package/lib/portable/signIn.js +1 -1
  424. package/lib/portable/signInStatus.d.ts +1 -2
  425. package/lib/portable/signInStatus.js +1 -2
  426. package/lib/portable/thread.d.ts +2 -2
  427. package/lib/portable/thread.js +2 -2
  428. package/lib/portable/views.d.ts +5 -5
  429. package/lib/protocols/A2AAdapter.d.ts +1 -1
  430. package/lib/protocols/A2AAdapter.js +3 -3
  431. package/lib/protocols/AGUIAdapter.d.ts +1 -1
  432. package/lib/protocols/AGUIAdapter.js +2 -2
  433. package/lib/protocols/BrowserAgentAdapter.d.ts +2 -2
  434. package/lib/protocols/BrowserAgentAdapter.js +1 -1
  435. package/lib/protocols/VercelAIAdapter.js +2 -2
  436. package/lib/protocols/a2a/index.d.ts +1 -1
  437. package/lib/protocols/a2a/index.js +1 -1
  438. package/lib/protocols/agentProtocols.d.ts +1 -1
  439. package/lib/protocols/agentProtocols.js +1 -1
  440. package/lib/protocols/agentic-commerce/index.d.ts +2 -2
  441. package/lib/protocols/agentic-commerce/index.js +2 -2
  442. package/lib/protocols/commerce.d.ts +1 -1
  443. package/lib/protocols/commerce.js +3 -3
  444. package/lib/protocols/core.d.ts +3 -3
  445. package/lib/protocols/core.js +2 -2
  446. package/lib/protocols/mcp/client.js +1 -1
  447. package/lib/protocols/mcp/index.js +1 -1
  448. package/lib/protocols/pact/index.d.ts +6 -6
  449. package/lib/protocols/pact/index.js +6 -6
  450. package/lib/protocols/ucp/index.d.ts +2 -2
  451. package/lib/protocols/ucp/index.js +2 -2
  452. package/lib/protocols/ucp/merchant.js +1 -2
  453. package/lib/protocols/web-bot-auth/index.d.ts +1 -1
  454. package/lib/protocols/web-bot-auth/index.js +1 -1
  455. package/lib/protocols/web-bot-auth/tap.js +1 -1
  456. package/lib/runtimes/actions.js +2 -2
  457. package/lib/runtimes/apis.d.ts +3 -4
  458. package/lib/runtimes/browser/a2aPeer.d.ts +1 -1
  459. package/lib/runtimes/browser/a2aPeer.js +1 -1
  460. package/lib/runtimes/browser/protocol.d.ts +1 -1
  461. package/lib/runtimes/variants.d.ts +3 -3
  462. package/lib/runtimes/variants.js +4 -4
  463. package/lib/specs/agents/agents.d.ts +6 -0
  464. package/lib/specs/agents/agents.js +296 -2
  465. package/lib/specs/apps.js +28 -28
  466. package/lib/specs/appspecSchema.js +62 -62
  467. package/lib/specs/harnesses.d.ts +1 -1
  468. package/lib/specs/harnesses.js +1 -1
  469. package/lib/specs/policies.d.ts +1 -1
  470. package/lib/specs/policies.js +2 -2
  471. package/lib/specs/protocols.d.ts +1 -1
  472. package/lib/specs/sceneSchema.js +4 -4
  473. package/lib/specs/scenes.js +4 -4
  474. package/lib/specs/standards.d.ts +1 -1
  475. package/lib/specs/ui.d.ts +2 -2
  476. package/lib/specs/ui.js +1 -1
  477. package/lib/specs/uiRenderers.d.ts +1 -1
  478. package/lib/specs/voices.d.ts +2 -2
  479. package/lib/specs/voices.js +2 -2
  480. package/lib/stories/loop/ReferenceScreens.js +1 -1
  481. package/lib/stories/loop/pictures-main.js +2 -2
  482. package/lib/test-setup.js +1 -1
  483. package/lib/types/agentspecs.d.ts +81 -85
  484. package/lib/types/chat.d.ts +26 -13
  485. package/lib/types/messages.d.ts +1 -1
  486. package/lib/types/protocol.d.ts +3 -3
  487. package/lib/types/scenes.d.ts +6 -6
  488. package/lib/types/teams.d.ts +3 -3
  489. package/lib/ui-plugins/MCPUIPlugin.d.ts +2 -2
  490. package/lib/ui-plugins/MCPUIPlugin.js +1 -1
  491. package/lib/voice/ComposerVoice.d.ts +5 -3
  492. package/lib/voice/ComposerVoice.js +4 -4
  493. package/lib/voice/HandsFree.d.ts +9 -3
  494. package/lib/voice/HandsFree.js +19 -4
  495. package/lib/voice/ReadAloud.d.ts +1 -1
  496. package/lib/voice/VoiceInput.d.ts +1 -2
  497. package/lib/voice/VoiceInput.js +10 -2
  498. package/lib/voice/VoiceMenu.d.ts +1 -1
  499. package/lib/voice/captions.d.ts +1 -1
  500. package/lib/voice/captions.js +1 -1
  501. package/lib/voice/capture.d.ts +1 -1
  502. package/lib/voice/capture.js +1 -1
  503. package/lib/voice/chatVoice.d.ts +1 -1
  504. package/lib/voice/chatVoice.js +3 -3
  505. package/lib/voice/choices.d.ts +2 -2
  506. package/lib/voice/choices.js +2 -2
  507. package/lib/voice/consent.js +1 -1
  508. package/lib/voice/handsFree.d.ts +31 -4
  509. package/lib/voice/handsFree.js +34 -4
  510. package/lib/voice/hearing.d.ts +1 -1
  511. package/lib/voice/hearing.js +1 -1
  512. package/lib/voice/index.d.ts +2 -2
  513. package/lib/voice/pinned.d.ts +2 -2
  514. package/lib/voice/pinned.js +2 -2
  515. package/lib/voice/sayAloud.d.ts +2 -2
  516. package/lib/voice/sayAloud.js +2 -2
  517. package/lib/voice/sentences.d.ts +1 -1
  518. package/lib/voice/sentences.js +1 -1
  519. package/lib/voice/serverHearing.d.ts +8 -2
  520. package/lib/voice/serverHearing.js +37 -6
  521. package/lib/voice/settings.d.ts +2 -2
  522. package/lib/voice/settings.js +2 -2
  523. package/lib/voice/speaker.d.ts +10 -4
  524. package/lib/voice/speaker.js +5 -2
  525. package/lib/voice/types.d.ts +1 -1
  526. package/lib/voice/useSpokenAnswers.js +2 -2
  527. package/lib/voice/useVoiceSettings.js +1 -1
  528. package/lib/voice/useVoiceSpeaker.js +1 -1
  529. package/package.json +2 -2
  530. package/scripts/codegen/generate_agentic_commerce.sh +1 -1
  531. package/scripts/codegen/generate_agents.py +5 -5
  532. package/scripts/codegen/generate_apps.py +3 -3
  533. package/scripts/codegen/generate_harnesses.py +4 -4
  534. package/scripts/codegen/generate_mcp_servers.py +2 -2
  535. package/scripts/codegen/generate_policies.py +3 -3
  536. package/scripts/codegen/generate_protocols.py +3 -4
  537. package/scripts/codegen/generate_scenes.py +4 -4
  538. package/scripts/codegen/generate_standards.py +3 -3
  539. package/scripts/codegen/generate_teams.py +1 -1
  540. package/scripts/codegen/generate_ui.py +8 -8
  541. package/scripts/codegen/generate_ui_renderers.py +3 -3
  542. package/scripts/codegen/generate_voices.py +4 -4
  543. package/scripts/dist-embed.mjs +1 -1
  544. package/scripts/generate-environments-types.py +1 -1
  545. package/scripts/record-scene-checks.py +2 -2
  546. package/scripts/voice/measure.py +3 -3
  547. package/scripts/voice/pin_store.py +1 -1
  548. package/scripts/voice/serve_store.py +1 -1
  549. package/scripts/voice/transcribe.mjs +1 -1
  550. package/dist-embed/chunks/ChatView-Dy-IgGFL.js +0 -32
@@ -5,7 +5,7 @@
5
5
  """
6
6
  Generate Python and TypeScript code from YAML scene specifications.
7
7
 
8
- A scene (agentspecs >= 0.0.61, LOOP A-11) stages a team: the team says who
8
+ A scene (agentspecs >= 0.0.61, A-11) stages a team: the team says who
9
9
  is on stage, the scene says what happens there — the setting, the script,
10
10
  the stage directions, the audience, the rehearsal and where it plays. One
11
11
  YAML per scene under ``agentspecs/scenes``.
@@ -19,7 +19,7 @@ Empty optional lists are dropped, as ``generate_apps.py`` drops them.
19
19
  The scene spec's JSON Schema is written beside the TypeScript catalogue as
20
20
  ``sceneSchema.ts`` (``agentspecs.scenes.json_schema``), the way
21
21
  ``generate_apps.py`` writes ``appspecSchema.ts``: what an editor of the text
22
- completes and explains is what the spec accepts (LOOP S-01, A-03).
22
+ completes and explains is what the spec accepts (S-01, A-03).
23
23
 
24
24
  Usage:
25
25
  python generate_scenes.py \\
@@ -88,7 +88,7 @@ def load_specs(specs_dir: Path) -> list[dict[str, Any]]:
88
88
  for identity in sorted(scenes):
89
89
  scene = scenes[identity]
90
90
  spec = scene.model_dump(mode="json", by_alias=True)
91
- # A scripted scene stages no team (PAP_DATALAYER X-02): no entry, no cast.
91
+ # A scripted scene stages no team (X-02): no entry, no cast.
92
92
  scripted = spec.get("kind") == "scripted"
93
93
  spec["entry"] = "" if scripted else scene.entry_of()
94
94
  spec["cast"] = (
@@ -291,7 +291,7 @@ def generate_typescript_code(specs: list[dict[str, Any]]) -> str:
291
291
 
292
292
 
293
293
  def generate_schema_typescript_code(specs_dir: Path) -> str:
294
- """The scene spec's JSON Schema, for the editor of its text (LOOP S-01, A-03).
294
+ """The scene spec's JSON Schema, for the editor of its text (S-01, A-03).
295
295
 
296
296
  Taken from the agentspecs the catalogue is generated from, so that what
297
297
  the editor completes and explains is what the spec accepts. The
@@ -5,7 +5,7 @@
5
5
  """
6
6
  Generate Python and TypeScript code from the YAML standard specifications.
7
7
 
8
- One YAML per standard under ``agentspecs/standards`` (SHIELD.md SH-60, §6.9):
8
+ One YAML per standard under ``agentspecs/standards`` (SH-60):
9
9
  its version, domains and controls, each control with its evidence items,
10
10
  cadence and crosswalks. The catalogue is carried whole: the Studio's
11
11
  conformance screens read a control's title, status words and crosswalks
@@ -73,7 +73,7 @@ def generate_python_code(specs: list[dict[str, Any]]) -> str:
73
73
  '"""',
74
74
  "Standard Catalog.",
75
75
  "",
76
- "The standards a conformance report answers (SHIELD.md SH-60, §6.9): each a",
76
+ "The standards a conformance report answers (SH-60): each a",
77
77
  "catalogue entry carrying the standard's domains and controls whole.",
78
78
  "",
79
79
  "This file is AUTO-GENERATED from YAML specifications.",
@@ -158,7 +158,7 @@ def generate_typescript_code(specs: list[dict[str, Any]]) -> str:
158
158
  "/**",
159
159
  " * Standard Catalog.",
160
160
  " *",
161
- " * The standards a conformance report answers (SHIELD.md SH-60, §6.9).",
161
+ " * The standards a conformance report answers (SH-60).",
162
162
  " *",
163
163
  " * This file is AUTO-GENERATED from YAML specifications.",
164
164
  " * DO NOT EDIT MANUALLY - run 'make specs' to regenerate.",
@@ -490,7 +490,7 @@ from agent_runtimes.types import (
490
490
  # `shared` by default: routing only makes sense if the member
491
491
  # receiving the work can see what was already said.
492
492
  context = spec.get("context") or {}
493
- # The Frames of its shared context (LOOP A-04): written only when
493
+ # The Frames of its shared context (A-04): written only when
494
494
  # it names some, as the parser reads it.
495
495
  frames = context.get("frames") or []
496
496
  code += (
@@ -6,9 +6,9 @@
6
6
  Generate Python and TypeScript code from YAML UI specifications.
7
7
 
8
8
  A UI spec is one Reactor plugin of this package (``src/apps/plugins/``) a
9
- Maker composes an interface with (AGENTIC_UI R8): its registered name, its
9
+ Maker composes an interface with (R8): its registered name, its
10
10
  Contributions, the Contribution Points it offers, its settings, the visual
11
- components it renders (LOOP C-13) and the UI renderers it may be exposed
11
+ components it renders (C-13) and the UI renderers it may be exposed
12
12
  through (``agentspecs/ui-renderers``, ``generate_ui_renderers.py``). One YAML
13
13
  per plugin under ``agentspecs/ui``; an agent's or an application's ``ui``
14
14
  names plugins, each with its renderer.
@@ -115,12 +115,12 @@ def _py_type(prop: dict[str, Any]) -> str:
115
115
 
116
116
 
117
117
  def _py_calls(specs: list[dict[str, Any]]) -> list[str]:
118
- """The catalog's components as typed calls (LOOP C-15), one method each."""
118
+ """The catalog's components as typed calls (C-15), one method each."""
119
119
  lines = [
120
120
  "",
121
121
  "",
122
122
  "# " + "=" * 76,
123
- "# The components as typed calls (LOOP C-15)",
123
+ "# The components as typed calls (C-15)",
124
124
  "# " + "=" * 76,
125
125
  "",
126
126
  '#: A property bound to what the application publishes or takes: ``{"path": "/runs"}``.',
@@ -220,7 +220,7 @@ def generate_python_code(specs: list[dict[str, Any]]) -> str:
220
220
  '"""',
221
221
  "UI Catalog.",
222
222
  "",
223
- "The UI plugins: the Reactor plugins an interface is made of (AGENTIC_UI R8).",
223
+ "The UI plugins: the Reactor plugins an interface is made of (R8).",
224
224
  "",
225
225
  "This file is AUTO-GENERATED from YAML specifications.",
226
226
  "DO NOT EDIT MANUALLY - run 'make specs' to regenerate.",
@@ -299,7 +299,7 @@ def generate_python_code(specs: list[dict[str, Any]]) -> str:
299
299
  "",
300
300
  "",
301
301
  "#: The visual components the UI plugins render, by the name a",
302
- "#: surface gives them (LOOP C-13).",
302
+ "#: surface gives them (C-13).",
303
303
  "COMPONENT_CATALOGUE: Dict[str, ComponentSpec] = {",
304
304
  " component.id: component",
305
305
  " for plugin in UI_CATALOGUE.values()",
@@ -332,7 +332,7 @@ def generate_typescript_code(specs: list[dict[str, Any]]) -> str:
332
332
  "/**",
333
333
  " * UI Catalog.",
334
334
  " *",
335
- " * The UI plugins: the Reactor plugins an interface is made of (AGENTIC_UI R8).",
335
+ " * The UI plugins: the Reactor plugins an interface is made of (R8).",
336
336
  " *",
337
337
  " * This file is AUTO-GENERATED from YAML specifications.",
338
338
  " * DO NOT EDIT MANUALLY - run 'make specs' to regenerate.",
@@ -391,7 +391,7 @@ def generate_typescript_code(specs: list[dict[str, Any]]) -> str:
391
391
  " return Object.values(UI_CATALOGUE);",
392
392
  "}",
393
393
  "",
394
- "/** The visual components the UI plugins render, by the name a surface gives them (LOOP C-13). */",
394
+ "/** The visual components the UI plugins render, by the name a surface gives them (C-13). */",
395
395
  "export const COMPONENT_CATALOGUE: Record<string, ComponentSpec> = Object.fromEntries(",
396
396
  " Object.values(UI_CATALOGUE)",
397
397
  " .flatMap(plugin => plugin.components.map(component => [component.id, component])),",
@@ -5,7 +5,7 @@
5
5
  """
6
6
  Generate Python and TypeScript code from the YAML UI renderer specifications.
7
7
 
8
- One YAML per UI renderer under ``agentspecs/ui-renderers`` (AGENTIC_UI R8,
8
+ One YAML per UI renderer under ``agentspecs/ui-renderers`` (R8,
9
9
  F-01): how a UI plugin's interface reaches a host that is not Datalayer's own
10
10
  page — A2UI, MCP Apps, MCP UI. A UI plugin (``agentspecs/ui``) says the
11
11
  renderers it may be exposed through; an agent's or an application's ``ui``
@@ -66,7 +66,7 @@ def generate_python_code(specs: list[dict[str, Any]]) -> str:
66
66
  "UI Renderer Catalog.",
67
67
  "",
68
68
  "How a UI plugin's interface reaches a host that is not Datalayer's own page",
69
- "(AGENTIC_UI R8): A2UI, MCP Apps, MCP UI.",
69
+ "(R8): A2UI, MCP Apps, MCP UI.",
70
70
  "",
71
71
  "This file is AUTO-GENERATED from YAML specifications.",
72
72
  "DO NOT EDIT MANUALLY - run 'make specs' to regenerate.",
@@ -119,7 +119,7 @@ def generate_typescript_code(specs: list[dict[str, Any]]) -> str:
119
119
  " * UI Renderer Catalog.",
120
120
  " *",
121
121
  " * How a UI plugin's interface reaches a host that is not Datalayer's own",
122
- " * page (AGENTIC_UI R8): A2UI, MCP Apps, MCP UI.",
122
+ " * page (R8): A2UI, MCP Apps, MCP UI.",
123
123
  " *",
124
124
  " * This file is AUTO-GENERATED from YAML specifications.",
125
125
  " * DO NOT EDIT MANUALLY - run 'make specs' to regenerate.",
@@ -3,7 +3,7 @@
3
3
  # Distributed under the terms of the Modified BSD License.
4
4
 
5
5
  """
6
- Generate the voice catalogue (VOICE.md VO-40) in Python and TypeScript.
6
+ Generate the voice catalogue (VO-40) in Python and TypeScript.
7
7
 
8
8
  Read through ``agentspecs.speech``, which refuses a voice or a model whose
9
9
  licence the register does not allow: what is generated has passed it.
@@ -74,7 +74,7 @@ def generate_python_code(
74
74
  "# Copyright (c) 2025-2026 Datalayer, Inc.",
75
75
  "# Distributed under the terms of the Modified BSD License.",
76
76
  '"""',
77
- "The voice catalogue (VOICE.md VO-40): voices and speech models.",
77
+ "The voice catalogue (VO-40): voices and speech models.",
78
78
  "",
79
79
  "This file is AUTO-GENERATED from agentspecs (voices, speech-models).",
80
80
  "DO NOT EDIT MANUALLY - run 'make specs' to regenerate.",
@@ -143,7 +143,7 @@ def generate_typescript_code(
143
143
  " */",
144
144
  "",
145
145
  "/**",
146
- " * The voice catalogue (VOICE.md VO-40): voices and speech models.",
146
+ " * The voice catalogue (VO-40): voices and speech models.",
147
147
  " *",
148
148
  " * This file is AUTO-GENERATED from agentspecs (voices, speech-models).",
149
149
  " * DO NOT EDIT MANUALLY - run 'make specs' to regenerate.",
@@ -246,7 +246,7 @@ def generate_typescript_code(
246
246
  "",
247
247
  "/**",
248
248
  " * The speech-to-text model for a language, on the device: Moonshine where it",
249
- " * hears it, Whisper otherwise (VOICE.md decision 3).",
249
+ " * hears it, Whisper otherwise.",
250
250
  " */",
251
251
  "export function transcriberFor(language: string): SpeechModelSpec | undefined {",
252
252
  " const base = language.split('-')[0];",
@@ -8,7 +8,7 @@
8
8
  * Put `dist-embed/` in a checkout: the embed element's own bundle.
9
9
  *
10
10
  * `dist-embed/datalayer-app.js` is what a page loads to put an application on
11
- * someone else's site (LOOP D-08). A release carries it — `npm run build:embed`
11
+ * someone else's site (D-08). A release carries it — `npm run build:embed`
12
12
  * runs in the release, and the npm package ships the folder — but a workspace
13
13
  * checkout has never run it, and the folder is gitignored. The landing's
14
14
  * production build refuses to ship without it, because an embed bundle that
@@ -6,7 +6,7 @@
6
6
  Generate the TypeScript types of the Environment specification from its JSON Schema.
7
7
 
8
8
  The pydantic models of ``code_sandboxes.environments`` are the specification
9
- (PLAN_ENV.md, D-14). ``code-sandboxes`` exports them as
9
+ (D-14). ``code-sandboxes`` exports them as
10
10
  ``schemas/environment-v1alpha1.json``; this writes what that schema says, in
11
11
  TypeScript, to ``src/models/environments.generated.ts``, as ``core`` generates
12
12
  its orchestration and MCP types.
@@ -4,7 +4,7 @@
4
4
 
5
5
  """Record what ``loop`` refuses of a scene, for every editor of a scene to be held to it.
6
6
 
7
- plans/STUDIO.md S-10: one validation over the three — what the spec editor
7
+ S-10: one validation over the three — what the spec editor
8
8
  refuses, the stage refuses and ``loop`` refuses, in the same words. The
9
9
  browser's half is ``src/apps/apps/sceneChecks.ts``; this script
10
10
  writes down what agentspecs itself says of the same scenes, and
@@ -645,7 +645,7 @@ def main() -> int:
645
645
  recorded.append({"name": case["name"], "yaml": case["yaml"], "says": says})
646
646
 
647
647
  table = {
648
- "says": "What `loop` refuses of a scene, recorded from agentspecs (plans/STUDIO.md S-10).",
648
+ "says": "What `loop` refuses of a scene, recorded from agentspecs (S-10).",
649
649
  "recordedWith": "scripts/record-scene-checks.py",
650
650
  "cases": recorded,
651
651
  }
@@ -2,7 +2,7 @@
2
2
  # Copyright (c) 2025-2026 Datalayer, Inc.
3
3
  # Distributed under the terms of the Modified BSD License.
4
4
 
5
- """Measure the speech models on the recorded fixtures (VOICE.md VO-05, VO-51, VO-52).
5
+ """Measure the speech models on the recorded fixtures (VO-05, VO-51, VO-52).
6
6
 
7
7
  python scripts/voice/measure.py --store ~/.cache/voice-work/store
8
8
 
@@ -92,7 +92,7 @@ def transcribe(
92
92
  return json.loads(done.stdout.strip().splitlines()[-1])
93
93
 
94
94
 
95
- #: Spoken turns timed on the server (VO-47, decision 18): a 3 s fixture and the
95
+ #: Spoken turns timed on the server (VO-47): a 3 s fixture and the
96
96
  #: e2e suite's 9 s question, each heard ``TURN_RUNS`` times told its language.
97
97
  TURNS = {
98
98
  "3s": VOICE_TESTS / "fixtures" / "en-6930-75918-0013.flac",
@@ -129,7 +129,7 @@ def measure_server(
129
129
  The service's own engines (faster-whisper 8-bit, Moonshine through
130
130
  onnxruntime) on the CPU with ``threads`` threads, told the language, one
131
131
  clip at a time: what it heard and how long it took; then a 3 s and a 9 s
132
- English turn, each heard ``TURN_RUNS`` times (decision 18).
132
+ English turn, each heard ``TURN_RUNS`` times.
133
133
  """
134
134
  for model in voices.SPEECH_MODEL_CATALOGUE.values():
135
135
  if model["task"] != "stt" or model["where"] != ["server"]:
@@ -2,7 +2,7 @@
2
2
  # Copyright (c) 2025-2026 Datalayer, Inc.
3
3
  # Distributed under the terms of the Modified BSD License.
4
4
 
5
- """The pinned-file store of the speech models (VOICE.md VO-03, VO-48, VO-49).
5
+ """The pinned-file store of the speech models (VO-03, VO-48, VO-49).
6
6
 
7
7
  Every file of every speech model of the catalogue, laid out as
8
8
  ``<store>/<provider>/<model id>/<path>`` — as Datalayer's storage keeps them,
@@ -2,7 +2,7 @@
2
2
  # Copyright (c) 2025-2026 Datalayer, Inc.
3
3
  # Distributed under the terms of the Modified BSD License.
4
4
 
5
- """Serve the pinned store to a page on this machine, as Datalayer's origin serves it (VOICE.md VO-49).
5
+ """Serve the pinned store to a page on this machine, as Datalayer's origin serves it (VO-49).
6
6
 
7
7
  python scripts/voice/serve_store.py --store ~/.cache/voice-work/store [--port 8770]
8
8
 
@@ -6,7 +6,7 @@
6
6
  /**
7
7
  * Transcribe WAV files with a speech-to-text model of the catalogue, as the
8
8
  * browser runs it: transformers.js, the same ONNX files, read from the
9
- * pinned store (VOICE.md VO-05, VO-51). Prints one JSON line.
9
+ * pinned store (VO-05, VO-51). Prints one JSON line.
10
10
  *
11
11
  * node scripts/voice/transcribe.mjs <store> <model id> <language> <file.wav>...
12
12
  *
@@ -1,32 +0,0 @@
1
- import{E as N,e$ as xo,r as o,j as t,f0 as vo,f1 as So,b_ as Rn,B as p,H as ht,T as H,c as Y,cu as zt,eu as Dt,f2 as ce,co as bt,e as yo,f3 as Co,f4 as wo,e3 as ko,f5 as jo,aH as Io,f6 as Eo,dX as zn,dV as To,dY as Gt,f7 as Ro,f8 as Ao,f9 as Mo,fa as Po,fb as Uo,fc as $o,d3 as Fo,a_ as Lo,fd as Oo,fe as _o,ff as zo,fg as No,fh as Bo,fi as Vo,x as Nt,fj as Ho,fk as Wo,fl as Do,fm as Go,fn as Ko,fo as Yo,fp as qo,fq as Jo,fr as Qo,fs as Xo,ft as Zo,fu as es,fv as ts,fw as ns,fx as os,fy as ss,fz as as,fA as is,fB as rs,fC as ls,fD as et,fE as cs,fF as ds,fG as us,fH as fs,fI as An,fJ as ps,fK as Le,fL as ms,fM as gs,a$ as xt,fN as hs,fO as bs,fP as Mn,fQ as xs,fR as vs,fS as Ss,fT as ys,eC as Cs,fU as Bt,fV as Ce,fW as ws,fX as ks,fY as js,fZ as Pn,f_ as Is,f$ as Un,g0 as Es,g1 as Ts,g2 as Rs,g3 as As,g4 as Ms,g5 as Ps,g6 as Us,g7 as $s,g8 as Fs,g9 as Ls,ga as vt,gb as Os,gc as _s,gd as zs,I as Ns,ge as Bs,gf as Vs,gg as $n,gh as Hs,gi as Ws,gj as Ds,gk as Kt,gl as Gs,gm as Ks,ek as Vt,gn as Ys,go as qs}from"../datalayer-app-main.js";import{S as Js,E as Qs,a as Xs}from"./SignInIcon-4HkE48mS.js";import{F as Zs,a as ea,b as ta}from"./LinkedInGreyIcon-BoWXE-HS.js";function Nn(){const n=N(xo);return o.useMemo(()=>n.map(a=>a.value),[n])}const Ht={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"}},Fn=()=>{if(typeof document>"u")return"";const n=document.getElementById("datalayer-config-data");if(!n?.textContent)return"";try{const a=JSON.parse(n.textContent);return String(a?.iamUrl||"").replace(/\/$/,"")}catch{return""}},na=(n,a="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 l=n.message;if(typeof l=="string"&&l.trim())return l}return a},oa=jo`
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
- `,sa=({onSignIn:n,onApiKeySignIn:a,loginUrl:l,name:i,title:f="Datalayer OTEL",description:x="Sign in to access the observability dashboard.",icon:y,leadingIcon:I=t.jsx(ko,{size:24}),github:d=!1,google:we=!1,linkedin:q=!1,apiKey:tt=!1,signUp:L=!0,socialSignInNavigationTarget:ee,asDoc:v=!1,fillHeight:E=!0,hideHero:te=!1,calloutTitle:Oe,calloutDescription:nt,passwordToggleLabel:de="Sign in with a password",signUpTitle:Yt="Don't have an account?",signUpDescription:J="Create a free Datalayer account with your email address.",signUpLabel:St="Sign up with email",signUpHref:_e="https://datalayer.ai/signup",onSignUp:B,forgotPasswordHref:Q="/password",forgotPasswordLabel:ze="Forgot password?",showForgotPassword:yt=!0,socialButtonMarginTop:h=3,actionButtonMaxWidth:X=320})=>{const ne=v&&!te,ot=i??(v&&f==="Datalayer OTEL"?"Datalayer Sign In":f),Ct=y??(v?t.jsx(Js,{size:24}):I),$=o.useMemo(()=>{if(l)return l;const c=Fn();return c?`${c}/api/iam/v1/login`:"/api/iam/v1/login"},[l]),[W,ke]=o.useState(""),[ue,wt]=o.useState(""),[st,kt]=o.useState(!1),[je,fe]=o.useState(!1),[w,pe]=o.useState(!1),[oe,at]=o.useState(!1),[Ne,Ie]=o.useState(null),[O,jt]=o.useState(null),[me,Ee]=o.useState(""),[Te,it]=o.useState(null),[Re,F]=o.useState(null),{enqueueToast:ge}=vo(),[Ae,se]=o.useState(!1),[ae,he]=o.useState(""),j=o.useRef(null),Me=o.useCallback(c=>So()?Rn.URLExt.join(Rn.PageConfig.getBaseUrl(),c.oauth2CallbackServerRoute):`${window.location.protocol}//${window.location.hostname}${window.location.port?`:${window.location.port}`:""}${c.oauth2CallbackUIRoute}`,[]),D=o.useMemo(()=>{if(typeof window>"u")return"/";const c=`${window.location.pathname}${window.location.search}${window.location.hash}`;return c.startsWith("/")?c:"/"},[]),V=o.useCallback(async c=>{if(!oe){F(null),Ie(c.name),at(!0);try{const k=Fn(),P=new URLSearchParams({provider:c.name,callback_uri:Me(c)}),g=ee===void 0?void 0:String(ee||"").trim(),R=g===void 0?D&&D!=="/"?D:void 0:g&&g.startsWith("/")&&!g.startsWith("//")?g:void 0;R&&P.set("post_auth_redirect",R);const re=`${k||""}/api/iam/v1/oauth2/authz/url?${P.toString()}`,S=await fetch(re),De=await S.json(),Pe=De?.autorization_url;if(!S.ok||!Pe)throw new Error(De?.message||"Unable to start social sign-in.");window.location.assign(Pe)}catch(k){const P=na(k);F(P),ge(P,{variant:"error"}),Ie(null),at(!1)}}},[Me,D,ge,oe,ee]);o.useEffect(()=>{Ae&&j.current?.focus()},[Ae]);const ie=o.useCallback(()=>{se(!1),he("")},[]),rt=o.useCallback(()=>{!ae.trim()||!a||(a(ae.trim()),ie())},[ae,a,ie]),lt=o.useCallback(()=>{if(B){B();return}window.location.assign(_e)},[B,_e]),G=o.useCallback(()=>{if(Q){if(Q.startsWith("http://")||Q.startsWith("https://")){window.open(Q,"_blank","noopener,noreferrer");return}window.location.assign(Q)}},[Q]),Be=o.useCallback(async()=>{if(!(v||!W||!ue||w)){pe(!0),F(null);try{const c=await fetch($,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({handle:W,password:ue})});if(!c.ok)throw new Error(`HTTP ${c.status}`);const k=await c.json();if(k.success&&k.token){const P=String(k?.user?.id||k?.user?.uid||"").trim();if(!!k?.user?.mfaUrl&&P){jt(P),it(k.token),F(null);return}n&&n(k.token,W)}else F(k.message||"Invalid username or password.")}catch(c){F(c instanceof Error?c.message:String(c))}finally{pe(!1)}}},[v,W,ue,w,$,n]),Ve=o.useCallback(async()=>{if(!(v||w||!O||!me.trim()||!Te)){pe(!0),F(null);try{const c=new URL($,window.location.origin),k=c.pathname.endsWith("/api/iam/v1/login")?c.href.replace(/\/api\/iam\/v1\/login$/,""):`${c.origin}`,P=await fetch(`${k}/api/iam/v1/users/${O}/mfa/validate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userUid:O,code:me.trim()})}),g=await P.json();if(!P.ok||!g?.success)throw new Error(g?.message||"Failed to validate your MFA code.");n&&n(Te,W)}catch(c){const k=c instanceof Error?c.message:String(c);F(k),ge(k,{variant:"error"})}finally{pe(!1)}}},[v,ge,W,w,$,me,Te,O,n]),He=o.useCallback(c=>{c.key==="Enter"&&(O?Ve():Be())},[O,Be,Ve]),We=oe||w||v;return t.jsxs(p,{className:"signin-input-theme-scope",display:"flex",alignItems:te||ne||!E?"flex-start":"center",justifyContent:"center",minHeight:te||ne||!E?"auto":"100vh",bg:te?"transparent":"canvas.default",color:"fg.default",py:te?0:ne?2:4,children:[t.jsx(oa,{}),t.jsxs(p,{width:"100%",maxWidth:440,p:0,children:[!te&&t.jsxs(t.Fragment,{children:[t.jsxs(p,{display:"flex",alignItems:"center",gap:2,mb:ne?2:3,justifyContent:"center",children:[Ct,t.jsx(ht,{sx:{fontSize:3},children:ot})]}),t.jsx(H,{as:"p",sx:{fontSize:1,color:"fg.muted",mb:ne?2:3,textAlign:"center"},children:x})]}),(Oe||nt)&&t.jsxs(p,{mb:3,textAlign:"center",children:[Oe&&t.jsx(ht,{as:"h3",sx:{fontSize:2,mb:1},children:Oe}),nt&&t.jsx(H,{sx:{color:"fg.muted",fontSize:1},children:nt})]}),!O&&(d||we||q)&&t.jsxs(t.Fragment,{children:[d&&t.jsx(Y,{block:!0,size:"large",leadingVisual:Ne==="github"?()=>t.jsx(zt,{size:"small"}):Zs,disabled:We,onClick:()=>V(Ht.github),sx:{mt:h,maxWidth:X,mx:"auto"},children:"Sign in with GitHub"}),we&&t.jsx(Y,{block:!0,size:"large",leadingVisual:Ne==="google"?()=>t.jsx(zt,{size:"small"}):ea,disabled:We,onClick:()=>V(Ht.google),sx:{mt:h,maxWidth:X,mx:"auto"},children:"Sign in with Google"}),q&&t.jsx(Y,{block:!0,size:"large",leadingVisual:Ne==="linkedin"?()=>t.jsx(zt,{size:"small"}):ta,disabled:We,onClick:()=>V(Ht.linkedin),sx:{mt:h,maxWidth:X,mx:"auto"},children:"Sign in with LinkedIn"})]}),!O&&!st&&t.jsx(p,{mt:3,display:"flex",justifyContent:"center",children:t.jsx(Y,{leadingVisual:Dt,size:"large",block:!0,disabled:v||w||oe,onClick:()=>kt(!0),sx:{maxWidth:X,mx:"auto"},children:de})}),!O&&st&&t.jsxs(p,{mt:4,children:[t.jsxs(ce,{required:!0,sx:{mb:3},children:[t.jsx(ce.Label,{children:"Username"}),t.jsx(bt,{autoFocus:!0,block:!0,placeholder:"Your username",value:W,disabled:w||v,onChange:c=>ke(c.target.value),onKeyDown:He})]}),t.jsxs(ce,{required:!0,sx:{mb:3},children:[t.jsx(ce.Label,{children:"Password"}),t.jsx(bt,{block:!0,placeholder:"Your password",type:je?"text":"password",value:ue,disabled:w||v,onChange:c=>wt(c.target.value),onKeyDown:He,trailingAction:t.jsx(bt.Action,{onClick:()=>fe(!je),disabled:w||v,icon:je?Qs:Xs,"aria-label":je?"Hide password":"Show password",sx:{color:"var(--fgColor-muted)"}})})]}),t.jsxs(p,{display:"flex",alignItems:"center",justifyContent:"space-between",mt:3,children:[t.jsx(Y,{variant:"primary",disabled:w||v||!W||!ue,onClick:Be,children:w?"Signing in…":"Sign In"}),yt&&t.jsx(yo,{as:"button",sx:{fontSize:1,cursor:v?"not-allowed":"pointer",background:"none",border:"none",opacity:v?.6:1},onClick:()=>{v||w||G()},children:ze})]})]}),O&&t.jsxs(t.Fragment,{children:[t.jsxs(ce,{required:!0,sx:{mb:3,mt:2},children:[t.jsx(ce.Label,{children:"MFA Code"}),t.jsx(bt,{autoFocus:!0,block:!0,placeholder:"Your MFA code",value:me,disabled:w||v,onChange:c=>Ee(c.target.value),onKeyDown:He})]}),t.jsx(Y,{variant:"primary",block:!0,disabled:w||v||!me.trim(),onClick:Ve,sx:{maxWidth:X,mx:"auto"},children:w?"Validating…":"Validate MFA Code"})]}),Re&&t.jsx(H,{sx:{color:"danger.fg",fontSize:1,mt:3,display:"block"},children:Re}),L&&t.jsxs(p,{mt:4,pt:4,textAlign:"center",borderTop:"1px solid",borderColor:"border.muted",children:[t.jsx(ht,{as:"h3",sx:{fontSize:2,mb:2},children:Yt}),t.jsx(H,{as:"p",sx:{color:"fg.muted",fontSize:1,mb:3},children:J}),t.jsx(p,{display:"flex",justifyContent:"center",children:t.jsx(Y,{variant:"primary",size:"large",leadingVisual:Co,disabled:v||w,onClick:lt,children:St})})]}),tt&&a&&t.jsxs(t.Fragment,{children:[t.jsxs(p,{display:"flex",alignItems:"center",gap:2,my:3,children:[t.jsx(p,{flex:1,height:"1px",bg:"border.default"}),t.jsx(H,{sx:{fontSize:0,color:"fg.muted"},children:"or"}),t.jsx(p,{flex:1,height:"1px",bg:"border.default"})]}),t.jsx(Y,{block:!0,leadingVisual:Dt,disabled:v||w||oe,onClick:()=>se(!0),sx:{maxWidth:X,mx:"auto"},children:"Sign in with an API Key"}),Ae&&t.jsx(p,{role:"dialog","aria-modal":"true","aria-labelledby":"signin-api-key-title",onKeyDown:c=>{c.key==="Escape"&&ie()},onClick:ie,position:"fixed",inset:0,zIndex:200,p:3,bg:"canvas.backdrop",display:"flex",alignItems:"center",justifyContent:"center",children:t.jsxs(p,{as:"form",onClick:c=>c.stopPropagation(),onSubmit:c=>{c.preventDefault(),rt()},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(ht,{id:"signin-api-key-title",sx:{fontSize:2,mb:2},children:"Enter your API Key"}),t.jsxs(ce,{required:!0,children:[t.jsx(ce.Label,{children:"API Key"}),t.jsx(wo,{block:!0,required:!0,autoFocus:!0,placeholder:"Paste your API key here",value:ae,onInput:c=>he(c.currentTarget.value),ref:j})]}),t.jsxs(p,{mt:3,display:"flex",justifyContent:"flex-end",gap:2,children:[t.jsx(Y,{type:"button",onClick:ie,children:"Cancel"}),t.jsx(Y,{type:"submit",variant:"primary",disabled:!ae.trim(),children:"Authenticate"})]})]})})]})]})]})};function aa(n){const{agentId:a,instructions:l,model:i,frontendTools:f,inference:x,subagents:y,sharing:I,onSubagentEvent:d,modeEffect:we}=n;return{type:"browser-vercel-ai",endpoint:"",agentId:a,enableConfigQuery:!1,options:{instructions:l,model:i,frontendTools:f,inference:x,subagents:y,sharing:I,onSubagentEvent:d,modeEffect:we}}}const Ln=Io((n,a)=>({pending:void 0,suggest:(l,i)=>{const f=l.trim();f&&n({pending:{text:f,submit:i?.submit??!1,nonce:(a().pending?.nonce??0)+1}})},consume:()=>n({pending:void 0})})),ia=({state:n})=>Eo[n];function ra({agentName:n,sandboxStillRuns:a=!1,temporary:l=!0,onSignedIn:i,onSignUp:f}){const{configuration:x}=zn(),y=o.useCallback(I=>{To.getState().checkIAMToken(I),i?.()},[i]);return t.jsx(p,{height:"100%",minHeight:0,overflowY:"auto",bg:"canvas.default",px:4,py:4,children:t.jsxs(p,{maxWidth:440,mx:"auto",children:[t.jsxs(p,{display:"flex",alignItems:"center",justifyContent:"center",gap:2,color:"attention.fg",mb:2,children:[t.jsx(Dt,{size:20}),t.jsx(H,{sx:{fontSize:2,fontWeight:"semibold",color:"fg.default"},children:l?"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:[l?`${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.`,a?" Your notebook is still running in this page.":""]}),t.jsx(sa,{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:x?.iamUrl?`${x.iamUrl}/api/iam/v1/login`:void 0,onSignIn:y,onSignUp:f})]})})}const la="https://r1.datalayer.run";function ca(n=!0){const{configuration:a}=zn(),l=Gt(I=>I.token),i=a?.aiInferenceUrl||la,f=Ro(i,n&&!l),x=l||f.token,y=o.useMemo(()=>({inferenceUrl:i,token:x||void 0}),[i,x]);return{inference:y,needsSignIn:Ao(y),anonymous:f,inferenceUrl:i}}const da={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 On(n){const a=n?.subagents;if(!a)return[];const l=(a.subagents??[]).map(i=>{const f=i.ref?Mo(i.ref):void 0;return{name:i.name,description:i.description||f?.description||i.name,instructions:i.instructions??f?.systemPrompt,model:i.model??f?.model??a.defaultModel,icon:f?.icon}});return a.includeGeneralPurpose?[...l,da]:l}function ua(n){return n.replace(/^datalayer_/,"").replace(/_lexical$/,"")}function fa(n){const a=ua(n);return/^executeCodeIn(Notebook|Document)$/.test(a)||/^(read|list)[A-Z]/.test(a)}function pa(n,a){return n.filter(l=>a?.has(l.name)||fa(l.name))}function ma(n,a){const l=i=>a&&i.value.id===`${a}-tools`?0:i.value.id==="notebook-tools"?1:2;return n.map((i,f)=>({entry:i,index:f,rank:l(i)})).sort((i,f)=>i.rank-f.rank||i.index-f.index).map(i=>i.entry)}function ga(n,a,l){if(!l||!n.endsWith("-tools"))return!1;const i=n.slice(0,-6);return a.has(i)&&i!==l}const ha={type:"object",properties:{}};function ba(n,a){const l=new Set(n.toolset);return n.commands.filter(i=>l.has(i.name)).map(i=>({name:i.name,description:i.description,parameters:i.parameters??ha,location:"frontend",handler:async f=>{if(!a)throw new Error(`${i.name}: the ${n.plugin??n.id} plugin is not mounted on this page.`);const x=Object.keys(f??{}).length>0?f:void 0,y=await a.executeCommand(i.command,x);return y===void 0?{ok:!0,command:i.command,argument:x}:y}}))}function Bn(n,a){return n.flatMap(l=>ba(l,a))}function xa(){const n=Po(),a=Nn();return o.useMemo(()=>Bn(a,n),[a,n])}function va(n){const a=n?.app_instance;if(!a||typeof a!="object")return"";const l=a.deployment_uid;return typeof l=="string"?l.trim():""}function Sa(n,a,l){return n||!a?n:{id:l,messages:[]}}const ya="var(--theme-accent)";function Vn({face:n,size:a}){return typeof n=="string"?t.jsx(Uo,{emoji:n,size:a,label:""}):t.jsx(t.Fragment,{children:n})}function Ca({face:n,size:a,state:l}){const i=l==="thinking"||l==="working",f=l==="paused";return t.jsxs(p,{as:"span","aria-hidden":!0,"data-presence":l,position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:a+8,height:a+8,flexShrink:0,fontSize:a,lineHeight:1,children:[t.jsx(p,{as:"span",position:"absolute",inset:0,borderRadius:"50%",boxShadow:f?"none":`0 0 0 2px ${ya}`,border:f?"2px dashed":"none",borderColor:"border.default",opacity:i||l==="waiting"||f?.9:0,transition:"opacity var(--theme-motion-status, 0ms) var(--theme-motion-easing, ease)",animation:i?"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(p,{as:"span",display:"inline-flex",opacity:f?.55:1,filter:f?"grayscale(0.6)":"none",transition:"opacity var(--theme-motion-status, 0ms) var(--theme-motion-easing, ease)",children:t.jsx(Vn,{face:n,size:a})})]})}function wa({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:ia({state:n})})}const ka=Kt(void 0),ja=Kt(""),Ia=Kt({}),Z="",Ea=1400,_n=parseInt(Ys["--loop-face-large"],10);function Pa({workspace:n}){const a=$o(),l=Fo(),i=o.useRef(null),{setViewControls:f}=n,[x,y]=o.useState(null),I=Lo(),d=I.getConfig(Oo),we=d?.placeholder||a.placeholder,q=d?.defaultSurface??"notebook",tt=I.getConfig(_o),[L,ee]=o.useState(Z),v=o.useRef(!1),E=N(zo),te=N(No),Oe=N(Bo),de=N(Vo)[0]?.value,J=Nt(de?.promptStance??ka)??de?.prompt,St=N(Ho),_e=Wo(St[0]?.value),B=o.useRef(_e);B.current=_e;const Q=o.useRef(""),ze=N(Do),yt=o.useMemo(()=>Go(()=>ze.reduce((e,r)=>({...e,...r.value.extras.value}),{})),[ze]),h=Nt(ze.length>0?yt:Ia),X=o.useRef(new Set),ne=Ko(Gs,n),ot=!ne.allowed,Ct=ot?ne.reason??"Chat is unavailable for this sandbox":void 0,[$,W]=o.useState(!1),[ke,ue]=o.useState(!1),[wt,st]=o.useState(!1),[kt,je]=o.useState({open:!1,pendingApproval:!1}),fe=Yo($,kt,d?.presence?.paused===!0),w=d?.presence?.onPresence;o.useEffect(()=>{w?.(fe),B.current?.setPresence(fe)},[w,fe]);const pe=o.useRef(d?.presence?.onSaying);pe.current=d?.presence?.onSaying;const oe=o.useRef({answering:!1}),at=o.useCallback(e=>{i.current=e,ue(!!e)},[]),Ne=o.useCallback(e=>{const{open:r,pendingApproval:s}=qo(e);je(ye=>ye.open===r&&ye.pendingApproval===s?ye:{open:r,pendingApproval:s});const m={saying:Qo(e),answering:Jo(e)},u=oe.current;(u.saying?.id!==m.saying?.id||u.saying?.text!==m.saying?.text||u.answering!==m.answering)&&(oe.current=m,pe.current?.(m));const z=B.current;if(!z)return;z.items(e);const M=new Set(["complete","completed","done","error","failed","cancelled","canceled","rejected","denied","stopped"]),K={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 b;for(let ye=e.length-1;ye>=0;ye-=1){const gt=e[ye];if(typeof gt.toolName=="string"&&gt.toolCallId){M.has(String(gt.status).toLowerCase())||(b=gt);break}}if(!b){z.activity(void 0);return}const Se=b.toolName.toLowerCase().replace(/^datalayer_/,"").replace(/_lexical$/,"").replace(/[^a-z]/g,""),bo=K[Se]??`using ${b.toolName}`;z.activity(`${Q.current||"The agent"} is ${bo}…`)},[]),Ie=o.useRef(h);Ie.current=h;const O=o.useCallback(e=>{eo(e),B.current?.usage(e),Ie.current.onUsage?.(e)},[]),jt=o.useCallback(e=>{W(e),e||B.current?.end("done")},[]),me=o.useCallback(e=>{const r=B.current;if(!r)return;let s=-1;for(let u=e.length-1;u>=0;u-=1)if(e[u].role==="user"){s=u;break}const m=e.slice(s+1).filter(u=>u.role==="assistant").map(Xo).filter(u=>u.trim().length>0).join(`
29
-
30
- `);r.assistant(m)},[]),Ee=o.useRef([]),Te=o.useRef(!1),it=o.useRef(void 0),Re=o.useRef(void 0),F=o.useRef(void 0),ge=N(Zo),Ae=o.useRef(ge);Ae.current=ge;const se=o.useCallback((e,r)=>{if(Re.current)return Re.current;const s=F.current;F.current=void 0;const m=es(Ae.current.map(M=>M.value),s?{...r??{},voice:s}:r),u=m?.loop;if(Te.current&&u?.files&&u.files.length>0){const M=it.current;if(!M)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 K;try{K=u.files.map(b=>({file:ns(String(b.name??"")),base64:ts(String(b.data_url??""))}))}catch(b){return b instanceof Error?b.message:String(b)}M.execute(os(K)).then(b=>{if(!b.success){y(`The files could not be put in the sandbox: ${b.error??"it failed"}.`);return}se(`${e}
31
-
32
- ${ss(K.map(Se=>Se.file))}`,{...m,loop:Object.fromEntries(Object.entries(u).filter(([Se])=>Se!=="files"))})});return}B.current?.begin(e,i.current?.thread());const z=i.current?.send;if(!z){Ee.current.push([e,m]);return}z(e,m)},[]);o.useEffect(()=>{f(ke?{busy:$,stop:i.current?.stop,newChat:i.current?.newChat,send:se}:null)},[$,ke,f,se]),o.useEffect(()=>()=>f(null),[f]),o.useEffect(()=>n.prompts.subscribe(se),[n.prompts,se]),o.useEffect(()=>{if(!ke||Ee.current.length===0)return;const e=Ee.current.splice(0,Ee.current.length);for(const[r,s]of e)i.current?.send(r,s)},[ke]);const ae=o.useRef(!1),he=o.useCallback(async e=>{y(null);const r=await as(Ie.current,e);if(r){r.sent?Je(""):y(r.refused);return}ae.current||(ae.current=!0,tt?.firstPromptHook?.());const s=await n.submit(e);if(!s.handled){y(s.reason??null);return}Je(""),s.result?.content&&y(s.result.content)},[n,tt?.firstPromptHook]),j=o.useMemo(()=>E.find(e=>e.value.surfaceId===L)?.value,[E,L]),Me=o.useCallback(e=>{v.current=!0,ee(e)},[]);o.useEffect(()=>is(Me),[Me]),o.useEffect(()=>{rs(E.map(e=>e.value.surfaceId))},[E]),o.useEffect(()=>{ls(L&&L!==Z?L:qs)},[L]);const D=o.useMemo(()=>q===Z||q==="none"?void 0:E.find(e=>e.value.surfaceId===q),[E,q]);o.useEffect(()=>{v.current||!D||et(D.value,n)&&ee(q)},[D,n,q]);const[V,ie]=o.useState(null),rt=o.useRef(null),lt=d?.fullScreenTopOffset??0,{fullScreen:G,usingApi:Be,toggle:Ve,topOffsetPx:He}=cs(rt,{forceOverlay:!!lt,topOffset:lt}),[We,c]=o.useState(!1),k=o.useRef(!1);o.useEffect(()=>{!$||k.current||G||(k.current=!0,c(!0))},[$,G]),o.useEffect(()=>{G&&c(!1)},[G]),o.useEffect(()=>{j&&!et(j,n)&&(ie(j.surfaceId),ee(Z))},[j,n]);const P=o.useMemo(()=>{if(V)return E.find(e=>e.value.surfaceId===V)?.value;if(!v.current&&L===Z)return D?.value},[E,V,L,D]);o.useEffect(()=>{if(!V||L!==Z)return;const e=E.find(r=>r.value.surfaceId===V);e&&et(e.value,n)&&(ie(null),ee(V))},[E,L,V,n]);const g=n.agentId?.trim()||"default",R=ds(n.sandbox.target??"local");Te.current=R;const C=us(),re=Nt(C?.selected??ja),S=C?.members.find(e=>e.id===re),De=N(fs)[0]?.value,Pe=De?.specId,A=An(S?.specId??g)??(Pe?An(Pe):void 0),Ge=S?void 0:De,qt=R&&!S?Ds(Pe,A):void 0;Q.current=S?.name??A?.name??g;const Jt=N(ps),Qt=h.hiddenOpeners,Xt=h.hideOpeners,It=h.openers,Et=o.useMemo(()=>{if(Xt)return[];const e=new Set(Qt??[]),r=b=>e.size===0?b:b.filter(Se=>!e.has(Se.text));if(It)return r(It);const s=Jt.flatMap(b=>b.value.suggestions);if(s.length>0)return r(s);const m=r(A?.suggestions??[]),u=r(C?.team.suggestions??[]);if(u.length===0)return m;const z=new Set(u.map(b=>b.text)),M=C?.team.name??"Team",K=S?.name??A?.name??g;return[...u.map(b=>({...b,group:M})),...m.filter(b=>!z.has(b.text)).map(b=>({...b,group:K}))]},[Jt,C,A,S,g,Qt,Xt,It]),ct=o.useMemo(()=>Et.map(e=>({title:e.summary??e.text,message:e.message??e.text,group:e.group})),[Et]),Tt=Le(A?.icon),_=d?.presence,Hn=Le(C?.team.icon),Zt=N(ms),dt=o.useMemo(()=>{const e=[],r=new Map,s=new Set,m=new Set(E.map(u=>u.value.surfaceId));for(const u of ma(Zt,j?.surfaceId)){if(ga(u.value.id,m,j?.surfaceId))continue;let z;try{z=u.value.tools(n)}catch(M){console.warn(`[loop] frontend tools from '${u.plugin}' failed:`,M);continue}for(const M of z){const K=r.get(M.name);if(K){console.warn(`[loop] frontend tool '${M.name}' from '${u.plugin}' is shadowed by the one from '${K}'.`);continue}r.set(M.name,u.plugin),e.push(M),u.value.chatView&&s.add(M.name)}}for(const u of h.frontendTools??[])r.has(u.name)||(r.set(u.name,"chat-extras"),e.push(u),s.add(u.name));return j?e:pa(e,s)},[Zt,n.surfaceId,n.agentId,h.frontendTools,j?.surfaceId,E]),Rt=xa(),Ke=o.useMemo(()=>{if(Rt.length===0)return dt;const e=new Set(dt.map(r=>r.name));return[...dt,...Rt.filter(r=>!e.has(r.name))]},[dt,Rt]),en=Nn(),At=h.agentToolBundles,Wn=o.useMemo(()=>{const e=h.frontendTools??[];if(!At?.length)return h.frontendTools;const r=Bn(en.filter(m=>At.includes(m.id)),I),s=new Set(e.map(m=>m.name));return[...e,...r.filter(m=>!s.has(m.name))]},[h.frontendTools,At,en,I]);it.current=R&&Ke.some(e=>e.name===gs)?I.getOutput(xt)?.sandbox:void 0;const T=hs(n.sandbox,n.serverUrl),tn=N(bs),Dn=o.useMemo(()=>tn.filter(e=>e.value.composer).map(e=>({name:e.value.name,description:e.value.description})),[tn]),Gn=o.useMemo(()=>{if(!C||!S)return On(A).map(s=>({name:s.name,description:s.description,icon:Le(s.icon)}));const e=C.members.map(s=>({name:s.name,description:s.description,emoji:s.emoji,icon:Le(s.icon),disabled:s.id===S.id,disabledReason:s.id===S.id?`You are already talking to ${s.name}`:void 0})),r=Mn(C.team,S.id).filter(s=>!C.members.some(m=>m.name===s.name)).map(s=>({name:s.name,description:s.description,icon:Le(s.icon)}));return[...e,...r]},[C,S,A]),{inference:nn,anonymous:Kn}=ca(R),Yn=Gt(e=>e.user),Mt=R&&Kn.status==="expired",on=!Yn,Ye=xs();Re.current=Ye.disabled?Ye.disableReason||"This conversation is closed here.":void 0;const Pt=T===void 0?vs(n.sandbox,a):void 0,qe=ot||Mt||!!qt||!!Pt||Ye.disabled,sn=Mt?on?a.demoKeyExpired:a.keyExpired:qt??Pt??Ct??(Ye.disabled?Ye.disableReason:void 0),[Ut,Je]=o.useState(""),[an]=Ss(),Qe=o.useMemo(()=>d?.voice?ys(d.voice,an):void 0,[d?.voice,an]),[qn,Jn]=o.useState(!1),[Qn,rn]=o.useState(),ut=Qn??Ge?.model??A?.model??n.model??"",Ue=Cs(),ln=o.useRef(Ue),cn=o.useRef(re),dn=o.useRef(Ue);dn.current=Ue,o.useEffect(()=>{cn.current!==re&&(cn.current=re,ln.current=dn.current,rn(void 0))},[re]);const Xn=Ue&&Ue!==ln.current?Ue:null,[Zn,eo]=o.useState(),to=Xn??Zn??null,no=Bt(Ce.inpromptMenu),un=Bt(Ce.promptAction),fn=Bt(Ce.chatHeader),oo=o.useMemo(()=>C?.members.map(e=>({id:e.id,name:e.name,description:e.description,icon:Le(e.icon)}))??[],[C]),be=Ln(e=>e.pending),[pn,so]=o.useState(0);o.useEffect(()=>ws(()=>so(e=>e+1)),[]),o.useEffect(()=>{be&&(Je(be.text),Ln.getState().consume(),be.submit&&he(be.text))},[be]);const mn=I.getConfig(xt)?.datalayerCreatePayload,xe=!!(Ge?.createPayload?.app_spec||mn?.app_spec),$t=va(mn),ao=Gt(e=>e.token),Ft=I.getConfig(xt)?.datalayerVisitors,io=ks(Ft),ro=I.getConfig(xt)?.embedToken,ve=Ft?io.token:ro||ao,lo=o.useMemo(()=>js(d?.voice,ve||void 0),[d?.voice,ve]),le=!!($t||Ft);if(le&&!xe)throw new Error("A deployment’s page runs its application: its host gave no app_spec.");const[gn]=o.useState(Pn),U=o.useMemo(()=>Sa(d?.thread,$t,gn),[d?.thread,$t,gn]),[$e,hn]=o.useState(null),co=!!(U?.fromRuntime&&$e?.given!==U.id);o.useEffect(()=>{if(!U?.fromRuntime||!xe||!T)return;let e=!0;return(async()=>{let r="";for(let s=0;s<4&&e;s+=1)try{const m=await Is({agentBaseUrl:T,agentId:g,uid:U.id,token:ve});e&&hn({given:U.id,thread:{...U,fromRuntime:!1,messages:m}});return}catch(m){r=m instanceof Error?m.message:String(m),await new Promise(u=>setTimeout(u,1500))}e&&hn({given:U.id,thread:{id:Pn(),messages:[],onStarted:U.onStarted},said:Un.notOpened(r)})})(),()=>{e=!1}},[U?.id,U?.fromRuntime,xe,T,g,ve]);const bn=U?.fromRuntime?$e?.given===U.id?$e.thread:void 0:U,Lt=o.useMemo(()=>R?aa({agentId:S?.specId??g,instructions:Es(A,Ge?.instructions),model:ut||void 0,inference:nn,frontendTools:Ke,subagents:C&&S?Mn(C.team,S.id):On(A),sharing:C?.sharing,onSubagentEvent:e=>Ks.getState().appendSubagentEvent(e),modeEffect:Ge?.modeEffect}):T!==void 0?{type:"ag-ui",endpoint:xe?`${T}/api/v1/apps/agents/${encodeURIComponent(g)}/ag-ui/`:`${T}/api/v1/ag-ui/${g}/`,...xe&&ve?{authToken:ve}:{},...xe?{uiSocket:`${T.replace(/^http/,"ws")}/api/v1/apps/ui`,uiFiles:`${T}/api/v1/apps/agents/${encodeURIComponent(g)}/files`,appSessions:`${T}/api/v1/apps/sessions`,...le?{ownRoutesOnly:!0}:{}}:{},agentId:g,configEndpoint:`${T}/api/v1/configure`,enableConfigQuery:!0}:void 0,[g,R,nn,S,Ke,C,A,Ge,ut,T,xe,ve,le]),ft=Ts(!R,Lt?.type==="ag-ui"?Lt.configEndpoint:void 0,void 0,g),Xe=Rs(),pt=As(g),[xn,Ot]=o.useState(void 0),[uo,fo]=o.useState(void 0);o.useEffect(()=>{if(R||T===void 0)return;const e=Ms(T,g,le);if(!e){Ot([]);return}let r=!1;return fetch(e).then(s=>s.ok?s.json():null).then(s=>{r||(Ot(s?Ps(s):[]),fo(s?Us(s):void 0))}).catch(()=>{r||Ot([])}),()=>{r=!0}},[T,g,R,le]);const po=o.useMemo(()=>$s(xn,()=>Object.values(Fs).filter(e=>e.available&&Ls(e)).map(e=>({id:e.id,name:e.name,provider:e.provider}))),[xn]),vn=o.useMemo(()=>{const e=ft.data?.builtinTools??[],r=new Set(e.map(s=>s.name));return{runtime:e,frontend:Ke.filter(s=>!r.has(s.name)).map(s=>({id:s.name,name:s.name}))}},[ft.data?.builtinTools,Ke]),Sn=o.useMemo(()=>new Set((Xe.data?.skills??[]).filter(e=>e.status==="enabled"||e.status==="loaded").map(e=>e.id)),[Xe.data]),mo=o.useCallback(async e=>{if(le)throw new Error("A deployment’s chat does not switch its runtime’s model.");rn(e),!(R||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,R,le]),yn=d?.promptPlacement==="bottom-chat",go=d?.promptPlacement==="floating",Fe=d?.promptPlacement==="top",Ze=d?.hidePrompt===!0||h.hidePrompt===!0,ho={onSend:()=>{he(Ut)},input:Ut,setInput:Je,focusTrigger:be||pn?(be?.nonce??0)+pn:void 0,placement:go||J==="floating"||J==="floating-top"||J==="floating-bottom"?"floating":"docked",floatingAnchor:J==="floating-top"?"top":"bottom",isLoading:$,onStop:()=>n.viewControls.stop?.(),placeholder:sn??h.sendInstead?.says??we,typingSuggestions:Et.map(e=>e.text),suggestions:ct,disableInputPrompt:qe,connectionConfirmed:!qe,interim:qn,padding:Fe||J==="floating-top"||J==="floating-bottom"||J==="docked-top"?2:3,promptVariant:"lexical",autoFocus:d?.autoFocusPrompt??!0,mentionableAgents:Gn,promptCommands:Dn,headerContent:no.length>0?t.jsx(vt,{slot:Ce.inpromptMenu,props:{workspace:n}}):void 0,footerExtras:un.length>0||Qe&&Qe.input!=="off"?t.jsxs(t.Fragment,{children:[un.length>0?t.jsx(vt,{slot:Ce.promptAction,props:{workspace:n}}):null,Qe&&Qe.input!=="off"?t.jsx(Os,{voice:Qe,input:Ut,setInput:Je,disabled:qe,speaking:wt,onStopSpeaking:()=>i.current?.stopSpeaking?.(),running:$,onStopRun:()=>i.current?.stop?.(),onInterrupted:()=>i.current?.markInterrupted(),onInterimChange:Jn,answers:!!(d?.voice?.output&&d.voice.output!=="off"&&d.voice.speechUrl),onSpoken:e=>{F.current=e},send:(e,r)=>{F.current=r,he(e)}}):null]}):void 0,showAgentsMenu:!_,showInlineAgentsMenu:!1,agents:oo,selectedAgentId:re,onSelectAgent:e=>C?.select(e),showTokenUsage:h.showTokenUsage??d?.showTokenUsage??!0,showContextRing:!0,agentUsage:to??void 0,showModelSelector:!_&&!le,models:po,decisions:uo,selectedModel:ut,onModelSelect:e=>{mo(e)},showToolsMenu:!_,availableTools:vn.runtime,availableFrontendTools:vn.frontend,mcpServers:ft.data?.mcpServers??[],mcpStatusData:h.mcpStatusData??void 0,showSkillsMenu:!_,skills:Xe.data?.skills??[],skillsLoading:Xe.isLoading,enabledSkills:Sn,onToggleSkill:e=>Sn.has(e)?pt.disableSkill(e):pt.enableSkill(e),onToggleAllSkills:(e,r)=>e.forEach(s=>r?pt.enableSkill(s):pt.disableSkill(s)),codemodeEnabled:h.codemodeEnabled??!1,onToggleCodemode:h.onToggleCodemode,isA2AProtocol:!1,hasConfigData:!!ft.data,hasSkillsData:!!Xe.data},Cn=te[0]?.value.Component,_t=Oe[0]?.value.Component,wn=!d?.hideHeader&&!!_t,mt=Cn?t.jsx(Cn,{workspace:n,composer:ho}):null,kn=E.length>0&&d?.showSurfaceSelector!==!1?t.jsx(Ta,{surfaces:E.map(e=>e.value),active:j?.surfaceId??P?.surfaceId??Z,onChange:Me,workspace:n}):null,jn=t.jsxs(t.Fragment,{children:[E.map(e=>{const r=e.value,s=j?.surfaceId===r.surfaceId;return s||X.current.has(r.surfaceId)||et(r,n)?(X.current.add(r.surfaceId),t.jsx(p,{sx:s?{flex:"1 1 0",minWidth:0,minHeight:0}:{position:"absolute",inset:0,visibility:"hidden",pointerEvents:"none",zIndex:-1},children:t.jsx(_s,{load:r.load,props:{surfaceId:r.surfaceId,workspace:n},fallback:t.jsxs(Wt,{children:["Loading ",r.title,"…"]}),errorFallback:u=>t.jsxs(Wt,{children:[r.title," failed to load: ",u.message]})})},r.surfaceId)):null}),!j&&P?t.jsx(p,{flex:"1 1 0",minWidth:0,minHeight:0,children:t.jsxs(Wt,{children:["Starting ",P.title,"…"]})}):null]}),In=t.jsx(t.Fragment,{children:t.jsxs(p,{flex:Fe&&j?"0 0 34%":"1 1 0",maxWidth:Fe&&j?460:void 0,minWidth:0,minHeight:0,display:"flex",flexDirection:"column",borderLeft:j?"1px solid":void 0,borderColor:"border.default",position:"relative",children:[h.errorBanner?t.jsx(p,{flexShrink:0,px:3,py:2,fontSize:1,borderBottom:"1px solid",bg:h.errorBanner.variant==="warning"?"attention.subtle":"danger.subtle",color:h.errorBanner.variant==="warning"?"attention.fg":"danger.fg",borderColor:h.errorBanner.variant==="warning"?"attention.muted":"danger.muted",children:h.errorBanner.message}):null,$e?.said&&$e.given===U?.id?t.jsx(H,{as:"p",role:"status",sx:{m:0,px:3,py:2,fontSize:1,color:"fg.muted"},children:$e.said}):null,t.jsx(p,{flex:"1 1 auto",minHeight:0,display:"flex",children:co?t.jsx(H,{as:"p",role:"status",sx:{m:0,p:3,fontSize:1,color:"fg.muted"},children:Un.opening}):t.jsx(zs,{themeVariant:d?.themeVariant,themeOverrides:d?.themeOverrides,colorMode:d?.colorMode,thread:bn,voice:lo,disabled:qe,disableReason:sn,protocol:Lt,frontendTools:R?void 0:Wn,initialModel:ut||void 0,title:_?.name??S?.name??A?.name??g,description:_?.welcome??A?.description,brandIcon:_?.face?t.jsx(Ca,{face:_.face,size:20,state:fe}):t.jsx(Tt,{size:20}),headerContent:_&&!Pt?t.jsx(wa,{state:fe}):void 0,emptyState:{icon:_?.face?t.jsx("span",{"aria-hidden":!0,style:{fontSize:_n,lineHeight:1},children:t.jsx(Vn,{face:_.face,size:_n})}):t.jsx(Tt,{size:48}),title:_?.name??S?.name??A?.name??g,...C&&S?{sections:[{group:C.team.name,icon:t.jsx(Hn,{size:48}),title:C.team.name,subtitle:C.team.description},{group:S.name,icon:t.jsx(Tt,{size:32}),title:S.name,subtitle:A?.description}]}:null},suggestions:Fe||de||d?.suggestionLabels===!1?[]:ct,showHeader:wn,headerButtons:{showNewChat:d?.headerButtons?.newChat??!1,showClear:d?.headerButtons?.clear??!1},renderHeader:_t?e=>t.jsx(_t,{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(p,{display:"inline-flex",alignItems:"center",gap:2,children:[n.chatHeaderActions,fn.length>0?t.jsx(vt,{slot:Ce.chatHeader,props:{workspace:n}}):null,t.jsx(Ns,{icon:G?Bs:Vs,"aria-label":G?"Exit full screen":"Enter full screen",variant:"invisible",size:"small",onClick:()=>{c(!1),Ve()},sx:We?{"@keyframes dla-fullscreen-hint":{"0%, 100%":{opacity:1},"50%":{opacity:.4}},"&&":{bg:`color-mix(in srgb, ${l.primary} 16%, transparent)`,boxShadow:`inset 0 0 0 1.5px ${l.primary}`,animation:`dla-fullscreen-hint ${Ea}ms ease-in-out infinite`},"@media (prefers-reduced-motion: reduce)":{"&&":{animation:"none"}}}:void 0})]}),showInput:!1,onSendReady:at,notebookToolSurfacesId:j?void 0:n.surfaceId,showTurnFooter:h.showTokenUsage??d?.showTokenUsage??!0,onContextSnapshot:O,onLoadingChange:jt,onSpeakingChange:st,onItemsChange:me,onDisplayItemsChange:Ne,enableStreaming:!0},bn?.id)}),!wn&&fn.length>0?t.jsx(p,{hidden:!0,children:t.jsx(vt,{slot:Ce.chatHeader,props:{workspace:n}})}):null,yn&&!Ze?mt:null]})}),En=d?.suggestionLabels!==!1&&ct.length>0?t.jsx(p,{"aria-label":a.suggestedPrompts,display:"flex",flexWrap:"wrap",gap:2,px:2,pb:"6px",children:ct.map(e=>t.jsx(p,{as:"button",type:"button",title:e.message,disabled:$||qe,onClick:()=>{he(e.message)},appearance:"none",font:"inherit",fontSize:0,fontWeight:"semibold",lineHeight:1.25,px:"10px",py:"5px",width:$n,flex:`0 0 ${$n}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(Hs,{title:e.title,maxWidth:"100%",sx:{minWidth:0},children:e.title})},e.title))}):null,Tn=x?t.jsx(p,{flex:"0 0 auto",px:3,py:2,borderTop:"1px solid",borderColor:"border.default",bg:"canvas.subtle",fontSize:1,maxHeight:"40%",overflowY:"auto",children:x}):null;return t.jsxs(p,{ref:rt,sx:{height:"100%",minHeight:0,display:"flex",flexDirection:"column",position:"relative",...G?{bg:"canvas.default"}:null,...G&&!Be.current?{position:"fixed",top:He,right:0,bottom:0,left:0,height:"auto",zIndex:1e3}:null},children:[de?t.jsx(de.Component,{workspace:n,editors:jn,hasEditor:!!j,transcript:In,prompt:Ze?null:mt,chips:Ze?null:En,picker:kn,transient:Tn}):t.jsxs(t.Fragment,{children:[Fe&&!Ze?t.jsxs(p,{flex:"0 0 auto",borderBottom:"1px solid",borderColor:"border.default",children:[mt,En]}):null,kn,t.jsxs(p,{flex:"1 1 auto",minHeight:0,display:"flex",position:"relative",children:[jn,In]}),Tn,yn||Ze||Fe?null:mt]}),Mt?t.jsx(p,{position:"absolute",inset:0,zIndex:5,bg:"canvas.default",display:"flex",flexDirection:"column",minHeight:0,children:t.jsx(ra,{agentName:S?.name??A?.name,sandboxStillRuns:R,temporary:on,onSignedIn:()=>Ws.getState().clear()})}):null]})}function Ta({surfaces:n,active:a,onChange:l,workspace:i}){const f=[...n].sort((x,y)=>(x.order??100)-(y.order??100));return t.jsxs(p,{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(Vt,{"aria-label":"Editor beside the chat",size:"small",children:[t.jsx(Vt.Button,{selected:a===Z,onClick:()=>l(Z),children:"Chat"}),f.map(x=>{const y=et(x,i),I=y?void 0:x.unavailableReason?.(i)??"Not available right now";return t.jsx(Vt.Button,{selected:a===x.surfaceId,"aria-disabled":!y,title:I??x.title,leadingIcon:x.icon,onClick:()=>{y&&l(x.surfaceId)},children:x.title},x.surfaceId)})]})]})}function Wt({children:n}){return t.jsx(p,{height:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"fg.muted",fontSize:1,px:3,textAlign:"center",children:n})}export{Pa as default};