nodal-agents 0.3.0 → 0.3.7
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/README.md +20 -12
- package/cli.js +57 -2
- package/migrations/0021_entities_root_agent_grants.sql +22 -0
- package/migrations/0022_approval_requests_executed_at.sql +12 -0
- package/migrations/meta/_journal.json +14 -0
- package/package.json +1 -1
- package/runner.js +1791 -1388
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/app-path-routes-manifest.json +1 -1
- package/web/.next/build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/agents/[id]/edit/page.js +3 -3
- package/web/.next/server/app/(dashboard)/agents/[id]/edit/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/agents/[id]/edit/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/agents/[id]/telegram/page.js +2 -2
- package/web/.next/server/app/(dashboard)/agents/[id]/telegram/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/agents/[id]/telegram/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/agents/page.js +2 -2
- package/web/.next/server/app/(dashboard)/agents/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/agents/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/approvals/page.js +2 -2
- package/web/.next/server/app/(dashboard)/approvals/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/approvals/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/automations/page.js +2 -2
- package/web/.next/server/app/(dashboard)/automations/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/automations/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/billing/page.js +2 -2
- package/web/.next/server/app/(dashboard)/billing/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/billing/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/connectors/page.js +2 -2
- package/web/.next/server/app/(dashboard)/connectors/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/connectors/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/credentials/page.js +2 -2
- package/web/.next/server/app/(dashboard)/credentials/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/credentials/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/jobs/[id]/page.js +2 -2
- package/web/.next/server/app/(dashboard)/jobs/[id]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/jobs/[id]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/jobs/page.js +2 -2
- package/web/.next/server/app/(dashboard)/jobs/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/jobs/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/llm-providers/page.js +2 -2
- package/web/.next/server/app/(dashboard)/llm-providers/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/llm-providers/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/logs/page.js +1 -1
- package/web/.next/server/app/(dashboard)/logs/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/logs/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/mcp/page.js +1 -1
- package/web/.next/server/app/(dashboard)/mcp/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/mcp/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/memories/page.js +2 -2
- package/web/.next/server/app/(dashboard)/memories/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/memories/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/page.js +3 -3
- package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/settings/page.js +63 -2
- package/web/.next/server/app/(dashboard)/settings/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/skills/[id]/edit/page.js +1 -1
- package/web/.next/server/app/(dashboard)/skills/[id]/edit/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/skills/[id]/edit/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/skills/new/page.js +2 -1745
- package/web/.next/server/app/(dashboard)/skills/new/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/skills/new/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/skills/page.js +2 -2
- package/web/.next/server/app/(dashboard)/skills/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error.html +1 -1
- package/web/.next/server/app/_global-error.rsc +2 -2
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +2 -2
- package/web/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_index.segment.rsc +2 -2
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_not-found.html +1 -1
- package/web/.next/server/app/_not-found.rsc +3 -3
- package/web/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
- package/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/web/.next/server/app/api/oauth/[provider]/callback/route.js +1 -1
- package/web/.next/server/app/api/oauth/[provider]/start/route.js +1 -1
- package/web/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/onboarding.html +1 -1
- package/web/.next/server/app/onboarding.rsc +3 -3
- package/web/.next/server/app/onboarding.segments/_full.segment.rsc +3 -3
- package/web/.next/server/app/onboarding.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/onboarding.segments/_index.segment.rsc +3 -3
- package/web/.next/server/app/onboarding.segments/_tree.segment.rsc +2 -2
- package/web/.next/server/app/onboarding.segments/onboarding/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/onboarding.segments/onboarding.segment.rsc +1 -1
- package/web/.next/server/app-paths-manifest.json +1 -1
- package/web/.next/server/chunks/211.js +1 -0
- package/web/.next/server/chunks/319.js +1 -0
- package/web/.next/server/chunks/{5832.js → 3786.js} +1 -1
- package/web/.next/server/chunks/{4242.js → 4155.js} +1 -1
- package/web/.next/server/chunks/4574.js +1 -1
- package/web/.next/server/chunks/6184.js +1 -0
- package/web/.next/server/chunks/6937.js +16 -0
- package/web/.next/server/chunks/7741.js +1223 -1
- package/web/.next/server/chunks/9977.js +1 -0
- package/web/.next/server/middleware-build-manifest.js +1 -1
- package/web/.next/server/pages/404.html +1 -1
- package/web/.next/server/pages/500.html +1 -1
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +1 -1
- package/web/.next/static/chunks/374-60415230f01c844a.js +1 -0
- package/web/.next/static/chunks/5070-4385fb454f6ec84b.js +62 -0
- package/web/.next/static/chunks/639-79c3c2ac769ef007.js +1 -0
- package/web/.next/static/chunks/8666-90a1f5d99b79411e.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/agents/[id]/edit/page-daa833e779c2b465.js +2 -0
- package/web/.next/static/chunks/app/(dashboard)/agents/[id]/telegram/page-e6b35d5f361044a9.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/agents/page-b58294bf588f4581.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/approvals/{page-78f89fc75e0098e3.js → page-b9e504918d043b6d.js} +1 -1
- package/web/.next/static/chunks/app/(dashboard)/automations/page-70005fabd08ae4a5.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/connectors/page-e12174534c2c2acf.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/credentials/page-f1e797e327ecdf7c.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/jobs/[id]/page-40172a14d0b1368f.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/jobs/page-d4a3a16745e02fd1.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/layout-d01f5919f54fb37a.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/llm-providers/page-90fb785e2ab32759.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/logs/page-b814deb9854b0cb5.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/mcp/page-efb99104821983ce.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/memories/page-aa46f5f7efbfa262.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/page-fc49d7ed8e472118.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/settings/page-550fcfa4184838ea.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/skills/[id]/edit/page-5fab5bdd950d7037.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/skills/new/page-86cfe805e82b43aa.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/skills/page-54c6adeb65475a1a.js +1 -0
- package/web/.next/static/css/e7183ce0b0791ec7.css +3 -0
- package/web/.next/server/chunks/1985.js +0 -1
- package/web/.next/server/chunks/2385.js +0 -1
- package/web/.next/server/chunks/2456.js +0 -1
- package/web/.next/server/chunks/2734.js +0 -1
- package/web/.next/server/chunks/3455.js +0 -1
- package/web/.next/server/chunks/3771.js +0 -1
- package/web/.next/server/chunks/414.js +0 -16
- package/web/.next/server/chunks/5786.js +0 -1223
- package/web/.next/server/chunks/6263.js +0 -1
- package/web/.next/server/chunks/9427.js +0 -1
- package/web/.next/server/chunks/9682.js +0 -1
- package/web/.next/static/chunks/3141-f595f19634be6813.js +0 -1
- package/web/.next/static/chunks/4239-99af3d7559fd9ec1.js +0 -1
- package/web/.next/static/chunks/5365-f17cb5257d2e5cd5.js +0 -1
- package/web/.next/static/chunks/9457-a94614afa0c2954c.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/agents/[id]/edit/page-f6f39ebe8d6fb019.js +0 -2
- package/web/.next/static/chunks/app/(dashboard)/agents/[id]/telegram/page-8f2ca5f7fb70eab4.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/agents/page-d2e35b0af87cdc0b.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/automations/page-7f71b6201decf4e5.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/connectors/page-6ccde8b8b9197d2f.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/credentials/page-679ca09e4625b70f.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/jobs/[id]/page-1740cbacc93cb4ac.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/jobs/page-d340869dc040dc5d.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/layout-c63442ae0b085dcc.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/llm-providers/page-2f472dc5ade5697f.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/logs/page-34e669d9863bdd6e.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/mcp/page-ad271be896b650a9.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/memories/page-0eed8d3610720c33.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/page-fe750fe3304e8025.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/settings/page-499e32816fa8881b.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/skills/[id]/edit/page-6a4102dd95d3a6e1.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/skills/new/page-ca70dd7b9f24b76b.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/skills/page-472bb16429cd2798.js +0 -1
- package/web/.next/static/css/845089bde6c9e6fb.css +0 -3
- /package/web/.next/static/{RdognT8Zq7jK6wHyNY5k3 → 0Ja3V81w-79oY4P3asE4L}/_buildManifest.js +0 -0
- /package/web/.next/static/{RdognT8Zq7jK6wHyNY5k3 → 0Ja3V81w-79oY4P3asE4L}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[797],{10880:(e,t,r)=>{"use strict";r.d(t,{default:()=>h});var s=r(3680),n=r(78604),l=r(51869),a=r(27540),i=r(39504),o=r(84702),d=r(64678);let c=(0,d.createServerReference)("4031e908f0b51185160dae8c5e4dbb1e3178ccc82c",d.callServer,void 0,d.findSourceMapURL,"createAgentAction");var u=r(63217),x=r(37955),m=r(79716);function h(e){var t,r;let d="edit"===e.mode,h=(0,a.useRouter)(),p=(0,n.useRef)(null),[g,b]=(0,n.useTransition)(),[f,v]=(0,n.useState)(d),k=d?(t=e.initial.role??null,r=e.initial.orchestratorMode??null,"orchestrator"===t&&"planner"===r?"planner":"orchestrator"===t?"router":"worker"):"worker",[j,y]=(0,n.useState)(k),[N,w]=(0,n.useState)(d?e.initial.subAgentIds:[]),S=(0,n.useMemo)(()=>e.llmKeys.filter(e=>e.isActive),[e.llmKeys]),C=(d?e.initial.llmKeyId:null)??S[0]?.id??"",[R,A]=(0,n.useState)(C),[M,L]=(0,n.useState)(d?e.initial.model??"":""),[$,E]=(0,n.useState)(d?e.initial.avatarUrl??null:null),P=(0,n.useMemo)(()=>e.llmKeys.find(e=>e.id===R)??null,[e.llmKeys,R]),D=(0,n.useMemo)(()=>(0,m.P)(M),[M]),F=(0,n.useMemo)(()=>S.filter(e=>(0,m.$)(M,e.provider)),[S,M]),I=!P||(0,m.$)(M,P.provider);function W(t){let r=e.llmKeys.find(e=>e.id===t),s=P?.defaultModel??null;A(t),r?.defaultModel&&(!M||M===s)&&L(r.defaultModel)}function _(e){if(L(e),!P||(0,m.$)(e,P.provider))return;let t=S.filter(t=>(0,m.$)(e,t.provider));1===t.length&&t[0]&&(A(t[0].id),i.oR.success(`Switched provider to ${(0,u.R)(t[0].provider)} (matches ${e})`))}function q(t){t.preventDefault();let r=new FormData(t.currentTarget);if(d&&"edit"===e.mode){let t={id:e.initial.id,name:r.get("name"),personality:r.get("personality"),model:M,llmKeyId:R||null,role:j,subAgentIds:"worker"===j?[]:N,avatarUrl:$};b(async()=>{let e=await (0,o.f)(t);e.ok?(i.oR.success("Agent updated"),h.push("/agents")):i.oR.error(e.message)})}else{let e={slug:r.get("slug"),name:r.get("name"),personality:r.get("personality"),model:M,llmKeyId:R||void 0,role:j,subAgentIds:"worker"===j?[]:N,avatarUrl:$};b(async()=>{let t=await c(e);t.ok?(i.oR.success("Agent created"),p.current?.reset(),y("worker"),w([]),A(S[0]?.id??""),L(""),E(null),v(!1)):i.oR.error(t.message)})}}function z(e){w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])}(0,n.useEffect)(()=>{if(f&&!d)return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e);function e(e){"Escape"===e.key&&v(!1)}},[f,d]);let K=e.agents??[],T=0===S.length,U="worker"!==j,O=0===K.length,G=!I&&P?(0,s.jsxs)("div",{role:"alert","data-testid":"model-provider-mismatch",className:"mt-1 px-2 py-1.5 rounded border border-warn/30 bg-warn-bg text-[11px] text-warn space-y-1",children:[(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"font-semibold",children:"Provider mismatch:"})," ",(0,s.jsx)("span",{className:"font-mono",children:M})," looks like it needs"," ",(0,s.jsx)("span",{className:"font-semibold",children:Array.from(D).map(e=>(0,u.R)(e)).join(" or ")}),", but your selected key is"," ",(0,s.jsx)("span",{className:"font-semibold",children:(0,u.R)(P.provider)}),"."]}),F.length>0?(0,s.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(0,s.jsx)("span",{className:"text-warn/80",children:"Switch to:"}),F.map(e=>(0,s.jsxs)("button",{type:"button",onClick:()=>A(e.id),className:"px-1.5 py-0.5 rounded border border-warn/30 text-warn hover:bg-warn-bg font-medium",children:[e.nickname??(0,u.R)(e.provider)," (",(0,u.R)(e.provider),")"]},e.id))]}):(0,s.jsxs)("p",{children:["No compatible active key."," ",(0,s.jsx)("a",{href:"/settings",className:"underline hover:text-warn",children:"Add one in Settings → LLM providers"}),"."]})]}):null;if(d){let t=e.initial;return(0,s.jsxs)("form",{ref:p,onSubmit:q,className:"w-full max-w-lg space-y-4",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-ink",children:"Edit agent"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-xs text-ink-3 mb-1",htmlFor:"agent-slug",children:"Slug"}),(0,s.jsx)("input",{id:"agent-slug",name:"slug",readOnly:!0,defaultValue:t.slug,title:"Slug is not editable",className:"w-full bg-hover border border-rule rounded-lg px-3 py-2 text-sm text-ink-3 cursor-not-allowed"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-xs text-ink-3 mb-1",htmlFor:"agent-name",children:"Name"}),(0,s.jsx)("input",{id:"agent-name",name:"name",required:!0,defaultValue:t.name,placeholder:"My Agent",className:"w-full bg-hover border border-rule rounded-lg px-3 py-2 text-sm text-ink placeholder:text-ink-4 focus:border-ink-3 focus:outline-none"})]})]}),(0,s.jsx)(x.A,{value:$,onChange:E}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-xs text-ink-3 mb-1",htmlFor:"agent-personality",children:"Personality / System prompt"}),(0,s.jsx)("textarea",{id:"agent-personality",name:"personality",required:!0,rows:6,defaultValue:t.personality,placeholder:"You are a helpful assistant...",className:"w-full bg-hover border border-rule rounded-lg px-3 py-2 text-sm text-ink placeholder:text-ink-4 focus:border-ink-3 focus:outline-none resize-y"})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-xs text-ink-3 mb-1",htmlFor:"agent-llm-key",children:"LLM provider"}),T?(0,s.jsxs)("p",{className:"text-xs text-warn mt-1",children:["No active LLM providers. Add one in"," ",(0,s.jsx)("a",{href:"/settings",className:"underline",children:"Settings → LLM providers"}),"."]}):(0,s.jsx)("select",{id:"agent-llm-key",value:R,onChange:e=>W(e.target.value),required:!0,className:"w-full bg-hover border border-rule rounded-lg px-3 py-2 text-sm text-ink focus:border-ink-3 focus:outline-none",children:S.map(e=>(0,s.jsx)("option",{value:e.id,children:(e.nickname??(0,u.R)(e.provider))+" ("+(0,u.R)(e.provider)+")"},e.id))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-xs text-ink-3 mb-1",htmlFor:"agent-model",children:"Model"}),(0,s.jsx)("input",{id:"agent-model",name:"model",type:"text",required:!0,value:M,onChange:e=>_(e.target.value),placeholder:P?.defaultModel??"e.g. claude-haiku-4-5-20251001",className:"w-full bg-hover border border-rule rounded-lg px-3 py-2 text-sm text-ink placeholder:text-ink-4 focus:border-ink-3 focus:outline-none font-mono"}),G]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-xs text-ink-3 mb-1",htmlFor:"agent-role",children:"Role"}),(0,s.jsxs)("select",{id:"agent-role",value:j,onChange:e=>y(e.target.value),className:"w-full bg-hover border border-rule rounded-lg px-3 py-2 text-sm text-ink focus:border-ink-3 focus:outline-none",children:[(0,s.jsx)("option",{value:"worker",children:"Worker — runs its own tools and tasks"}),(0,s.jsx)("option",{value:"router",children:"Router — delegates to one sub-agent at a time"}),(0,s.jsx)("option",{value:"planner",children:"Planner — creates parallel tasks for sub-agents"})]})]}),U&&(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{className:"block text-xs text-ink-3 mb-1",children:["Sub-agents ",(0,s.jsxs)("span",{className:"text-ink-4",children:["(",N.length," selected)"]})]}),O?(0,s.jsx)("p",{className:"text-xs text-warn mt-1",children:"Create at least one worker agent first — orchestrators need someone to delegate to."}):(0,s.jsx)("div",{className:"max-h-40 overflow-y-auto bg-hover border border-rule rounded-lg divide-y divide-neutral-800",children:K.map(e=>{let t=N.includes(e.id);return(0,s.jsxs)("label",{className:"flex items-center gap-2 px-3 py-2 text-sm cursor-pointer hover:bg-hover/80",children:[(0,s.jsx)("input",{type:"checkbox",checked:t,onChange:()=>z(e.id),className:"accent-violet-500"}),(0,s.jsx)("span",{className:"text-ink",children:e.name}),(0,s.jsx)("span",{className:"font-mono text-xs text-ink-3 ml-auto",children:e.slug})]},e.id)})})]}),(0,s.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,s.jsx)("button",{type:"submit",disabled:g||T||!I,title:I?void 0:"Pick a key that matches the model first",className:"px-4 py-2 text-sm font-semibold bg-ink text-canvas rounded-lg hover:brightness-[0.92] transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:g?"Saving…":"Save changes"}),(0,s.jsx)("button",{type:"button",onClick:()=>h.push("/agents"),className:"px-4 py-2 text-sm font-medium border border-rule text-ink-3 rounded-lg hover:border-rule transition-colors",children:"Cancel"})]})]})}let V=f?(0,l.createPortal)((0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"fixed inset-0 bg-black/60 z-40 animate-[fadeIn_150ms_ease]",onClick:()=>v(!1),"aria-hidden":"true"}),(0,s.jsx)("div",{role:"dialog","aria-modal":"true","aria-label":"New agent",className:"fixed inset-0 z-50 flex items-center justify-center p-4 pointer-events-none",children:(0,s.jsxs)("form",{ref:p,onSubmit:q,className:"pointer-events-auto w-full max-w-lg max-h-[90vh] overflow-y-auto bg-paper border border-rule-2 rounded-xl p-6 space-y-4 shadow-2xl animate-[scaleIn_150ms_ease]",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-ink",children:"New agent"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-xs text-ink-3 mb-1",htmlFor:"agent-slug",children:"Slug"}),(0,s.jsx)("input",{id:"agent-slug",name:"slug",required:!0,pattern:"[a-z0-9\\-]+",placeholder:"my-agent",className:"w-full bg-hover border border-rule rounded-lg px-3 py-2 text-sm text-ink placeholder:text-ink-4 focus:border-ink-3 focus:outline-none"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-xs text-ink-3 mb-1",htmlFor:"agent-name",children:"Name"}),(0,s.jsx)("input",{id:"agent-name",name:"name",required:!0,placeholder:"My Agent",className:"w-full bg-hover border border-rule rounded-lg px-3 py-2 text-sm text-ink placeholder:text-ink-4 focus:border-ink-3 focus:outline-none"})]})]}),(0,s.jsx)(x.A,{value:$,onChange:E}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-xs text-ink-3 mb-1",htmlFor:"agent-personality",children:"Personality / System prompt"}),(0,s.jsx)("textarea",{id:"agent-personality",name:"personality",required:!0,rows:4,placeholder:"You are a helpful assistant...",className:"w-full bg-hover border border-rule rounded-lg px-3 py-2 text-sm text-ink placeholder:text-ink-4 focus:border-ink-3 focus:outline-none resize-none"})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-xs text-ink-3 mb-1",htmlFor:"agent-llm-key",children:"LLM provider"}),T?(0,s.jsxs)("p",{className:"text-xs text-warn mt-1",children:["No active LLM providers. Add one in"," ",(0,s.jsx)("a",{href:"/settings",className:"underline",children:"Settings → LLM providers"}),"."]}):(0,s.jsx)("select",{id:"agent-llm-key",value:R,onChange:e=>W(e.target.value),required:!0,className:"w-full bg-hover border border-rule rounded-lg px-3 py-2 text-sm text-ink focus:border-ink-3 focus:outline-none",children:S.map(e=>(0,s.jsx)("option",{value:e.id,children:(e.nickname??(0,u.R)(e.provider))+" ("+(0,u.R)(e.provider)+")"},e.id))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-xs text-ink-3 mb-1",htmlFor:"agent-model",children:"Model"}),(0,s.jsx)("input",{id:"agent-model",name:"model",type:"text",required:!0,value:M,onChange:e=>_(e.target.value),placeholder:P?.defaultModel??"e.g. claude-haiku-4-5-20251001",className:"w-full bg-hover border border-rule rounded-lg px-3 py-2 text-sm text-ink placeholder:text-ink-4 focus:border-ink-3 focus:outline-none font-mono"}),G]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-xs text-ink-3 mb-1",htmlFor:"agent-role",children:"Role"}),(0,s.jsxs)("select",{id:"agent-role",value:j,onChange:e=>y(e.target.value),className:"w-full bg-hover border border-rule rounded-lg px-3 py-2 text-sm text-ink focus:border-ink-3 focus:outline-none",children:[(0,s.jsx)("option",{value:"worker",children:"Worker — runs its own tools and tasks"}),(0,s.jsx)("option",{value:"router",children:"Router — delegates to one sub-agent at a time"}),(0,s.jsx)("option",{value:"planner",children:"Planner — creates parallel tasks for sub-agents"})]})]}),U&&(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{className:"block text-xs text-ink-3 mb-1",children:["Sub-agents ",(0,s.jsxs)("span",{className:"text-ink-4",children:["(",N.length," selected)"]})]}),O?(0,s.jsx)("p",{className:"text-xs text-warn mt-1",children:"Create at least one worker agent first — orchestrators need someone to delegate to."}):(0,s.jsx)("div",{className:"max-h-40 overflow-y-auto bg-hover border border-rule rounded-lg divide-y divide-neutral-800",children:K.map(e=>{let t=N.includes(e.id);return(0,s.jsxs)("label",{className:"flex items-center gap-2 px-3 py-2 text-sm cursor-pointer hover:bg-hover/80",children:[(0,s.jsx)("input",{type:"checkbox",checked:t,onChange:()=>z(e.id),className:"accent-violet-500"}),(0,s.jsx)("span",{className:"text-ink",children:e.name}),(0,s.jsx)("span",{className:"font-mono text-xs text-ink-3 ml-auto",children:e.slug})]},e.id)})})]}),(0,s.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,s.jsx)("button",{type:"submit",disabled:g||T||!I,title:I?void 0:"Pick a key that matches the model first",className:"px-4 py-2 text-sm font-semibold bg-ink text-canvas rounded-lg hover:brightness-[0.92] transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:g?"Creating…":"Create agent"}),(0,s.jsx)("button",{type:"button",onClick:()=>v(!1),className:"px-4 py-2 text-sm font-medium border border-rule text-ink-3 rounded-lg hover:border-rule transition-colors",children:"Cancel"})]})]})})]}),document.body):null;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{onClick:()=>v(!0),className:"px-4 py-2 text-sm font-medium bg-ink text-canvas rounded-lg hover:brightness-[0.92] transition-colors",children:"+ New agent"}),V]})}},14308:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var s=r(3680),n=r(78604),l=r(51869);function a({open:e,title:t,message:r,confirmLabel:i="Confirm",cancelLabel:o="Cancel",destructive:d=!0,onConfirm:c,onCancel:u}){let x=(0,n.useRef)(null),[m,h]=(0,n.useState)(!1);return((0,n.useEffect)(()=>{h(!0)},[]),(0,n.useEffect)(()=>{if(e)return x.current?.focus(),window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t);function t(e){"Escape"===e.key&&u()}},[e,u]),e&&m)?(0,l.createPortal)((0,s.jsxs)("div",{role:"dialog","aria-modal":"true","aria-labelledby":"confirm-dialog-title",className:"fixed inset-0 z-50 flex items-center justify-center px-4 text-left",children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:u,"aria-hidden":"true"}),(0,s.jsxs)("div",{className:"relative bg-paper border border-rule-2 rounded-xl p-6 max-w-md w-full shadow-2xl",children:[(0,s.jsx)("h2",{id:"confirm-dialog-title",className:"text-base font-semibold text-ink",children:t}),r&&(0,s.jsx)("p",{className:"mt-2 text-sm text-ink-3 leading-relaxed",children:r}),(0,s.jsxs)("div",{className:"mt-6 flex justify-end gap-2",children:[(0,s.jsx)("button",{ref:x,type:"button",onClick:u,className:"px-4 py-2 text-sm font-medium border border-rule text-ink-2 rounded-lg hover:border-rule hover:text-ink transition-colors",children:o}),(0,s.jsx)("button",{type:"button",onClick:c,className:`px-4 py-2 text-sm font-semibold rounded-lg transition-colors ${d?"bg-err hover:brightness-[0.94] text-ink":"bg-ink hover:brightness-[0.92] text-canvas"}`,children:i})]})]})]}),document.body):null}},37955:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var s=r(3680),n=r(78604),l=r(51869);let a=Array.from({length:42},(e,t)=>{let r=String(t+1).padStart(2,"0");return{id:`avatar-${r}`,url:`/avatars/avatar-${r}.png`}});function i({value:e,onChange:t,label:r="Avatar"}){let[c,u]=(0,n.useState)(!1),[x,m]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{m(!0)},[]),(0,n.useEffect)(()=>{if(c)return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e);function e(e){"Escape"===e.key&&u(!1)}},[c]),(0,s.jsxs)("div",{children:[r&&(0,s.jsx)("label",{className:"block text-xs text-ink-3 mb-1",children:r}),(0,s.jsxs)("button",{type:"button",onClick:()=>u(!0),className:"group flex items-center gap-3 bg-hover border border-rule hover:border-rule rounded-md px-3 py-2 text-left transition-colors w-full max-w-xs",children:[(0,s.jsx)(o,{url:e,size:36}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("p",{className:"text-sm text-ink truncate",children:e?e.split("/").pop()?.replace(".png",""):"No avatar"}),(0,s.jsxs)("p",{className:"text-[11px] text-ink-3",children:["Click to ",e?"change":"pick"]})]})]}),x&&c&&(0,l.createPortal)((0,s.jsx)("div",{role:"dialog","aria-modal":"true","aria-label":"Pick an avatar",onClick:()=>u(!1),className:"fixed inset-0 z-50 bg-black/70 backdrop-blur-sm flex items-center justify-center p-4",children:(0,s.jsxs)("div",{onClick:e=>e.stopPropagation(),className:"bg-paper border border-rule-2 rounded-2xl p-5 max-w-2xl w-full max-h-[80vh] overflow-y-auto",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-ink",children:"Pick an avatar"}),(0,s.jsx)("button",{type:"button",onClick:()=>u(!1),className:"text-ink-3 hover:text-ink text-xs",children:"Close (Esc)"})]}),(0,s.jsxs)("div",{className:"grid grid-cols-6 gap-3",children:[(0,s.jsx)(d,{selected:null===e,onClick:()=>void(t(null),u(!1)),label:"None",url:null}),a.map(r=>(0,s.jsx)(d,{selected:e===r.url,onClick:()=>{t(r.url),u(!1)},label:r.id,url:r.url},r.id))]})]})}),document.body)]})}function o({url:e,size:t=32}){return e?(0,s.jsx)("img",{src:e,alt:"",width:t,height:t,style:{width:t,height:t},className:"rounded-full object-cover border border-rule shrink-0"}):(0,s.jsx)("div",{style:{width:t,height:t},className:"rounded-full bg-hover border border-dashed border-rule text-ink-3 text-xs flex items-center justify-center shrink-0",children:"?"})}function d({selected:e,onClick:t,label:r,url:n}){return(0,s.jsx)("button",{type:"button",onClick:t,title:r,"aria-label":r,"aria-pressed":e,className:`aspect-square rounded-lg p-1 flex items-center justify-center transition-all ${e?"bg-ink/10 ring-2 ring-emerald-400":"bg-hover hover:bg-hover ring-1 ring-transparent hover:ring-neutral-700"}`,children:(0,s.jsx)(o,{url:n,size:56})})}},49293:(e,t,r)=>{"use strict";r.d(t,{V:()=>n});var s=r(64678);let n=(0,s.createServerReference)("00f7799d8ffeb54fbc0d656a2a30330367f4004a6d",s.callServer,void 0,s.findSourceMapURL,"getActiveJobsByAgentAction")},52232:(e,t,r)=>{"use strict";r.d(t,{default:()=>l});var s=r(3680),n=r(27540);function l({message:e}){let t=(0,n.useRouter)();return(0,s.jsxs)("div",{className:"bg-warn-bg border border-err/30 rounded-xl px-5 py-4 flex items-center justify-between gap-4",children:[(0,s.jsx)("p",{className:"text-sm text-err",children:e}),(0,s.jsx)("button",{onClick:()=>t.refresh(),className:"shrink-0 px-3 py-1.5 text-xs font-medium border border-err/30 text-err rounded-lg hover:border-err hover:text-err transition-colors",children:"Retry"})]})}},63217:(e,t,r)=>{"use strict";function s(e){switch(e){case"openai-compatible":return"Local LLM";case"anthropic":return"Anthropic";case"openai":return"OpenAI";case"ollama":return"Ollama";case"openrouter":return"OpenRouter";case"google":return"Google";case"mistral":return"Mistral";case"groq":return"Groq";default:return e}}r.d(t,{R:()=>s})},67849:(e,t,r)=>{Promise.resolve().then(r.bind(r,52232)),Promise.resolve().then(r.bind(r,69373)),Promise.resolve().then(r.bind(r,10880))},69373:(e,t,r)=>{"use strict";r.d(t,{default:()=>f});var s=r(3680),n=r(63363),l=r.n(n),a=r(78604),i=r(27540),o=r(39504),d=r(34767),c=r(35436),u=r(62182),x=r(49293),m=r(64678);let h=(0,m.createServerReference)("4071b52022586286c7dce9c331714fd8a5deb2ee78",m.callServer,void 0,m.findSourceMapURL,"reorderAgentsAction"),p=(0,m.createServerReference)("40ca6c379b6b8ead1e0c8e6b269c963b3a2f28e894",m.callServer,void 0,m.findSourceMapURL,"deleteAgentAction");var g=r(14308);function b({id:e,name:t,deleteAction:r}){let[n,l]=(0,a.useTransition)(),[i,d]=(0,a.useState)(!1);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{onClick:()=>d(!0),disabled:n,className:"px-3 py-1.5 text-xs font-medium border border-rule-2 text-ink-3 rounded-lg hover:border-err hover:text-err transition-colors disabled:opacity-50",children:n?"Deleting…":"Delete"}),(0,s.jsx)(g.A,{open:i,title:`Delete agent "${t}"?`,message:"The agent and its assignments will be removed. Past job history is preserved.",confirmLabel:"Delete",onConfirm:function(){d(!1),l(async()=>{let t=await r(e);t.ok?o.oR.success("Agent deleted"):o.oR.error(t.message)})},onCancel:()=>d(!1)})]})}function f({initialGroups:e,initialActivity:t}){let[r,n]=(0,a.useState)(e),[l,u]=(0,a.useState)(t),[m,p]=(0,a.useTransition)(),g=(0,i.useRouter)(),b=(0,a.useMemo)(()=>{let e=new Map;for(let t of l)e.set(t.agentId,t);return e},[l]);(0,a.useEffect)(()=>{let e=!1,t=async()=>{let t=await (0,x.V)();!e&&t.ok&&u(t.data)},r=setInterval(()=>void t(),5e3);return()=>{e=!0,clearInterval(r)}},[]);let j=(0,d.FR)((0,d.MS)(d.AN,{activationConstraint:{distance:8}}),(0,d.MS)(d.uN,{coordinateGetter:c.JR}));function y(e){n(e),p(async()=>{let t=await h(function(e){let t=[];for(let r of e)for(let e of(r.orchestrator&&t.push(r.orchestrator.id),r.workers))t.push(e.id);return t}(e));if(!t.ok){o.oR.error(t.message),n(r);return}g.refresh()})}if(0===r.length)return(0,s.jsx)("div",{className:"bg-paper border border-rule-2 rounded-xl overflow-hidden",children:(0,s.jsx)("div",{className:"px-6 py-12 text-center text-ink-4 text-sm",children:"No agents yet. Create one above."})});let N=r.map(e=>e.orchestrator?.id).filter(e=>!!e);return(0,s.jsx)(d.Mp,{sensors:j,collisionDetection:d.fp,onDragEnd:function(e){let{active:t,over:s}=e;if(!s||t.id===s.id)return;let n=r.findIndex(e=>e.orchestrator?.id===t.id),l=r.findIndex(e=>e.orchestrator?.id===s.id);n<0||l<0||y((0,c.be)(r,n,l))},children:(0,s.jsx)(c.gB,{items:N,strategy:c._G,children:(0,s.jsx)("div",{className:"space-y-6",children:r.map((e,t)=>{let n=null===e.orchestrator;return(0,s.jsxs)("div",{children:[e.orchestrator?(0,s.jsx)(v,{orchestrator:e.orchestrator,disabled:m}):(0,s.jsx)("h2",{className:"mb-2 text-xs font-semibold text-ink-3 uppercase tracking-wider",children:"Standalone"}),(0,s.jsx)(k,{workers:e.workers,indent:!!e.orchestrator,orchestrator:e.orchestrator,disabled:m,onWorkerDragEnd:e=>(function(e,t){let{active:s,over:n}=t;if(!n||s.id===n.id)return;let l=r[e];if(!l)return;let a=l.workers.findIndex(e=>e.id===s.id),i=l.workers.findIndex(e=>e.id===n.id);if(a<0||i<0)return;let o=(0,c.be)(l.workers,a,i);y(r.map((t,r)=>r===e?{...t,workers:o}:t))})(t,e),sensors:j,activityByAgent:b})]},n?"__standalone__":e.orchestrator?.id??"")})})})})}function v({orchestrator:e,disabled:t}){let{attributes:r,listeners:n,setNodeRef:l,transform:a,transition:i,isDragging:o}=(0,c.gl)({id:e.id,disabled:t});return(0,s.jsxs)("div",{ref:l,style:{transform:u.Ks.Transform.toString(a),transition:i},className:`mb-2 flex items-center gap-2 ${o?"opacity-50":""}`,children:[(0,s.jsx)("button",{type:"button",...r,...n,"aria-label":"Drag team",title:"Drag to reorder team",className:"cursor-grab active:cursor-grabbing text-ink-4 hover:text-ink-2 transition-colors leading-none touch-none",children:"⋮⋮"}),(0,s.jsxs)("h2",{className:"text-xs font-semibold text-ink-3 uppercase tracking-wider",children:["Team — ",e.name]})]})}function k({workers:e,indent:t,orchestrator:r,disabled:n,onWorkerDragEnd:l,sensors:a,activityByAgent:i}){let o=e.map(e=>e.id);return(0,s.jsx)(d.Mp,{sensors:a,collisionDetection:d.fp,onDragEnd:l,children:(0,s.jsx)("div",{className:"bg-paper border border-rule-2 rounded-xl overflow-hidden",children:(0,s.jsx)("table",{className:"w-full text-sm",children:(0,s.jsx)("tbody",{children:(0,s.jsxs)(c.gB,{items:o,strategy:c._G,children:[r&&(0,s.jsx)(y,{agent:r,indent:!1,activity:i.get(r.id)??null}),e.map(e=>(0,s.jsx)(j,{agent:e,indent:t,disabled:n,activity:i.get(e.id)??null},e.id))]})})})})})}function j({agent:e,indent:t,disabled:r,activity:n}){let{attributes:l,listeners:a,setNodeRef:i,transform:o,transition:d,isDragging:x}=(0,c.gl)({id:e.id,disabled:r});return(0,s.jsxs)("tr",{ref:i,style:{transform:u.Ks.Transform.toString(o),transition:d},className:`border-b border-rule-2 last:border-0 ${x?"opacity-50 bg-hover":""}`,children:[(0,s.jsx)("td",{className:`px-5 py-3 ${t?"pl-10":""}`,children:(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("button",{type:"button",...l,...a,"aria-label":"Drag row",title:"Drag to reorder",className:"cursor-grab active:cursor-grabbing text-ink-4 hover:text-ink-3 transition-colors leading-none touch-none select-none",children:"⋮⋮"}),(0,s.jsx)(N,{agent:e}),(0,s.jsx)(w,{agent:e}),(0,s.jsx)(S,{agent:e,activity:n})]})}),(0,s.jsx)(C,{agent:e})]})}function y({agent:e,indent:t,activity:r}){return(0,s.jsxs)("tr",{className:"border-b border-rule-2 last:border-0",children:[(0,s.jsx)("td",{className:`px-5 py-3 ${t?"pl-10":""}`,children:(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("span",{className:"w-4 inline-block","aria-hidden":!0}),(0,s.jsx)(N,{agent:e}),(0,s.jsx)(w,{agent:e}),(0,s.jsx)(S,{agent:e,activity:r})]})}),(0,s.jsx)(C,{agent:e})]})}function N({agent:e}){return e.avatarUrl?(0,s.jsx)("img",{src:e.avatarUrl,alt:"",width:32,height:32,className:"w-8 h-8 rounded-full object-cover border border-rule-2 shrink-0"}):(0,s.jsx)("div",{className:"w-8 h-8 rounded-full bg-hover text-ink-3 text-xs font-semibold flex items-center justify-center shrink-0",children:e.name.charAt(0).toUpperCase()})}function w({agent:e}){return(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-ink font-medium truncate",children:e.name}),e.isDefault&&(0,s.jsx)("span",{className:"text-[10px] font-semibold text-run uppercase tracking-wider",children:"default"}),"orchestrator"===e.role&&(0,s.jsx)("span",{className:"text-[10px] font-semibold text-indigo-400 uppercase tracking-wider",children:"orchestrator"})]}),(0,s.jsx)("span",{className:"font-mono text-ink-3 text-[11px]",children:e.slug}),e.model&&(0,s.jsxs)("span",{className:"ml-2 text-ink-4 text-[11px]",children:["\xb7 ",e.model]})]})}function S({agent:e,activity:t}){if(!t||0===t.total)return null;let r=t.processing>0?{color:"bg-run",pulse:!0,label:`${t.processing} running`}:t.awaiting>0?{color:"bg-warn",pulse:!0,label:`${t.awaiting} awaiting`}:{color:"bg-warn",pulse:!1,label:`${t.pending} pending`},n=[];return t.processing>0&&n.push(`${t.processing} processing`),t.awaiting>0&&n.push(`${t.awaiting} awaiting`),t.pending>0&&n.push(`${t.pending} pending`),(0,s.jsxs)(l(),{href:`/jobs?agentId=${e.id}`,title:n.join(" \xb7 "),onPointerDown:e=>e.stopPropagation(),className:"ml-1 inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full bg-hover hover:bg-hover border border-rule text-[11px] text-ink-2 transition-colors shrink-0",children:[(0,s.jsxs)("span",{className:"relative inline-flex w-2 h-2 shrink-0",children:[r.pulse&&(0,s.jsx)("span",{className:`absolute inset-0 inline-flex h-full w-full rounded-full opacity-60 animate-ping ${r.color}`}),(0,s.jsx)("span",{className:`relative inline-flex w-2 h-2 rounded-full ${r.color}`})]}),(0,s.jsx)("span",{className:"font-mono tabular-nums",children:t.total}),(0,s.jsx)("span",{className:"text-ink-3 text-[10px]",children:"active"})]})}function C({agent:e}){return(0,s.jsx)("td",{className:"px-5 py-3 text-right",children:(0,s.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,s.jsx)(l(),{href:`/agents/${e.id}/telegram`,className:"px-3 py-1.5 text-xs font-medium border border-rule-2 text-ink-3 rounded-lg hover:border-rule hover:text-ink transition-colors",children:"Telegram"}),(0,s.jsx)(l(),{href:`/agents/${e.id}/edit`,className:"px-3 py-1.5 text-xs font-medium border border-rule-2 text-ink-3 rounded-lg hover:border-rule hover:text-ink transition-colors",children:"Edit"}),(0,s.jsx)(b,{id:e.id,name:e.name,deleteAction:p})]})})}},79716:(e,t,r)=>{"use strict";r.d(t,{$:()=>l,P:()=>n});let s=new Set(["ollama","openai-compatible"]);function n(e){let t=e.trim().toLowerCase();if(0===t.length)return new Set;let r=new Set;return t.includes("/")?r.add("openrouter"):t.startsWith("claude")?r.add("anthropic"):t.startsWith("gpt")||t.startsWith("chatgpt")||/^o[134](?:[-_]|$)/.test(t)?r.add("openai"):t.startsWith("gemini")?r.add("google"):t.startsWith("gemma")?(r.add("google"),r.add("ollama"),r.add("openai-compatible")):t.startsWith("mistral")||t.startsWith("codestral")||t.startsWith("pixtral")||t.startsWith("magistral")||t.startsWith("ministral")||t.startsWith("mixtral")?r.add("mistral"):(t.startsWith("llama")||t.startsWith("qwen")||t.startsWith("deepseek"))&&(r.add("ollama"),r.add("openai-compatible"),r.add("groq")),r}function l(e,t){if(0===e.trim().length||s.has(t))return!0;let r=n(e);return 0===r.size||r.has(t)}},84702:(e,t,r)=>{"use strict";r.d(t,{f:()=>n});var s=r(64678);let n=(0,s.createServerReference)("40f14a7568e2a3b6f7bc2ada24095ae0d2d7db8a93",s.callServer,void 0,s.findSourceMapURL,"updateAgentAction")}},e=>{e.O(0,[3363,9504,6522,1065,8724,7358],()=>e(e.s=67849)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7665],{4717:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(3680),s=n(78604),a=n(39504),l=n(64678);let i=(0,l.createServerReference)("40300f7bc702d8554263a804324ef17a2c4a8c728e",l.callServer,void 0,l.findSourceMapURL,"updateScheduleAction"),o=(0,l.createServerReference)("40bc5ab9bfcccfc7e542d2cbde0cf61a70b0d7cb6c",l.callServer,void 0,l.findSourceMapURL,"createScheduleAction");var d=n(21369);let u=[{n:1,label:"Mon"},{n:2,label:"Tue"},{n:3,label:"Wed"},{n:4,label:"Thu"},{n:5,label:"Fri"},{n:6,label:"Sat"},{n:0,label:"Sun"}],c=[1,5,10,15,30];function m({name:e="cronExpr",initial:t}){let n=(0,s.useMemo)(()=>t?(0,d.X3)(t):{mode:"daily",values:{mode:"daily",time:"09:00"}},[t]),[a,l]=(0,s.useState)(n.mode),[i,o]=(0,s.useState)(n.values.everyMinutes??5),[h,b]=(0,s.useState)(n.values.time??"09:00"),[p,f]=(0,s.useState)(n.values.weekdays??[1,2,3,4,5]),[v,g]=(0,s.useState)(n.values.dayOfMonth??1),[k,y]=(0,s.useState)(n.values.custom??t??"0 9 * * *"),j=(0,s.useMemo)(()=>(0,d.Ff)({mode:a,everyMinutes:i,time:h,weekdays:p,dayOfMonth:v,custom:k}),[a,i,h,p,v,k]),N=(0,s.useMemo)(()=>(0,d.E$)(j),[j]);return(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsx)("input",{type:"hidden",name:e,value:j}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"cron-mode",className:"block text-xs text-ink-3 mb-1",children:"Frequency"}),(0,r.jsxs)("select",{id:"cron-mode",value:a,onChange:e=>l(e.target.value),className:"w-full bg-hover border border-rule rounded-md px-2 py-1.5 text-sm text-ink focus:border-ink-3 focus:outline-none",children:[(0,r.jsx)("option",{value:"minutes",children:"Every N minutes"}),(0,r.jsx)("option",{value:"hourly",children:"Hourly"}),(0,r.jsx)("option",{value:"daily",children:"Daily"}),(0,r.jsx)("option",{value:"weekly",children:"Weekly"}),(0,r.jsx)("option",{value:"monthly",children:"Monthly"}),(0,r.jsx)("option",{value:"custom",children:"Custom (cron)"})]})]}),"minutes"===a&&(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"cron-every",className:"block text-xs text-ink-3 mb-1",children:"Every"}),(0,r.jsx)("select",{id:"cron-every",value:i,onChange:e=>o(parseInt(e.target.value,10)),className:"w-full bg-hover border border-rule rounded-md px-2 py-1.5 text-sm text-ink focus:border-ink-3 focus:outline-none",children:c.map(e=>(0,r.jsxs)("option",{value:e,children:[e," ",1===e?"minute":"minutes"]},e))})]}),"hourly"===a&&(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"cron-min-of-hour",className:"block text-xs text-ink-3 mb-1",children:"At minute"}),(0,r.jsx)("input",{id:"cron-min-of-hour",type:"number",min:0,max:59,value:parseInt(h.split(":")[1]??"0",10),onChange:e=>{let t=Math.max(0,Math.min(59,parseInt(e.target.value||"0",10)));b(`00:${String(t).padStart(2,"0")}`)},className:"w-full bg-hover border border-rule rounded-md px-2 py-1.5 text-sm text-ink focus:border-ink-3 focus:outline-none"})]}),("daily"===a||"weekly"===a||"monthly"===a)&&(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"cron-time",className:"block text-xs text-ink-3 mb-1",children:"Time"}),(0,r.jsx)("input",{id:"cron-time",type:"time",value:h,onChange:e=>b(e.target.value),className:"w-full bg-hover border border-rule rounded-md px-2 py-1.5 text-sm text-ink focus:border-ink-3 focus:outline-none"})]})]}),"weekly"===a&&(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-xs text-ink-3 mb-1",children:"Days"}),(0,r.jsx)("div",{className:"flex flex-wrap gap-1.5",children:u.map(e=>{let t=p.includes(e.n);return(0,r.jsx)("button",{type:"button",onClick:()=>{var t;return t=e.n,void f(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t].sort())},className:`px-2.5 py-1 text-xs font-medium rounded border ${t?"bg-run-bg border-run/30 text-run":"border-rule-2 text-ink-3 hover:border-rule hover:text-ink"}`,children:e.label},e.n)})})]}),"monthly"===a&&(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"cron-dom",className:"block text-xs text-ink-3 mb-1",children:"Day of month"}),(0,r.jsx)("input",{id:"cron-dom",type:"number",min:1,max:31,value:v,onChange:e=>g(Math.max(1,Math.min(31,parseInt(e.target.value||"1",10)))),className:"w-32 bg-hover border border-rule rounded-md px-2 py-1.5 text-sm text-ink focus:border-ink-3 focus:outline-none"})]}),"custom"===a&&(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"cron-custom",className:"block text-xs text-ink-3 mb-1",children:"Cron expression"}),(0,r.jsx)("input",{id:"cron-custom",type:"text",value:k,onChange:e=>y(e.target.value),placeholder:"0 9 * * *",className:"w-full bg-hover border border-rule rounded-md px-2 py-1.5 text-sm text-ink placeholder:text-ink-4 focus:border-ink-3 focus:outline-none font-mono"}),(0,r.jsx)("p",{className:"text-[10px] text-ink-4 mt-1",children:"Format: minute hour day-of-month month day-of-week"})]}),(0,r.jsx)(x,{expr:j,preview:N})]})}function x({expr:e,preview:t}){return t.ok?(0,r.jsxs)("div",{className:"bg-canvas border border-rule-2 rounded-md px-3 py-2 space-y-1",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,r.jsx)("span",{className:"text-ink-3",children:"Schedule:"}),(0,r.jsx)("span",{className:"text-ink",children:t.humanLabel}),(0,r.jsx)("code",{className:"ml-auto font-mono text-[10px] text-run",children:e})]}),(0,r.jsxs)("div",{className:"text-[10px] text-ink-4",suppressHydrationWarning:!0,children:["Next runs: ",t.nextRuns.map(e=>e.toLocaleString([],{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})).join(" \xb7 ")]})]}):(0,r.jsxs)("div",{className:"bg-warn-bg border border-err/30 rounded-md px-3 py-2 text-xs text-err",children:[(0,r.jsx)("span",{className:"font-semibold",children:"Invalid:"})," ",t.error]})}function h(e){let t="edit"===e.mode,[n,l]=(0,s.useState)(t),[d,u]=(0,s.useTransition)();if(!t&&!n)return(0,r.jsx)("button",{type:"button",onClick:()=>l(!0),disabled:0===e.agents.length,className:"inline-flex h-[34px] items-center gap-1.5 rounded-md border-0 bg-ink px-3.5 text-[13px] font-medium leading-none text-canvas transition-[filter] hover:brightness-[0.92] disabled:cursor-not-allowed disabled:opacity-40",title:0===e.agents.length?"Create an agent first":"",children:"+ New schedule"});let c=t?e.initial.agentId:"",x=t?e.initial.name:"",h=t?e.initial.task??"":"",b=t?e.initial.cronExpr:"0 9 * * *";return(0,r.jsxs)("form",{onSubmit:function(n){n.preventDefault();let r=n.currentTarget,s=new FormData(r);u(async()=>{if(t){let t=await i({id:e.initial.id,agentId:s.get("agentId"),name:s.get("name"),cronExpr:s.get("cronExpr"),task:s.get("task")});t.ok?(a.oR.success("Schedule updated"),e.onDone?.()):a.oR.error(t.message)}else{let t=await o({agentId:s.get("agentId"),name:s.get("name"),cronExpr:s.get("cronExpr"),task:s.get("task")});t.ok?(a.oR.success("Schedule created"),r.reset(),l(!1),e.onDone?.()):a.oR.error(t.message)}})},className:"space-y-3 rounded-xl border border-rule-2 bg-paper p-5",children:[(0,r.jsx)("h3",{className:"text-sm font-semibold text-ink",children:t?"Edit schedule":"New schedule"}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"mb-1 block text-xs text-ink-3",htmlFor:"schedule-agent",children:"Agent"}),(0,r.jsxs)("select",{id:"schedule-agent",name:"agentId",required:!0,defaultValue:c,className:"w-full rounded-md border border-rule bg-canvas px-2 py-1.5 text-sm text-ink focus:border-ink-3 focus:outline-none",children:[(0,r.jsx)("option",{value:"",children:"Select…"}),e.agents.map(e=>(0,r.jsx)("option",{value:e.id,children:e.name},e.id))]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"mb-1 block text-xs text-ink-3",htmlFor:"schedule-name",children:"Name"}),(0,r.jsx)("input",{id:"schedule-name",name:"name",required:!0,defaultValue:x,placeholder:"Daily standup",className:"w-full rounded-md border border-rule bg-canvas px-2 py-1.5 text-sm text-ink placeholder-ink-4 focus:border-ink-3 focus:outline-none"})]})]}),(0,r.jsx)(m,{name:"cronExpr",initial:b}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"mb-1 block text-xs text-ink-3",htmlFor:"schedule-task",children:"Task instructions"}),(0,r.jsx)("textarea",{id:"schedule-task",name:"task",required:!0,rows:4,defaultValue:h,placeholder:"What should the agent do each time this fires?",className:"w-full resize-y rounded-md border border-rule bg-canvas px-2 py-1.5 text-sm text-ink placeholder-ink-4 focus:border-ink-3 focus:outline-none"})]}),(0,r.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,r.jsx)("button",{type:"submit",disabled:d,className:"inline-flex h-[34px] items-center gap-1.5 rounded-md border-0 bg-ink px-3.5 text-[13px] font-medium leading-none text-canvas transition-[filter] hover:brightness-[0.92] disabled:opacity-50",children:d?t?"Saving…":"Creating…":t?"Save changes":"Create schedule"}),(0,r.jsx)("button",{type:"button",onClick:()=>{t?e.onDone?.():l(!1)},className:"inline-flex h-[34px] items-center rounded-md border border-rule-2 px-3.5 text-[13px] font-medium text-ink-3 transition-colors hover:border-rule hover:text-ink",children:"Cancel"})]})]})}},14308:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(3680),s=n(78604),a=n(51869);function l({open:e,title:t,message:n,confirmLabel:i="Confirm",cancelLabel:o="Cancel",destructive:d=!0,onConfirm:u,onCancel:c}){let m=(0,s.useRef)(null),[x,h]=(0,s.useState)(!1);return((0,s.useEffect)(()=>{h(!0)},[]),(0,s.useEffect)(()=>{if(e)return m.current?.focus(),window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t);function t(e){"Escape"===e.key&&c()}},[e,c]),e&&x)?(0,a.createPortal)((0,r.jsxs)("div",{role:"dialog","aria-modal":"true","aria-labelledby":"confirm-dialog-title",className:"fixed inset-0 z-50 flex items-center justify-center px-4 text-left",children:[(0,r.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:c,"aria-hidden":"true"}),(0,r.jsxs)("div",{className:"relative bg-paper border border-rule-2 rounded-xl p-6 max-w-md w-full shadow-2xl",children:[(0,r.jsx)("h2",{id:"confirm-dialog-title",className:"text-base font-semibold text-ink",children:t}),n&&(0,r.jsx)("p",{className:"mt-2 text-sm text-ink-3 leading-relaxed",children:n}),(0,r.jsxs)("div",{className:"mt-6 flex justify-end gap-2",children:[(0,r.jsx)("button",{ref:m,type:"button",onClick:c,className:"px-4 py-2 text-sm font-medium border border-rule text-ink-2 rounded-lg hover:border-rule hover:text-ink transition-colors",children:o}),(0,r.jsx)("button",{type:"button",onClick:u,className:`px-4 py-2 text-sm font-semibold rounded-lg transition-colors ${d?"bg-err hover:brightness-[0.94] text-ink":"bg-ink hover:brightness-[0.92] text-canvas"}`,children:i})]})]})]}),document.body):null}},21369:(e,t,n)=>{"use strict";n.d(t,{E$:()=>s,Ff:()=>o,X3:()=>d,_6:()=>l});var r=n(74178);function s(e,t=new Date){if(!e||"string"!=typeof e)return{ok:!1,error:"Empty expression"};try{let n=r.CronExpressionParser.parse(e.trim(),{currentDate:t}),s=[];for(let e=0;e<3;e++)s.push(n.next().toDate());return{ok:!0,nextRuns:s,humanLabel:l(e)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:"Invalid cron expression"}}}let a=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];function l(e){let t=e.trim().split(/\s+/);if(5!==t.length)return e;let[n,r,s,l,o]=t;if("*"===n&&"*"===r&&"*"===s&&"*"===l&&"*"===o)return"Every minute";let d=n?.match(/^\*\/(\d+)$/);if(d&&"*"===r&&"*"===s&&"*"===l&&"*"===o)return`Every ${d[1]} minutes`;if("*"===r&&"*"===s&&"*"===l&&"*"===o&&/^\d+$/.test(n??""))return"0"===n?"Every hour (top of hour)":`Every hour at :${(n??"").padStart(2,"0")}`;if("*"===s&&"*"===l&&"*"===o&&/^\d+$/.test(n??"")&&/^\d+$/.test(r??""))return`Every day at ${i(r)}:${i(n)}`;if("*"===s&&"*"===l&&/^\d+$/.test(n??"")&&/^\d+$/.test(r??"")){let e=function(e){if("*"===e)return"day";if("1-5"===e)return"weekday";if("0,6"===e||"6,0"===e)return"weekend";if(/^\d$/.test(e)){let t=parseInt(e,10);if(t>=0&&t<=6)return a[t]??null}return/^[0-6](,[0-6])+$/.test(e)?e.split(",").map(e=>a[parseInt(e,10)]).filter(Boolean).join(", "):null}(o??"");if(e)return`Every ${e} at ${i(r)}:${i(n)}`}return"*"===l&&"*"===o&&/^\d+$/.test(n??"")&&/^\d+$/.test(r??"")&&/^\d+$/.test(s??"")?`Day ${s} of every month at ${i(r)}:${i(n)}`:e}function i(e){return(e??"").padStart(2,"0")}function o(e){let t=function(e){if(!e)return{hour:9,minute:0};let t=e.match(/^(\d{1,2}):(\d{2})$/);return t?{hour:Math.max(0,Math.min(23,parseInt(t[1]??"0",10))),minute:Math.max(0,Math.min(59,parseInt(t[2]??"0",10)))}:{hour:9,minute:0}}(e.time);switch(e.mode){case"minutes":{let t=e.everyMinutes&&e.everyMinutes>0?e.everyMinutes:5;return`*/${t} * * * *`}case"hourly":return`${t.minute} * * * *`;case"daily":return`${t.minute} ${t.hour} * * *`;case"weekly":{let n=e.weekdays&&e.weekdays.length>0?e.weekdays.slice().sort().join(","):"1";return`${t.minute} ${t.hour} * * ${n}`}case"monthly":{let n=e.dayOfMonth&&e.dayOfMonth>0?e.dayOfMonth:1;return`${t.minute} ${t.hour} ${n} * *`}case"custom":return(e.custom??"").trim()}}function d(e){let t=e.trim().split(/\s+/);if(5!==t.length)return{mode:"custom",values:{mode:"custom",custom:e}};let[n,r,s,a,l]=t,o=n?.match(/^\*\/(\d+)$/);if(o&&"*"===r&&"*"===s&&"*"===a&&"*"===l)return{mode:"minutes",values:{mode:"minutes",everyMinutes:parseInt(o[1]??"5",10)}};if("*"===r&&"*"===s&&"*"===a&&"*"===l&&/^\d+$/.test(n??""))return{mode:"hourly",values:{mode:"hourly",time:`00:${i(n)}`}};if("*"===s&&"*"===a&&"*"===l&&/^\d+$/.test(n??"")&&/^\d+$/.test(r??""))return{mode:"daily",values:{mode:"daily",time:`${i(r)}:${i(n)}`}};if("*"===s&&"*"===a&&/^\d+$/.test(n??"")&&/^\d+$/.test(r??"")){let e=function(e){if("*"===e)return[0,1,2,3,4,5,6];if("1-5"===e)return[1,2,3,4,5];if("0,6"===e||"6,0"===e)return[0,6];if(/^\d$/.test(e)){let t=parseInt(e,10);if(t>=0&&t<=6)return[t]}return/^[0-6](,[0-6])+$/.test(e)?e.split(",").map(e=>parseInt(e,10)):null}(l??"");if(e)return{mode:"weekly",values:{mode:"weekly",time:`${i(r)}:${i(n)}`,weekdays:e}}}return"*"===a&&"*"===l&&/^\d+$/.test(n??"")&&/^\d+$/.test(r??"")&&/^\d+$/.test(s??"")?{mode:"monthly",values:{mode:"monthly",time:`${i(r)}:${i(n)}`,dayOfMonth:parseInt(s??"1",10)}}:{mode:"custom",values:{mode:"custom",custom:e}}}},30922:(e,t,n)=>{Promise.resolve().then(n.bind(n,4717)),Promise.resolve().then(n.bind(n,88394))},81444:()=>{},82592:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(3680);let s={ok:"bg-ok",lime:"bg-agent-vivid",coral:"bg-skill-vivid",blue:"bg-conn-vivid"},a={ok:"animate-[blip_1.4s_ease-out_infinite]",lime:"animate-[blip-lime_1.5s_ease-out_infinite]",coral:"animate-[blip-coral_1.4s_ease-out_infinite]",blue:"animate-[blip-blue_1.4s_ease-out_infinite]"};function l({variant:e="ok",size:t="sm",animate:n=!0,className:i=""}){return(0,r.jsx)("span",{className:`inline-block shrink-0 rounded-full ${"sm"===t?"h-[7px] w-[7px]":"h-2 w-2"} ${s[e]} ${n?a[e]:""} ${i}`})}},88394:(e,t,n)=>{"use strict";n.d(t,{default:()=>x});var r=n(3680),s=n(78604),a=n(39504),l=n(64678);let i=(0,l.createServerReference)("403098832f4fa200505e1aeaf5c72cca2dab094fa7",l.callServer,void 0,l.findSourceMapURL,"toggleScheduleAction"),o=(0,l.createServerReference)("40606f3040ac4bd605de60316b661bee2272b29f33",l.callServer,void 0,l.findSourceMapURL,"deleteScheduleAction");var d=n(14308),u=n(4717),c=n(21369),m=n(93606);function x({schedule:e,agents:t}){let[n,l]=(0,s.useTransition)(),[h,b]=(0,s.useState)(!1),[p,f]=(0,s.useState)(!1);return p?(0,r.jsx)("div",{className:"space-y-2",children:(0,r.jsx)(u.default,{mode:"edit",agents:t,initial:e,onDone:()=>f(!1)})}):(0,r.jsxs)("div",{className:"space-y-3 rounded-xl border border-rule-2 bg-paper p-5",children:[(0,r.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,r.jsxs)("div",{className:"space-y-1",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("h3",{className:"text-base font-semibold text-ink",children:e.name}),(0,r.jsx)(m.A,{variant:e.active?"done":"idle",label:e.active?"Active":"Paused"})]}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-3 text-xs text-ink-3",children:[(0,r.jsx)("span",{children:(0,c._6)(e.cronExpr)}),e.agentName&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"text-rule",children:"\xb7"}),(0,r.jsxs)("span",{children:[e.agentName," ",(0,r.jsx)("span",{className:"font-mono text-ink-4",children:e.agentSlug})]})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-3 text-[10px] text-ink-4",children:[e.nextRun&&e.active&&(0,r.jsxs)("span",{children:["Next run ",new Date(e.nextRun).toLocaleString()]}),e.lastRun&&(0,r.jsxs)("span",{children:["Last run ",new Date(e.lastRun).toLocaleString(),e.lastStatus&&(0,r.jsxs)("span",{className:`ml-1 ${"success"===e.lastStatus?"text-ok":"failed"===e.lastStatus?"text-err":"text-ink-4"}`,children:["(",e.lastStatus,")"]})]})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("button",{type:"button",onClick:()=>f(!0),disabled:n,className:"rounded-md border border-rule-2 px-2.5 py-1 text-xs font-medium text-ink-3 transition-colors hover:border-rule hover:text-ink disabled:opacity-40",children:"Edit"}),(0,r.jsx)("button",{type:"button",onClick:function(){l(async()=>{let t=await i(e.id);t.ok?a.oR.success(t.data.active?"Schedule enabled":"Schedule disabled"):a.oR.error(t.message)})},disabled:n,className:"rounded-md border border-rule-2 px-2.5 py-1 text-xs font-medium text-ink-3 transition-colors hover:border-rule hover:text-ink disabled:opacity-40",children:e.active?"Pause":"Enable"}),(0,r.jsx)("button",{type:"button",onClick:()=>b(!0),disabled:n,className:"rounded-md border border-err/30 px-2.5 py-1 text-xs font-medium text-err transition-colors hover:border-err/60 disabled:opacity-40",children:"Delete"})]})]}),e.task&&(0,r.jsxs)("details",{className:"rounded-md border border-rule bg-canvas",children:[(0,r.jsx)("summary",{className:"cursor-pointer px-3 py-2 text-xs text-ink-3 hover:text-ink-2",children:"Task instructions"}),(0,r.jsx)("pre",{className:"whitespace-pre-wrap px-3 pb-3 text-xs text-ink-2",children:e.task})]}),(0,r.jsx)(d.A,{open:h,title:"Delete schedule?",message:"This cron schedule will be removed. Past runs are kept for audit.",confirmLabel:"Delete",onConfirm:function(){b(!1),l(async()=>{let t=await o(e.id);t.ok?a.oR.success("Schedule deleted"):a.oR.error(t.message)})},onCancel:()=>b(!1)})]})}},93606:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var r=n(3680),s=n(86127),a=n(22089),l=n(82592);let i={done:"Done",warn:"Attention",run:"Running",idle:"Idle","lvl-info":"INFO","lvl-ok":"OK","lvl-warn":"WARN","lvl-err":"ERR"},o={done:"bg-ok-bg text-ok",warn:"bg-warn-bg text-warn",run:"bg-run-bg text-run",idle:"bg-black/5 text-ink-3 dark:bg-white/5","lvl-info":"bg-black/5 text-ink-3 dark:bg-white/5","lvl-ok":"bg-ok-bg text-ok","lvl-warn":"bg-warn-bg text-warn","lvl-err":"bg-warn-bg text-err"};function d({variant:e,label:t,icon:n,className:u=""}){let c=t??i[e],m=null;return void 0!==n?m=n:"done"===e?m=(0,r.jsx)(s.r,{size:11,weight:"regular"}):"warn"===e?m=(0,r.jsx)(a.N,{size:11,weight:"regular"}):"run"===e&&(m=(0,r.jsx)(l.A,{variant:"blue",size:"sm"})),(0,r.jsxs)("span",{className:`inline-flex h-[22px] items-center gap-1.5 rounded-[5px] px-2.5 text-[11px] font-medium leading-none ${o[e]} ${u}`,children:[m,c]})}},96333:()=>{}},e=>{e.O(0,[4641,9504,9167,1065,8724,7358],()=>e(e.s=30922)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9527],{16237:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var n=a(3680),r=a(40189),l=a(77045);function s({status:e,ctaLabel:t,ctaVariant:a="blue",onCta:i,ctaHref:o}){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"flex-1 text-[12.5px] leading-none text-ink-3",children:e}),o?(0,n.jsxs)(l.A,{variant:a,size:"sm",href:o,children:[(0,n.jsx)(r.F,{size:12,weight:"bold"}),t]}):(0,n.jsxs)(l.A,{variant:a,size:"sm",onClick:i,children:[(0,n.jsx)(r.F,{size:12,weight:"bold"}),t]})]})}},21021:(e,t,a)=>{"use strict";a.d(t,{a:()=>n,d:()=>l});let n={gmail:"#ea4335","google-drive":"#4285f4","google-sheets":"#0f9d58","google-docs":"#4285f4","google-calendar":"#4285f4",notion:"#000000","notion-oauth":"#000000",airtable:"#f82b60","airtable-oauth":"#f82b60",github:"#24292f",linear:"#5e6ad2",hubspot:"#ff7a59",slack:"#4a154b",intercom:"#1f8ced",stripe:"#635bff",postgres:"#336791",apify:"#00aeff",firecrawl:"#f97316",tavily:"#6366f1",composio:"#000000"},r={gmail:"Gm","google-drive":"GD","google-sheets":"GS","google-docs":"GD","google-calendar":"GC",notion:"No","notion-oauth":"No",airtable:"At","airtable-oauth":"At",github:"Gh",linear:"Li",hubspot:"HS",slack:"Sl",intercom:"IC",stripe:"St",postgres:"PG",apify:"Ap",firecrawl:"FC",tavily:"Tv",composio:"Co","custom-http-mcp":"+","custom-stdio-mcp":"+","cogni-cortex":"CX"};function l(e,t){return r[e]??t.slice(0,2).toUpperCase()}},22089:(e,t,a)=>{"use strict";a.d(t,{N:()=>i});var n=a(78604),r=a(5977);let l=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M240.26,186.1,152.81,34.23h0a28.74,28.74,0,0,0-49.62,0L15.74,186.1a27.45,27.45,0,0,0,0,27.71A28.31,28.31,0,0,0,40.55,228h174.9a28.31,28.31,0,0,0,24.79-14.19A27.45,27.45,0,0,0,240.26,186.1Zm-20.8,15.7a4.46,4.46,0,0,1-4,2.2H40.55a4.46,4.46,0,0,1-4-2.2,3.56,3.56,0,0,1,0-3.73L124,46.2a4.77,4.77,0,0,1,8,0l87.44,151.87A3.56,3.56,0,0,1,219.46,201.8ZM116,136V104a12,12,0,0,1,24,0v32a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,176Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M215.46,216H40.54C27.92,216,20,202.79,26.13,192.09L113.59,40.22c6.3-11,22.52-11,28.82,0l87.46,151.87C236,202.79,228.08,216,215.46,216Z",opacity:"0.2"}),n.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM120,104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm8,88a12,12,0,1,1,12-12A12,12,0,0,1,128,192Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M235.07,189.09,147.61,37.22h0a22.75,22.75,0,0,0-39.22,0L20.93,189.09a21.53,21.53,0,0,0,0,21.72A22.35,22.35,0,0,0,40.55,222h174.9a22.35,22.35,0,0,0,19.6-11.19A21.53,21.53,0,0,0,235.07,189.09ZM224.66,204.8a10.46,10.46,0,0,1-9.21,5.2H40.55a10.46,10.46,0,0,1-9.21-5.2,9.51,9.51,0,0,1,0-9.72L118.79,43.21a10.75,10.75,0,0,1,18.42,0l87.46,151.87A9.51,9.51,0,0,1,224.66,204.8ZM122,144V104a6,6,0,0,1,12,0v40a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,180Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M233.34,190.09,145.88,38.22h0a20.75,20.75,0,0,0-35.76,0L22.66,190.09a19.52,19.52,0,0,0,0,19.71A20.36,20.36,0,0,0,40.54,220H215.46a20.36,20.36,0,0,0,17.86-10.2A19.52,19.52,0,0,0,233.34,190.09ZM226.4,205.8a12.47,12.47,0,0,1-10.94,6.2H40.54a12.47,12.47,0,0,1-10.94-6.2,11.45,11.45,0,0,1,0-11.72L117.05,42.21a12.76,12.76,0,0,1,21.9,0L226.4,194.08A11.45,11.45,0,0,1,226.4,205.8ZM124,144V104a4,4,0,0,1,8,0v40a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,180Z"}))]]),s=n.forwardRef((e,t)=>n.createElement(r.A,{ref:t,...e,weights:l}));s.displayName="WarningIcon";let i=s},22450:(e,t,a)=>{"use strict";a.d(t,{default:()=>s});var n=a(78604),r=a(27540),l=a(39504);function s({successLabel:e,errorMessage:t}){let a=(0,r.useRouter)(),i=(0,n.useRef)(!1);return(0,n.useEffect)(()=>{!i.current&&(i.current=!0,e&&(l.oR.success(`${e} connected`),a.replace("/connectors")),t&&console.error("[OAuth] connection failed:",t))},[e,t,a]),null}},29697:(e,t,a)=>{"use strict";a.d(t,{default:()=>U});var n=a(3680),r=a(78604),l=a(32307),s=a(65668),i=a(28870),o=a(66736),c=a(77045);let d=[{slug:"notion",label:"Notion",authType:"api_key",docsHint:"Create a Notion integration at notion.so/my-integrations and copy its internal secret."},{slug:"notion-oauth",label:"Notion (OAuth)",authType:"oauth2",credentialType:"notion-oauth",docsHint:"Public Integration via OAuth — create one at notion.so/my-integrations (Public type) and authorize from your dashboard."},{slug:"google-drive",label:"Google Drive",authType:"oauth2",credentialType:"google-oauth",docsHint:"OAuth flow — uses your Google credential (create one under Credentials)."},{slug:"gmail",label:"Gmail",authType:"oauth2",credentialType:"google-oauth",docsHint:"OAuth flow — uses your Google credential (create one under Credentials)."},{slug:"google-sheets",label:"Google Sheets",authType:"oauth2",credentialType:"google-oauth",docsHint:"OAuth flow — uses your Google credential (create one under Credentials)."},{slug:"google-docs",label:"Google Docs",authType:"oauth2",credentialType:"google-oauth",docsHint:"OAuth flow — uses your Google credential (create one under Credentials)."},{slug:"airtable-oauth",label:"Airtable (OAuth)",authType:"oauth2",credentialType:"airtable-oauth",docsHint:"OAuth flow for Airtable Public Integrations (recommended)."},{slug:"airtable",label:"Airtable",authType:"api_key",docsHint:"Personal Access Token — airtable.com/create/tokens."},{slug:"apify",label:"Apify",authType:"api_key",docsHint:"Token API Apify — console.apify.com/account/integrations."},{slug:"firecrawl",label:"Firecrawl",authType:"api_key",docsHint:"API key Firecrawl — firecrawl.dev/account."},{slug:"tavily",label:"Tavily",authType:"api_key",docsHint:"API key Tavily — app.tavily.com."}];var u=a(81630),x=a(88499),m=a(93606),p=a(39504),h=a(64678);let b=(0,h.createServerReference)("405d2914232a34edc9f74779988ef691af296a9654",h.callServer,void 0,h.findSourceMapURL,"deleteConnectorAction"),g=(0,h.createServerReference)("606055a600e56bd7666fafc3d5e53c010979a76483",h.callServer,void 0,h.findSourceMapURL,"renameConnectorAction"),f=(0,h.createServerReference)("60dc0da2d7c5db3035a1afb7ba208d34c7c256b977",h.callServer,void 0,h.findSourceMapURL,"assignCredentialAction"),v=(0,h.createServerReference)("609fad4351e144d04349ee549ca1bc241d89e2e606",h.callServer,void 0,h.findSourceMapURL,"updateConnectorApiKeyAction"),y=(0,h.createServerReference)("40ef10ebce01bad6b03cc551d9efc8c480ffd25d9d",h.callServer,void 0,h.findSourceMapURL,"refreshCredentialAction");var k=a(14308),j=a(38666);let N=new Set(["notion-oauth"]);function A({instance:e,catalogEntry:t,compatibleCredentials:a}){var l;let[s,i]=(0,r.useTransition)(),[o,c]=(0,r.useTransition)(),[d,u]=(0,r.useState)(!1),[x,m]=(0,r.useState)(!1),[h,w]=(0,r.useState)(!1),[C,S]=(0,r.useState)(e.name),[T,R]=(0,r.useState)(!1),[M,E]=(0,r.useState)(e.credentialId??a[0]?.id??""),[Z,L]=(0,r.useState)(!1),[$,F]=(0,r.useState)(""),H="api_key"===e.authType,I="oauth2"===e.authType,D=e.active,P=I&&!N.has(t.credentialType??""),O=t.credentialType,G=e.credentialId,_=e.credentialName,U=e.credentialAccountName,z=e.credentialExpiresAt,B=e.credentialScopes,K=!!(l=z??null)&&l.getTime()<Date.now(),q=D?"connected":"inactive";function V(){let t=C.trim();t&&t!==e.name?i(async()=>{let a=await g(e.id,t);a.ok?(p.oR.success("Renamed"),w(!1)):p.oR.error(a.message)}):w(!1)}function W(){let t=$.trim();t?i(async()=>{let a=await v(e.id,t);a.ok?(p.oR.success(`${e.name} key rotated`),L(!1),F("")):p.oR.error(a.message)}):p.oR.error("New API key is required")}return(0,n.jsxs)("div",{className:"bg-paper border border-rule-2 rounded-xl p-5 space-y-4",children:[(0,n.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,n.jsxs)("div",{className:"flex-1 min-w-0",children:[h?(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("input",{autoFocus:!0,value:C,onChange:e=>S(e.target.value),onKeyDown:t=>{"Enter"===t.key&&V(),"Escape"===t.key&&(S(e.name),w(!1))},className:"bg-hover border border-rule rounded-md px-2 py-1 text-sm text-ink focus:border-ink-3 focus:outline-none w-full max-w-xs"}),(0,n.jsx)("button",{type:"button",onClick:V,disabled:s,className:"text-xs text-ok hover:text-ok disabled:opacity-40",children:"Save"}),(0,n.jsx)("button",{type:"button",onClick:()=>{S(e.name),w(!1)},className:"text-xs text-ink-3 hover:text-ink-2",children:"Cancel"})]}):(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("h3",{className:"text-base font-semibold text-ink truncate",children:e.name}),(0,n.jsx)("button",{type:"button",onClick:()=>w(!0),"aria-label":"Rename connector",className:"text-ink-4 hover:text-ink-3 transition-colors text-xs leading-none",title:"Rename",children:"✎"}),(0,n.jsx)("span",{className:`inline-block px-2 py-0.5 rounded text-[10px] font-semibold uppercase tracking-wider ${"connected"===q?"bg-agent-vivid/15 text-ok":"bg-warn-bg text-warn"}`,children:q})]}),(0,n.jsxs)("p",{className:"text-xs text-ink-3 mt-1 font-mono",children:[t.slug," \xb7 ",e.authType]}),U&&(0,n.jsx)("p",{className:"text-xs text-ink-3 mt-1",children:U}),H&&e.hasApiKey&&(0,n.jsxs)("p",{className:"text-xs text-ink-4 mt-0.5 font-mono",children:["key: …",e.credentialId??"????"]})]}),(0,n.jsx)("div",{className:"flex gap-2 shrink-0 flex-wrap justify-end items-start",children:I?(0,n.jsxs)(n.Fragment,{children:[P&&(0,n.jsx)("button",{type:"button",onClick:function(){G&&c(async()=>{let e=await y(G);e.ok?p.oR.success("Token refreshed"):p.oR.error(e.message??"Refresh failed")})},disabled:o||s,className:"px-3 py-1.5 text-xs font-medium border border-rule-2 text-ink-3 rounded-md hover:border-rule hover:text-ink disabled:opacity-40",children:o?"Refreshing…":"Refresh now"}),(0,n.jsx)("button",{type:"button",onClick:()=>m(!0),disabled:s||o,className:"px-3 py-1.5 text-xs font-medium border border-rule-2 text-ink-3 rounded-md hover:border-rule hover:text-ink disabled:opacity-40",children:"Reconnect"}),a.length>0&&(0,n.jsx)("button",{type:"button",onClick:()=>R(e=>!e),disabled:s||o,className:"px-3 py-1.5 text-xs font-medium border border-rule-2 text-ink-3 rounded-md hover:border-rule hover:text-ink disabled:opacity-40",children:T?"Cancel":"Switch credential"}),(0,n.jsx)("button",{type:"button",onClick:()=>u(!0),disabled:s||o,className:"px-3 py-1.5 text-xs font-medium border border-err/30 text-err rounded-md hover:border-err/30 hover:text-err disabled:opacity-40",children:"Disconnect"})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("button",{type:"button",onClick:()=>L(e=>!e),disabled:s,className:"px-3 py-1.5 text-xs font-medium border border-rule-2 text-ink-3 rounded-md hover:border-rule hover:text-ink disabled:opacity-40",children:Z?"Cancel":"Rotate key"}),(0,n.jsx)("button",{type:"button",onClick:()=>u(!0),disabled:s,className:"px-3 py-1.5 text-xs font-medium border border-err/30 text-err rounded-md hover:border-err/30 hover:text-err disabled:opacity-40",children:"Delete"})]})})]}),H&&Z&&(0,n.jsxs)("div",{className:"space-y-3 pt-2 border-t border-rule-2",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{htmlFor:`rotate-${e.id}`,className:"block text-xs text-ink-3 mb-1",children:"New API key"}),(0,n.jsx)("input",{id:`rotate-${e.id}`,type:"password",autoComplete:"off",autoFocus:!0,value:$,onChange:e=>F(e.target.value),onKeyDown:e=>{"Enter"===e.key&&W(),"Escape"===e.key&&(F(""),L(!1))},placeholder:"Paste the new key",className:"w-full bg-hover border border-rule rounded-md px-2 py-1.5 text-sm text-ink placeholder:text-ink-4 focus:border-ink-3 focus:outline-none font-mono"}),(0,n.jsx)("p",{className:"text-[11px] text-ink-4 mt-1",children:"Agent assignments stay intact — only the stored key changes."})]}),(0,n.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,n.jsx)("button",{type:"button",onClick:W,disabled:s||!$.trim(),className:"px-4 py-2 text-sm font-semibold bg-ink text-canvas rounded-md hover:brightness-[0.92] disabled:opacity-50",children:s?"Saving…":"Save new key"}),(0,n.jsx)("button",{type:"button",onClick:()=>{F(""),L(!1)},className:"text-xs text-ink-3 hover:text-ink underline",children:"Cancel"})]})]}),t.docsHint&&(0,n.jsx)("p",{className:"text-xs text-ink-3",children:t.docsHint}),I&&G&&(0,n.jsxs)("div",{className:"pt-2 border-t border-rule-2 space-y-2",children:[_&&(0,n.jsxs)("p",{className:"text-xs text-ink-3",children:["Credential: ",(0,n.jsx)("span",{className:"text-ink font-medium",children:_})]}),B&&(0,n.jsx)("div",{className:"flex flex-wrap gap-1",children:B.split(/\s+/).map(e=>(0,n.jsx)("span",{className:"px-1.5 py-0.5 bg-hover text-ink-3 rounded text-[10px] font-mono",children:e},e))}),P&&(0,n.jsx)("p",{className:"text-xs text-ink-3",children:"Auto-refreshes when used"}),!P&&z&&(0,n.jsx)("p",{className:`text-xs ${K?"text-warn":"text-ink-3"}`,children:function(e){let t;if(!e)return"";let a=Math.round((e.getTime()-Date.now())/1e3),n=Math.abs(a);return t=n<60?`${n}s`:n<3600?`${Math.round(n/60)} min`:n<86400?`${Math.round(n/3600)} h`:`${Math.round(n/86400)} d`,a>=0?`expires in ${t}`:`expired ${t} ago`}(z)})]}),I&&T&&(0,n.jsx)("div",{className:"space-y-3 pt-2 border-t border-rule-2",children:a.length>0?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"block text-xs text-ink-3 mb-1",children:"Use credential"}),(0,n.jsx)("select",{value:M,onChange:e=>E(e.target.value),className:"w-full bg-hover border border-rule rounded-md px-2 py-1.5 text-sm text-ink focus:border-ink-3 focus:outline-none",children:a.map(e=>(0,n.jsxs)("option",{value:e.id,children:[e.name,e.accountName?` (${e.accountName})`:""]},e.id))})]}),(0,n.jsxs)("div",{className:"flex gap-2 items-center pt-1",children:[(0,n.jsx)("button",{type:"button",onClick:()=>M&&void i(async()=>{let t=await f(e.id,M);t.ok?(p.oR.success(`${e.name} credential updated`),R(!1)):p.oR.error(t.message)}),disabled:s||!M,className:"px-4 py-2 text-sm font-semibold bg-ink text-canvas rounded-md hover:brightness-[0.92] disabled:opacity-50",children:s?"Saving…":"Save"}),(0,n.jsx)("button",{type:"button",onClick:()=>{R(!1),m(!0)},className:"px-3 py-1.5 text-xs text-ink-3 hover:text-ink underline",children:"or create new"})]})]}):(0,n.jsxs)("p",{className:"text-xs text-ink-3",children:["No compatible credentials found."," ",(0,n.jsx)("button",{type:"button",onClick:()=>{R(!1),m(!0)},className:"text-indigo-400 hover:text-indigo-300 underline",children:"Create one"})]})}),(0,n.jsx)(k.A,{open:d,title:`${I?"Disconnect":"Delete"} "${e.name}"?`,message:I?"Tools that depend on this connector will fail until you reconnect. Existing job history is preserved.":"This connector instance will be permanently removed. Existing job history is preserved.",confirmLabel:I?"Disconnect":"Delete",onConfirm:function(){u(!1),i(async()=>{let t=await b(e.id);t.ok?p.oR.success(`${e.name} removed`):p.oR.error(t.message)})},onCancel:()=>u(!1)}),x&&O&&(0,n.jsx)(j.A,{initialType:O,returnToConnectorSlug:t.slug,onClose:()=>m(!1)})]})}var w=a(21021);function C({instances:e,credsByType:t}){return(0,n.jsx)("div",{className:"overflow-hidden rounded-2xl border border-rule-2 bg-paper",children:(0,n.jsxs)("table",{className:"w-full border-collapse",children:[(0,n.jsx)("thead",{children:(0,n.jsxs)("tr",{children:[(0,n.jsx)(S,{label:"Provider"}),(0,n.jsx)(S,{label:"Account"}),(0,n.jsx)(S,{label:"Scopes"}),(0,n.jsx)(S,{label:"Status"}),(0,n.jsx)(S,{label:"Actions",align:"right"})]})}),(0,n.jsx)("tbody",{children:e.map(e=>{let a=d.find(t=>t.slug===e.slug),r=a?{...a,credentialType:a.credentialType??null}:{slug:e.slug,label:e.name,authType:e.authType,docsHint:"",credentialType:e.credentialType??null},l=r.credentialType?t[r.credentialType]??[]:[];return(0,n.jsx)(T,{instance:e,catalogEntry:r,compatibleCredentials:l},e.id)})})]})})}function S({label:e,align:t="left"}){return(0,n.jsx)("th",{className:`border-b border-rule-2 px-[18px] pt-3.5 pb-2.5 font-mono text-[9.5px] font-normal uppercase tracking-[0.16em] text-ink-4 ${"right"===t?"text-right":"text-left"}`,scope:"col",children:e})}function T({instance:e,catalogEntry:t,compatibleCredentials:a}){let[l,s]=(0,r.useState)(!1),i=w.a[e.slug],o=(0,w.d)(e.slug,t.label),c=e.active,d=e.credentialScopes?e.credentialScopes.split(/\s+/).filter(Boolean):[];return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("tr",{className:"border-b border-rule-2 last:border-0 hover:bg-hover",children:[(0,n.jsx)("td",{className:"px-[18px] py-[13px] align-middle",children:(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[(0,n.jsx)(u.A,{variant:"conn",size:"sm",shape:"square",background:i,children:(0,n.jsx)("span",{className:"font-mono text-[10px] font-semibold tracking-[0.04em]",children:o})}),(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsx)("div",{className:"text-[13.5px] font-medium leading-[1.2] text-ink",children:t.label}),(0,n.jsx)("div",{className:"mt-0.5 font-mono text-[10.5px] uppercase tracking-[0.12em] text-ink-4",children:t.authType})]})]})}),(0,n.jsx)("td",{className:"px-[18px] py-[13px] align-middle",children:(0,n.jsx)("span",{className:"font-sans text-[13px] leading-[1.3] text-ink-2",children:e.credentialAccountName??e.name})}),(0,n.jsx)("td",{className:"px-[18px] py-[13px] align-middle",children:d.length>0?(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[d.slice(0,4).map(e=>(0,n.jsx)(x.A,{children:e},e)),d.length>4&&(0,n.jsxs)("span",{className:"font-mono text-[11px] text-ink-4",children:["+",d.length-4]})]}):(0,n.jsx)("span",{className:"font-mono text-[11px] text-ink-4",children:"api_key"===e.authType?"api_key":"—"})}),(0,n.jsx)("td",{className:"px-[18px] py-[13px] align-middle",children:(0,n.jsx)(m.A,{variant:c?"done":"warn",label:c?"Connected":"Needs auth"})}),(0,n.jsx)("td",{className:"px-[18px] py-[13px] align-middle",children:(0,n.jsx)("div",{className:"flex items-center justify-end gap-2",children:(0,n.jsx)("button",{type:"button",onClick:()=>s(e=>!e),className:"inline-flex h-[30px] items-center gap-1.5 rounded-[7px] border border-rule bg-paper px-3 text-[12px] font-medium leading-none text-ink-2 transition-colors hover:bg-hover hover:text-ink",children:l?"Close":"Configure"})})})]}),l&&(0,n.jsx)("tr",{className:"border-b border-rule-2 last:border-0 bg-hover/40",children:(0,n.jsx)("td",{colSpan:5,className:"px-[18px] py-3",children:(0,n.jsx)(A,{instance:e,catalogEntry:t,compatibleCredentials:a})})})]})}var R=a(40319),M=a(42357),E=a(37820),Z=a(16237);let L=(0,h.createServerReference)("40acbc65d30c00984ec7cf68c6e885ffb032aec0a7",h.callServer,void 0,h.findSourceMapURL,"saveApiKeyConnectorAction"),$=(0,h.createServerReference)("704d2f0500c368b49f1db458d42a99b07c47d304c7",h.callServer,void 0,h.findSourceMapURL,"createOrAssignOAuthConnectorAction");var F=a(36762),H=a(10900);let I={"google-oauth":"Google","notion-oauth":"Notion","airtable-oauth":"Airtable"};function D({catalogItem:e,compatibleCredentials:t}){let[a,l]=(0,r.useState)(!1),[s,i]=(0,r.useTransition)(),[o,c]=(0,r.useState)(!1),[d,u]=(0,r.useState)(t[0]?.id??""),x="api_key"===e.authType,m="oauth2"===e.authType,h=e.credentialType;return(0,n.jsxs)("div",{className:"bg-paper border border-rule-2 rounded-xl p-4 space-y-3",children:[(0,n.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsx)("h3",{className:"text-sm font-semibold text-ink",children:e.label}),(0,n.jsxs)("p",{className:"text-[11px] text-ink-3 font-mono mt-0.5",children:[e.slug," \xb7 ",e.authType]})]}),(0,n.jsx)("button",{type:"button",onClick:()=>{m&&0===t.length?c(!0):l(e=>!e)},className:"shrink-0 px-3 py-1.5 text-xs font-semibold bg-ink text-canvas rounded-md hover:brightness-[0.92]",children:a?"Cancel":m&&0===t.length?`Connect with ${h?I[h]??e.label:e.label}`:"+ Add"})]}),(0,n.jsx)("p",{className:"text-xs text-ink-4",children:e.docsHint}),x&&a&&(0,n.jsxs)("form",{onSubmit:function(t){t.preventDefault();let a=new FormData(t.currentTarget),n=a.get("name")?.trim()??"",r=a.get("apiKey")?.trim()??"";n?r?i(async()=>{let t=await L({slug:e.slug,name:n,apiKey:r});t.ok?(p.oR.success(`${n} connected`),l(!1)):p.oR.error(t.message)}):p.oR.error("API key is required"):p.oR.error("Name is required")},className:"space-y-3 pt-2 border-t border-rule-2",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("label",{htmlFor:`add-name-${e.slug}`,className:"block text-xs text-ink-3 mb-1",children:["Name ",(0,n.jsx)("span",{className:"text-ink-4",children:'(e.g. "Notion — perso")'})]}),(0,n.jsx)("input",{id:`add-name-${e.slug}`,name:"name",required:!0,placeholder:e.label,className:"w-full bg-hover border border-rule rounded-md px-2 py-1.5 text-sm text-ink placeholder:text-ink-4 focus:border-ink-3 focus:outline-none"})]}),H.m[e.slug]&&(0,n.jsxs)("details",{className:"group text-xs",children:[(0,n.jsx)("summary",{className:"cursor-pointer text-ink-3 hover:text-ink-2",children:"Where do I get this?"}),(0,n.jsx)("div",{className:"mt-3 pl-1",children:(0,n.jsx)(F.A,{guide:H.m[e.slug]})})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{htmlFor:`add-apikey-${e.slug}`,className:"block text-xs text-ink-3 mb-1",children:"API key"}),(0,n.jsx)("input",{id:`add-apikey-${e.slug}`,name:"apiKey",type:"password",required:!0,autoComplete:"off",className:"w-full bg-hover border border-rule rounded-md px-2 py-1.5 text-sm text-ink placeholder:text-ink-4 focus:border-ink-3 focus:outline-none font-mono"})]}),(0,n.jsx)("div",{className:"pt-1",children:(0,n.jsx)("button",{type:"submit",disabled:s,className:"px-4 py-2 text-sm font-semibold bg-ink text-canvas rounded-md hover:brightness-[0.92] disabled:opacity-50",children:s?"Connecting…":"Connect"})})]}),m&&a&&t.length>0&&(0,n.jsxs)("div",{className:"space-y-3 pt-2 border-t border-rule-2",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"block text-xs text-ink-3 mb-1",children:"Use existing credential"}),(0,n.jsx)("select",{value:d,onChange:e=>u(e.target.value),className:"w-full bg-hover border border-rule rounded-md px-2 py-1.5 text-sm text-ink focus:border-ink-3 focus:outline-none",children:t.map(e=>(0,n.jsxs)("option",{value:e.id,children:[e.name,e.accountName?` (${e.accountName})`:""]},e.id))})]}),(0,n.jsxs)("div",{className:"flex gap-2 items-center pt-1",children:[(0,n.jsx)("button",{type:"button",onClick:()=>d&&void i(async()=>{let t=await $(e.slug,d);t.ok?(p.oR.success(`${e.label} connected`),l(!1)):p.oR.error(t.message)}),disabled:s||!d,className:"px-4 py-2 text-sm font-semibold bg-ink text-canvas rounded-md hover:brightness-[0.92] disabled:opacity-50",children:s?"Connecting…":"Connect"}),(0,n.jsx)("button",{type:"button",onClick:()=>{l(!1),c(!0)},className:"px-3 py-1.5 text-xs text-ink-3 hover:text-ink underline",children:"or create new"})]})]}),o&&h&&(0,n.jsx)(j.A,{initialType:h,returnToConnectorSlug:e.slug,onClose:()=>c(!1)})]})}function P(e){return e.startsWith("google-")||"gmail"===e||"notion"===e||"notion-oauth"===e||"airtable"===e||"airtable-oauth"===e?"Productivity":"github"===e||"linear"===e?"DevTools":"hubspot"===e?"CRM":"slack"===e||"intercom"===e?"Comms":"apify"===e||"firecrawl"===e||"tavily"===e||"stripe"===e||"postgres"===e?"Data":"Other"}let O=[{value:"All",label:"All"},{value:"CRM",label:"CRM"},{value:"Productivity",label:"Productivity"},{value:"Data",label:"Data"},{value:"DevTools",label:"DevTools"},{value:"Comms",label:"Comms"},{value:"Other",label:"Other"}];function G({catalog:e,instances:t,credsByType:a,category:r,onCategoryChange:l}){return(0,n.jsxs)("div",{children:[(0,n.jsx)(M.A,{items:O,value:r,onChange:l,className:"mb-[18px]"}),0===e.length?(0,n.jsx)("div",{className:"rounded-2xl border border-rule-2 bg-paper px-6 py-12 text-center",children:(0,n.jsx)("p",{className:"text-[13px] text-ink-3",children:"No connectors in this category."})}):(0,n.jsx)("div",{className:"grid auto-rows-fr grid-cols-1 gap-3.5 md:grid-cols-2 lg:grid-cols-4",children:e.map(e=>{let r=t.filter(t=>t.slug===e.slug),l=r.length>0,s=e.credentialType?a[e.credentialType]??[]:[];return(0,n.jsx)(_,{catalogItem:e,isInstalled:l,installedCount:r.length,compatibleCredentials:s},e.slug)})})]})}function _({catalogItem:e,isInstalled:t,installedCount:a,compatibleCredentials:l}){let[s,i]=(0,r.useState)(!1),o=w.a[e.slug],c=(0,w.d)(e.slug,e.label),d=P(e.slug);return(0,n.jsxs)("div",{className:"flex flex-col",children:[(0,n.jsx)(E.A,{glyph:(0,n.jsx)("span",{className:"font-mono text-[10px] font-semibold tracking-[0.04em]",children:c}),glyphVariant:"conn",glyphBackground:o,name:e.label,description:e.docsHint,category:d,topRight:t?(0,n.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-[6px] bg-ok-bg px-2 py-1 font-sans text-[11px] font-medium text-ok",children:[(0,n.jsx)(R.r,{size:11,weight:"regular"}),a," installed"]}):void 0,foot:(0,n.jsx)(Z.A,{ctaLabel:t?"Add account":"Install",ctaVariant:"blue",onCta:()=>i(e=>!e)})}),s&&(0,n.jsx)("div",{className:"mt-1.5 rounded-2xl border border-rule-2 bg-paper p-4",children:(0,n.jsx)(D,{catalogItem:e,compatibleCredentials:l})})]})}function U({instances:e,catalog:t,credsByType:a}){let[d,u]=(0,r.useState)(e.length>0?"installed":"marketplace"),[x,m]=(0,r.useState)(""),[p,h]=(0,r.useState)("All"),b=(0,r.useMemo)(()=>{if(!x.trim())return e;let t=x.toLowerCase();return e.filter(e=>e.name.toLowerCase().includes(t)||e.slug.toLowerCase().includes(t)||(e.credentialAccountName??"").toLowerCase().includes(t))},[e,x]),g=(0,r.useMemo)(()=>{let e=t;if("All"!==p&&(e=e.filter(e=>P(e.slug)===p)),x.trim()){let t=x.toLowerCase();e=e.filter(e=>e.label.toLowerCase().includes(t)||e.slug.toLowerCase().includes(t))}return e},[t,p,x]);return(0,n.jsxs)("div",{className:"pb-10",children:[(0,n.jsx)(l.A,{title:"API Connectors",subtitle:"Wire your agents to external services — Gmail, Slack, HubSpot, and the rest. Browse the marketplace or manage the accounts you've already connected."}),(0,n.jsx)(s.A,{tabs:(0,n.jsx)(i.A,{value:d,onChange:e=>{u(e),m(""),h("All")},tabs:[{value:"installed",label:"Installed",count:e.length},{value:"marketplace",label:"Marketplace",count:t.length}]}),search:(0,n.jsx)(o.A,{value:x,onChange:m,placeholder:"installed"===d?"Search connectors…":"Search providers…"}),cta:(0,n.jsx)(c.A,{variant:"ink",href:"/credentials",children:"Manage credentials"})}),(0,n.jsx)("div",{className:"pt-5",children:"installed"===d?0===e.length?(0,n.jsx)(z,{onBrowse:()=>u("marketplace")}):0===b.length?(0,n.jsx)(B,{}):(0,n.jsx)(C,{instances:b,credsByType:a}):(0,n.jsx)(G,{catalog:g,instances:e,credsByType:a,category:p,onCategoryChange:h})})]})}function z({onBrowse:e}){return(0,n.jsxs)("div",{className:"rounded-2xl border border-rule-2 bg-paper px-6 py-12 text-center",children:[(0,n.jsxs)("p",{className:"text-[13px] leading-[1.5] text-ink-3",children:["No connectors installed yet.",(0,n.jsx)("br",{}),"Browse the Marketplace to add one."]}),(0,n.jsx)("div",{className:"mt-4 inline-flex",children:(0,n.jsx)(c.A,{variant:"blue",onClick:e,children:"Browse Marketplace"})})]})}function B(){return(0,n.jsx)("div",{className:"rounded-2xl border border-rule-2 bg-paper px-6 py-12 text-center",children:(0,n.jsx)("p",{className:"text-[13px] leading-[1.5] text-ink-3",children:"No connectors match your search."})})}},37820:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var n=a(3680),r=a(81630);function l({glyph:e,glyphVariant:t="skill",glyphBackground:a,name:s,description:i,category:o,topRight:c,foot:d,className:u=""}){return(0,n.jsxs)("div",{className:`relative flex h-full min-h-[200px] flex-col gap-1.5 rounded-2xl border border-rule-2 bg-paper p-[18px] ${u}`,children:[c&&(0,n.jsx)("div",{className:"absolute top-3.5 right-3.5 flex items-center gap-1.5",children:c}),(0,n.jsx)("div",{className:"mb-1.5",children:(0,n.jsx)(r.A,{variant:t,background:a,size:"lg",shape:"square",children:e})}),(0,n.jsx)("div",{className:"text-[15.5px] font-semibold leading-[1.2] tracking-[-0.005em] text-ink",children:s}),i&&(0,n.jsx)("div",{className:"text-[13px] leading-[1.4] text-ink-3",children:i}),o&&(0,n.jsx)("div",{className:"mt-1.5 font-mono text-[10.5px] uppercase tracking-[0.14em] text-ink-4",children:o}),d&&(0,n.jsx)("div",{className:"-mx-[18px] mt-auto flex items-center gap-2 border-t border-rule-2 px-[18px] pt-3.5",children:d})]})}},40319:(e,t,a)=>{"use strict";a.d(t,{r:()=>i});var n=a(78604),r=a(53087),l=a(54935);let s=n.forwardRef((e,t)=>n.createElement(r.A,{ref:t,...e,weights:l.A}));s.displayName="CheckCircleIcon";let i=s},43158:(e,t,a)=>{Promise.resolve().then(a.bind(a,29697)),Promise.resolve().then(a.bind(a,93275)),Promise.resolve().then(a.bind(a,22450))},54935:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});var n=a(78604);let r=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M176.49,95.51a12,12,0,0,1,0,17l-56,56a12,12,0,0,1-17,0l-24-24a12,12,0,1,1,17-17L112,143l47.51-47.52A12,12,0,0,1,176.49,95.51ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),n.createElement("path",{d:"M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M172.24,99.76a6,6,0,0,1,0,8.48l-56,56a6,6,0,0,1-8.48,0l-24-24a6,6,0,0,1,8.48-8.48L112,151.51l51.76-51.75A6,6,0,0,1,172.24,99.76ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M170.83,101.17a4,4,0,0,1,0,5.66l-56,56a4,4,0,0,1-5.66,0l-24-24a4,4,0,0,1,5.66-5.66L112,154.34l53.17-53.17A4,4,0,0,1,170.83,101.17ZM228,128A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"}))]])},64678:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={callServer:function(){return l.callServer},createServerReference:function(){return i.createServerReference},findSourceMapURL:function(){return s.findSourceMapURL}};for(var r in n)Object.defineProperty(t,r,{enumerable:!0,get:n[r]});let l=a(22673),s=a(43145),i=a(87478)},86127:(e,t,a)=>{"use strict";a.d(t,{r:()=>i});var n=a(78604),r=a(5977),l=a(54935);let s=n.forwardRef((e,t)=>n.createElement(r.A,{ref:t,...e,weights:l.A}));s.displayName="CheckCircleIcon";let i=s},88499:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});var n=a(3680);function r({children:e,className:t=""}){return(0,n.jsx)("code",{className:`inline-flex items-center rounded-[5px] bg-hover px-1.5 py-1 font-mono text-[11px] leading-none tracking-[0.02em] text-ink-2 ${t}`,children:e})}},93275:(e,t,a)=>{"use strict";a.d(t,{default:()=>l});var n=a(3680),r=a(27540);function l({code:e,message:t}){let a=(0,r.useRouter)();return(0,n.jsx)("div",{role:"alert",className:"rounded-xl border border-err/30 bg-warn-bg px-5 py-4 text-sm text-err",children:(0,n.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,n.jsxs)("div",{className:"space-y-1.5 min-w-0",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("span",{"aria-hidden":"true",className:"font-bold text-err",children:"!"}),(0,n.jsx)("p",{className:"font-semibold text-err",children:"OAuth connection failed"}),(0,n.jsx)("code",{className:"font-mono text-[10px] text-err/80 bg-warn-bg px-1.5 py-0.5 rounded",children:e})]}),(0,n.jsx)("p",{className:"text-err leading-relaxed",children:t})]}),(0,n.jsx)("button",{type:"button",onClick:function(){a.replace("/connectors")},"aria-label":"Dismiss",className:"shrink-0 text-err/70 hover:text-err transition-colors text-lg leading-none px-2 -mt-0.5",children:"\xd7"})]})})}},93606:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var n=a(3680),r=a(86127),l=a(22089),s=a(82592);let i={done:"Done",warn:"Attention",run:"Running",idle:"Idle","lvl-info":"INFO","lvl-ok":"OK","lvl-warn":"WARN","lvl-err":"ERR"},o={done:"bg-ok-bg text-ok",warn:"bg-warn-bg text-warn",run:"bg-run-bg text-run",idle:"bg-black/5 text-ink-3 dark:bg-white/5","lvl-info":"bg-black/5 text-ink-3 dark:bg-white/5","lvl-ok":"bg-ok-bg text-ok","lvl-warn":"bg-warn-bg text-warn","lvl-err":"bg-warn-bg text-err"};function c({variant:e,label:t,icon:a,className:d=""}){let u=t??i[e],x=null;return void 0!==a?x=a:"done"===e?x=(0,n.jsx)(r.r,{size:11,weight:"regular"}):"warn"===e?x=(0,n.jsx)(l.N,{size:11,weight:"regular"}):"run"===e&&(x=(0,n.jsx)(s.A,{variant:"blue",size:"sm"})),(0,n.jsxs)("span",{className:`inline-flex h-[22px] items-center gap-1.5 rounded-[5px] px-2.5 text-[11px] font-medium leading-none ${o[e]} ${d}`,children:[x,u]})}}},e=>{e.O(0,[3363,9504,3141,4239,1065,8724,7358],()=>e(e.s=43158)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4087],{2393:(e,t,r)=>{Promise.resolve().then(r.bind(r,36448))},14308:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(3680),s=r(78604),i=r(51869);function a({open:e,title:t,message:r,confirmLabel:l="Confirm",cancelLabel:o="Cancel",destructive:d=!0,onConfirm:c,onCancel:x}){let u=(0,s.useRef)(null),[m,h]=(0,s.useState)(!1);return((0,s.useEffect)(()=>{h(!0)},[]),(0,s.useEffect)(()=>{if(e)return u.current?.focus(),window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t);function t(e){"Escape"===e.key&&x()}},[e,x]),e&&m)?(0,i.createPortal)((0,n.jsxs)("div",{role:"dialog","aria-modal":"true","aria-labelledby":"confirm-dialog-title",className:"fixed inset-0 z-50 flex items-center justify-center px-4 text-left",children:[(0,n.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:x,"aria-hidden":"true"}),(0,n.jsxs)("div",{className:"relative bg-paper border border-rule-2 rounded-xl p-6 max-w-md w-full shadow-2xl",children:[(0,n.jsx)("h2",{id:"confirm-dialog-title",className:"text-base font-semibold text-ink",children:t}),r&&(0,n.jsx)("p",{className:"mt-2 text-sm text-ink-3 leading-relaxed",children:r}),(0,n.jsxs)("div",{className:"mt-6 flex justify-end gap-2",children:[(0,n.jsx)("button",{ref:u,type:"button",onClick:x,className:"px-4 py-2 text-sm font-medium border border-rule text-ink-2 rounded-lg hover:border-rule hover:text-ink transition-colors",children:o}),(0,n.jsx)("button",{type:"button",onClick:c,className:`px-4 py-2 text-sm font-semibold rounded-lg transition-colors ${d?"bg-err hover:brightness-[0.94] text-ink":"bg-ink hover:brightness-[0.92] text-canvas"}`,children:l})]})]})]}),document.body):null}},36448:(e,t,r)=>{"use strict";r.d(t,{default:()=>b});var n=r(3680),s=r(78604),i=r(27540),a=r(39504),l=r(40189),o=r(63363),d=r.n(o),c=r(14308);let x=new Set(["google-oauth","airtable-oauth"]),u={"google-oauth":"Google","notion-oauth":"Notion","airtable-oauth":"Airtable"};function m({credential:e,onDelete:t,onRename:r,onRefresh:i}){var l;let[o,h]=(0,s.useState)(!1),[p,b]=(0,s.useState)(!1),[f,g]=(0,s.useState)(e.name),[v,y]=(0,s.useTransition)(),[k,j]=(0,s.useTransition)(),N=x.has(e.type),w=!!(l=e.expiresAt)&&l.getTime()<Date.now(),C=function(e){let t;if(!e)return"";let r=Math.round((e.getTime()-Date.now())/1e3),n=Math.abs(r);return t=n<60?`${n}s`:n<3600?`${Math.round(n/60)} min`:n<86400?`${Math.round(n/3600)} h`:`${Math.round(n/86400)} d`,r>=0?`expires in ${t}`:`expired ${t} ago`}(e.expiresAt),R=u[e.type]??e.type,$=e.inUseBy.length;function E(){let t=f.trim();t&&t!==e.name?y(async()=>{let n=await r(e.id,t);n.ok?(a.oR.success("Credential renamed"),b(!1)):a.oR.error(n.message)}):b(!1)}return(0,n.jsxs)("div",{className:"bg-paper border border-rule-2 rounded-xl p-5 space-y-3",children:[(0,n.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,n.jsx)("h3",{className:"text-base font-semibold text-ink truncate",children:e.name}),(0,n.jsx)("span",{className:"inline-block px-2 py-0.5 rounded text-[10px] font-semibold uppercase tracking-wider bg-indigo-500/15 text-indigo-400 shrink-0",children:R})]}),e.accountName&&(0,n.jsx)("p",{className:"text-xs text-ink-3 mt-0.5",children:e.accountName}),N?(0,n.jsx)("p",{className:"text-xs text-ink-3 mt-0.5",children:"Auto-refreshes when used"}):C?(0,n.jsx)("p",{className:`text-xs mt-0.5 ${w?"text-warn":"text-ink-3"}`,children:C}):null]}),(0,n.jsxs)("div",{className:"flex gap-2 shrink-0 flex-wrap justify-end",children:[(0,n.jsx)("button",{type:"button",onClick:()=>b(!0),disabled:v||k,className:"px-3 py-1.5 text-xs font-medium border border-rule-2 text-ink-3 rounded-md hover:border-rule hover:text-ink disabled:opacity-40",children:"Rename"}),N&&(0,n.jsx)("button",{type:"button",onClick:function(){j(async()=>{let t=await i(e.id);t.ok?a.oR.success("Token refreshed"):a.oR.error(t.message??"Refresh failed")})},disabled:k||v,className:"px-3 py-1.5 text-xs font-medium border border-rule-2 text-ink-3 rounded-md hover:border-rule hover:text-ink disabled:opacity-40",children:k?"Refreshing…":"Refresh"}),(0,n.jsx)("button",{type:"button",onClick:()=>h(!0),disabled:v||k,className:"px-3 py-1.5 text-xs font-medium border border-err/30 text-err rounded-md hover:border-err hover:text-err disabled:opacity-40",children:"Delete"})]})]}),e.decryptError&&(0,n.jsxs)("div",{className:"px-3 py-2 rounded border border-err/30 bg-warn-bg text-xs text-err",children:[(0,n.jsx)("span",{className:"font-semibold",children:"Cannot decrypt this credential."})," The encrypted payload could not be read (master key changed or row corrupted). Delete and recreate it."]}),e.scopes&&(0,n.jsx)("div",{className:"flex flex-wrap gap-1",children:e.scopes.split(/\s+/).map(e=>(0,n.jsx)("span",{className:"px-1.5 py-0.5 bg-hover text-ink-3 rounded text-[10px] font-mono",children:e},e))}),$>0&&(0,n.jsxs)("div",{className:"flex flex-wrap gap-1 items-center",children:[(0,n.jsx)("span",{className:"text-[10px] text-ink-4 uppercase tracking-wider font-semibold mr-1",children:"Used by"}),e.inUseBy.map(e=>(0,n.jsx)(d(),{href:"/connectors",className:"px-2 py-0.5 rounded text-[10px] bg-hover text-ink-3 hover:text-ink hover:bg-hover-2 transition-colors font-mono",children:e.connectorSlug},e.connectorId))]}),p&&(0,n.jsxs)("div",{className:"pt-2 border-t border-rule-2 space-y-2",children:[(0,n.jsx)("label",{className:"block text-xs text-ink-3",children:"New display name"}),(0,n.jsx)("input",{type:"text",value:f,onChange:e=>g(e.target.value),onKeyDown:e=>{"Enter"===e.key&&E(),"Escape"===e.key&&b(!1)},autoFocus:!0,className:"w-full bg-hover border border-rule rounded-md px-2 py-1.5 text-sm text-ink focus:border-ink-3 focus:outline-none"}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)("button",{type:"button",onClick:E,disabled:v,className:"px-3 py-1.5 text-xs font-semibold bg-ink text-canvas rounded-md hover:brightness-[0.92] disabled:opacity-50",children:v?"Saving…":"Save"}),(0,n.jsx)("button",{type:"button",onClick:()=>{b(!1),g(e.name)},className:"px-3 py-1.5 text-xs font-medium border border-rule-2 text-ink-3 rounded-md hover:border-rule hover:text-ink",children:"Cancel"})]})]}),(0,n.jsx)(c.A,{open:o,title:`Delete "${e.name}"?`,message:$>0?`This credential is used by ${$} connector${1!==$?"s":""} which will be disconnected.`:"This credential will be permanently deleted.",confirmLabel:"Delete",onConfirm:function(){h(!1),y(async()=>{let r=await t(e.id);r.ok?a.oR.success(`Credential "${e.name}" deleted`):a.oR.error(r.message)})},onCancel:()=>h(!1)})]})}var h=r(38666),p=r(77045);function b({credentials:e,justCreatedId:t,onDelete:r,onRename:o,onRefresh:d}){let c=(0,i.useRouter)(),x=(0,s.useRef)(!1),[u,f]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{t&&!x.current&&(x.current=!0,a.oR.success("Credential created"),c.replace("/credentials"))},[t,c]),(0,n.jsxs)("div",{className:"py-7",children:[(0,n.jsxs)("div",{className:"mb-5 flex items-start justify-between gap-3",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h1",{className:"text-[28px] font-semibold leading-[1.15] tracking-[-0.015em] text-ink",children:"Credentials"}),(0,n.jsx)("p",{className:"mt-1.5 text-[13px] leading-[1.5] text-ink-3",children:0===e.length?"No credentials yet — create one to connect OAuth providers.":`${e.length} credential${1!==e.length?"s":""}`})]}),(0,n.jsxs)(p.A,{variant:"ink",onClick:()=>f(!0),children:[(0,n.jsx)(l.F,{size:13,weight:"bold"}),"New credential"]})]}),0===e.length?(0,n.jsxs)("div",{className:"rounded-2xl border border-rule-2 bg-paper px-6 py-12 text-center",children:[(0,n.jsxs)("p",{className:"text-sm text-ink-3",children:["Credentials store your OAuth client ID and secret securely (encrypted at rest).",(0,n.jsx)("br",{}),"Once created, multiple connectors can share the same credential."]}),(0,n.jsx)("div",{className:"mt-4 inline-flex",children:(0,n.jsxs)(p.A,{variant:"ink",onClick:()=>f(!0),children:[(0,n.jsx)(l.F,{size:13,weight:"bold"}),"Create your first credential"]})})]}):(0,n.jsx)("div",{className:"space-y-3",children:e.map(e=>(0,n.jsx)(m,{credential:e,onDelete:r,onRename:o,onRefresh:d},e.id))}),u&&(0,n.jsx)(h.A,{onClose:()=>f(!1)})]})}},53087:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(78604);let s=(0,n.createContext)({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),i=n.forwardRef((e,t)=>{let{alt:r,color:i,size:a,weight:l,mirrored:o,children:d,weights:c,...x}=e,{color:u="currentColor",size:m,weight:h="regular",mirrored:p=!1,...b}=n.useContext(s);return n.createElement("svg",{ref:t,xmlns:"http://www.w3.org/2000/svg",width:null!=a?a:m,height:null!=a?a:m,fill:null!=i?i:u,viewBox:"0 0 256 256",transform:o||p?"scale(-1, 1)":void 0,...b,...x},!!r&&n.createElement("title",null,r),d,c.get(null!=l?l:h))});i.displayName="IconBase"},77045:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var n=r(3680),s=r(63363),i=r.n(s);let a={ink:"bg-ink text-canvas hover:brightness-[0.92]",coral:"bg-skill-vivid text-white hover:brightness-[0.94]",blue:"bg-conn-vivid text-white hover:brightness-[0.94]"};function l(e){let{children:t,variant:r="ink",size:s="md",className:l=""}=e,o=`inline-flex items-center justify-center gap-1.5 rounded-md font-medium leading-none border-0 cursor-pointer transition-[filter] ${"md"===s?"h-[34px] px-3.5 text-[13px]":"h-[30px] px-3 text-[12px]"} ${a[r]} ${l}`;if("href"in e&&e.href){let{href:r,variant:s,size:a,className:l,children:d,...c}=e;return(0,n.jsx)(i(),{href:r,className:o,...c,children:t})}let{variant:d,size:c,className:x,children:u,...m}=e;return(0,n.jsx)("button",{type:"button",className:o,...m,children:t})}}},e=>{e.O(0,[3363,9504,4239,1065,8724,7358],()=>e(e.s=2393)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2771],{11431:(e,r,t)=>{"use strict";t.d(r,{default:()=>c});var n=t(3680),s=t(78604),a=t(27540),l=t(39504),o=t(14308),i=t(64678);let d=(0,i.createServerReference)("40cf5b5f09b73debffe55567f325ed8c8dff40f80f",i.callServer,void 0,i.findSourceMapURL,"cancelJobAction");function c({jobId:e}){let[r,t]=(0,s.useState)(!1),[i,u]=(0,s.useTransition)(),b=(0,a.useRouter)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("button",{type:"button",onClick:()=>t(!0),disabled:i,className:"inline-flex h-[30px] items-center gap-1.5 rounded-md border border-rule px-3 text-[12px] font-medium leading-none text-ink-3 transition-colors hover:border-warn/60 hover:bg-warn-bg hover:text-warn disabled:cursor-not-allowed disabled:opacity-50",children:i?"Cancelling…":"Cancel"}),(0,n.jsx)(o.A,{open:r,title:"Cancel this job?",message:"In-flight LLM turns will finish naturally — the loop bails at the next checkpoint. Use this to stop a job that's pending, awaiting, or stuck mid-execution.",confirmLabel:"Cancel job",cancelLabel:"Keep running",destructive:!0,onConfirm:function(){t(!1),u(async()=>{let r=await d(e);r.ok?(l.oR.success("Job cancelled"),b.refresh()):l.oR.error(r.message)})},onCancel:()=>t(!1)})]})}},14308:(e,r,t)=>{"use strict";t.d(r,{A:()=>l});var n=t(3680),s=t(78604),a=t(51869);function l({open:e,title:r,message:t,confirmLabel:o="Confirm",cancelLabel:i="Cancel",destructive:d=!0,onConfirm:c,onCancel:u}){let b=(0,s.useRef)(null),[x,f]=(0,s.useState)(!1);return((0,s.useEffect)(()=>{f(!0)},[]),(0,s.useEffect)(()=>{if(e)return b.current?.focus(),window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r);function r(e){"Escape"===e.key&&u()}},[e,u]),e&&x)?(0,a.createPortal)((0,n.jsxs)("div",{role:"dialog","aria-modal":"true","aria-labelledby":"confirm-dialog-title",className:"fixed inset-0 z-50 flex items-center justify-center px-4 text-left",children:[(0,n.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:u,"aria-hidden":"true"}),(0,n.jsxs)("div",{className:"relative bg-paper border border-rule-2 rounded-xl p-6 max-w-md w-full shadow-2xl",children:[(0,n.jsx)("h2",{id:"confirm-dialog-title",className:"text-base font-semibold text-ink",children:r}),t&&(0,n.jsx)("p",{className:"mt-2 text-sm text-ink-3 leading-relaxed",children:t}),(0,n.jsxs)("div",{className:"mt-6 flex justify-end gap-2",children:[(0,n.jsx)("button",{ref:b,type:"button",onClick:u,className:"px-4 py-2 text-sm font-medium border border-rule text-ink-2 rounded-lg hover:border-rule hover:text-ink transition-colors",children:i}),(0,n.jsx)("button",{type:"button",onClick:c,className:`px-4 py-2 text-sm font-semibold rounded-lg transition-colors ${d?"bg-err hover:brightness-[0.94] text-ink":"bg-ink hover:brightness-[0.92] text-canvas"}`,children:o})]})]})]}),document.body):null}},27540:(e,r,t)=>{"use strict";var n=t(71268);t.o(n,"usePathname")&&t.d(r,{usePathname:function(){return n.usePathname}}),t.o(n,"useRouter")&&t.d(r,{useRouter:function(){return n.useRouter}}),t.o(n,"useSearchParams")&&t.d(r,{useSearchParams:function(){return n.useSearchParams}})},64678:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={callServer:function(){return a.callServer},createServerReference:function(){return o.createServerReference},findSourceMapURL:function(){return l.findSourceMapURL}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=t(22673),l=t(43145),o=t(87478)},76663:(e,r,t)=>{"use strict";t.d(r,{default:()=>c});var n=t(3680),s=t(78604),a=t(64678);let l=(0,a.createServerReference)("403c66ddba6920ef66c6bfae78dfbfc46a80b5b243",a.callServer,void 0,a.findSourceMapURL,"getJobStatusAction"),o={completed:{bg:"bg-ok-bg border border-ok/30",text:"text-ok",dot:"bg-ok",pulse:!1},failed:{bg:"bg-warn-bg border border-err/30",text:"text-err",dot:"bg-err",pulse:!1},processing:{bg:"bg-warn-bg border border-warn/30",text:"text-warn",dot:"bg-warn",pulse:!0},pending:{bg:"bg-hover border border-rule",text:"text-ink-3",dot:"bg-ink-3",pulse:!1},awaiting_approval:{bg:"bg-run-bg border border-run/30",text:"text-run",dot:"bg-run",pulse:!0},awaiting_delegation:{bg:"bg-run-bg border border-run/30",text:"text-run",dot:"bg-run",pulse:!0},cancelled:{bg:"bg-hover border border-rule",text:"text-ink-3",dot:"bg-ink-4",pulse:!1}};function i({status:e}){let r=o[e]??o.pending;return(0,n.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2 py-0.5 rounded-md text-xs font-semibold ${r.bg} ${r.text}`,children:[(0,n.jsx)("span",{className:`w-1.5 h-1.5 rounded-full shrink-0 ${r.dot} ${r.pulse?"animate-pulse":""}`}),e]})}let d=new Set(["completed","failed","cancelled"]);function c({jobId:e,initialStatus:r}){let[t,a]=(0,s.useState)({status:r,result:null,error:null});return(0,s.useEffect)(()=>{if(d.has(t.status))return;let r=async()=>{let r=await l(e);r.ok&&a(r.data)},n=setInterval(()=>{r()},3e3);return()=>clearInterval(n)},[e,t.status]),(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[(0,n.jsx)(i,{status:t.status}),!d.has(t.status)&&(0,n.jsx)("span",{className:"text-xs text-ink-4 animate-pulse",children:"Polling…"})]}),t.result&&(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-xs text-ink-3 font-semibold uppercase tracking-wider mb-1",children:"Result"}),(0,n.jsx)("pre",{className:"text-sm text-ink-2 whitespace-pre-wrap bg-paper rounded-lg p-4 border border-rule-2 max-h-80 overflow-auto",children:t.result})]}),t.error&&(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-xs text-err font-semibold uppercase tracking-wider mb-1",children:"Error"}),(0,n.jsx)("pre",{className:"text-sm text-err whitespace-pre-wrap bg-warn-bg rounded-lg p-4 border border-err/30",children:t.error})]})]})}},82920:(e,r,t)=>{Promise.resolve().then(t.bind(t,11431)),Promise.resolve().then(t.bind(t,76663)),Promise.resolve().then(t.t.bind(t,63363,23))}},e=>{e.O(0,[3363,9504,1065,8724,7358],()=>e(e.s=82920)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8731],{5977:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var l=a(78604);let n=l.forwardRef((e,t)=>{let{alt:a,color:n="currentColor",size:r="1em",weight:s="regular",mirrored:i=!1,children:d,weights:o,...c}=e;return l.createElement("svg",{ref:t,xmlns:"http://www.w3.org/2000/svg",width:r,height:r,fill:n,viewBox:"0 0 256 256",transform:i?"scale(-1, 1)":void 0,...c},!!a&&l.createElement("title",null,a),d,o.get(s))});n.displayName="SSRBase"},19349:(e,t,a)=>{Promise.resolve().then(a.bind(a,35196)),Promise.resolve().then(a.bind(a,46994))},22089:(e,t,a)=>{"use strict";a.d(t,{N:()=>i});var l=a(78604),n=a(5977);let r=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M240.26,186.1,152.81,34.23h0a28.74,28.74,0,0,0-49.62,0L15.74,186.1a27.45,27.45,0,0,0,0,27.71A28.31,28.31,0,0,0,40.55,228h174.9a28.31,28.31,0,0,0,24.79-14.19A27.45,27.45,0,0,0,240.26,186.1Zm-20.8,15.7a4.46,4.46,0,0,1-4,2.2H40.55a4.46,4.46,0,0,1-4-2.2,3.56,3.56,0,0,1,0-3.73L124,46.2a4.77,4.77,0,0,1,8,0l87.44,151.87A3.56,3.56,0,0,1,219.46,201.8ZM116,136V104a12,12,0,0,1,24,0v32a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,176Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M215.46,216H40.54C27.92,216,20,202.79,26.13,192.09L113.59,40.22c6.3-11,22.52-11,28.82,0l87.46,151.87C236,202.79,228.08,216,215.46,216Z",opacity:"0.2"}),l.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM120,104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm8,88a12,12,0,1,1,12-12A12,12,0,0,1,128,192Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M235.07,189.09,147.61,37.22h0a22.75,22.75,0,0,0-39.22,0L20.93,189.09a21.53,21.53,0,0,0,0,21.72A22.35,22.35,0,0,0,40.55,222h174.9a22.35,22.35,0,0,0,19.6-11.19A21.53,21.53,0,0,0,235.07,189.09ZM224.66,204.8a10.46,10.46,0,0,1-9.21,5.2H40.55a10.46,10.46,0,0,1-9.21-5.2,9.51,9.51,0,0,1,0-9.72L118.79,43.21a10.75,10.75,0,0,1,18.42,0l87.46,151.87A9.51,9.51,0,0,1,224.66,204.8ZM122,144V104a6,6,0,0,1,12,0v40a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,180Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M233.34,190.09,145.88,38.22h0a20.75,20.75,0,0,0-35.76,0L22.66,190.09a19.52,19.52,0,0,0,0,19.71A20.36,20.36,0,0,0,40.54,220H215.46a20.36,20.36,0,0,0,17.86-10.2A19.52,19.52,0,0,0,233.34,190.09ZM226.4,205.8a12.47,12.47,0,0,1-10.94,6.2H40.54a12.47,12.47,0,0,1-10.94-6.2,11.45,11.45,0,0,1,0-11.72L117.05,42.21a12.76,12.76,0,0,1,21.9,0L226.4,194.08A11.45,11.45,0,0,1,226.4,205.8ZM124,144V104a4,4,0,0,1,8,0v40a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,180Z"}))]]),s=l.forwardRef((e,t)=>l.createElement(n.A,{ref:t,...e,weights:r}));s.displayName="WarningIcon";let i=s},27540:(e,t,a)=>{"use strict";var l=a(71268);a.o(l,"usePathname")&&a.d(t,{usePathname:function(){return l.usePathname}}),a.o(l,"useRouter")&&a.d(t,{useRouter:function(){return l.useRouter}}),a.o(l,"useSearchParams")&&a.d(t,{useSearchParams:function(){return l.useSearchParams}})},32928:(e,t,a)=>{"use strict";a.d(t,{e:()=>i});var l=a(78604),n=a(53087);let r=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z",opacity:"0.2"}),l.createElement("path",{d:"M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z"}))]]),s=l.forwardRef((e,t)=>l.createElement(n.A,{ref:t,...e,weights:r}));s.displayName="MagnifyingGlassIcon";let i=s},35196:(e,t,a)=>{"use strict";a.d(t,{default:()=>u});var l=a(3680),n=a(78604),r=a(63363),s=a.n(r);function i({tabs:e,value:t,defaultValue:a,onChange:r,variant:s="inset"}){let[d,o]=(0,n.useState)(t??a??e[0].value),c=t??d,m="inset"===s?"bg-paper text-ink shadow-[0_1px_2px_rgba(0,0,0,0.06)]":"bg-ink text-canvas";return(0,l.jsx)("div",{className:`inline-flex gap-0.5 rounded-md p-[3px] ${"inset"===s?"bg-black/[0.05]":"bg-black/[0.04]"}`,role:"tablist",children:e.map(e=>{let a=e.value===c;return(0,l.jsxs)("button",{type:"button",role:"tab","aria-selected":a,onClick:()=>{void 0===t&&o(e.value),r?.(e.value)},className:`inline-flex h-[26px] items-center gap-1.5 rounded-[6px] border-0 px-3 text-[11.5px] font-medium leading-none transition-colors ${a?m:"bg-transparent text-ink-3 hover:text-ink-2"}`,children:[e.label,void 0!==e.count&&(0,l.jsx)("span",{className:`font-mono text-[10px] ${a?"opacity-85":"opacity-65"}`,children:e.count})]},e.value)})})}var d=a(93606),o=a(99203),c=a(32928);let m=[{value:"All",label:"All"},{value:"Running",label:"Running"},{value:"Failed",label:"Failed"}];function u({jobs:e,agents:t,agentId:a}){let[r,h]=(0,n.useState)("All"),[p,g]=(0,n.useState)(""),b=(0,n.useMemo)(()=>new Map(t.map(e=>[e.id,e])),[t]),f=(0,n.useMemo)(()=>{let t=a?e.filter(e=>e.agentId===a):e;if("Running"===r?t=t.filter(e=>{let t=e.status??"";return"processing"===t||"pending"===t||t.startsWith("awaiting")}):"Failed"===r&&(t=t.filter(e=>"failed"===e.status||"cancelled"===e.status)),p.trim()){let e=p.toLowerCase();t=t.filter(t=>{let a=t.agentId?b.get(t.agentId)?.name??"":"";return t.task.toLowerCase().includes(e)||a.toLowerCase().includes(e)||t.channel.toLowerCase().includes(e)})}return t},[e,a,r,p,b]);return(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"mb-3.5 flex flex-wrap items-center gap-2.5",children:[(0,l.jsx)(i,{tabs:m,defaultValue:"All",variant:"dark-active",onChange:e=>h(e)}),(0,l.jsxs)("div",{className:"ml-auto flex h-[34px] min-w-[240px] items-center gap-2 rounded-md border border-rule-2 bg-paper px-3 text-[12.5px] text-ink-4",children:[(0,l.jsx)(c.e,{size:13,className:"shrink-0"}),(0,l.jsx)("input",{type:"search",value:p,onChange:e=>g(e.target.value),placeholder:"Search by task or agent…",className:"flex-1 border-0 bg-transparent text-[13px] leading-none text-ink outline-none placeholder:text-ink-4"})]})]}),(0,l.jsx)("div",{className:"overflow-hidden rounded-2xl border border-rule-2 bg-paper",children:0===f.length?(0,l.jsx)("div",{className:"px-6 py-12 text-center text-[13px] text-ink-4",children:0===e.length?"No runs yet. Use the form above to send your first task to an agent.":"No runs match the current filter."}):(0,l.jsx)("div",{className:"overflow-x-auto",children:(0,l.jsxs)("table",{className:"w-full border-collapse text-sm",children:[(0,l.jsx)("thead",{children:(0,l.jsxs)("tr",{children:[(0,l.jsx)(x,{children:"Agent"}),(0,l.jsx)(x,{children:"Task"}),(0,l.jsx)(x,{className:"hidden md:table-cell",children:"Channel"}),(0,l.jsx)(x,{className:"hidden lg:table-cell",children:"Started"}),(0,l.jsx)(x,{align:"right",children:"Status"})]})}),(0,l.jsx)("tbody",{children:f.map(e=>{var t,a,n,r;let i=e.agentId?b.get(e.agentId):null,c="completed"===(t=e.status)?"done":"failed"===t||"cancelled"===t?"warn":"processing"===t||"pending"===t||t?.startsWith("awaiting")?"run":"idle";return(0,l.jsxs)("tr",{className:"border-b border-dashed border-rule-2 last:border-0 hover:bg-hover transition-colors",children:[(0,l.jsx)("td",{className:"px-[18px] py-3 align-middle",children:i?(0,l.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,l.jsx)(o.A,{name:i.name,imageUrl:i.avatarUrl,size:"md",shape:"round"}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsx)("div",{className:"truncate text-[13px] font-medium leading-[1.2] text-ink",children:i.name}),(0,l.jsx)("div",{className:"truncate font-mono text-[10px] leading-none text-ink-4",children:i.slug})]})]}):(0,l.jsx)("span",{className:"font-mono text-[11px] text-ink-4",children:"—"})}),(0,l.jsx)("td",{className:"max-w-[320px] px-[18px] py-3 align-middle",children:(0,l.jsx)(s(),{href:`/jobs/${e.id}`,className:"line-clamp-1 text-[13px] text-ink-2 hover:text-ink transition-colors",title:e.task,children:(a=e.task).length>72?a.slice(0,72)+"…":a})}),(0,l.jsx)("td",{className:"hidden px-[18px] py-3 align-middle font-mono text-[11px] text-ink-4 md:table-cell",children:e.channel}),(0,l.jsx)("td",{className:"hidden px-[18px] py-3 align-middle font-mono text-[11px] text-ink-4 lg:table-cell",children:(n=e.createdAt)?("string"==typeof n?new Date(n):n).toLocaleString(void 0,{weekday:"short",hour:"2-digit",minute:"2-digit"}):"—"}),(0,l.jsx)("td",{className:"px-[18px] py-3 align-middle text-right",children:(0,l.jsx)(d.A,{variant:c,label:(r=e.status)?({pending:"Pending",processing:"Running",completed:"Done",failed:"Failed",awaiting_approval:"Awaiting",awaiting_delegation:"Awaiting",cancelled:"Cancelled"})[r]??r:"Pending"})})]},e.id)})})]})})})]})}function x({children:e,align:t="left",className:a=""}){return(0,l.jsx)("th",{className:`border-b border-rule-2 px-[18px] pt-1.5 pb-2.5 font-mono text-[9.5px] font-normal uppercase tracking-[0.16em] text-ink-4 ${"right"===t?"text-right":"text-left"} ${a}`,children:e})}},46994:(e,t,a)=>{"use strict";a.d(t,{default:()=>o});var l=a(3680),n=a(78604),r=a(27540),s=a(39504),i=a(64678);let d=(0,i.createServerReference)("407ed238e2e58ae2bd0dc49dd43d25947e796bed98",i.callServer,void 0,i.findSourceMapURL,"sendTaskAction");function o({agents:e}){let t=(0,n.useRef)(null),[a,i]=(0,n.useTransition)(),[c,m]=(0,n.useState)(!1),[u,x]=(0,n.useState)(""),h=(0,r.useRouter)(),p=e.find(e=>e.id===u);return c?(0,l.jsxs)("form",{ref:t,onSubmit:function(e){e.preventDefault();let a=Object.fromEntries(new FormData(e.currentTarget));i(async()=>{let e=await d(a);e.ok?(s.oR.success("Task sent — job created"),t.current?.reset(),m(!1),h.push(`/jobs/${e.data.jobId}`)):s.oR.error(e.message)})},className:"bg-paper border border-rule-2 rounded-xl p-5 space-y-4 max-w-lg",children:[(0,l.jsx)("h3",{className:"text-sm font-semibold text-ink",children:"Send a task"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-xs text-ink-3 mb-1",htmlFor:"task-prompt",children:"Task description"}),(0,l.jsx)("textarea",{id:"task-prompt",name:"prompt",required:!0,rows:6,placeholder:"Summarise the last 10 emails from my inbox…",className:"w-full bg-hover border border-rule rounded-lg px-3 py-2 text-sm text-ink placeholder:text-ink-4 focus:border-ink-3 focus:outline-none resize-y min-h-[80px]"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-xs text-ink-3 mb-1",htmlFor:"task-agent",children:"Assign to"}),(0,l.jsxs)("select",{id:"task-agent",name:"agentId",required:!0,value:u,onChange:e=>x(e.target.value),className:"w-full bg-hover border border-rule rounded-lg px-3 py-2 text-sm text-ink focus:border-ink-3 focus:outline-none",children:[(0,l.jsx)("option",{value:"",disabled:!0,children:"Select agent"}),e.map(e=>(0,l.jsxs)("option",{value:e.id,children:[e.name," (",e.slug,")"]},e.id))]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-xs text-ink-3 mb-1",htmlFor:"task-priority",children:"Priority"}),(0,l.jsxs)("select",{id:"task-priority",name:"priority",defaultValue:"medium",className:"w-full bg-hover border border-rule rounded-lg px-3 py-2 text-sm text-ink focus:border-ink-3 focus:outline-none",children:[(0,l.jsx)("option",{value:"low",children:"Low"}),(0,l.jsx)("option",{value:"medium",children:"Medium"}),(0,l.jsx)("option",{value:"high",children:"High"})]})]})]}),p?.telegramBotToken&&p?.lastSeenChatIdTelegram&&(0,l.jsxs)("label",{className:"flex items-center gap-2 text-sm text-ink-2",children:[(0,l.jsx)("input",{type:"checkbox",name:"sendViaTelegram",value:"true",className:"rounded border border-rule bg-hover accent-white"}),"Send result via Telegram (chat: ",p.lastSeenChatIdTelegram,")"]}),(0,l.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,l.jsx)("button",{type:"submit",disabled:a,className:"px-4 py-2 text-sm font-semibold bg-ink text-canvas rounded-lg hover:brightness-[0.92] transition-colors disabled:opacity-50",children:a?"Sending…":"Send task"}),(0,l.jsx)("button",{type:"button",onClick:()=>m(!1),className:"px-4 py-2 text-sm font-medium border border-rule text-ink-3 rounded-lg hover:border-rule transition-colors",children:"Cancel"})]})]}):(0,l.jsx)("button",{onClick:()=>m(!0),className:"px-4 py-2 text-sm font-medium bg-ink text-canvas rounded-lg hover:brightness-[0.92] transition-colors",children:"+ Send task"})}},53087:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});var l=a(78604);let n=(0,l.createContext)({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),r=l.forwardRef((e,t)=>{let{alt:a,color:r,size:s,weight:i,mirrored:d,children:o,weights:c,...m}=e,{color:u="currentColor",size:x,weight:h="regular",mirrored:p=!1,...g}=l.useContext(n);return l.createElement("svg",{ref:t,xmlns:"http://www.w3.org/2000/svg",width:null!=s?s:x,height:null!=s?s:x,fill:null!=r?r:u,viewBox:"0 0 256 256",transform:d||p?"scale(-1, 1)":void 0,...g,...m},!!a&&l.createElement("title",null,a),o,c.get(null!=i?i:h))});r.displayName="IconBase"},54935:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var l=a(78604);let n=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M176.49,95.51a12,12,0,0,1,0,17l-56,56a12,12,0,0,1-17,0l-24-24a12,12,0,1,1,17-17L112,143l47.51-47.52A12,12,0,0,1,176.49,95.51ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),l.createElement("path",{d:"M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M172.24,99.76a6,6,0,0,1,0,8.48l-56,56a6,6,0,0,1-8.48,0l-24-24a6,6,0,0,1,8.48-8.48L112,151.51l51.76-51.75A6,6,0,0,1,172.24,99.76ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M170.83,101.17a4,4,0,0,1,0,5.66l-56,56a4,4,0,0,1-5.66,0l-24-24a4,4,0,0,1,5.66-5.66L112,154.34l53.17-53.17A4,4,0,0,1,170.83,101.17ZM228,128A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"}))]])},82592:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var l=a(3680);let n={ok:"bg-ok",lime:"bg-agent-vivid",coral:"bg-skill-vivid",blue:"bg-conn-vivid"},r={ok:"animate-[blip_1.4s_ease-out_infinite]",lime:"animate-[blip-lime_1.5s_ease-out_infinite]",coral:"animate-[blip-coral_1.4s_ease-out_infinite]",blue:"animate-[blip-blue_1.4s_ease-out_infinite]"};function s({variant:e="ok",size:t="sm",animate:a=!0,className:i=""}){return(0,l.jsx)("span",{className:`inline-block shrink-0 rounded-full ${"sm"===t?"h-[7px] w-[7px]":"h-2 w-2"} ${n[e]} ${a?r[e]:""} ${i}`})}},86127:(e,t,a)=>{"use strict";a.d(t,{r:()=>i});var l=a(78604),n=a(5977),r=a(54935);let s=l.forwardRef((e,t)=>l.createElement(n.A,{ref:t,...e,weights:r.A}));s.displayName="CheckCircleIcon";let i=s},93606:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var l=a(3680),n=a(86127),r=a(22089),s=a(82592);let i={done:"Done",warn:"Attention",run:"Running",idle:"Idle","lvl-info":"INFO","lvl-ok":"OK","lvl-warn":"WARN","lvl-err":"ERR"},d={done:"bg-ok-bg text-ok",warn:"bg-warn-bg text-warn",run:"bg-run-bg text-run",idle:"bg-black/5 text-ink-3 dark:bg-white/5","lvl-info":"bg-black/5 text-ink-3 dark:bg-white/5","lvl-ok":"bg-ok-bg text-ok","lvl-warn":"bg-warn-bg text-warn","lvl-err":"bg-warn-bg text-err"};function o({variant:e,label:t,icon:a,className:c=""}){let m=t??i[e],u=null;return void 0!==a?u=a:"done"===e?u=(0,l.jsx)(n.r,{size:11,weight:"regular"}):"warn"===e?u=(0,l.jsx)(r.N,{size:11,weight:"regular"}):"run"===e&&(u=(0,l.jsx)(s.A,{variant:"blue",size:"sm"})),(0,l.jsxs)("span",{className:`inline-flex h-[22px] items-center gap-1.5 rounded-[5px] px-2.5 text-[11px] font-medium leading-none ${d[e]} ${c}`,children:[u,m]})}},99203:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var l=a(3680),n=a(22575);let r={sm:{box:"h-6 w-6",text:"text-[9.5px]",px:24},md:{box:"h-[30px] w-[30px]",text:"text-[10.5px]",px:30},lg:{box:"h-[42px] w-[42px]",text:"text-[14px]",px:42}};function s({name:e,imageUrl:t,size:a="md",shape:i="round",className:d=""}){let o=r[a],c=`inline-flex shrink-0 items-center justify-center overflow-hidden bg-hover font-mono font-semibold tracking-[0.04em] text-ink-2 ${o.box} ${o.text} ${"round"===i?"rounded-full":"rounded-[8px]"} ${d}`;return t?(0,l.jsx)("span",{className:c,children:(0,l.jsx)(n.default,{src:t,alt:e,width:o.px,height:o.px,className:"h-full w-full object-cover"})}):(0,l.jsx)("span",{className:c,children:function(e){let t=e.trim();if(!t)return"?";let a=t.split(/\s+/);return a.length>=2?((a[0][0]??"")+(a[1][0]??"")).toUpperCase():t.slice(0,2).toUpperCase()}(e)})}}},e=>{e.O(0,[3363,9504,9060,1065,8724,7358],()=>e(e.s=19349)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9305],{10204:(e,t,n)=>{Promise.resolve().then(n.bind(n,28142)),Promise.resolve().then(n.bind(n,17345)),Promise.resolve().then(n.bind(n,64676)),Promise.resolve().then(n.bind(n,76556)),Promise.resolve().then(n.bind(n,11248)),Promise.resolve().then(n.t.bind(n,63363,23))},11248:(e,t,n)=>{"use strict";n.d(t,{default:()=>l});var i=n(3680),s=n(78604),r=n(32895),a=n(97713);function l(){let[e,t]=(0,s.useState)("light"),[n,l]=(0,s.useState)(!1);(0,s.useEffect)(()=>{t("u"<typeof document?"light":"dark"===document.documentElement.getAttribute("data-theme")?"dark":"light"),l(!0)},[]);let o="dark"===e?r.b:a.A,c="dark"===e?"Switch to light theme":"Switch to dark theme";return(0,i.jsx)("button",{type:"button",onClick:()=>{let n="dark"===e?"light":"dark";document.documentElement.setAttribute("data-theme",n);try{localStorage.setItem("nodal.theme",n)}catch{}t(n)},"aria-label":c,title:c,className:"flex h-[34px] w-[34px] items-center justify-center rounded-md border border-rule-2 bg-paper text-ink-2 transition-colors hover:text-ink",suppressHydrationWarning:!0,children:n?(0,i.jsx)(o,{size:15}):(0,i.jsx)(a.A,{size:15})})}},17345:(e,t,n)=>{"use strict";n.d(t,{default:()=>a});var i=n(3680),s=n(78604),r=n(50472);function a(){let[e,t]=(0,s.useState)(!1);async function n(){t(!0);try{let e=await fetch("/api/auth/sign-out",{method:"POST",headers:{"Content-Type":"application/json"},body:"{}",credentials:"same-origin"});e.ok||console.error("sign-out failed",e.status,await e.text().catch(()=>""))}catch(e){console.error("sign-out network error",e)}window.location.replace("/login")}return(0,i.jsx)("button",{type:"button",onClick:n,disabled:e,"data-testid":"user-menu-sign-out","aria-label":"Sign out",title:"Sign out",className:"inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-ink-3 transition-colors hover:bg-hover hover:text-ink disabled:cursor-not-allowed disabled:opacity-40",children:(0,i.jsx)(r.M,{size:15})})}},28142:(e,t,n)=>{"use strict";n.d(t,{default:()=>O});var i=n(3680),s=n(78604),r=n(27540),a=n(71877),l=n(38492),o=n(27245),c=n(30342),d=n(62089),x=n(37696),u=n(53054),m=n(58518),p=n(34484),h=n(34453),f=n(24792),b=n(37036),g=n(95543),k=n(76613),v=n(37223),j=n(54805);function N(){return(0,i.jsx)("div",{className:"px-4 pb-3.5",children:(0,i.jsxs)("div",{className:"flex items-center gap-2 text-[16px] font-medium leading-none tracking-[-0.005em] text-ink",children:[(0,i.jsx)("span",{className:"flex h-[22px] w-[22px] items-center justify-center rounded-md bg-ink text-[11px] font-semibold leading-none tracking-[0.04em] text-canvas font-mono",children:"N"}),(0,i.jsx)("span",{children:"Nodal-Agents"})]})})}var w=n(49455),y=n(65816);function _({fleets:e,activeId:t,disabled:n,onChange:r}){let[a,l]=(0,s.useState)(!1),o=(0,s.useRef)(null),c=e.find(e=>e.id===t)??e[0];return((0,s.useEffect)(()=>{if(!a)return;let e=e=>{o.current&&!o.current.contains(e.target)&&l(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[a]),c)?(0,i.jsxs)("div",{ref:o,className:"relative mx-3.5 mt-3.5 mb-1",children:[(0,i.jsxs)("button",{type:"button",onClick:()=>!n&&l(e=>!e),"aria-haspopup":"listbox","aria-expanded":a,"aria-disabled":n||void 0,className:`flex h-[38px] w-full items-center gap-2.5 rounded-[9px] border border-rule-2 bg-paper px-2.5 text-[13px] leading-none text-ink ${n?"cursor-default":"cursor-pointer hover:bg-hover-2/40"}`,children:[(0,i.jsx)("span",{className:"flex h-[22px] w-[22px] shrink-0 items-center justify-center rounded-[5px] font-mono text-[10.5px] font-semibold leading-none tracking-[0.04em] text-[#0a0a0a]",style:{background:c.color},children:c.tag.slice(0,2)}),(0,i.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col text-left leading-[1.15]",children:[(0,i.jsx)("span",{className:"truncate text-[12.5px] font-medium text-ink",children:c.name}),(0,i.jsxs)("span",{className:"mt-0.5 font-mono text-[10px] uppercase leading-none tracking-[0.08em] text-ink-4",children:[c.tag,"number"==typeof c.count&&` \xb7 ${c.count} agents`]})]}),!n&&(0,i.jsx)(w.a,{size:12,className:"shrink-0 text-ink-3"})]}),a&&!n&&(0,i.jsx)("div",{role:"listbox",className:"absolute inset-x-0 top-[calc(100%+6px)] z-30 rounded-[9px] border border-rule-2 bg-paper p-1.5 shadow-[0_12px_32px_rgba(0,0,0,0.10)]",children:e.map(e=>{let n=e.id===t;return(0,i.jsxs)("div",{role:"option","aria-selected":n,onClick:()=>{r?.(e.id),l(!1)},className:`flex cursor-pointer items-center gap-2.5 rounded-md px-2 py-1.5 text-[12.5px] leading-[1.2] text-ink-2 hover:bg-hover ${n?"bg-hover-2":""}`,children:[(0,i.jsx)("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center rounded-[5px] font-mono text-[10px] font-semibold leading-none tracking-[0.04em] text-[#0a0a0a]",style:{background:e.color},children:e.tag.slice(0,2)}),(0,i.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col gap-[1px]",children:[(0,i.jsx)("span",{className:"font-medium text-ink",children:e.name}),(0,i.jsxs)("span",{className:"font-mono text-[10px] leading-none tracking-[0.04em] text-ink-4",children:["number"==typeof e.count?`${e.count} agents \xb7 `:"",e.tag.toLowerCase()]})]}),(0,i.jsx)(y.J,{size:12,weight:"bold",className:`text-ink ${n?"opacity-100":"opacity-0"}`})]},e.id)})})]}):null}function C({children:e}){return(0,i.jsx)("div",{className:"px-3.5 pt-3.5 pb-1 font-mono text-[9.5px] uppercase tracking-[0.14em] text-ink-4",children:e})}var E=n(63363),$=n.n(E);let S={agent:"bg-agent-vivid",skill:"bg-skill-vivid",conn:"bg-conn-vivid"};function A({href:e,label:t,icon:n,dot:s,count:a,isActive:l}){let o=(0,r.usePathname)(),c=l??(o===e||o.startsWith(e+"/"));return(0,i.jsxs)($(),{href:e,className:`group mx-2 flex h-[30px] items-center gap-2.5 rounded-lg px-2.5 text-[12.5px] leading-none transition-colors ${c?"bg-paper text-ink font-medium shadow-[0_1px_2px_rgba(0,0,0,0.04)]":"text-ink-2 hover:bg-hover"}`,children:[s?(0,i.jsx)("span",{className:`h-2 w-2 shrink-0 rounded-full ${S[s]}`}):(0,i.jsx)("span",{className:`flex h-3.5 w-3.5 shrink-0 items-center justify-center ${c?"text-ink":"text-ink-3 group-hover:text-ink-2"}`,children:n}),(0,i.jsx)("span",{className:"flex-1 truncate",children:t}),void 0!==a&&(0,i.jsx)("span",{className:"font-mono text-[10px] tracking-[0.02em] text-ink-4",children:a})]})}var z=n(82592);function L({runningAgents:e,throughput:t,fill:n=.36}){if(void 0===e)return null;let s=100*Math.max(0,Math.min(1,n));return(0,i.jsxs)("div",{className:"mx-3 mt-2.5 rounded-[10px] border border-rule-2 bg-paper px-3 pt-2.5 pb-3",children:[(0,i.jsxs)("div",{className:"flex items-center gap-1.5 font-mono text-[9.5px] uppercase leading-none tracking-[0.14em] text-ink-3",children:[(0,i.jsx)(z.A,{variant:"lime"}),"Live"]}),(0,i.jsxs)("div",{className:"mt-1.5 text-[12.5px] leading-[1.35] text-ink-2",children:[(0,i.jsxs)("b",{className:"font-semibold text-ink",children:[e," agents"]}),t?` running \xb7 ${t}`:" running"]}),(0,i.jsx)("div",{className:"mt-2.5 h-[3px] overflow-hidden rounded-[2px] bg-black/[0.06] dark:bg-white/[0.06]",children:(0,i.jsx)("i",{className:"block h-full bg-agent-vivid",style:{width:`${s}%`}})})]})}let P=[{section:"Overview",items:[{href:"/",label:"Home",icon:a.t},{href:"/jobs",label:"Runs",icon:l.T},{href:"/llm-providers",label:"LLM Providers",icon:o.R}]},{section:"Build",items:[{href:"/agents",label:"Agents",icon:c.n,dot:"agent"},{href:"/skills",label:"Skills",icon:d.f,dot:"skill"},{href:"/connectors",label:"API Connectors",icon:x.F,dot:"conn"},{href:"/mcp",label:"MCP Connectors",icon:u.X,dot:"conn"},{href:"/credentials",label:"Credentials",icon:m.U},{href:"/memories",label:"Memory",icon:p.j}]},{section:"Operate",items:[{href:"/automations",label:"Automation",icon:h.E},{href:"/approvals",label:"Approvals",icon:f.o},{href:"/logs",label:"Logs",icon:b.m}]},{section:"Workspace",items:[{href:"/billing",label:"Billing",icon:g.S},{href:"/settings",label:"Settings",icon:k._}]}],M=[{id:"local",name:"Local workspace",tag:"LCL",color:"#d4ff2e"}];function O({userMenu:e}){let t=(0,r.usePathname)(),[n,a]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{queueMicrotask(()=>a(!1))},[t]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"fixed top-0 right-0 left-0 z-40 flex items-center justify-between border-b border-rule-2 bg-sidebar px-4 py-3.5 lg:hidden",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2 text-[14px] font-medium tracking-[-0.005em] text-ink",children:[(0,i.jsx)("span",{className:"flex h-[20px] w-[20px] items-center justify-center rounded-md bg-ink font-mono text-[10px] font-semibold text-canvas",children:"N"}),(0,i.jsx)("span",{children:"Nodal-Agents"})]}),(0,i.jsx)("button",{type:"button",onClick:()=>a(e=>!e),className:"text-ink-3 transition-colors hover:text-ink","aria-label":n?"Close menu":"Open menu",children:n?(0,i.jsx)(v.X,{size:20}):(0,i.jsx)(j.B,{size:20})})]}),n&&(0,i.jsx)("div",{className:"fixed inset-0 z-30 bg-black/40 lg:hidden",onClick:()=>a(!1),"aria-hidden":!0}),(0,i.jsxs)("aside",{className:`fixed top-0 left-0 z-40 flex h-full w-[220px] flex-col border-r border-rule-2 bg-sidebar pt-4 pb-3 transition-transform duration-200 lg:translate-x-0 ${n?"translate-x-0":"-translate-x-full"}`,children:[(0,i.jsx)(N,{}),(0,i.jsx)(_,{fleets:M,activeId:M[0].id,disabled:!0}),(0,i.jsx)("nav",{className:"flex flex-1 flex-col overflow-y-auto py-1.5",children:P.map((e,n)=>(0,i.jsxs)("div",{children:[e.section&&(0,i.jsx)(C,{children:e.section}),e.items.map(e=>(0,i.jsx)(A,{href:e.href,label:e.label,icon:e.icon?(0,i.jsx)(e.icon,{size:14}):void 0,dot:e.dot,count:e.count,isActive:"/"===e.href?"/"===t:t===e.href||t.startsWith(e.href+"/")},e.href))]},n))}),(0,i.jsx)(L,{runningAgents:void 0}),e&&(0,i.jsx)("div",{className:"mt-2 border-t border-rule-2 px-3 pt-3","data-testid":"user-menu",children:e})]})]})}},64676:(e,t,n)=>{"use strict";n.d(t,{default:()=>a});var i=n(3680),s=n(32928),r=n(78604);function a({placeholder:e="Search agents, skills, runs…",keyboardShortcut:t=!0,onSubmit:n,className:l=""}){let o=(0,r.useRef)(null);return(0,r.useEffect)(()=>{if(!t)return;let e=e=>{if("/"!==e.key)return;let t=e.target;t&&/^(input|textarea|select)$/i.test(t.tagName)||t?.isContentEditable||(e.preventDefault(),o.current?.focus())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[t]),(0,i.jsxs)("form",{onSubmit:e=>{e.preventDefault(),n?.(o.current?.value??"")},className:`flex h-[34px] min-w-[280px] items-center gap-2 rounded-md border border-rule-2 bg-paper px-3 text-[12.5px] text-ink-4 ${l}`,children:[(0,i.jsx)(s.e,{size:13,className:"shrink-0"}),(0,i.jsx)("input",{ref:o,type:"search",placeholder:e,className:"flex-1 border-0 bg-transparent text-[13px] leading-none text-ink outline-none placeholder:text-ink-4"}),(0,i.jsx)("span",{className:"rounded-[5px] border border-rule bg-black/5 px-1.5 py-[1px] font-mono text-[11px] leading-none text-ink-4 dark:bg-white/[0.06]",children:"/"})]})}},76556:(e,t,n)=>{"use strict";n.d(t,{default:()=>l});var i=n(3680),s=n(78604),r=n(39504);function a(){return"u"<typeof document?"light":"dark"===document.documentElement.getAttribute("data-theme")?"dark":"light"}function l(){let[e,t]=(0,s.useState)("light");return(0,s.useEffect)(()=>{t(a());let e=new MutationObserver(()=>t(a()));return e.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>e.disconnect()},[]),(0,i.jsx)(r.l$,{theme:e,position:"bottom-right",richColors:!0,closeButton:!0})}},82592:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var i=n(3680);let s={ok:"bg-ok",lime:"bg-agent-vivid",coral:"bg-skill-vivid",blue:"bg-conn-vivid"},r={ok:"animate-[blip_1.4s_ease-out_infinite]",lime:"animate-[blip-lime_1.5s_ease-out_infinite]",coral:"animate-[blip-coral_1.4s_ease-out_infinite]",blue:"animate-[blip-blue_1.4s_ease-out_infinite]"};function a({variant:e="ok",size:t="sm",animate:n=!0,className:l=""}){return(0,i.jsx)("span",{className:`inline-block shrink-0 rounded-full ${"sm"===t?"h-[7px] w-[7px]":"h-2 w-2"} ${s[e]} ${n?r[e]:""} ${l}`})}}},e=>{e.O(0,[3363,9504,5365,1065,8724,7358],()=>e(e.s=10204)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[173],{14308:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(3680),r=n(78604),i=n(51869);function s({open:e,title:t,message:n,confirmLabel:l="Confirm",cancelLabel:o="Cancel",destructive:d=!0,onConfirm:c,onCancel:p}){let x=(0,r.useRef)(null),[u,m]=(0,r.useState)(!1);return((0,r.useEffect)(()=>{m(!0)},[]),(0,r.useEffect)(()=>{if(e)return x.current?.focus(),window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t);function t(e){"Escape"===e.key&&p()}},[e,p]),e&&u)?(0,i.createPortal)((0,a.jsxs)("div",{role:"dialog","aria-modal":"true","aria-labelledby":"confirm-dialog-title",className:"fixed inset-0 z-50 flex items-center justify-center px-4 text-left",children:[(0,a.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:p,"aria-hidden":"true"}),(0,a.jsxs)("div",{className:"relative bg-paper border border-rule-2 rounded-xl p-6 max-w-md w-full shadow-2xl",children:[(0,a.jsx)("h2",{id:"confirm-dialog-title",className:"text-base font-semibold text-ink",children:t}),n&&(0,a.jsx)("p",{className:"mt-2 text-sm text-ink-3 leading-relaxed",children:n}),(0,a.jsxs)("div",{className:"mt-6 flex justify-end gap-2",children:[(0,a.jsx)("button",{ref:x,type:"button",onClick:p,className:"px-4 py-2 text-sm font-medium border border-rule text-ink-2 rounded-lg hover:border-rule hover:text-ink transition-colors",children:o}),(0,a.jsx)("button",{type:"button",onClick:c,className:`px-4 py-2 text-sm font-semibold rounded-lg transition-colors ${d?"bg-err hover:brightness-[0.94] text-ink":"bg-ink hover:brightness-[0.92] text-canvas"}`,children:l})]})]})]}),document.body):null}},63217:(e,t,n)=>{"use strict";function a(e){switch(e){case"openai-compatible":return"Local LLM";case"anthropic":return"Anthropic";case"openai":return"OpenAI";case"ollama":return"Ollama";case"openrouter":return"OpenRouter";case"google":return"Google";case"mistral":return"Mistral";case"groq":return"Groq";default:return e}}n.d(t,{R:()=>a})},70397:(e,t,n)=>{Promise.resolve().then(n.bind(n,79846))},79846:(e,t,n)=>{"use strict";n.d(t,{default:()=>C});var a=n(3680),r=n(78604),i=n(27540),s=n(40189),l=n(63363),o=n.n(l),d=n(39504),c=n(76613),p=n(14308),x=n(64678);let u=(0,x.createServerReference)("4050124e40c9c0616ab0145f0fcfe4bd8de668f847",x.callServer,void 0,x.findSourceMapURL,"deleteLlmKeyAction");var m=n(63217),g=n(93606);function b({row:e,onEdit:t,onDeleted:n}){let[i,s]=(0,r.useTransition)(),[l,o]=(0,r.useState)(!1),{bg:x,fg:h,initials:v}=function(e){switch(e){case"anthropic":return{bg:"#c96442",fg:"#fff",initials:"AN"};case"openai":return{bg:"#0fa47c",fg:"#fff",initials:"OA"};case"openai-compatible":return{bg:"#7c5cbf",fg:"#fff",initials:"LC"};case"ollama":return{bg:"#3b5a8a",fg:"#fff",initials:"OL"};case"openrouter":return{bg:"#b5455a",fg:"#fff",initials:"OR"};case"google":return{bg:"#1a73c8",fg:"#fff",initials:"GG"};case"mistral":return{bg:"#c47a1a",fg:"#fff",initials:"MI"};case"groq":return{bg:"#a33b50",fg:"#fff",initials:"GQ"};default:return{bg:"#4a4a50",fg:"#fff",initials:e.slice(0,2).toUpperCase()}}}(e.provider);return(0,a.jsxs)("div",{className:"flex flex-col gap-3 rounded-2xl border border-rule-2 bg-paper p-[18px]",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"flex h-[42px] w-[42px] shrink-0 items-center justify-center rounded-xl font-mono text-[13px] font-semibold tracking-[0.04em]",style:{background:x,color:h},children:v}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-[15px] font-semibold leading-[1.2] tracking-[-0.005em] text-ink",children:e.nickname??(0,m.R)(e.provider)}),e.nickname&&(0,a.jsx)("span",{className:"font-mono text-[10.5px] uppercase tracking-[0.06em] text-ink-4",children:(0,m.R)(e.provider)})]}),e.defaultModel&&(0,a.jsx)("div",{className:"mt-0.5 font-mono text-[10.5px] uppercase tracking-[0.06em] text-ink-4 truncate",children:e.defaultModel})]}),e.isActive?(0,a.jsx)(g.A,{variant:"done",label:"Active"}):(0,a.jsx)(g.A,{variant:"idle",label:"Disabled"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[e.baseUrl&&(0,a.jsx)("div",{className:"flex items-center gap-2 rounded-lg bg-canvas px-[10px] py-[7px]",children:(0,a.jsx)("code",{className:"flex-1 truncate font-mono text-[12px] leading-none text-ink",children:e.baseUrl})}),(0,a.jsx)("div",{className:"flex items-center gap-2 rounded-lg bg-canvas px-[10px] py-[7px]",children:e.hasApiKey?(0,a.jsxs)("code",{className:"font-mono text-[12px] leading-none tracking-widest text-ink-3",children:["••••••••",e.apiKeyLast4??""]}):(0,a.jsx)("span",{className:"text-[12px] leading-none text-warn",children:"No API key"})})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between border-t border-rule-2 pt-[10px]",children:[(0,a.jsx)(f,{count:e.agentCount,keyId:e.id}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsxs)("button",{type:"button",onClick:t,className:"inline-flex h-[28px] items-center gap-1 rounded-md border border-rule px-[10px] text-[11.5px] font-medium text-ink-3 transition-colors hover:border-rule-2 hover:text-ink",children:[(0,a.jsx)(c._,{size:12,weight:"regular"}),"Configure"]}),(0,a.jsx)("button",{type:"button",onClick:()=>o(!0),disabled:i,className:"inline-flex h-[28px] items-center rounded-md border border-err/30 px-[10px] text-[11.5px] font-medium text-err transition-colors hover:border-err/60 hover:bg-warn-bg disabled:opacity-40",children:"Delete"})]})]}),(0,a.jsx)(p.A,{open:l,title:"Remove LLM provider?",message:`"${e.nickname??(0,m.R)(e.provider)}" will be removed. Agents using it will fall back to the default env-configured provider until reassigned.`,confirmLabel:"Remove",onConfirm:function(){o(!1),s(async()=>{let t=await u(e.id);t.ok?(d.oR.success("LLM provider removed"),n()):d.oR.error(t.message)})},onCancel:()=>o(!1)})]})}function f({count:e,keyId:t}){return 0===e?(0,a.jsx)("span",{className:"font-sans text-[12.5px] leading-none text-ink-3",children:"Not in use"}):(0,a.jsxs)(o(),{href:`/agents?llmKeyId=${t}`,className:"font-sans text-[12.5px] leading-none text-ink-3 transition-colors hover:text-ink",title:`${e} agent${1===e?"":"s"} use this key`,children:[(0,a.jsx)("span",{className:"font-mono tabular-nums",children:e})," agent",1===e?"":"s"," using"]})}let h=(0,x.createServerReference)("40c122062f55629e1134802b4ed70346a0149f01f6",x.callServer,void 0,x.findSourceMapURL,"testLlmKeyAction"),v=(0,x.createServerReference)("404763668fb168ad7414167dc7b415573c53070fc4",x.callServer,void 0,x.findSourceMapURL,"updateLlmKeyAction"),k=(0,x.createServerReference)("40f9797526b4fb1565db15523443350c69d7c1325d",x.callServer,void 0,x.findSourceMapURL,"createLlmKeyAction"),j={anthropic:"https://api.anthropic.com/v1",openai:"https://api.openai.com/v1","openai-compatible":"http://localhost:1234/v1",ollama:"http://localhost:11434",openrouter:"https://openrouter.ai/api/v1",google:"https://generativelanguage.googleapis.com/v1beta",mistral:"https://api.mistral.ai/v1",groq:"https://api.groq.com/openai/v1"},N={anthropic:"claude-haiku-4-5-20251001",openai:"gpt-5","openai-compatible":"google/gemma-4-31b",ollama:"llama3.3:70b",openrouter:"anthropic/claude-3.5-sonnet",google:"gemini-2.0-flash",mistral:"mistral-large-latest",groq:"llama-3.3-70b-versatile"},y=["anthropic","openai","openai-compatible","ollama","openrouter","google","mistral","groq"],w="block font-mono text-[10px] uppercase tracking-[0.12em] text-ink-4 mb-1.5",R="w-full rounded-lg border border-rule bg-canvas px-3 py-2 text-[13px] text-ink placeholder-ink-4 transition-colors focus:border-ink-3 focus:outline-none",L=`${R} font-mono`;function A(e){let t="edit"===e.mode,n=t?e.initial:null,[i,s]=(0,r.useState)(n?.provider??"anthropic"),[l,o]=(0,r.useState)(n?.baseUrl??""),[c,p]=(0,r.useState)(""),[x,u]=(0,r.useState)(n?.nickname??""),[g,b]=(0,r.useState)(n?.defaultModel??""),[f,A]=(0,r.useState)(n?.isActive??!0),[C,S]=(0,r.useState)({state:"idle"}),[_,M]=(0,r.useTransition)(),[K,$]=(0,r.useState)(!1),U=t&&0===c.length,q=t&&n?.apiKeyLast4!=null&&!K&&0===c.length;function D(){"idle"!==C.state&&S({state:"idle"})}async function E(){S({state:"testing"});let e=t&&0===c.length&&n?.id,a=await h({provider:i,baseUrl:l||void 0,apiKey:c||void 0,model:g||void 0,...e?{keyId:n.id}:{}});a.ok?S({state:"pass",message:a.data.message}):S({state:"fail",message:a.message})}let O=j[i]||"https://...";return(0,a.jsxs)("form",{onSubmit:function(a){(a.preventDefault(),"pass"===C.state||U)?M(async()=>{if(t&&n){let t=await v({id:n.id,provider:i,baseUrl:l||void 0,apiKey:c||void 0,nickname:x,defaultModel:g,isActive:f});if(!t.ok)return void d.oR.error(t.message);d.oR.success("LLM provider updated"),e.onDone("saved")}else{let t=await k({provider:i,baseUrl:l||void 0,apiKey:c||void 0,nickname:x,defaultModel:g,isActive:f});if(!t.ok)return void d.oR.error(t.message);d.oR.success("LLM provider added"),e.onDone("saved")}}):d.oR.error("Test the connection before saving")},className:"space-y-4 rounded-2xl border border-rule-2 bg-paper p-5",children:[(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:w,htmlFor:"llm-provider",children:"Provider"}),(0,a.jsx)("select",{id:"llm-provider",value:i,onChange:e=>{var t;s(t=e.target.value),!l&&j[t]&&o(j[t]),g||b(N[t]),D()},className:R,children:y.map(e=>(0,a.jsx)("option",{value:e,children:(0,m.R)(e)},e))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:w,htmlFor:"llm-nickname",children:"Nickname"}),(0,a.jsx)("input",{id:"llm-nickname",type:"text",required:!0,value:x,onChange:e=>{u(e.target.value)},placeholder:`${(0,m.R)(i)} main`,className:R})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{className:w,htmlFor:"llm-base-url",children:["Base URL","openai-compatible"===i||"ollama"===i?(0,a.jsx)("span",{className:"ml-2 normal-case font-sans text-[11px] tracking-normal text-warn",children:"required"}):(0,a.jsx)("span",{className:"ml-2 normal-case font-sans text-[11px] tracking-normal text-ink-4",children:"optional"})]}),(0,a.jsx)("input",{id:"llm-base-url",type:"text",required:"openai-compatible"===i||"ollama"===i,value:l,onChange:e=>{o(e.target.value),D()},placeholder:O||"leave blank to use the provider default",className:L})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:w,htmlFor:"llm-api-key",children:"API key"}),q?(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)("div",{className:"flex-1 rounded-lg border border-rule bg-canvas px-3 py-2 font-mono text-[13px] tracking-widest text-ink-3 select-none",children:["••••••••",n.apiKeyLast4]}),(0,a.jsx)("button",{type:"button",onClick:()=>{$(!0),D()},className:"shrink-0 rounded-md border border-rule px-3 py-2 text-[12px] font-medium text-ink-3 transition-colors hover:border-ink-3 hover:text-ink",children:"Replace"})]}):(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("input",{id:"llm-api-key",type:"password",autoComplete:"new-password",value:c,onChange:e=>{p(e.target.value),D()},placeholder:t&&!K?"Leave blank to keep current":"",className:"flex-1 rounded-lg border border-rule bg-canvas px-3 py-2 font-mono text-[13px] text-ink placeholder-ink-4 transition-colors focus:border-ink-3 focus:outline-none"}),t&&K&&(0,a.jsx)("button",{type:"button",onClick:()=>{$(!1),p(""),D()},className:"shrink-0 px-3 py-2 text-[12px] font-medium text-ink-4 transition-colors hover:text-ink-2",children:"Cancel"})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:w,htmlFor:"llm-default-model",children:"Default model"}),(0,a.jsx)("input",{id:"llm-default-model",type:"text",required:!0,value:g,onChange:e=>b(e.target.value),placeholder:N[i],className:L}),(0,a.jsx)("p",{className:"mt-1.5 text-[11px] leading-[1.4] text-ink-4",children:"Agents reference this provider and pick their own model on top — this is just the suggested default."})]}),(0,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-2.5 text-[13px] text-ink-2",children:[(0,a.jsx)("input",{type:"checkbox",checked:f,onChange:e=>A(e.target.checked),className:"accent-conn-vivid"}),(0,a.jsx)("span",{children:"Active — agents may select this provider"})]}),"pass"===C.state&&(0,a.jsx)("div",{className:"rounded-md border border-ok/30 bg-ok-bg px-3 py-2 text-[12px] text-ok",children:C.message}),"fail"===C.state&&(0,a.jsx)("div",{className:"rounded-md border border-err/30 bg-warn-bg px-3 py-2 text-[12px] text-err break-all",children:C.message}),(0,a.jsxs)("div",{className:"flex items-center gap-2 pt-1",children:[(0,a.jsx)("button",{type:"button",onClick:E,disabled:"testing"===C.state||_,className:"inline-flex h-[34px] items-center rounded-md border border-rule px-3.5 text-[13px] font-medium text-ink-2 transition-colors hover:border-rule-2 hover:text-ink disabled:opacity-50",children:"testing"===C.state?"Testing…":"Test connection"}),(0,a.jsx)("button",{type:"submit",disabled:_||"testing"===C.state||"pass"!==C.state&&!U,className:"inline-flex h-[34px] items-center rounded-md bg-ink px-3.5 text-[13px] font-semibold text-canvas transition-[filter] hover:brightness-[0.92] disabled:opacity-50",title:"pass"===C.state||U?void 0:"Test the connection before saving",children:_?"Saving…":t?"Save changes":"Add provider"}),(0,a.jsx)("button",{type:"button",onClick:()=>e.onDone("cancelled"),className:"inline-flex h-[34px] items-center px-3.5 text-[13px] font-medium text-ink-3 transition-colors hover:text-ink-2",children:"Cancel"})]})]})}function C({initialRows:e}){let t=(0,i.useRouter)(),[,n]=(0,r.useTransition)(),[l,o]=(0,r.useState)({kind:"closed"});function d(){n(()=>{t.refresh()})}return(0,a.jsxs)("div",{className:"space-y-3",children:[0===e.length?(0,a.jsx)("div",{className:"rounded-2xl border border-rule-2 bg-paper px-6 py-12 text-center text-[13px] text-ink-3",children:"No LLM providers yet. Add one to start configuring agents."}):(0,a.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:e.map(e=>(0,a.jsx)(b,{row:e,onEdit:()=>o({kind:"edit",row:e}),onDeleted:d},e.id))}),"closed"===l.kind&&(0,a.jsxs)("button",{type:"button",onClick:()=>o({kind:"create"}),className:"inline-flex h-[34px] items-center gap-1.5 rounded-md border border-rule bg-paper px-3.5 text-[13px] font-medium text-ink-2 transition-colors hover:border-rule-2 hover:text-ink",children:[(0,a.jsx)(s.F,{size:13,weight:"bold"}),"Add provider"]}),"create"===l.kind&&(0,a.jsx)(A,{mode:"create",onDone:e=>{o({kind:"closed"}),"saved"===e&&d()}}),"edit"===l.kind&&(0,a.jsx)(A,{mode:"edit",initial:l.row,onDone:e=>{o({kind:"closed"}),"saved"===e&&d()}})]})}},82592:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(3680);let r={ok:"bg-ok",lime:"bg-agent-vivid",coral:"bg-skill-vivid",blue:"bg-conn-vivid"},i={ok:"animate-[blip_1.4s_ease-out_infinite]",lime:"animate-[blip-lime_1.5s_ease-out_infinite]",coral:"animate-[blip-coral_1.4s_ease-out_infinite]",blue:"animate-[blip-blue_1.4s_ease-out_infinite]"};function s({variant:e="ok",size:t="sm",animate:n=!0,className:l=""}){return(0,a.jsx)("span",{className:`inline-block shrink-0 rounded-full ${"sm"===t?"h-[7px] w-[7px]":"h-2 w-2"} ${r[e]} ${n?i[e]:""} ${l}`})}},93606:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var a=n(3680),r=n(86127),i=n(22089),s=n(82592);let l={done:"Done",warn:"Attention",run:"Running",idle:"Idle","lvl-info":"INFO","lvl-ok":"OK","lvl-warn":"WARN","lvl-err":"ERR"},o={done:"bg-ok-bg text-ok",warn:"bg-warn-bg text-warn",run:"bg-run-bg text-run",idle:"bg-black/5 text-ink-3 dark:bg-white/5","lvl-info":"bg-black/5 text-ink-3 dark:bg-white/5","lvl-ok":"bg-ok-bg text-ok","lvl-warn":"bg-warn-bg text-warn","lvl-err":"bg-warn-bg text-err"};function d({variant:e,label:t,icon:n,className:c=""}){let p=t??l[e],x=null;return void 0!==n?x=n:"done"===e?x=(0,a.jsx)(r.r,{size:11,weight:"regular"}):"warn"===e?x=(0,a.jsx)(i.N,{size:11,weight:"regular"}):"run"===e&&(x=(0,a.jsx)(s.A,{variant:"blue",size:"sm"})),(0,a.jsxs)("span",{className:`inline-flex h-[22px] items-center gap-1.5 rounded-[5px] px-2.5 text-[11px] font-medium leading-none ${o[e]} ${c}`,children:[x,p]})}}},e=>{e.O(0,[3363,9504,1165,1065,8724,7358],()=>e(e.s=70397)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6996],{5977:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});var l=a(78604);let r=l.forwardRef((e,t)=>{let{alt:a,color:r="currentColor",size:n="1em",weight:s="regular",mirrored:i=!1,children:o,weights:d,...c}=e;return l.createElement("svg",{ref:t,xmlns:"http://www.w3.org/2000/svg",width:n,height:n,fill:r,viewBox:"0 0 256 256",transform:i?"scale(-1, 1)":void 0,...c},!!a&&l.createElement("title",null,a),o,d.get(s))});r.displayName="SSRBase"},22089:(e,t,a)=>{"use strict";a.d(t,{N:()=>i});var l=a(78604),r=a(5977);let n=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M240.26,186.1,152.81,34.23h0a28.74,28.74,0,0,0-49.62,0L15.74,186.1a27.45,27.45,0,0,0,0,27.71A28.31,28.31,0,0,0,40.55,228h174.9a28.31,28.31,0,0,0,24.79-14.19A27.45,27.45,0,0,0,240.26,186.1Zm-20.8,15.7a4.46,4.46,0,0,1-4,2.2H40.55a4.46,4.46,0,0,1-4-2.2,3.56,3.56,0,0,1,0-3.73L124,46.2a4.77,4.77,0,0,1,8,0l87.44,151.87A3.56,3.56,0,0,1,219.46,201.8ZM116,136V104a12,12,0,0,1,24,0v32a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,176Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M215.46,216H40.54C27.92,216,20,202.79,26.13,192.09L113.59,40.22c6.3-11,22.52-11,28.82,0l87.46,151.87C236,202.79,228.08,216,215.46,216Z",opacity:"0.2"}),l.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM120,104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm8,88a12,12,0,1,1,12-12A12,12,0,0,1,128,192Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M235.07,189.09,147.61,37.22h0a22.75,22.75,0,0,0-39.22,0L20.93,189.09a21.53,21.53,0,0,0,0,21.72A22.35,22.35,0,0,0,40.55,222h174.9a22.35,22.35,0,0,0,19.6-11.19A21.53,21.53,0,0,0,235.07,189.09ZM224.66,204.8a10.46,10.46,0,0,1-9.21,5.2H40.55a10.46,10.46,0,0,1-9.21-5.2,9.51,9.51,0,0,1,0-9.72L118.79,43.21a10.75,10.75,0,0,1,18.42,0l87.46,151.87A9.51,9.51,0,0,1,224.66,204.8ZM122,144V104a6,6,0,0,1,12,0v40a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,180Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M233.34,190.09,145.88,38.22h0a20.75,20.75,0,0,0-35.76,0L22.66,190.09a19.52,19.52,0,0,0,0,19.71A20.36,20.36,0,0,0,40.54,220H215.46a20.36,20.36,0,0,0,17.86-10.2A19.52,19.52,0,0,0,233.34,190.09ZM226.4,205.8a12.47,12.47,0,0,1-10.94,6.2H40.54a12.47,12.47,0,0,1-10.94-6.2,11.45,11.45,0,0,1,0-11.72L117.05,42.21a12.76,12.76,0,0,1,21.9,0L226.4,194.08A11.45,11.45,0,0,1,226.4,205.8ZM124,144V104a4,4,0,0,1,8,0v40a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,180Z"}))]]),s=l.forwardRef((e,t)=>l.createElement(r.A,{ref:t,...e,weights:n}));s.displayName="WarningIcon";let i=s},22242:(e,t,a)=>{Promise.resolve().then(a.bind(a,34504)),Promise.resolve().then(a.bind(a,82270)),Promise.resolve().then(a.t.bind(a,63363,23))},27540:(e,t,a)=>{"use strict";var l=a(71268);a.o(l,"usePathname")&&a.d(t,{usePathname:function(){return l.usePathname}}),a.o(l,"useRouter")&&a.d(t,{useRouter:function(){return l.useRouter}}),a.o(l,"useSearchParams")&&a.d(t,{useSearchParams:function(){return l.useSearchParams}})},34504:(e,t,a)=>{"use strict";a.d(t,{default:()=>s});var l=a(3680),r=a(27540),n=a(78604);function s({agents:e,toolNames:t}){let a=(0,r.useRouter)(),i=(0,r.useSearchParams)(),[o,d]=(0,n.useTransition)(),c=i.get("agent")??"",x=i.get("tool")??"";function m(e){let t=new URLSearchParams(i.toString());for(let[a,l]of Object.entries(e))l?t.set(a,l):t.delete(a);t.delete("page"),d(()=>{a.replace(`/logs?${t.toString()}`)})}return(0,l.jsxs)("div",{className:"flex flex-wrap items-end gap-3 rounded-xl border border-rule-2 bg-paper px-4 py-3",children:[(0,l.jsxs)("div",{className:"min-w-[180px] flex-1",children:[(0,l.jsx)("label",{className:"mb-1 block text-[10px] uppercase tracking-wider text-ink-3",children:"Agent"}),(0,l.jsxs)("select",{value:c,onChange:e=>m({agent:e.target.value||null}),disabled:o,className:"w-full rounded-md border border-rule bg-canvas px-2 py-1.5 text-sm text-ink focus:border-ink-3 focus:outline-none",children:[(0,l.jsx)("option",{value:"",children:"All agents"}),e.map(e=>(0,l.jsx)("option",{value:e.id,children:e.name},e.id))]})]}),(0,l.jsxs)("div",{className:"min-w-[200px] flex-1",children:[(0,l.jsx)("label",{className:"mb-1 block text-[10px] uppercase tracking-wider text-ink-3",children:"Tool name"}),(0,l.jsxs)("select",{value:x,onChange:e=>m({tool:e.target.value||null}),disabled:o,className:"w-full rounded-md border border-rule bg-canvas px-2 py-1.5 font-mono text-sm text-ink focus:border-ink-3 focus:outline-none",children:[(0,l.jsx)("option",{value:"",children:"All tools"}),t.map(e=>(0,l.jsx)("option",{value:e,children:e},e))]})]})]})}},54935:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});var l=a(78604);let r=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M176.49,95.51a12,12,0,0,1,0,17l-56,56a12,12,0,0,1-17,0l-24-24a12,12,0,1,1,17-17L112,143l47.51-47.52A12,12,0,0,1,176.49,95.51ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),l.createElement("path",{d:"M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M172.24,99.76a6,6,0,0,1,0,8.48l-56,56a6,6,0,0,1-8.48,0l-24-24a6,6,0,0,1,8.48-8.48L112,151.51l51.76-51.75A6,6,0,0,1,172.24,99.76ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M170.83,101.17a4,4,0,0,1,0,5.66l-56,56a4,4,0,0,1-5.66,0l-24-24a4,4,0,0,1,5.66-5.66L112,154.34l53.17-53.17A4,4,0,0,1,170.83,101.17ZM228,128A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"}))]])},82270:(e,t,a)=>{"use strict";a.d(t,{default:()=>c});var l=a(3680),r=a(63363),n=a.n(r),s=a(78604),i=a(93606);function o(e){return!!e&&/^(error|\[ERROR|Error:|RuntimeError)/i.test(e.trim())}function d(e){if(null==e)return"—";if("string"==typeof e)try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}try{return JSON.stringify(e,null,2)}catch{return String(e)}}function c({items:e}){let[t,a]=(0,s.useState)(null);return(0,l.jsx)("div",{className:"overflow-hidden rounded-xl border border-rule-2 bg-paper",children:(0,l.jsxs)("table",{className:"w-full text-sm",children:[(0,l.jsx)("thead",{children:(0,l.jsxs)("tr",{className:"border-b border-rule-2",children:[(0,l.jsx)("th",{className:"px-5 py-3 text-left text-[10px] font-semibold uppercase tracking-wider text-ink-3",children:"Time"}),(0,l.jsx)("th",{className:"px-5 py-3 text-left text-[10px] font-semibold uppercase tracking-wider text-ink-3",children:"Lvl"}),(0,l.jsx)("th",{className:"px-5 py-3 text-left text-[10px] font-semibold uppercase tracking-wider text-ink-3",children:"Tool"}),(0,l.jsx)("th",{className:"hidden px-5 py-3 text-left text-[10px] font-semibold uppercase tracking-wider text-ink-3 md:table-cell",children:"Agent"}),(0,l.jsx)("th",{className:"hidden px-5 py-3 text-left text-[10px] font-semibold uppercase tracking-wider text-ink-3 lg:table-cell",children:"Duration"}),(0,l.jsx)("th",{className:"hidden px-5 py-3 text-left text-[10px] font-semibold uppercase tracking-wider text-ink-3 lg:table-cell",children:"Job"})]})}),(0,l.jsx)("tbody",{children:e.map(e=>{var r;let c=t===e.id,x=o(e.toolOutput);return(0,l.jsxs)(s.Fragment,{children:[(0,l.jsxs)("tr",{className:`cursor-pointer border-b border-dashed border-rule align-top transition-colors last:border-0 ${c?"bg-hover":"hover:bg-hover"}`,onClick:()=>a(c?null:e.id),"aria-expanded":c,"data-testid":`log-row-${e.id}`,children:[(0,l.jsxs)("td",{className:"px-5 py-3 font-mono text-xs text-ink-4 whitespace-nowrap",children:[e.createdAt?new Date(e.createdAt).toLocaleTimeString():"—",(0,l.jsx)("div",{className:"text-[10px] text-ink-4 opacity-60",children:e.createdAt?new Date(e.createdAt).toLocaleDateString():""})]}),(0,l.jsx)("td",{className:"px-5 py-3",children:(0,l.jsx)(i.A,{variant:o(e.toolOutput)?"lvl-err":"lvl-info",icon:null})}),(0,l.jsxs)("td",{className:"px-5 py-3",children:[(0,l.jsx)("code",{className:`font-mono text-xs ${x?"text-err":"text-conn-vivid"}`,children:e.toolName}),null!==e.turn&&(0,l.jsxs)("span",{className:"ml-2 text-[10px] text-ink-4",children:["turn ",e.turn]})]}),(0,l.jsx)("td",{className:"hidden px-5 py-3 text-xs md:table-cell",onClick:e=>e.stopPropagation(),children:e.agentName?(0,l.jsx)(n(),{href:`/logs?agent=${e.agentId}`,className:"text-ink-2 hover:text-ink",children:e.agentName}):(0,l.jsx)("span",{className:"text-ink-4",children:"—"})}),(0,l.jsx)("td",{className:"hidden px-5 py-3 font-mono text-xs text-ink-3 lg:table-cell",children:null==(r=e.durationMs)?"—":r<1e3?`${r}ms`:`${(r/1e3).toFixed(1)}s`}),(0,l.jsx)("td",{className:"hidden px-5 py-3 lg:table-cell",onClick:e=>e.stopPropagation(),children:e.jobId?(0,l.jsx)(n(),{href:`/jobs/${e.jobId}`,className:"font-mono text-xs text-ink-3 hover:text-ink",children:e.jobId.slice(0,8)}):(0,l.jsx)("span",{className:"text-ink-4",children:"—"})})]}),c&&(0,l.jsx)("tr",{className:"border-b border-rule-2 bg-canvas","data-testid":`log-detail-${e.id}`,children:(0,l.jsx)("td",{colSpan:6,className:"px-5 py-4",children:(0,l.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"mb-1.5 text-[10px] uppercase tracking-wider text-ink-3",children:"Input"}),(0,l.jsx)("pre",{className:"max-h-96 overflow-y-auto overflow-x-auto whitespace-pre-wrap break-all rounded-md border border-rule bg-paper px-3 py-2 font-mono text-[11px] text-ink-2",children:d(e.toolInput)})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"mb-1.5 text-[10px] uppercase tracking-wider text-ink-3",children:"Output"}),(0,l.jsx)("pre",{className:`max-h-96 overflow-y-auto overflow-x-auto whitespace-pre-wrap break-all rounded-md border px-3 py-2 font-mono text-[11px] ${x?"border-err/25 text-err bg-paper":"border-rule bg-paper text-ink-2"}`,children:d(e.toolOutput)})]})]})})})]},e.id)})})]})})}},82592:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var l=a(3680);let r={ok:"bg-ok",lime:"bg-agent-vivid",coral:"bg-skill-vivid",blue:"bg-conn-vivid"},n={ok:"animate-[blip_1.4s_ease-out_infinite]",lime:"animate-[blip-lime_1.5s_ease-out_infinite]",coral:"animate-[blip-coral_1.4s_ease-out_infinite]",blue:"animate-[blip-blue_1.4s_ease-out_infinite]"};function s({variant:e="ok",size:t="sm",animate:a=!0,className:i=""}){return(0,l.jsx)("span",{className:`inline-block shrink-0 rounded-full ${"sm"===t?"h-[7px] w-[7px]":"h-2 w-2"} ${r[e]} ${a?n[e]:""} ${i}`})}},86127:(e,t,a)=>{"use strict";a.d(t,{r:()=>i});var l=a(78604),r=a(5977),n=a(54935);let s=l.forwardRef((e,t)=>l.createElement(r.A,{ref:t,...e,weights:n.A}));s.displayName="CheckCircleIcon";let i=s},93606:(e,t,a)=>{"use strict";a.d(t,{A:()=>d});var l=a(3680),r=a(86127),n=a(22089),s=a(82592);let i={done:"Done",warn:"Attention",run:"Running",idle:"Idle","lvl-info":"INFO","lvl-ok":"OK","lvl-warn":"WARN","lvl-err":"ERR"},o={done:"bg-ok-bg text-ok",warn:"bg-warn-bg text-warn",run:"bg-run-bg text-run",idle:"bg-black/5 text-ink-3 dark:bg-white/5","lvl-info":"bg-black/5 text-ink-3 dark:bg-white/5","lvl-ok":"bg-ok-bg text-ok","lvl-warn":"bg-warn-bg text-warn","lvl-err":"bg-warn-bg text-err"};function d({variant:e,label:t,icon:a,className:c=""}){let x=t??i[e],m=null;return void 0!==a?m=a:"done"===e?m=(0,l.jsx)(r.r,{size:11,weight:"regular"}):"warn"===e?m=(0,l.jsx)(n.N,{size:11,weight:"regular"}):"run"===e&&(m=(0,l.jsx)(s.A,{variant:"blue",size:"sm"})),(0,l.jsxs)("span",{className:`inline-flex h-[22px] items-center gap-1.5 rounded-[5px] px-2.5 text-[11px] font-medium leading-none ${o[e]} ${c}`,children:[m,x]})}}},e=>{e.O(0,[3363,1065,8724,7358],()=>e(e.s=22242)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7513],{1489:(e,t,r)=>{Promise.resolve().then(r.bind(r,17869))},16237:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var a=r(3680),n=r(40189),l=r(77045);function s({status:e,ctaLabel:t,ctaVariant:r="blue",onCta:o,ctaHref:i}){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"flex-1 text-[12.5px] leading-none text-ink-3",children:e}),i?(0,a.jsxs)(l.A,{variant:r,size:"sm",href:i,children:[(0,a.jsx)(n.F,{size:12,weight:"bold"}),t]}):(0,a.jsxs)(l.A,{variant:r,size:"sm",onClick:o,children:[(0,a.jsx)(n.F,{size:12,weight:"bold"}),t]})]})}},17869:(e,t,r)=>{"use strict";r.d(t,{default:()=>L});var a=r(3680),n=r(78604),l=r(32307),s=r(65668),o=r(28870),i=r(66736),c=r(81630),d=r(88499),m=r(93606),x=r(39504),u=r(64678);let p=(0,u.createServerReference)("4090e774b3c96f3769dc2e02424aa1ceed689e8349",u.callServer,void 0,u.findSourceMapURL,"deleteMcpServerAction"),h=(0,u.createServerReference)("60efcb6599748855f7a884aedc3b1341f65e37e46e",u.callServer,void 0,u.findSourceMapURL,"renameMcpServerAction"),b=(0,u.createServerReference)("6010370e767ceacaba542018e5608641f620a307d2",u.callServer,void 0,u.findSourceMapURL,"updateMcpServerApiKeyAction");var g=r(14308);function v({instance:e,catalogLabel:t,description:r}){let[l,s]=(0,n.useTransition)(),[o,i]=(0,n.useState)(!1),[c,d]=(0,n.useState)(!1),[m,u]=(0,n.useState)(e.name),[f,k]=(0,n.useState)(!1),[j,y]=(0,n.useState)("");function N(){let t=m.trim();t&&t!==e.name?s(async()=>{let r=await h(e.id,t);r.ok?(x.oR.success("Renamed"),d(!1)):x.oR.error(r.message)}):d(!1)}function A(){let t=j.trim();t?s(async()=>{let r=await b(e.id,t);r.ok?(x.oR.success(`${e.name} key rotated`),k(!1),y("")):x.oR.error(r.message)}):x.oR.error("New API key is required")}return(0,a.jsxs)("div",{className:"bg-paper border border-rule-2 rounded-xl px-5 py-4",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[c?(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("input",{autoFocus:!0,value:m,onChange:e=>u(e.target.value),onKeyDown:t=>{"Enter"===t.key&&N(),"Escape"===t.key&&(u(e.name),d(!1))},className:"bg-hover border border-rule rounded-md px-2 py-1 text-sm text-ink focus:border-ink-3 focus:outline-none w-full max-w-xs"}),(0,a.jsx)("button",{type:"button",onClick:N,disabled:l,className:"text-xs text-ok hover:text-ok disabled:opacity-40",children:"Save"}),(0,a.jsx)("button",{type:"button",onClick:()=>{u(e.name),d(!1)},className:"text-xs text-ink-3 hover:text-ink-2",children:"Cancel"})]}):(0,a.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,a.jsx)("span",{className:"text-ink font-medium",children:e.name}),(0,a.jsx)("button",{type:"button",onClick:()=>d(!0),"aria-label":"Rename MCP server",className:"text-ink-4 hover:text-ink-3 transition-colors text-xs leading-none",title:"Rename",children:"✎"}),(0,a.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-wider text-ink-3 font-mono",children:t}),(0,a.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-wider text-ok",children:"connected"})]}),r&&(0,a.jsx)("p",{className:"text-xs text-ink-3 mt-0.5",children:r}),(0,a.jsxs)("p",{className:"text-xs text-ink-4 mt-1",children:[e.toolCount," tool",1===e.toolCount?"":"s"," discovered",e.apiKeyLast4?` \xb7 key …${e.apiKeyLast4}`:""]})]}),(0,a.jsxs)("div",{className:"shrink-0 flex gap-2 flex-wrap justify-end",children:[(0,a.jsx)("button",{type:"button",onClick:()=>k(e=>!e),disabled:l,className:"px-2.5 py-1 text-xs font-medium border border-rule-2 text-ink-3 rounded-md hover:border-rule hover:text-ink disabled:opacity-40",children:f?"Cancel":"Rotate key"}),(0,a.jsx)("button",{type:"button",onClick:()=>i(!0),disabled:l,className:"px-2.5 py-1 text-xs font-medium border border-err/30 text-err rounded-md hover:border-err/30 hover:text-err disabled:opacity-40",children:"Disconnect"})]})]}),f&&(0,a.jsxs)("div",{className:"space-y-3 pt-3 mt-3 border-t border-rule-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{htmlFor:`mcp-rotate-${e.id}`,className:"block text-xs text-ink-3 mb-1",children:"New API key"}),(0,a.jsx)("input",{id:`mcp-rotate-${e.id}`,type:"password",autoComplete:"off",autoFocus:!0,value:j,onChange:e=>y(e.target.value),onKeyDown:e=>{"Enter"===e.key&&A(),"Escape"===e.key&&(y(""),k(!1))},placeholder:"Paste the new key",className:"w-full bg-hover border border-rule rounded-md px-2 py-1.5 text-sm text-ink placeholder:text-ink-4 focus:border-ink-3 focus:outline-none font-mono"}),(0,a.jsx)("p",{className:"text-[11px] text-ink-4 mt-1",children:"Agent assignments stay intact — the key is verified against the server before being saved."})]}),(0,a.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,a.jsx)("button",{type:"button",onClick:A,disabled:l||!j.trim(),className:"px-4 py-2 text-sm font-semibold bg-ink text-canvas rounded-md hover:brightness-[0.92] disabled:opacity-50",children:l?"Verifying…":"Save new key"}),(0,a.jsx)("button",{type:"button",onClick:()=>{y(""),k(!1)},className:"text-xs text-ink-3 hover:text-ink underline",children:"Cancel"})]})]}),(0,a.jsx)(g.A,{open:o,title:`Disconnect "${e.name}"?`,message:"The MCP connector and all its agent assignments will be removed. Re-connecting later requires the API key again.",confirmLabel:"Disconnect",onConfirm:function(){i(!1),s(async()=>{let t=await p(e.id);t.ok?x.oR.success(`${e.name} disconnected`):x.oR.error(t.message)})},onCancel:()=>i(!1)})]})}function f({instances:e,catalog:t}){return(0,a.jsx)("div",{className:"overflow-hidden rounded-2xl border border-rule-2 bg-paper",children:(0,a.jsxs)("table",{className:"w-full border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{children:[(0,a.jsx)(k,{label:"Server"}),(0,a.jsx)(k,{label:"Tools"}),(0,a.jsx)(k,{label:"Transport"}),(0,a.jsx)(k,{label:"Status"}),(0,a.jsx)(k,{label:"Actions",align:"right"})]})}),(0,a.jsx)("tbody",{children:e.map(e=>{let r=t.find(t=>t.slug===e.slug);return(0,a.jsx)(j,{instance:e,catalogLabel:r?.label??e.name,description:r?.description??"",transport:r?.transport??"http"},e.id)})})]})})}function k({label:e,align:t="left"}){return(0,a.jsx)("th",{className:`border-b border-rule-2 px-[18px] pt-3.5 pb-2.5 font-mono text-[9.5px] font-normal uppercase tracking-[0.16em] text-ink-4 ${"right"===t?"text-right":"text-left"}`,scope:"col",children:e})}function j({instance:e,catalogLabel:t,description:r,transport:l}){let[s,o]=(0,n.useState)(!1),i=t.slice(0,2).toUpperCase();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("tr",{className:"border-b border-rule-2 last:border-0 hover:bg-hover",children:[(0,a.jsx)("td",{className:"px-[18px] py-[13px] align-middle",children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(c.A,{variant:"conn",size:"sm",shape:"square",background:"#3565ff",children:(0,a.jsx)("span",{className:"font-mono text-[10px] font-semibold tracking-[0.04em]",children:i})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("div",{className:"text-[13.5px] font-medium leading-[1.2] text-ink",children:e.name}),(0,a.jsx)("div",{className:"mt-0.5 font-mono text-[10.5px] uppercase tracking-[0.12em] text-ink-4",children:t})]})]})}),(0,a.jsxs)("td",{className:"px-[18px] py-[13px] align-middle",children:[(0,a.jsx)("span",{className:"font-mono text-[12.5px] text-ink-2",children:e.toolCount}),0===e.toolCount&&(0,a.jsx)("span",{className:"ml-1 font-mono text-[11px] text-ink-4",children:"none"})]}),(0,a.jsx)("td",{className:"px-[18px] py-[13px] align-middle",children:(0,a.jsx)(d.A,{children:l})}),(0,a.jsx)("td",{className:"px-[18px] py-[13px] align-middle",children:(0,a.jsx)(m.A,{variant:e.active?"done":"warn",label:e.active?"Connected":"Inactive"})}),(0,a.jsx)("td",{className:"px-[18px] py-[13px] align-middle",children:(0,a.jsx)("div",{className:"flex items-center justify-end gap-2",children:(0,a.jsx)("button",{type:"button",onClick:()=>o(e=>!e),className:"inline-flex h-[30px] items-center gap-1.5 rounded-[7px] border border-rule bg-paper px-3 text-[12px] font-medium leading-none text-ink-2 transition-colors hover:bg-hover hover:text-ink",children:s?"Close":"Configure"})})})]}),s&&(0,a.jsx)("tr",{className:"border-b border-rule-2 last:border-0 bg-hover/40",children:(0,a.jsx)("td",{colSpan:5,className:"px-[18px] py-3",children:(0,a.jsx)(v,{instance:e,catalogLabel:t,description:r})})})]})}var y=r(40319),N=r(42357),A=r(37820),C=r(16237);let w=(0,u.createServerReference)("40026cfc96ed63431b31440d55737fc084d39178f2",u.callServer,void 0,u.findSourceMapURL,"createMcpServerFromCatalogAction");function M({catalogItem:e}){let[t,r]=(0,n.useState)(!1),[l,s]=(0,n.useTransition)(),[o,i]=(0,n.useState)(""),[c,d]=(0,n.useState)(""),[m,u]=(0,n.useState)(""),[p,h]=(0,n.useState)(""),[b,g]=(0,n.useState)("header"),[v,f]=(0,n.useState)(""),[k,j]=(0,n.useState)(""),[y,N]=(0,n.useState)(""),[A,C]=(0,n.useState)(()=>(e.args??[]).join("\n")),[S,E]=(0,n.useState)(()=>{let t=e.envVarNames??[];return t.length>0?t.map(e=>({key:e,value:""})):[{key:"",value:""}]}),R="custom-http-mcp"===e.slug,Z="custom-stdio-mcp"===e.slug,L="stdio"===e.transport,F=L&&!Z,$=!L&&null===e.serverUrl;function H(){i(""),d(""),u(""),h(""),g("header"),f(""),j(""),N(""),C((e.args??[]).join("\n"));let t=e.envVarNames??[];E(t.length>0?t.map(e=>({key:e,value:""})):[{key:"",value:""}])}function V(){E(e=>[...e,{key:"",value:""}])}function P(e){E(t=>t.filter((t,r)=>r!==e))}function q(e,t){E(r=>r.map((r,a)=>a===e?{...r,...t}:r))}let I=p.trim()?`${p.trim().replace(/-/g,"_")}__list_things`:"my_slug__list_things";return(0,a.jsxs)("div",{className:"bg-paper border border-rule-2 rounded-xl p-4 space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-ink",children:e.label}),(0,a.jsx)("p",{className:"text-[11px] text-ink-3 font-mono mt-0.5",children:e.slug})]}),(0,a.jsx)("button",{type:"button",onClick:()=>r(e=>!e),className:"shrink-0 px-3 py-1.5 text-xs font-semibold bg-ink text-canvas rounded-md hover:brightness-[0.92]",children:t?"Cancel":"+ Add"})]}),e.description&&(0,a.jsx)("p",{className:"text-xs text-ink-4",children:e.description}),t&&(0,a.jsxs)("form",{onSubmit:function(t){t.preventDefault();let a=o.trim();if(!a)return void x.oR.error("Name is required");if(F){let t=A.split("\n").map(e=>e.trim()).filter(Boolean),n={};for(let e of S){let t=e.key.trim();t&&(n[t]=e.value)}s(async()=>{let l=await w({slug:e.slug,name:a,customArgs:t,customEnv:Object.keys(n).length>0?n:void 0});l.ok?(x.oR.success(`${a} connected`),r(!1),H()):x.oR.error(l.message)});return}if(Z){let t=p.trim(),n=k.trim();if(!t)return x.oR.error("Server slug is required");if(!/^[a-z0-9-]+$/.test(t))return x.oR.error("Slug must be lowercase letters, digits, dashes");if(!n)return x.oR.error("Command is required");let l=y.split("\n").map(e=>e.trim()).filter(Boolean),o={};for(let e of S){let t=e.key.trim();t&&(o[t]=e.value)}return void s(async()=>{let s=await w({slug:e.slug,name:a,customSlug:t,customCommand:n,customArgs:l,customEnv:o});s.ok?(x.oR.success(`${a} connected`),r(!1),H()):x.oR.error(s.message)})}let n=c.trim(),l=m.trim();if(!n)return void x.oR.error("API key is required");if($&&!l)return void x.oR.error("Server URL is required");if(R){let e=p.trim();if(!e)return x.oR.error("Server slug is required");if(!/^[a-z0-9-]+$/.test(e))return x.oR.error("Slug must be lowercase letters, digits, dashes");if("bearer"!==b&&!v.trim())return x.oR.error("Auth param name is required for this scheme")}s(async()=>{let t={slug:e.slug,name:a,apiKey:n};$&&(t.url=l),R&&(t.customSlug=p.trim(),t.customAuthScheme=b,"bearer"!==b&&(t.customAuthParamName=v.trim()));let s=await w(t);s.ok?(x.oR.success(`${a} connected`),r(!1),H()):x.oR.error(s.message)})},className:"space-y-3 pt-2 border-t border-rule-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{htmlFor:`mcp-name-${e.slug}`,className:"block text-xs text-ink-3 mb-1",children:["Name ",(0,a.jsx)("span",{className:"text-ink-4",children:'(e.g. "Cortex — perso")'})]}),(0,a.jsx)("input",{id:`mcp-name-${e.slug}`,type:"text",required:!0,value:o,onChange:e=>i(e.target.value),placeholder:e.label,className:"w-full bg-hover border border-rule rounded-md px-2 py-1.5 text-sm text-ink placeholder:text-ink-4 focus:border-ink-3 focus:outline-none"})]}),(R||Z)&&(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{htmlFor:`mcp-slug-${e.slug}`,className:"block text-xs text-ink-3 mb-1",children:["Server slug ",(0,a.jsx)("span",{className:"text-ink-4",children:"(tool name prefix)"})]}),(0,a.jsx)("input",{id:`mcp-slug-${e.slug}`,type:"text",required:!0,value:p,onChange:e=>h(e.target.value),placeholder:"my-server",pattern:"[a-z0-9-]+",className:"w-full bg-hover border border-rule rounded-md px-2 py-1.5 text-sm text-ink placeholder:text-ink-4 focus:border-ink-3 focus:outline-none font-mono"}),(0,a.jsxs)("p",{className:"text-[11px] text-ink-4 mt-1",children:["Tools will be named like ",(0,a.jsx)("span",{className:"font-mono text-ink-3",children:I}),". Lowercase letters, digits, dashes."]})]}),$&&(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{htmlFor:`mcp-url-${e.slug}`,className:"block text-xs text-ink-3 mb-1",children:"Server URL"}),(0,a.jsx)("input",{id:`mcp-url-${e.slug}`,type:"url",required:!0,value:m,onChange:e=>u(e.target.value),placeholder:"https://…",className:"w-full bg-hover border border-rule rounded-md px-2 py-1.5 text-sm text-ink placeholder:text-ink-4 focus:border-ink-3 focus:outline-none font-mono"})]}),R&&(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("p",{className:"block text-xs text-ink-3",children:"Auth scheme"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:["header","query","bearer"].map(t=>(0,a.jsxs)("label",{className:`flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs cursor-pointer border ${b===t?"bg-hover border-ink-3 text-ink":"bg-paper border-rule text-ink-3 hover:border-rule"}`,children:[(0,a.jsx)("input",{type:"radio",name:`mcp-scheme-${e.slug}`,value:t,checked:b===t,onChange:()=>g(t),className:"sr-only"}),"header"===t?"Header":"query"===t?"Query param":"Bearer"]},t))}),"bearer"!==b&&(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{htmlFor:`mcp-auth-param-${e.slug}`,className:"block text-xs text-ink-3 mb-1",children:"header"===b?"Header name":"Query param name"}),(0,a.jsx)("input",{id:`mcp-auth-param-${e.slug}`,type:"text",required:!0,value:v,onChange:e=>f(e.target.value),placeholder:"header"===b?"x-api-key":"api_key",className:"w-full bg-hover border border-rule rounded-md px-2 py-1.5 text-sm text-ink placeholder:text-ink-4 focus:border-ink-3 focus:outline-none font-mono"})]})]}),!L&&(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{htmlFor:`mcp-key-${e.slug}`,className:"block text-xs text-ink-3 mb-1",children:"API key"}),(0,a.jsx)("input",{id:`mcp-key-${e.slug}`,type:"password",required:!0,autoComplete:"off",value:c,onChange:e=>d(e.target.value),placeholder:e.keyPrefix[0]?`${e.keyPrefix[0]}…`:"",className:"w-full bg-hover border border-rule rounded-md px-2 py-1.5 text-sm text-ink placeholder:text-ink-4 focus:border-ink-3 focus:outline-none font-mono"}),e.docsHint&&(0,a.jsx)("p",{className:"text-[11px] text-ink-4 mt-1",children:e.docsHint})]}),F&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{htmlFor:`mcp-prefilled-args-${e.slug}`,className:"block text-xs text-ink-3 mb-1",children:["Arguments"," ",(0,a.jsx)("span",{className:"text-ink-4",children:"(one per line — edit placeholders like <root-directory>)"})]}),(0,a.jsx)("textarea",{id:`mcp-prefilled-args-${e.slug}`,rows:Math.max(3,(e.args??[]).length+1),value:A,onChange:e=>C(e.target.value),className:"w-full bg-hover border border-rule rounded-md px-2 py-1.5 text-sm text-ink placeholder:text-ink-4 focus:border-ink-3 focus:outline-none font-mono resize-none"}),(0,a.jsxs)("p",{className:"text-[11px] text-ink-4 mt-1",children:["Command:"," ",(0,a.jsx)("span",{className:"font-mono text-ink-3",children:e.command??"npx"})]})]}),(e.envVarNames??[]).length>0&&(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{className:"block text-xs text-ink-3 mb-1",children:["Environment variables ",(0,a.jsx)("span",{className:"text-ink-4",children:"(encrypted at rest)"})]}),(0,a.jsx)("div",{className:"space-y-2",children:S.map((e,t)=>(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{type:"text",value:e.key,onChange:e=>q(t,{key:e.target.value}),placeholder:"VAR_NAME",className:"flex-1 bg-hover border border-rule rounded-md px-2 py-1.5 text-sm text-ink placeholder:text-ink-4 focus:border-ink-3 focus:outline-none font-mono"}),(0,a.jsx)("input",{type:"password",autoComplete:"off",value:e.value,onChange:e=>q(t,{value:e.target.value}),placeholder:"value",className:"flex-1 bg-hover border border-rule rounded-md px-2 py-1.5 text-sm text-ink placeholder:text-ink-4 focus:border-ink-3 focus:outline-none font-mono"}),(0,a.jsx)("button",{type:"button",onClick:()=>P(t),disabled:1===S.length,"aria-label":"Remove env var",className:"px-2 text-ink-3 hover:text-err disabled:opacity-30",children:"\xd7"})]},t))}),(0,a.jsx)("button",{type:"button",onClick:V,className:"mt-2 text-[11px] text-ink-3 hover:text-ink",children:"+ Add variable"})]}),e.docsHint&&(0,a.jsx)("p",{className:"text-[11px] text-ink-4",children:e.docsHint})]}),Z&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{htmlFor:`mcp-command-${e.slug}`,className:"block text-xs text-ink-3 mb-1",children:"Command"}),(0,a.jsx)("input",{id:`mcp-command-${e.slug}`,type:"text",required:!0,value:k,onChange:e=>j(e.target.value),placeholder:"npx",className:"w-full bg-hover border border-rule rounded-md px-2 py-1.5 text-sm text-ink placeholder:text-ink-4 focus:border-ink-3 focus:outline-none font-mono"}),(0,a.jsx)("p",{className:"text-[11px] text-ink-4 mt-1",children:"Executable name (resolved via PATH) or absolute path."})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{htmlFor:`mcp-args-${e.slug}`,className:"block text-xs text-ink-3 mb-1",children:["Arguments ",(0,a.jsx)("span",{className:"text-ink-4",children:"(one per line)"})]}),(0,a.jsx)("textarea",{id:`mcp-args-${e.slug}`,rows:3,value:y,onChange:e=>N(e.target.value),placeholder:"-y\n@modelcontextprotocol/server-filesystem\n/path/to/folder",className:"w-full bg-hover border border-rule rounded-md px-2 py-1.5 text-sm text-ink placeholder:text-ink-4 focus:border-ink-3 focus:outline-none font-mono resize-none"})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{className:"block text-xs text-ink-3 mb-1",children:["Environment variables ",(0,a.jsx)("span",{className:"text-ink-4",children:"(encrypted at rest)"})]}),(0,a.jsx)("div",{className:"space-y-2",children:S.map((e,t)=>(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{type:"text",value:e.key,onChange:e=>q(t,{key:e.target.value}),placeholder:"GITHUB_TOKEN",className:"flex-1 bg-hover border border-rule rounded-md px-2 py-1.5 text-sm text-ink placeholder:text-ink-4 focus:border-ink-3 focus:outline-none font-mono"}),(0,a.jsx)("input",{type:"password",autoComplete:"off",value:e.value,onChange:e=>q(t,{value:e.target.value}),placeholder:"value",className:"flex-1 bg-hover border border-rule rounded-md px-2 py-1.5 text-sm text-ink placeholder:text-ink-4 focus:border-ink-3 focus:outline-none font-mono"}),(0,a.jsx)("button",{type:"button",onClick:()=>P(t),disabled:1===S.length,"aria-label":"Remove env var",className:"px-2 text-ink-3 hover:text-err disabled:opacity-30",children:"\xd7"})]},t))}),(0,a.jsx)("button",{type:"button",onClick:V,className:"mt-2 text-[11px] text-ink-3 hover:text-ink",children:"+ Add variable"}),e.docsHint&&(0,a.jsx)("p",{className:"text-[11px] text-ink-4 mt-2",children:e.docsHint})]})]}),(0,a.jsx)("button",{type:"submit",disabled:l||!o.trim(),className:"px-4 py-2 text-sm font-semibold bg-ink text-canvas rounded-md hover:brightness-[0.92] disabled:opacity-50",children:l?"Connecting…":"Connect"})]})]})}function S(e){return"stripe"===e?"Data":"composio"===e?"Productivity":"cogni-cortex"===e?"Comms":"mcp-filesystem"===e?"Files":"mcp-fetch"===e?"Web":"mcp-git"===e||"mcp-github"===e?"Dev":"mcp-postgres"===e?"Data":"mcp-sequential-thinking"===e?"Reasoning":"mcp-playwright"===e?"Web":"linear"===e?"Productivity":"sentry"===e?"Dev":e.startsWith("custom-")?"Custom":"Other"}let E=[{value:"All",label:"All"},{value:"Comms",label:"Comms"},{value:"Data",label:"Data"},{value:"Productivity",label:"Productivity"},{value:"Custom",label:"Custom"},{value:"Other",label:"Other"}];function R({catalog:e,instances:t,category:r,onCategoryChange:n}){return(0,a.jsxs)("div",{children:[(0,a.jsx)(N.A,{items:E,value:r,onChange:n,className:"mb-[18px]"}),0===e.length?(0,a.jsx)("div",{className:"rounded-2xl border border-rule-2 bg-paper px-6 py-12 text-center",children:(0,a.jsx)("p",{className:"text-[13px] text-ink-3",children:"No servers in this category."})}):(0,a.jsx)("div",{className:"grid auto-rows-fr grid-cols-1 gap-3.5 md:grid-cols-2 lg:grid-cols-4",children:e.map(e=>{let r=t.filter(t=>t.slug===e.slug),n=r.length>0;return(0,a.jsx)(Z,{catalogItem:e,isInstalled:n,installedCount:r.length},e.slug)})})]})}function Z({catalogItem:e,isInstalled:t,installedCount:r}){let[l,s]=(0,n.useState)(!1),o=e.label.slice(0,2).toUpperCase(),i=S(e.slug);return(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)(A.A,{glyph:(0,a.jsx)("span",{className:"font-mono text-[10px] font-semibold tracking-[0.04em]",children:o}),glyphVariant:"conn",glyphBackground:"#3565ff",name:e.label,description:e.description,category:i,topRight:t?(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-[6px] bg-ok-bg px-2 py-1 font-sans text-[11px] font-medium text-ok",children:[(0,a.jsx)(y.r,{size:11,weight:"regular"}),r," installed"]}):void 0,foot:(0,a.jsx)(C.A,{ctaLabel:t?"Add account":"Install",ctaVariant:"blue",onCta:()=>s(e=>!e)})}),l&&(0,a.jsx)("div",{className:"mt-1.5 rounded-2xl border border-rule-2 bg-paper p-4",children:(0,a.jsx)(M,{catalogItem:e})})]})}function L({instances:e,catalog:t}){let[r,c]=(0,n.useState)(e.length>0?"installed":"marketplace"),[d,m]=(0,n.useState)(""),[x,u]=(0,n.useState)("All"),p=(0,n.useMemo)(()=>{if(!d.trim())return e;let t=d.toLowerCase();return e.filter(e=>e.name.toLowerCase().includes(t)||e.slug.toLowerCase().includes(t))},[e,d]),h=(0,n.useMemo)(()=>{let e=t;if("All"!==x&&(e=e.filter(e=>S(e.slug)===x)),d.trim()){let t=d.toLowerCase();e=e.filter(e=>e.label.toLowerCase().includes(t)||e.description.toLowerCase().includes(t))}return e},[t,x,d]);return(0,a.jsxs)("div",{className:"pb-10",children:[(0,a.jsx)(l.A,{title:"MCP Connectors",subtitle:"Model Context Protocol servers your agents can call. Install from the marketplace or wire a custom HTTP / stdio server."}),(0,a.jsx)(s.A,{tabs:(0,a.jsx)(o.A,{value:r,onChange:e=>{c(e),m(""),u("All")},tabs:[{value:"installed",label:"Installed",count:e.length},{value:"marketplace",label:"Marketplace",count:t.length}]}),search:(0,a.jsx)(i.A,{value:d,onChange:m,placeholder:"installed"===r?"Search MCP servers…":"Search catalog…"})}),(0,a.jsx)("div",{className:"pt-5",children:"installed"===r?0===e.length?(0,a.jsx)(F,{onBrowse:()=>c("marketplace")}):0===p.length?(0,a.jsx)($,{}):(0,a.jsx)(f,{instances:p,catalog:t}):(0,a.jsx)(R,{catalog:h,instances:e,category:x,onCategoryChange:u})})]})}function F({onBrowse:e}){return(0,a.jsxs)("div",{className:"rounded-2xl border border-rule-2 bg-paper px-6 py-12 text-center",children:[(0,a.jsxs)("p",{className:"text-[13px] leading-[1.5] text-ink-3",children:["No MCP servers installed yet.",(0,a.jsx)("br",{}),"Pick one from the Marketplace — its tools become available to any agent you assign it to."]}),(0,a.jsx)("div",{className:"mt-4 inline-flex",children:(0,a.jsx)("button",{type:"button",onClick:e,className:"inline-flex h-[34px] items-center gap-1.5 rounded-md bg-conn-vivid px-3.5 text-[13px] font-medium leading-none text-white transition-[filter] hover:brightness-[0.94]",children:"Browse Marketplace"})})]})}function $(){return(0,a.jsx)("div",{className:"rounded-2xl border border-rule-2 bg-paper px-6 py-12 text-center",children:(0,a.jsx)("p",{className:"text-[13px] leading-[1.5] text-ink-3",children:"No servers match your search."})})}},22089:(e,t,r)=>{"use strict";r.d(t,{N:()=>o});var a=r(78604),n=r(5977);let l=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M240.26,186.1,152.81,34.23h0a28.74,28.74,0,0,0-49.62,0L15.74,186.1a27.45,27.45,0,0,0,0,27.71A28.31,28.31,0,0,0,40.55,228h174.9a28.31,28.31,0,0,0,24.79-14.19A27.45,27.45,0,0,0,240.26,186.1Zm-20.8,15.7a4.46,4.46,0,0,1-4,2.2H40.55a4.46,4.46,0,0,1-4-2.2,3.56,3.56,0,0,1,0-3.73L124,46.2a4.77,4.77,0,0,1,8,0l87.44,151.87A3.56,3.56,0,0,1,219.46,201.8ZM116,136V104a12,12,0,0,1,24,0v32a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,176Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M215.46,216H40.54C27.92,216,20,202.79,26.13,192.09L113.59,40.22c6.3-11,22.52-11,28.82,0l87.46,151.87C236,202.79,228.08,216,215.46,216Z",opacity:"0.2"}),a.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM120,104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm8,88a12,12,0,1,1,12-12A12,12,0,0,1,128,192Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M235.07,189.09,147.61,37.22h0a22.75,22.75,0,0,0-39.22,0L20.93,189.09a21.53,21.53,0,0,0,0,21.72A22.35,22.35,0,0,0,40.55,222h174.9a22.35,22.35,0,0,0,19.6-11.19A21.53,21.53,0,0,0,235.07,189.09ZM224.66,204.8a10.46,10.46,0,0,1-9.21,5.2H40.55a10.46,10.46,0,0,1-9.21-5.2,9.51,9.51,0,0,1,0-9.72L118.79,43.21a10.75,10.75,0,0,1,18.42,0l87.46,151.87A9.51,9.51,0,0,1,224.66,204.8ZM122,144V104a6,6,0,0,1,12,0v40a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,180Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M233.34,190.09,145.88,38.22h0a20.75,20.75,0,0,0-35.76,0L22.66,190.09a19.52,19.52,0,0,0,0,19.71A20.36,20.36,0,0,0,40.54,220H215.46a20.36,20.36,0,0,0,17.86-10.2A19.52,19.52,0,0,0,233.34,190.09ZM226.4,205.8a12.47,12.47,0,0,1-10.94,6.2H40.54a12.47,12.47,0,0,1-10.94-6.2,11.45,11.45,0,0,1,0-11.72L117.05,42.21a12.76,12.76,0,0,1,21.9,0L226.4,194.08A11.45,11.45,0,0,1,226.4,205.8ZM124,144V104a4,4,0,0,1,8,0v40a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,180Z"}))]]),s=a.forwardRef((e,t)=>a.createElement(n.A,{ref:t,...e,weights:l}));s.displayName="WarningIcon";let o=s},37820:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var a=r(3680),n=r(81630);function l({glyph:e,glyphVariant:t="skill",glyphBackground:r,name:s,description:o,category:i,topRight:c,foot:d,className:m=""}){return(0,a.jsxs)("div",{className:`relative flex h-full min-h-[200px] flex-col gap-1.5 rounded-2xl border border-rule-2 bg-paper p-[18px] ${m}`,children:[c&&(0,a.jsx)("div",{className:"absolute top-3.5 right-3.5 flex items-center gap-1.5",children:c}),(0,a.jsx)("div",{className:"mb-1.5",children:(0,a.jsx)(n.A,{variant:t,background:r,size:"lg",shape:"square",children:e})}),(0,a.jsx)("div",{className:"text-[15.5px] font-semibold leading-[1.2] tracking-[-0.005em] text-ink",children:s}),o&&(0,a.jsx)("div",{className:"text-[13px] leading-[1.4] text-ink-3",children:o}),i&&(0,a.jsx)("div",{className:"mt-1.5 font-mono text-[10.5px] uppercase tracking-[0.14em] text-ink-4",children:i}),d&&(0,a.jsx)("div",{className:"-mx-[18px] mt-auto flex items-center gap-2 border-t border-rule-2 px-[18px] pt-3.5",children:d})]})}},40189:(e,t,r)=>{"use strict";r.d(t,{F:()=>o});var a=r(78604),n=r(53087);let l=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),a.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H134v82a6,6,0,0,1-12,0V134H40a6,6,0,0,1,0-12h82V40a6,6,0,0,1,12,0v82h82A6,6,0,0,1,222,128Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H132v84a4,4,0,0,1-8,0V132H40a4,4,0,0,1,0-8h84V40a4,4,0,0,1,8,0v84h84A4,4,0,0,1,220,128Z"}))]]),s=a.forwardRef((e,t)=>a.createElement(n.A,{ref:t,...e,weights:l}));s.displayName="PlusIcon";let o=s},40319:(e,t,r)=>{"use strict";r.d(t,{r:()=>o});var a=r(78604),n=r(53087),l=r(54935);let s=a.forwardRef((e,t)=>a.createElement(n.A,{ref:t,...e,weights:l.A}));s.displayName="CheckCircleIcon";let o=s},54935:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(78604);let n=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M176.49,95.51a12,12,0,0,1,0,17l-56,56a12,12,0,0,1-17,0l-24-24a12,12,0,1,1,17-17L112,143l47.51-47.52A12,12,0,0,1,176.49,95.51ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),a.createElement("path",{d:"M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M172.24,99.76a6,6,0,0,1,0,8.48l-56,56a6,6,0,0,1-8.48,0l-24-24a6,6,0,0,1,8.48-8.48L112,151.51l51.76-51.75A6,6,0,0,1,172.24,99.76ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M170.83,101.17a4,4,0,0,1,0,5.66l-56,56a4,4,0,0,1-5.66,0l-24-24a4,4,0,0,1,5.66-5.66L112,154.34l53.17-53.17A4,4,0,0,1,170.83,101.17ZM228,128A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"}))]])},64678:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={callServer:function(){return l.callServer},createServerReference:function(){return o.createServerReference},findSourceMapURL:function(){return s.findSourceMapURL}};for(var n in a)Object.defineProperty(t,n,{enumerable:!0,get:a[n]});let l=r(22673),s=r(43145),o=r(87478)},86127:(e,t,r)=>{"use strict";r.d(t,{r:()=>o});var a=r(78604),n=r(5977),l=r(54935);let s=a.forwardRef((e,t)=>a.createElement(n.A,{ref:t,...e,weights:l.A}));s.displayName="CheckCircleIcon";let o=s},88499:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(3680);function n({children:e,className:t=""}){return(0,a.jsx)("code",{className:`inline-flex items-center rounded-[5px] bg-hover px-1.5 py-1 font-mono text-[11px] leading-none tracking-[0.02em] text-ink-2 ${t}`,children:e})}},93606:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var a=r(3680),n=r(86127),l=r(22089),s=r(82592);let o={done:"Done",warn:"Attention",run:"Running",idle:"Idle","lvl-info":"INFO","lvl-ok":"OK","lvl-warn":"WARN","lvl-err":"ERR"},i={done:"bg-ok-bg text-ok",warn:"bg-warn-bg text-warn",run:"bg-run-bg text-run",idle:"bg-black/5 text-ink-3 dark:bg-white/5","lvl-info":"bg-black/5 text-ink-3 dark:bg-white/5","lvl-ok":"bg-ok-bg text-ok","lvl-warn":"bg-warn-bg text-warn","lvl-err":"bg-warn-bg text-err"};function c({variant:e,label:t,icon:r,className:d=""}){let m=t??o[e],x=null;return void 0!==r?x=r:"done"===e?x=(0,a.jsx)(n.r,{size:11,weight:"regular"}):"warn"===e?x=(0,a.jsx)(l.N,{size:11,weight:"regular"}):"run"===e&&(x=(0,a.jsx)(s.A,{variant:"blue",size:"sm"})),(0,a.jsxs)("span",{className:`inline-flex h-[22px] items-center gap-1.5 rounded-[5px] px-2.5 text-[11px] font-medium leading-none ${i[e]} ${d}`,children:[x,m]})}}},e=>{e.O(0,[3363,9504,3141,1065,8724,7358],()=>e(e.s=1489)),_N_E=e.O()}]);
|