limixbot 0.3.139 → 0.3.141

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 (130) hide show
  1. package/dist/assets/{ActivityPanel-COfO9kz3.js → ActivityPanel-D2qDgfNj.js} +1 -1
  2. package/dist/assets/{App-XogBV-zY.js → App-DVlUATuq.js} +10 -10
  3. package/dist/assets/{AppEventEditor-BDUGn9JQ.js → AppEventEditor-CmS34S85.js} +1 -1
  4. package/dist/assets/{BotSettingsDialog-B-QQjKGU.js → BotSettingsDialog-BY263Hpx.js} +1 -1
  5. package/dist/assets/{BrowserPanel-gpGgHms3.js → BrowserPanel-DLVH7EJz.js} +3 -3
  6. package/dist/assets/{BrowserProfilesManager-y_0rgxx6.js → BrowserProfilesManager-D3g9wElR.js} +1 -1
  7. package/dist/assets/{CloudAddDialog-ilsQ68Qb.js → CloudAddDialog-DPjSxdZe.js} +1 -1
  8. package/dist/assets/{ComputerFilesPane-oPSU8cF_.js → ComputerFilesPane-CIPgFHiZ.js} +1 -1
  9. package/dist/assets/{ComputerPanel-BPp3YoQQ.js → ComputerPanel-DKZ15Lrh.js} +2 -2
  10. package/dist/assets/{DataPanel-C_HhHiX2.js → DataPanel-DkAmUHzs.js} +1 -1
  11. package/dist/assets/{DesktopViewer-DQLJ65-k.js → DesktopViewer-DHpPKouz.js} +1 -1
  12. package/dist/assets/{GrokMoveDialog-KAfEBP8T.js → GrokMoveDialog-CgvM91-Q.js} +1 -1
  13. package/dist/assets/{InspectorPanel-CZlQbHob.js → InspectorPanel-CaqVaz-4.js} +1 -1
  14. package/dist/assets/{KeyboardShortcutsModal-jVso0auj.js → KeyboardShortcutsModal-CFccCEn6.js} +1 -1
  15. package/dist/assets/{LimixResizeHandles-kWhVXgUg.js → LimixResizeHandles-B05qQGL-.js} +1 -1
  16. package/dist/assets/{LiveDesktop-BVNJPX_h.js → LiveDesktop-Bmf7e4Tu.js} +1 -1
  17. package/dist/assets/{LocalVmWorkspace-B-10kwYn.js → LocalVmWorkspace-B3bDhQ9N.js} +1 -1
  18. package/dist/assets/{MacLocalControl-BQlB6oNZ.js → MacLocalControl-D8SRatvL.js} +1 -1
  19. package/dist/assets/{MarkdownFilePreview-CKDCxBAx.js → MarkdownFilePreview-C9mfh0mo.js} +1 -1
  20. package/dist/assets/{MenuMotion-DnZ3mfiD.js → MenuMotion-DuXPPcvo.js} +1 -1
  21. package/dist/assets/{NewBotDialog-DCt1ND3t.js → NewBotDialog-CLFDLsS2.js} +1 -1
  22. package/dist/assets/{PhoneAppDialog-DQ9V4p_V.js → PhoneAppDialog-DnUaN-Fw.js} +1 -1
  23. package/dist/assets/{PlacesRail-BBWcVP0k.js → PlacesRail-BJ-bXfSa.js} +1 -1
  24. package/dist/assets/{PluginsPanel-Br_6z80C.js → PluginsPanel-BZBrWQa4.js} +1 -1
  25. package/dist/assets/{ProIntroduction-CPyFbdnM.js → ProIntroduction-CKjldFF7.js} +1 -1
  26. package/dist/assets/{RemoteAgentSettingsPanel-CU-TIrOi.js → RemoteAgentSettingsPanel-DR-uywnp.js} +1 -1
  27. package/dist/assets/{RoomPanel-DaUBFxP4.js → RoomPanel-DziKRgaS.js} +1 -1
  28. package/dist/assets/{RoutinesPage-C91dSD_m.js → RoutinesPage-BCXo72z8.js} +1 -1
  29. package/dist/assets/{SettingsModal-DbfAt-F4.js → SettingsModal-B6gPauoi.js} +1 -1
  30. package/dist/assets/{ShareTeamDialog-BZlRFRFD.js → ShareTeamDialog-poRrRYw-.js} +1 -1
  31. package/dist/assets/{SignedInSites-DZTRiBI3.js → SignedInSites-CRn_yDkj.js} +1 -1
  32. package/dist/assets/{TeamLibraryPanel-C7fsWV2G.js → TeamLibraryPanel-xD4xGcM6.js} +1 -1
  33. package/dist/assets/{TeamMapPage-DmhWrV6j.js → TeamMapPage-BRw5VmSq.js} +1 -1
  34. package/dist/assets/{TriggersPage-DFyo9nf6.js → TriggersPage-C1ZtmBq8.js} +1 -1
  35. package/dist/assets/{VisibilitySection-DNI6SJel.js → VisibilitySection-C9airA4D.js} +1 -1
  36. package/dist/assets/{WebhookTrigger-tAdGlws5.js → WebhookTrigger-zYpN5d7o.js} +1 -1
  37. package/dist/assets/{WorksOnGrid-BT5vH_EO.js → WorksOnGrid-KJ3p-nHy.js} +1 -1
  38. package/dist/assets/{abnfDiagram-YUKMZFIV-Ce8eTiWW.js → abnfDiagram-YUKMZFIV-CSHaWbId.js} +1 -1
  39. package/dist/assets/{activity--SWQgP4n.js → activity-B-rv6SH8.js} +1 -1
  40. package/dist/assets/{architectureDiagram-47P4ROYG-uK5gzFcN.js → architectureDiagram-47P4ROYG-Ck3N_K_O.js} +1 -1
  41. package/dist/assets/{blockDiagram-E7TT5TSB-h0sJ21LK.js → blockDiagram-E7TT5TSB-pBM7maMq.js} +1 -1
  42. package/dist/assets/{c4Diagram-CRA5TL53-D6FSuQ4K.js → c4Diagram-CRA5TL53-Bf-p0I8b.js} +1 -1
  43. package/dist/assets/{calendar-days-DitBJQ7q.js → calendar-days-CHQoR3I7.js} +1 -1
  44. package/dist/assets/channel-COvC08kf.js +1 -0
  45. package/dist/assets/{chunk-2Q5K7J3B-uToClUtI.js → chunk-2Q5K7J3B-DlQOtOaL.js} +1 -1
  46. package/dist/assets/{chunk-5VM5RSS4-D-aGvVMe.js → chunk-5VM5RSS4-CiOX0aHl.js} +1 -1
  47. package/dist/assets/{chunk-7TKQ45FW-BLunZGXD.js → chunk-7TKQ45FW-BTushWZv.js} +1 -1
  48. package/dist/assets/{chunk-AW2ZBBNX-CNTLlxEl.js → chunk-AW2ZBBNX-aJ3nOFgT.js} +1 -1
  49. package/dist/assets/{chunk-FVRAUYC3-DjOBV8XJ.js → chunk-FVRAUYC3-CyeNqn_N.js} +2 -2
  50. package/dist/assets/{chunk-HTAEGDNF-lPxF8CJg.js → chunk-HTAEGDNF-P55CSFqg.js} +1 -1
  51. package/dist/assets/{chunk-JWPE2WC7-De4B0D7D.js → chunk-JWPE2WC7-BhrD2ioJ.js} +1 -1
  52. package/dist/assets/{chunk-KQW6MTUR-cx8qFIBr.js → chunk-KQW6MTUR-BDxkLHse.js} +1 -1
  53. package/dist/assets/{chunk-XXDRQBXY-BUeyVkn0.js → chunk-XXDRQBXY-BPP3938f.js} +1 -1
  54. package/dist/assets/{classDiagram-v2-K4WV4PDN-dK4st9xs.js → classDiagram-v2-K4WV4PDN-BZbKyiCn.js} +1 -1
  55. package/dist/assets/{coins-MJbwpEBq.js → coins-C9XJU_4V.js} +1 -1
  56. package/dist/assets/{core-BAGxQvVI.js → core-BUwTlq4P.js} +1 -1
  57. package/dist/assets/{cose-bilkent-JH36ORCC-jCX-7UJX.js → cose-bilkent-JH36ORCC-C7d1E0jy.js} +1 -1
  58. package/dist/assets/{cynefin-EF2NZ3EQ-CP2d7lx5.js → cynefin-EF2NZ3EQ-Dpnrpxzf.js} +1 -1
  59. package/dist/assets/{cynefinDiagram-3GCD6N5R-FY_TCIwN.js → cynefinDiagram-3GCD6N5R-1qGYRFwt.js} +1 -1
  60. package/dist/assets/{dagre-W4DXFKR2-BWXmKLRg.js → dagre-W4DXFKR2-DSfoACwc.js} +1 -1
  61. package/dist/assets/{diagram-2UJZ2QOL-CHEKJ_l4.js → diagram-2UJZ2QOL-Dr3i5W8y.js} +1 -1
  62. package/dist/assets/{diagram-OVF4WLC6-DCb8-TQG.js → diagram-OVF4WLC6-Kp35HPdA.js} +1 -1
  63. package/dist/assets/{diagram-PFPMY2P6-CIYmKBh5.js → diagram-PFPMY2P6-CjlhrI6Z.js} +1 -1
  64. package/dist/assets/{diagram-UMYRVEAY-9NdqhGVc.js → diagram-UMYRVEAY-DTW5ZRM1.js} +1 -1
  65. package/dist/assets/{diagram-YEKJPTXX-C3J9AGvJ.js → diagram-YEKJPTXX-m5Lo1ObV.js} +1 -1
  66. package/dist/assets/{diagram-ZIFT7M5P-BTWPaT48.js → diagram-ZIFT7M5P-D5C5w_He.js} +1 -1
  67. package/dist/assets/{ebnfDiagram-VR2GEFS7-6PXFyzKG.js → ebnfDiagram-VR2GEFS7-C-d31ZAB.js} +1 -1
  68. package/dist/assets/{elk-IJKZMXRS-Kyo_ClKD.js → elk-IJKZMXRS-Bp6SD_1S.js} +1 -1
  69. package/dist/assets/{erDiagram-O2IAPWRE-CY6f4L3d.js → erDiagram-O2IAPWRE-B2JhynZv.js} +1 -1
  70. package/dist/assets/{file-up-q6N1oToi.js → file-up-C1s0CBrI.js} +1 -1
  71. package/dist/assets/{flowDiagram-OXPTDLAJ-CIyEI3gW.js → flowDiagram-OXPTDLAJ-DeWXJ4_K.js} +1 -1
  72. package/dist/assets/{ganttDiagram-R7TSEDQI-0uDsU0zP.js → ganttDiagram-R7TSEDQI-CEqLhR3V.js} +1 -1
  73. package/dist/assets/{gitGraphDiagram-XJZIOB7I-C8WgSPMm.js → gitGraphDiagram-XJZIOB7I-BSgcVYrZ.js} +1 -1
  74. package/dist/assets/{import-name-BiqwUM8m.js → import-name-DbblQVDB.js} +1 -1
  75. package/dist/assets/{index-m7zGNgrr.js → index-CZOD-N3O.js} +3 -3
  76. package/dist/assets/{index-Bxu5GjYs.js → index-D4gkCUyb.js} +1 -1
  77. package/dist/assets/{infoDiagram-5W2HQ5XZ-vfG8gNz3.js → infoDiagram-5W2HQ5XZ-BLfUURj8.js} +1 -1
  78. package/dist/assets/{ishikawaDiagram-K3B6WC7H-kDpcmOkz.js → ishikawaDiagram-K3B6WC7H-CrNMsTRP.js} +1 -1
  79. package/dist/assets/{journeyDiagram-COXZFDF6-CNQ1ns0p.js → journeyDiagram-COXZFDF6-CzPPBwy1.js} +1 -1
  80. package/dist/assets/{kanban-definition-P3RFRI5V-b7Gw39SF.js → kanban-definition-P3RFRI5V-andT-HRd.js} +1 -1
  81. package/dist/assets/{mermaid.core-B76WO5rM.js → mermaid.core-BwghuPvM.js} +4 -4
  82. package/dist/assets/{mindmap-definition-LZFPQGKD-DtR2Z2_c.js → mindmap-definition-LZFPQGKD-DZLJJqER.js} +1 -1
  83. package/dist/assets/{minimize-L5w7-dGg.js → minimize-CyN9vCVh.js} +1 -1
  84. package/dist/assets/{monitor-CTZE2syc.js → monitor-rsXvQAT7.js} +1 -1
  85. package/dist/assets/{new-bot-DU60NyAZ.js → new-bot-CrUATi6Y.js} +1 -1
  86. package/dist/assets/{org-library-a2la24O2.js → org-library-DMy-TMqt.js} +1 -1
  87. package/dist/assets/{package-format-Dg1ECWML.js → package-format-DxsHLDfa.js} +1 -1
  88. package/dist/assets/{pegDiagram-BGZESJAR-DyOa8O_6.js → pegDiagram-BGZESJAR-Ag5ieNd4.js} +1 -1
  89. package/dist/assets/{pieDiagram-CAPJLFHJ-CWaMQ0jL.js → pieDiagram-CAPJLFHJ-BEKrcMMG.js} +1 -1
  90. package/dist/assets/{quadrantDiagram-GDMTTRAM-WW31d2Mf.js → quadrantDiagram-GDMTTRAM-5NrUzt7G.js} +1 -1
  91. package/dist/assets/{rail-pvuszcdm.js → rail-BEuN4gG8.js} +1 -1
  92. package/dist/assets/{railroadDiagram-SM67HX2B-DqD_8LgC.js → railroadDiagram-SM67HX2B-BQUI7-8z.js} +1 -1
  93. package/dist/assets/{remote-desktop-panel-DxjQVZ3G.js → remote-desktop-panel-DCwNJ1YY.js} +1 -1
  94. package/dist/assets/{requirementDiagram-X7JNWC4A-BbpAELLg.js → requirementDiagram-X7JNWC4A-DJizyC_R.js} +1 -1
  95. package/dist/assets/{sankeyDiagram-UM26HJRW-DfhCSit0.js → sankeyDiagram-UM26HJRW-BDQyU8Wh.js} +1 -1
  96. package/dist/assets/{sequenceDiagram-ZO4K6R2Y-BWx6HNt_.js → sequenceDiagram-ZO4K6R2Y-BTaigEFp.js} +1 -1
  97. package/dist/assets/{sizeCapture-INFHLROL-9Z9mWyEZ.js → sizeCapture-INFHLROL-J__bNJvX.js} +1 -1
  98. package/dist/assets/{stateDiagram-v2-TBUQTH76-C7wdnY0H.js → stateDiagram-v2-TBUQTH76-CKOTLRyo.js} +1 -1
  99. package/dist/assets/{styles-DW6_pSlc.js → styles-XkQHO_MZ.js} +1 -1
  100. package/dist/assets/{swimlanes-N4OXWK64-BdAVZ2Mp.js → swimlanes-N4OXWK64-DPAhFVMp.js} +1 -1
  101. package/dist/assets/swimlanesDiagram-K3J5GTZL-BRiVojk7.js +8 -0
  102. package/dist/assets/{team-share-CjdhSquW.js → team-share-BqhAEQhI.js} +1 -1
  103. package/dist/assets/{timeline-definition-YOQAKGHF-C5RyxpFL.js → timeline-definition-YOQAKGHF-CUrEL6lo.js} +1 -1
  104. package/dist/assets/{usecaseDiagram-VIAY4XPW-CLx4IMzT.js → usecaseDiagram-VIAY4XPW-DdD_FmQL.js} +1 -1
  105. package/dist/assets/{vennDiagram-BLWOH2XV-CDdYuSAc.js → vennDiagram-BLWOH2XV-i8yTvYzp.js} +1 -1
  106. package/dist/assets/{vi-CND2A7To.js → vi-Ck4CHn3q.js} +1 -1
  107. package/dist/assets/{wardleyDiagram-YMQ3BMBF-KxnUFn7x.js → wardleyDiagram-YMQ3BMBF-CK5DR3ZK.js} +1 -1
  108. package/dist/assets/{xychartDiagram-TAQBALBS-DzqYm7Vb.js → xychartDiagram-TAQBALBS-BvUrUg5I.js} +1 -1
  109. package/dist/index.html +2 -2
  110. package/dist/rail.html +4 -4
  111. package/dist-server/cloud-home-start.js +21 -20
  112. package/dist-server/container-mcp.js +21 -20
  113. package/dist-server/index.js +2603 -2573
  114. package/dist-server/limixbot.js +21 -21
  115. package/dist-server/package.json +1 -1
  116. package/dist-server/pair-cli.js +21 -21
  117. package/dist-server/server/browser/viewers/live-v1.js +3 -4
  118. package/dist-server/server/browser-live.js +29 -14
  119. package/dist-server/server/index.js +83 -20
  120. package/dist-server/server/plugin-hub.js +2 -0
  121. package/dist-server/server/routes/bot-messages.js +19 -18
  122. package/dist-server/server/steer-queue.js +22 -10
  123. package/dist-server/server/user-errors.js +2 -0
  124. package/dist-server/server/workspace-read.js +276 -0
  125. package/dist-server/shared/mcp-name.js +1 -0
  126. package/dist-server/vps-container-mcp.js +21 -20
  127. package/dist-server/workspace-backup.worker.js +22 -22
  128. package/package.json +1 -1
  129. package/dist/assets/channel-DXsnTIKn.js +0 -1
  130. package/dist/assets/swimlanesDiagram-K3J5GTZL-BpuCUF0j.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,k as H}from"./styles-DW6_pSlc.js";import{c as F,B as U,L as W}from"./PlacesRail-BBWcVP0k.js";import{b as X}from"./remote-desktop-DDRRx8uY.js";import{u as $,j as G}from"./App-XogBV-zY.js";import"./monitor-CTZE2syc.js";import"./index-m7zGNgrr.js";import"./MenuMotion-DnZ3mfiD.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,k as H}from"./styles-XkQHO_MZ.js";import{c as F,B as U,L as W}from"./PlacesRail-BJ-bXfSa.js";import{b as X}from"./remote-desktop-DDRRx8uY.js";import{u as $,j as G}from"./App-DVlUATuq.js";import"./monitor-rsXvQAT7.js";import"./index-CZOD-N3O.js";import"./MenuMotion-DuXPPcvo.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 s,t as r,a as u,k as g,d as k,r as p}from"./styles-DW6_pSlc.js";import{u as j,_ as y,$ as w,G as N,a0 as C,a1 as x,x as f,j as A}from"./App-XogBV-zY.js";import{M as D}from"./monitor-CTZE2syc.js";import{e as O}from"./PlacesRail-BBWcVP0k.js";function G({value:t,compact:n=!1,onChange:e}){const{state:c}=j();return c.config?.cloudHome?null:s.jsxs("div",{className:"mt-3 rounded-lg bg-inset p-3",children:[s.jsx("div",{className:"text-[12px] font-medium text-ink",children:n?r("botAccess.cloud.provider"):r("botAccess.cloud.backend")}),s.jsx("div",{className:"mt-0.5 text-[12px] text-ink-secondary",children:n?t==="vps"?r("botAccess.cloud.vpsDescription"):r("botAccess.cloud.hostedDescription"):t==="vps"?r("botAccess.cloud.vpsAutoDescription"):r("botAccess.cloud.hostedBackendDescription")}),s.jsx("div",{className:"mt-2 flex overflow-hidden rounded-lg border border-hairline/40",children:["box","vps"].map((o,a)=>s.jsx("button",{onClick:()=>e(o),className:u("flex-1 py-1.5 text-[12px]",a>0&&"border-l border-hairline/40",t===o?"bg-raised text-ink":"text-ink-secondary hover:bg-raised/60 hover:text-ink"),children:o==="vps"?r("botAccess.cloud.selfHostedVps"):r("botAccess.cloud.boat")},o))})]})}const S=[[null,"vm.dest.auto","computer.dest.autoDesc",y],["cloud","place.cloud","computer.dest.cloudDesc",g],["vm","vm.dest.vm","computer.dest.vmDesc",w],["local","vm.dest.local","computer.dest.localDesc",D],["browser","vm.dest.browser","computer.dest.browserDesc",N],["off","vm.dest.off","computer.dest.offDesc",O]];function H(t,n){return S.filter(([e])=>e===null||e==="off"||C(e,t)&&!(e==="local"&&x(n)))}function I(t,n,e){return t===null?!n||n==="local"&&x(e):n===t}function R(t,n,e){const c=t==="local"?"thisComputer":t==="vm"?"localVm":t==="cloud"?n==="vps"?"vps":"box":null;return e&&c&&!e.computers[c]?r("policy.managedBy",{organization:e.organizationName}):void 0}function W({options:t,onSelect:n}){return s.jsxs(s.Fragment,{children:[s.jsx("div",{role:"group","aria-label":r("computer.destinationAria"),className:"mt-3 grid auto-rows-fr grid-cols-2 gap-2",children:t.map(({mode:e,labelKey:c,descriptionKey:o,Icon:a,selected:i,managedBy:l,disabled:d,unavailableTitle:b,note:h,issue:v,view:m})=>s.jsxs("button",{disabled:d,title:b,onClick:()=>n(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",d?"cursor-not-allowed":"hover:border-accent/40 hover:bg-control/60"),children:[s.jsxs("span",{className:"flex items-center gap-2 text-[12px] font-medium leading-4",children:[i?s.jsx(k,{size:14,className:"shrink-0 text-accent"}):s.jsx(a,{size:14,className:"shrink-0 text-ink-secondary"}),s.jsx("span",{children:r(c)})]}),s.jsx("span",{className:"mt-1.5 block text-[11px] leading-4 text-ink-secondary",children:l??h??(d?m.line:v?m.short:r(o))})]},e??"auto"))}),s.jsx(z,{})]})}function z(){const[t,n]=p.useState(null);p.useEffect(()=>{let o=!0;const a=()=>{A("/api/shared-computers").then(l=>{o&&n(l.known??[])}).catch(()=>{})};a();const i=setInterval(a,3e4);return()=>{o=!1,clearInterval(i)}},[]);const e=t?.filter(o=>o.lent!==!1)??[];if(!e.length)return null;const c=e.find(o=>o.online);return s.jsxs("p",{className:"mt-2 flex items-center gap-1.5 text-[12px] leading-5 text-ink-secondary","data-testid":"lent-computer-line",children:[s.jsx("span",{className:u("size-1.5 shrink-0 rounded-full",c?"bg-success":"bg-ink-tertiary")}),c?f(`Máy tính của bạn (${c.name}) đang bật: bot dùng máy này khi việc cần file, ứng dụng hoặc màn hình của bạn.`,`Your computer (${c.name}) is on: the bot uses it when a task needs your files, apps or screen.`):f(`Máy tính của bạn (${e[0].name}) đang tắt: bot làm trên Cloud, việc cần máy của bạn sẽ chờ máy bật.`,`Your computer (${e[0].name}) is off: the bot works on Cloud, and tasks that need your computer wait until it is on.`)]})}export{G as C,W,I as a,R as p,H as w};
1
+ import{j as s,t as r,a as u,k as g,d as k,r as p}from"./styles-XkQHO_MZ.js";import{u as j,_ as y,$ as w,G as N,a0 as C,a1 as x,x as f,j as A}from"./App-DVlUATuq.js";import{M as D}from"./monitor-rsXvQAT7.js";import{e as O}from"./PlacesRail-BJ-bXfSa.js";function G({value:t,compact:n=!1,onChange:e}){const{state:c}=j();return c.config?.cloudHome?null:s.jsxs("div",{className:"mt-3 rounded-lg bg-inset p-3",children:[s.jsx("div",{className:"text-[12px] font-medium text-ink",children:n?r("botAccess.cloud.provider"):r("botAccess.cloud.backend")}),s.jsx("div",{className:"mt-0.5 text-[12px] text-ink-secondary",children:n?t==="vps"?r("botAccess.cloud.vpsDescription"):r("botAccess.cloud.hostedDescription"):t==="vps"?r("botAccess.cloud.vpsAutoDescription"):r("botAccess.cloud.hostedBackendDescription")}),s.jsx("div",{className:"mt-2 flex overflow-hidden rounded-lg border border-hairline/40",children:["box","vps"].map((o,a)=>s.jsx("button",{onClick:()=>e(o),className:u("flex-1 py-1.5 text-[12px]",a>0&&"border-l border-hairline/40",t===o?"bg-raised text-ink":"text-ink-secondary hover:bg-raised/60 hover:text-ink"),children:o==="vps"?r("botAccess.cloud.selfHostedVps"):r("botAccess.cloud.boat")},o))})]})}const S=[[null,"vm.dest.auto","computer.dest.autoDesc",y],["cloud","place.cloud","computer.dest.cloudDesc",g],["vm","vm.dest.vm","computer.dest.vmDesc",w],["local","vm.dest.local","computer.dest.localDesc",D],["browser","vm.dest.browser","computer.dest.browserDesc",N],["off","vm.dest.off","computer.dest.offDesc",O]];function H(t,n){return S.filter(([e])=>e===null||e==="off"||C(e,t)&&!(e==="local"&&x(n)))}function I(t,n,e){return t===null?!n||n==="local"&&x(e):n===t}function R(t,n,e){const c=t==="local"?"thisComputer":t==="vm"?"localVm":t==="cloud"?n==="vps"?"vps":"box":null;return e&&c&&!e.computers[c]?r("policy.managedBy",{organization:e.organizationName}):void 0}function W({options:t,onSelect:n}){return s.jsxs(s.Fragment,{children:[s.jsx("div",{role:"group","aria-label":r("computer.destinationAria"),className:"mt-3 grid auto-rows-fr grid-cols-2 gap-2",children:t.map(({mode:e,labelKey:c,descriptionKey:o,Icon:a,selected:i,managedBy:l,disabled:d,unavailableTitle:b,note:h,issue:v,view:m})=>s.jsxs("button",{disabled:d,title:b,onClick:()=>n(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",d?"cursor-not-allowed":"hover:border-accent/40 hover:bg-control/60"),children:[s.jsxs("span",{className:"flex items-center gap-2 text-[12px] font-medium leading-4",children:[i?s.jsx(k,{size:14,className:"shrink-0 text-accent"}):s.jsx(a,{size:14,className:"shrink-0 text-ink-secondary"}),s.jsx("span",{children:r(c)})]}),s.jsx("span",{className:"mt-1.5 block text-[11px] leading-4 text-ink-secondary",children:l??h??(d?m.line:v?m.short:r(o))})]},e??"auto"))}),s.jsx(z,{})]})}function z(){const[t,n]=p.useState(null);p.useEffect(()=>{let o=!0;const a=()=>{A("/api/shared-computers").then(l=>{o&&n(l.known??[])}).catch(()=>{})};a();const i=setInterval(a,3e4);return()=>{o=!1,clearInterval(i)}},[]);const e=t?.filter(o=>o.lent!==!1)??[];if(!e.length)return null;const c=e.find(o=>o.online);return s.jsxs("p",{className:"mt-2 flex items-center gap-1.5 text-[12px] leading-5 text-ink-secondary","data-testid":"lent-computer-line",children:[s.jsx("span",{className:u("size-1.5 shrink-0 rounded-full",c?"bg-success":"bg-ink-tertiary")}),c?f(`Máy tính của bạn (${c.name}) đang bật: bot dùng máy này khi việc cần file, ứng dụng hoặc màn hình của bạn.`,`Your computer (${c.name}) is on: the bot uses it when a task needs your files, apps or screen.`):f(`Máy tính của bạn (${e[0].name}) đang tắt: bot làm trên Cloud, việc cần máy của bạn sẽ chờ máy bật.`,`Your computer (${e[0].name}) is off: the bot works on Cloud, and tasks that need your computer wait until it is on.`)]})}export{G as C,W,I as a,R as p,H as w};
@@ -1 +1 @@
1
- import{g as p,r as u,d as a}from"./chunk-AW2ZBBNX-CNTLlxEl.js";import{p as f}from"./chunk-JWPE2WC7-De4B0D7D.js";import{_ as n,l as o}from"./mermaid.core-B76WO5rM.js";import{M as c,b as d}from"./cynefin-EF2NZ3EQ-CP2d7lx5.js";import"./styles-DW6_pSlc.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-aJ3nOFgT.js";import{p as f}from"./chunk-JWPE2WC7-BhrD2ioJ.js";import{_ as n,l as o}from"./mermaid.core-BwghuPvM.js";import{M as c,b as d}from"./cynefin-EF2NZ3EQ-Dpnrpxzf.js";import"./styles-XkQHO_MZ.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,b as l,n as y,e as p}from"./styles-DW6_pSlc.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,b as l,n as y,e as p}from"./styles-XkQHO_MZ.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};