dorkos 0.131.0 → 0.132.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (334) hide show
  1. package/dist/bin/cli.js +324 -251
  2. package/dist/browser/fresh-verifier.mjs +13 -13
  3. package/dist/browser/native/darwin-supervisor-worker.mjs +3 -3
  4. package/dist/browser/native/package-manifest.json +1 -1
  5. package/dist/browser/source-manifest.json +1 -1
  6. package/dist/client/assets/{AboutPage-BZ2LLJ0k.js → AboutPage-Co7dVF9Z.js} +1 -1
  7. package/dist/client/assets/{ActivityErrorState-BnqAwUiy.js → ActivityErrorState-BrTkXZ6h.js} +1 -1
  8. package/dist/client/assets/{ActivityPage-BlZKrSVo.js → ActivityPage-Vk3zC2wX.js} +1 -1
  9. package/dist/client/assets/{ActivityRow-Ch8HxQ2m.js → ActivityRow-D_zqfTtI.js} +1 -1
  10. package/dist/client/assets/{AdapterIcon-CfocFMw-.js → AdapterIcon-Ba90gZtO.js} +1 -1
  11. package/dist/client/assets/{AdapterSetupWizard-Dtjx1Oad.js → AdapterSetupWizard-CzlKjgS0.js} +2 -2
  12. package/dist/client/assets/{AgentOptionRow-BGRvUeF7.js → AgentOptionRow-YsNMoqxA.js} +1 -1
  13. package/dist/client/assets/{AgentPicker-BcURPZQp.js → AgentPicker-Chtkpz5v.js} +1 -1
  14. package/dist/client/assets/{AgentRequestCard-kNq5A_IN.js → AgentRequestCard-BSvTh8P0.js} +1 -1
  15. package/dist/client/assets/{AppearancePage-Cd-k7dcc.js → AppearancePage-DQXsbxwz.js} +1 -1
  16. package/dist/client/assets/ApplyToOverridesDialog-Dz4dRYKs.js +1 -0
  17. package/dist/client/assets/{AttentionSignalRow-QY8AIjf9.js → AttentionSignalRow-D9Gs4fQW.js} +1 -1
  18. package/dist/client/assets/{BaseTanStackRouterDevtoolsPanel-B-iktbLX-Cgkvajbw.js → BaseTanStackRouterDevtoolsPanel-B-iktbLX-frMjE1fG.js} +3 -3
  19. package/dist/client/assets/BindingDialog-CMbJI0MX.js +1 -0
  20. package/dist/client/assets/{BlintzCanvas-CMzZnmWK.js → BlintzCanvas-Dz8rAsfT.js} +3 -3
  21. package/dist/client/assets/{CanvasCsvContent-uxMaHePf.js → CanvasCsvContent-FMSGU_ae.js} +4 -4
  22. package/dist/client/assets/CanvasFileContent-CecxcpLI.js +2 -0
  23. package/dist/client/assets/CanvasModel3dContent-C66rrYY-.js +2 -0
  24. package/dist/client/assets/{ChannelComposer-BAg0a29Q.js → ChannelComposer-EZk2JgmU.js} +12 -17
  25. package/dist/client/assets/{ChatAppsOff-DD28V0vX.js → ChatAppsOff-CM043XGQ.js} +2 -2
  26. package/dist/client/assets/{CodeMirrorDiff-CyoduBgM.js → CodeMirrorDiff-CCnDdKmg.js} +1 -1
  27. package/dist/client/assets/{CodeMirrorEditor-DGccoZ8Q.js → CodeMirrorEditor-Ct5GtLSd.js} +1 -1
  28. package/dist/client/assets/{CommitmentList-DOvfnyDA.js → CommitmentList-BXbIFc4Y.js} +1 -1
  29. package/dist/client/assets/{CommitmentsPage-D81vxHUk.js → CommitmentsPage-CMKLXfbr.js} +1 -1
  30. package/dist/client/assets/{ComputerResourceView-Dk98shko.js → ComputerResourceView-dXV2M5eB.js} +1 -1
  31. package/dist/client/assets/{ComputerViewer-Broprz4q.js → ComputerViewer-4Aq0_cCL.js} +1 -1
  32. package/dist/client/assets/{ConnectionAccessLists-C_qLz8GJ.js → ConnectionAccessLists-DfIlofzc.js} +1 -1
  33. package/dist/client/assets/{ConnectionsPage-CmGgGmDO.js → ConnectionsPage-Ck4qQt1-.js} +2 -2
  34. package/dist/client/assets/{ConventionPage-BxWLIUUC.js → ConventionPage-z4phQYn0.js} +2 -2
  35. package/dist/client/assets/{ExtensionPageRoute-CyfIRaGs.js → ExtensionPageRoute-5chyBxxz.js} +2 -2
  36. package/dist/client/assets/{FeatureDisabledState-By2dhVpu.js → FeatureDisabledState-DrNY_0RT.js} +1 -1
  37. package/dist/client/assets/{FloatingTanStackRouterDevtools-CqogiFob-B6wKQpLR.js → FloatingTanStackRouterDevtools-CqogiFob-BeWxYbjO.js} +1 -1
  38. package/dist/client/assets/{ForwardConsentHost-kDdpyBgA.js → ForwardConsentHost-BVh663l5.js} +1 -1
  39. package/dist/client/assets/HandlePage-0fA-Trcw.js +1 -0
  40. package/dist/client/assets/{HeartbeatPage-CMj1SS30.js → HeartbeatPage-CByO3lLO.js} +1 -1
  41. package/dist/client/assets/{KeyEntry-Ctc1zp2J.js → KeyEntry-Z5hKKbef.js} +1 -1
  42. package/dist/client/assets/{LexicalField-7zd4B8f1.js → LexicalField-C6xJGRPF.js} +2 -2
  43. package/dist/client/assets/{ManagesPage-BG1TIMP3.js → ManagesPage-CgicR4Kd.js} +1 -1
  44. package/dist/client/assets/{Marketplace-C9r4jRJf.js → Marketplace-vLgSIgdn.js} +4 -4
  45. package/dist/client/assets/{MarketplaceSourcesView-C01Cdrge.js → MarketplaceSourcesView-Dth8Z9u3.js} +1 -1
  46. package/dist/client/assets/{McpAppFrame-Dm7MqOhc.js → McpAppFrame-DAPJUxUi.js} +2 -2
  47. package/dist/client/assets/{McpSigninBody-CsXP_7lE.js → McpSigninBody-D4j1GIhT.js} +1 -1
  48. package/dist/client/assets/{Model3dViewer-DOl8ZkrU.js → Model3dViewer-BqErc378.js} +1 -1
  49. package/dist/client/assets/NamePage-BI35-ZiO.js +1 -0
  50. package/dist/client/assets/{NewDirectMessageMenu-Dj-Qw8zA.js → NewDirectMessageMenu-BC7MdqUz.js} +1 -1
  51. package/dist/client/assets/{NotificationsPage-UExs4YE2.js → NotificationsPage-DsO88sso.js} +1 -1
  52. package/dist/client/assets/{OpenMeshSwitch-Dx3M3wwS.js → OpenMeshSwitch-Bv623x0o.js} +2 -2
  53. package/dist/client/assets/{OperatorIdentityForm-Bz5570RF.js → OperatorIdentityForm-C1knkmdh.js} +1 -1
  54. package/dist/client/assets/PermissionHistory-BaQShYqE.js +1 -0
  55. package/dist/client/assets/PermissionsPage-C74Pvkwc.js +1 -0
  56. package/dist/client/assets/{PersonalityPopover-Do-k_Hhw.js → PersonalityPopover-CD0qi79s.js} +1 -1
  57. package/dist/client/assets/PhotoPage-DE7tKzAB.js +1 -0
  58. package/dist/client/assets/{PreviewRefusedNotice-B-yyzQZP.js → PreviewRefusedNotice-BtTsn6IU.js} +1 -1
  59. package/dist/client/assets/{ProfileFields-DiarOK2y.js → ProfileFields-qnjDsdIB.js} +1 -1
  60. package/dist/client/assets/{ProfilePanelContainer-33Xkwoc3.js → ProfilePanelContainer-B01W49_v.js} +1 -1
  61. package/dist/client/assets/{ProfileRolePicker-BI6T4hj8.js → ProfileRolePicker-LcLX20fO.js} +1 -1
  62. package/dist/client/assets/{PromptSuggestionChips-v5MScpZF.js → PromptSuggestionChips-Cxa-xTMn.js} +1 -1
  63. package/dist/client/assets/{ReportsToPopover-BALADuTO.js → ReportsToPopover-ukRxHNsk.js} +1 -1
  64. package/dist/client/assets/{RoomSurface-BatV7gf5.js → RoomSurface-CwlU4Lns.js} +1 -1
  65. package/dist/client/assets/{RoomsPage-DCCC3Dst.js → RoomsPage-CRJ7tbt0.js} +1 -1
  66. package/dist/client/assets/{RunsOnPopover-C7hMPyrb.js → RunsOnPopover-Bn1F_tCT.js} +1 -1
  67. package/dist/client/assets/{RuntimeConnectFlow-Dc5a8dlJ.js → RuntimeConnectFlow-Ddm_TBWI.js} +1 -1
  68. package/dist/client/assets/{RuntimeSetupDialog-w90VGjJ4.js → RuntimeSetupDialog-BcDt-BYK.js} +1 -1
  69. package/dist/client/assets/{SeenDevices-BIMmbMWC.js → SeenDevices-mpu0OgjB.js} +3 -3
  70. package/dist/client/assets/{SessionsPage-0lwvSYHB.js → SessionsPage-Dp_iQdpc.js} +1 -1
  71. package/dist/client/assets/{SettingsDialog-CrP6JzPg.js → SettingsDialog-TNI6sYo5.js} +4 -4
  72. package/dist/client/assets/{SkillsPage-BDgKWTfe.js → SkillsPage-k-7ycbOg.js} +1 -1
  73. package/dist/client/assets/TaskDialogWrapper-Bfp5pa_r.js +1 -0
  74. package/dist/client/assets/{TasksEmptyState-RkUEEU2r.js → TasksEmptyState-BlGELISr.js} +2 -2
  75. package/dist/client/assets/{TasksPage-DjGbMGvn.js → TasksPage-BRVvjSR1.js} +1 -1
  76. package/dist/client/assets/{TeamComputerEntry-B_sM9Fik.js → TeamComputerEntry-RQBXj6_l.js} +1 -1
  77. package/dist/client/assets/{ToolsPage-CeETRCd8.js → ToolsPage-D1seB8vW.js} +2 -2
  78. package/dist/client/assets/{TopologyGraph-CnpH2NjE.js → TopologyGraph-DdWrS7dp.js} +3 -3
  79. package/dist/client/assets/{TourHost-BQHrS47S.js → TourHost-DmcHWh9X.js} +1 -1
  80. package/dist/client/assets/{UnlinkDialog-DOQLeNx4.js → UnlinkDialog-FQzgYxPM.js} +1 -1
  81. package/dist/client/assets/{UnreadDivider-DhyK6uGG.js → UnreadDivider-DPMhdEbw.js} +1 -1
  82. package/dist/client/assets/{WidgetErrorCard-Bwlfu514.js → WidgetErrorCard-B477vOv2.js} +6 -6
  83. package/dist/client/assets/{WithheldExtensionsNotice-BDc-CM2t.js → WithheldExtensionsNotice-BQnkJvgb.js} +1 -1
  84. package/dist/client/assets/{WorkQueuePage-iO_DO1YK.js → WorkQueuePage-CwlR32Dy.js} +1 -1
  85. package/dist/client/assets/WorkView-J0V1k1Q7.js +51 -0
  86. package/dist/client/assets/_shell-B8mHdyV6.js +80 -0
  87. package/dist/client/assets/{_shell._home-BWi5YPaR.js → _shell._home-CadWLlSU.js} +1 -1
  88. package/dist/client/assets/{_shell._home.activity-BU1NIGb7.js → _shell._home.activity-Cmy3lakH.js} +1 -1
  89. package/dist/client/assets/_shell._home.index-eR2x0FUG.js +3 -0
  90. package/dist/client/assets/_shell._home.tasks-4Vkj6L-V.js +1 -0
  91. package/dist/client/assets/{_shell._home.workspaces-wbnqJ58w.js → _shell._home.workspaces-fYlBcaoi.js} +1 -1
  92. package/dist/client/assets/{_shell.channels-D1KdvWZF.js → _shell.channels-nErO_7xf.js} +2 -2
  93. package/dist/client/assets/_shell.connections-C9URqim3.js +1 -0
  94. package/dist/client/assets/{_shell.feedback-requests-DzHWC1fJ.js → _shell.feedback-requests-DJxcMS1O.js} +2 -2
  95. package/dist/client/assets/_shell.marketplace-CNUtNewz.js +1 -0
  96. package/dist/client/assets/_shell.marketplace_.sources-Cku_p8cg.js +1 -0
  97. package/dist/client/assets/_shell.session-B990EEo5.js +1 -0
  98. package/dist/client/assets/{_shell.team-BMNSUpQQ.js → _shell.team-CXbQysNY.js} +4 -4
  99. package/dist/client/assets/_shell.threads-CDEyGRL3.js +1 -0
  100. package/dist/client/assets/_shell.todos-8uEPusJV.js +6 -0
  101. package/dist/client/assets/_shell.x._extensionId-DXp9Wa0V.js +1 -0
  102. package/dist/client/assets/_shell.x._extensionId_._-DXp9Wa0V.js +1 -0
  103. package/dist/client/assets/{abnfDiagram-WEYOIA3C-Co2k29JX.js → abnfDiagram-WEYOIA3C-C4khI9rY.js} +1 -1
  104. package/dist/client/assets/{access-copy-D6BUySpp.js → access-copy-w5gryYsO.js} +1 -1
  105. package/dist/client/assets/{arc-DLZZpkuJ.js → arc-fvrOAWql.js} +1 -1
  106. package/dist/client/assets/{architectureDiagram-ZHVYKT53-ClS9xqK5.js → architectureDiagram-ZHVYKT53-CNH5Fhq_.js} +1 -1
  107. package/dist/client/assets/{banner-B8iMuXCP.js → banner-CBw5pFjQ.js} +2 -2
  108. package/dist/client/assets/{blockDiagram-RJAE7QA3-DheoOELu.js → blockDiagram-RJAE7QA3-BxP4ZQri.js} +1 -1
  109. package/dist/client/assets/{c4Diagram-XDPPPE54-VWWZJ5x4.js → c4Diagram-XDPPPE54-BhBYlCWz.js} +1 -1
  110. package/dist/client/assets/channel-splVtfTe.js +1 -0
  111. package/dist/client/assets/{chunk-2E7WHVMD-BqPLJVkv.js → chunk-2E7WHVMD-COA0yYP4.js} +1 -1
  112. package/dist/client/assets/{chunk-2Q5K7J3B-DZn6OnKe.js → chunk-2Q5K7J3B-BbmrmCrP.js} +1 -1
  113. package/dist/client/assets/{chunk-4EMNKR2T-Dl9Poajp.js → chunk-4EMNKR2T-CzA2mZv9.js} +1 -1
  114. package/dist/client/assets/{chunk-55XCU76K-RoKuZPUc.js → chunk-55XCU76K-DJ2x-ilD.js} +1 -1
  115. package/dist/client/assets/{chunk-5VM5RSS4-DV_1XHtU.js → chunk-5VM5RSS4-BxznGj8M.js} +1 -1
  116. package/dist/client/assets/{chunk-JWPE2WC7-B_IuS45y.js → chunk-JWPE2WC7-DHb10Lbd.js} +1 -1
  117. package/dist/client/assets/{chunk-VQ5W62QI-DkLNi45x.js → chunk-VQ5W62QI-C7cjQxzr.js} +1 -1
  118. package/dist/client/assets/{chunk-XXDRQBXY-ISM-1Dpw.js → chunk-XXDRQBXY-M7RrmKQv.js} +1 -1
  119. package/dist/client/assets/{chunk-ZCHMQSOR-MKaLMW8o.js → chunk-ZCHMQSOR-BZxPNYte.js} +2 -2
  120. package/dist/client/assets/{classDiagram-v2-4MYWR3UA-CIWuu4ht.js → classDiagram-v2-4MYWR3UA-vt1g5HlO.js} +1 -1
  121. package/dist/client/assets/{command-CxGYZKco.js → command-DU2-hlOP.js} +1 -1
  122. package/dist/client/assets/{copy-button-DjAoGwds.js → copy-button-BodCVufV.js} +1 -1
  123. package/dist/client/assets/{cose-bilkent-JH36ORCC-HiCifRyi.js → cose-bilkent-JH36ORCC-Cd27g-Yx.js} +1 -1
  124. package/dist/client/assets/{cpu-DHHTTvp_.js → cpu-BXE_D43d.js} +1 -1
  125. package/dist/client/assets/{cynefin-EF2NZ3EQ-DjJGZrPz.js → cynefin-EF2NZ3EQ-BnCAgdfS.js} +1 -1
  126. package/dist/client/assets/{cynefinDiagram-WF24UDRP-DE2NdiJ2.js → cynefinDiagram-WF24UDRP-eIO4xQHB.js} +1 -1
  127. package/dist/client/assets/{dagre-NK4GIZVX-C6gDOD26.js → dagre-NK4GIZVX-Bvd_3Cqy.js} +1 -1
  128. package/dist/client/assets/{detail-row-CjwI1iuc.js → detail-row-BvEUzVxe.js} +1 -1
  129. package/dist/client/assets/{diagram-CBK3MWTC-38LckcsL.js → diagram-CBK3MWTC-BGqDA_bh.js} +1 -1
  130. package/dist/client/assets/{diagram-I5XIIV2D--8L6D9Ra.js → diagram-I5XIIV2D-BXhbpnrE.js} +1 -1
  131. package/dist/client/assets/{diagram-ODIL2UCW-DGC2Inhd.js → diagram-ODIL2UCW-C4hWeQZn.js} +1 -1
  132. package/dist/client/assets/{diagram-PFBEJUXE-BDHp0AyR.js → diagram-PFBEJUXE-DIEuwCdA.js} +1 -1
  133. package/dist/client/assets/{diagram-RJA3I4VV-uBatJYPi.js → diagram-RJA3I4VV-C36ghYx6.js} +1 -1
  134. package/dist/client/assets/{diagram-TYUNFSNR-C8e1EH9X.js → diagram-TYUNFSNR-CSC9FLO6.js} +1 -1
  135. package/dist/client/assets/{ebnfDiagram-V4P3TTPT-DimRzU5B.js → ebnfDiagram-V4P3TTPT-DuOLfVHI.js} +1 -1
  136. package/dist/client/assets/{elk-QONTBCTQ-Dz6_Y2-G.js → elk-QONTBCTQ-NvLhZqkG.js} +1 -1
  137. package/dist/client/assets/{empty-state-saV209Il.js → empty-state-B316LEXY.js} +1 -1
  138. package/dist/client/assets/{erDiagram-KYQIGQAA-JeuTF8w6.js → erDiagram-KYQIGQAA-BcTRY9y8.js} +1 -1
  139. package/dist/client/assets/{execution-config-ClQZyDs9.js → execution-config-D9vIc46b.js} +1 -1
  140. package/dist/client/assets/{file-BIF-4ARS.js → file-C_57RCIQ.js} +1 -1
  141. package/dist/client/assets/{file-exclamation-point-DxadH2b-.js → file-exclamation-point-C7C2dM_w.js} +1 -1
  142. package/dist/client/assets/{file-text-C_NPIQr4.js → file-text-CS9s0qOe.js} +1 -1
  143. package/dist/client/assets/{find-latest-widget-fence-CXai_zs0.js → find-latest-widget-fence-D_FwbHep.js} +4 -4
  144. package/dist/client/assets/{flowDiagram-IUGLLWBU-9FHDdK4j.js → flowDiagram-IUGLLWBU-DxQ31Egh.js} +1 -1
  145. package/dist/client/assets/{form-D3VdAYl4.js → form-Cf49Z6eU.js} +1 -1
  146. package/dist/client/assets/{format-cron-BqRDcFZM.js → format-cron-Dlp0mfqz.js} +1 -1
  147. package/dist/client/assets/{ganttDiagram-R7GPNTJY-CLMuXlHt.js → ganttDiagram-R7GPNTJY-Bxwm173A.js} +1 -1
  148. package/dist/client/assets/{git-branch-Df7a5_fb.js → git-branch-DpByNz2U.js} +1 -1
  149. package/dist/client/assets/{gitGraphDiagram-PDYL7XHY-sE7Rlpr6.js → gitGraphDiagram-PDYL7XHY-DH8AQ76t.js} +1 -1
  150. package/dist/client/assets/{graph-iNVyFhBQ.js → graph-BGzqfhJw.js} +1 -1
  151. package/dist/client/assets/{heart-BHMhDZ0K.js → heart-DKWg_e72.js} +1 -1
  152. package/dist/client/assets/{highlighted-body-KPVGNVTW-VvvsrJbu.js → highlighted-body-KPVGNVTW-Dd_spScF.js} +1 -1
  153. package/dist/client/assets/{image-lightbox-CGEIRguA.js → image-lightbox-BtsV24zH.js} +1 -1
  154. package/dist/client/assets/{image-off-C5-TmSq8.js → image-off-Czqq8ai8.js} +1 -1
  155. package/dist/client/assets/{index-C3zS0ghJ.js → index-B401rtXR.js} +1 -1
  156. package/dist/client/assets/{index-WeLoaNzW.js → index-BGKWKxfR.js} +1 -1
  157. package/dist/client/assets/{index-DFkofTx1.js → index-BQulbvlk.js} +1 -1
  158. package/dist/client/assets/{index-Y6BDhuGt.js → index-BTB5QRQx.js} +1 -1
  159. package/dist/client/assets/index-BYTLOFNS.js +1061 -0
  160. package/dist/client/assets/{index-CLsoFUml.js → index-B_KMn9ji.js} +1 -1
  161. package/dist/client/assets/{index-Cudi8rs6.js → index-BapT4bjy.js} +1 -1
  162. package/dist/client/assets/index-BbPg1hpf.css +1 -0
  163. package/dist/client/assets/{index-BK5QrGfQ.js → index-BhIDM_HP.js} +1 -1
  164. package/dist/client/assets/{index-CExh9cKN.js → index-BmckK_5Q.js} +1 -1
  165. package/dist/client/assets/{index-BxFLHNLg.js → index-BxNcjL67.js} +1 -1
  166. package/dist/client/assets/{index-LPrq0pOA.js → index-CHGNCEc4.js} +1 -1
  167. package/dist/client/assets/{index-Bzm9YMbr.js → index-CIokV9hG.js} +1 -1
  168. package/dist/client/assets/index-CUDsA_8O.js +1 -0
  169. package/dist/client/assets/{index-DMwivStD.js → index-CWBtIScD.js} +2 -2
  170. package/dist/client/assets/{index-YZbu9tke.js → index-CX4nMOaI.js} +1 -1
  171. package/dist/client/assets/index-CaYgHnra.js +1 -0
  172. package/dist/client/assets/{index-D9bEy8X-.js → index-CpxbjS0M.js} +1 -1
  173. package/dist/client/assets/{index-Ci_J5Q-6.js → index-D0k8LoLP.js} +1 -1
  174. package/dist/client/assets/{index-BMLCfTba.js → index-D2gKRr6f.js} +1 -1
  175. package/dist/client/assets/index-D6jG1-Mw.js +1 -0
  176. package/dist/client/assets/{index-Bd0PAkxf.js → index-DCFKleTS.js} +1 -1
  177. package/dist/client/assets/{index-k67dvyau.js → index-DG-iZ_7U.js} +1 -1
  178. package/dist/client/assets/{index-CgWzzIbx.js → index-DGKwWSrJ.js} +1 -1
  179. package/dist/client/assets/{index-BLUUshO9.js → index-DHFIAKQc.js} +1 -1
  180. package/dist/client/assets/{index-CTgUh4p3.js → index-DNkWdNSz.js} +1 -1
  181. package/dist/client/assets/{index-DWZ5M321.js → index-DOFLQqXn.js} +1 -1
  182. package/dist/client/assets/index-DOZg4xUY.js +1 -0
  183. package/dist/client/assets/{index-BgRYuqWs.js → index-DQ9MUhkA.js} +1 -1
  184. package/dist/client/assets/{index-B0FHRkHM.js → index-DXA-11hB.js} +2 -2
  185. package/dist/client/assets/{index-BgdYXP8E.js → index-DcUcciFs.js} +3 -3
  186. package/dist/client/assets/{index-Dw-4S640.js → index-Deupek6J.js} +1 -1
  187. package/dist/client/assets/index-DrbZanni.js +1 -0
  188. package/dist/client/assets/{index-264YDu-W.js → index-DwAhtrb9.js} +1 -1
  189. package/dist/client/assets/{index-DEvpdTo6.js → index-EB7hJHJY.js} +1 -1
  190. package/dist/client/assets/{index-C_0JoCV6.js → index-GAcHtPZc.js} +1 -1
  191. package/dist/client/assets/{index-ClyRhxV_.js → index-GZP3iUOG.js} +1 -1
  192. package/dist/client/assets/{index-Dpu2CORc.js → index-JLySVSjV.js} +1 -1
  193. package/dist/client/assets/{index-DRtg_sGG.js → index-MCPJOxb7.js} +1 -1
  194. package/dist/client/assets/{index-D_bAtIJZ.js → index-N77XDvrM.js} +1 -1
  195. package/dist/client/assets/{index-B8I1k-z9.js → index-O9UP2ojb.js} +1 -1
  196. package/dist/client/assets/{index-DYVNSRDk.js → index-aSuMCzNN.js} +1 -1
  197. package/dist/client/assets/{index-BZTLFzJp.js → index-sbmgxCMU.js} +1 -1
  198. package/dist/client/assets/{index-Di-MIFQG.js → index-vEujcopz.js} +3 -3
  199. package/dist/client/assets/{index.esm-CYmalBux.js → index.esm-B0kiCgAP.js} +1 -1
  200. package/dist/client/assets/{infoDiagram-MVDRKAX5-0aR9wjgO.js → infoDiagram-MVDRKAX5-CFgHv4Dm.js} +1 -1
  201. package/dist/client/assets/{inline-code-DyTKSC5b.js → inline-code-B3u1dOXm.js} +1 -1
  202. package/dist/client/assets/{ishikawaDiagram-HPEHV2GE-D1lN8x2t.js → ishikawaDiagram-HPEHV2GE-BWRvdwNW.js} +1 -1
  203. package/dist/client/assets/{journeyDiagram-BOSHW7O7-CkXITXiJ.js → journeyDiagram-BOSHW7O7-6zzUqSAS.js} +1 -1
  204. package/dist/client/assets/{kanban-definition-FNSA4HC5-ge33IiSq.js → kanban-definition-FNSA4HC5-CCCFKXnc.js} +1 -1
  205. package/dist/client/assets/{layers-Bx3K7OUm.js → layers-Dbd-86dV.js} +1 -1
  206. package/dist/client/assets/{lightbulb-C5LvXkvM.js → lightbulb-C15x7OEZ.js} +1 -1
  207. package/dist/client/assets/{link-2-Bj0_Zkvr.js → link-2-D1CRDxXB.js} +1 -1
  208. package/dist/client/assets/{list-runtime-types-VNj1C8TB.js → list-runtime-types-Cyl4h4lV.js} +1 -1
  209. package/dist/client/assets/{markdown-content-BRaPEOC7.js → markdown-content-C1i_dR6j.js} +1 -1
  210. package/dist/client/assets/{mention-pill-B_MiJWfo.js → mention-pill-DoQBb5VU.js} +1 -1
  211. package/dist/client/assets/{mermaid.core-B2hil_4a.js → mermaid.core-BaDCR0nn.js} +4 -4
  212. package/dist/client/assets/{message-square-off-T33FHpr7.js → message-square-off-CwB3fRn1.js} +1 -1
  213. package/dist/client/assets/{mindmap-definition-6OY57UG3-Bu_Ia4Xz.js → mindmap-definition-6OY57UG3-B6g2CNRv.js} +1 -1
  214. package/dist/client/assets/{more-details-oDazWBxm.js → more-details-DNp6DH8i.js} +1 -1
  215. package/dist/client/assets/{owner-notice-VepbAQhj.js → owner-notice-P8INt5DW.js} +1 -1
  216. package/dist/client/assets/{package-DBsl3ao5.js → package-DHEY3aDq.js} +1 -1
  217. package/dist/client/assets/{page-container-Bkarym6m.js → page-container-BwHVHvGF.js} +1 -1
  218. package/dist/client/assets/{pane-resize-handle-gBlb5k1v.js → pane-resize-handle-BetBV5qX.js} +1 -1
  219. package/dist/client/assets/{paperclip-BeFttiUK.js → paperclip-DYgUORd3.js} +1 -1
  220. package/dist/client/assets/{path-input-NY_yCBHb.js → path-input-DpN1vJO-.js} +1 -1
  221. package/dist/client/assets/{pegDiagram-ECIUJNBX-0KmJlW0E.js → pegDiagram-ECIUJNBX-Db7P43aK.js} +1 -1
  222. package/dist/client/assets/{pieDiagram-GNMPY74T-IjeZXicv.js → pieDiagram-GNMPY74T-Cz1jeviu.js} +1 -1
  223. package/dist/client/assets/{plug-CTqOZ7cA.js → plug-C5hngNbe.js} +1 -1
  224. package/dist/client/assets/{primer-trigger-CjaGrT2u.js → primer-trigger-Bb7X-l3r.js} +2 -2
  225. package/dist/client/assets/{profile-errors-B8XkL2Rp.js → profile-errors-OMPgeYKJ.js} +1 -1
  226. package/dist/client/assets/{progress-Cr-4myw6.js → progress-CNm_pBbE.js} +1 -1
  227. package/dist/client/assets/{quadrantDiagram-D57K4MC3-CP6kLJKa.js → quadrantDiagram-D57K4MC3-PD02f4Da.js} +1 -1
  228. package/dist/client/assets/{query-error-state-DvhY-YKM.js → query-error-state-BdmBV0DG.js} +1 -1
  229. package/dist/client/assets/{radio-CmDmmJy6.js → radio-BmjH89ml.js} +1 -1
  230. package/dist/client/assets/{railroadDiagram-Y72NRBL7-Bcto__oE.js → railroadDiagram-Y72NRBL7-x1K1Xrsr.js} +1 -1
  231. package/dist/client/assets/registry-3K4FIIyI.js +39 -0
  232. package/dist/client/assets/registry-DNYPNSm5.js +1 -0
  233. package/dist/client/assets/{relay-trace-schemas-ZLR1S8ft.js → relay-trace-schemas-CctfRKB2.js} +2 -2
  234. package/dist/client/assets/{repeat-DVTM8et8.js → repeat-CK_sumJP.js} +1 -1
  235. package/dist/client/assets/{requirementDiagram-EQYSW5RA-DNJrds3m.js → requirementDiagram-EQYSW5RA-BM-pntyA.js} +1 -1
  236. package/dist/client/assets/{room-files-source-9Wdtc-bG.js → room-files-source-CKjJxFRA.js} +2 -2
  237. package/dist/client/assets/{rotate-ccw-clock-qJSWqifh.js → rotate-ccw-clock-DzVWecfL.js} +1 -1
  238. package/dist/client/assets/{rotate-cw-uoeBxIeM.js → rotate-cw-CpuoCwEK.js} +1 -1
  239. package/dist/client/assets/{sankeyDiagram-SY24JHO5-DNlU7xGI.js → sankeyDiagram-SY24JHO5-ByCX1rfW.js} +1 -1
  240. package/dist/client/assets/{scroll-area-B1d3NfEn.js → scroll-area-BO7uDl4z.js} +1 -1
  241. package/dist/client/assets/{sequenceDiagram-BLEHNHQU-CRk71coF.js → sequenceDiagram-BLEHNHQU-BPB2hLY6.js} +1 -1
  242. package/dist/client/assets/{shield-x-BpQmg1qz.js → shield-x-DknrRQrV.js} +1 -1
  243. package/dist/client/assets/{signed-in-CTmJ3OqM.js → signed-in-DdaXcjzY.js} +1 -1
  244. package/dist/client/assets/{sizeCapture-INFHLROL-cihX3QNq.js → sizeCapture-INFHLROL-DRe6LanJ.js} +1 -1
  245. package/dist/client/assets/{soul-file-BwiyiI5v.js → soul-file-CPL6-cba.js} +1 -1
  246. package/dist/client/assets/{stateDiagram-v2-A6IESKWZ-BAwwRsnH.js → stateDiagram-v2-A6IESKWZ-DZA18t3o.js} +1 -1
  247. package/dist/client/assets/{swimlanes-B3ENRKFQ-CpDB6CUC.js → swimlanes-B3ENRKFQ-DRX2o4k2.js} +1 -1
  248. package/dist/client/assets/swimlanesDiagram-AYQRV4AK-D5hU--1Q.js +8 -0
  249. package/dist/client/assets/{table-dWrfPeX-.js → table-BrvyPoEL.js} +1 -1
  250. package/dist/client/assets/{tabs-D4txthOi.js → tabs-BmbzJhKE.js} +1 -1
  251. package/dist/client/assets/{timeline-definition-JXYKGLGB-RDrKgCoU.js → timeline-definition-JXYKGLGB-BL2C4v8r.js} +1 -1
  252. package/dist/client/assets/trust-dial-tuMHO5Ug.js +11 -0
  253. package/dist/client/assets/{trust-posture-atZIh8tf.js → trust-posture-9cC08pk5.js} +1 -1
  254. package/dist/client/assets/{unplug-CnevV4yX.js → unplug-B8oONuTT.js} +1 -1
  255. package/dist/client/assets/{unverified-catalog-notice-BQwT36FA.js → unverified-catalog-notice-ofL4eYQH.js} +1 -1
  256. package/dist/client/assets/{use-bindings-CltfjAWW.js → use-bindings-DVKWBz4y.js} +1 -1
  257. package/dist/client/assets/{use-composer-prefs-D-Zlt6z2.js → use-composer-prefs-DWFqxtm6.js} +1 -1
  258. package/dist/client/assets/{use-connector-management-C3CLnOOt.js → use-connector-management-B_RvwV0T.js} +1 -1
  259. package/dist/client/assets/{use-deep-link-scroll-DQlz-scx.js → use-deep-link-scroll-Cahio5D0.js} +1 -1
  260. package/dist/client/assets/{use-delete-binding-D73CLm_7.js → use-delete-binding-DHiPJq9D.js} +1 -1
  261. package/dist/client/assets/{use-dev-links-BqVFsMKU.js → use-dev-links-Cunzy9gq.js} +1 -1
  262. package/dist/client/assets/use-direct-message-panel-CPyyrU4P.js +1 -0
  263. package/dist/client/assets/{use-external-adapter-catalog-DrnksH0t.js → use-external-adapter-catalog-l9RzI0W5.js} +1 -1
  264. package/dist/client/assets/{use-filter-state-D4i-hDOk.js → use-filter-state-DKALQgO9.js} +2 -2
  265. package/dist/client/assets/{use-full-activity-feed-DdDsRg8s.js → use-full-activity-feed-B7miUwr2.js} +1 -1
  266. package/dist/client/assets/use-is-below-desktop-DSwl4xyH.js +1 -0
  267. package/dist/client/assets/{use-mesh-topology-B7aLtPkZ.js → use-mesh-topology-Y9Cdja0F.js} +1 -1
  268. package/dist/client/assets/{use-mounted-ref-DSSTCJfY.js → use-mounted-ref-Bb8zNmgI.js} +1 -1
  269. package/dist/client/assets/{use-notification-prefs-DaF3kwmq.js → use-notification-prefs-DoZgirjS.js} +1 -1
  270. package/dist/client/assets/use-pending-read-DC4hUOFi.js +1 -0
  271. package/dist/client/assets/{use-personality-commit-D5b90JPX.js → use-personality-commit-CDMLIF8s.js} +1 -1
  272. package/dist/client/assets/{use-promo-activation-CPAOQpfe.js → use-promo-activation-XWY3OSoy.js} +2 -2
  273. package/dist/client/assets/{use-promo-dismissals-Bx1gz1R1.js → use-promo-dismissals-Bg7cJFb8.js} +1 -1
  274. package/dist/client/assets/{use-pulse-freshness-DeulB37O.js → use-pulse-freshness-B4nO2ugg.js} +1 -1
  275. package/dist/client/assets/{use-room-follow-claim-Dwke6RFQ.js → use-room-follow-claim-CpOIUcG7.js} +1 -1
  276. package/dist/client/assets/{use-room-sessions-iepVrIMm.js → use-room-sessions-BeiAMSkk.js} +1 -1
  277. package/dist/client/assets/{use-roving-tab-list-pCPKNQKv.js → use-roving-tab-list-HB0egh1C.js} +1 -1
  278. package/dist/client/assets/{use-session-canvas-BvvO-_V1.js → use-session-canvas-Cc04zSW3.js} +6 -6
  279. package/dist/client/assets/{use-status-budget-Bs7MMriS.js → use-status-budget-GIeJAyM1.js} +2 -2
  280. package/dist/client/assets/{use-todos-C-eREuDS.js → use-todos-Bq9I1_Md.js} +1 -1
  281. package/dist/client/assets/{use-transform-lj3TkjYO.js → use-transform-DEFDL9dO.js} +1 -1
  282. package/dist/client/assets/{use-unclaimed-chats-BF3-0jHC.js → use-unclaimed-chats-BzDzgx9Q.js} +1 -1
  283. package/dist/client/assets/use-update-config-Bt7fMLqS.js +1 -0
  284. package/dist/client/assets/{useMutationState-B_x_4f2K.js → useMutationState-Bffa43_B.js} +1 -1
  285. package/dist/client/assets/{usecaseDiagram-WPOLBNNX-DBsRYa4J.js → usecaseDiagram-WPOLBNNX-BoYu8koq.js} +1 -1
  286. package/dist/client/assets/{vennDiagram-Q3Y3IDCW-rFAXvcQI.js → vennDiagram-Q3Y3IDCW-U4E5RDf5.js} +1 -1
  287. package/dist/client/assets/{wardleyDiagram-IVAIDKWA-bI0JZkO3.js → wardleyDiagram-IVAIDKWA-DYWCkm0g.js} +1 -1
  288. package/dist/client/assets/{xychartDiagram-4URNHDU4-DZUd8iln.js → xychartDiagram-4URNHDU4-DMf6UlJg.js} +1 -1
  289. package/dist/client/assets/zap-BmeuEI5X.js +6 -0
  290. package/dist/client/index.html +2 -2
  291. package/dist/drizzle/20261104060919_package_approval_request.sql +1 -0
  292. package/dist/drizzle/meta/20261104060919_snapshot.json +14889 -0
  293. package/dist/drizzle/meta/_journal.json +7 -0
  294. package/dist/server/index.js +30881 -29909
  295. package/dist/server/index.js.map +2 -2
  296. package/package.json +7 -7
  297. package/dist/client/assets/ApplyToOverridesDialog-DE9VVQCA.js +0 -1
  298. package/dist/client/assets/BindingDialog-C_yflKOE.js +0 -1
  299. package/dist/client/assets/CanvasFileContent-C3ZKszxn.js +0 -2
  300. package/dist/client/assets/CanvasModel3dContent-CsNUuaj6.js +0 -2
  301. package/dist/client/assets/HandlePage-vsG04kBg.js +0 -1
  302. package/dist/client/assets/NamePage-DdX2yQ5f.js +0 -1
  303. package/dist/client/assets/PermissionHistory-Bhl2kr1R.js +0 -1
  304. package/dist/client/assets/PermissionsPage-DUbenFkt.js +0 -1
  305. package/dist/client/assets/PhotoPage-CExABoHA.js +0 -1
  306. package/dist/client/assets/TaskDialogWrapper-BVb8gAr0.js +0 -1
  307. package/dist/client/assets/WorkView-BDk_vwu3.js +0 -51
  308. package/dist/client/assets/_shell-CMNFxZKJ.js +0 -80
  309. package/dist/client/assets/_shell._home.index-BjR-d3_s.js +0 -3
  310. package/dist/client/assets/_shell._home.tasks-CqURPMQD.js +0 -1
  311. package/dist/client/assets/_shell.connections-D3gJrBTQ.js +0 -1
  312. package/dist/client/assets/_shell.marketplace-HdefWdN_.js +0 -1
  313. package/dist/client/assets/_shell.marketplace_.sources-wAZKfDQF.js +0 -1
  314. package/dist/client/assets/_shell.session-C0utZeSI.js +0 -1
  315. package/dist/client/assets/_shell.threads-TvzYRNMt.js +0 -1
  316. package/dist/client/assets/_shell.todos-sOFmsIPE.js +0 -6
  317. package/dist/client/assets/_shell.x._extensionId-DiEQZIvl.js +0 -1
  318. package/dist/client/assets/_shell.x._extensionId_._-DiEQZIvl.js +0 -1
  319. package/dist/client/assets/channel-B0WiEIVe.js +0 -1
  320. package/dist/client/assets/index-BwTGkJbK.js +0 -1071
  321. package/dist/client/assets/index-CCHGVclj.js +0 -1
  322. package/dist/client/assets/index-CiUmx-i3.js +0 -1
  323. package/dist/client/assets/index-Dd4JoHFP.js +0 -1
  324. package/dist/client/assets/index-DlmGvYpy.js +0 -1
  325. package/dist/client/assets/index-EXJsA5kw.js +0 -1
  326. package/dist/client/assets/index-MpS13vhQ.css +0 -1
  327. package/dist/client/assets/registry-BQTcAm5U.js +0 -39
  328. package/dist/client/assets/registry-HencHRXy.js +0 -1
  329. package/dist/client/assets/swimlanesDiagram-AYQRV4AK-nJfOIWYW.js +0 -8
  330. package/dist/client/assets/use-direct-message-panel-B3qfpDjY.js +0 -1
  331. package/dist/client/assets/use-is-below-desktop-BXHT3oPL.js +0 -1
  332. package/dist/client/assets/use-local-browser-DDWknHZE.js +0 -1
  333. package/dist/client/assets/use-pending-read-uvmEJ7H9.js +0 -1
  334. package/dist/client/assets/use-update-config-D-OGlXGR.js +0 -1
@@ -35,7 +35,7 @@ var AbsolutePathSchema = z2.string().min(1).max(4096).refine(
35
35
  var RuntimeSchema = z2.object({
36
36
  library: z2.object({
37
37
  package: z2.literal("playwright-core"),
38
- version: z2.literal("1.63.0"),
38
+ version: z2.literal("1.65.0-alpha-2026-10-30"),
39
39
  rootDir: AbsolutePathSchema,
40
40
  assets: z2.object({ manifest: z2.literal("browsers.json"), cli: z2.literal("cli.js") }).strict()
41
41
  }).strict(),
@@ -65,7 +65,7 @@ var LIMITS = Object.freeze({
65
65
  path: 1024,
66
66
  frontier: 1048576
67
67
  });
68
- var DISTRIBUTION = "6bf8e6d392f411f43046a5688021a5ed083fea9129f2f84dbff5aee88b2de728";
68
+ var DISTRIBUTION = "e88b7d6034b38fe0929052e012868755207a931b6348507c477afbc6dd430822";
69
69
  var hash = z3.string().regex(/^[a-f0-9]{64}$/);
70
70
  var opaque = z3.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
71
71
  var unsigned = z3.string().regex(/^(?:0|[1-9]\d{0,19})$/).refine((v) => BigInt(v) <= 18446744073709551615n);
@@ -89,7 +89,7 @@ var ManifestSchema = z3.object({
89
89
  schemaVersion: z3.literal(1),
90
90
  installationId: opaque,
91
91
  packageName: z3.literal("playwright-core"),
92
- packageVersion: z3.literal("1.63.0"),
92
+ packageVersion: z3.literal("1.65.0-alpha-2026-10-30"),
93
93
  libraryDistributionSHA256: hash,
94
94
  chromiumRevision: z3.string().max(16).regex(/^\d+$/),
95
95
  observedVersion: z3.string().max(64).regex(/^\d+\.\d+\.\d+(?:\.\d+)?$/),
@@ -235,13 +235,13 @@ var INSTALLATION_LIMITS = Object.freeze({
235
235
  });
236
236
  var INSTALLATION_TARGET = Object.freeze({
237
237
  packageName: "playwright-core",
238
- packageVersion: "1.63.0",
239
- chromiumRevision: "1243",
240
- observedVersion: "153.0.8010.12",
238
+ packageVersion: "1.65.0-alpha-2026-10-30",
239
+ chromiumRevision: "1252",
240
+ observedVersion: "157.0.8103.15",
241
241
  libraryDistributionSHA256: DISTRIBUTION,
242
242
  platform: "darwin",
243
243
  arch: "arm64",
244
- executablePath: "payload/chromium-1243/chrome-mac-arm64/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing"
244
+ executablePath: "payload/chromium-1252/chrome-mac-arm64/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing"
245
245
  });
246
246
  var DigestSchema = z4.string().regex(/^[a-f0-9]{64}$/);
247
247
  var IdSchema = z4.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
@@ -368,8 +368,8 @@ var FreshVerifierRequestSchema = z4.strictObject({
368
368
  executableIdentity: FileIdentitySchema,
369
369
  libraryDistributionSHA256: DigestSchema,
370
370
  sourceVintage: SourceVintageSchema,
371
- expectedVersion: z4.literal("153.0.8010.12"),
372
- chromiumRevision: z4.literal("1243"),
371
+ expectedVersion: z4.literal("157.0.8103.15"),
372
+ chromiumRevision: z4.literal("1252"),
373
373
  platform: z4.literal("darwin"),
374
374
  arch: z4.literal("arm64")
375
375
  });
@@ -380,8 +380,8 @@ var FreshVerifierReplySchema = z4.strictObject({
380
380
  executableIdentity: FileIdentitySchema,
381
381
  libraryDistributionSHA256: DigestSchema,
382
382
  sourceManifestSHA256: DigestSchema,
383
- observedVersion: z4.literal("153.0.8010.12"),
384
- chromiumRevision: z4.literal("1243"),
383
+ observedVersion: z4.literal("157.0.8103.15"),
384
+ chromiumRevision: z4.literal("1252"),
385
385
  platform: z4.literal("darwin"),
386
386
  arch: z4.literal("arm64"),
387
387
  machOCPU: z4.literal(16777228),
@@ -944,7 +944,7 @@ var NodeInstallationFilesystem = class {
944
944
  return this.operation(async () => {
945
945
  this.supported();
946
946
  const tree = await this.tree(this.configuration.libraryRoot, true);
947
- requireFact(tree.files.length === 114, "LIBRARY_MISMATCH");
947
+ requireFact(tree.files.length === 116, "LIBRARY_MISMATCH");
948
948
  const distribution = createHash2("sha256");
949
949
  for (const file of [...tree.files].sort(
950
950
  (a, b) => a.path < b.path ? -1 : a.path > b.path ? 1 : 0
@@ -2838,7 +2838,7 @@ function parsePinnedVersionOutput(bytes) {
2838
2838
  } catch {
2839
2839
  throw new InstallationFailure("VERSION_MISMATCH");
2840
2840
  }
2841
- requireFact3(text === "Google Chrome for Testing 153.0.8010.12 \n", "VERSION_MISMATCH");
2841
+ requireFact3(text === "Google Chrome for Testing 157.0.8103.15 \n", "VERSION_MISMATCH");
2842
2842
  return INSTALLATION_TARGET.observedVersion;
2843
2843
  }
2844
2844
  async function recheckExecutable(expected, check) {
@@ -497,7 +497,7 @@ import { access, realpath, stat, readdir, lstat, open, readlink } from "node:fs/
497
497
  import { constants } from "node:fs";
498
498
  import { createHash } from "node:crypto";
499
499
  import { join, relative } from "node:path";
500
- var PUBLIC_DISTRIBUTION_SHA256 = "6bf8e6d392f411f43046a5688021a5ed083fea9129f2f84dbff5aee88b2de728";
500
+ var PUBLIC_DISTRIBUTION_SHA256 = "e88b7d6034b38fe0929052e012868755207a931b6348507c477afbc6dd430822";
501
501
  var retainedReads = /* @__PURE__ */ new Set();
502
502
  var closeUncertain = false;
503
503
  function requireClosedReads() {
@@ -666,7 +666,7 @@ async function distributionHash(root) {
666
666
  };
667
667
  await visit(root, 0);
668
668
  files.sort();
669
- if (files.length !== 114) throw new BrowserLifecycleError("LIBRARY_UNAVAILABLE");
669
+ if (files.length !== 116) throw new BrowserLifecycleError("LIBRARY_UNAVAILABLE");
670
670
  const hash = createHash("sha256");
671
671
  for (const file of files)
672
672
  hash.update(file + "\0" + await hashFile(join(root, file), 32 * 1024 * 1024) + "\n");
@@ -1747,7 +1747,7 @@ var AbsolutePathSchema = z4.string().min(1).max(4096).refine(
1747
1747
  var RuntimeSchema = z4.object({
1748
1748
  library: z4.object({
1749
1749
  package: z4.literal("playwright-core"),
1750
- version: z4.literal("1.63.0"),
1750
+ version: z4.literal("1.65.0-alpha-2026-10-30"),
1751
1751
  rootDir: AbsolutePathSchema,
1752
1752
  assets: z4.object({ manifest: z4.literal("browsers.json"), cli: z4.literal("cli.js") }).strict()
1753
1753
  }).strict(),
@@ -1 +1 @@
1
- {"version":1,"controllerSHA256":"cdb2fafb277e772b2bdab7059fcb55d109215385d83c77f218ea35d4e9dc5e2f","nativeManifestSHA256":"19fb0607902e9c30bc693f3a8f7e80601f6ccfd090ffa412a5a38614e6eb7c00","platform":"darwin","arch":"arm64","availability":"available","workers":[{"name":"darwin-journal-worker.mjs","sha256":"739958b3515b48dda8cf40366aa6e34cf65366662c96dba1c951f38bc2f97603","bytes":88486},{"name":"darwin-supervisor-worker.mjs","sha256":"83b9b1e6d8969f5f909b43ebcf2d3ae6830601908bd2e4e4b2747d9ee7e55b77","bytes":74686}]}
1
+ {"version":1,"controllerSHA256":"780bdb42c6aefbd700a605bc641fd2bde4d69e444ee5b1223d743cba8167bf83","nativeManifestSHA256":"19fb0607902e9c30bc693f3a8f7e80601f6ccfd090ffa412a5a38614e6eb7c00","platform":"darwin","arch":"arm64","availability":"available","workers":[{"name":"darwin-journal-worker.mjs","sha256":"739958b3515b48dda8cf40366aa6e34cf65366662c96dba1c951f38bc2f97603","bytes":88486},{"name":"darwin-supervisor-worker.mjs","sha256":"aad2739ed75ad537a49bddb5698d2ae45621985057a3ce55ebdd60225881fdac","bytes":74703}]}
@@ -1 +1 @@
1
- {"schemaVersion":1,"controllerSHA256":"cdb2fafb277e772b2bdab7059fcb55d109215385d83c77f218ea35d4e9dc5e2f","verifierSHA256":"5cb8f248a264a0602757ad2c0971c1b1e84bcf3185a2b8d706230d2cfac0703c"}
1
+ {"schemaVersion":1,"controllerSHA256":"780bdb42c6aefbd700a605bc641fd2bde4d69e444ee5b1223d743cba8167bf83","verifierSHA256":"d5c8018cba4cee57b2436c0d4a32486d39b6ae8b691570ba6927d9eb0957327e"}
@@ -1 +1 @@
1
- import{b as N,d as v,j as e,e as w,r as d,X as C,I as k,B as D,f as S}from"./index-BwTGkJbK.js";function j({children:i}){return e.jsx("div",{className:"text-muted-foreground text-3xs font-medium tracking-wider uppercase",children:i})}function A({agent:i,onUpdate:t}){const[a,l]=d.useState(!1),[o,u]=d.useState(""),n=i.capabilities??[];function c(){const s=o.trim();s&&!n.includes(s)&&t({capabilities:[...n,s]}),u(""),l(!1)}return e.jsxs("div",{className:"space-y-1",children:[e.jsx(j,{children:"Capabilities"}),e.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[n.map(s=>e.jsxs("span",{className:"bg-accent text-accent-foreground inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs",children:[s,e.jsx("button",{type:"button",onClick:()=>t({capabilities:n.filter(p=>p!==s)}),className:"hover:text-destructive transition-colors","aria-label":`Remove capability ${s}`,children:e.jsx(C,{"aria-hidden":!0,className:"size-3"})})]},s)),a?e.jsx(k,{autoFocus:!0,value:o,onChange:s=>u(s.target.value),onBlur:c,onKeyDown:s=>{s.key==="Enter"&&c(),s.key==="Escape"&&l(!1)},className:"h-6 w-28 text-xs",placeholder:"Capability name","aria-label":"New capability"}):e.jsxs(D,{type:"button",variant:"ghost",size:"sm",onClick:()=>l(!0),className:"text-muted-foreground hover:text-foreground h-auto gap-0.5 px-1 py-0 text-xs",children:[e.jsx(S,{"aria-hidden":!0,className:"size-3"})," Add"]})]})]})}function b({label:i,value:t,placeholder:a,multiline:l,testId:o,onCommit:u}){const[n,c]=d.useState(t),[s,p]=d.useState(t),[m,f]=d.useState(null);s!==t&&(p(t),c(t));function x(){const r=n.trim();if(r===t.trim())return;const g=u(r);if(typeof g!="string")return f(null);c(t),f(g)}const h="border-input bg-background placeholder:text-muted-foreground focus-visible:ring-ring w-full rounded-md border px-3 py-2 text-sm focus-visible:ring-2 focus-visible:outline-none",y=m?e.jsx("p",{role:"status",className:"text-destructive text-xs",children:m}):null;return e.jsxs("div",{className:"space-y-1",children:[e.jsx(j,{children:i}),l?e.jsx("textarea",{value:n,rows:4,"data-testid":o,"aria-label":i,placeholder:a,onChange:r=>{f(null),c(r.target.value)},onBlur:x,onKeyDown:r=>{r.key==="Enter"&&!r.shiftKey&&(r.preventDefault(),x())},className:h}):e.jsx("input",{value:n,"data-testid":o,"aria-label":i,placeholder:a,onChange:r=>{f(null),c(r.target.value)},onBlur:x,onKeyDown:r=>{r.key==="Enter"&&x()},className:h}),y]})}function R({member:i,roster:t}){const{agent:a,isPending:l,update:o}=N(i),u=v(i,t)==="managed";return l?e.jsx(w,{className:"h-16 w-full"}):!u||!a?e.jsx(E,{member:i,agent:a}):e.jsxs("div",{className:"flex flex-col gap-4","data-slot":"profile-about",children:[e.jsx(b,{label:"Name",value:a.displayName??a.name,placeholder:"What you call this agent",testId:"agent-name-field",onCommit:n=>{if(!n)return"A name can’t be empty, so the old one was kept.";o({displayName:n})}}),e.jsx(b,{multiline:!0,label:"Description",value:a.description??"",placeholder:"What is this agent for?",testId:"agent-description-field",onCommit:n=>o({description:n})}),e.jsx(A,{agent:a,onUpdate:o})]})}function E({member:i,agent:t}){var l;const a=(l=t==null?void 0:t.description)==null?void 0:l.trim();return a?e.jsx("p",{className:"text-sm leading-relaxed whitespace-pre-wrap",children:a}):e.jsxs("p",{className:"text-muted-foreground text-sm",children:[i.displayName," has no description yet."]})}export{R as AboutPage};
1
+ import{b as N,d as v,j as e,e as w,r as d,X as C,I as k,B as D,f as S}from"./index-BYTLOFNS.js";function j({children:i}){return e.jsx("div",{className:"text-muted-foreground text-3xs font-medium tracking-wider uppercase",children:i})}function A({agent:i,onUpdate:t}){const[a,l]=d.useState(!1),[o,u]=d.useState(""),n=i.capabilities??[];function c(){const s=o.trim();s&&!n.includes(s)&&t({capabilities:[...n,s]}),u(""),l(!1)}return e.jsxs("div",{className:"space-y-1",children:[e.jsx(j,{children:"Capabilities"}),e.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[n.map(s=>e.jsxs("span",{className:"bg-accent text-accent-foreground inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs",children:[s,e.jsx("button",{type:"button",onClick:()=>t({capabilities:n.filter(p=>p!==s)}),className:"hover:text-destructive transition-colors","aria-label":`Remove capability ${s}`,children:e.jsx(C,{"aria-hidden":!0,className:"size-3"})})]},s)),a?e.jsx(k,{autoFocus:!0,value:o,onChange:s=>u(s.target.value),onBlur:c,onKeyDown:s=>{s.key==="Enter"&&c(),s.key==="Escape"&&l(!1)},className:"h-6 w-28 text-xs",placeholder:"Capability name","aria-label":"New capability"}):e.jsxs(D,{type:"button",variant:"ghost",size:"sm",onClick:()=>l(!0),className:"text-muted-foreground hover:text-foreground h-auto gap-0.5 px-1 py-0 text-xs",children:[e.jsx(S,{"aria-hidden":!0,className:"size-3"})," Add"]})]})]})}function b({label:i,value:t,placeholder:a,multiline:l,testId:o,onCommit:u}){const[n,c]=d.useState(t),[s,p]=d.useState(t),[m,f]=d.useState(null);s!==t&&(p(t),c(t));function x(){const r=n.trim();if(r===t.trim())return;const g=u(r);if(typeof g!="string")return f(null);c(t),f(g)}const h="border-input bg-background placeholder:text-muted-foreground focus-visible:ring-ring w-full rounded-md border px-3 py-2 text-sm focus-visible:ring-2 focus-visible:outline-none",y=m?e.jsx("p",{role:"status",className:"text-destructive text-xs",children:m}):null;return e.jsxs("div",{className:"space-y-1",children:[e.jsx(j,{children:i}),l?e.jsx("textarea",{value:n,rows:4,"data-testid":o,"aria-label":i,placeholder:a,onChange:r=>{f(null),c(r.target.value)},onBlur:x,onKeyDown:r=>{r.key==="Enter"&&!r.shiftKey&&(r.preventDefault(),x())},className:h}):e.jsx("input",{value:n,"data-testid":o,"aria-label":i,placeholder:a,onChange:r=>{f(null),c(r.target.value)},onBlur:x,onKeyDown:r=>{r.key==="Enter"&&x()},className:h}),y]})}function R({member:i,roster:t}){const{agent:a,isPending:l,update:o}=N(i),u=v(i,t)==="managed";return l?e.jsx(w,{className:"h-16 w-full"}):!u||!a?e.jsx(E,{member:i,agent:a}):e.jsxs("div",{className:"flex flex-col gap-4","data-slot":"profile-about",children:[e.jsx(b,{label:"Name",value:a.displayName??a.name,placeholder:"What you call this agent",testId:"agent-name-field",onCommit:n=>{if(!n)return"A name can’t be empty, so the old one was kept.";o({displayName:n})}}),e.jsx(b,{multiline:!0,label:"Description",value:a.description??"",placeholder:"What is this agent for?",testId:"agent-description-field",onCommit:n=>o({description:n})}),e.jsx(A,{agent:a,onUpdate:o})]})}function E({member:i,agent:t}){var l;const a=(l=t==null?void 0:t.description)==null?void 0:l.trim();return a?e.jsx("p",{className:"text-sm leading-relaxed whitespace-pre-wrap",children:a}):e.jsxs("p",{className:"text-muted-foreground text-sm",children:[i.displayName," has no description yet."]})}export{R as AboutPage};
@@ -1 +1 @@
1
- import{fB as f,a5 as o,at as u,fC as x,j as a,G as c,a4 as p,B as y}from"./index-BwTGkJbK.js";const g=["Today","Yesterday","This week","Earlier"];function A(e,s){const t=new Map;for(const r of e){const n=h(new Date(r.occurredAt),s),i=t.get(n)??[];i.push(r),t.set(n,i)}return g.filter(r=>t.has(r)).map(r=>({label:r,items:t.get(r)}))}function h(e,s){const t=new Date(s);t.setHours(0,0,0,0);const r=new Date(t);r.setDate(r.getDate()-1);const n=new Date(t);return n.setDate(n.getDate()-n.getDay()),e>=t?"Today":e>=r?"Yesterday":e>=n?"This week":"Earlier"}const T={person:"user",external:"user",agent:"agent",system:"system"};function k(e){return e.source.sessionId?f({session:e.source.sessionId}):null}function w(e){return{id:e.id,occurredAt:e.at,actorType:T[e.actor.kind],actorLabel:e.actor.name,summary:e.summary,linkPath:k(e)}}const d=["audit"],l=50;function m(e){return e.pages.flatMap(s=>s.events.map(w))}function E(e={}){const s=o();return u({queryKey:[...d,"list",e],queryFn:({pageParam:t})=>s.listAuditEvents({...e,limit:l,beforeSeq:t}),initialPageParam:void 0,getNextPageParam:t=>t.nextBeforeSeq,select:m,staleTime:3e4,refetchOnWindowFocus:!0})}function P(e){const s=o();return u({queryKey:[...d,"timeline",e],queryFn:e===null?x:({pageParam:t})=>s.getAccountTimeline(e,{limit:l,beforeSeq:t}),initialPageParam:void 0,getNextPageParam:t=>t.nextBeforeSeq,select:m,staleTime:3e4,refetchOnWindowFocus:!0})}function j({label:e,className:s}){return a.jsx("div",{"data-slot":"activity-group-header",className:c("sticky top-0 z-10 -mx-4 px-4 py-2 sm:-mx-6 sm:px-6","bg-background/95 backdrop-blur-sm",s),children:a.jsx("h3",{className:"text-muted-foreground text-xs font-medium tracking-wider uppercase",children:e})})}function D({onRetry:e,className:s}){return a.jsxs("div",{"data-slot":"activity-error-state",className:c("flex flex-col items-center justify-center gap-3 py-16 text-center",s),children:[a.jsx("div",{className:"bg-destructive/10 rounded-xl p-3",children:a.jsx(p,{className:"text-destructive size-6","aria-hidden":"true"})}),a.jsxs("div",{className:"space-y-1",children:[a.jsx("p",{className:"text-foreground text-sm font-medium",children:"Couldn’t load your activity"}),a.jsx("p",{className:"text-muted-foreground max-w-xs text-xs",children:"The DorkOS server didn’t answer. Check that it’s running."})]}),a.jsx(y,{variant:"outline",size:"sm",onClick:e,children:"Retry"})]})}export{D as A,j as a,E as b,A as g,P as u};
1
+ import{fI as f,a5 as o,at as u,fJ as x,j as a,G as c,a4 as p,B as y}from"./index-BYTLOFNS.js";const g=["Today","Yesterday","This week","Earlier"];function A(e,s){const t=new Map;for(const r of e){const n=h(new Date(r.occurredAt),s),i=t.get(n)??[];i.push(r),t.set(n,i)}return g.filter(r=>t.has(r)).map(r=>({label:r,items:t.get(r)}))}function h(e,s){const t=new Date(s);t.setHours(0,0,0,0);const r=new Date(t);r.setDate(r.getDate()-1);const n=new Date(t);return n.setDate(n.getDate()-n.getDay()),e>=t?"Today":e>=r?"Yesterday":e>=n?"This week":"Earlier"}const T={person:"user",external:"user",agent:"agent",system:"system"};function k(e){return e.source.sessionId?f({session:e.source.sessionId}):null}function w(e){return{id:e.id,occurredAt:e.at,actorType:T[e.actor.kind],actorLabel:e.actor.name,summary:e.summary,linkPath:k(e)}}const d=["audit"],l=50;function m(e){return e.pages.flatMap(s=>s.events.map(w))}function E(e={}){const s=o();return u({queryKey:[...d,"list",e],queryFn:({pageParam:t})=>s.listAuditEvents({...e,limit:l,beforeSeq:t}),initialPageParam:void 0,getNextPageParam:t=>t.nextBeforeSeq,select:m,staleTime:3e4,refetchOnWindowFocus:!0})}function P(e){const s=o();return u({queryKey:[...d,"timeline",e],queryFn:e===null?x:({pageParam:t})=>s.getAccountTimeline(e,{limit:l,beforeSeq:t}),initialPageParam:void 0,getNextPageParam:t=>t.nextBeforeSeq,select:m,staleTime:3e4,refetchOnWindowFocus:!0})}function j({label:e,className:s}){return a.jsx("div",{"data-slot":"activity-group-header",className:c("sticky top-0 z-10 -mx-4 px-4 py-2 sm:-mx-6 sm:px-6","bg-background/95 backdrop-blur-sm",s),children:a.jsx("h3",{className:"text-muted-foreground text-xs font-medium tracking-wider uppercase",children:e})})}function D({onRetry:e,className:s}){return a.jsxs("div",{"data-slot":"activity-error-state",className:c("flex flex-col items-center justify-center gap-3 py-16 text-center",s),children:[a.jsx("div",{className:"bg-destructive/10 rounded-xl p-3",children:a.jsx(p,{className:"text-destructive size-6","aria-hidden":"true"})}),a.jsxs("div",{className:"space-y-1",children:[a.jsx("p",{className:"text-foreground text-sm font-medium",children:"Couldn’t load your activity"}),a.jsx("p",{className:"text-muted-foreground max-w-xs text-xs",children:"The DorkOS server didn’t answer. Check that it’s running."})]}),a.jsx(y,{variant:"outline",size:"sm",onClick:e,children:"Retry"})]})}export{D as A,j as a,E as b,A as g,P as u};
@@ -1 +1 @@
1
- import{r as c,j as e,e as d,A as u,B as j,x as v}from"./index-BwTGkJbK.js";import{E as g}from"./empty-state-saV209Il.js";import{T as N,a as A}from"./table-dWrfPeX-.js";import{u as b,g as w,A as E,a as T}from"./ActivityErrorState-BnqAwUiy.js";import{A as B}from"./ActivityRow-Ch8HxQ2m.js";function I({member:i}){var n;const r=((n=i.agent)==null?void 0:n.manifestId)??null,{data:l,isLoading:x,isError:m,refetch:p,isFetchingNextPage:o,hasNextPage:h,fetchNextPage:f}=b(r),s=c.useMemo(()=>l??[],[l]),y=c.useMemo(()=>w(s,new Date),[s]);return r===null?e.jsx("div",{className:"min-h-0 flex-1 px-4 py-3","data-slot":"profile-activity",children:e.jsx("p",{className:"text-muted-foreground text-xs",children:"Activity is kept per agent."})}):x?e.jsxs("div",{className:"min-h-0 flex-1 space-y-2 px-4 py-3","data-slot":"profile-activity","aria-busy":"true",children:[e.jsx(d,{className:"h-3 w-16"}),Array.from({length:5}).map((t,a)=>e.jsx(d,{className:"h-4 w-full"},a))]}):m&&s.length===0?e.jsx("div",{className:"min-h-0 flex-1 px-2","data-slot":"profile-activity",children:e.jsx(E,{onRetry:()=>void p()})}):s.length===0?e.jsx("div",{className:"min-h-0 flex-1 px-4 py-8","data-slot":"profile-activity",children:e.jsx(g,{icon:u,headline:"Nothing on record yet",description:`What ${i.displayName} does shows up here.`})}):e.jsxs("div",{className:"min-h-0 flex-1 px-2 py-2","data-slot":"profile-activity",children:[y.map(t=>e.jsxs("section",{children:[e.jsx(T,{label:t.label}),e.jsx(N,{children:e.jsx(A,{children:t.items.map(a=>e.jsx(B,{item:a,compact:!0},a.id))})})]},t.label)),h&&e.jsx("div",{className:"flex justify-center py-3",children:e.jsxs(j,{variant:"outline",size:"sm",onClick:()=>void f(),disabled:o,className:"gap-2",children:[o&&e.jsx(v,{size:"xs"}),"Load 50 more"]})})]})}export{I as ActivityPage};
1
+ import{r as c,j as e,e as d,A as u,B as j,x as v}from"./index-BYTLOFNS.js";import{E as g}from"./empty-state-B316LEXY.js";import{T as N,a as A}from"./table-BrvyPoEL.js";import{u as b,g as w,A as E,a as T}from"./ActivityErrorState-BrTkXZ6h.js";import{A as B}from"./ActivityRow-D_zqfTtI.js";function I({member:i}){var n;const r=((n=i.agent)==null?void 0:n.manifestId)??null,{data:l,isLoading:x,isError:m,refetch:p,isFetchingNextPage:o,hasNextPage:h,fetchNextPage:f}=b(r),s=c.useMemo(()=>l??[],[l]),y=c.useMemo(()=>w(s,new Date),[s]);return r===null?e.jsx("div",{className:"min-h-0 flex-1 px-4 py-3","data-slot":"profile-activity",children:e.jsx("p",{className:"text-muted-foreground text-xs",children:"Activity is kept per agent."})}):x?e.jsxs("div",{className:"min-h-0 flex-1 space-y-2 px-4 py-3","data-slot":"profile-activity","aria-busy":"true",children:[e.jsx(d,{className:"h-3 w-16"}),Array.from({length:5}).map((t,a)=>e.jsx(d,{className:"h-4 w-full"},a))]}):m&&s.length===0?e.jsx("div",{className:"min-h-0 flex-1 px-2","data-slot":"profile-activity",children:e.jsx(E,{onRetry:()=>void p()})}):s.length===0?e.jsx("div",{className:"min-h-0 flex-1 px-4 py-8","data-slot":"profile-activity",children:e.jsx(g,{icon:u,headline:"Nothing on record yet",description:`What ${i.displayName} does shows up here.`})}):e.jsxs("div",{className:"min-h-0 flex-1 px-2 py-2","data-slot":"profile-activity",children:[y.map(t=>e.jsxs("section",{children:[e.jsx(T,{label:t.label}),e.jsx(N,{children:e.jsx(A,{children:t.items.map(a=>e.jsx(B,{item:a,compact:!0},a.id))})})]},t.label)),h&&e.jsx("div",{className:"flex justify-center py-3",children:e.jsxs(j,{variant:"outline",size:"sm",onClick:()=>void f(),disabled:o,className:"gap-2",children:[o&&e.jsx(v,{size:"xs"}),"Load 50 more"]})})]})}export{I as ActivityPage};
@@ -1 +1 @@
1
- import{bb as d,dT as x,j as e,a2 as u,G as l,cA as m,dU as g,B as h}from"./index-BwTGkJbK.js";import{b as f,c}from"./table-dWrfPeX-.js";const k={tasks:{text:"text-purple-500",bg:"bg-purple-500/10",label:"Schedules"},relay:{text:"text-teal-500",bg:"bg-teal-500/10",label:"Messages"},agent:{text:"text-indigo-500",bg:"bg-indigo-500/10",label:"Agent"},config:{text:"text-amber-500",bg:"bg-amber-500/10",label:"Settings"},system:{text:"text-neutral-500",bg:"bg-neutral-500/10",label:"System"},permissions:{text:"text-sky-500",bg:"bg-sky-500/10",label:"Permissions"}},b={user:{text:"text-muted-foreground"},agent:{text:"text-foreground"},system:{icon:x,text:"text-neutral-500"},tasks:{icon:d,text:"text-purple-500"}};function p({actorType:s,actorLabel:r,agentColor:a,className:n}){const i=b[s],t=i.icon;return s==="user"?e.jsx(u,{shape:"pill",variant:"outline",className:l("text-muted-foreground",n),children:r}):s==="agent"?e.jsxs("span",{"data-slot":"actor-badge",className:l("inline-flex items-center gap-1.5 text-xs font-medium",i.text,n),children:[e.jsx("span",{className:"size-2 shrink-0 rounded-full",style:a?{backgroundColor:a}:void 0,"aria-hidden":!0}),e.jsx("span",{className:"truncate",children:r})]}):e.jsxs("span",{"data-slot":"actor-badge",className:l("inline-flex items-center gap-1 text-xs font-medium",i.text,n),children:[t&&e.jsx(t,{className:"size-3 shrink-0","aria-hidden":!0}),e.jsx("span",{children:r})]})}function y(s,r=new Date){const a=new Date(s),n=new Date(r);n.setHours(0,0,0,0);const i=new Date(n);i.setDate(i.getDate()-1);const t=new Date(n);t.setDate(t.getDate()-t.getDay());const o=a.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return a>=n?o:a>=i?`Yesterday ${o}`:a>=t?`${a.toLocaleDateString("en-US",{weekday:"long"})} ${o}`:a.toLocaleDateString("en-US",{month:"short",day:"numeric"})}function v({item:s,compact:r=!1,className:a}){const n=m(),i=y(s.occurredAt),t=s.linkPath?g(s.linkPath):null;return e.jsxs(f,{"data-slot":"activity-row","data-activity-row":t?"":void 0,tabIndex:t?0:void 0,onKeyDown:t?o=>{o.key==="Enter"&&n({href:t,replace:!1})}:void 0,className:l(t?"focus-visible:ring-ring focus-visible:ring-2 focus-visible:outline-none":"hover:bg-transparent",a),children:[!r&&e.jsxs(e.Fragment,{children:[e.jsx(c,{className:"w-28 py-1.5 pr-0 pl-2 max-sm:hidden",children:e.jsx("span",{className:"text-muted-foreground text-xs tabular-nums",children:i})}),e.jsx(c,{className:"w-24 py-1.5 pr-0 max-sm:hidden",children:e.jsx(p,{actorType:s.actorType,actorLabel:s.actorLabel})})]}),e.jsx(c,{className:l("max-w-0 py-1.5",r?"pl-2":"max-sm:pl-2"),children:e.jsxs("span",{className:"text-foreground/80 block truncate text-sm",children:[e.jsx("span",{className:l("text-muted-foreground mr-1 text-xs font-medium",!r&&"sm:hidden"),children:s.actorLabel}),s.summary]})}),e.jsx(c,{className:l("py-1.5 pr-2 text-right",r?"w-10":"w-16 max-sm:w-10"),children:t&&e.jsx(h,{variant:"ghost",size:"sm",className:"h-6 min-h-[44px] px-2 text-xs sm:min-h-0",onClick:()=>n({href:t,replace:!1}),children:"Open →"})})]})}export{v as A,k as C};
1
+ import{ba as d,dS as x,j as e,a2 as u,G as l,cz as m,dT as g,B as h}from"./index-BYTLOFNS.js";import{b as f,c}from"./table-BrvyPoEL.js";const k={tasks:{text:"text-purple-500",bg:"bg-purple-500/10",label:"Schedules"},relay:{text:"text-teal-500",bg:"bg-teal-500/10",label:"Messages"},agent:{text:"text-indigo-500",bg:"bg-indigo-500/10",label:"Agent"},config:{text:"text-amber-500",bg:"bg-amber-500/10",label:"Settings"},system:{text:"text-neutral-500",bg:"bg-neutral-500/10",label:"System"},permissions:{text:"text-sky-500",bg:"bg-sky-500/10",label:"Permissions"}},p={user:{text:"text-muted-foreground"},agent:{text:"text-foreground"},system:{icon:x,text:"text-neutral-500"},tasks:{icon:d,text:"text-purple-500"}};function b({actorType:s,actorLabel:r,agentColor:a,className:n}){const i=p[s],t=i.icon;return s==="user"?e.jsx(u,{shape:"pill",variant:"outline",className:l("text-muted-foreground",n),children:r}):s==="agent"?e.jsxs("span",{"data-slot":"actor-badge",className:l("inline-flex items-center gap-1.5 text-xs font-medium",i.text,n),children:[e.jsx("span",{className:"size-2 shrink-0 rounded-full",style:a?{backgroundColor:a}:void 0,"aria-hidden":!0}),e.jsx("span",{className:"truncate",children:r})]}):e.jsxs("span",{"data-slot":"actor-badge",className:l("inline-flex items-center gap-1 text-xs font-medium",i.text,n),children:[t&&e.jsx(t,{className:"size-3 shrink-0","aria-hidden":!0}),e.jsx("span",{children:r})]})}function y(s,r=new Date){const a=new Date(s),n=new Date(r);n.setHours(0,0,0,0);const i=new Date(n);i.setDate(i.getDate()-1);const t=new Date(n);t.setDate(t.getDate()-t.getDay());const o=a.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return a>=n?o:a>=i?`Yesterday ${o}`:a>=t?`${a.toLocaleDateString("en-US",{weekday:"long"})} ${o}`:a.toLocaleDateString("en-US",{month:"short",day:"numeric"})}function v({item:s,compact:r=!1,className:a}){const n=m(),i=y(s.occurredAt),t=s.linkPath?g(s.linkPath):null;return e.jsxs(f,{"data-slot":"activity-row","data-activity-row":t?"":void 0,tabIndex:t?0:void 0,onKeyDown:t?o=>{o.key==="Enter"&&n({href:t,replace:!1})}:void 0,className:l(t?"focus-visible:ring-ring focus-visible:ring-2 focus-visible:outline-none":"hover:bg-transparent",a),children:[!r&&e.jsxs(e.Fragment,{children:[e.jsx(c,{className:"w-28 py-1.5 pr-0 pl-2 max-sm:hidden",children:e.jsx("span",{className:"text-muted-foreground text-xs tabular-nums",children:i})}),e.jsx(c,{className:"w-24 py-1.5 pr-0 max-sm:hidden",children:e.jsx(b,{actorType:s.actorType,actorLabel:s.actorLabel})})]}),e.jsx(c,{className:l("max-w-0 py-1.5",r?"pl-2":"max-sm:pl-2"),children:e.jsxs("span",{className:"text-foreground/80 block truncate text-sm",children:[e.jsx("span",{className:l("text-muted-foreground mr-1 text-xs font-medium",!r&&"sm:hidden"),children:s.actorLabel}),s.summary]})}),e.jsx(c,{className:l("py-1.5 pr-2 text-right",r?"w-10":"w-16 max-sm:w-10"),children:t&&e.jsx(h,{variant:"ghost",size:"sm",className:"h-6 min-h-[44px] px-2 text-xs sm:min-h-0",onClick:()=>n({href:t,replace:!1}),children:"Open →"})})]})}export{v as A,k as C};
@@ -1 +1 @@
1
- import{bE as n,bF as r,j as c,bG as s,aX as A}from"./index-BwTGkJbK.js";const g={connected:n.success,disconnected:n.neutral,error:n.error,starting:`${n.warning} ${r}`,stopping:`${n.warning} ${r}`,reconnecting:`${n.warning} ${r}`},E={connected:"Connected",disconnected:"Ready",error:"Error",starting:"Connecting…",stopping:"Stopping…",reconnecting:"Reconnecting…"};function _({iconId:i,adapterType:a,size:t=16,className:o}){const e=s[i??""]??s[a??""];return e?c.jsx(e,{size:t,className:o}):c.jsx(A,{className:o,style:{width:t,height:t}})}export{_ as A,g as a,E as b};
1
+ import{bD as n,bE as r,j as c,bF as s,aW as A}from"./index-BYTLOFNS.js";const g={connected:n.success,disconnected:n.neutral,error:n.error,starting:`${n.warning} ${r}`,stopping:`${n.warning} ${r}`,reconnecting:`${n.warning} ${r}`},E={connected:"Connected",disconnected:"Ready",error:"Error",starting:"Connecting…",stopping:"Stopping…",reconnecting:"Reconnecting…"};function _({iconId:i,adapterType:a,size:t=16,className:o}){const e=s[i??""]??s[a??""];return e?c.jsx(e,{size:t,className:o}):c.jsx(A,{className:o,style:{width:t,height:t}})}export{_ as A,g as a,E as b};
@@ -1,2 +1,2 @@
1
- import{a5 as be,a7 as Ne,a8 as ze,j as e,bi as Ee,bj as qe,r as m,dE as ie,i7 as Te,dF as oe,h8 as le,a3 as Me,Q as ce,T as de,ax as ue,U as he,V as pe,Z as J,_ as Y,i8 as me,dD as We,G as H,ex as X,ey as Z,ez as ee,eA as se,eB as te,I as re,eF as xe,J as $e,by as Ve,B as k,i9 as Se,eH as De,eE as ae,x as ke,bg as Pe,bf as Re,a4 as Oe,am as ge,ia as Le,ib as _e,ic as Ge,id as He,ie as Ie,ig as Ue,ih as Qe,ii as Ke,d0 as Je,dS as G,fF as Ye,fG as Xe,fH as Ze,fI as es,fJ as ss,fK as ts,ij as fe,ik as Q}from"./index-BwTGkJbK.js";import{B as rs}from"./use-bindings-CltfjAWW.js";import{M as I}from"./markdown-content-BRaPEOC7.js";import{u as as}from"./form-D3VdAYl4.js";import{a as ns}from"./BindingDialog-C_yflKOE.js";import"./relay-trace-schemas-ZLR1S8ft.js";function Bs(s={}){const t=be(),a=Ne();return ze({mutationFn:({id:r,updates:l})=>t.updateBinding(r,l),onSuccess:()=>{a.invalidateQueries({queryKey:[...rs]})},meta:s.suppressErrorToast?{suppressErrorToast:!0}:{errorLabel:s.errorLabel??"Couldn’t update that connection"}})}function is({field:s,value:t,onChange:a,error:r,allValues:l}){const[i,n]=m.useState("");if(s.showWhen&&l[s.showWhen.field]!==s.showWhen.equals)return null;const o=`config-field-${s.key}`,v=s.type==="select"&&s.displayAs==="radio-cards",h=t!=null?String(t):"",x=h==="***",y=()=>{if(x){n("");return}if(s.pattern&&h&&!new RegExp(s.pattern).test(h)){n(s.patternMessage??"Check the format");return}n("")},d=r??i;if(s.type==="boolean")return e.jsxs("div",{children:[e.jsxs(ie,{orientation:"horizontal",className:"items-center justify-between gap-4",children:[e.jsxs(Te,{className:"min-w-0",children:[e.jsxs(oe,{htmlFor:o,className:"text-sm font-medium",children:[s.label,s.required&&e.jsx("span",{"aria-hidden":"true",className:"text-destructive ml-0.5",children:"*"})]}),s.description&&e.jsx(le,{className:"text-xs",children:s.description})]}),e.jsx(Me,{id:o,checked:!!t,onCheckedChange:N=>a(s.key,N)})]}),s.helpMarkdown&&e.jsxs(ce,{children:[e.jsxs(de,{className:"text-muted-foreground hover:text-foreground mt-1 flex items-center gap-1 text-xs transition-colors",children:[e.jsx(ue,{className:"size-3"}),"Where do I find this?",e.jsx(he,{className:"size-3 transition-transform [[data-state=open]_&]:rotate-180"})]}),e.jsx(pe,{children:e.jsx("div",{className:"bg-muted/50 mt-2 rounded-md border p-3",children:e.jsx(I,{content:s.helpMarkdown,className:"text-xs"})})})]}),e.jsx(J,{children:d&&e.jsx(Y.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.15},className:"overflow-hidden",children:e.jsx(me,{className:"mt-1.5",children:d})})})]});const b=()=>{var N,C;switch(s.type){case"text":case"url":return e.jsx(re,{id:o,type:s.type==="url"?"url":"text",value:h,onChange:c=>a(s.key,c.target.value),placeholder:s.placeholder,"aria-invalid":!!d||void 0,"aria-required":s.required||void 0});case"password":return x?e.jsx(xe,{id:o,value:h,showPassword:!1,onChange:c=>{a(s.key,c.target.value.trim()),i&&n("")},onFocus:()=>a(s.key,""),onBlur:y,placeholder:"Saved · type to replace"}):e.jsx(xe,{id:o,value:h,visibleByDefault:s.visibleByDefault??!1,onChange:c=>{a(s.key,c.target.value.trim()),i&&n("")},onBlur:y,onPaste:()=>setTimeout(y,0),placeholder:s.placeholder,"aria-invalid":!!d||void 0,"aria-required":s.required||void 0});case"number":return e.jsx(re,{id:o,type:"number",value:h,onChange:c=>a(s.key,c.target.value?Number(c.target.value):void 0),placeholder:s.placeholder,"aria-invalid":!!d||void 0,"aria-required":s.required||void 0});case"select":return s.displayAs==="radio-cards"?e.jsx("div",{className:"grid grid-cols-2 gap-3",role:"radiogroup","aria-labelledby":`${o}-label`,"aria-required":s.required||void 0,children:(N=s.options)==null?void 0:N.map(c=>e.jsxs("button",{type:"button",role:"radio","aria-checked":h===c.value,onClick:()=>a(s.key,c.value),className:H("hover:bg-accent/50 focus-visible:border-ring focus-visible:ring-ring flex flex-col items-start rounded-md border p-3 text-left transition outline-none focus-visible:ring-[3px]",h===c.value&&"border-primary ring-primary bg-accent/30 ring-1"),children:[e.jsx("span",{className:"text-sm font-medium",children:c.label}),c.description&&e.jsx("span",{className:"text-muted-foreground mt-1 text-xs",children:c.description})]},c.value))}):e.jsxs(X,{value:h,onValueChange:c=>a(s.key,c),children:[e.jsx(Z,{id:o,"aria-invalid":!!d||void 0,"aria-required":s.required||void 0,children:e.jsx(ee,{placeholder:s.placeholder??"Select…"})}),e.jsx(se,{children:(C=s.options)==null?void 0:C.map(c=>e.jsx(te,{value:c.value,children:c.label},c.value))})]});case"textarea":return e.jsx(We,{id:o,value:h,onChange:c=>a(s.key,c.target.value),placeholder:s.placeholder,rows:3,"aria-invalid":!!d||void 0,"aria-required":s.required||void 0});default:return null}};return e.jsxs(ie,{children:[e.jsxs(oe,{id:`${o}-label`,htmlFor:v?void 0:o,children:[s.label,s.required&&!x&&e.jsx("span",{"aria-hidden":"true",className:"text-destructive ml-0.5",children:"*"})]}),b(),s.description&&e.jsx(le,{className:"text-xs",children:s.description}),s.helpMarkdown&&e.jsxs(ce,{children:[e.jsxs(de,{className:"text-muted-foreground hover:text-foreground mt-1 flex items-center gap-1 text-xs transition-colors",children:[e.jsx(ue,{className:"size-3"}),"Where do I find this?",e.jsx(he,{className:"size-3 transition-transform [[data-state=open]_&]:rotate-180"})]}),e.jsx(pe,{children:e.jsx("div",{className:"bg-muted/50 mt-2 rounded-md border p-3",children:e.jsx(I,{content:s.helpMarkdown,className:"text-xs"})})})]}),e.jsx(J,{children:d&&e.jsx(Y.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.15},className:"overflow-hidden",children:e.jsx(me,{children:d})})})]})}function os(s,t){return s.showWhen?t[s.showWhen.field]===s.showWhen.equals:!0}function ls({fields:s,allValues:t,renderField:a}){const r=new Map;for(const l of s){const i=l.section;r.has(i)||r.set(i,[]),r.get(i).push(l)}return e.jsx("div",{className:"space-y-6",children:Array.from(r.entries()).map(([l,i])=>{const n=i.filter(o=>os(o,t));return n.length===0?null:e.jsxs("div",{className:"space-y-3",children:[l&&e.jsx("h4",{className:"text-sm font-semibold",children:l}),e.jsx(Ee,{children:e.jsx(qe,{children:n.map(o=>a(o))})})]},l??"__default")})})}const je=["agent","configure","test","confirm"],cs={agent:"Agent",configure:"Set up",test:"Check",confirm:"Review"};function ds({current:s,showAgentStep:t}){const a=t?je:je.filter(l=>l!=="agent"),r=a.indexOf(s);return e.jsx("div",{className:"flex items-start justify-between px-1",role:"navigation","aria-label":"Setup steps",children:a.map((l,i)=>{const n=i<r,o=i===r,v=i>r;return e.jsxs(m.Fragment,{children:[i>0&&e.jsx("div",{className:H("mt-3 h-px flex-1",n||o?"bg-primary":"border-muted-foreground/40 border-t border-dashed")}),e.jsxs("div",{className:"flex flex-col items-center gap-1",children:[e.jsx("div",{className:H("flex size-6 items-center justify-center rounded-full text-xs font-medium",n&&"bg-primary text-primary-foreground",o&&"bg-primary text-primary-foreground ring-primary/30 ring-2",v&&"border-muted-foreground text-muted-foreground border"),"aria-current":o?"step":void 0,children:n?e.jsx($e,{className:"size-3"}):i+1}),e.jsx("span",{className:H("text-3xs",o?"text-foreground font-medium":"text-muted-foreground"),children:cs[l]})]})]},l)})})}function us({manifest:s,label:t,onLabelChange:a,fields:r,form:l,currentSetupStep:i,hasSetupGuide:n,onOpenGuide:o}){const{Subscribe:v,AppField:h}=l;return e.jsxs("div",{className:"space-y-4",children:[s.setupInstructions&&e.jsxs("div",{className:"flex gap-2 rounded-md border border-blue-200 bg-blue-50 p-3 text-sm text-blue-800 dark:border-blue-800 dark:bg-blue-950 dark:text-blue-200",children:[e.jsx(Ve,{className:"mt-0.5 size-4 shrink-0"}),e.jsx(I,{content:s.setupInstructions,className:"text-sm text-blue-800 dark:text-blue-200"})]}),(s.actionButton||n)&&e.jsxs("div",{className:"flex items-center justify-end gap-2",children:[n&&e.jsxs(k,{type:"button",variant:"outline",size:"sm",onClick:o,children:[e.jsx(Se,{className:"mr-1.5 size-3.5"}),"Setup guide"]}),s.actionButton&&e.jsx(k,{asChild:!0,type:"button",variant:"outline",size:"sm",children:e.jsx(De,{href:s.actionButton.url,children:s.actionButton.label})})]}),i&&e.jsx("h4",{className:"text-sm font-medium",children:i.title}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(ae,{htmlFor:"adapter-label",children:"Name (optional)"}),e.jsx(re,{id:"adapter-label",placeholder:s.displayName,value:t,onChange:x=>a(x.target.value)}),e.jsx("p",{className:"text-muted-foreground text-xs",children:"Helps you tell this connection apart."})]}),e.jsx(v,{selector:x=>x.values,children:x=>e.jsx(ls,{fields:r,allValues:x,renderField:y=>e.jsx(h,{name:y.key,children:d=>{var b;return e.jsx(is,{field:y,value:d.state.value,onChange:(N,C)=>d.handleChange(C),onBlur:d.handleBlur,error:d.state.meta.isTouched?(b=d.state.meta.errors[0])==null?void 0:b.toString():void 0,allValues:x})}},y.key)})})]})}function hs({isPending:s,isSuccess:t,isError:a,errorMessage:r,botUsername:l,onRetry:i}){return e.jsxs("div",{className:"flex flex-col items-center gap-3 py-6",children:[s&&e.jsxs(e.Fragment,{children:[e.jsx(ke,{size:"lg",className:"text-muted-foreground"}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Trying to reach it…"})]}),t&&e.jsxs("div",{className:"flex flex-col items-center gap-2",children:[e.jsx(Pe,{className:"text-status-success size-8"}),e.jsx("p",{className:"text-status-success-fg text-sm",children:"Reachable"}),l&&e.jsx("div",{className:"flex items-center gap-2 rounded-md border px-3 py-2 text-sm",children:e.jsxs("span",{className:"font-mono",children:["@",l]})})]}),a&&e.jsxs(e.Fragment,{children:[e.jsx(Re,{className:"text-destructive size-8"}),e.jsx("p",{className:"text-destructive text-sm",children:"Not reachable"}),r&&e.jsxs("div",{className:"flex items-start gap-2 rounded-md border border-red-200 bg-red-50 p-3 text-xs text-red-700 dark:border-red-800 dark:bg-red-950 dark:text-red-300",children:[e.jsx(Oe,{className:"mt-0.5 size-3 shrink-0"}),e.jsx("span",{children:r})]}),e.jsx(k,{variant:"outline",size:"sm",onClick:i,children:"Retry"})]})]})}function ps(s){return s.length>8?"•••• "+s.slice(-4):"•••"}function ms({manifest:s,adapterId:t,isEditMode:a,values:r,botUsername:l,agentName:i}){return e.jsxs("div",{className:"space-y-3",children:[!a&&i&&e.jsxs("p",{className:"bg-accent/30 rounded-md border px-3 py-2 text-sm",children:["Messages here go to ",e.jsx("span",{className:"font-medium",children:i}),"."]}),!a&&e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:"Connection ID"}),e.jsx("span",{className:"font-mono",children:t})]}),s.configFields.map(n=>{if(n.showWhen&&r[n.showWhen.field]!==n.showWhen.equals)return null;const o=String(r[n.key]??""),v=n.type==="password"?ps(o):o;return e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:n.label}),e.jsx("span",{className:"max-w-[200px] truncate font-mono",children:v})]},n.key)}),l&&s.type==="telegram"&&e.jsxs("a",{href:`https://t.me/${l}`,target:"_blank",rel:"noopener noreferrer",className:"text-primary inline-flex items-center gap-1.5 text-sm underline-offset-4 hover:underline",children:["Message @",l," in Telegram"]})]})}const ye=[{value:"per-chat",label:"One shared chat per group or channel",hint:"Everyone there shares one chat with the agent."},{value:"per-user",label:"One chat per person",hint:"Each person gets their own chat, even in a group."},{value:"stateless",label:"A fresh start every message",hint:"Nothing carries over from the message before."}];function xs({agentOptions:s,agentId:t,onAgentIdChange:a,strategy:r,onStrategyChange:l}){var n;const i=s.length===1?s[0]:void 0;return m.useEffect(()=>{i&&!t&&a(i.id)},[i,t,a]),s.length===0?e.jsx("p",{role:"alert",className:"text-muted-foreground rounded-md border border-dashed px-4 py-6 text-center text-sm",children:"No agents yet. Add one from the Team page first."}):e.jsxs("div",{className:"space-y-4",children:[e.jsx("p",{className:"text-muted-foreground text-sm",children:"Messages here go to this agent."}),i?e.jsxs("div",{className:"bg-accent/30 rounded-md border px-4 py-3 text-sm",children:[e.jsx("span",{className:"font-medium",children:ge(i)})," will answer."]}):e.jsxs("div",{className:"space-y-2",children:[e.jsx(ae,{htmlFor:"wizard-agent",children:"Who should answer?"}),e.jsxs(X,{value:t,onValueChange:a,children:[e.jsx(Z,{id:"wizard-agent",className:"w-full",children:e.jsx(ee,{placeholder:"Pick an agent"})}),e.jsx(se,{children:s.map(o=>e.jsx(te,{value:o.id,children:ge(o)},o.id))})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(ae,{htmlFor:"wizard-memory",children:"How the agent remembers"}),e.jsxs(X,{value:r,onValueChange:o=>l(o),children:[e.jsx(Z,{id:"wizard-memory",className:"w-full",children:e.jsx(ee,{})}),e.jsx(se,{children:ye.map(o=>e.jsx(te,{value:o.value,children:o.label},o.value))})]}),e.jsx("p",{className:"text-muted-foreground text-xs",children:(n=ye.find(o=>o.value===r))==null?void 0:n.hint})]})]})}function gs({open:s,onOpenChange:t,title:a,content:r}){return e.jsx(Le,{open:s,onOpenChange:t,children:e.jsxs(_e,{side:"right",className:"w-[480px] overflow-y-auto sm:max-w-lg",children:[e.jsxs(Ge,{children:[e.jsxs(He,{className:"flex items-center gap-2",children:[e.jsx(Se,{className:"size-4"}),a," setup guide"]}),e.jsx(Ie,{children:"Step-by-step setup instructions."})]}),e.jsx("div",{className:"mt-4 px-4",children:e.jsx(I,{content:r})})]})})}function we(s){const t=s.setupSteps;if(!t||t.length===0)return[];const a=new Set(t.flatMap(r=>r.fields));return s.configFields.filter(r=>!a.has(r.key))}function fs(s,t){return typeof t=="string"||t===void 0||t===null?t:s.valueShape==="id-list"?Array.isArray(t)?t.join(`
2
- `):t:s.valueShape==="json-object"&&typeof t=="object"?JSON.stringify(t,null,2):t}function js(s,t){const a=s.setupSteps;if(!a||a.length===0)return s.configFields;const r=a[t];if(!r)return s.configFields;const l=s.configFields.filter(i=>r.fields.includes(i.key));return t!==a.length-1?l:[...l,...we(s)]}const ys="Advanced";function K(s){const t={};for(const[a,r]of Object.entries(s)){const l=a.split(".");let i=t;for(let n=0;n<l.length-1;n++){const o=l[n];(!(o in i)||typeof i[o]!="object"||i[o]===null)&&(i[o]={}),i=i[o]}i[l[l.length-1]]=r}return t}function ve(s,t){const a=t.split(".");let r=s;for(const l of a){if(r==null||typeof r!="object")return;r=r[l]}return r}function vs(s,t){const a={};for(const r of s.configFields){const l=t?ve(t,r.key):void 0;l!==void 0&&r.type!=="password"?a[r.key]=fs(r,l):r.type==="password"&&t&&ve(t,r.key)!==void 0?a[r.key]="***":r.default!==void 0?a[r.key]=r.default:a[r.key]=r.type==="boolean"?!1:""}return a}function bs(s,t=[]){const a=s.type;if(!t.includes(a))return a;let r=2;for(;t.includes(`${a}-${r}`);)r++;return`${a}-${r}`}function Ns({manifest:s,existingInstance:t,existingAdapterIds:a=[],onOpenChange:r}){const l=!!t,[i,n]=m.useState(t?"configure":"agent"),[o,v]=m.useState(!1),[h]=m.useState(()=>(t==null?void 0:t.id)??bs(s,a)),[x,y]=m.useState(()=>{var p;return((p=t==null?void 0:t.config)==null?void 0:p.label)??""}),[d,b]=m.useState(0),[N,C]=m.useState(""),[c,P]=m.useState(""),[M,R]=m.useState("per-chat"),q=Ue(),z=Qe(),S=Ke(),W=ns(),{data:F}=Je(),w=be(),E=Ne(),T=(F==null?void 0:F.agents)??[],B=s.setupSteps&&s.setupSteps.length>0,j=as({defaultValues:vs(s,t==null?void 0:t.config),validators:{onSubmit:({value:p})=>{const g={};for(const u of s.configFields)if(!(u.showWhen&&p[u.showWhen.field]!==u.showWhen.equals)&&u.required){const f=p[u.key];(f==null||f==="")&&(g[u.key]=`${u.label} is required`)}return Object.keys(g).length>0?{fields:g}:void 0}},onSubmit:async()=>{}}),$=m.useMemo(()=>{const p=new Set(we(s).map(g=>g.key));return js(s,d).map(g=>p.has(g.key)&&!g.section?{...g,section:ys}:g)},[s,d]),O=m.useCallback(()=>{const p=j.state.values;let g=!0;for(const u of $)if(!(u.showWhen&&p[u.showWhen.field]!==u.showWhen.equals)&&u.required){const f=p[u.key];(f==null||f==="")&&(j.setFieldMeta(u.key,A=>({...A,isTouched:!0,errors:[`${u.label} is required`],errorMap:{onSubmit:`${u.label} is required`}})),g=!1)}return g},[j,$]),L=m.useCallback(()=>{if(i==="agent"){if(!c)return;n("configure");return}if(i==="configure"){if(!O())return;if(B&&s.setupSteps&&d<s.setupSteps.length-1){b(u=>u+1);return}const g=j.state.values;n("test"),S.mutate({type:s.type,config:K(g)},{onSuccess:u=>{u.botUsername&&(C(u.botUsername),x||y(`@${u.botUsername}`))}})}else i==="test"&&n("confirm")},[i,c,B,s,d,O,j,S,x]),V=m.useCallback(()=>{i==="test"?(n("configure"),S.reset()):i==="confirm"?n("test"):i==="configure"&&(B&&d>0?b(p=>p-1):l||n("agent"))},[i,B,d,S,l]),D=m.useCallback(async p=>{try{return await w.removeRelayAdapter(p),!0}catch{return!1}finally{E.invalidateQueries({queryKey:["relay"]})}},[w,E]),U=m.useCallback(()=>{const p=j.state.values,g=K(p),u=x?{...g,label:x}:g;if(l&&t){z.mutate({id:t.id,config:u},{onSuccess:()=>r(!1)});return}if(!c){n("agent");return}q.mutate({type:s.type,id:h,config:u},{onSuccess:()=>{W.mutate({adapterId:h,agentId:c,sessionStrategy:M,label:""},{onSuccess:()=>{var A;const f=((A=T.find(_=>_.id===c))==null?void 0:A.name)??c;G.success(`${s.displayName} is connected`,{description:`Messages here go to ${f}.`}),r(!1)},onError:f=>{n("agent"),D(h).then(A=>{A?G.error("Nothing was set up",{description:`${s.displayName} couldn’t be linked to an agent, so it wasn’t saved. ${f.message}`}):G.error("Couldn’t finish undoing",{description:`${s.displayName} was added with no agent to answer it. Remove it from Messaging. ${f.message}`})})}})},onError:f=>{var A,_,ne;(A=f.message)!=null&&A.includes("timed out")?G.error(`Couldn’t reach ${s.displayName}`,{description:"Check your token and network, then try again."}):((_=f.message)!=null&&_.includes("duplicate")||(ne=f.message)!=null&&ne.includes("exists"))&&(n("configure"),b(0))}})},[j,l,t,z,q,W,s,h,x,c,M,T,D,r]),Ce=m.useCallback(p=>{p||(n(l?"configure":"agent"),b(0),y(""),C(""),P(""),R("per-chat"),v(!1),j.reset(),S.reset()),r(p)},[r,j,S,l]),Ae=m.useCallback(()=>{S.mutate({type:s.type,config:K(j.state.values)})},[S,s.type,j]),Fe=q.isPending||z.isPending||W.isPending,Be=B&&s.setupSteps?s.setupSteps[d]:void 0;return{step:i,isEditMode:l,adapterId:h,label:x,setLabel:y,botUsername:N,guideOpen:o,setGuideOpen:v,form:j,visibleFields:$,bindAgentId:c,setBindAgentId:P,bindStrategy:M,setBindStrategy:R,agentOptions:T,isSaving:Fe,hasSetupSteps:B,setupStepIndex:d,currentSetupStep:Be,testConnection:S,handleContinue:L,handleBack:V,handleSave:U,handleOpenChange:Ce,handleRetryTest:Ae}}function zs({open:s,onOpenChange:t,manifest:a,existingInstance:r,existingAdapterIds:l=[]}){var L;const i=Ns({manifest:a,existingInstance:r,existingAdapterIds:l,onOpenChange:t}),{step:n,isEditMode:o,adapterId:v,label:h,setLabel:x,botUsername:y,guideOpen:d,setGuideOpen:b,form:N,visibleFields:C,bindAgentId:c,setBindAgentId:P,bindStrategy:M,setBindStrategy:R,agentOptions:q,isSaving:z,hasSetupSteps:S,setupStepIndex:W,currentSetupStep:F,testConnection:w,handleContinue:E,handleBack:T,handleSave:B,handleOpenChange:j,handleRetryTest:$}=i,O={agent:"Pick who answers messages here.",configure:(F==null?void 0:F.description)??"Fill in the settings this needs.",test:"Checking the connection…",confirm:"Check it over, then save."}[n];return e.jsxs(m.Fragment,{children:[e.jsx(Ye,{open:s,onOpenChange:j,children:e.jsxs(Xe,{className:"flex max-h-[85vh] max-w-lg flex-col",children:[e.jsxs(Ze,{children:[e.jsx(es,{children:o?`Edit ${a.displayName}`:`Add ${a.displayName}`}),e.jsx(ss,{children:O})]}),e.jsxs("div",{className:"min-h-0 space-y-4 overflow-y-auto py-2",children:[e.jsx(ds,{current:n,showAgentStep:!o}),e.jsx(J,{mode:"wait",children:e.jsxs(Y.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:[n==="agent"&&e.jsx(xs,{agentOptions:q,agentId:c,onAgentIdChange:P,strategy:M,onStrategyChange:R}),n==="configure"&&e.jsx(us,{manifest:a,label:h,onLabelChange:x,fields:C,form:N,currentSetupStep:F,hasSetupGuide:!!a.setupGuide,onOpenGuide:()=>b(!0)}),n==="test"&&e.jsx(hs,{isPending:w.isPending,isSuccess:w.isSuccess,isError:w.isError,errorMessage:(L=w.error)==null?void 0:L.message,botUsername:y,onRetry:$}),n==="confirm"&&e.jsx(N.Subscribe,{selector:V=>V.values,children:V=>{var D;return e.jsx(ms,{manifest:a,adapterId:v,isEditMode:o,values:V,botUsername:y,agentName:((D=q.find(U=>U.id===c))==null?void 0:D.name)||c})}})]},n)})]}),e.jsxs(ts,{className:"flex items-center justify-between sm:justify-between",children:[e.jsxs("div",{children:[(n==="test"||n==="confirm")&&e.jsxs(k,{variant:"ghost",onClick:T,disabled:z,children:[e.jsx(fe,{className:"mr-1 size-4"}),"Back"]}),n==="configure"&&(S?W>0:!o)&&e.jsxs(k,{variant:"ghost",onClick:T,children:[e.jsx(fe,{className:"mr-1 size-4"}),"Back"]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(k,{variant:"outline",onClick:()=>j(!1),children:"Cancel"}),n==="agent"&&e.jsxs(k,{onClick:E,disabled:!c,children:["Continue",e.jsx(Q,{className:"ml-1 size-4"})]}),n==="configure"&&e.jsxs(k,{onClick:E,children:["Continue",e.jsx(Q,{className:"ml-1 size-4"})]}),n==="test"&&!w.isPending&&!w.isSuccess&&e.jsx(k,{variant:"ghost",onClick:E,children:"Skip"}),n==="test"&&w.isSuccess&&e.jsxs(k,{onClick:E,children:["Continue",e.jsx(Q,{className:"ml-1 size-4"})]}),n==="confirm"&&e.jsxs(k,{onClick:B,disabled:z,children:[z&&e.jsx(ke,{className:"mr-2"}),o?"Save changes":"Connect"]})]})]})]})}),a.setupGuide&&e.jsx(gs,{open:d,onOpenChange:b,title:a.displayName,content:a.setupGuide})]})}export{zs as A,Bs as u};
1
+ import{a5 as be,a7 as Ne,a8 as ze,j as e,bh as Ee,bi as qe,r as m,dD as ie,i6 as Te,dE as oe,ha as le,a3 as Me,Q as ce,T as de,ax as ue,U as he,V as pe,Z as Y,_ as J,i7 as me,dC as $e,G as Q,ew as X,ex as Z,ey as ee,ez as se,eA as te,I as re,eM as xe,J as We,bx as Ve,B as k,i8 as Se,eO as De,eL as ae,x as ke,bf as Pe,be as Re,a4 as Oe,am as ge,i9 as Le,ia as _e,ib as Ge,ic as Qe,id as Ue,ie as Ie,ig as He,ih as Ke,c$ as Ye,dR as G,fM as Je,fN as Xe,fO as Ze,fP as es,fQ as ss,fR as ts,ii as fe,ij as H}from"./index-BYTLOFNS.js";import{B as rs}from"./use-bindings-DVKWBz4y.js";import{M as U}from"./markdown-content-C1i_dR6j.js";import{u as as}from"./form-Cf49Z6eU.js";import{a as ns}from"./BindingDialog-CMbJI0MX.js";import"./relay-trace-schemas-CctfRKB2.js";function Bs(s={}){const t=be(),a=Ne();return ze({mutationFn:({id:r,updates:l})=>t.updateBinding(r,l),onSuccess:()=>{a.invalidateQueries({queryKey:[...rs]})},meta:s.suppressErrorToast?{suppressErrorToast:!0}:{errorLabel:s.errorLabel??"Couldn’t update that connection"}})}function is({field:s,value:t,onChange:a,error:r,allValues:l}){const[i,n]=m.useState("");if(s.showWhen&&l[s.showWhen.field]!==s.showWhen.equals)return null;const o=`config-field-${s.key}`,v=s.type==="select"&&s.displayAs==="radio-cards",h=t!=null?String(t):"",x=h==="***",y=()=>{if(x){n("");return}if(s.pattern&&h&&!new RegExp(s.pattern).test(h)){n(s.patternMessage??"Check the format");return}n("")},d=r??i;if(s.type==="boolean")return e.jsxs("div",{children:[e.jsxs(ie,{orientation:"horizontal",className:"items-center justify-between gap-4",children:[e.jsxs(Te,{className:"min-w-0",children:[e.jsxs(oe,{htmlFor:o,className:"text-sm font-medium",children:[s.label,s.required&&e.jsx("span",{"aria-hidden":"true",className:"text-destructive ml-0.5",children:"*"})]}),s.description&&e.jsx(le,{className:"text-xs",children:s.description})]}),e.jsx(Me,{id:o,checked:!!t,onCheckedChange:N=>a(s.key,N)})]}),s.helpMarkdown&&e.jsxs(ce,{children:[e.jsxs(de,{className:"text-muted-foreground hover:text-foreground mt-1 flex items-center gap-1 text-xs transition-colors",children:[e.jsx(ue,{className:"size-3"}),"Where do I find this?",e.jsx(he,{className:"size-3 transition-transform [[data-state=open]_&]:rotate-180"})]}),e.jsx(pe,{children:e.jsx("div",{className:"bg-muted/50 mt-2 rounded-md border p-3",children:e.jsx(U,{content:s.helpMarkdown,className:"text-xs"})})})]}),e.jsx(Y,{children:d&&e.jsx(J.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.15},className:"overflow-hidden",children:e.jsx(me,{className:"mt-1.5",children:d})})})]});const b=()=>{var N,C;switch(s.type){case"text":case"url":return e.jsx(re,{id:o,type:s.type==="url"?"url":"text",value:h,onChange:c=>a(s.key,c.target.value),placeholder:s.placeholder,"aria-invalid":!!d||void 0,"aria-required":s.required||void 0});case"password":return x?e.jsx(xe,{id:o,value:h,showPassword:!1,onChange:c=>{a(s.key,c.target.value.trim()),i&&n("")},onFocus:()=>a(s.key,""),onBlur:y,placeholder:"Saved · type to replace"}):e.jsx(xe,{id:o,value:h,visibleByDefault:s.visibleByDefault??!1,onChange:c=>{a(s.key,c.target.value.trim()),i&&n("")},onBlur:y,onPaste:()=>setTimeout(y,0),placeholder:s.placeholder,"aria-invalid":!!d||void 0,"aria-required":s.required||void 0});case"number":return e.jsx(re,{id:o,type:"number",value:h,onChange:c=>a(s.key,c.target.value?Number(c.target.value):void 0),placeholder:s.placeholder,"aria-invalid":!!d||void 0,"aria-required":s.required||void 0});case"select":return s.displayAs==="radio-cards"?e.jsx("div",{className:"grid grid-cols-2 gap-3",role:"radiogroup","aria-labelledby":`${o}-label`,"aria-required":s.required||void 0,children:(N=s.options)==null?void 0:N.map(c=>e.jsxs("button",{type:"button",role:"radio","aria-checked":h===c.value,onClick:()=>a(s.key,c.value),className:Q("hover:bg-accent/50 focus-visible:border-ring focus-visible:ring-ring flex flex-col items-start rounded-md border p-3 text-left transition outline-none focus-visible:ring-[3px]",h===c.value&&"border-primary ring-primary bg-accent/30 ring-1"),children:[e.jsx("span",{className:"text-sm font-medium",children:c.label}),c.description&&e.jsx("span",{className:"text-muted-foreground mt-1 text-xs",children:c.description})]},c.value))}):e.jsxs(X,{value:h,onValueChange:c=>a(s.key,c),children:[e.jsx(Z,{id:o,"aria-invalid":!!d||void 0,"aria-required":s.required||void 0,children:e.jsx(ee,{placeholder:s.placeholder??"Select…"})}),e.jsx(se,{children:(C=s.options)==null?void 0:C.map(c=>e.jsx(te,{value:c.value,children:c.label},c.value))})]});case"textarea":return e.jsx($e,{id:o,value:h,onChange:c=>a(s.key,c.target.value),placeholder:s.placeholder,rows:3,"aria-invalid":!!d||void 0,"aria-required":s.required||void 0});default:return null}};return e.jsxs(ie,{children:[e.jsxs(oe,{id:`${o}-label`,htmlFor:v?void 0:o,children:[s.label,s.required&&!x&&e.jsx("span",{"aria-hidden":"true",className:"text-destructive ml-0.5",children:"*"})]}),b(),s.description&&e.jsx(le,{className:"text-xs",children:s.description}),s.helpMarkdown&&e.jsxs(ce,{children:[e.jsxs(de,{className:"text-muted-foreground hover:text-foreground mt-1 flex items-center gap-1 text-xs transition-colors",children:[e.jsx(ue,{className:"size-3"}),"Where do I find this?",e.jsx(he,{className:"size-3 transition-transform [[data-state=open]_&]:rotate-180"})]}),e.jsx(pe,{children:e.jsx("div",{className:"bg-muted/50 mt-2 rounded-md border p-3",children:e.jsx(U,{content:s.helpMarkdown,className:"text-xs"})})})]}),e.jsx(Y,{children:d&&e.jsx(J.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.15},className:"overflow-hidden",children:e.jsx(me,{children:d})})})]})}function os(s,t){return s.showWhen?t[s.showWhen.field]===s.showWhen.equals:!0}function ls({fields:s,allValues:t,renderField:a}){const r=new Map;for(const l of s){const i=l.section;r.has(i)||r.set(i,[]),r.get(i).push(l)}return e.jsx("div",{className:"space-y-6",children:Array.from(r.entries()).map(([l,i])=>{const n=i.filter(o=>os(o,t));return n.length===0?null:e.jsxs("div",{className:"space-y-3",children:[l&&e.jsx("h4",{className:"text-sm font-semibold",children:l}),e.jsx(Ee,{children:e.jsx(qe,{children:n.map(o=>a(o))})})]},l??"__default")})})}const je=["agent","configure","test","confirm"],cs={agent:"Agent",configure:"Set up",test:"Check",confirm:"Review"};function ds({current:s,showAgentStep:t}){const a=t?je:je.filter(l=>l!=="agent"),r=a.indexOf(s);return e.jsx("div",{className:"flex items-start justify-between px-1",role:"navigation","aria-label":"Setup steps",children:a.map((l,i)=>{const n=i<r,o=i===r,v=i>r;return e.jsxs(m.Fragment,{children:[i>0&&e.jsx("div",{className:Q("mt-3 h-px flex-1",n||o?"bg-primary":"border-muted-foreground/40 border-t border-dashed")}),e.jsxs("div",{className:"flex flex-col items-center gap-1",children:[e.jsx("div",{className:Q("flex size-6 items-center justify-center rounded-full text-xs font-medium",n&&"bg-primary text-primary-foreground",o&&"bg-primary text-primary-foreground ring-primary/30 ring-2",v&&"border-muted-foreground text-muted-foreground border"),"aria-current":o?"step":void 0,children:n?e.jsx(We,{className:"size-3"}):i+1}),e.jsx("span",{className:Q("text-3xs",o?"text-foreground font-medium":"text-muted-foreground"),children:cs[l]})]})]},l)})})}function us({manifest:s,label:t,onLabelChange:a,fields:r,form:l,currentSetupStep:i,hasSetupGuide:n,onOpenGuide:o}){const{Subscribe:v,AppField:h}=l;return e.jsxs("div",{className:"space-y-4",children:[s.setupInstructions&&e.jsxs("div",{className:"flex gap-2 rounded-md border border-blue-200 bg-blue-50 p-3 text-sm text-blue-800 dark:border-blue-800 dark:bg-blue-950 dark:text-blue-200",children:[e.jsx(Ve,{className:"mt-0.5 size-4 shrink-0"}),e.jsx(U,{content:s.setupInstructions,className:"text-sm text-blue-800 dark:text-blue-200"})]}),(s.actionButton||n)&&e.jsxs("div",{className:"flex items-center justify-end gap-2",children:[n&&e.jsxs(k,{type:"button",variant:"outline",size:"sm",onClick:o,children:[e.jsx(Se,{className:"mr-1.5 size-3.5"}),"Setup guide"]}),s.actionButton&&e.jsx(k,{asChild:!0,type:"button",variant:"outline",size:"sm",children:e.jsx(De,{href:s.actionButton.url,children:s.actionButton.label})})]}),i&&e.jsx("h4",{className:"text-sm font-medium",children:i.title}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(ae,{htmlFor:"adapter-label",children:"Name (optional)"}),e.jsx(re,{id:"adapter-label",placeholder:s.displayName,value:t,onChange:x=>a(x.target.value)}),e.jsx("p",{className:"text-muted-foreground text-xs",children:"Helps you tell this connection apart."})]}),e.jsx(v,{selector:x=>x.values,children:x=>e.jsx(ls,{fields:r,allValues:x,renderField:y=>e.jsx(h,{name:y.key,children:d=>{var b;return e.jsx(is,{field:y,value:d.state.value,onChange:(N,C)=>d.handleChange(C),onBlur:d.handleBlur,error:d.state.meta.isTouched?(b=d.state.meta.errors[0])==null?void 0:b.toString():void 0,allValues:x})}},y.key)})})]})}function hs({isPending:s,isSuccess:t,isError:a,errorMessage:r,botUsername:l,onRetry:i}){return e.jsxs("div",{className:"flex flex-col items-center gap-3 py-6",children:[s&&e.jsxs(e.Fragment,{children:[e.jsx(ke,{size:"lg",className:"text-muted-foreground"}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Trying to reach it…"})]}),t&&e.jsxs("div",{className:"flex flex-col items-center gap-2",children:[e.jsx(Pe,{className:"text-status-success size-8"}),e.jsx("p",{className:"text-status-success-fg text-sm",children:"Reachable"}),l&&e.jsx("div",{className:"flex items-center gap-2 rounded-md border px-3 py-2 text-sm",children:e.jsxs("span",{className:"font-mono",children:["@",l]})})]}),a&&e.jsxs(e.Fragment,{children:[e.jsx(Re,{className:"text-destructive size-8"}),e.jsx("p",{className:"text-destructive text-sm",children:"Not reachable"}),r&&e.jsxs("div",{className:"flex items-start gap-2 rounded-md border border-red-200 bg-red-50 p-3 text-xs text-red-700 dark:border-red-800 dark:bg-red-950 dark:text-red-300",children:[e.jsx(Oe,{className:"mt-0.5 size-3 shrink-0"}),e.jsx("span",{children:r})]}),e.jsx(k,{variant:"outline",size:"sm",onClick:i,children:"Retry"})]})]})}function ps(s){return s.length>8?"•••• "+s.slice(-4):"•••"}function ms({manifest:s,adapterId:t,isEditMode:a,values:r,botUsername:l,agentName:i}){return e.jsxs("div",{className:"space-y-3",children:[!a&&i&&e.jsxs("p",{className:"bg-accent/30 rounded-md border px-3 py-2 text-sm",children:["Messages here go to ",e.jsx("span",{className:"font-medium",children:i}),"."]}),!a&&e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:"Connection ID"}),e.jsx("span",{className:"font-mono",children:t})]}),s.configFields.map(n=>{if(n.showWhen&&r[n.showWhen.field]!==n.showWhen.equals)return null;const o=String(r[n.key]??""),v=n.type==="password"?ps(o):o;return e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:n.label}),e.jsx("span",{className:"max-w-[200px] truncate font-mono",children:v})]},n.key)}),l&&s.type==="telegram"&&e.jsxs("a",{href:`https://t.me/${l}`,target:"_blank",rel:"noopener noreferrer",className:"text-primary inline-flex items-center gap-1.5 text-sm underline-offset-4 hover:underline",children:["Message @",l," in Telegram"]})]})}const ye=[{value:"per-chat",label:"One shared chat per group or channel",hint:"Everyone there shares one chat with the agent."},{value:"per-user",label:"One chat per person",hint:"Each person gets their own chat, even in a group."},{value:"stateless",label:"A fresh start every message",hint:"Nothing carries over from the message before."}];function xs({agentOptions:s,agentId:t,onAgentIdChange:a,strategy:r,onStrategyChange:l}){var n;const i=s.length===1?s[0]:void 0;return m.useEffect(()=>{i&&!t&&a(i.id)},[i,t,a]),s.length===0?e.jsx("p",{role:"alert",className:"text-muted-foreground rounded-md border border-dashed px-4 py-6 text-center text-sm",children:"No agents yet. Add one from the Team page first."}):e.jsxs("div",{className:"space-y-4",children:[e.jsx("p",{className:"text-muted-foreground text-sm",children:"Messages here go to this agent."}),i?e.jsxs("div",{className:"bg-accent/30 rounded-md border px-4 py-3 text-sm",children:[e.jsx("span",{className:"font-medium",children:ge(i)})," will answer."]}):e.jsxs("div",{className:"space-y-2",children:[e.jsx(ae,{htmlFor:"wizard-agent",children:"Who should answer?"}),e.jsxs(X,{value:t,onValueChange:a,children:[e.jsx(Z,{id:"wizard-agent",className:"w-full",children:e.jsx(ee,{placeholder:"Pick an agent"})}),e.jsx(se,{children:s.map(o=>e.jsx(te,{value:o.id,children:ge(o)},o.id))})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(ae,{htmlFor:"wizard-memory",children:"How the agent remembers"}),e.jsxs(X,{value:r,onValueChange:o=>l(o),children:[e.jsx(Z,{id:"wizard-memory",className:"w-full",children:e.jsx(ee,{})}),e.jsx(se,{children:ye.map(o=>e.jsx(te,{value:o.value,children:o.label},o.value))})]}),e.jsx("p",{className:"text-muted-foreground text-xs",children:(n=ye.find(o=>o.value===r))==null?void 0:n.hint})]})]})}function gs({open:s,onOpenChange:t,title:a,content:r}){return e.jsx(Le,{open:s,onOpenChange:t,children:e.jsxs(_e,{side:"right",className:"w-[480px] overflow-y-auto sm:max-w-lg",children:[e.jsxs(Ge,{children:[e.jsxs(Qe,{className:"flex items-center gap-2",children:[e.jsx(Se,{className:"size-4"}),a," setup guide"]}),e.jsx(Ue,{children:"Step-by-step setup instructions."})]}),e.jsx("div",{className:"mt-4 px-4",children:e.jsx(U,{content:r})})]})})}function we(s){const t=s.setupSteps;if(!t||t.length===0)return[];const a=new Set(t.flatMap(r=>r.fields));return s.configFields.filter(r=>!a.has(r.key))}function fs(s,t){return typeof t=="string"||t===void 0||t===null?t:s.valueShape==="id-list"?Array.isArray(t)?t.join(`
2
+ `):t:s.valueShape==="json-object"&&typeof t=="object"?JSON.stringify(t,null,2):t}function js(s,t){const a=s.setupSteps;if(!a||a.length===0)return s.configFields;const r=a[t];if(!r)return s.configFields;const l=s.configFields.filter(i=>r.fields.includes(i.key));return t!==a.length-1?l:[...l,...we(s)]}const ys="Advanced";function K(s){const t={};for(const[a,r]of Object.entries(s)){const l=a.split(".");let i=t;for(let n=0;n<l.length-1;n++){const o=l[n];(!(o in i)||typeof i[o]!="object"||i[o]===null)&&(i[o]={}),i=i[o]}i[l[l.length-1]]=r}return t}function ve(s,t){const a=t.split(".");let r=s;for(const l of a){if(r==null||typeof r!="object")return;r=r[l]}return r}function vs(s,t){const a={};for(const r of s.configFields){const l=t?ve(t,r.key):void 0;l!==void 0&&r.type!=="password"?a[r.key]=fs(r,l):r.type==="password"&&t&&ve(t,r.key)!==void 0?a[r.key]="***":r.default!==void 0?a[r.key]=r.default:a[r.key]=r.type==="boolean"?!1:""}return a}function bs(s,t=[]){const a=s.type;if(!t.includes(a))return a;let r=2;for(;t.includes(`${a}-${r}`);)r++;return`${a}-${r}`}function Ns({manifest:s,existingInstance:t,existingAdapterIds:a=[],onOpenChange:r}){const l=!!t,[i,n]=m.useState(t?"configure":"agent"),[o,v]=m.useState(!1),[h]=m.useState(()=>(t==null?void 0:t.id)??bs(s,a)),[x,y]=m.useState(()=>{var p;return((p=t==null?void 0:t.config)==null?void 0:p.label)??""}),[d,b]=m.useState(0),[N,C]=m.useState(""),[c,P]=m.useState(""),[M,R]=m.useState("per-chat"),q=Ie(),z=He(),S=Ke(),$=ns(),{data:F}=Ye(),w=be(),E=Ne(),T=(F==null?void 0:F.agents)??[],B=s.setupSteps&&s.setupSteps.length>0,j=as({defaultValues:vs(s,t==null?void 0:t.config),validators:{onSubmit:({value:p})=>{const g={};for(const u of s.configFields)if(!(u.showWhen&&p[u.showWhen.field]!==u.showWhen.equals)&&u.required){const f=p[u.key];(f==null||f==="")&&(g[u.key]=`${u.label} is required`)}return Object.keys(g).length>0?{fields:g}:void 0}},onSubmit:async()=>{}}),W=m.useMemo(()=>{const p=new Set(we(s).map(g=>g.key));return js(s,d).map(g=>p.has(g.key)&&!g.section?{...g,section:ys}:g)},[s,d]),O=m.useCallback(()=>{const p=j.state.values;let g=!0;for(const u of W)if(!(u.showWhen&&p[u.showWhen.field]!==u.showWhen.equals)&&u.required){const f=p[u.key];(f==null||f==="")&&(j.setFieldMeta(u.key,A=>({...A,isTouched:!0,errors:[`${u.label} is required`],errorMap:{onSubmit:`${u.label} is required`}})),g=!1)}return g},[j,W]),L=m.useCallback(()=>{if(i==="agent"){if(!c)return;n("configure");return}if(i==="configure"){if(!O())return;if(B&&s.setupSteps&&d<s.setupSteps.length-1){b(u=>u+1);return}const g=j.state.values;n("test"),S.mutate({type:s.type,config:K(g)},{onSuccess:u=>{u.botUsername&&(C(u.botUsername),x||y(`@${u.botUsername}`))}})}else i==="test"&&n("confirm")},[i,c,B,s,d,O,j,S,x]),V=m.useCallback(()=>{i==="test"?(n("configure"),S.reset()):i==="confirm"?n("test"):i==="configure"&&(B&&d>0?b(p=>p-1):l||n("agent"))},[i,B,d,S,l]),D=m.useCallback(async p=>{try{return await w.removeRelayAdapter(p),!0}catch{return!1}finally{E.invalidateQueries({queryKey:["relay"]})}},[w,E]),I=m.useCallback(()=>{const p=j.state.values,g=K(p),u=x?{...g,label:x}:g;if(l&&t){z.mutate({id:t.id,config:u},{onSuccess:()=>r(!1)});return}if(!c){n("agent");return}q.mutate({type:s.type,id:h,config:u},{onSuccess:()=>{$.mutate({adapterId:h,agentId:c,sessionStrategy:M,label:""},{onSuccess:()=>{var A;const f=((A=T.find(_=>_.id===c))==null?void 0:A.name)??c;G.success(`${s.displayName} is connected`,{description:`Messages here go to ${f}.`}),r(!1)},onError:f=>{n("agent"),D(h).then(A=>{A?G.error("Nothing was set up",{description:`${s.displayName} couldn’t be linked to an agent, so it wasn’t saved. ${f.message}`}):G.error("Couldn’t finish undoing",{description:`${s.displayName} was added with no agent to answer it. Remove it from Messaging. ${f.message}`})})}})},onError:f=>{var A,_,ne;(A=f.message)!=null&&A.includes("timed out")?G.error(`Couldn’t reach ${s.displayName}`,{description:"Check your token and network, then try again."}):((_=f.message)!=null&&_.includes("duplicate")||(ne=f.message)!=null&&ne.includes("exists"))&&(n("configure"),b(0))}})},[j,l,t,z,q,$,s,h,x,c,M,T,D,r]),Ce=m.useCallback(p=>{p||(n(l?"configure":"agent"),b(0),y(""),C(""),P(""),R("per-chat"),v(!1),j.reset(),S.reset()),r(p)},[r,j,S,l]),Ae=m.useCallback(()=>{S.mutate({type:s.type,config:K(j.state.values)})},[S,s.type,j]),Fe=q.isPending||z.isPending||$.isPending,Be=B&&s.setupSteps?s.setupSteps[d]:void 0;return{step:i,isEditMode:l,adapterId:h,label:x,setLabel:y,botUsername:N,guideOpen:o,setGuideOpen:v,form:j,visibleFields:W,bindAgentId:c,setBindAgentId:P,bindStrategy:M,setBindStrategy:R,agentOptions:T,isSaving:Fe,hasSetupSteps:B,setupStepIndex:d,currentSetupStep:Be,testConnection:S,handleContinue:L,handleBack:V,handleSave:I,handleOpenChange:Ce,handleRetryTest:Ae}}function zs({open:s,onOpenChange:t,manifest:a,existingInstance:r,existingAdapterIds:l=[]}){var L;const i=Ns({manifest:a,existingInstance:r,existingAdapterIds:l,onOpenChange:t}),{step:n,isEditMode:o,adapterId:v,label:h,setLabel:x,botUsername:y,guideOpen:d,setGuideOpen:b,form:N,visibleFields:C,bindAgentId:c,setBindAgentId:P,bindStrategy:M,setBindStrategy:R,agentOptions:q,isSaving:z,hasSetupSteps:S,setupStepIndex:$,currentSetupStep:F,testConnection:w,handleContinue:E,handleBack:T,handleSave:B,handleOpenChange:j,handleRetryTest:W}=i,O={agent:"Pick who answers messages here.",configure:(F==null?void 0:F.description)??"Fill in the settings this needs.",test:"Checking the connection…",confirm:"Check it over, then save."}[n];return e.jsxs(m.Fragment,{children:[e.jsx(Je,{open:s,onOpenChange:j,children:e.jsxs(Xe,{className:"flex max-h-[85vh] max-w-lg flex-col",children:[e.jsxs(Ze,{children:[e.jsx(es,{children:o?`Edit ${a.displayName}`:`Add ${a.displayName}`}),e.jsx(ss,{children:O})]}),e.jsxs("div",{className:"min-h-0 space-y-4 overflow-y-auto py-2",children:[e.jsx(ds,{current:n,showAgentStep:!o}),e.jsx(Y,{mode:"wait",children:e.jsxs(J.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:[n==="agent"&&e.jsx(xs,{agentOptions:q,agentId:c,onAgentIdChange:P,strategy:M,onStrategyChange:R}),n==="configure"&&e.jsx(us,{manifest:a,label:h,onLabelChange:x,fields:C,form:N,currentSetupStep:F,hasSetupGuide:!!a.setupGuide,onOpenGuide:()=>b(!0)}),n==="test"&&e.jsx(hs,{isPending:w.isPending,isSuccess:w.isSuccess,isError:w.isError,errorMessage:(L=w.error)==null?void 0:L.message,botUsername:y,onRetry:W}),n==="confirm"&&e.jsx(N.Subscribe,{selector:V=>V.values,children:V=>{var D;return e.jsx(ms,{manifest:a,adapterId:v,isEditMode:o,values:V,botUsername:y,agentName:((D=q.find(I=>I.id===c))==null?void 0:D.name)||c})}})]},n)})]}),e.jsxs(ts,{className:"flex items-center justify-between sm:justify-between",children:[e.jsxs("div",{children:[(n==="test"||n==="confirm")&&e.jsxs(k,{variant:"ghost",onClick:T,disabled:z,children:[e.jsx(fe,{className:"mr-1 size-4"}),"Back"]}),n==="configure"&&(S?$>0:!o)&&e.jsxs(k,{variant:"ghost",onClick:T,children:[e.jsx(fe,{className:"mr-1 size-4"}),"Back"]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(k,{variant:"outline",onClick:()=>j(!1),children:"Cancel"}),n==="agent"&&e.jsxs(k,{onClick:E,disabled:!c,children:["Continue",e.jsx(H,{className:"ml-1 size-4"})]}),n==="configure"&&e.jsxs(k,{onClick:E,children:["Continue",e.jsx(H,{className:"ml-1 size-4"})]}),n==="test"&&!w.isPending&&!w.isSuccess&&e.jsx(k,{variant:"ghost",onClick:E,children:"Skip"}),n==="test"&&w.isSuccess&&e.jsxs(k,{onClick:E,children:["Continue",e.jsx(H,{className:"ml-1 size-4"})]}),n==="confirm"&&e.jsxs(k,{onClick:B,disabled:z,children:[z&&e.jsx(ke,{className:"mr-2"}),o?"Save changes":"Connect"]})]})]})]})}),a.setupGuide&&e.jsx(gs,{open:d,onOpenChange:b,title:a.displayName,content:a.setupGuide})]})}export{zs as A,Bs as u};
@@ -1 +1 @@
1
- import{ak as m,j as s,al as c,am as x,J as u,G as d}from"./index-BwTGkJbK.js";function p({agent:e,name:t,secondary:a,trailing:n,selected:i,className:r}){const{color:l,emoji:o}=m(e);return s.jsxs("div",{className:d("flex w-full min-w-0 items-center gap-2",r),children:[s.jsx(c,{color:l,emoji:o,size:"xs",className:"shrink-0"}),s.jsx("span",{className:"min-w-[8ch] flex-auto truncate text-sm font-medium",children:t??x(e)}),a!=null&&s.jsx("span",{"data-slot":"agent-option-row-secondary",className:"text-muted-foreground min-w-0 shrink truncate text-xs",children:a}),n??(i&&s.jsx(u,{className:"size-4 shrink-0","aria-hidden":!0}))]})}export{p as A};
1
+ import{ak as m,j as s,al as c,am as x,J as u,G as d}from"./index-BYTLOFNS.js";function p({agent:e,name:t,secondary:a,trailing:n,selected:i,className:r}){const{color:l,emoji:o}=m(e);return s.jsxs("div",{className:d("flex w-full min-w-0 items-center gap-2",r),children:[s.jsx(c,{color:l,emoji:o,size:"xs",className:"shrink-0"}),s.jsx("span",{className:"min-w-[8ch] flex-auto truncate text-sm font-medium",children:t??x(e)}),a!=null&&s.jsx("span",{"data-slot":"agent-option-row-secondary",className:"text-muted-foreground min-w-0 shrink truncate text-xs",children:a}),n??(i&&s.jsx(u,{className:"size-4 shrink-0","aria-hidden":!0}))]})}export{p as A};
@@ -1 +1 @@
1
- import{r as l,af as h,j as e,ag as j,ah as g,ai as b,aj as v,ak as w,al as N,am as p,an as C,G as y,ao as k}from"./index-BwTGkJbK.js";import{C as A,a as S,b as D,c as E,d as P,e as L}from"./command-CxGYZKco.js";import{A as R}from"./AgentOptionRow-BGRvUeF7.js";function u({agents:n,value:t,onSelect:a}){return e.jsxs(A,{children:[e.jsx(S,{placeholder:"Search agents…"}),e.jsxs(D,{className:"!max-h-60 !overflow-y-auto",children:[e.jsx(E,{children:"No agents found."}),e.jsx(P,{children:n.map(s=>e.jsx(L,{value:`${p(s)} ${s.name} ${s.projectPath}`,onSelect:()=>a(s.id),children:e.jsx(R,{agent:s,secondary:k(s.projectPath),selected:s.id===t})},s.id))})]})]})}function x({selectedAgent:n,open:t,onClick:a}){const s=n?w(n):null;return e.jsxs("button",{type:"button","aria-expanded":t,"aria-haspopup":"listbox",className:y("border-input ring-offset-background flex h-9 w-full items-center justify-between rounded-md border bg-transparent px-3 py-2 text-sm shadow-xs transition-colors","focus-visible:ring-ring focus-visible:ring-1 focus-visible:outline-none","hover:bg-accent/50"),onClick:a,children:[n?e.jsxs("span",{className:"flex items-center gap-2 truncate",children:[e.jsx(N,{color:s.color,emoji:s.emoji,size:"xs"}),e.jsx("span",{className:"truncate",children:p(n)})]}):e.jsx("span",{className:"text-muted-foreground",children:"Select an agent…"}),e.jsx(C,{className:"ml-2 size-4 shrink-0 opacity-50"})]})}function $({agents:n,value:t,onValueChange:a}){const[s,o]=l.useState(!1),i=h(),c=l.useRef(null);l.useEffect(()=>{if(!s||i)return;function r(f){c.current&&!c.current.contains(f.target)&&o(!1)}return document.addEventListener("mousedown",r),()=>document.removeEventListener("mousedown",r)},[s,i]);const d=n.find(r=>r.id===t);function m(r){a(r===t?void 0:r),o(!1)}return n.length===0?e.jsxs("div",{className:"rounded-md border px-4 py-6 text-center",children:[e.jsx("p",{className:"text-muted-foreground text-sm",children:"No agents yet"}),e.jsx("p",{className:"text-muted-foreground mt-1 text-xs",children:"Add one from the Team page to give it tasks."})]}):i?e.jsxs(e.Fragment,{children:[e.jsx(x,{selectedAgent:d,open:s,onClick:()=>o(!0)}),e.jsx(j,{open:s,onOpenChange:o,children:e.jsxs(g,{children:[e.jsx(b,{children:e.jsx(v,{children:"Select an agent"})}),e.jsx("div",{className:"px-4 pb-4",children:e.jsx(u,{agents:n,value:t,onSelect:m})})]})})]}):e.jsxs("div",{ref:c,className:"relative w-full",children:[e.jsx(x,{selectedAgent:d,open:s,onClick:()=>o(r=>!r)}),s&&e.jsx("div",{className:"bg-popover text-popover-foreground absolute top-full left-0 z-50 mt-1 w-full rounded-md border shadow-md",children:e.jsx(u,{agents:n,value:t,onSelect:m})})]})}export{$ as A};
1
+ import{r as l,af as h,j as e,ag as j,ah as g,ai as b,aj as v,ak as w,al as N,am as p,an as C,G as y,ao as k}from"./index-BYTLOFNS.js";import{C as A,a as S,b as D,c as E,d as P,e as L}from"./command-DU2-hlOP.js";import{A as R}from"./AgentOptionRow-YsNMoqxA.js";function u({agents:n,value:t,onSelect:a}){return e.jsxs(A,{children:[e.jsx(S,{placeholder:"Search agents…"}),e.jsxs(D,{className:"!max-h-60 !overflow-y-auto",children:[e.jsx(E,{children:"No agents found."}),e.jsx(P,{children:n.map(s=>e.jsx(L,{value:`${p(s)} ${s.name} ${s.projectPath}`,onSelect:()=>a(s.id),children:e.jsx(R,{agent:s,secondary:k(s.projectPath),selected:s.id===t})},s.id))})]})]})}function x({selectedAgent:n,open:t,onClick:a}){const s=n?w(n):null;return e.jsxs("button",{type:"button","aria-expanded":t,"aria-haspopup":"listbox",className:y("border-input ring-offset-background flex h-9 w-full items-center justify-between rounded-md border bg-transparent px-3 py-2 text-sm shadow-xs transition-colors","focus-visible:ring-ring focus-visible:ring-1 focus-visible:outline-none","hover:bg-accent/50"),onClick:a,children:[n?e.jsxs("span",{className:"flex items-center gap-2 truncate",children:[e.jsx(N,{color:s.color,emoji:s.emoji,size:"xs"}),e.jsx("span",{className:"truncate",children:p(n)})]}):e.jsx("span",{className:"text-muted-foreground",children:"Select an agent…"}),e.jsx(C,{className:"ml-2 size-4 shrink-0 opacity-50"})]})}function $({agents:n,value:t,onValueChange:a}){const[s,o]=l.useState(!1),i=h(),c=l.useRef(null);l.useEffect(()=>{if(!s||i)return;function r(f){c.current&&!c.current.contains(f.target)&&o(!1)}return document.addEventListener("mousedown",r),()=>document.removeEventListener("mousedown",r)},[s,i]);const d=n.find(r=>r.id===t);function m(r){a(r===t?void 0:r),o(!1)}return n.length===0?e.jsxs("div",{className:"rounded-md border px-4 py-6 text-center",children:[e.jsx("p",{className:"text-muted-foreground text-sm",children:"No agents yet"}),e.jsx("p",{className:"text-muted-foreground mt-1 text-xs",children:"Add one from the Team page to give it tasks."})]}):i?e.jsxs(e.Fragment,{children:[e.jsx(x,{selectedAgent:d,open:s,onClick:()=>o(!0)}),e.jsx(j,{open:s,onOpenChange:o,children:e.jsxs(g,{children:[e.jsx(b,{children:e.jsx(v,{children:"Select an agent"})}),e.jsx("div",{className:"px-4 pb-4",children:e.jsx(u,{agents:n,value:t,onSelect:m})})]})})]}):e.jsxs("div",{ref:c,className:"relative w-full",children:[e.jsx(x,{selectedAgent:d,open:s,onClick:()=>o(r=>!r)}),s&&e.jsx("div",{className:"bg-popover text-popover-foreground absolute top-full left-0 z-50 mt-1 w-full rounded-md border shadow-md",children:e.jsx(u,{agents:n,value:t,onSelect:m})})]})}export{$ as A};
@@ -1,4 +1,4 @@
1
- import{O as Oe,a5 as J,at as ze,aT as z,a6 as ln,a7 as fe,a8 as pe,lU as ie,r as p,lV as K,lW as un,j as n,hS as ye,B as S,lX as hn,e as D,G as O,iN as De,Q as Me,T as Ve,C as gn,V as Ke,a1 as mn,j3 as ae,f8 as ce,J as ve,lY as We,lZ as ue,eE as T,gY as qe,a2 as xn,a4 as Se,d0 as fn,hx as pn,hy as yn,l_ as he,l$ as vn,i as jn,iT as Nn,ex as G,ey as Q,ez as H,eA as Y,eB as V,I as ge,m0 as kn,eH as Be,eI as Ue,gy as bn,a0 as Sn,l as Cn,m1 as In,U as wn}from"./index-BwTGkJbK.js";import{c as Ge,d as An,e as Qe,f as $n,g as Rn,h as En,i as _n,j as He,b as Ln,a as Fn,s as Tn}from"./access-copy-D6BUySpp.js";import{a as Pn,b as On,c as zn,d as Dn,e as Mn,f as Vn}from"./use-connector-management-C3CLnOOt.js";import{Q as W}from"./query-error-state-DvhY-YKM.js";import{u as Kn}from"./use-bindings-CltfjAWW.js";import{a as Wn}from"./connection-copy--MA7AN04.js";import{u as qn,a as Bn,K as Ce}from"./KeyEntry-Ctc1zp2J.js";/**
1
+ import{O as Oe,a5 as J,at as ze,aT as z,a6 as ln,a7 as fe,a8 as pe,lV as ie,r as p,lW as K,lX as un,j as n,hS as ye,B as S,lY as hn,e as D,G as O,im as De,Q as Me,T as Ve,C as gn,V as Ke,a1 as mn,j4 as ae,ff as ce,J as ve,lZ as We,l_ as ue,eL as T,h4 as qe,a2 as xn,a4 as Se,c$ as fn,eH as pn,eI as yn,l$ as he,m0 as vn,i as jn,it as Nn,ew as G,ex as Q,ey as H,ez as Y,eA as V,I as ge,m1 as kn,eO as Be,eP as Ue,gH as bn,a0 as Sn,l as Cn,m2 as In,U as wn}from"./index-BYTLOFNS.js";import{c as Ge,d as An,e as Qe,f as $n,g as Rn,h as En,i as _n,j as He,b as Ln,a as Fn,s as Tn}from"./access-copy-w5gryYsO.js";import{a as Pn,b as On,c as zn,d as Dn,e as Mn,f as Vn}from"./use-connector-management-B_RvwV0T.js";import{Q as W}from"./query-error-state-BdmBV0DG.js";import{u as Kn}from"./use-bindings-DVKWBz4y.js";import{a as Wn}from"./connection-copy--MA7AN04.js";import{u as qn,a as Bn,K as Ce}from"./KeyEntry-Z5hKKbef.js";/**
2
2
  * @license lucide-react v1.48.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{j as e,dk as F,dl as U,G as v,_ as f,dm as $,dn as w,Z as b,dp as B,dq as D,dr as W,J as V,r as u,ds as I,B as q,X as J,dt as K,b as Z,e as X,t as Y,g as Q}from"./index-BwTGkJbK.js";import{u as H,P as ee}from"./use-personality-commit-D5b90JPX.js";import"./dorkbot-templates-8Yu9POWJ.js";import"./sound-D3r8dGFH.js";import"./soul-file-BwiyiI5v.js";const te={hidden:{},visible:{transition:{staggerChildren:$.step}}},_={hidden:{opacity:0,scale:.5},visible:{opacity:1,scale:1,transition:w.snap}};function O(){return e.jsx(f.span,{className:"pointer-events-none absolute inset-0 flex items-center justify-center",initial:{scale:0,opacity:1},animate:{scale:1,opacity:0},transition:{duration:.6,ease:[.34,1.56,.64,1]},"aria-hidden":!0,children:e.jsx(V,{className:"size-4 text-white drop-shadow-md",strokeWidth:3})})}function R({celebratory:s,className:t,children:a}){return s?e.jsx(f.div,{className:t,variants:te,initial:"hidden",animate:"visible",children:a}):e.jsx("div",{className:t,children:a})}function A({celebratory:s,children:t}){return s?e.jsx(f.div,{variants:_,children:t}):t}const se=e.jsx("span",{className:"text-3xs leading-none font-bold",children:"A"}),ae="ring-muted-foreground/50 ring-dashed ring-2 ring-offset-2",ne="Select default color";function ie({value:s,autoColor:t,onSelect:a,onHoverChange:i,justSelectedKey:o,celebratory:n=!1,autoIcon:r=se,autoActiveRing:c=ae,autoLabel:d=ne}){const x=s!=null;return e.jsxs(R,{celebratory:n,className:"flex flex-wrap items-center gap-2",children:[e.jsx(A,{celebratory:n,children:e.jsx(T,{active:!x,activeRing:c,color:t,label:d,tooltip:"Unique, derived from agent name",onClick:()=>a(null),onHoverChange:i,justSelected:o==="auto",celebratory:n,children:r})}),e.jsx("div",{className:"bg-border mx-0.5 h-5 w-px"}),F.map(l=>e.jsx(A,{celebratory:n,children:e.jsx(T,{active:s===l.hex,activeRing:"ring-foreground ring-2 ring-offset-2",color:l.hex,label:`Select ${l.name}`,tooltip:l.name,onClick:()=>a(l.hex),onHoverChange:i,justSelected:o===l.hex,celebratory:n})},l.hex))]})}function T({active:s,activeRing:t,color:a,label:i,tooltip:o,tooltipSide:n="bottom",onClick:r,onHoverChange:c,justSelected:d,celebratory:x,children:l}){const h=e.jsxs("button",{type:"button",onClick:r,onMouseEnter:()=>c==null?void 0:c(a),onMouseLeave:()=>c==null?void 0:c(null),className:v("group/swatch relative size-8 rounded-full transition-[scale,box-shadow] duration-150",s?t:"hover:scale-110"),style:{backgroundColor:a},"aria-label":i,children:[l&&e.jsx("span",{className:"bg-background/80 text-foreground absolute inset-0 flex items-center justify-center rounded-full",children:l}),x&&e.jsx("span",{className:"absolute inset-[-4px] -z-10 rounded-full opacity-0 blur-md transition-opacity duration-200 group-hover/swatch:opacity-50",style:{backgroundColor:a},"aria-hidden":!0}),e.jsx(b,{children:d&&e.jsx(O,{})})]});return x?e.jsxs(B,{children:[e.jsx(D,{asChild:!0,children:h}),e.jsx(W,{side:n,className:"text-3xs",children:o})]}):h}function re({value:s,autoEmoji:t,hasOverride:a,onSelect:i,justSelectedKey:o,celebratory:n=!1}){return e.jsx(R,{celebratory:n,className:"grid grid-cols-6 gap-1.5",children:U.map(r=>{const c=r===s,d=r===t&&!a,x=v("relative flex size-9 items-center justify-center rounded-md text-lg transition-colors duration-150",c?v(d?"bg-accent ring-muted-foreground/50 ring-1":"bg-accent ring-foreground ring-1",d&&!n&&"ring-dashed"):"hover:bg-accent/50 active:scale-90");return e.jsx(oe,{celebratory:n,onClick:()=>i(r),className:x,ariaLabel:`Select icon ${r}`,justSelected:o===`emoji-${r}`,children:r},r)})})}function oe({celebratory:s,onClick:t,className:a,ariaLabel:i,justSelected:o,children:n}){const r=e.jsx(b,{children:o&&e.jsx(O,{})});return s?e.jsxs(f.button,{type:"button",onClick:t,className:a,"aria-label":i,variants:_,whileHover:{scale:1.25},whileTap:{scale:.85},transition:w.snap,children:[n,r]}):e.jsxs("button",{type:"button",onClick:t,className:a,"aria-label":i,children:[n,r]})}const ce=e.jsx(K,{className:"size-3"}),le="ring-muted-foreground/50 ring-2 ring-offset-2",ue="Select unique auto-generated color",C="dorkos:avatar-first-customization",de={hidden:{},visible:{transition:{staggerChildren:.04}}},E={hidden:{opacity:0,y:4},visible:{opacity:1,y:0,transition:{duration:.2,ease:"easeOut"}}};function xe(){const[s]=u.useState(()=>Array.from({length:14},(a,i)=>{const o=Math.PI*2*i/14,n=28+Math.random()*20,r=360*i/14;return{x:Math.cos(o)*n,y:Math.sin(o)*n,size:3+Math.random()*3,hue:r,delay:i*.02}}));return e.jsx("div",{className:"pointer-events-none absolute inset-0 z-50 overflow-visible","aria-hidden":!0,children:s.map((t,a)=>e.jsx(f.span,{className:"absolute top-1/2 left-1/2 rounded-full",style:{width:t.size,height:t.size,background:`hsl(${t.hue}, 80%, 70%)`,boxShadow:`0 0 6px hsl(${t.hue}, 80%, 70%)`},initial:{x:"-50%",y:"-50%",scale:0,opacity:1},animate:{x:t.x,y:t.y,scale:1,opacity:0},transition:{duration:.6,ease:"easeOut",delay:t.delay}},a))})}function me({agent:s,onUpdate:t,onPreviewColor:a,title:i,onClose:o}){const n=u.useMemo(()=>I(s.id),[s.id]),r=n.color,c=n.icon,d=s.icon??c,x=s.color!=null,l=s.icon!=null,h=x||l,[y,S]=u.useState(null),p=u.useRef(null),[z,k]=u.useState(!1),N=u.useRef(!1);u.useEffect(()=>()=>{p.current&&clearTimeout(p.current)},[]);const g=u.useCallback(()=>{if(!N.current){try{if(localStorage.getItem(C))return;localStorage.setItem(C,"true")}catch{return}N.current=!0,k(!0),setTimeout(()=>k(!1),800)}},[]),j=u.useCallback(m=>{p.current&&clearTimeout(p.current),S(m),p.current=setTimeout(()=>S(null),600)},[]),P=u.useCallback(()=>{t({color:null,icon:null})},[t]),L=u.useCallback(m=>{t({color:m}),a(null),j(m??"auto"),g()},[t,a,j,g]),M=u.useCallback(m=>{t({icon:m===c?null:m}),j(`emoji-${m}`),g()},[t,c,j,g]),G=u.useCallback(m=>{a(m)},[a]);return e.jsxs("div",{className:"flex flex-1 flex-col overflow-auto","data-testid":"avatar-picker-panel",children:[(i||o||h)&&e.jsxs("div",{className:v("flex items-center justify-between px-4 py-2",(i||o)&&"border-b"),children:[i&&e.jsx("span",{className:"text-xs font-semibold",children:i}),e.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[e.jsx(b,{children:h&&e.jsx(f.button,{type:"button",onClick:P,className:"text-muted-foreground hover:text-foreground text-3xs transition-colors",initial:{opacity:0,x:8},animate:{opacity:1,x:0},exit:{opacity:0,x:8},transition:{duration:.2},children:"Reset to defaults"})}),o&&e.jsx(q,{variant:"ghost",size:"icon-md",className:"size-6",onClick:o,"aria-label":"Close appearance picker",children:e.jsx(J,{className:"size-3.5"})})]})]}),e.jsxs(f.div,{className:"space-y-5 p-4",variants:de,initial:"hidden",animate:"visible",children:[e.jsxs(f.div,{variants:E,children:[e.jsx("div",{className:"text-muted-foreground text-3xs mb-2 font-medium tracking-wider uppercase",children:"Color"}),e.jsx(ie,{value:s.color,autoColor:r,onSelect:L,onHoverChange:G,justSelectedKey:y,celebratory:!0,autoIcon:ce,autoActiveRing:le,autoLabel:ue})]}),e.jsxs(f.div,{variants:E,children:[e.jsx("div",{className:"text-muted-foreground text-3xs mb-2 font-medium tracking-wider uppercase",children:"Icon"}),e.jsx(re,{value:d,autoEmoji:c,hasOverride:l,onSelect:M,justSelectedKey:y,celebratory:!0})]})]}),e.jsx(b,{children:z&&e.jsx(xe,{})})]})}function fe({children:s}){return e.jsx("h3",{className:"text-muted-foreground text-3xs font-medium tracking-wider uppercase",children:s})}function ye({member:s}){const{agent:t,isPending:a,update:i}=Z(s),o=H(t,i),[n,r]=u.useState(null);if(a)return e.jsx(X,{className:"h-64 w-full"});if(!t)return e.jsx("p",{className:"text-muted-foreground text-sm",children:"Couldn’t read this agent’s appearance."});const c=Y(s),d=I(t.id),x=n??t.color??d.color,l=t.icon??d.icon;return e.jsxs("div",{className:"flex flex-col gap-5","data-slot":"profile-appearance",children:[e.jsx("div",{className:"flex justify-center pt-1",children:e.jsx(Q,{size:"lg",kind:c.kind,color:x,emoji:l,fallback:c.fallback,origin:c.origin})}),e.jsx(me,{agent:t,onUpdate:i,onPreviewColor:r}),e.jsxs("div",{className:"space-y-2 border-t pt-4",children:[e.jsx(fe,{children:"Personality"}),e.jsx(ee,{traits:o.traits,onTraitsChange:o.onTraitsChange,compact:!0})]})]})}export{ye as AppearancePage};
1
+ import{j as e,dj as F,dk as U,G as v,_ as f,dl as $,dm as w,Z as b,dn as B,dp as D,dq as W,J as V,r as u,dr as I,B as q,X as J,ds as K,b as Z,e as X,t as Y,g as Q}from"./index-BYTLOFNS.js";import{u as H,P as ee}from"./use-personality-commit-CDMLIF8s.js";import"./dorkbot-templates-8Yu9POWJ.js";import"./sound-D3r8dGFH.js";import"./soul-file-CPL6-cba.js";const te={hidden:{},visible:{transition:{staggerChildren:$.step}}},_={hidden:{opacity:0,scale:.5},visible:{opacity:1,scale:1,transition:w.snap}};function O(){return e.jsx(f.span,{className:"pointer-events-none absolute inset-0 flex items-center justify-center",initial:{scale:0,opacity:1},animate:{scale:1,opacity:0},transition:{duration:.6,ease:[.34,1.56,.64,1]},"aria-hidden":!0,children:e.jsx(V,{className:"size-4 text-white drop-shadow-md",strokeWidth:3})})}function R({celebratory:s,className:t,children:a}){return s?e.jsx(f.div,{className:t,variants:te,initial:"hidden",animate:"visible",children:a}):e.jsx("div",{className:t,children:a})}function A({celebratory:s,children:t}){return s?e.jsx(f.div,{variants:_,children:t}):t}const se=e.jsx("span",{className:"text-3xs leading-none font-bold",children:"A"}),ae="ring-muted-foreground/50 ring-dashed ring-2 ring-offset-2",ne="Select default color";function ie({value:s,autoColor:t,onSelect:a,onHoverChange:i,justSelectedKey:o,celebratory:n=!1,autoIcon:r=se,autoActiveRing:c=ae,autoLabel:d=ne}){const x=s!=null;return e.jsxs(R,{celebratory:n,className:"flex flex-wrap items-center gap-2",children:[e.jsx(A,{celebratory:n,children:e.jsx(T,{active:!x,activeRing:c,color:t,label:d,tooltip:"Unique, derived from agent name",onClick:()=>a(null),onHoverChange:i,justSelected:o==="auto",celebratory:n,children:r})}),e.jsx("div",{className:"bg-border mx-0.5 h-5 w-px"}),F.map(l=>e.jsx(A,{celebratory:n,children:e.jsx(T,{active:s===l.hex,activeRing:"ring-foreground ring-2 ring-offset-2",color:l.hex,label:`Select ${l.name}`,tooltip:l.name,onClick:()=>a(l.hex),onHoverChange:i,justSelected:o===l.hex,celebratory:n})},l.hex))]})}function T({active:s,activeRing:t,color:a,label:i,tooltip:o,tooltipSide:n="bottom",onClick:r,onHoverChange:c,justSelected:d,celebratory:x,children:l}){const h=e.jsxs("button",{type:"button",onClick:r,onMouseEnter:()=>c==null?void 0:c(a),onMouseLeave:()=>c==null?void 0:c(null),className:v("group/swatch relative size-8 rounded-full transition-[scale,box-shadow] duration-150",s?t:"hover:scale-110"),style:{backgroundColor:a},"aria-label":i,children:[l&&e.jsx("span",{className:"bg-background/80 text-foreground absolute inset-0 flex items-center justify-center rounded-full",children:l}),x&&e.jsx("span",{className:"absolute inset-[-4px] -z-10 rounded-full opacity-0 blur-md transition-opacity duration-200 group-hover/swatch:opacity-50",style:{backgroundColor:a},"aria-hidden":!0}),e.jsx(b,{children:d&&e.jsx(O,{})})]});return x?e.jsxs(B,{children:[e.jsx(D,{asChild:!0,children:h}),e.jsx(W,{side:n,className:"text-3xs",children:o})]}):h}function re({value:s,autoEmoji:t,hasOverride:a,onSelect:i,justSelectedKey:o,celebratory:n=!1}){return e.jsx(R,{celebratory:n,className:"grid grid-cols-6 gap-1.5",children:U.map(r=>{const c=r===s,d=r===t&&!a,x=v("relative flex size-9 items-center justify-center rounded-md text-lg transition-colors duration-150",c?v(d?"bg-accent ring-muted-foreground/50 ring-1":"bg-accent ring-foreground ring-1",d&&!n&&"ring-dashed"):"hover:bg-accent/50 active:scale-90");return e.jsx(oe,{celebratory:n,onClick:()=>i(r),className:x,ariaLabel:`Select icon ${r}`,justSelected:o===`emoji-${r}`,children:r},r)})})}function oe({celebratory:s,onClick:t,className:a,ariaLabel:i,justSelected:o,children:n}){const r=e.jsx(b,{children:o&&e.jsx(O,{})});return s?e.jsxs(f.button,{type:"button",onClick:t,className:a,"aria-label":i,variants:_,whileHover:{scale:1.25},whileTap:{scale:.85},transition:w.snap,children:[n,r]}):e.jsxs("button",{type:"button",onClick:t,className:a,"aria-label":i,children:[n,r]})}const ce=e.jsx(K,{className:"size-3"}),le="ring-muted-foreground/50 ring-2 ring-offset-2",ue="Select unique auto-generated color",C="dorkos:avatar-first-customization",de={hidden:{},visible:{transition:{staggerChildren:.04}}},E={hidden:{opacity:0,y:4},visible:{opacity:1,y:0,transition:{duration:.2,ease:"easeOut"}}};function xe(){const[s]=u.useState(()=>Array.from({length:14},(a,i)=>{const o=Math.PI*2*i/14,n=28+Math.random()*20,r=360*i/14;return{x:Math.cos(o)*n,y:Math.sin(o)*n,size:3+Math.random()*3,hue:r,delay:i*.02}}));return e.jsx("div",{className:"pointer-events-none absolute inset-0 z-50 overflow-visible","aria-hidden":!0,children:s.map((t,a)=>e.jsx(f.span,{className:"absolute top-1/2 left-1/2 rounded-full",style:{width:t.size,height:t.size,background:`hsl(${t.hue}, 80%, 70%)`,boxShadow:`0 0 6px hsl(${t.hue}, 80%, 70%)`},initial:{x:"-50%",y:"-50%",scale:0,opacity:1},animate:{x:t.x,y:t.y,scale:1,opacity:0},transition:{duration:.6,ease:"easeOut",delay:t.delay}},a))})}function me({agent:s,onUpdate:t,onPreviewColor:a,title:i,onClose:o}){const n=u.useMemo(()=>I(s.id),[s.id]),r=n.color,c=n.icon,d=s.icon??c,x=s.color!=null,l=s.icon!=null,h=x||l,[y,S]=u.useState(null),p=u.useRef(null),[z,k]=u.useState(!1),N=u.useRef(!1);u.useEffect(()=>()=>{p.current&&clearTimeout(p.current)},[]);const g=u.useCallback(()=>{if(!N.current){try{if(localStorage.getItem(C))return;localStorage.setItem(C,"true")}catch{return}N.current=!0,k(!0),setTimeout(()=>k(!1),800)}},[]),j=u.useCallback(m=>{p.current&&clearTimeout(p.current),S(m),p.current=setTimeout(()=>S(null),600)},[]),P=u.useCallback(()=>{t({color:null,icon:null})},[t]),L=u.useCallback(m=>{t({color:m}),a(null),j(m??"auto"),g()},[t,a,j,g]),M=u.useCallback(m=>{t({icon:m===c?null:m}),j(`emoji-${m}`),g()},[t,c,j,g]),G=u.useCallback(m=>{a(m)},[a]);return e.jsxs("div",{className:"flex flex-1 flex-col overflow-auto","data-testid":"avatar-picker-panel",children:[(i||o||h)&&e.jsxs("div",{className:v("flex items-center justify-between px-4 py-2",(i||o)&&"border-b"),children:[i&&e.jsx("span",{className:"text-xs font-semibold",children:i}),e.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[e.jsx(b,{children:h&&e.jsx(f.button,{type:"button",onClick:P,className:"text-muted-foreground hover:text-foreground text-3xs transition-colors",initial:{opacity:0,x:8},animate:{opacity:1,x:0},exit:{opacity:0,x:8},transition:{duration:.2},children:"Reset to defaults"})}),o&&e.jsx(q,{variant:"ghost",size:"icon-md",className:"size-6",onClick:o,"aria-label":"Close appearance picker",children:e.jsx(J,{className:"size-3.5"})})]})]}),e.jsxs(f.div,{className:"space-y-5 p-4",variants:de,initial:"hidden",animate:"visible",children:[e.jsxs(f.div,{variants:E,children:[e.jsx("div",{className:"text-muted-foreground text-3xs mb-2 font-medium tracking-wider uppercase",children:"Color"}),e.jsx(ie,{value:s.color,autoColor:r,onSelect:L,onHoverChange:G,justSelectedKey:y,celebratory:!0,autoIcon:ce,autoActiveRing:le,autoLabel:ue})]}),e.jsxs(f.div,{variants:E,children:[e.jsx("div",{className:"text-muted-foreground text-3xs mb-2 font-medium tracking-wider uppercase",children:"Icon"}),e.jsx(re,{value:d,autoEmoji:c,hasOverride:l,onSelect:M,justSelectedKey:y,celebratory:!0})]})]}),e.jsx(b,{children:z&&e.jsx(xe,{})})]})}function fe({children:s}){return e.jsx("h3",{className:"text-muted-foreground text-3xs font-medium tracking-wider uppercase",children:s})}function ye({member:s}){const{agent:t,isPending:a,update:i}=Z(s),o=H(t,i),[n,r]=u.useState(null);if(a)return e.jsx(X,{className:"h-64 w-full"});if(!t)return e.jsx("p",{className:"text-muted-foreground text-sm",children:"Couldn’t read this agent’s appearance."});const c=Y(s),d=I(t.id),x=n??t.color??d.color,l=t.icon??d.icon;return e.jsxs("div",{className:"flex flex-col gap-5","data-slot":"profile-appearance",children:[e.jsx("div",{className:"flex justify-center pt-1",children:e.jsx(Q,{size:"lg",kind:c.kind,color:x,emoji:l,fallback:c.fallback,origin:c.origin})}),e.jsx(me,{agent:t,onUpdate:i,onPreviewColor:r}),e.jsxs("div",{className:"space-y-2 border-t pt-4",children:[e.jsx(fe,{children:"Personality"}),e.jsx(ee,{traits:o.traits,onTraitsChange:o.onTraitsChange,compact:!0})]})]})}export{ye as AppearancePage};
@@ -0,0 +1 @@
1
+ import{a5 as A,a6 as C,h1 as x,h2 as k,a7 as R,a8 as T,aJ as j,h3 as D,dR as E,j as n,by as I,bz as N,G as P,bA as L,bC as _,r as B,d2 as F,d3 as q,d5 as O,d6 as K,d7 as M,e_ as W,h4 as z,eL as Q,d$ as U,B as p}from"./index-BYTLOFNS.js";import{s as H}from"./trust-dial-tuMHO5Ug.js";function Z(){const e=A();return C({queryKey:x.overview(),queryFn:()=>e.getPermissions()})}function ee(e,s){const a=new Set(e.filesAndCommands.followingAgentIds);if(s.kind==="files")return a.size;const t=e.exceptions.filter(r=>r.action===void 0),o=new Set;if(s.kind==="preset"){const r=new Map;for(const c of t){const l=r.get(c.agentId)??new Set;l.add(c.area),r.set(c.agentId,l)}for(const[c,l]of r)l.size>=k.length&&!a.has(c)&&o.add(c)}else{for(const r of t)r.area===s.area&&o.add(r.agentId);if(s.kind==="action")for(const r of e.exceptions)r.action===s.action&&o.add(r.agentId)}return Math.max(0,e.agentCount-o.size)}function se(e){return`affects ${e} ${e===1?"agent":"agents"}`}function te(e){const s=A(),a=R();return T({mutationFn:async t=>{if(t.kind==="preset"){if(e.kind!=="default")throw new Error("A preset is chosen for everyone.");return s.setPermissionPreset({preset:t.preset,surface:t.surface,...t.applyToAgents?{applyToAgents:t.applyToAgents}:{}})}const o={...t.areas?{areas:t.areas}:{},...t.actions?{actions:t.actions}:{},surface:t.surface};return e.kind==="agent"?s.patchAgentPermissions(e.agentId,{...o,...t.filesAndCommands!==void 0?{filesAndCommands:t.filesAndCommands}:{}}):s.patchPermissionDefaults({...o,...t.applyToAgents?{applyToAgents:t.applyToAgents}:{}})},onSettled:()=>{a.invalidateQueries({queryKey:x.all}),a.invalidateQueries({queryKey:["mesh","agents"]}),a.invalidateQueries({queryKey:j.all})}})}const g={blocked:"Blocked",ask:"Ask",allowed:"Allowed"},v={careful:"Careful",balanced:"Balanced",full:"Full power",trusted:"Trusted"},ne={careful:"Agents ask before they change anything, and can’t reach outside DorkOS.",balanced:"Agents run their rooms and ask before anything wider.",full:"Agents do everyday work alone and ask before installs or settings changes.",trusted:"Agents work on their own, and everything they do is recorded."};function ae(e,s){switch(e){case"default-area":case"default-action":return"Changed from your preset";case"preset":return`From ${v[s??"trusted"]}`;case"floor":return"Never Allowed";case"always-asks":return"Always asks, so you see the change first";default:return""}}const oe="Blocked stops agents that follow the rules. It isn’t a sandbox.",re=["Rules limit tools, not what an agent can see in its own folder.","Keep secrets outside it."];function ie(e){switch(e){case"agent":return"Set for this agent";case"runtime":return"Set in Settings → Runtimes";case"default":return"The setting everyone has";case"runtime-own":return"Not set, so each AI tool uses its own default"}}function w(e){return`the default (${v[e??"trusted"]})`}function ce(e){const s=g[e.state],a=e.agentName??"this agent";switch(e.source){case"inactive":return"Blocked, because this agent’s access was turned off.";case"floor":return`${s}. This area is locked, so it’s never Allowed.`;case"always-asks":return e.fromExtension?`${s}. Extension tools that can delete things always ask.`:`${s}. It always shows you the change first, so it’s never Allowed.`}if(e.destructiveAsk)return"Ask. Actions that run someone else’s code ask unless set one by one.";switch(e.source){case"agent-area":return`${s}, set for ${a}.`;case"agent-action":return`${s}, set for this one action on ${a}.`;case"default-area":return`${s} for everyone, changed from ${w(e.preset)}.`;case"default-action":return`${s} for everyone, set for this one action.`;case"preset":return`${s}, from ${w(e.preset)}.`}}function le(e,s,a){const t=e?H(e):null;switch(s){case"agent":return`${t}, set for ${a??"this agent"}.`;case"runtime":return`${t}, set in Settings → Runtimes.`;case"default":return`${t}, the setting everyone has.`;case"runtime-own":return"Not set, so each AI tool uses its own default."}}const G={settings:" in Settings","agent-page":" on the agent’s page","control-center":" in the Control Center","request-card":" from a request card","first-run":" during setup","agent-request":" from an agent's request",api:" through the API",cli:" from the command line",upgrade:"",undo:" with Undo","file-edit":""};function J(e){return new Date(e).toLocaleDateString(void 0,{month:"short",day:"numeric"})}function X(e){if(!e)return null;const s=`on ${J(e.occurredAt)}`,a=G[e.surface];switch(e.attribution){case"signed-in":return`Changed by ${e.actorLabel.charAt(0).toLowerCase()+e.actorLabel.slice(1)} ${s}${a}.`;case"local-trust":return`Changed ${s}${a}. With login off, who is unknown.`;case"agent-request-approved":return`Changed ${s}: ${e.actorLabel}.`;case"agent":return`Changed by ${e.actorLabel} ${s}.`;case"upgrade":return`Set by an upgrade ${s}.`;case"outside":return`Changed outside DorkOS ${s}, in the agent’s settings file.`}}function de(e){D(e)||E.error(e instanceof Error&&e.message?e.message:"Couldn’t save that change. Try again.")}function ue({question:e,sentence:s,lastChange:a,className:t}){const o=X(a);return n.jsxs(I,{children:[n.jsx(N,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":e,className:P("text-muted-foreground hover:text-foreground focus-visible:ring-ring inline rounded-sm py-2 text-xs underline decoration-dotted underline-offset-2 transition-colors focus-visible:ring-2 focus-visible:outline-none md:py-0",t),children:"Why?"})}),n.jsxs(L,{className:"w-72 space-y-1.5",align:"start",children:[n.jsx(_,{className:"text-sm font-medium",children:e}),n.jsx("p",{className:"text-sm","data-testid":"permission-why-source",children:s}),o?n.jsx("p",{className:"text-muted-foreground text-xs","data-testid":"permission-why-change",children:o}):null]})]})}function fe({open:e,onCancel:s,subject:a,title:t,next:o,agents:r,affectedCount:c,onKeep:l,onUpdate:S,pending:m=!1}){const[u,f]=B.useState(new Set),b=o in g?g[o]:o,y=r.length,$=(i,h)=>{const d=new Set(u);h?d.add(i):d.delete(i),f(d)};return n.jsx(F,{open:e,onOpenChange:i=>{i||(f(new Set),s())},children:n.jsxs(q,{className:"!min-h-0 sm:max-w-md",children:[n.jsxs(O,{children:[n.jsx(K,{children:t??`Set ${a} to ${b} for everyone?`}),n.jsxs(M,{children:[y===1?"1 agent is":`${y} agents are`," set differently. Pick any that should follow."]})]}),n.jsxs(W,{className:"space-y-3",children:[n.jsx("ul",{className:"space-y-2","aria-label":"Agents set differently",children:r.map(i=>{const h=`apply-${i.agentId}`;return n.jsxs("li",{className:"flex items-center gap-2",children:[n.jsx(z,{id:h,checked:u.has(i.agentId),onCheckedChange:d=>$(i.agentId,d===!0)}),n.jsxs(Q,{htmlFor:h,className:"text-sm font-normal",children:[i.agentName,": ",i.detail]})]},i.agentId)})}),n.jsxs("p",{className:"text-muted-foreground text-sm",children:["This affects ",c," ",c===1?"agent":"agents"," now."]})]}),n.jsxs(U,{className:"gap-2",children:[n.jsx(p,{variant:"outline",onClick:()=>{f(new Set),l()},disabled:m,children:"Keep their settings"}),n.jsx(p,{onClick:()=>{const i=[...u];f(new Set),S(i)},disabled:m||u.size===0,children:"Update selected"})]})]})})}export{fe as A,oe as B,ue as P,re as R,g as S,te as a,le as b,ee as c,se as d,v as e,ie as f,ae as g,ne as h,X as l,de as r,ce as s,Z as u};
@@ -1 +1 @@
1
- import{av as o,aw as c,j as t,_ as d,G as s,a4 as m,ax as u,B as x}from"./index-BwTGkJbK.js";const l={initial:{opacity:0,y:8},animate:{opacity:1,y:0}};function h({signal:e}){const r=o(),n=c(e.since),a=e.kind==="error",i=a?m:u;return t.jsxs(d.div,{variants:l,"data-slot":"attention-signal-row",className:"hover:bg-accent/50 flex min-w-0 items-center gap-2.5 rounded-md px-2 py-1 transition-colors",children:[t.jsx("span",{className:s("size-1.5 shrink-0 rounded-full",a?"bg-status-error":"bg-status-warning"),"aria-hidden":!0}),t.jsx(i,{className:s("size-3.5 shrink-0",a?"text-status-error/70":"text-status-warning-fg"),"aria-hidden":!0}),t.jsxs("span",{className:"text-foreground/90 min-w-0 flex-1 truncate text-xs",children:[e.primary,e.secondary!==void 0&&t.jsxs("span",{className:"text-muted-foreground",children:[" · ",e.secondary]})]}),t.jsx("span",{className:"text-muted-foreground shrink-0 text-xs tabular-nums",children:n}),t.jsx(x,{variant:"ghost",size:"sm",className:"relative h-6 shrink-0 px-2 text-xs after:absolute after:-inset-3 md:after:hidden","aria-label":`Open ${e.primary}`,onClick:()=>void r.navigate({href:e.deepLink}),children:"Open →"})]})}export{h as A};
1
+ import{av as o,aw as c,j as t,_ as d,G as s,a4 as m,ax as u,B as x}from"./index-BYTLOFNS.js";const l={initial:{opacity:0,y:8},animate:{opacity:1,y:0}};function h({signal:e}){const r=o(),n=c(e.since),a=e.kind==="error",i=a?m:u;return t.jsxs(d.div,{variants:l,"data-slot":"attention-signal-row",className:"hover:bg-accent/50 flex min-w-0 items-center gap-2.5 rounded-md px-2 py-1 transition-colors",children:[t.jsx("span",{className:s("size-1.5 shrink-0 rounded-full",a?"bg-status-error":"bg-status-warning"),"aria-hidden":!0}),t.jsx(i,{className:s("size-3.5 shrink-0",a?"text-status-error/70":"text-status-warning-fg"),"aria-hidden":!0}),t.jsxs("span",{className:"text-foreground/90 min-w-0 flex-1 truncate text-xs",children:[e.primary,e.secondary!==void 0&&t.jsxs("span",{className:"text-muted-foreground",children:[" · ",e.secondary]})]}),t.jsx("span",{className:"text-muted-foreground shrink-0 text-xs tabular-nums",children:n}),t.jsx(x,{variant:"ghost",size:"sm",className:"relative h-6 shrink-0 px-2 text-xs after:absolute after:-inset-3 md:after:hidden","aria-label":`Open ${e.primary}`,onClick:()=>void r.navigate({href:e.deepLink}),children:"Open →"})]})}export{h as A};