agentinbox-cli 0.0.0 → 0.1.0-nightly.10
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.
- package/LICENSE +21 -0
- package/README.md +337 -0
- package/dist/admin-CXkmdTYo.js +196 -0
- package/dist/admin-CXkmdTYo.js.map +1 -0
- package/dist/audit-bItbJYFP.js +65 -0
- package/dist/audit-bItbJYFP.js.map +1 -0
- package/dist/audit-gVdDzkAE.js +2 -0
- package/dist/auth-0NrMvHdE.js +550 -0
- package/dist/auth-0NrMvHdE.js.map +1 -0
- package/dist/auth-CoHvbWgO.js +2 -0
- package/dist/bus-Cz0flS37.js +12 -0
- package/dist/bus-Cz0flS37.js.map +1 -0
- package/dist/bus-OKIGut72.js +2 -0
- package/dist/cli.js +220 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands-DZ60j8_y.js +103 -0
- package/dist/commands-DZ60j8_y.js.map +1 -0
- package/dist/config-CIvgMqLx.js +2 -0
- package/dist/config-v975gxv4.js +44 -0
- package/dist/config-v975gxv4.js.map +1 -0
- package/dist/connect-BHC2trBi.js +292 -0
- package/dist/connect-BHC2trBi.js.map +1 -0
- package/dist/content-BXblC_Qs.js +1162 -0
- package/dist/content-BXblC_Qs.js.map +1 -0
- package/dist/content-worker.js +28 -0
- package/dist/content-worker.js.map +1 -0
- package/dist/crypto-DYZ4R7c2.js +74 -0
- package/dist/crypto-DYZ4R7c2.js.map +1 -0
- package/dist/db-B6gLQGBK.js +2 -0
- package/dist/db-D0gvshCc.js +282 -0
- package/dist/db-D0gvshCc.js.map +1 -0
- package/dist/errors-FbMS3QBo.js +39 -0
- package/dist/errors-FbMS3QBo.js.map +1 -0
- package/dist/filter-DGVz6-P1.js +140 -0
- package/dist/filter-DGVz6-P1.js.map +1 -0
- package/dist/instance-BBzEsYZO.js +175 -0
- package/dist/instance-BBzEsYZO.js.map +1 -0
- package/dist/instance-DLNTj9nm.js +2 -0
- package/dist/listen-D8DkEhqM.js +1724 -0
- package/dist/listen-D8DkEhqM.js.map +1 -0
- package/dist/listen-DT-omyD6.js +2 -0
- package/dist/mcpheader-By2dIyZq.js +2 -0
- package/dist/mcpheader-D9rrI-aa.js +65 -0
- package/dist/mcpheader-D9rrI-aa.js.map +1 -0
- package/dist/mcpsetup-7KxroOCp.js +2 -0
- package/dist/mcpsetup-DJ7ebFGJ.js +266 -0
- package/dist/mcpsetup-DJ7ebFGJ.js.map +1 -0
- package/dist/paths-BCBp8vrG.js +2 -0
- package/dist/paths-TLp8hiMt.js +40 -0
- package/dist/paths-TLp8hiMt.js.map +1 -0
- package/dist/profile-CgGgJ4Dm.js +181 -0
- package/dist/profile-CgGgJ4Dm.js.map +1 -0
- package/dist/profile-RbN2FRz7.js +2 -0
- package/dist/recipes-7d_Xws4M.js +2 -0
- package/dist/recipes-UalOc_LB.js +100 -0
- package/dist/recipes-UalOc_LB.js.map +1 -0
- package/dist/send-Dk-t8ia-.js +108 -0
- package/dist/send-Dk-t8ia-.js.map +1 -0
- package/dist/server-Hunjpt8n.js +8103 -0
- package/dist/server-Hunjpt8n.js.map +1 -0
- package/dist/service-BAgZDh22.js +2 -0
- package/dist/service-DYdD92CC.js +2 -0
- package/dist/service-D_ZEs3Zk.js +508 -0
- package/dist/service-D_ZEs3Zk.js.map +1 -0
- package/dist/service-whbugeQp.js +295 -0
- package/dist/service-whbugeQp.js.map +1 -0
- package/dist/settings-CeEsv4CE.js +2 -0
- package/dist/settings-DLUStIN7.js +109 -0
- package/dist/settings-DLUStIN7.js.map +1 -0
- package/dist/setup-token-BO89xnpb.js +48 -0
- package/dist/setup-token-BO89xnpb.js.map +1 -0
- package/dist/skill/SKILL.md +277 -0
- package/dist/skill-BJFn2bHK.js +2 -0
- package/dist/skill-WKbeyNct.js +43 -0
- package/dist/skill-WKbeyNct.js.map +1 -0
- package/dist/types-3eEsBFVj.js +37 -0
- package/dist/types-3eEsBFVj.js.map +1 -0
- package/dist/ui-B8Sd4Y7Y.js +81 -0
- package/dist/ui-B8Sd4Y7Y.js.map +1 -0
- package/dist/urls-Dp8pBGMU.js +2 -0
- package/dist/urls-U_LfYV61.js +27 -0
- package/dist/urls-U_LfYV61.js.map +1 -0
- package/dist/web/assets/_agentId-DAj08NDq.js +1 -0
- package/dist/web/assets/_app-B6q_HS9y.js +1 -0
- package/dist/web/assets/_app-CAQ6Mu1s.js +63 -0
- package/dist/web/assets/_webhookId-CMgBUN2Z.js +1 -0
- package/dist/web/assets/account-status-omoUlgBI.js +1 -0
- package/dist/web/assets/accounts-DyLfACj_.js +1 -0
- package/dist/web/assets/accounts-list-DiXACW0-.js +1 -0
- package/dist/web/assets/activity-zrckFhPk.js +1 -0
- package/dist/web/assets/agent-create-form-DKwaY1Dg.js +1 -0
- package/dist/web/assets/agents-Drvjccgt.js +1 -0
- package/dist/web/assets/approvals-4kd0_J8X.js +2 -0
- package/dist/web/assets/arrow-left-DVJV4Zx7.js +1 -0
- package/dist/web/assets/arrow-right-4PFX6MSS.js +1 -0
- package/dist/web/assets/audit-76H45orR.js +1 -0
- package/dist/web/assets/audit-bits-B1We-fQ3.js +1 -0
- package/dist/web/assets/bot-DVw15lBn.js +1 -0
- package/dist/web/assets/card-EQTpqntn.js +1 -0
- package/dist/web/assets/checkbox-DDZZurgK.js +1 -0
- package/dist/web/assets/chevron-down-892ylB4R.js +1 -0
- package/dist/web/assets/chevron-right-CbBKS6-T.js +1 -0
- package/dist/web/assets/chips-input--xgMZpg2.js +1 -0
- package/dist/web/assets/circle-x-Bi4IGwky.js +1 -0
- package/dist/web/assets/common-PG6weTqi.js +1 -0
- package/dist/web/assets/connect-host-DdkOJnMu.js +1 -0
- package/dist/web/assets/data-table-Ca9aQZKR.js +1 -0
- package/dist/web/assets/dialog-CxNRCZdE.js +1 -0
- package/dist/web/assets/dist-B0e3Ju3r.js +1 -0
- package/dist/web/assets/empty-CE_WZGEC.js +1 -0
- package/dist/web/assets/es2015-DPaldoxG.js +41 -0
- package/dist/web/assets/event-row-2xoyzgbP.js +1 -0
- package/dist/web/assets/events-Bizq3DPC.js +1 -0
- package/dist/web/assets/eye-off-DjpaihHf.js +1 -0
- package/dist/web/assets/field-CcyMn3ey.js +1 -0
- package/dist/web/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/dist/web/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/dist/web/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/dist/web/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/dist/web/assets/geist-mono-cyrillic-ext-wght-normal-X_5orZeX.woff2 +0 -0
- package/dist/web/assets/geist-mono-cyrillic-wght-normal-DiZS0aHC.woff2 +0 -0
- package/dist/web/assets/geist-mono-latin-ext-wght-normal-Bwz-egvJ.woff2 +0 -0
- package/dist/web/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2 +0 -0
- package/dist/web/assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2 +0 -0
- package/dist/web/assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2 +0 -0
- package/dist/web/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/dist/web/assets/get-started-DXUVmyNX.js +1 -0
- package/dist/web/assets/grants-BhXj1Pew.js +1 -0
- package/dist/web/assets/index-Bd4Y5wSp.js +10 -0
- package/dist/web/assets/index-akvt_1UI.css +2 -0
- package/dist/web/assets/input-CMhmmHiH.js +1 -0
- package/dist/web/assets/input-group-DRs3TNaT.js +1 -0
- package/dist/web/assets/key-round-CVIZRCLM.js +1 -0
- package/dist/web/assets/labels-C_Pwium9.js +1 -0
- package/dist/web/assets/login-aCr-cPqJ.js +1 -0
- package/dist/web/assets/mail-CAVmuESo.js +1 -0
- package/dist/web/assets/mutations-DVlbDx0M.js +1 -0
- package/dist/web/assets/paperclip-QFjM4y6n.js +1 -0
- package/dist/web/assets/password-input-_m9Ycphv.js +1 -0
- package/dist/web/assets/pencil-Bf1JhsG0.js +1 -0
- package/dist/web/assets/play-DiPk49JH.js +1 -0
- package/dist/web/assets/plus-CETmK0SB.js +1 -0
- package/dist/web/assets/preload-helper-BFuRUfdt.js +1 -0
- package/dist/web/assets/progress-3ZOsbLSK.js +6 -0
- package/dist/web/assets/queries-a3M5_loa.js +2 -0
- package/dist/web/assets/refresh-cw-DOn9kD7g.js +1 -0
- package/dist/web/assets/search-gcYjitzV.js +1 -0
- package/dist/web/assets/select-C8tJBHb5.js +1 -0
- package/dist/web/assets/send-BhQwhuJo.js +1 -0
- package/dist/web/assets/settings-H7ExHD9L.js +1 -0
- package/dist/web/assets/settings-form-CNUionsI.js +1 -0
- package/dist/web/assets/setup-DLbH5Dvl.js +1 -0
- package/dist/web/assets/sheet-BQKpA2xa.js +1 -0
- package/dist/web/assets/shield-alert-CbFgd06X.js +1 -0
- package/dist/web/assets/stamp-CH2OvjH2.js +1 -0
- package/dist/web/assets/stream-C2Tr2d5O.js +1 -0
- package/dist/web/assets/tabs-ySiz7Mni.js +1 -0
- package/dist/web/assets/tag-CP72Kk6Y.js +1 -0
- package/dist/web/assets/test-connection-Bd2Gac0O.js +1 -0
- package/dist/web/assets/textarea-CCokBZIw.js +1 -0
- package/dist/web/assets/toggle-group-ne0pVDg6.js +1 -0
- package/dist/web/assets/trash-DxdMNg8B.js +1 -0
- package/dist/web/assets/use-sign-out-BuzlTb0Q.js +1 -0
- package/dist/web/assets/useInfiniteQuery-DE6WChlb.js +1 -0
- package/dist/web/assets/useMatch-BKUnm54_.js +1 -0
- package/dist/web/assets/useMutation-DeWvLw1a.js +1 -0
- package/dist/web/assets/useQuery-DAhf1YDH.js +1 -0
- package/dist/web/assets/useSelector-D70eKNYs.js +1 -0
- package/dist/web/assets/webhook-BWT75M78.js +1 -0
- package/dist/web/assets/webhook-sheet-Cy_jHIqG.js +34 -0
- package/dist/web/assets/webhooks-CTAj5Ovp.js +1 -0
- package/dist/web/assets/with-selector-CkNyXYMW.js +1 -0
- package/dist/web/assets/x-BHjDLXNO.js +1 -0
- package/dist/web/favicon.svg +1 -0
- package/dist/web/index.html +31 -0
- package/package.json +95 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{B as e,G as t,W as n,d as r,f as i,ht as a,mt as o,n as s,o as c,pt as l,q as u,r as d,t as f,vt as p}from"./queries-a3M5_loa.js";import{t as m}from"./useQuery-DAhf1YDH.js";import{a as h,i as ee,n as te,o as ne,r as re,s as ie}from"./settings-form-CNUionsI.js";import{r as ae}from"./dist-B0e3Ju3r.js";import{t as oe}from"./arrow-left-DVJV4Zx7.js";import{t as se}from"./arrow-right-4PFX6MSS.js";import{t as ce}from"./bot-DVw15lBn.js";import{a as le,i as ue,n as de,r as fe,t as pe}from"./select-C8tJBHb5.js";import{c as g,l as _,r as me,t as he,u as v}from"./card-EQTpqntn.js";import{A as y,a as ge,j as _e,k as b,n as x,o as ve,r as S}from"./common-PG6weTqi.js";import{r as C,t as ye}from"./accounts-list-DiXACW0-.js";import{n as be,t as xe}from"./progress-3ZOsbLSK.js";import{t as Se}from"./test-connection-Bd2Gac0O.js";import{t as Ce}from"./checkbox-DDZZurgK.js";import{a as w,l as we,n as T,r as E,t as D}from"./field-CcyMn3ey.js";import{n as O,t as k}from"./agent-create-form-DKwaY1Dg.js";import{G as A,K as j,U as M,a as Te,c as N,i as P,l as F,o as I,s as L}from"./index-Bd4Y5wSp.js";import{n as R,r as Ee}from"./connect-host-DdkOJnMu.js";import{t as z}from"./input-CMhmmHiH.js";import{t as De}from"./mutations-DVlbDx0M.js";import{s as Oe}from"./grants-BhXj1Pew.js";var B={name:`building`,size:24,node:[[`path`,{d:`M12 10h.01`,key:`1nrarc`}],[`path`,{d:`M12 14h.01`,key:`1etili`}],[`path`,{d:`M12 6h.01`,key:`1vi96p`}],[`path`,{d:`M16 10h.01`,key:`1m94wz`}],[`path`,{d:`M16 14h.01`,key:`1gbofw`}],[`path`,{d:`M16 6h.01`,key:`1x0f13`}],[`path`,{d:`M8 10h.01`,key:`19clt8`}],[`path`,{d:`M8 14h.01`,key:`6423bh`}],[`path`,{d:`M8 6h.01`,key:`1dz90k`}],[`path`,{d:`M9 22v-3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3`,key:`cabbwy`}],[`rect`,{x:`4`,y:`2`,width:`16`,height:`20`,rx:`2`,key:`1uxh74`}]]};B.node;var ke=t(B),V={name:`globe`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]};V.node;var Ae=t(V),H={name:`party-popper`,size:24,node:[[`path`,{d:`M5.8 11.3 2 22l10.7-3.79`,key:`gwxi1d`}],[`path`,{d:`M4 3h.01`,key:`1vcuye`}],[`path`,{d:`M22 8h.01`,key:`1mrtc2`}],[`path`,{d:`M15 2h.01`,key:`1cjtqr`}],[`path`,{d:`M22 20h.01`,key:`1mrys2`}],[`path`,{d:`m22 2-2.24.75a2.9 2.9 0 0 0-1.96 3.12c.1.86-.57 1.63-1.45 1.63h-.38c-.86 0-1.6.6-1.76 1.44L14 10`,key:`hbicv8`}],[`path`,{d:`m22 13-.82-.33c-.86-.34-1.82.2-1.98 1.11c-.11.7-.72 1.22-1.43 1.22H17`,key:`1i94pl`}],[`path`,{d:`m11 2 .33.82c.34.86-.2 1.82-1.11 1.98C9.52 4.9 9 5.52 9 6.23V7`,key:`1cofks`}],[`path`,{d:`M11 13c1.93 1.93 2.83 4.17 2 5-.83.83-3.07-.07-5-2-1.93-1.93-2.83-4.17-2-5 .83-.83 3.07.07 5 2Z`,key:`4kbmks`}]]};H.node;var je=t(H),U={name:`shield-check`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]};U.node;var Me=t(U),W=o();function Ne({index:t,status:r,current:i}){return(0,W.jsx)(`span`,{className:e(`flex size-7 shrink-0 items-center justify-center rounded-full border text-xs font-medium tabular transition-colors`,r===`done`&&`border-success bg-success text-white`,r===`skipped`&&`border-muted-foreground/40 bg-muted text-muted-foreground`,r===`todo`&&i&&`border-primary bg-primary text-primary-foreground`,r===`todo`&&!i&&`bg-background text-muted-foreground`),"aria-hidden":!0,children:r===`done`?(0,W.jsx)(n,{className:`size-3.5`}):r===`skipped`?(0,W.jsx)(be,{className:`size-3.5`}):t+1})}var Pe={done:`done`,skipped:`skipped`,todo:`to do`};function Fe({current:t,statuses:n,onSelect:r}){let i=I.filter(e=>n[e]!==`todo`).length,a=I.indexOf(t);return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`div`,{className:`space-y-3 lg:hidden`,children:[(0,W.jsxs)(`div`,{className:`flex items-center justify-between text-xs text-muted-foreground`,children:[(0,W.jsxs)(`span`,{children:[`Step `,a+1,` of `,I.length]}),(0,W.jsxs)(`span`,{children:[i,` done`]})]}),(0,W.jsx)(xe,{value:i/I.length*100,"aria-label":`Setup progress`}),(0,W.jsxs)(pe,{value:t,onValueChange:e=>r(e),children:[(0,W.jsx)(ue,{className:`w-full`,"aria-label":`Jump to step`,children:(0,W.jsx)(le,{})}),(0,W.jsx)(de,{children:I.map((e,t)=>(0,W.jsxs)(fe,{value:e,children:[t+1,`. `,L[e].short,n[e]===`done`?` ✓`:n[e]===`skipped`?` (skipped)`:``]},e))})]})]}),(0,W.jsx)(`nav`,{"aria-label":`Setup steps`,className:`hidden lg:block`,children:(0,W.jsx)(`ol`,{className:`space-y-1`,children:I.map((i,a)=>{let o=i===t;return(0,W.jsxs)(`li`,{className:`relative`,children:[a<I.length-1&&(0,W.jsx)(`span`,{"aria-hidden":!0,className:e(`absolute top-9 left-[1.4rem] h-[calc(100%-1.75rem)] w-px`,n[i]===`done`?`bg-success/50`:`bg-border`)}),(0,W.jsxs)(`button`,{type:`button`,onClick:()=>r(i),"aria-current":o?`step`:void 0,className:e(`relative flex w-full items-center gap-3 rounded-lg px-2 py-1.5 text-left text-sm outline-none hover:bg-muted/60 focus-visible:ring-2 focus-visible:ring-ring`,o&&`bg-muted`),children:[(0,W.jsx)(Ne,{index:a,status:n[i],current:o}),(0,W.jsxs)(`span`,{className:`min-w-0`,children:[(0,W.jsx)(`span`,{className:e(`block truncate`,o?`font-medium`:`text-muted-foreground`),children:L[i].short}),L[i].optional&&(0,W.jsx)(`span`,{className:`block text-xs text-muted-foreground`,children:`Optional`})]}),(0,W.jsxs)(`span`,{className:`sr-only`,children:[`(`,Pe[n[i]],`)`]})]})]},i)})})})]})}function G({index:e,title:t,description:n,children:r,footer:i}){return(0,W.jsxs)(he,{className:`gap-0 py-0`,children:[(0,W.jsxs)(`div`,{className:`space-y-1.5 border-b p-5 sm:p-6`,children:[(0,W.jsxs)(`div`,{className:`text-xs font-medium text-muted-foreground`,children:[`Step `,e+1,` of `,I.length]}),(0,W.jsx)(`h2`,{className:`text-xl font-semibold tracking-tight`,children:t}),(0,W.jsx)(`div`,{className:`max-w-2xl text-sm text-muted-foreground`,children:n})]}),(0,W.jsx)(me,{className:`space-y-6 p-5 sm:p-6`,children:r}),(0,W.jsx)(`div`,{className:`flex flex-wrap items-center justify-between gap-2 border-t bg-muted/20 p-4 sm:px-6`,children:i})]})}function K({onBack:e,onNext:t,nextLabel:n=`Continue`,nextDisabled:r,pending:a,extra:o,hint:s}){return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`div`,{children:e&&(0,W.jsxs)(i,{variant:`ghost`,onClick:e,children:[(0,W.jsx)(oe,{}),` Back`]})}),(0,W.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-2`,children:[s&&(0,W.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:s}),o,(0,W.jsxs)(i,{onClick:t,disabled:r||a,children:[a&&(0,W.jsx)(d,{}),n,` `,!a&&(0,W.jsx)(se,{})]})]})]})}function q({children:e}){return(0,W.jsx)(`ol`,{className:`space-y-5 [counter-reset:guide]`,children:e})}function J({title:t,children:n,done:r}){return(0,W.jsxs)(`li`,{className:`relative flex gap-3 [counter-increment:guide]`,children:[(0,W.jsx)(`span`,{"aria-hidden":!0,className:e(`flex size-6 shrink-0 items-center justify-center rounded-full border bg-muted text-xs font-medium tabular before:content-[counter(guide)]`,r&&`border-success bg-success text-white before:content-['✓']`)}),(0,W.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-2 pt-0.5`,children:[(0,W.jsx)(`div`,{className:`text-sm font-medium`,children:t}),n&&(0,W.jsx)(`div`,{className:`space-y-2 text-sm text-muted-foreground`,children:n})]})]})}function Y({href:e,children:t,disabled:n}){return n?(0,W.jsx)(i,{variant:`outline`,size:`sm`,disabled:!0,children:t}):(0,W.jsx)(i,{variant:`outline`,size:`sm`,asChild:!0,children:(0,W.jsxs)(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer`,children:[t,(0,W.jsx)(_e,{}),(0,W.jsx)(`span`,{className:`sr-only`,children:`(opens Google Cloud in a new tab)`})]})})}function Ie({index:e,onBack:t,onNext:n}){let r=m(s.accounts()),a=m(s.googleClient()),o=r.data?.length??0,c=a.data?.callbackMode===`paste`;return(0,W.jsxs)(G,{index:e,title:`Connect Gmail accounts`,description:`Sign in with Google for each mailbox agents should work with. agentinbox keeps the credentials; agents never see them.`,footer:(0,W.jsx)(K,{onBack:t,onNext:n,nextDisabled:o===0,hint:o===0?`Connect at least one account`:void 0,extra:o>0&&(0,W.jsxs)(i,{variant:`outline`,onClick:()=>R(),children:[(0,W.jsx)(C,{}),` Connect another`]})}),children:[o===0&&(0,W.jsxs)(`div`,{className:`flex flex-col items-start gap-3 rounded-lg border border-dashed p-4`,children:[(0,W.jsxs)(`p`,{className:`text-sm`,children:[`A Google sign-in window opens. Choose the account, allow access, and you're back here.`,c&&` Because your public URL is plain http, you'll paste the final address back into agentinbox (we'll walk you through it).`]}),(0,W.jsxs)(i,{onClick:()=>R(),children:[(0,W.jsx)(C,{}),` Connect a Gmail account`]})]}),o>0&&(0,W.jsx)(ye,{}),(0,W.jsx)(Ee,{})]})}var X=p(a(),1);function Le({index:e,onBack:t,onNext:n}){let r=m(s.agents()),[a,o]=(0,X.useState)(),c=r.data??[],[l,d]=(0,X.useState)(!1),f=!a&&(c.length===0||l);return(0,W.jsx)(G,{index:e,title:a?`${a.agent.name} is ready`:`Create your first agent`,description:a?`Save its key, add agentinbox to your agent with a snippet, and test the connection.`:`An agent is anything that talks MCP: Claude Code, Codex, Cursor, your own app. It gets its own key and only the access you grant. Sending starts as drafts for you to review.`,footer:(0,W.jsx)(K,{onBack:t,onNext:n,nextLabel:`Finish setup`,nextDisabled:f&&c.length===0,hint:a?`Make sure you've saved the key`:void 0}),children:a?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Oe,{res:a}),(0,W.jsx)(Se,{agentId:a.agent.id})]}):f?(0,W.jsx)(k,{defaultName:c.length?``:`My first agent`,onCreated:o,onCancel:l?()=>d(!1):void 0}):(0,W.jsxs)(`div`,{className:`space-y-4`,children:[(0,W.jsxs)(`div`,{className:`flex items-start gap-3 rounded-lg border p-4`,children:[(0,W.jsx)(je,{className:`mt-0.5 size-5 shrink-0 text-chart-1`}),(0,W.jsxs)(`div`,{className:`space-y-1 text-sm`,children:[(0,W.jsxs)(`div`,{className:`font-medium`,children:[`You have `,c.length,` agent`,c.length===1?``:`s`,` already`]}),(0,W.jsx)(`p`,{className:`text-muted-foreground`,children:`Fine-tune permissions, connect snippets and webhooks from each agent's page.`})]})]}),(0,W.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[c.slice(0,4).map(e=>(0,W.jsx)(i,{variant:`outline`,size:`sm`,asChild:!0,children:(0,W.jsxs)(u,{to:`/agents/$agentId`,params:{agentId:e.id},children:[(0,W.jsx)(ce,{}),` `,e.name]})},e.id)),(0,W.jsx)(i,{variant:`ghost`,size:`sm`,onClick:()=>d(!0),children:`Create another`})]})]})})}var Z={createProject:`https://console.cloud.google.com/projectcreate`,gmailApi:e=>`https://console.cloud.google.com/apis/library/gmail.googleapis.com?project=${encodeURIComponent(e)}`,pubsubApi:e=>`https://console.cloud.google.com/apis/library/pubsub.googleapis.com?project=${encodeURIComponent(e)}`,authOverview:e=>`https://console.cloud.google.com/auth/overview?project=${encodeURIComponent(e)}`,authAudience:e=>`https://console.cloud.google.com/auth/audience?project=${encodeURIComponent(e)}`,authScopes:e=>`https://console.cloud.google.com/auth/scopes?project=${encodeURIComponent(e)}`,createClient:e=>`https://console.cloud.google.com/auth/clients/create?project=${encodeURIComponent(e)}`};function Re({index:e,onBack:t,onNext:n}){let{state:r,draft:i}=F(),[a,o]=(0,X.useState)(i.projectId??r?.gcpProjectId??``),[s,c]=(0,X.useState)(!1),l=a.trim(),u=h(l),d=Te.test(l),f=()=>{c(!0),d&&(N({projectId:l,projectConfirmed:!0}),n())};return(0,W.jsx)(G,{index:e,title:`Create a Google Cloud project`,description:`agentinbox uses your own Google Cloud project and OAuth app, so your mail never passes through anyone else's. It's free and takes a couple of minutes.`,footer:(0,W.jsx)(K,{onBack:t,onNext:f,nextDisabled:s&&!d}),children:(0,W.jsxs)(q,{children:[(0,W.jsxs)(J,{title:`Create a project (or pick an existing one)`,children:[(0,W.jsx)(`p`,{children:`Any name works, e.g. “agentinbox”. With Google Workspace, create it inside your organization.`}),(0,W.jsx)(Y,{href:Z.createProject,children:`Create project`})]}),(0,W.jsxs)(J,{title:`Paste the project ID`,done:d,children:[(0,W.jsxs)(`p`,{children:[`Find it on the project's dashboard or in the project picker at the top of Google Cloud. It's the lowercase ID (like`,` `,(0,W.jsx)(`code`,{className:`font-mono text-foreground`,children:`agentinbox-471203`}),`), not the display name or the project number.`]}),(0,W.jsxs)(D,{"data-invalid":s&&!!u,className:`max-w-sm`,children:[(0,W.jsx)(w,{htmlFor:`gcp-project`,className:`sr-only`,children:`Project ID`}),(0,W.jsx)(z,{id:`gcp-project`,className:`font-mono`,placeholder:`agentinbox-471203`,spellCheck:!1,autoComplete:`off`,value:a,onChange:e=>o(e.target.value.toLowerCase()),onBlur:()=>l&&c(!0),onKeyDown:e=>e.key===`Enter`&&f(),"aria-invalid":s&&!!u}),s&&u?(0,W.jsx)(E,{children:u}):(0,W.jsx)(T,{children:`The links below open in this project.`})]})]}),(0,W.jsxs)(J,{title:`Enable the Gmail API`,children:[(0,W.jsx)(`p`,{children:`Open the API page and click Enable.`}),(0,W.jsx)(Y,{href:d?Z.gmailApi(l):`#`,disabled:!d,children:`Enable Gmail API`})]}),(0,W.jsxs)(J,{title:`Enable the Cloud Pub/Sub API (recommended)`,children:[(0,W.jsx)(`p`,{children:`Only needed for real-time delivery (step 6), but enabling it now saves a trip back.`}),(0,W.jsx)(Y,{href:d?Z.pubsubApi(l):`#`,disabled:!d,children:`Enable Pub/Sub API`})]})]})})}function ze({index:e,onBack:t,onNext:n}){let{state:r,draft:i}=F(),a=m(s.googleClient()),o=i.projectId??r?.gcpProjectId??a.data?.projectId??``,c=i.appType??r?.googleAppType??a.data?.appType??void 0,l=!!a.data?.clientId&&!!a.data.hasSecret,u=a.data;return(0,W.jsx)(G,{index:e,title:`Create the OAuth client`,description:`The client is how agentinbox identifies itself to Google when you connect a mailbox.`,footer:(0,W.jsx)(K,{onBack:t,onNext:n,nextDisabled:!l,hint:l?void 0:`Save the client first`}),children:a.isPending?(0,W.jsx)(b,{className:`h-64`}):a.isError?(0,W.jsx)(S,{error:a.error,title:`Couldn't load the OAuth client`}):(0,W.jsxs)(q,{children:[(0,W.jsxs)(J,{title:`Create a Web application client`,children:[(0,W.jsxs)(`p`,{children:[`Application type: `,(0,W.jsx)(`strong`,{className:`text-foreground`,children:`Web application`}),`. Name: anything, e.g. agentinbox. Leave “Authorized JavaScript origins” empty.`]}),(0,W.jsx)(Y,{href:Z.createClient(o),disabled:!o,children:`Create OAuth client`})]}),(0,W.jsxs)(J,{title:`Add this exact Authorized redirect URI`,children:[(0,W.jsx)(`p`,{children:`Under “Authorized redirect URIs”, click Add URI and paste:`}),(0,W.jsx)(x,{value:u.redirectUri,size:`lg`}),u.callbackMode===`paste`&&(0,W.jsxs)(g,{variant:`info`,className:`text-foreground`,children:[(0,W.jsx)(A,{}),(0,W.jsx)(v,{children:`Why localhost?`}),(0,W.jsx)(_,{children:`Your public URL is plain http, and Google only accepts https or localhost redirects. After signing in, your browser will try to open this address; you'll paste it back into agentinbox. That's all paste mode means.`})]}),(0,W.jsx)(`p`,{children:`Then click Create.`})]}),(0,W.jsxs)(J,{title:`Paste the client ID and secret`,done:l,children:[(0,W.jsx)(`p`,{children:`Google shows both right after you click Create. Copy the secret now: newer clients only show it once (you can add a new one later).`}),l&&(0,W.jsxs)(`p`,{className:`flex items-center gap-1.5 text-foreground`,children:[(0,W.jsx)(j,{className:`size-4 text-success`}),` Saved. Paste new values below only if you want to replace them.`]}),(0,W.jsx)(`div`,{className:`max-w-xl pt-1`,children:(0,W.jsx)(ee,{view:u,projectId:o||void 0,appType:c,submitLabel:l?`Update client`:`Save client`,onSaved:()=>!l&&n()})})]})]})})}var Q={gmail:`https://www.googleapis.com/auth/gmail.modify`,pubsub:`https://www.googleapis.com/auth/pubsub`};function Be({index:e,onBack:t,onNext:n}){let{state:r,draft:i}=F(),a=i.projectId??r?.gcpProjectId??``,[o,s]=(0,X.useState)(i.appType??r?.googleAppType??void 0),[c,l]=(0,X.useState)(!!i.productionConfirmed||r?.googleAppType===`external`),u=!o||o===`external`&&!c;return(0,W.jsx)(G,{index:e,title:`Configure the OAuth consent screen`,description:`This is the screen you'll see when connecting Gmail. Only you (and anyone you connect) will ever see it.`,footer:(0,W.jsx)(K,{onBack:t,onNext:()=>{u||(N({appType:o,productionConfirmed:o===`external`?c:void 0}),n())},nextDisabled:u,hint:o?o===`external`&&!c?`Confirm the app is In production`:void 0:`Choose an audience`}),children:(0,W.jsxs)(q,{children:[(0,W.jsxs)(J,{title:`Open Google Auth Platform and click Get started`,children:[(0,W.jsxs)(`p`,{children:[`App name: `,(0,W.jsx)(`strong`,{className:`text-foreground`,children:`agentinbox`}),`. Support and contact email: your own. If the project already has a consent screen, open its Branding page instead.`]}),(0,W.jsx)(Y,{href:Z.authOverview(a),disabled:!a,children:`Open Google Auth Platform`})]}),(0,W.jsxs)(J,{title:`Choose the audience`,done:!!o,children:[(0,W.jsx)(`p`,{children:`Pick the same option here as in Google Cloud. It decides who can connect and how long access lasts.`}),(0,W.jsx)(O,{"aria-label":`Audience`,value:o,onChange:s,columns:2,choices:[{value:`internal`,icon:ke,title:`Internal`,badge:(0,W.jsx)(y,{variant:`secondary`,children:`Workspace`}),description:`Only accounts in your Google Workspace organization. No verification, no test users, and access never expires on its own. Not available for personal @gmail.com projects.`},{value:`external`,icon:Ae,title:`External`,badge:(0,W.jsx)(y,{variant:`secondary`,children:`@gmail.com`}),description:`Any Google account, including personal @gmail.com and other organizations. Must be published to In production (next step) or access dies after 7 days.`}]})]}),o===`external`&&(0,W.jsxs)(J,{title:`Publish the app: set it to In production`,done:c,children:[(0,W.jsxs)(g,{variant:`warning`,className:`text-foreground`,children:[(0,W.jsx)(M,{}),(0,W.jsx)(v,{children:`Don't skip this. Apps left in Testing break after 7 days.`}),(0,W.jsxs)(_,{children:[(0,W.jsxs)(`p`,{children:[`While the publishing status is `,(0,W.jsx)(`strong`,{children:`Testing`}),`, Google expires refresh tokens after 7 days and every connected account silently disconnects. Adding yourself as a test user does `,(0,W.jsx)(`strong`,{children:`not`}),` fix this.`]}),(0,W.jsxs)(`p`,{children:[`Go to `,(0,W.jsx)(`strong`,{children:`Audience`}),`, click `,(0,W.jsx)(`strong`,{children:`Publish app`}),` and confirm. You don't need to submit for verification to use it with your own accounts.`]})]})]}),(0,W.jsx)(Y,{href:Z.authAudience(a),disabled:!a,children:`Open Audience`}),(0,W.jsxs)(`div`,{className:`flex items-start gap-2 pt-1`,children:[(0,W.jsx)(Ce,{id:`in-production`,checked:c,onCheckedChange:e=>l(e===!0),className:`mt-0.5`}),(0,W.jsxs)(we,{htmlFor:`in-production`,className:`text-sm leading-snug font-normal text-foreground`,children:[`The publishing status says `,(0,W.jsx)(`strong`,{children:`In production`})]})]}),(0,W.jsxs)(`p`,{className:`flex items-start gap-1.5 text-xs`,children:[(0,W.jsx)(Me,{className:`mt-px size-3.5 shrink-0`}),`When you connect an account you'll see “Google hasn't verified this app”. That's expected for your own app and safe to click through (Advanced → Go to agentinbox).`]})]}),(0,W.jsxs)(J,{title:`Add the scopes agentinbox needs`,children:[(0,W.jsxs)(`p`,{children:[`Open `,(0,W.jsx)(`strong`,{children:`Data access`}),`, click `,(0,W.jsx)(`strong`,{children:`Add or remove scopes`}),`, paste these under “Manually add scopes”, then Update and Save.`]}),(0,W.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,W.jsx)(x,{value:Q.gmail}),(0,W.jsx)(`p`,{className:`text-xs`,children:`Read, draft, send and label mail. Agents only get what their grants allow.`}),(0,W.jsx)(x,{value:Q.pubsub}),(0,W.jsx)(`p`,{className:`text-xs`,children:`Lets agentinbox set up real-time delivery for you (step 6). Skip it if you'll use polling.`})]}),(0,W.jsx)(Y,{href:Z.authScopes(a),disabled:!a,children:`Open Data access`})]})]})})}function $({index:e,onBack:t,onNext:n}){let{statuses:r}=F(),i=r.pubsub===`done`;return(0,W.jsxs)(G,{index:e,title:`Turn on real-time delivery`,description:`Optional. Decides how fast agents hear about new mail.`,footer:(0,W.jsx)(K,{onBack:t,onNext:()=>{i||N({pubsubSkipped:!0}),n()},nextLabel:i?`Continue`:`Skip, use polling`}),children:[(0,W.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,W.jsxs)(`div`,{className:`space-y-1.5 rounded-lg border p-3 text-sm`,children:[(0,W.jsxs)(`div`,{className:`flex items-center gap-2 font-medium`,children:[(0,W.jsx)(ie,{className:`size-4 text-chart-1`}),` Real-time (Pub/Sub)`]}),(0,W.jsx)(`p`,{className:`text-muted-foreground`,children:`Gmail announces every change to a Pub/Sub topic in your project within seconds; agentinbox picks it up. Works even when this machine isn't reachable from the internet. Needs the Pub/Sub API enabled and project owner/editor rights for the account you connected.`})]}),(0,W.jsxs)(`div`,{className:`space-y-1.5 rounded-lg border p-3 text-sm`,children:[(0,W.jsxs)(`div`,{className:`flex items-center gap-2 font-medium`,children:[(0,W.jsx)(ne,{className:`size-4 text-muted-foreground`}),` Polling`]}),(0,W.jsx)(`p`,{className:`text-muted-foreground`,children:`agentinbox asks Gmail for changes on an interval (30 seconds by default). Nothing to set up; new mail just takes a little longer to show up. A perfectly good choice, and the automatic fallback.`})]})]}),(0,W.jsx)(re,{compact:!0})]})}function Ve(e){try{let t=new URL(e);return t.protocol===`https:`?`https`:[`localhost`,`127.0.0.1`,`[::1]`].includes(t.hostname)?`localhost`:`http`}catch{return null}}function He({kind:e}){return e===`https`?(0,W.jsxs)(g,{variant:`success`,children:[(0,W.jsx)(j,{}),(0,W.jsx)(v,{children:`HTTPS: everything works directly`}),(0,W.jsx)(_,{children:`Google redirects straight back here after sign-in, and agents anywhere can reach the MCP endpoint.`})]}):e===`localhost`?(0,W.jsxs)(g,{variant:`info`,children:[(0,W.jsx)(A,{}),(0,W.jsx)(v,{children:`Localhost: fine if your agents run on this machine`}),(0,W.jsx)(_,{children:`Google sign-in redirects back directly. Agents on other machines can't reach localhost, though; if they run elsewhere, use this machine's network address or an HTTPS address instead.`})]}):(0,W.jsxs)(g,{variant:`warning`,children:[(0,W.jsx)(M,{}),(0,W.jsx)(v,{children:`Plain HTTP on a network address: works, with one extra step`}),(0,W.jsx)(_,{children:`Google only redirects to HTTPS or localhost addresses. When you connect a Gmail account, you'll copy the address your browser lands on and paste it back here ("paste mode"). Everything else works normally. To skip that step, put agentinbox behind HTTPS (for example Caddy, Tailscale Serve or Cloudflare Tunnel).`})]})}function Ue({index:e,onNext:t}){let n=m(s.settings()),r=m(s.system());return n.isPending?(0,W.jsx)(b,{className:`h-96 rounded-xl`}):n.isError?(0,W.jsx)(S,{error:n.error,title:`Couldn't load settings`}):(0,W.jsx)(We,{index:e,onNext:t,settings:n.data,addresses:r.data?.addresses??[]})}function We({index:e,onNext:t,settings:n,addresses:r}){let a=l(),[o,s]=(0,X.useState)(n.publicUrl),u=te(o),d=u?null:Ve(o.trim()),p=[...new Set([window.location.origin,...r])].filter(e=>e!==o),m=De({mutationFn:e=>c(`/api/settings`,{method:`PATCH`,body:{publicUrl:e}}),errorTitle:`Couldn't save the public URL`,onSuccess:e=>{a.setQueryData(f.settings,e);for(let e of[f.googleClient,f.system])a.invalidateQueries({queryKey:e});N({urlConfirmed:!0}),t()}}),h=()=>{if(u)return;let e=o.trim().replace(/\/+$/,``);e===n.publicUrl?(N({urlConfirmed:!0}),t()):m.mutate(e)};return(0,W.jsxs)(G,{index:e,title:`Confirm the public URL`,description:`The address of this agentinbox instance. Google sends you back to it after sign-in, and it's the MCP endpoint you give your agents.`,footer:(0,W.jsx)(K,{onNext:h,nextDisabled:!!u,pending:m.isPending,nextLabel:`Looks right`}),children:[(0,W.jsxs)(D,{"data-invalid":!!u,children:[(0,W.jsx)(w,{htmlFor:`setup-url`,children:`Public URL`}),(0,W.jsx)(z,{id:`setup-url`,className:`font-mono`,inputMode:`url`,spellCheck:!1,value:o,onChange:e=>s(e.target.value),onKeyDown:e=>e.key===`Enter`&&h(),"aria-invalid":!!u}),u?(0,W.jsx)(E,{children:u}):(0,W.jsxs)(T,{children:[`Agents will connect to `,o.trim().replace(/\/+$/,``),`/mcp`]}),p.length>0&&(0,W.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5 pt-1 text-xs text-muted-foreground`,children:[(0,W.jsx)(`span`,{children:`Use:`}),p.map(e=>(0,W.jsx)(i,{type:`button`,variant:`outline`,size:`xs`,className:`font-mono`,onClick:()=>s(e),children:e},e))]})]}),d&&(0,W.jsx)(He,{kind:d}),(0,W.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`You can change this later in Settings. If you do, update the redirect URI on your Google OAuth client too.`})]})}var Ge={url:Ue,project:Re,consent:Be,client:ze,accounts:Ie,pubsub:$,agent:Le};function Ke(){let{step:e}=P.useSearch(),t=ae({from:P.fullPath}),n=F();if(n.query.isPending)return(0,W.jsxs)(`div`,{className:`space-y-6`,children:[(0,W.jsx)(b,{className:`h-14 w-72`}),(0,W.jsxs)(`div`,{className:`grid gap-6 lg:grid-cols-[14rem_1fr]`,children:[(0,W.jsx)(b,{className:`hidden h-80 lg:block`}),(0,W.jsx)(b,{className:`h-96`})]})]});if(n.query.isError)return(0,W.jsx)(ve,{error:n.query.error,onRetry:()=>void n.query.refetch()});let i=e??n.firstTodo??`agent`,a=I.indexOf(i),o=e=>{t({search:{step:e}}),window.scrollTo({top:0,behavior:`smooth`})},s=()=>{let e=I[a+1];e?o(e):(r.success(`Setup complete`,{description:`Your agents can use Gmail now. The overview shows what they're up to.`}),t({to:`/`}))},c=a>0?()=>o(I[a-1]):void 0,l=Ge[i];return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(ge,{title:`Get started`,description:`About 10 minutes, mostly in Google Cloud. Your progress is saved, so you can leave and pick up where you left off.`}),(0,W.jsxs)(`div`,{className:`grid items-start gap-6 lg:grid-cols-[14rem_1fr]`,children:[(0,W.jsx)(`div`,{className:`lg:sticky lg:top-20`,children:(0,W.jsx)(Fe,{current:i,statuses:n.statuses,onSelect:o})}),(0,W.jsx)(`div`,{className:`min-w-0`,children:(0,W.jsx)(l,{index:a,onBack:c,onNext:s},i)})]})]})}export{Ke as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ht as e,mt as t,n,vt as r}from"./queries-a3M5_loa.js";import{t as i}from"./useQuery-DAhf1YDH.js";import{c as a,l as o,u as s}from"./card-EQTpqntn.js";import{i as c,n as l,s as u,t as d}from"./common-PG6weTqi.js";import{t as f}from"./key-round-CVIZRCLM.js";import{t as p}from"./shield-alert-CbFgd06X.js";import{i as m,n as h,r as g,t as _}from"./tabs-ySiz7Mni.js";var v=r(e(),1),y=new Map,b=new Set;function x(e,t){y.set(e,t),b.forEach(e=>e())}function S(e){y.delete(e),b.forEach(e=>e())}function C(e){return(0,v.useSyncExternalStore)(e=>(b.add(e),()=>b.delete(e)),()=>y.get(e))}var w=t();function T(e,t){let n=`${e}/mcp`;return{claude:`claude mcp add --transport http agentinbox ${n} \\\n --header "Authorization: Bearer ${t}"`,codexToml:`[mcp_servers.agentinbox]\nurl = "${n}"\nbearer_token_env_var = "AGENTINBOX_API_KEY"`,codexEnv:`export AGENTINBOX_API_KEY="${t}"`,cursor:JSON.stringify({mcpServers:{agentinbox:{url:n,headers:{Authorization:`Bearer ${t}`}}}},null,2),generic:JSON.stringify({mcpServers:{agentinbox:{type:`http`,url:n,headers:{Authorization:`Bearer ${t}`}}}},null,2),skill:`npx agentinbox-cli skill install --url ${e}`,mcpUrl:n,skillUrl:`${e}/skill.md`}}function E({apiKey:e}){let t=T(i(n.settings()).data?.publicUrl??window.location.origin,e??`<your-agentinbox-key>`);return(0,w.jsxs)(`div`,{className:`space-y-3`,children:[!e&&(0,w.jsxs)(`p`,{className:`flex items-start gap-2 rounded-lg border border-dashed px-3 py-2 text-xs text-muted-foreground`,children:[(0,w.jsx)(f,{className:`mt-px size-3.5 shrink-0`}),(0,w.jsxs)(`span`,{children:[`Replace `,(0,w.jsx)(`code`,{className:`font-mono text-foreground`,children:`<your-agentinbox-key>`}),` with the agent's API key. Keys are only shown once; if you've lost it, rotate the key to get a new one.`]})]}),(0,w.jsxs)(_,{defaultValue:`claude`,children:[(0,w.jsx)(`div`,{className:`-mx-1 overflow-x-auto px-1 pb-1`,children:(0,w.jsxs)(g,{children:[(0,w.jsx)(m,{value:`claude`,children:`Claude Code`}),(0,w.jsx)(m,{value:`codex`,children:`Codex`}),(0,w.jsx)(m,{value:`cursor`,children:`Cursor`}),(0,w.jsx)(m,{value:`generic`,children:`Other MCP`}),(0,w.jsx)(m,{value:`skill`,children:`Skill`})]})}),(0,w.jsxs)(h,{value:`claude`,className:`space-y-2`,children:[(0,w.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Run in a terminal on the machine where Claude Code runs:`}),(0,w.jsx)(d,{code:t.claude})]}),(0,w.jsxs)(h,{value:`codex`,className:`space-y-2`,children:[(0,w.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Add to `,(0,w.jsx)(`code`,{className:`font-mono text-foreground`,children:`~/.codex/config.toml`}),`:`]}),(0,w.jsx)(d,{code:t.codexToml,title:`~/.codex/config.toml`}),(0,w.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Then set the key in your shell profile (Codex reads it from the environment):`}),(0,w.jsx)(d,{code:t.codexEnv,title:`~/.zshrc or ~/.bashrc`})]}),(0,w.jsxs)(h,{value:`cursor`,className:`space-y-2`,children:[(0,w.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Add to `,(0,w.jsx)(`code`,{className:`font-mono text-foreground`,children:`~/.cursor/mcp.json`}),` (or the project's`,` `,(0,w.jsx)(`code`,{className:`font-mono text-foreground`,children:`.cursor/mcp.json`}),`):`]}),(0,w.jsx)(d,{code:t.cursor,title:`~/.cursor/mcp.json`})]}),(0,w.jsxs)(h,{value:`generic`,className:`space-y-2`,children:[(0,w.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Any MCP client with Streamable HTTP support: server URL `,(0,w.jsx)(`code`,{className:`font-mono text-foreground`,children:t.mcpUrl}),` with a bearer token.`]}),(0,w.jsx)(d,{code:t.generic,title:`mcp.json`})]}),(0,w.jsxs)(h,{value:`skill`,className:`space-y-2`,children:[(0,w.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`The agentinbox skill teaches agents how to use the tools well: triage, replying in threads, handling approvals and treating email content as untrusted data. Install it next to your agent:`}),(0,w.jsx)(d,{code:t.skill}),(0,w.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Or read it first: `,(0,w.jsx)(c,{href:t.skillUrl,children:t.skillUrl})]})]})]})]})}function D({apiKey:e}){return(0,w.jsxs)(`div`,{className:`space-y-3`,children:[(0,w.jsx)(l,{value:e,size:`lg`}),(0,w.jsxs)(a,{variant:`warning`,children:[(0,w.jsx)(p,{}),(0,w.jsx)(s,{children:`Copy this key now. It won't be shown again.`}),(0,w.jsx)(o,{children:`agentinbox only stores a hash of it. Treat it like a password: anyone with it can act as this agent within its grants. If it leaks or gets lost, rotate the key.`})]})]})}function O({res:e}){return(0,w.jsxs)(`div`,{className:`space-y-5`,children:[(0,w.jsxs)(`div`,{className:`space-y-2`,children:[(0,w.jsxs)(u,{children:[`API key for `,e.agent.name]}),(0,w.jsx)(D,{apiKey:e.apiKey})]}),(0,w.jsxs)(`div`,{className:`space-y-2`,children:[(0,w.jsx)(u,{children:`Connect your agent`}),(0,w.jsx)(E,{apiKey:e.apiKey})]})]})}var k={capabilities:[`read`,`draft`,`send`],labelScope:null,sendMode:`draft_only`,allowTo:[],replyOnly:!1,maxSendsPerHour:null,maxSendsPerDay:null},A=[{id:`drafts`,label:`Read and draft (recommended)`,description:`Reads mail; anything it sends becomes a Gmail draft for you to review and send.`,capabilities:[`read`,`draft`,`send`],sendMode:`draft_only`},{id:`read`,label:`Read only`,description:`Search and read mail, and receive events. Can't draft, send or change anything.`,capabilities:[`read`],sendMode:`draft_only`},{id:`approval`,label:`Send with my approval`,description:`Reads and organizes mail; each send waits in Approvals until you approve it.`,capabilities:[`read`,`draft`,`send`,`organize`],sendMode:`approval`},{id:`full`,label:`Full access`,description:`Reads, organizes, trashes and sends directly. Only for agents you fully trust.`,capabilities:[`read`,`draft`,`send`,`organize`,`trash`],sendMode:`direct`}];function j(e){return{...k,capabilities:[...e.capabilities],sendMode:e.sendMode}}function M(e){return{capabilities:e.capabilities,labelScope:e.labelScope,sendMode:e.sendMode,allowTo:e.allowTo,replyOnly:e.replyOnly,maxSendsPerHour:e.maxSendsPerHour,maxSendsPerDay:e.maxSendsPerDay}}function N(e){if(/\s/.test(e))return`no spaces allowed`;let t=e.split(`@`);return t.length!==2||!t[0]||!t[1]?`use name@domain or *@domain`:!/^[a-z0-9*][a-z0-9.*-]*\.[a-z*]{2,}$/i.test(t[1])&&t[1]!==`*`?`the domain doesn't look right`:null}var P=(e,t)=>JSON.stringify(F(e))===JSON.stringify(F(t));function F(e){return{...e,capabilities:[...e.capabilities].sort(),labelScope:e.labelScope?[...e.labelScope].sort():null,allowTo:[...e.allowTo].sort()}}export{M as a,D as c,x as d,C as f,P as i,E as l,A as n,N as o,j as r,O as s,k as t,S as u};
|