limixbot 0.3.31 → 0.3.32

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 (137) hide show
  1. package/dist/assets/{ActivityPanel-DPKaOxwD.js → ActivityPanel-DTPq6b6A.js} +1 -1
  2. package/dist/assets/{App-CXIAAQw4.js → App-Bj6vt28W.js} +10 -10
  3. package/dist/assets/{AppEventEditor-BYUFU-RF.js → AppEventEditor-CIN9KfeN.js} +1 -1
  4. package/dist/assets/{BotSettingsDialog-CNzHxE5T.js → BotSettingsDialog-CiDt0xV-.js} +1 -1
  5. package/dist/assets/{BrowserPanel-BvycPh9Q.js → BrowserPanel-CYEYQdY9.js} +1 -1
  6. package/dist/assets/{BrowserProfilesManager-C-DSmpiF.js → BrowserProfilesManager-BZviBIr_.js} +1 -1
  7. package/dist/assets/{CloudAddDialog-C65BNNxP.js → CloudAddDialog-CKOoPJ3V.js} +1 -1
  8. package/dist/assets/{ComputerFilesPane-y6L4ZrAL.js → ComputerFilesPane-DIDi3dyq.js} +1 -1
  9. package/dist/assets/{ComputerPanel-C8ncdcmm.js → ComputerPanel-CIfRLDu5.js} +2 -2
  10. package/dist/assets/{DataPanel-B42JmnxF.js → DataPanel-Cg_iZFBB.js} +1 -1
  11. package/dist/assets/{DesktopViewer-DbEC8oPW.js → DesktopViewer-CdrtMd2T.js} +1 -1
  12. package/dist/assets/{FilesView-BWruPNny.js → FilesView-DnL4MjaW.js} +1 -1
  13. package/dist/assets/{GrokMoveDialog-c5X1j8au.js → GrokMoveDialog-C6j6PaOl.js} +1 -1
  14. package/dist/assets/{InspectorPanel-BjMcrEJ5.js → InspectorPanel-AS99t3t_.js} +1 -1
  15. package/dist/assets/{KeyboardShortcutsModal-epRIaVPK.js → KeyboardShortcutsModal-B9MXqWn_.js} +1 -1
  16. package/dist/assets/{LiveDesktop-B6kJJHn8.js → LiveDesktop-CeMAfpqi.js} +1 -1
  17. package/dist/assets/{LocalVmWorkspace-BiZhg9qH.js → LocalVmWorkspace-BjpJidzP.js} +1 -1
  18. package/dist/assets/{MacLocalControl-D7ByxpUV.js → MacLocalControl-10Me_JS2.js} +1 -1
  19. package/dist/assets/{MarkdownFilePreview-BIrbvZT_.js → MarkdownFilePreview-BqtpdMVD.js} +1 -1
  20. package/dist/assets/{MenuMotion-Dj4rtEj4.js → MenuMotion-DEol1e9x.js} +1 -1
  21. package/dist/assets/{NewBotDialog-B9SBavIN.js → NewBotDialog-VLJL3Wg1.js} +1 -1
  22. package/dist/assets/{PhoneAppDialog-U09W36YX.js → PhoneAppDialog-DA5gvq4c.js} +1 -1
  23. package/dist/assets/{PlacesRail-bn7tEIBM.js → PlacesRail-CLjAh1E0.js} +1 -1
  24. package/dist/assets/{PluginsPanel-Cc7XMnL0.js → PluginsPanel-vWuf5IUu.js} +1 -1
  25. package/dist/assets/{ProIntroduction--tZnt9fj.js → ProIntroduction-Di0HbUFO.js} +1 -1
  26. package/dist/assets/{RemoteAgentSettingsPanel-lr4-06Ct.js → RemoteAgentSettingsPanel-Cfw7teQ2.js} +1 -1
  27. package/dist/assets/{RoomPanel-Dc2iAV1X.js → RoomPanel-Beu1uKue.js} +1 -1
  28. package/dist/assets/{RoutinesPage-0ilXXAQg.js → RoutinesPage-B2nYtQla.js} +1 -1
  29. package/dist/assets/SettingsModal-CxvxkC4x.js +19 -0
  30. package/dist/assets/{ShareTeamDialog-O9ZwVnKj.js → ShareTeamDialog-CIgmHhv0.js} +1 -1
  31. package/dist/assets/{SignedInSites-BlnZihVe.js → SignedInSites-DdJipkZg.js} +1 -1
  32. package/dist/assets/{TeamLibraryPanel-BLrCrURN.js → TeamLibraryPanel-BbDoilAy.js} +1 -1
  33. package/dist/assets/{TeamMapPage-DIVPsZwZ.js → TeamMapPage-BdJoToiU.js} +1 -1
  34. package/dist/assets/{TriggersPage-b2SXuCPa.js → TriggersPage-tsPRVnW8.js} +1 -1
  35. package/dist/assets/{VisibilitySection-BjcUdV_p.js → VisibilitySection-DtqlyqWE.js} +1 -1
  36. package/dist/assets/{WebhookTrigger-BBi06Y-c.js → WebhookTrigger-uKcCBfwA.js} +1 -1
  37. package/dist/assets/{WorksOnGrid-B5p2GXxB.js → WorksOnGrid-W7nCND-A.js} +1 -1
  38. package/dist/assets/{abnfDiagram-YUKMZFIV-BcUIfOEe.js → abnfDiagram-YUKMZFIV-1x7ZPsZh.js} +1 -1
  39. package/dist/assets/{activity-BNFKxy1b.js → activity-GpccG6_T.js} +1 -1
  40. package/dist/assets/{architectureDiagram-47P4ROYG-C7ht62Bt.js → architectureDiagram-47P4ROYG-DPgLYL_N.js} +1 -1
  41. package/dist/assets/{blockDiagram-E7TT5TSB-CaczmOHs.js → blockDiagram-E7TT5TSB-B8UWaM8D.js} +1 -1
  42. package/dist/assets/{c4Diagram-CRA5TL53-DSPaJBwh.js → c4Diagram-CRA5TL53-PhITusI3.js} +1 -1
  43. package/dist/assets/{calendar-days-DU-aFzFs.js → calendar-days-P76kOKJY.js} +1 -1
  44. package/dist/assets/channel-CJO5KL4z.js +1 -0
  45. package/dist/assets/{chunk-2Q5K7J3B-D4erYHrR.js → chunk-2Q5K7J3B-C-oGd3d2.js} +1 -1
  46. package/dist/assets/{chunk-5VM5RSS4-D8syTc7K.js → chunk-5VM5RSS4-CVMG7tfk.js} +1 -1
  47. package/dist/assets/{chunk-7TKQ45FW-qZ8vN88Y.js → chunk-7TKQ45FW-DIyFSChV.js} +1 -1
  48. package/dist/assets/{chunk-AW2ZBBNX-COZ0RY0p.js → chunk-AW2ZBBNX-C3UOIXSH.js} +1 -1
  49. package/dist/assets/{chunk-FVRAUYC3-B9WP6gNL.js → chunk-FVRAUYC3-DVAx09Rs.js} +2 -2
  50. package/dist/assets/{chunk-HTAEGDNF-DpLxKDYN.js → chunk-HTAEGDNF-BI4rDzDQ.js} +1 -1
  51. package/dist/assets/{chunk-JWPE2WC7-CyI6_v_4.js → chunk-JWPE2WC7-B6xY9PZq.js} +1 -1
  52. package/dist/assets/{chunk-KQW6MTUR-C3xLM0DV.js → chunk-KQW6MTUR-ws1ilD7-.js} +1 -1
  53. package/dist/assets/{chunk-XXDRQBXY-C7oc9LKJ.js → chunk-XXDRQBXY-BwfcVKlj.js} +1 -1
  54. package/dist/assets/{classDiagram-v2-K4WV4PDN-DtYcyxMZ.js → classDiagram-v2-K4WV4PDN-DPeRWn_e.js} +1 -1
  55. package/dist/assets/{coins-C8BnHs7A.js → coins-VtDzkYpc.js} +1 -1
  56. package/dist/assets/{core-8c5YWRlC.js → core-CV44ZFYc.js} +1 -1
  57. package/dist/assets/{cose-bilkent-JH36ORCC-BACClH_n.js → cose-bilkent-JH36ORCC-CR5hRFOZ.js} +1 -1
  58. package/dist/assets/{cynefin-EF2NZ3EQ-DZo-gx9_.js → cynefin-EF2NZ3EQ-BdW2wt4-.js} +1 -1
  59. package/dist/assets/{cynefinDiagram-3GCD6N5R-CB9Tufy-.js → cynefinDiagram-3GCD6N5R-EhtqWRNM.js} +1 -1
  60. package/dist/assets/{dagre-W4DXFKR2-QmMefB-F.js → dagre-W4DXFKR2-Di0n1jqp.js} +1 -1
  61. package/dist/assets/{diagram-2UJZ2QOL-BB9UdSXb.js → diagram-2UJZ2QOL-CgMGoKY7.js} +1 -1
  62. package/dist/assets/{diagram-OVF4WLC6-BT1xV_u3.js → diagram-OVF4WLC6-BXlgzlCn.js} +1 -1
  63. package/dist/assets/{diagram-PFPMY2P6-Bb8Gcrwm.js → diagram-PFPMY2P6-CdQkKIW8.js} +1 -1
  64. package/dist/assets/{diagram-UMYRVEAY-CuhVtw_K.js → diagram-UMYRVEAY-DZl5kJRn.js} +1 -1
  65. package/dist/assets/{diagram-YEKJPTXX-BKeM2V-v.js → diagram-YEKJPTXX-Bzz0W_ze.js} +1 -1
  66. package/dist/assets/{diagram-ZIFT7M5P-CWJdSX39.js → diagram-ZIFT7M5P-CMS1E0WQ.js} +1 -1
  67. package/dist/assets/{ebnfDiagram-VR2GEFS7-CQt0qwgC.js → ebnfDiagram-VR2GEFS7-DoPCvtki.js} +1 -1
  68. package/dist/assets/{elk-IJKZMXRS-DTpYboxu.js → elk-IJKZMXRS-Bj-Bb2qu.js} +1 -1
  69. package/dist/assets/{erDiagram-O2IAPWRE-CRmD7TiT.js → erDiagram-O2IAPWRE-CB5nst9m.js} +1 -1
  70. package/dist/assets/{file-up-DA-MGVqh.js → file-up-C-A7EgY2.js} +1 -1
  71. package/dist/assets/{flowDiagram-OXPTDLAJ-C3OIuz51.js → flowDiagram-OXPTDLAJ-CCgbFCEu.js} +1 -1
  72. package/dist/assets/{ganttDiagram-R7TSEDQI-DRztzQgb.js → ganttDiagram-R7TSEDQI-DQVyHiAx.js} +1 -1
  73. package/dist/assets/{gitGraphDiagram-XJZIOB7I-DljlrTI8.js → gitGraphDiagram-XJZIOB7I-jS2mWNam.js} +1 -1
  74. package/dist/assets/{import-name-BCsjPBcL.js → import-name-X30o5z1B.js} +1 -1
  75. package/dist/assets/{index-CdcrwTp5.js → index-D8oAKMU6.js} +2 -2
  76. package/dist/assets/{index-DJmQoZKd.js → index-SxUH0lfM.js} +1 -1
  77. package/dist/assets/{infoDiagram-5W2HQ5XZ-sZgtYSBR.js → infoDiagram-5W2HQ5XZ-DzRRVnLP.js} +1 -1
  78. package/dist/assets/{ishikawaDiagram-K3B6WC7H-C3hf18HZ.js → ishikawaDiagram-K3B6WC7H-BHZdIugB.js} +1 -1
  79. package/dist/assets/{journeyDiagram-COXZFDF6-Cx7iVI1Y.js → journeyDiagram-COXZFDF6-DNwsxsaw.js} +1 -1
  80. package/dist/assets/{kanban-definition-P3RFRI5V-BCfPOAwE.js → kanban-definition-P3RFRI5V-DpBOTH95.js} +1 -1
  81. package/dist/assets/{mcp-servers-Dz1aRDIp.js → mcp-servers-DjbULZwc.js} +1 -1
  82. package/dist/assets/{mermaid.core-u5mM9R6c.js → mermaid.core-DuHmv3Xq.js} +4 -4
  83. package/dist/assets/{mindmap-definition-LZFPQGKD-Bl1ss-w7.js → mindmap-definition-LZFPQGKD-BBiNJgPA.js} +1 -1
  84. package/dist/assets/{minimize-CQhJEKJt.js → minimize-CRS6u26E.js} +1 -1
  85. package/dist/assets/{monitor-DUalxLhV.js → monitor-CyzqeASh.js} +1 -1
  86. package/dist/assets/{new-bot-CnIvjdzz.js → new-bot-Bs8pJ7Bw.js} +1 -1
  87. package/dist/assets/{org-library-BIflpykR.js → org-library-CC1En5aB.js} +1 -1
  88. package/dist/assets/{package-format-BwQBEF2h.js → package-format-BCGzeYHa.js} +1 -1
  89. package/dist/assets/{pegDiagram-BGZESJAR-DYVS4bK_.js → pegDiagram-BGZESJAR-DqEbd745.js} +1 -1
  90. package/dist/assets/{pieDiagram-CAPJLFHJ-Dd2OI03J.js → pieDiagram-CAPJLFHJ-D9U2FmuX.js} +1 -1
  91. package/dist/assets/{quadrantDiagram-GDMTTRAM-DftvCum7.js → quadrantDiagram-GDMTTRAM-PKCaSgAj.js} +1 -1
  92. package/dist/assets/{rail-5xabqdtQ.js → rail-DKRV3i4L.js} +1 -1
  93. package/dist/assets/{railroadDiagram-SM67HX2B-CMUXYZoX.js → railroadDiagram-SM67HX2B-DqwQrNIl.js} +1 -1
  94. package/dist/assets/{remote-desktop-panel-Doj97m8r.js → remote-desktop-panel-B3m0CdWN.js} +1 -1
  95. package/dist/assets/{requirementDiagram-X7JNWC4A-TUFFobBi.js → requirementDiagram-X7JNWC4A-DyFQPw-w.js} +1 -1
  96. package/dist/assets/{sankeyDiagram-UM26HJRW-BoWUtM1O.js → sankeyDiagram-UM26HJRW-D_-3g90K.js} +1 -1
  97. package/dist/assets/{sequenceDiagram-ZO4K6R2Y-BJGhu1J3.js → sequenceDiagram-ZO4K6R2Y-BxkfrM9A.js} +1 -1
  98. package/dist/assets/{sizeCapture-INFHLROL-BjWOwFei.js → sizeCapture-INFHLROL-VDgtfHsZ.js} +1 -1
  99. package/dist/assets/{stateDiagram-v2-TBUQTH76-BHnqACBE.js → stateDiagram-v2-TBUQTH76-ey-mFs--.js} +1 -1
  100. package/dist/assets/{styles-DnwnyZpR.js → styles-Dd_7YOJG.js} +3 -3
  101. package/dist/assets/{swimlanes-N4OXWK64-w7Jh9mLp.js → swimlanes-N4OXWK64-DYpwISFq.js} +1 -1
  102. package/dist/assets/swimlanesDiagram-K3J5GTZL-BNLJTe-b.js +8 -0
  103. package/dist/assets/{team-share-iEP9Zjr-.js → team-share-CVqY6tnj.js} +1 -1
  104. package/dist/assets/{timeline-definition-YOQAKGHF-D0trOSBD.js → timeline-definition-YOQAKGHF-D9iKG2OF.js} +1 -1
  105. package/dist/assets/{usecaseDiagram-VIAY4XPW-A_NiPbx_.js → usecaseDiagram-VIAY4XPW-Bfbw61-j.js} +1 -1
  106. package/dist/assets/{vennDiagram-BLWOH2XV-iEyMv06N.js → vennDiagram-BLWOH2XV-DYVrjpQ_.js} +1 -1
  107. package/dist/assets/{vi-C-E3a4Tv.js → vi-DrsTFzsG.js} +2 -2
  108. package/dist/assets/{wardleyDiagram-YMQ3BMBF-yIcnyDG1.js → wardleyDiagram-YMQ3BMBF-3Aod1B1D.js} +1 -1
  109. package/dist/assets/{xychartDiagram-TAQBALBS-BbKfuPA4.js → xychartDiagram-TAQBALBS-BgJsKil4.js} +1 -1
  110. package/dist/index.html +2 -2
  111. package/dist/rail.html +4 -4
  112. package/dist-server/index.js +695 -692
  113. package/dist-server/package.json +1 -1
  114. package/dist-server/server/limix-hub-download.js +8 -0
  115. package/dist-server/server/limix-skill-hub.js +3 -2
  116. package/dist-server/server/limix-transfer-version.js +36 -0
  117. package/dist-server/server/workspace-backup-http.js +2 -2
  118. package/dist-server/server/workspace-backup.js +6 -10
  119. package/dist-server/workspace-backup.worker.js +19 -18
  120. package/package.json +1 -1
  121. package/skills/agent-reach/references/capabilities.md +19 -26
  122. package/skills/agent-reach/references/maintenance.md +11 -11
  123. package/skills/agent-reach/references/sessions.md +32 -41
  124. package/skills/rea-video/SKILL.md +35 -96
  125. package/skills/rea-video/references/audio.md +21 -87
  126. package/skills/rea-video/references/materials.md +9 -28
  127. package/skills/rea-video/references/memory.md +5 -6
  128. package/skills/rea-video/references/output-template.md +17 -46
  129. package/skills/rea-video/references/remake.md +23 -35
  130. package/skills/rea-video/references/review.md +16 -36
  131. package/skills/rea-video/references/setup.md +21 -40
  132. package/skills/rea-video/references/taxonomy.md +39 -137
  133. package/skills/windows-computer-automation/SKILL.md +1 -1
  134. package/skills/windows-computer-automation/assets/HERIONIX-LEADER-PROMPT.md +12 -22
  135. package/dist/assets/SettingsModal-DOQo4UPP.js +0 -19
  136. package/dist/assets/channel-BXNHTVIL.js +0 -1
  137. package/dist/assets/swimlanesDiagram-K3J5GTZL-zIHpuU63.js +0 -8
@@ -1 +1 @@
1
- import{r as o,j as e,t as a,X as D,a as p,L as A,g as H}from"./styles-DnwnyZpR.js";import{c as F,B as U,L as W}from"./PlacesRail-bn7tEIBM.js";import{b as X}from"./remote-desktop-DDRRx8uY.js";import{u as $,n as G}from"./App-CXIAAQw4.js";import"./monitor-DUalxLhV.js";import"./index-CdcrwTp5.js";import"./MenuMotion-Dj4rtEj4.js";function K(n){return{enabled:n?.enabled??!0,verificationPending:n?.verificationPending??!1}}const P=3,b=50;function J(n){const s=n.trim();if(!s)return null;if(!/^\d+$/.test(s))return;const r=Number(s);return r>=1&&r<=b?r:void 0}function E(n,s){return n.trim().split(/[.!?\n]/)[0]?.trim().slice(0,60)||`${s?.name??"Bot"} automation`}const x="w-full rounded-xl border border-hairline/60 bg-panel px-3.5 py-2.5 text-[13px] text-ink outline-none placeholder:text-ink-tertiary focus:border-accent/70";function ae({webhook:n,bots:s,initialBotId:r,onClose:l,onCredential:C}){const{state:h,dispatch:R}=$(),[d,O]=o.useState(n?.botId??(r&&s.some(t=>t.id===r)?r:s[0]?.id)??""),[f,T]=o.useState(n?.name??""),[c,I]=o.useState(n?.prompt??""),[m,g]=o.useState(n?.runOn??"maus"),[v,_]=o.useState((n?.eventTypes??[]).join(", ")),[j,B]=o.useState(n?.maxPendingRuns?.toString()??""),[y,N]=o.useState(!1),[k,u]=o.useState(""),S=o.useRef(null);F(S,l);const L=!!(h.config?.box.configured&&X(h.instances,s.find(t=>t.id===d)?.modelSelection.instanceId)?.snapshot.state==="available"),M=async()=>{const t=s.find(i=>i.id===d),w=J(j);if(w===void 0){u(a("automations.editor.app.limitError",{max:b}));return}const z={name:f.trim()||E(c,t),prompt:c.trim(),botId:d,runOn:m,...K(n),eventTypes:v.split(",").map(i=>i.trim()).filter(Boolean),maxPendingRuns:w};N(!0),u("");try{const i=await G(n?`/api/webhooks/${n.id}`:"/api/webhooks",{method:n?"PATCH":"POST",body:JSON.stringify(z)});R({type:"webhookPatched",webhook:i.webhook}),l(),i.credential&&C(i.credential,i.webhook.id)}catch(i){u(i instanceof Error?i.message:String(i))}finally{N(!1)}};return e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-5",onMouseDown:t=>t.stopPropagation(),children:e.jsxs("div",{ref:S,role:"dialog","aria-modal":"true","aria-label":n?a("automations.editor.app.editTitle"):a("automations.editor.app.title"),tabIndex:-1,className:"flex max-h-[90vh] w-full max-w-[560px] flex-col overflow-hidden rounded-2xl border border-hairline/60 bg-panel shadow-2xl",children:[e.jsxs("div",{className:"flex items-start justify-between border-b border-hairline/40 px-5 py-4",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[17px] font-semibold text-ink",children:n?a("automations.editor.app.editTitle"):a("automations.editor.app.title")}),e.jsx("div",{className:"mt-1 text-[12px] text-ink-secondary",children:a("automations.editor.app.subtitle")})]}),e.jsx("button",{type:"button",onClick:l,"aria-label":a("automations.newBox.cancel"),className:"rounded-lg p-2 text-ink-secondary hover:bg-raised hover:text-ink",children:e.jsx(D,{size:18})})]}),e.jsxs("div",{className:"min-h-0 flex-1 space-y-5 overflow-y-auto p-5",children:[e.jsxs("div",{children:[e.jsx("div",{className:"mb-2 text-[13px] font-medium text-ink",children:a("automations.editor.app.who")}),e.jsx("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-3",children:s.map(t=>e.jsxs("button",{type:"button",onClick:()=>O(t.id),className:p("flex min-w-0 items-center gap-2 rounded-xl border px-3 py-2 text-left",d===t.id?"border-accent/70 bg-accent/10":"border-hairline/50 bg-inset hover:bg-raised/60"),children:[e.jsx(U,{bot:t,state:d===t.id?"happy":"idle",size:32,animated:!1}),e.jsx("span",{className:"min-w-0 flex-1 truncate text-[13px] font-medium text-ink",children:t.name})]},t.id))})]}),e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"mb-2 block text-[13px] font-medium text-ink",children:a("automations.editor.app.what")}),e.jsx("textarea",{autoFocus:!0,value:c,onChange:t=>I(t.target.value),rows:3,placeholder:a("automations.editor.app.whatPlaceholder"),className:p(x,"resize-y py-3 leading-relaxed")})]}),e.jsxs("details",{className:"rounded-xl border border-hairline/45 bg-inset/45 px-4 py-3",children:[e.jsx("summary",{className:"cursor-pointer text-[13px] font-medium text-ink",children:a("automations.more")}),e.jsxs("div",{className:"mt-4 space-y-4",children:[e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"mb-1.5 block text-[12px] font-medium text-ink-secondary",children:a("automations.editor.app.name")}),e.jsx("input",{value:f,onChange:t=>T(t.target.value),placeholder:E(c,s.find(t=>t.id===d)),className:x})]}),e.jsxs("div",{children:[e.jsx("div",{className:"mb-2 text-[12px] font-medium text-ink-secondary",children:a("automations.editor.app.runOn")}),e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsxs("button",{type:"button",onClick:()=>g("maus"),className:p("flex items-center gap-2 rounded-xl border p-3 text-left text-[13px] font-medium text-ink",m==="maus"?"border-accent/70 bg-accent/10":"border-hairline/50 bg-panel hover:bg-raised/60"),children:[e.jsx(A,{size:14}),a("automations.editor.app.thisComputer")]}),e.jsxs("button",{type:"button",disabled:!L&&m!=="cloud",onClick:()=>g("cloud"),className:p("flex items-center gap-2 rounded-xl border p-3 text-left text-[13px] font-medium text-ink disabled:cursor-not-allowed disabled:opacity-45",m==="cloud"?"border-accent/70 bg-accent/10":"border-hairline/50 bg-panel hover:bg-raised/60"),children:[e.jsx(H,{size:14}),a("automations.editor.app.cloud")]})]})]}),e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"mb-1.5 block text-[12px] font-medium text-ink-secondary",children:a("automations.editor.app.events")}),e.jsx("input",{value:v,onChange:t=>_(t.target.value),placeholder:"push, workflow_run",className:x}),e.jsx("span",{className:"mt-1.5 block text-[11px] text-ink-secondary",children:a("automations.editor.app.eventsHelp")})]}),e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"mb-1.5 block text-[12px] font-medium text-ink-secondary",children:a("automations.editor.app.limit")}),e.jsx("input",{type:"number",inputMode:"numeric",min:1,max:b,step:1,value:j,onChange:t=>B(t.target.value),placeholder:String(P),className:x}),e.jsx("span",{className:"mt-1.5 block text-[11px] text-ink-secondary",children:a("automations.editor.app.limitHelp",{count:P})})]})]})]}),k&&e.jsx("div",{className:"rounded-xl border border-danger/30 bg-danger/10 px-3.5 py-3 text-[12px] text-danger",children:k})]}),e.jsxs("div",{className:"flex justify-end gap-2 border-t border-hairline/40 px-5 py-4",children:[e.jsx("button",{type:"button",onClick:l,className:"rounded-xl px-4 py-2 text-[13px] text-ink-secondary hover:bg-raised hover:text-ink",children:a("automations.newBox.cancel")}),e.jsxs("button",{type:"button",disabled:y||!d,onClick:()=>{M()},className:"flex items-center gap-2 rounded-xl bg-accent px-4 py-2 text-[13px] font-medium text-accent-ink hover:brightness-110 disabled:opacity-40",children:[y&&e.jsx(W,{size:14,className:"animate-spin"}),n?a("automations.editor.app.save"):a("automations.editor.app.create")]})]})]})})}export{ae as WebhookEditor,E as suggestedName};
1
+ import{r as o,j as e,t as a,X as D,a as p,L as A,g as H}from"./styles-Dd_7YOJG.js";import{c as F,B as U,L as W}from"./PlacesRail-CLjAh1E0.js";import{b as X}from"./remote-desktop-DDRRx8uY.js";import{u as $,n as G}from"./App-Bj6vt28W.js";import"./monitor-CyzqeASh.js";import"./index-D8oAKMU6.js";import"./MenuMotion-DEol1e9x.js";function K(n){return{enabled:n?.enabled??!0,verificationPending:n?.verificationPending??!1}}const P=3,b=50;function J(n){const s=n.trim();if(!s)return null;if(!/^\d+$/.test(s))return;const r=Number(s);return r>=1&&r<=b?r:void 0}function E(n,s){return n.trim().split(/[.!?\n]/)[0]?.trim().slice(0,60)||`${s?.name??"Bot"} automation`}const x="w-full rounded-xl border border-hairline/60 bg-panel px-3.5 py-2.5 text-[13px] text-ink outline-none placeholder:text-ink-tertiary focus:border-accent/70";function ae({webhook:n,bots:s,initialBotId:r,onClose:l,onCredential:C}){const{state:h,dispatch:R}=$(),[d,O]=o.useState(n?.botId??(r&&s.some(t=>t.id===r)?r:s[0]?.id)??""),[f,T]=o.useState(n?.name??""),[c,I]=o.useState(n?.prompt??""),[m,g]=o.useState(n?.runOn??"maus"),[v,_]=o.useState((n?.eventTypes??[]).join(", ")),[j,B]=o.useState(n?.maxPendingRuns?.toString()??""),[y,N]=o.useState(!1),[k,u]=o.useState(""),S=o.useRef(null);F(S,l);const L=!!(h.config?.box.configured&&X(h.instances,s.find(t=>t.id===d)?.modelSelection.instanceId)?.snapshot.state==="available"),M=async()=>{const t=s.find(i=>i.id===d),w=J(j);if(w===void 0){u(a("automations.editor.app.limitError",{max:b}));return}const z={name:f.trim()||E(c,t),prompt:c.trim(),botId:d,runOn:m,...K(n),eventTypes:v.split(",").map(i=>i.trim()).filter(Boolean),maxPendingRuns:w};N(!0),u("");try{const i=await G(n?`/api/webhooks/${n.id}`:"/api/webhooks",{method:n?"PATCH":"POST",body:JSON.stringify(z)});R({type:"webhookPatched",webhook:i.webhook}),l(),i.credential&&C(i.credential,i.webhook.id)}catch(i){u(i instanceof Error?i.message:String(i))}finally{N(!1)}};return e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-5",onMouseDown:t=>t.stopPropagation(),children:e.jsxs("div",{ref:S,role:"dialog","aria-modal":"true","aria-label":n?a("automations.editor.app.editTitle"):a("automations.editor.app.title"),tabIndex:-1,className:"flex max-h-[90vh] w-full max-w-[560px] flex-col overflow-hidden rounded-2xl border border-hairline/60 bg-panel shadow-2xl",children:[e.jsxs("div",{className:"flex items-start justify-between border-b border-hairline/40 px-5 py-4",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[17px] font-semibold text-ink",children:n?a("automations.editor.app.editTitle"):a("automations.editor.app.title")}),e.jsx("div",{className:"mt-1 text-[12px] text-ink-secondary",children:a("automations.editor.app.subtitle")})]}),e.jsx("button",{type:"button",onClick:l,"aria-label":a("automations.newBox.cancel"),className:"rounded-lg p-2 text-ink-secondary hover:bg-raised hover:text-ink",children:e.jsx(D,{size:18})})]}),e.jsxs("div",{className:"min-h-0 flex-1 space-y-5 overflow-y-auto p-5",children:[e.jsxs("div",{children:[e.jsx("div",{className:"mb-2 text-[13px] font-medium text-ink",children:a("automations.editor.app.who")}),e.jsx("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-3",children:s.map(t=>e.jsxs("button",{type:"button",onClick:()=>O(t.id),className:p("flex min-w-0 items-center gap-2 rounded-xl border px-3 py-2 text-left",d===t.id?"border-accent/70 bg-accent/10":"border-hairline/50 bg-inset hover:bg-raised/60"),children:[e.jsx(U,{bot:t,state:d===t.id?"happy":"idle",size:32,animated:!1}),e.jsx("span",{className:"min-w-0 flex-1 truncate text-[13px] font-medium text-ink",children:t.name})]},t.id))})]}),e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"mb-2 block text-[13px] font-medium text-ink",children:a("automations.editor.app.what")}),e.jsx("textarea",{autoFocus:!0,value:c,onChange:t=>I(t.target.value),rows:3,placeholder:a("automations.editor.app.whatPlaceholder"),className:p(x,"resize-y py-3 leading-relaxed")})]}),e.jsxs("details",{className:"rounded-xl border border-hairline/45 bg-inset/45 px-4 py-3",children:[e.jsx("summary",{className:"cursor-pointer text-[13px] font-medium text-ink",children:a("automations.more")}),e.jsxs("div",{className:"mt-4 space-y-4",children:[e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"mb-1.5 block text-[12px] font-medium text-ink-secondary",children:a("automations.editor.app.name")}),e.jsx("input",{value:f,onChange:t=>T(t.target.value),placeholder:E(c,s.find(t=>t.id===d)),className:x})]}),e.jsxs("div",{children:[e.jsx("div",{className:"mb-2 text-[12px] font-medium text-ink-secondary",children:a("automations.editor.app.runOn")}),e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsxs("button",{type:"button",onClick:()=>g("maus"),className:p("flex items-center gap-2 rounded-xl border p-3 text-left text-[13px] font-medium text-ink",m==="maus"?"border-accent/70 bg-accent/10":"border-hairline/50 bg-panel hover:bg-raised/60"),children:[e.jsx(A,{size:14}),a("automations.editor.app.thisComputer")]}),e.jsxs("button",{type:"button",disabled:!L&&m!=="cloud",onClick:()=>g("cloud"),className:p("flex items-center gap-2 rounded-xl border p-3 text-left text-[13px] font-medium text-ink disabled:cursor-not-allowed disabled:opacity-45",m==="cloud"?"border-accent/70 bg-accent/10":"border-hairline/50 bg-panel hover:bg-raised/60"),children:[e.jsx(H,{size:14}),a("automations.editor.app.cloud")]})]})]}),e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"mb-1.5 block text-[12px] font-medium text-ink-secondary",children:a("automations.editor.app.events")}),e.jsx("input",{value:v,onChange:t=>_(t.target.value),placeholder:"push, workflow_run",className:x}),e.jsx("span",{className:"mt-1.5 block text-[11px] text-ink-secondary",children:a("automations.editor.app.eventsHelp")})]}),e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"mb-1.5 block text-[12px] font-medium text-ink-secondary",children:a("automations.editor.app.limit")}),e.jsx("input",{type:"number",inputMode:"numeric",min:1,max:b,step:1,value:j,onChange:t=>B(t.target.value),placeholder:String(P),className:x}),e.jsx("span",{className:"mt-1.5 block text-[11px] text-ink-secondary",children:a("automations.editor.app.limitHelp",{count:P})})]})]})]}),k&&e.jsx("div",{className:"rounded-xl border border-danger/30 bg-danger/10 px-3.5 py-3 text-[12px] text-danger",children:k})]}),e.jsxs("div",{className:"flex justify-end gap-2 border-t border-hairline/40 px-5 py-4",children:[e.jsx("button",{type:"button",onClick:l,className:"rounded-xl px-4 py-2 text-[13px] text-ink-secondary hover:bg-raised hover:text-ink",children:a("automations.newBox.cancel")}),e.jsxs("button",{type:"button",disabled:y||!d,onClick:()=>{M()},className:"flex items-center gap-2 rounded-xl bg-accent px-4 py-2 text-[13px] font-medium text-accent-ink hover:brightness-110 disabled:opacity-40",children:[y&&e.jsx(W,{size:14,className:"animate-spin"}),n?a("automations.editor.app.save"):a("automations.editor.app.create")]})]})]})})}export{ae as WebhookEditor,E as suggestedName};
@@ -1 +1 @@
1
- import{j as r,t,a as u,g as v,f as g}from"./styles-DnwnyZpR.js";import{u as h,a2 as k,a3 as j,G as N,a4 as w,a5 as p}from"./App-CXIAAQw4.js";import{M as A}from"./monitor-DUalxLhV.js";import{g as C}from"./PlacesRail-bn7tEIBM.js";function z({value:s,compact:o=!1,onChange:e}){const{state:c}=h();return c.config?.cloudHome?null:r.jsxs("div",{className:"mt-3 rounded-lg bg-inset p-3",children:[r.jsx("div",{className:"text-[12px] font-medium text-ink",children:o?t("botAccess.cloud.provider"):t("botAccess.cloud.backend")}),r.jsx("div",{className:"mt-0.5 text-[12px] text-ink-secondary",children:o?s==="vps"?t("botAccess.cloud.vpsDescription"):t("botAccess.cloud.hostedDescription"):s==="vps"?t("botAccess.cloud.vpsAutoDescription"):t("botAccess.cloud.hostedBackendDescription")}),r.jsx("div",{className:"mt-2 flex overflow-hidden rounded-lg border border-hairline/40",children:["box","vps"].map((n,a)=>r.jsx("button",{onClick:()=>e(n),className:u("flex-1 py-1.5 text-[12px]",a>0&&"border-l border-hairline/40",s===n?"bg-raised text-ink":"text-ink-secondary hover:bg-raised/60 hover:text-ink"),children:n==="vps"?t("botAccess.cloud.selfHostedVps"):t("botAccess.cloud.boat")},n))})]})}const D=[[null,"vm.dest.auto","computer.dest.autoDesc",k],["cloud","place.cloud","computer.dest.cloudDesc",v],["vm","vm.dest.vm","computer.dest.vmDesc",j],["local","vm.dest.local","computer.dest.localDesc",A],["browser","vm.dest.browser","computer.dest.browserDesc",N],["off","vm.dest.off","computer.dest.offDesc",C]];function G(s,o){return D.filter(([e])=>e===null||e==="off"||w(e,s)&&!(e==="local"&&p(o)))}function H(s,o,e){return s===null?!o||o==="local"&&p(e):o===s}function M(s,o,e){const c=s==="local"?"thisComputer":s==="vm"?"localVm":s==="cloud"?o==="vps"?"vps":"box":null;return e&&c&&!e.computers[c]?t("policy.managedBy",{organization:e.organizationName}):void 0}function R({options:s,onSelect:o}){return r.jsx("div",{role:"group","aria-label":t("computer.destinationAria"),className:"mt-3 grid auto-rows-fr grid-cols-2 gap-2",children:s.map(({mode:e,labelKey:c,descriptionKey:n,Icon:a,selected:i,managedBy:m,disabled:l,unavailableTitle:x,note:f,issue:b,view:d})=>r.jsxs("button",{disabled:l,title:x,onClick:()=>o(e),type:"button","aria-pressed":i,className:u("min-w-0 rounded-lg border px-2.5 py-3 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 focus-visible:ring-offset-card",i?"border-accent/60 bg-accent/10 text-ink":"border-hairline/50 bg-panel/30 text-ink-secondary",l?"cursor-not-allowed":"hover:border-accent/40 hover:bg-control/60"),children:[r.jsxs("span",{className:"flex items-center gap-2 text-[12px] font-medium leading-4",children:[i?r.jsx(g,{size:14,className:"shrink-0 text-accent"}):r.jsx(a,{size:14,className:"shrink-0 text-ink-secondary"}),r.jsx("span",{children:t(c)})]}),r.jsx("span",{className:"mt-1.5 block text-[11px] leading-4 text-ink-secondary",children:m??f??(l?d.line:b?d.short:t(n))})]},e??"auto"))})}export{z as C,R as W,H as a,M as p,G as w};
1
+ import{j as r,t,a as u,g as v,f as g}from"./styles-Dd_7YOJG.js";import{u as h,a2 as k,a3 as j,G as N,a4 as w,a5 as p}from"./App-Bj6vt28W.js";import{M as A}from"./monitor-CyzqeASh.js";import{g as C}from"./PlacesRail-CLjAh1E0.js";function z({value:s,compact:o=!1,onChange:e}){const{state:c}=h();return c.config?.cloudHome?null:r.jsxs("div",{className:"mt-3 rounded-lg bg-inset p-3",children:[r.jsx("div",{className:"text-[12px] font-medium text-ink",children:o?t("botAccess.cloud.provider"):t("botAccess.cloud.backend")}),r.jsx("div",{className:"mt-0.5 text-[12px] text-ink-secondary",children:o?s==="vps"?t("botAccess.cloud.vpsDescription"):t("botAccess.cloud.hostedDescription"):s==="vps"?t("botAccess.cloud.vpsAutoDescription"):t("botAccess.cloud.hostedBackendDescription")}),r.jsx("div",{className:"mt-2 flex overflow-hidden rounded-lg border border-hairline/40",children:["box","vps"].map((n,a)=>r.jsx("button",{onClick:()=>e(n),className:u("flex-1 py-1.5 text-[12px]",a>0&&"border-l border-hairline/40",s===n?"bg-raised text-ink":"text-ink-secondary hover:bg-raised/60 hover:text-ink"),children:n==="vps"?t("botAccess.cloud.selfHostedVps"):t("botAccess.cloud.boat")},n))})]})}const D=[[null,"vm.dest.auto","computer.dest.autoDesc",k],["cloud","place.cloud","computer.dest.cloudDesc",v],["vm","vm.dest.vm","computer.dest.vmDesc",j],["local","vm.dest.local","computer.dest.localDesc",A],["browser","vm.dest.browser","computer.dest.browserDesc",N],["off","vm.dest.off","computer.dest.offDesc",C]];function G(s,o){return D.filter(([e])=>e===null||e==="off"||w(e,s)&&!(e==="local"&&p(o)))}function H(s,o,e){return s===null?!o||o==="local"&&p(e):o===s}function M(s,o,e){const c=s==="local"?"thisComputer":s==="vm"?"localVm":s==="cloud"?o==="vps"?"vps":"box":null;return e&&c&&!e.computers[c]?t("policy.managedBy",{organization:e.organizationName}):void 0}function R({options:s,onSelect:o}){return r.jsx("div",{role:"group","aria-label":t("computer.destinationAria"),className:"mt-3 grid auto-rows-fr grid-cols-2 gap-2",children:s.map(({mode:e,labelKey:c,descriptionKey:n,Icon:a,selected:i,managedBy:m,disabled:l,unavailableTitle:x,note:f,issue:b,view:d})=>r.jsxs("button",{disabled:l,title:x,onClick:()=>o(e),type:"button","aria-pressed":i,className:u("min-w-0 rounded-lg border px-2.5 py-3 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 focus-visible:ring-offset-card",i?"border-accent/60 bg-accent/10 text-ink":"border-hairline/50 bg-panel/30 text-ink-secondary",l?"cursor-not-allowed":"hover:border-accent/40 hover:bg-control/60"),children:[r.jsxs("span",{className:"flex items-center gap-2 text-[12px] font-medium leading-4",children:[i?r.jsx(g,{size:14,className:"shrink-0 text-accent"}):r.jsx(a,{size:14,className:"shrink-0 text-ink-secondary"}),r.jsx("span",{children:t(c)})]}),r.jsx("span",{className:"mt-1.5 block text-[11px] leading-4 text-ink-secondary",children:m??f??(l?d.line:b?d.short:t(n))})]},e??"auto"))})}export{z as C,R as W,H as a,M as p,G as w};
@@ -1 +1 @@
1
- import{g as p,r as u,d as a}from"./chunk-AW2ZBBNX-COZ0RY0p.js";import{p as f}from"./chunk-JWPE2WC7-CyI6_v_4.js";import{_ as n,l as o}from"./mermaid.core-u5mM9R6c.js";import{M as c,b as d}from"./cynefin-EF2NZ3EQ-DZo-gx9_.js";import"./styles-DnwnyZpR.js";import"./step-CkmJJ7wq.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,s]=e.split("*"),l=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:l,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},F={parser:R,db:a,renderer:u,styles:p};export{F as diagram};
1
+ import{g as p,r as u,d as a}from"./chunk-AW2ZBBNX-C3UOIXSH.js";import{p as f}from"./chunk-JWPE2WC7-B6xY9PZq.js";import{_ as n,l as o}from"./mermaid.core-DuHmv3Xq.js";import{M as c,b as d}from"./cynefin-EF2NZ3EQ-BdW2wt4-.js";import"./styles-Dd_7YOJG.js";import"./step-CkmJJ7wq.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,s]=e.split("*"),l=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:l,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},F={parser:R,db:a,renderer:u,styles:p};export{F as diagram};
@@ -1 +1 @@
1
- import{t as e,d as l,n as y,e as p}from"./styles-DnwnyZpR.js";const f=["all","approvals","decisions","config","people","session","webhook","bot-api","mcp","engine","bot","budget","visibility"];function m(t){const a=new URLSearchParams;t.who.trim()&&a.set("who",t.who.trim()),t.what!=="all"&&a.set("what",t.what),t.from&&a.set("from",t.from),t.to&&a.set("to",t.to);const i=a.toString();return i?`?${i}`:""}function v(t){return t==="This computer"?e("activity.actor.loopback"):t==="Local service"?e("activity.actor.worker"):t==="Command line"?e("activity.actor.cli"):t||"—"}function u(t){return Object.hasOwn(p,t)}function h(t){if(t.type==="approval"){const n=`activity.decision.${t.what}`,c=u(n)?e(n):t.what,r=t.tool?e("activity.approvalLine",{decision:c,tool:t.tool}):c;return t.bot?`${r} ${e("activity.approvalIn",{bot:t.bot})}`:r}const a=`activity.action.${t.action}`,i=u(a)?e(a):t.action,o=t.target?.name??t.target?.id;return o?`${i}: ${o}`:i}function b(t){if(t==null)return"—";if(typeof t=="string")return t;const a=JSON.stringify(t);return a.length>160?`${a.slice(0,157)}…`:a}const s=t=>`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")}`;function d(t,a){const i=s(t);if(i===s(a))return e("chat.day.today");const o=new Date(a);if(o.setDate(a.getDate()-1),i===s(o))return e("chat.day.yesterday");const n=r=>t.toLocaleDateString(y(),r),c=e("activity.day.date",{weekday:n({weekday:"short"}),day:t.getDate(),month:n({month:"short"})});return t.getFullYear()===a.getFullYear()?c:e("activity.day.dateYear",{date:c,year:t.getFullYear()})}const w=t=>t.labelKey?.startsWith("activity.tool.")?l(t.labelKey,t.label):t.label,S=t=>t.app!==null&&t.appKey?.startsWith("activity.app.")?l(t.appKey,t.app):t.app;function $(t,a){const i=[];for(const o of t){const n=new Date(o.at),c=s(n),r=i[i.length-1];r&&r.key===c?r.rows.push(o):i.push({key:c,label:d(n,a),rows:[o]})}return i}function k(t){switch(t){case"ran":return{text:e("activity.outcome.ran"),tone:"ok"};case"failed":return{text:e("activity.outcome.failed"),tone:"danger"};case"running":return{text:e("activity.outcome.running"),tone:"accent"};case"allowed":return{text:e("activity.outcome.allowed"),tone:"ok"};case"denied":return{text:e("activity.outcome.denied"),tone:"danger"};case"waiting":return{text:e("activity.outcome.waiting"),tone:"warn"}}}function D(t){const a=new Date(t);return Number.isNaN(a.getTime())?"--:--":`${String(a.getHours()).padStart(2,"0")}:${String(a.getMinutes()).padStart(2,"0")}`}export{f as A,S as a,w as b,m as c,h as d,b as e,D as f,$ as g,k as o,v as w};
1
+ import{t as e,d as l,n as y,e as p}from"./styles-Dd_7YOJG.js";const f=["all","approvals","decisions","config","people","session","webhook","bot-api","mcp","engine","bot","budget","visibility"];function m(t){const a=new URLSearchParams;t.who.trim()&&a.set("who",t.who.trim()),t.what!=="all"&&a.set("what",t.what),t.from&&a.set("from",t.from),t.to&&a.set("to",t.to);const i=a.toString();return i?`?${i}`:""}function v(t){return t==="This computer"?e("activity.actor.loopback"):t==="Local service"?e("activity.actor.worker"):t==="Command line"?e("activity.actor.cli"):t||"—"}function u(t){return Object.hasOwn(p,t)}function h(t){if(t.type==="approval"){const n=`activity.decision.${t.what}`,c=u(n)?e(n):t.what,r=t.tool?e("activity.approvalLine",{decision:c,tool:t.tool}):c;return t.bot?`${r} ${e("activity.approvalIn",{bot:t.bot})}`:r}const a=`activity.action.${t.action}`,i=u(a)?e(a):t.action,o=t.target?.name??t.target?.id;return o?`${i}: ${o}`:i}function b(t){if(t==null)return"—";if(typeof t=="string")return t;const a=JSON.stringify(t);return a.length>160?`${a.slice(0,157)}…`:a}const s=t=>`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")}`;function d(t,a){const i=s(t);if(i===s(a))return e("chat.day.today");const o=new Date(a);if(o.setDate(a.getDate()-1),i===s(o))return e("chat.day.yesterday");const n=r=>t.toLocaleDateString(y(),r),c=e("activity.day.date",{weekday:n({weekday:"short"}),day:t.getDate(),month:n({month:"short"})});return t.getFullYear()===a.getFullYear()?c:e("activity.day.dateYear",{date:c,year:t.getFullYear()})}const w=t=>t.labelKey?.startsWith("activity.tool.")?l(t.labelKey,t.label):t.label,S=t=>t.app!==null&&t.appKey?.startsWith("activity.app.")?l(t.appKey,t.app):t.app;function $(t,a){const i=[];for(const o of t){const n=new Date(o.at),c=s(n),r=i[i.length-1];r&&r.key===c?r.rows.push(o):i.push({key:c,label:d(n,a),rows:[o]})}return i}function k(t){switch(t){case"ran":return{text:e("activity.outcome.ran"),tone:"ok"};case"failed":return{text:e("activity.outcome.failed"),tone:"danger"};case"running":return{text:e("activity.outcome.running"),tone:"accent"};case"allowed":return{text:e("activity.outcome.allowed"),tone:"ok"};case"denied":return{text:e("activity.outcome.denied"),tone:"danger"};case"waiting":return{text:e("activity.outcome.waiting"),tone:"warn"}}}function D(t){const a=new Date(t);return Number.isNaN(a.getTime())?"--:--":`${String(a.getHours()).padStart(2,"0")}:${String(a.getMinutes()).padStart(2,"0")}`}export{f as A,S as a,w as b,m as c,h as d,b as e,D as f,$ as g,k as o,v as w};