nodal-agents 0.7.0 → 0.7.2
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/cli.js +335 -35
- package/migrations/0054_audit2_db_integrity.sql +52 -0
- package/migrations/0055_entity_settings.sql +22 -0
- package/migrations/0056_agents_skills_entity_scoped_unique.sql +23 -0
- package/migrations/0057_telegram_allowed_chats.sql +34 -0
- package/migrations/meta/_journal.json +28 -0
- package/package.json +1 -1
- package/runner.js +47123 -35332
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/app-path-routes-manifest.json +4 -4
- 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)/chat/page.js +2 -2
- package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/connectors/page.js +1 -1
- 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 +1 -1
- 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)/learned-skills/page.js +2 -2
- package/web/.next/server/app/(dashboard)/learned-skills/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/learned-skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/llm-providers/page.js +1 -1
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -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)/settings/root-context/page.js +2 -2
- package/web/.next/server/app/(dashboard)/settings/root-context/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/settings/root-context/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/skills/[id]/edit/page.js +2 -2
- 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 -2
- 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/auth/[...all]/route.js +1 -1
- package/web/.next/server/app/api/auth/[...all]/route.js.nft.json +1 -1
- package/web/.next/server/app/api/oauth/[provider]/callback/route.js +1 -1
- package/web/.next/server/app/api/oauth/[provider]/callback/route.js.nft.json +1 -1
- package/web/.next/server/app/api/oauth/[provider]/start/route.js +1 -1
- package/web/.next/server/app/api/oauth/[provider]/start/route.js.nft.json +1 -1
- package/web/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/onboarding/page.js +205 -185
- package/web/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app-paths-manifest.json +4 -4
- package/web/.next/server/chunks/2713.js +47 -27
- package/web/.next/server/chunks/3223.js +1 -1
- package/web/.next/server/chunks/4574.js +1 -1
- package/web/.next/server/chunks/5515.js +1 -0
- package/web/.next/server/chunks/6468.js +1 -0
- package/web/.next/server/chunks/8410.js +1 -0
- package/web/.next/server/chunks/{4488.js → 8810.js} +2 -2
- package/web/.next/server/chunks/{3154.js → 960.js} +10 -10
- 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/4964-c6711d3d479b6085.js +1 -0
- package/web/.next/static/chunks/{9836-6830cb9d49ad261f.js → 9836-177f6ca2f15ff703.js} +1 -1
- package/web/.next/static/chunks/app/(dashboard)/agents/[id]/edit/page-cfce874f4acede5e.js +6 -0
- package/web/.next/static/chunks/app/(dashboard)/agents/[id]/telegram/page-9249c2839f551ba1.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/agents/page-7d784d737acedccf.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/approvals/{page-9a01cb723a6ccff0.js → page-b3a838ecbc94a030.js} +1 -1
- package/web/.next/static/chunks/app/(dashboard)/automations/page-b1b548de4f52696c.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/chat/{page-a6cc7a58986c0340.js → page-bcf6dcc73b370eb0.js} +1 -1
- package/web/.next/static/chunks/app/(dashboard)/connectors/{page-21d6c042800c8cd3.js → page-2c6f913cc6aea4b7.js} +1 -1
- package/web/.next/static/chunks/app/(dashboard)/jobs/[id]/page-43f033251eddcc4b.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/jobs/page-1f892f950bb30403.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/layout-e184673151ff8a05.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/learned-skills/page-f873bb6f8539e47e.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/llm-providers/page-64adda30176f4ccb.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/logs/page-79cfd9141c39d8ef.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/mcp/page-d276d7bab25286a1.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/memories/page-c66720494a340503.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/page-3649204dd27a0ad0.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/settings/page-1cab404d2eccfd80.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/settings/root-context/page-b5898c5444f88c9a.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/skills/[id]/edit/page-82d91fc6b6acc161.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/skills/new/page-58b5ed04583ca7d4.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/skills/page-312bd4ae8ddc8114.js +1 -0
- package/web/.next/static/chunks/app/onboarding/{page-a4116e2f430eaff8.js → page-f2f04878e81fdf23.js} +2 -2
- package/web/.next/static/css/{eff119dd24f92093.css → 4d808b91d7b58fce.css} +1 -1
- package/web/.next/server/chunks/4626.js +0 -1
- package/web/.next/server/chunks/8971.js +0 -1
- package/web/.next/server/chunks/9043.js +0 -1
- package/web/.next/static/chunks/4964-08171c654e41b0a4.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/agents/[id]/edit/page-fa5717f0d0450659.js +0 -6
- package/web/.next/static/chunks/app/(dashboard)/agents/[id]/telegram/page-73012222871598aa.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/agents/page-7e9616b28c098e9e.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/automations/page-85c985cd687406ed.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/jobs/[id]/page-f6b993a88c70a2fe.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/jobs/page-d0d6b9db1b68451f.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/layout-d2ac2646967496bb.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/learned-skills/page-ec6312f6dfd7ee23.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/llm-providers/page-1fb26463eddf509c.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/logs/page-0bca733315e8a208.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/mcp/page-ff56ecf2f65f5466.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/memories/page-fe4d9438c93750d6.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/page-9402fe2931216f4b.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/settings/page-995662f10ebff365.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/settings/root-context/page-785b6ce3e4c5890b.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/skills/[id]/edit/page-2106201c4df8b5a4.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/skills/new/page-0135bcb86ab60dc2.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/skills/page-54e939d40c8b5b6d.js +0 -1
- /package/web/.next/static/{KFac7DQ7gdp9XPQ2bnb-2 → SgnP_MouhUmw0bBf-lUmD}/_buildManifest.js +0 -0
- /package/web/.next/static/{KFac7DQ7gdp9XPQ2bnb-2 → SgnP_MouhUmw0bBf-lUmD}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[694],{27540:(e,t,l)=>{"use strict";var n=l(71268);l.o(n,"usePathname")&&l.d(t,{usePathname:function(){return n.usePathname}}),l.o(n,"useRouter")&&l.d(t,{useRouter:function(){return n.useRouter}}),l.o(n,"useSearchParams")&&l.d(t,{useSearchParams:function(){return n.useSearchParams}})},32928:(e,t,l)=>{"use strict";l.d(t,{e:()=>i});var n=l(78604),a=l(53087);let r=new Map([["bold",n.createElement(n.Fragment,null,n.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",n.createElement(n.Fragment,null,n.createElement("path",{d:"M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z",opacity:"0.2"}),n.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",n.createElement(n.Fragment,null,n.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",n.createElement(n.Fragment,null,n.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",n.createElement(n.Fragment,null,n.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",n.createElement(n.Fragment,null,n.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=n.forwardRef((e,t)=>n.createElement(a.A,{ref:t,...e,weights:r}));s.displayName="MagnifyingGlassIcon";let i=s},35532:(e,t,l)=>{"use strict";l.d(t,{default:()=>m});var n=l(3680),a=l(78604),r=l(27540),s=l(39504),i=l(64678);let o=(0,i.createServerReference)("403f71242c58eb91cbd4e5daef29d6bee071ec7e65",i.callServer,void 0,i.findSourceMapURL,"resetSkillToDefaultAction");var d=l(84349);let c=(0,i.createServerReference)("4089229c3681af8ee5b66adb4c5d84e2fdb41eae0c",i.callServer,void 0,i.findSourceMapURL,"createSkillAction");var u=l(14308);function m(e){let t="edit"===e.mode,l=(0,r.useRouter)(),[i,m]=(0,a.useState)(t||!0===e.defaultOpen),[b,h]=(0,a.useTransition)(),[p,x]=(0,a.useState)(!1),f=t&&!0===e.initial.contentOverridden&&null!==e.initial.defaultContent;if(!i)return(0,n.jsx)("button",{type:"button",onClick:()=>m(!0),className:"px-4 py-2 text-sm font-medium bg-ink text-canvas rounded-lg hover:brightness-[0.92]",children:"+ New skill"});let k=t?e.initial:void 0;return(0,n.jsxs)("form",{onSubmit:function(n){n.preventDefault();let a=n.currentTarget,r=new FormData(a);if(t&&"edit"===e.mode){let t={id:e.initial.id,name:r.get("name"),content:r.get("content"),description:r.get("description")||void 0};h(async()=>{let e=await (0,d.R)(t);e.ok?(s.oR.success("Skill updated"),l.push("/skills")):s.oR.error(e.message)})}else h(async()=>{let e=await c({slug:r.get("slug"),name:r.get("name"),content:r.get("content"),description:r.get("description")||void 0});e.ok?(s.oR.success("Skill created"),a.reset(),m(!1)):s.oR.error(e.message)})},className:"bg-paper border border-rule-2 rounded-xl p-5 space-y-3",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsx)("h3",{className:"text-sm font-semibold text-ink",children:t?"Edit skill":"New skill"}),f&&(0,n.jsx)("button",{type:"button",onClick:()=>x(!0),disabled:b,title:"Restore the catalog default content for this skill",className:"text-xs px-2.5 py-1 rounded border border-warn/30 text-warn hover:bg-warn-bg transition-colors disabled:opacity-50",children:"Reset to default"})]}),(0,n.jsx)(u.A,{open:p,title:"Reset skill to default?",message:"Your customised instructions will be replaced with the catalog default shipped with NodalAI. This cannot be undone.",confirmLabel:"Reset",cancelLabel:"Cancel",destructive:!0,onConfirm:function(){if(!t)return;let n=e.initial.id;x(!1),h(async()=>{let e=await o(n);e.ok?(s.oR.success("Skill reset to default"),l.refresh()):s.oR.error(e.message)})},onCancel:()=>x(!1)}),(0,n.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("label",{className:"block text-xs text-ink-3 mb-1",htmlFor:"skill-slug",children:["Slug ",t&&(0,n.jsx)("span",{className:"text-ink-4",children:"(stable — not editable)"})]}),(0,n.jsx)("input",{id:"skill-slug",name:"slug",required:!t,readOnly:t,disabled:t,pattern:t?void 0:"[a-z0-9\\-]+",placeholder:"my-skill",defaultValue:k?.slug,title:t?"Slug is a stable identifier and cannot be changed":void 0,className:t?"w-full bg-hover border border-rule rounded-md px-2 py-1.5 text-sm text-ink-3 cursor-not-allowed font-mono":"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.jsxs)("div",{children:[(0,n.jsx)("label",{className:"block text-xs text-ink-3 mb-1",htmlFor:"skill-name",children:"Name"}),(0,n.jsx)("input",{id:"skill-name",name:"name",required:!0,placeholder:"My Skill",defaultValue:k?.name,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"})]})]}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("label",{className:"block text-xs text-ink-3 mb-1",htmlFor:"skill-description",children:["Description ",(0,n.jsx)("span",{className:"text-ink-4",children:"(optional)"})]}),(0,n.jsx)("input",{id:"skill-description",name:"description",maxLength:500,placeholder:"What does this skill teach the agent?",defaultValue:k?.description??"",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"})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"block text-xs text-ink-3 mb-1",htmlFor:"skill-content",children:"Instructions"}),(0,n.jsx)("textarea",{id:"skill-content",name:"content",required:!0,rows:18,placeholder:"Step-by-step instructions or context the agent gets when this skill is enabled.",defaultValue:k?.content,className:"w-full bg-hover border border-rule rounded-md px-3 py-2 text-sm leading-relaxed text-ink placeholder:text-ink-4 focus:border-ink-3 focus:outline-none resize-y min-h-[440px]"})]}),(0,n.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,n.jsx)("button",{type:"submit",disabled:b,className:"px-4 py-2 text-sm font-semibold bg-ink text-canvas rounded-md hover:brightness-[0.92] disabled:opacity-50",children:b?t?"Saving…":"Creating…":t?"Save changes":"Create skill"}),(0,n.jsx)("button",{type:"button",onClick:()=>t?l.push("/skills"):m(!1),className:"px-4 py-2 text-sm font-medium border border-rule text-ink-3 rounded-md hover:border-rule",children:"Cancel"})]})]})}},53404:(e,t,l)=>{Promise.resolve().then(l.bind(l,35532)),Promise.resolve().then(l.bind(l,88563)),Promise.resolve().then(l.bind(l,64676)),Promise.resolve().then(l.bind(l,11248)),Promise.resolve().then(l.t.bind(l,63363,23))},84349:(e,t,l)=>{"use strict";l.d(t,{R:()=>a});var n=l(64678);let a=(0,n.createServerReference)("40b0dab57a7e20d815a98e4317d947938102ca135b",n.callServer,void 0,n.findSourceMapURL,"updateSkillAction")}},e=>{e.O(0,[3363,8161,9836,1065,8724,7358],()=>e(e.s=53404)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7092],{10834:(e,t,l)=>{"use strict";l.d(t,{default:()=>d});var a=l(3680),n=l(27540),r=l(78604),s=l(53087);let i=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M168.49,199.51a12,12,0,0,1-17,17l-80-80a12,12,0,0,1,0-17l80-80a12,12,0,0,1,17,17L97,128Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M160,48V208L80,128Z",opacity:"0.2"}),r.createElement("path",{d:"M163.06,40.61a8,8,0,0,0-8.72,1.73l-80,80a8,8,0,0,0,0,11.32l80,80A8,8,0,0,0,168,208V48A8,8,0,0,0,163.06,40.61ZM152,188.69,91.31,128,152,67.31Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M168,48V208a8,8,0,0,1-13.66,5.66l-80-80a8,8,0,0,1,0-11.32l80-80A8,8,0,0,1,168,48Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M164.24,203.76a6,6,0,1,1-8.48,8.48l-80-80a6,6,0,0,1,0-8.48l80-80a6,6,0,0,1,8.48,8.48L88.49,128Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M162.83,205.17a4,4,0,0,1-5.66,5.66l-80-80a4,4,0,0,1,0-5.66l80-80a4,4,0,1,1,5.66,5.66L85.66,128Z"}))]]),o=r.forwardRef((e,t)=>r.createElement(s.A,{ref:t,...e,weights:i}));function d({href:e,label:t="Back",className:l=""}){let r=(0,n.useRouter)();return(0,a.jsxs)("button",{type:"button",onClick:()=>e?r.push(e):r.back(),className:`inline-flex items-center gap-1.5 border-0 bg-transparent py-2 text-[14px] font-medium leading-none text-ink-3 transition-colors hover:text-ink ${l}`,children:[(0,a.jsx)(o,{size:14,weight:"bold"}),t]})}o.displayName="CaretLeftIcon"},27540:(e,t,l)=>{"use strict";var a=l(71268);l.o(a,"usePathname")&&l.d(t,{usePathname:function(){return a.usePathname}}),l.o(a,"useRouter")&&l.d(t,{useRouter:function(){return a.useRouter}}),l.o(a,"useSearchParams")&&l.d(t,{useSearchParams:function(){return a.useSearchParams}})},32928:(e,t,l)=>{"use strict";l.d(t,{e:()=>i});var a=l(78604),n=l(53087);let r=new Map([["bold",a.createElement(a.Fragment,null,a.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",a.createElement(a.Fragment,null,a.createElement("path",{d:"M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z",opacity:"0.2"}),a.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",a.createElement(a.Fragment,null,a.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",a.createElement(a.Fragment,null,a.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",a.createElement(a.Fragment,null,a.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",a.createElement(a.Fragment,null,a.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=a.forwardRef((e,t)=>a.createElement(n.A,{ref:t,...e,weights:r}));s.displayName="MagnifyingGlassIcon";let i=s},35532:(e,t,l)=>{"use strict";l.d(t,{default:()=>m});var a=l(3680),n=l(78604),r=l(27540),s=l(39504),i=l(64678);let o=(0,i.createServerReference)("403f71242c58eb91cbd4e5daef29d6bee071ec7e65",i.callServer,void 0,i.findSourceMapURL,"resetSkillToDefaultAction");var d=l(84349);let c=(0,i.createServerReference)("4089229c3681af8ee5b66adb4c5d84e2fdb41eae0c",i.callServer,void 0,i.findSourceMapURL,"createSkillAction");var u=l(14308);function m(e){let t="edit"===e.mode,l=(0,r.useRouter)(),[i,m]=(0,n.useState)(t||!0===e.defaultOpen),[h,p]=(0,n.useTransition)(),[b,x]=(0,n.useState)(!1),f=t&&!0===e.initial.contentOverridden&&null!==e.initial.defaultContent;if(!i)return(0,a.jsx)("button",{type:"button",onClick:()=>m(!0),className:"px-4 py-2 text-sm font-medium bg-ink text-canvas rounded-lg hover:brightness-[0.92]",children:"+ New skill"});let g=t?e.initial:void 0;return(0,a.jsxs)("form",{onSubmit:function(a){a.preventDefault();let n=a.currentTarget,r=new FormData(n);if(t&&"edit"===e.mode){let t={id:e.initial.id,name:r.get("name"),content:r.get("content"),description:r.get("description")||void 0};p(async()=>{let e=await (0,d.R)(t);e.ok?(s.oR.success("Skill updated"),l.push("/skills")):s.oR.error(e.message)})}else p(async()=>{let e=await c({slug:r.get("slug"),name:r.get("name"),content:r.get("content"),description:r.get("description")||void 0});e.ok?(s.oR.success("Skill created"),n.reset(),m(!1)):s.oR.error(e.message)})},className:"bg-paper border border-rule-2 rounded-xl p-5 space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-ink",children:t?"Edit skill":"New skill"}),f&&(0,a.jsx)("button",{type:"button",onClick:()=>x(!0),disabled:h,title:"Restore the catalog default content for this skill",className:"text-xs px-2.5 py-1 rounded border border-warn/30 text-warn hover:bg-warn-bg transition-colors disabled:opacity-50",children:"Reset to default"})]}),(0,a.jsx)(u.A,{open:b,title:"Reset skill to default?",message:"Your customised instructions will be replaced with the catalog default shipped with NodalAI. This cannot be undone.",confirmLabel:"Reset",cancelLabel:"Cancel",destructive:!0,onConfirm:function(){if(!t)return;let a=e.initial.id;x(!1),p(async()=>{let e=await o(a);e.ok?(s.oR.success("Skill reset to default"),l.refresh()):s.oR.error(e.message)})},onCancel:()=>x(!1)}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{className:"block text-xs text-ink-3 mb-1",htmlFor:"skill-slug",children:["Slug ",t&&(0,a.jsx)("span",{className:"text-ink-4",children:"(stable — not editable)"})]}),(0,a.jsx)("input",{id:"skill-slug",name:"slug",required:!t,readOnly:t,disabled:t,pattern:t?void 0:"[a-z0-9\\-]+",placeholder:"my-skill",defaultValue:g?.slug,title:t?"Slug is a stable identifier and cannot be changed":void 0,className:t?"w-full bg-hover border border-rule rounded-md px-2 py-1.5 text-sm text-ink-3 cursor-not-allowed font-mono":"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)("div",{children:[(0,a.jsx)("label",{className:"block text-xs text-ink-3 mb-1",htmlFor:"skill-name",children:"Name"}),(0,a.jsx)("input",{id:"skill-name",name:"name",required:!0,placeholder:"My Skill",defaultValue:g?.name,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"})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{className:"block text-xs text-ink-3 mb-1",htmlFor:"skill-description",children:["Description ",(0,a.jsx)("span",{className:"text-ink-4",children:"(optional)"})]}),(0,a.jsx)("input",{id:"skill-description",name:"description",maxLength:500,placeholder:"What does this skill teach the agent?",defaultValue:g?.description??"",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"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-xs text-ink-3 mb-1",htmlFor:"skill-content",children:"Instructions"}),(0,a.jsx)("textarea",{id:"skill-content",name:"content",required:!0,rows:18,placeholder:"Step-by-step instructions or context the agent gets when this skill is enabled.",defaultValue:g?.content,className:"w-full bg-hover border border-rule rounded-md px-3 py-2 text-sm leading-relaxed text-ink placeholder:text-ink-4 focus:border-ink-3 focus:outline-none resize-y min-h-[440px]"})]}),(0,a.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,a.jsx)("button",{type:"submit",disabled:h,className:"px-4 py-2 text-sm font-semibold bg-ink text-canvas rounded-md hover:brightness-[0.92] disabled:opacity-50",children:h?t?"Saving…":"Creating…":t?"Save changes":"Create skill"}),(0,a.jsx)("button",{type:"button",onClick:()=>t?l.push("/skills"):m(!1),className:"px-4 py-2 text-sm font-medium border border-rule text-ink-3 rounded-md hover:border-rule",children:"Cancel"})]})]})}},54465:(e,t,l)=>{Promise.resolve().then(l.bind(l,35532)),Promise.resolve().then(l.bind(l,88563)),Promise.resolve().then(l.bind(l,10834)),Promise.resolve().then(l.bind(l,64676)),Promise.resolve().then(l.bind(l,11248))},84349:(e,t,l)=>{"use strict";l.d(t,{R:()=>n});var a=l(64678);let n=(0,a.createServerReference)("40b0dab57a7e20d815a98e4317d947938102ca135b",a.callServer,void 0,a.findSourceMapURL,"updateSkillAction")}},e=>{e.O(0,[3363,8161,9836,1065,8724,7358],()=>e(e.s=54465)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8141],{2810:(e,s,t)=>{"use strict";t.d(s,{default:()=>K});var l=t(3680),n=t(78604),a=t(10781),i=t(40189),r=t(14964),o=t(73868),d=t(65668),c=t(28870),x=t(42357),m=t(66736),u=t(77045),p=t(63363),h=t.n(p),g=t(39504),b=t(57390),f=t(11042),j=t(67697),k=t(18771),v=t(64678);let N=(0,v.createServerReference)("40b125044576bba9d9b7d3d50455d2bfeaf7d8d5c5",v.callServer,void 0,v.findSourceMapURL,"deleteSkillAction"),y=(0,v.createServerReference)("405f3f64d0928dbf53df29e0f06104453025aa12fc",v.callServer,void 0,v.findSourceMapURL,"uninstallCommunitySkillAction");function w({avatars:e,max:s=5,label:t,className:n=""}){if(0===e.length)return t?(0,l.jsx)("span",{className:`font-sans text-[13px] leading-none text-ink-3 ${n}`,children:t}):null;let a=e.slice(0,s),i=e.length-a.length;return(0,l.jsxs)("span",{className:`inline-flex items-center gap-2.5 ${n}`,children:[(0,l.jsxs)("span",{className:"inline-flex",children:[a.map((e,s)=>(0,l.jsx)("span",{className:`flex h-6 w-6 items-center justify-center overflow-hidden rounded-full border-2 border-paper bg-agent-vivid text-[11px] font-semibold leading-none tracking-[0.04em] text-[#0a0a0a] ${0===s?"":"-ml-[7px]"}`,title:e.name,children:e.avatarUrl?(0,l.jsx)("img",{src:e.avatarUrl,alt:"",className:"h-full w-full object-cover"}):function(e){let s=e.trim();if(!s)return"?";let t=s.split(/\s+/);return t.length>=2?((t[0][0]??"")+(t[1][0]??"")).toUpperCase():s.slice(0,2).toUpperCase()}(e.name)},e.id)),i>0&&(0,l.jsxs)("span",{className:"flex h-6 w-6 -ml-[7px] items-center justify-center rounded-full border-2 border-paper bg-hover text-[11px] font-semibold leading-none text-ink-3",children:["+",i]})]}),t&&(0,l.jsx)("span",{className:"font-sans text-[13px] leading-none text-ink-3",children:t})]})}var S=t(96459),C=t(14308),A=t(27540);let R=(0,v.createServerReference)("40da2054f7dd1ff77d7eecb4a99030f358b09de707",v.callServer,void 0,v.findSourceMapURL,"unassignSkillAction");var L=t(80971),z=t(13260);function $({open:e,onClose:s,skill:t,agents:n}){return(0,l.jsx)(z.A,{open:e,onClose:s,title:`Assign "${t.name}"`,children:(0,l.jsx)(U,{skill:t,agents:n,onClose:s})})}function U({skill:e,agents:s,onClose:t}){let a=(0,A.useRouter)(),[i,r]=(0,n.useState)(()=>new Set(e.assignedAgents.map(e=>e.id))),[o,d]=(0,n.useTransition)();return 0===s.length?(0,l.jsxs)("div",{className:"space-y-3 py-6 text-center",children:[(0,l.jsx)("p",{className:"text-sm text-ink-3",children:"No agents yet — create one first."}),(0,l.jsx)(h(),{href:"/agents",onClick:t,className:"inline-flex items-center gap-1 text-sm font-medium text-blue-400 underline underline-offset-2 hover:text-blue-300",children:"Go to Agents"})]}):(0,l.jsxs)("div",{className:"space-y-1",children:[(0,l.jsx)("p",{className:"mb-3 text-xs text-ink-3",children:"Toggle to assign or unassign this skill from each agent."}),(0,l.jsx)("div",{className:"divide-y divide-rule-2 overflow-hidden rounded-lg border border-rule-2 bg-canvas/30",children:s.map(s=>{let t=i.has(s.id);return(0,l.jsxs)("label",{className:"flex cursor-pointer items-center gap-3 px-3 py-2.5 transition-colors hover:bg-hover",children:[(0,l.jsx)("input",{type:"checkbox",checked:t,disabled:o,onChange:()=>{var t;let l;return t=s.id,l=i.has(t),void(r(e=>{let s=new Set(e);return l?s.delete(t):s.add(t),s}),d(async()=>{let s={skillId:e.id,agentId:t},n=l?await R(s):await (0,L.f)(s);if(!n.ok){r(e=>{let s=new Set(e);return l?s.add(t):s.delete(t),s}),g.oR.error(n.message);return}g.oR.success(l?"Skill unassigned":"Skill assigned"),a.refresh()}))},className:"h-4 w-4 shrink-0 accent-skill-vivid"}),(0,l.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,l.jsx)("span",{className:"block truncate text-sm text-ink",children:s.name}),(0,l.jsx)("span",{className:"block truncate font-mono text-[12px] text-ink-3",children:s.slug})]}),(0,l.jsx)("span",{className:`shrink-0 text-[12px] font-medium ${t?"text-ok":"text-ink-4"}`,children:t?"Assigned":"Not assigned"})]},s.id)})})]})}function I({skills:e,agents:s}){return(0,l.jsx)("div",{className:"overflow-hidden rounded-2xl border border-rule-2 bg-paper",children:(0,l.jsx)("div",{className:"overflow-x-auto",children:(0,l.jsxs)("table",{className:"w-full border-collapse",children:[(0,l.jsx)("thead",{children:(0,l.jsxs)("tr",{children:[(0,l.jsx)(_,{label:"Skill"}),(0,l.jsx)(_,{label:"Assigned to"}),(0,l.jsx)(_,{label:"Required built-ins"}),(0,l.jsx)(_,{label:"Actions",align:"right"})]})}),(0,l.jsx)("tbody",{children:e.map(e=>(0,l.jsx)(M,{skill:e,agents:s},e.id))})]})})})}function _({label:e,align:s="left"}){return(0,l.jsx)("th",{className:`border-b border-rule-2 px-[18px] pt-3.5 pb-2.5 font-mono text-[9.5px] font-normal whitespace-nowrap uppercase tracking-[0.16em] text-ink-4 ${"right"===s?"text-right":"text-left"}`,scope:"col",children:e})}function M({skill:e,agents:s}){let[t,a]=(0,n.useState)(!1),[r,o]=(0,n.useState)(!1),[d,c]=(0,n.useState)(!1),[x,m]=(0,n.useState)(!1),[u,p]=(0,n.useTransition)();return(0,l.jsxs)("tr",{className:"border-b border-rule-2 last:border-0 hover:bg-hover",children:[(0,l.jsx)("td",{className:"px-[18px] py-4 align-middle",children:(0,l.jsx)("div",{className:"flex items-center gap-3",children:(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,l.jsx)("span",{className:"text-[13.5px] font-medium leading-[1.2] text-ink",children:e.name}),e.isCommunity&&(0,l.jsx)("span",{className:"shrink-0 rounded bg-skill-vivid/15 px-1.5 py-0.5 font-mono text-[9.5px] font-medium uppercase tracking-[0.08em] text-skill-vivid",children:"community"})]}),(0,l.jsx)("div",{className:"mt-0.5 line-clamp-2 max-w-[460px] text-[12px] leading-[1.3] text-ink-3",title:e.description??e.slug,children:e.description??(0,l.jsx)("span",{className:"font-mono text-ink-4",children:e.slug})})]})})}),(0,l.jsx)("td",{className:"px-[18px] py-4 align-middle",children:e.assignmentCount>0?(0,l.jsx)(w,{avatars:e.assignedAgents,max:4,label:`+${e.assignmentCount}`}):(0,l.jsx)("span",{className:"font-mono text-[11px] text-ink-4",children:"Unassigned"})}),(0,l.jsx)("td",{className:"px-[18px] py-4 align-middle",children:e.requiredBuiltins.length>0?(0,l.jsx)(S.A,{items:e.requiredBuiltins,noun:"built-in"}):(0,l.jsx)("span",{className:"font-mono text-[11px] text-ink-4",children:"none"})}),(0,l.jsxs)("td",{className:"px-[18px] py-4 align-middle",children:[(0,l.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,l.jsxs)("button",{type:"button",onClick:()=>m(!0),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:[(0,l.jsx)(i.F,{size:13,weight:"bold"}),"Assign"]}),(0,l.jsxs)(h(),{href:`/skills/${e.id}/edit`,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:[(0,l.jsx)(b.I,{size:13}),"Customise"]}),!e.isSystem&&(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)("button",{type:"button",onClick:()=>c(e=>!e),"aria-label":"More actions",className:"flex h-[30px] w-[30px] items-center justify-center rounded-[7px] border border-rule bg-paper text-ink-3 transition-colors hover:text-ink",children:(0,l.jsx)(f.H,{size:16,weight:"bold"})}),d&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"fixed inset-0 z-10",onClick:()=>c(!1)}),(0,l.jsxs)("div",{className:"absolute top-[calc(100%+4px)] right-0 z-20 min-w-[140px] rounded-[9px] border border-rule-2 bg-paper p-1 shadow-[0_12px_32px_rgba(0,0,0,0.10)]",children:[e.isCommunity&&(0,l.jsxs)("button",{type:"button",onClick:()=>{c(!1),o(!0)},disabled:u,className:"flex w-full items-center gap-2 rounded-md px-2.5 py-1.5 text-left text-[12.5px] text-err transition-colors hover:bg-warn-bg disabled:opacity-40",children:[(0,l.jsx)(j._,{size:13}),"Uninstall"]}),(0,l.jsxs)("button",{type:"button",onClick:()=>{c(!1),a(!0)},disabled:u,className:"flex w-full items-center gap-2 rounded-md px-2.5 py-1.5 text-left text-[12.5px] text-err transition-colors hover:bg-warn-bg disabled:opacity-40",children:[(0,l.jsx)(k.l,{size:13}),"Delete"]})]})]})]})]}),(0,l.jsx)(C.A,{open:t,title:`Delete skill "${e.name}"?`,message:"The skill and all its agent assignments will be removed. Existing job logs are kept.",confirmLabel:"Delete",onConfirm:()=>{a(!1),p(async()=>{let s=await N(e.id);s.ok?g.oR.success("Skill deleted"):g.oR.error(s.message)})},onCancel:()=>a(!1)}),(0,l.jsx)(C.A,{open:r,title:`Uninstall community skill "${e.name}"?`,message:"The skill and all its agent assignments will be removed. You can reinstall it at any time from the same source.",confirmLabel:"Uninstall",onConfirm:()=>{o(!1),p(async()=>{let s=await y(e.slug);s.ok?g.oR.success(`Skill "${e.name}" uninstalled`):g.oR.error(s.message)})},onCancel:()=>o(!1)}),(0,l.jsx)($,{open:x,onClose:()=>m(!1),skill:e,agents:s})]})]})}var T=t(59704);let E=(0,v.createServerReference)("40b3d13f005d24eea4365d4a94bc32903b9b6c8eca",v.callServer,void 0,v.findSourceMapURL,"installCommunitySkillAction");var F=t(37820),B=t(16237);function q({installedSlugs:e,query:s="",category:t="All"}){let n=new Set(e),a=s.trim().toLowerCase(),i=r.EB;return("All"!==t&&(i=i.filter(e=>e.category===t)),a&&(i=i.filter(e=>e.name.toLowerCase().includes(a)||e.description.toLowerCase().includes(a)||e.category.toLowerCase().includes(a))),0===i.length)?(0,l.jsx)("div",{className:"rounded-2xl border border-rule-2 bg-paper px-6 py-12 text-center",children:(0,l.jsx)("p",{className:"text-[14px] leading-[1.5] text-ink-3",children:"No community skills match your search."})}):(0,l.jsx)("div",{className:"grid auto-rows-fr grid-cols-1 gap-3.5 sm:grid-cols-2 lg:grid-cols-3",children:i.map(e=>(0,l.jsx)(D,{entry:e,isInstalled:n.has(e.slug)},e.slug))})}function D({entry:e,isInstalled:s}){let t=(0,A.useRouter)(),[a,i]=(0,n.useTransition)(),[r,o]=(0,n.useState)(s),d=(0,l.jsx)("span",{className:"cursor-help font-mono text-[12px] text-ink-4",title:e.source.split("/").slice(0,2).join("/"),children:("skills-sh"===e.sourceHost?"Skills.sh":"GitHub").toLowerCase()});return(0,l.jsx)(F.A,{name:e.name,description:e.description,category:e.category,foot:r?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"min-w-0 flex-1 truncate",children:d}),(0,l.jsx)("span",{className:"inline-flex h-[30px] shrink-0 items-center rounded-[7px] border border-rule bg-paper px-3 text-[13px] font-medium text-ink-4",children:"Installed"})]}):(0,l.jsx)(B.A,{status:d,ctaLabel:a?"Installing…":"Install",ctaVariant:"coral",icon:(0,l.jsx)(T.z,{size:12,weight:"bold"}),onCta:a?void 0:function(){i(async()=>{let s=await E(e.source);s.ok?(o(!0),g.oR.success(`${e.name} installed — assign it to an agent`),t.refresh()):g.oR.error(s.message)})}})})}var H=t(96067);function O({open:e,onClose:s}){let t=(0,A.useRouter)(),[a,i]=(0,n.useState)(""),[r,o]=(0,n.useTransition)(),[d,c]=(0,n.useState)(null),[x,m]=(0,n.useState)(null);function u(){i(""),c(null),m(null),s()}function p(){a.trim()&&(c(null),m(null),o(async()=>{let e=await E(a.trim());if(!e.ok){m(e.message),g.oR.error(e.message);return}c(e.data),g.oR.success(e.data.reinstalled?`Skill "${e.data.name}" reinstalled`:`Skill "${e.data.name}" installed`),t.refresh()}))}return(0,l.jsx)(z.A,{open:e,onClose:u,title:"Install community skill",children:(0,l.jsxs)("div",{className:"space-y-4",children:[(0,l.jsxs)("div",{className:"flex gap-2.5 rounded-lg border border-amber-500/30 bg-amber-500/10 px-3.5 py-3",children:[(0,l.jsx)(H.N,{size:16,weight:"fill",className:"mt-[1px] shrink-0 text-amber-400"}),(0,l.jsx)("p",{className:"text-[13px] leading-[1.5] text-amber-300",children:"Only install skills from sources you trust — a skill's instructions run with your agent's tools."})]}),(0,l.jsxs)("div",{className:"space-y-1.5",children:[(0,l.jsx)("label",{htmlFor:"skill-source",className:"block text-[13px] font-medium text-ink-2",children:"Source"}),(0,l.jsx)("input",{id:"skill-source",type:"text",value:a,onChange:e=>i(e.target.value),onKeyDown:e=>{"Enter"!==e.key||r||p()},placeholder:"owner/repo, GitHub URL, or skills.sh path",disabled:r,className:"w-full rounded-lg border border-rule bg-canvas px-3 py-2 text-[14px] text-ink placeholder:text-ink-4 focus:border-rule-2 focus:outline-none disabled:opacity-50"})]}),x&&!d&&(0,l.jsx)("div",{className:"rounded-lg border border-err/30 bg-err/10 px-3.5 py-3",children:(0,l.jsx)("p",{className:"text-[13px] leading-[1.5] text-err",children:x})}),d&&(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{className:"rounded-lg border border-ok/30 bg-ok/10 px-3.5 py-3",children:[(0,l.jsxs)("p",{className:"text-[13px] font-medium leading-[1.5] text-ok",children:[d.reinstalled?"Reinstalled":"Installed",":"," ",(0,l.jsx)("span",{className:"font-semibold",children:d.name})]}),d.description&&(0,l.jsx)("p",{className:"mt-1 text-[13px] leading-[1.4] text-ok/70",children:d.description})]}),d.installedScripts.length>0&&(0,l.jsx)("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/10 px-3.5 py-3",children:(0,l.jsxs)("div",{className:"flex gap-2.5",children:[(0,l.jsx)(H.N,{size:15,weight:"fill",className:"mt-[1px] shrink-0 text-amber-400"}),(0,l.jsxs)("div",{className:"space-y-1.5",children:[(0,l.jsx)("p",{className:"text-[13px] font-medium leading-[1.4] text-amber-300",children:"This skill bundles executable scripts."}),(0,l.jsxs)("p",{className:"text-[13px] leading-[1.4] text-amber-300/80",children:["They run only for an agent that has the"," ",(0,l.jsx)("span",{className:"font-mono",children:"command-execution"}),"capability and only after you authorize them — and every run is gated by your approval. Otherwise just the skill's instructions are used."]}),(0,l.jsx)("ul",{className:"mt-2 space-y-0.5",children:d.installedScripts.map(e=>(0,l.jsxs)("li",{className:"flex items-center gap-2 font-mono text-[12px] text-amber-300/70",children:[(0,l.jsx)("span",{className:"rounded bg-amber-500/20 px-1.5 py-0.5 text-[11px] uppercase",children:e.language}),(0,l.jsx)("span",{className:"truncate",children:e.path})]},e.path))})]})]})})]}),(0,l.jsxs)("div",{className:"flex justify-end gap-2 pt-1",children:[(0,l.jsx)("button",{type:"button",onClick:u,className:"inline-flex h-[34px] items-center rounded-md border border-rule px-3.5 text-[14px] font-medium text-ink-2 transition-colors hover:border-rule-2 hover:text-ink",children:d?"Close":"Cancel"}),!d&&(0,l.jsx)("button",{type:"button",onClick:p,disabled:r||!a.trim(),className:"inline-flex h-[34px] items-center gap-1.5 rounded-md bg-skill-vivid px-3.5 text-[14px] font-medium text-white transition-[filter] hover:brightness-[0.94] disabled:cursor-not-allowed disabled:opacity-50",children:r?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"h-3.5 w-3.5 animate-spin rounded-full border-2 border-white/30 border-t-white"}),"Installing…"]}):"Install"})]})]})})}let G=["All",...Array.from(new Set(r.EB.map(e=>e.category)))];function K({skills:e,agents:s}){let t=(0,n.useMemo)(()=>e.filter(e=>e.assignmentCount>0&&"agent-internal"!==e.systemKind),[e]),p=(0,n.useMemo)(()=>e.map(e=>e.slug),[e]),[h,g]=(0,n.useState)(t.length>0?"assigned":"library"),[b,f]=(0,n.useState)("All"),[j,k]=(0,n.useState)(""),[v,N]=(0,n.useState)(!1),y=(0,n.useMemo)(()=>{let e=j.trim().toLowerCase();return e?t.filter(s=>s.name.toLowerCase().includes(e)||(s.description??"").toLowerCase().includes(e)):t},[t,j]);return(0,l.jsxs)(o.A,{title:"Skills",subtitle:`${e.length} reusable instructions`,toolbar:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(d.A,{tabs:(0,l.jsx)(c.A,{value:h,onChange:e=>{g(e),k("")},tabs:[{value:"assigned",label:"Assigned",count:t.length},{value:"library",label:"Library",count:r.EB.length}]}),search:(0,l.jsx)(m.A,{value:j,onChange:k,placeholder:"Search skill…"}),cta:(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsxs)(u.A,{variant:"neutral",onClick:()=>N(!0),className:"!border-black/10 !bg-white !text-[#161616] hover:!bg-[#f2f2f2]",children:[(0,l.jsx)(a.p,{size:13,weight:"bold"}),"Install skill"]}),(0,l.jsxs)(u.A,{variant:"coral",href:"/skills/new",children:[(0,l.jsx)(i.F,{size:13,weight:"bold"}),"New Skill"]})]})}),"library"===h&&(0,l.jsx)(x.A,{className:"mt-3",value:b,onChange:f,items:G.map(e=>({value:e,label:e}))})]}),children:[(0,l.jsx)(O,{open:v,onClose:()=>N(!1)}),"assigned"===h?0===t.length?(0,l.jsx)("div",{className:"rounded-2xl border border-rule-2 bg-paper px-6 py-12 text-center",children:(0,l.jsx)("p",{className:"text-[14px] leading-[1.5] text-ink-3",children:"No skills assigned to any agent yet. Browse the Library to add one."})}):(0,l.jsx)(I,{skills:y,agents:s}):(0,l.jsx)(q,{installedSlugs:p,query:j,category:b})]})}},52033:(e,s,t)=>{Promise.resolve().then(t.bind(t,2810))},80971:(e,s,t)=>{"use strict";t.d(s,{f:()=>n});var l=t(64678);let n=(0,l.createServerReference)("4036c45eb854bbde9ee06cf9db8d3754b3a08030de",l.callServer,void 0,l.findSourceMapURL,"assignSkillAction")},96459:(e,s,t)=>{"use strict";t.d(s,{A:()=>a});var l=t(3680),n=t(30686);function a({items:e,noun:s}){let t=e.length;return(0,l.jsxs)("span",{title:e.join("\n"),className:"inline-flex cursor-help items-center gap-1.5 rounded-md border border-rule-2 bg-hover px-2 py-1 font-mono text-[11px] whitespace-nowrap text-ink-2",children:[(0,l.jsx)(n.c,{size:12,weight:"bold",className:"text-ink-4"}),t," ",s,1!==t?"s":""]})}}},e=>{e.O(0,[3363,8161,7424,370,9836,4964,9775,1065,8724,7358],()=>e(e.s=52033)),_N_E=e.O()}]);
|
package/web/.next/static/chunks/app/onboarding/{page-a4116e2f430eaff8.js → page-f2f04878e81fdf23.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9566],{
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9566],{1517:(e,t,a)=>{"use strict";a.d(t,{default:()=>A});var n=a(3680),r=a(78604),s=a(27540),i=a(14964),l=a(15695),o=a(90808),d=a(64678);let c=(0,d.createServerReference)("00fbc0f1e65e50d169bbf9ac697d5562cd1c92f5f1",d.callServer,void 0,d.findSourceMapURL,"listLlmKeysAction");var u=a(95879),m=a(61178),x=a(89773);let p=(0,d.createServerReference)("0015ae9570da3865f6182796ac321d0c45ba4c11b1",d.callServer,void 0,d.findSourceMapURL,"listSkillsAction");var h=a(80971),f=a(81480),v=a(32588),b=a(74769),g=a(40075),y=a(22163);let k=[{value:"openrouter",label:"OpenRouter",baseUrl:"https://openrouter.ai/api/v1",needsKey:!0},{value:"anthropic",label:"Anthropic (Claude)",baseUrl:"https://api.anthropic.com",needsKey:!0},{value:"openai",label:"OpenAI",baseUrl:"https://api.openai.com/v1",needsKey:!0},{value:"google",label:"Google (Gemini)",baseUrl:"",needsKey:!0},{value:"mistral",label:"Mistral",baseUrl:"https://api.mistral.ai/v1",needsKey:!0},{value:"groq",label:"Groq",baseUrl:"https://api.groq.com/openai/v1",needsKey:!0},{value:"deepseek",label:"DeepSeek",baseUrl:"https://api.deepseek.com",needsKey:!0},{value:"minimax",label:"MiniMax",baseUrl:"",needsKey:!0},{value:"ollama",label:"Ollama (local)",baseUrl:"http://localhost:11434",needsKey:!1},{value:"openai-compatible",label:"Local / OpenAI-compatible (LM Studio, vLLM…)",baseUrl:"http://localhost:1234/v1",needsKey:!1}];function j(e){return[...i.SV[e]??[]].map(e=>({modelId:e.modelId,label:e.label})).sort((e,t)=>e.label.localeCompare(t.label))}let w=["safe-tool-use","verify-before-done","task-planning","language-mirror","markdown-output"],N=`You are a capable personal AI agent working directly for your user inside Nodal-Agents.
|
|
2
2
|
|
|
3
3
|
# Who you are
|
|
4
4
|
Proactive, resourceful, and honest. You own a task end to end: work out what's needed, use your tools, and deliver a concrete result instead of just describing one.
|
|
@@ -23,4 +23,4 @@ Ask these FIVE things, in order, one per message, no extras:
|
|
|
23
23
|
4. Their goal with Nodal-Agents and where you can help most — just the gist, not specifics (you're not doing it now).
|
|
24
24
|
5. While carrying out their requests, whether you should run tools and commands on your own, or check with them for approval before acting.
|
|
25
25
|
|
|
26
|
-
Start now: one short friendly line (you just want to get to know them, no work yet) + question 1 ONLY. After each answer, a 3-5 word acknowledgement at most, then the next question. After the FIFTH answer, one short warm wrap-up line and end that final message with ${S} on its own line.]`;function A(){let e=(0,s.useRouter)(),[t,a]=(0,r.useState)(0),[d,A]=(0,r.useState)(!1),[O,T]=(0,r.useState)(!1),[U,I]=(0,r.useState)("/"),[K,W]=(0,r.useState)(!1);function E(e){I(e),T(!0)}(0,r.useEffect)(()=>{try{let e=Intl.DateTimeFormat().resolvedOptions().timeZone;e&&(0,l.t)({timezone:e})}catch{}},[]),(0,r.useEffect)(()=>{let e=setTimeout(()=>A(3===t),30);return()=>clearTimeout(e)},[t]),(0,r.useEffect)(()=>{if(!O)return;let e=setTimeout(()=>W(!0),60),t=setTimeout(()=>{window.location.href=U},2200);return()=>{clearTimeout(e),clearTimeout(t)}},[O,U]);let[_,$]=(0,r.useState)(k[0]),[q,D]=(0,r.useState)(k[0].baseUrl),[P,Y]=(0,r.useState)(""),[F,B]=(0,r.useState)(j(k[0].value)[0]?.modelId??""),[H,V]=(0,r.useState)("idle"),[z,G]=(0,r.useState)(""),[Q,Z]=(0,r.useState)(!1),[J,X]=(0,r.useState)(null),[ee,et]=(0,r.useState)(""),[ea,en]=(0,r.useState)(""),[er,es]=(0,r.useState)(N),[ei,el]=(0,r.useState)(!1),[eo,ed]=(0,r.useState)(""),[ec,eu]=(0,r.useState)(null),[em,ex]=(0,r.useState)(null),[ep,eh]=(0,r.useState)([]),[ef,eb]=(0,r.useState)(""),[ev,eg]=(0,r.useState)(!1),[ey,ek]=(0,r.useState)(0),ej=(0,r.useRef)(!1),[ew,eN]=(0,r.useState)(!1),[eS,eC]=(0,r.useState)(""),eR=(0,r.useRef)(null),[eA,eM]=(0,r.useState)("propose_confirm"),[eL,eO]=(0,r.useState)(!1),[eT,eU]=(0,r.useState)("");(0,r.useEffect)(()=>{eR.current?.scrollTo({top:eR.current.scrollHeight})},[ep,ev]);let eI=j(_.value);async function eK(){V("testing"),G("");let e=await (0,o.f)({provider:_.value,baseUrl:q||void 0,apiKey:P||void 0});e.ok?(V("ok"),G(e.data.message)):(V("fail"),G(e.message))}async function eW(){if(et(""),_.needsKey&&!P.trim())return void et("This provider needs an API key.");if(!F.trim())return void et("Pick or type a model.");Z(!0);let e=J;if(!e){let t=await c();t.ok&&(e=t.data.find(e=>e.provider===_.value)?.id??null)}if(e){let t=await (0,u.Q)({id:e,provider:_.value,baseUrl:q||void 0,apiKey:P||void 0,isActive:!0});if(Z(!1),!t.ok)return void et(t.message);X(e)}else{let e=await (0,m.L)({provider:_.value,baseUrl:q||void 0,apiKey:P||void 0,isActive:!0});if(Z(!1),!e.ok)return void et(e.message);X(e.data.id)}a(2)}async function eE(){ed("");let t=ea.trim();if(!t)return void ed("Give your agent a name.");if(!F.trim())return void ed("Pick or type a model.");let n=t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,80);el(!0);let r=await (0,x.C)({slug:n||"my-agent",name:t,personality:er.trim(),model:F.trim(),llmKeyId:J??void 0,role:"router"});if(!r.ok){el(!1),ed(r.message);return}eu(r.data.id);let s=await p();if(s.ok)for(let e of s.data.filter(e=>w.includes(e.slug)))await (0,h.f)({skillId:e.id,agentId:r.data.id});el(!1),e.prefetch("/"),e.prefetch("/chat"),a(3)}function e_(e){let t=e.includes(S),a=e.replaceAll(S,"").trim();a&&eh(e=>[...e,{role:"agent",text:a}]),t&&eN(!0)}async function e$(){let e,t,a,n,r=ef.trim();if(!r||!em||ev)return;eb(""),eh(e=>[...e,{role:"user",text:r}]);let s=C[ey];s&&(0,v.M)({fact:`${s.prefix} ${r}`,category:s.category}),ey===C.length-1&&eM((e=r.toLowerCase(),t=/\b(initiative|autonom|proactive|go ahead|do it yourself|on your own|figure it out|don'?t ask|without asking|just do|take the lead|decide)\b/.test(e),a=/\b(ask first|ask me|check with me|confirm|my orders|exactly what|stick to|only what|wait for me|permission|don'?t act)\b/.test(e),n=/\b(mix|balance|depends|middle|both|risky|important|reversible|big|major|dangerous|destructive)\b/.test(e),a&&!t?"propose_confirm":n?"destructive_gate":t&&!a?"fully_autonomous":t&&a?"destructive_gate":"propose_confirm")),ek(e=>e+1),eg(!0);let i=await (0,b.W)({conversationId:em,message:r});(eg(!1),i.ok)?e_(i.data.reply):eC(i.message||"Your agent could not reply just now.")}async function eq(){eU(""),eO(!0);let e=await (0,g.S)({grants:{...i.zw,autonomy:eA}});if(eO(!1),!e.ok){let t=e.message||"Could not save the autonomy level";eU(`${t} — you can set this later in Settings → ROOT agent.`);return}a(6)}(0,r.useEffect)(()=>{4!==t||ej.current||(ej.current=!0,(async()=>{eC(""),eg(!0);let e=await (0,f.Q)();if(!e.ok){eg(!1),eC("Could not start the conversation — you can skip to the dashboard below.");return}ex(e.data.id);let t=await (0,b.W)({conversationId:e.data.id,message:R});if(eg(!1),!t.ok)return eC(t.message||"Your agent could not reply (check the model in Settings). You can skip to the dashboard.");e_(t.data.reply)})())},[t]);let eD=ew||ey>=C.length;return(0,n.jsxs)("div",{className:"flex min-h-screen w-full items-center justify-center bg-canvas px-4 py-10",children:[(0,n.jsxs)("div",{className:"w-full max-w-lg",children:[(0,n.jsx)("div",{className:"mb-7 flex items-center justify-center gap-2",children:Array.from({length:7}).map((e,a)=>(0,n.jsx)("span",{className:`h-1.5 rounded-full transition-all ${a===t?"w-7 bg-ink":a<t?"w-1.5 bg-ink":"w-1.5 bg-rule-2"}`},a))}),(0,n.jsxs)("div",{className:"rounded-2xl border border-rule-2 bg-paper px-7 py-8 shadow-sm",children:[0===t&&(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:"mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-ink text-[22px] text-canvas",children:"◆"}),(0,n.jsx)("h1",{className:"text-[22px] font-semibold tracking-[-0.01em] text-ink",children:"Welcome to Nodal-Agents"}),(0,n.jsx)("p",{className:"mx-auto mt-2 max-w-sm text-[13.5px] leading-[1.6] text-ink-3",children:"Let's set up your first AI agent. It takes about a minute: connect a model, give your agent a personality, and say hello."}),(0,n.jsx)("button",{type:"button",onClick:()=>a(1),className:"mt-6 inline-flex h-[38px] items-center justify-center rounded-md bg-ink px-5 text-[13.5px] font-medium text-canvas transition-[filter] hover:brightness-[0.92]",children:"Get started →"})]}),1===t&&(0,n.jsxs)("div",{children:[(0,n.jsx)(M,{n:1,title:"Connect a model",sub:"The brain your agent thinks with. Your key stays on this machine."}),(0,n.jsx)("label",{className:"mt-5 block text-[12px] font-medium text-ink-3",children:"Provider"}),(0,n.jsx)("select",{value:_.value,onChange:e=>{var t;let a;return t=e.target.value,void($(a=k.find(e=>e.value===t)??k[0]),D(a.baseUrl),V("idle"),G(""),B(j(a.value)[0]?.modelId??""))},className:"mt-1.5 w-full rounded-md border border-rule-2 bg-canvas px-3 py-2 text-[13.5px] text-ink",children:k.map(e=>(0,n.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,n.jsx)("label",{className:"mt-4 block text-[12px] font-medium text-ink-3",children:"Model"}),(0,n.jsx)(L,{providerValue:_.value,model:F,onModel:B}),eI.length>0&&(0,n.jsxs)("p",{className:"mt-1.5 text-[11.5px] text-ink-4",children:[eI.length," supported models for ",_.label,"."]}),(0,n.jsx)("label",{className:"mt-4 block text-[12px] font-medium text-ink-3",children:"Base URL"}),(0,n.jsx)("input",{value:q,onChange:e=>D(e.target.value),placeholder:"https://…",className:"mt-1.5 w-full rounded-md border border-rule-2 bg-canvas px-3 py-2 text-[13.5px] text-ink"}),(0,n.jsxs)("label",{className:"mt-4 block text-[12px] font-medium text-ink-3",children:["API key ",_.needsKey?"":"(optional for local)"]}),(0,n.jsx)("input",{value:P,onChange:e=>Y(e.target.value),type:"password",placeholder:_.needsKey?"sk-…":"leave blank for local",className:"mt-1.5 w-full rounded-md border border-rule-2 bg-canvas px-3 py-2 text-[13.5px] text-ink"}),(0,n.jsxs)("div",{className:"mt-4 flex items-center gap-3",children:[(0,n.jsx)("button",{type:"button",onClick:eK,disabled:"testing"===H,className:"inline-flex h-[34px] items-center rounded-md border border-rule-2 bg-canvas px-3.5 text-[13px] font-medium text-ink transition-colors hover:border-ink disabled:opacity-50",children:"testing"===H?"Connecting…":"Test connection"}),"ok"===H&&(0,n.jsxs)("span",{className:"text-[12.5px] font-medium text-lime-600",children:["✓ ",z]}),"fail"===H&&(0,n.jsx)("span",{className:"text-[12.5px] font-medium text-warn",children:z})]}),ee&&(0,n.jsx)("p",{className:"mt-3 text-[12.5px] text-warn",children:ee}),(0,n.jsxs)("div",{className:"mt-6 flex items-center justify-between",children:[(0,n.jsx)("button",{type:"button",onClick:()=>a(0),className:"text-[13px] text-ink-3 hover:text-ink",children:"← Back"}),(0,n.jsx)("button",{type:"button",onClick:eW,disabled:Q,className:"inline-flex h-[38px] items-center justify-center rounded-md bg-ink px-5 text-[13.5px] font-medium text-canvas transition-[filter] hover:brightness-[0.92] disabled:opacity-50",children:Q?"Saving…":"Continue →"})]})]}),2===t&&(0,n.jsxs)("div",{children:[(0,n.jsx)(M,{n:2,title:"Create your agent",sub:"A name and a personality. It also ships with built-in codes of conduct (safe tool use, verify before done, task planning…)."}),(0,n.jsx)("label",{className:"mt-5 block text-[12px] font-medium text-ink-3",children:"Name"}),(0,n.jsx)("input",{value:ea,onChange:e=>en(e.target.value),placeholder:"e.g. Friday",className:"mt-1.5 w-full rounded-md border border-rule-2 bg-canvas px-3 py-2 text-[13.5px] text-ink"}),(0,n.jsx)("label",{className:"mt-4 block text-[12px] font-medium text-ink-3",children:"Personality"}),(0,n.jsx)("textarea",{value:er,onChange:e=>es(e.target.value),rows:11,className:"mt-1.5 w-full rounded-md border border-rule-2 bg-canvas px-3 py-2 font-mono text-[12px] leading-[1.55] text-ink"}),(0,n.jsx)("label",{className:"mt-4 block text-[12px] font-medium text-ink-3",children:"Model"}),(0,n.jsx)(L,{providerValue:_.value,model:F,onModel:B}),eo&&(0,n.jsx)("p",{className:"mt-3 text-[12.5px] text-warn",children:eo}),(0,n.jsxs)("div",{className:"mt-6 flex items-center justify-between",children:[(0,n.jsx)("button",{type:"button",onClick:()=>a(1),className:"text-[13px] text-ink-3 hover:text-ink",children:"← Back"}),(0,n.jsx)("button",{type:"button",onClick:eE,disabled:ei,className:"inline-flex h-[38px] items-center justify-center rounded-md bg-ink px-5 text-[13.5px] font-medium text-canvas transition-[filter] hover:brightness-[0.92] disabled:opacity-50",children:ei?"Creating…":"Create agent →"})]})]}),3===t&&(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:`mx-auto mb-4 flex h-14 w-14 items-center justify-center rounded-full bg-lime-400/15 text-lime-600 transition-all duration-500 ease-out ${d?"scale-100 opacity-100":"scale-50 opacity-0"}`,children:(0,n.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"h-7 w-7",children:(0,n.jsx)("path",{d:"M4 12.5l5 5 11-11",strokeDasharray:"24",strokeDashoffset:24*!d,style:{transition:"stroke-dashoffset 500ms ease 150ms"}})})}),(0,n.jsxs)("h1",{className:`text-[22px] font-semibold tracking-[-0.01em] text-ink transition-all duration-500 ${d?"translate-y-0 opacity-100":"translate-y-1 opacity-0"}`,children:[ea||"Your agent"," is ready"]}),(0,n.jsxs)("p",{className:"mx-auto mt-2 max-w-sm text-[13.5px] leading-[1.6] text-ink-3",children:["Take a minute to meet ",ea||"your agent"," — a few quick questions so it gets to know you. Or head straight to the dashboard."]}),(0,n.jsxs)("div",{className:"mt-6 flex items-center justify-center gap-3",children:[(0,n.jsx)("button",{type:"button",onClick:()=>E("/"),className:"inline-flex h-[38px] items-center justify-center rounded-md border border-rule-2 bg-canvas px-4 text-[13.5px] font-medium text-ink transition-colors hover:border-ink",children:"Skip to dashboard"}),(0,n.jsxs)("button",{type:"button",onClick:()=>a(4),className:"inline-flex h-[38px] items-center justify-center rounded-md bg-ink px-5 text-[13.5px] font-medium text-canvas transition-[filter] hover:brightness-[0.92]",children:["Meet ",ea||"your agent"," →"]})]})]}),4===t&&(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"font-mono text-[10.5px] tracking-[0.18em] uppercase text-ink-4",children:["Meet ",ea||"your agent"]}),(0,n.jsxs)("div",{ref:eR,className:"mt-3 flex h-[46vh] min-h-[260px] flex-col gap-2.5 overflow-y-auto rounded-lg border border-rule-2 bg-canvas p-3.5",children:[0===ep.length&&!eS&&(0,n.jsxs)("div",{className:"m-auto flex flex-col items-center gap-2.5 text-ink-4",children:[(0,n.jsx)("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-rule-2 border-t-ink"}),(0,n.jsx)("span",{className:"text-[12.5px]",children:"Waking up your agent…"})]}),ep.map((e,t)=>(0,n.jsx)("div",{className:`flex ${"user"===e.role?"justify-end":"justify-start"}`,children:(0,n.jsx)("div",{className:`max-w-[82%] whitespace-pre-wrap rounded-2xl px-3.5 py-2 text-[13px] leading-[1.5] ${"user"===e.role?"bg-ink text-canvas":"border border-rule-2 bg-paper text-ink"}`,children:e.text})},t)),ev&&ep.length>0&&(0,n.jsx)("div",{className:"flex justify-start",children:(0,n.jsxs)("div",{className:"flex items-center gap-1 rounded-2xl border border-rule-2 bg-paper px-3.5 py-3",children:[(0,n.jsx)("span",{className:"h-1.5 w-1.5 animate-bounce rounded-full bg-ink-4 [animation-delay:-0.3s]"}),(0,n.jsx)("span",{className:"h-1.5 w-1.5 animate-bounce rounded-full bg-ink-4 [animation-delay:-0.15s]"}),(0,n.jsx)("span",{className:"h-1.5 w-1.5 animate-bounce rounded-full bg-ink-4"})]})})]}),eS&&(0,n.jsx)("p",{className:"mt-3 text-[12.5px] text-warn",children:eS}),(0,n.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,n.jsx)("input",{value:ef,onChange:e=>eb(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),e$())},disabled:ev||0===ep.length,placeholder:"Type your answer…",className:"h-[38px] flex-1 rounded-md border border-rule-2 bg-canvas px-3 text-[13.5px] text-ink disabled:opacity-50"}),(0,n.jsx)("button",{type:"button",onClick:()=>void e$(),disabled:ev||!ef.trim(),className:"inline-flex h-[38px] items-center justify-center rounded-md bg-ink px-4 text-[13.5px] font-medium text-canvas disabled:opacity-40",children:"Send"})]}),(0,n.jsxs)("div",{className:"mt-3 flex items-center justify-between",children:[(0,n.jsx)("button",{type:"button",onClick:()=>a(5),className:"text-[12.5px] text-ink-3 underline hover:text-ink",children:"Skip for now"}),eD&&(0,n.jsx)("button",{type:"button",onClick:()=>a(5),className:"inline-flex h-[38px] items-center justify-center rounded-md bg-ink px-5 text-[13.5px] font-medium text-canvas transition-[filter] hover:brightness-[0.92]",children:"Continue →"})]})]}),5===t&&(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"font-mono text-[10.5px] tracking-[0.18em] uppercase text-ink-4",children:["How ",ea||"your agent"," should work"]}),(0,n.jsx)("h1",{className:"mt-1 text-[20px] font-semibold tracking-[-0.01em] text-ink",children:"Set the autonomy level"}),(0,n.jsxs)("p",{className:"mt-1.5 text-[13px] leading-[1.5] text-ink-3",children:["Based on what you told ",ea||"your agent",", we've pre-selected a level. Adjust it if you like — it decides whether ",ea||"your agent"," asks you to approve its actions before running them, while carrying out what you ask."]}),(0,n.jsx)("div",{className:"mt-5 flex flex-col gap-2.5",children:y.u.map(e=>{let t=eA===e.value;return(0,n.jsxs)("button",{type:"button",onClick:()=>eM(e.value),className:`rounded-lg border px-4 py-3 text-left transition-colors ${t?"border-ink bg-ink/[0.03]":"border-rule-2 bg-canvas hover:border-ink-4"}`,children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("span",{className:`flex h-4 w-4 shrink-0 items-center justify-center rounded-full border-2 ${t?"border-ink":"border-rule-2"}`,children:t&&(0,n.jsx)("span",{className:"h-2 w-2 rounded-full bg-ink"})}),(0,n.jsx)("span",{className:"text-[13.5px] font-medium text-ink",children:e.name})]}),(0,n.jsx)("p",{className:"mt-1 pl-6 text-[12.5px] leading-[1.5] text-ink-3",children:e.description})]},e.value)})}),(0,n.jsx)("p",{className:"mt-3 text-[11.5px] text-ink-4",children:"You can change this anytime in Settings → Autonomy."}),eT&&(0,n.jsx)("p",{className:"mt-3 text-[12.5px] text-warn",children:eT}),(0,n.jsx)("div",{className:"mt-6 flex items-center justify-end",children:(0,n.jsx)("button",{type:"button",onClick:()=>void eq(),disabled:eL,className:"inline-flex h-[38px] items-center justify-center rounded-md bg-ink px-5 text-[13.5px] font-medium text-canvas transition-[filter] hover:brightness-[0.92] disabled:opacity-50",children:eL?"Saving…":"Continue →"})})]}),6===t&&(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:"mx-auto mb-4 flex h-14 w-14 items-center justify-center rounded-2xl bg-conn-vivid/15 text-[26px]",children:"✈️"}),(0,n.jsx)("h1",{className:"text-[22px] font-semibold tracking-[-0.01em] text-ink",children:"Connect Telegram"}),(0,n.jsxs)("p",{className:"mx-auto mt-2 max-w-sm text-[13.5px] leading-[1.6] text-ink-3",children:["Talk to ",ea||"your agent"," from your phone, and let it reach you with updates and questions — right inside Telegram. You can always set this up later."]}),(0,n.jsxs)("div",{className:"mt-6 flex items-center justify-center gap-3",children:[(0,n.jsx)("button",{type:"button",onClick:()=>E("/"),className:"inline-flex h-[38px] items-center justify-center rounded-md border border-rule-2 bg-canvas px-4 text-[13.5px] font-medium text-ink transition-colors hover:border-ink",children:"Skip for now"}),(0,n.jsx)("button",{type:"button",onClick:()=>E(ec?`/agents/${ec}/telegram`:"/"),className:"inline-flex h-[38px] items-center justify-center rounded-md bg-ink px-5 text-[13.5px] font-medium text-canvas transition-[filter] hover:brightness-[0.92]",children:"Connect Telegram →"})]})]})]})]}),O&&(0,n.jsxs)("div",{className:"fixed inset-0 z-50 flex flex-col items-center justify-center bg-canvas",children:[(0,n.jsxs)("div",{className:"relative mb-6 flex h-20 w-20 items-center justify-center",children:[(0,n.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-2xl bg-ink/10"}),(0,n.jsx)("span",{className:"relative flex h-16 w-16 items-center justify-center rounded-2xl bg-ink text-[30px] text-canvas",children:"◆"})]}),(0,n.jsx)("div",{className:"text-[15px] font-semibold tracking-[-0.01em] text-ink",children:"Entering Nodal-Agents"}),(0,n.jsxs)("div",{className:"mt-1 text-[12.5px] text-ink-3",children:["Waking up ",ea||"your agent","…"]}),(0,n.jsx)("div",{className:"mt-6 h-1 w-52 overflow-hidden rounded-full bg-rule-2",children:(0,n.jsx)("div",{className:`h-full rounded-full bg-ink transition-[width] duration-[2000ms] ease-out ${K?"w-full":"w-0"}`})})]})]})}function M({n:e,title:t,sub:a}){return(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"font-mono text-[10.5px] tracking-[0.18em] uppercase text-ink-4",children:["Step ",e," of 3"]}),(0,n.jsx)("h1",{className:"mt-1 text-[20px] font-semibold tracking-[-0.01em] text-ink",children:t}),(0,n.jsx)("p",{className:"mt-1.5 text-[13px] leading-[1.5] text-ink-3",children:a})]})}function L({providerValue:e,model:t,onModel:a}){let r=i.SV[e]??[];if(0===r.length)return(0,n.jsx)("input",{value:t,onChange:e=>a(e.target.value),placeholder:"e.g. llama3.2 — type your local model name",className:"mt-1.5 w-full rounded-md border border-rule-2 bg-canvas px-3 py-2 text-[13.5px] text-ink"});let s=(0,i.eS)(r);return(0,n.jsx)("select",{value:t,onChange:e=>a(e.target.value),className:"mt-1.5 w-full rounded-md border border-rule-2 bg-canvas px-3 py-2 text-[13.5px] text-ink",children:s.map((e,t)=>e.group?(0,n.jsx)("optgroup",{label:e.group,children:e.models.map(e=>(0,n.jsx)("option",{value:e.modelId,children:e.label},e.modelId))},e.group):e.models.map(e=>(0,n.jsx)("option",{value:e.modelId,children:e.label},`${t}-${e.modelId}`)))})}},64678:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={callServer:function(){return s.callServer},createServerReference:function(){return l.createServerReference},findSourceMapURL:function(){return i.findSourceMapURL}};for(var r in n)Object.defineProperty(t,r,{enumerable:!0,get:n[r]});let s=a(22673),i=a(43145),l=a(87478)},89033:(e,t,a)=>{"use strict";a.d(t,{S:()=>r});var n=a(64678);let r=(0,n.createServerReference)("401a8c70eb32059d795e983061e65b404b48c5bede",n.callServer,void 0,n.findSourceMapURL,"setRootAgentAction")}},e=>{e.O(0,[7424,4964,1065,8724,7358],()=>e(e.s=58959)),_N_E=e.O()}]);
|
|
26
|
+
Start now: one short friendly line (you just want to get to know them, no work yet) + question 1 ONLY. After each answer, a 3-5 word acknowledgement at most, then the next question. After the FIFTH answer, one short warm wrap-up line and end that final message with ${S} on its own line.]`;function A(){let e=(0,s.useRouter)(),[t,a]=(0,r.useState)(0),[d,A]=(0,r.useState)(!1),[O,T]=(0,r.useState)(!1),[U,I]=(0,r.useState)("/"),[K,W]=(0,r.useState)(!1);function E(e){I(e),T(!0)}(0,r.useEffect)(()=>{try{let e=Intl.DateTimeFormat().resolvedOptions().timeZone;e&&(0,l.t)({timezone:e})}catch{}},[]),(0,r.useEffect)(()=>{let e=setTimeout(()=>A(3===t),30);return()=>clearTimeout(e)},[t]),(0,r.useEffect)(()=>{if(!O)return;let e=setTimeout(()=>W(!0),60),t=setTimeout(()=>{window.location.href=U},2200);return()=>{clearTimeout(e),clearTimeout(t)}},[O,U]);let[_,$]=(0,r.useState)(k[0]),[q,D]=(0,r.useState)(k[0].baseUrl),[P,Y]=(0,r.useState)(""),[F,B]=(0,r.useState)(j(k[0].value)[0]?.modelId??""),[H,V]=(0,r.useState)("idle"),[z,G]=(0,r.useState)(""),[Q,Z]=(0,r.useState)(!1),[J,X]=(0,r.useState)(null),[ee,et]=(0,r.useState)(""),[ea,en]=(0,r.useState)(""),[er,es]=(0,r.useState)(N),[ei,el]=(0,r.useState)(!1),[eo,ed]=(0,r.useState)(""),[ec,eu]=(0,r.useState)(null),[em,ex]=(0,r.useState)(null),[ep,eh]=(0,r.useState)([]),[ef,ev]=(0,r.useState)(""),[eb,eg]=(0,r.useState)(!1),[ey,ek]=(0,r.useState)(0),ej=(0,r.useRef)(!1),[ew,eN]=(0,r.useState)(!1),[eS,eC]=(0,r.useState)(""),eR=(0,r.useRef)(null),[eA,eM]=(0,r.useState)("propose_confirm"),[eL,eO]=(0,r.useState)(!1),[eT,eU]=(0,r.useState)("");(0,r.useEffect)(()=>{eR.current?.scrollTo({top:eR.current.scrollHeight})},[ep,eb]);let eI=j(_.value);async function eK(){V("testing"),G("");let e=await (0,o.f)({provider:_.value,baseUrl:q||void 0,apiKey:P||void 0});e.ok?(V("ok"),G(e.data.message)):(V("fail"),G(e.message))}async function eW(){if(et(""),_.needsKey&&!P.trim())return void et("This provider needs an API key.");if(!F.trim())return void et("Pick or type a model.");Z(!0);let e=J;if(!e){let t=await c();t.ok&&(e=t.data.find(e=>e.provider===_.value)?.id??null)}if(e){let t=await (0,u.Q)({id:e,provider:_.value,baseUrl:q||void 0,apiKey:P||void 0,isActive:!0});if(Z(!1),!t.ok)return void et(t.message);X(e)}else{let e=await (0,m.L)({provider:_.value,baseUrl:q||void 0,apiKey:P||void 0,isActive:!0});if(Z(!1),!e.ok)return void et(e.message);X(e.data.id)}a(2)}async function eE(){ed("");let t=ea.trim();if(!t)return void ed("Give your agent a name.");if(!F.trim())return void ed("Pick or type a model.");let n=t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,80);el(!0);let r=await (0,x.C)({slug:n||"my-agent",name:t,personality:er.trim(),model:F.trim(),llmKeyId:J??void 0,role:"router"});if(!r.ok){el(!1),ed(r.message);return}eu(r.data.id);let s=await p();if(s.ok)for(let e of s.data.filter(e=>w.includes(e.slug)))await (0,h.f)({skillId:e.id,agentId:r.data.id});el(!1),e.prefetch("/"),e.prefetch("/chat"),a(3)}function e_(e){let t=e.includes(S),a=e.replaceAll(S,"").trim();a&&eh(e=>[...e,{role:"agent",text:a}]),t&&eN(!0)}async function e$(){let e,t,a,n,r=ef.trim();if(!r||!em||eb)return;ev(""),eh(e=>[...e,{role:"user",text:r}]);let s=C[ey];s&&(0,b.M)({fact:`${s.prefix} ${r}`,category:s.category}),ey===C.length-1&&eM((e=r.toLowerCase(),t=/\b(initiative|autonom|proactive|go ahead|do it yourself|on your own|figure it out|don'?t ask|without asking|just do|take the lead|decide)\b/.test(e),a=/\b(ask first|ask me|check with me|confirm|my orders|exactly what|stick to|only what|wait for me|permission|don'?t act)\b/.test(e),n=/\b(mix|balance|depends|middle|both|risky|important|reversible|big|major|dangerous|destructive)\b/.test(e),a&&!t?"propose_confirm":n?"destructive_gate":t&&!a?"fully_autonomous":t&&a?"destructive_gate":"propose_confirm")),ek(e=>e+1),eg(!0);let i=await (0,v.W)({conversationId:em,message:r});(eg(!1),i.ok)?e_(i.data.reply):eC(i.message||"Your agent could not reply just now.")}async function eq(){eU(""),eO(!0);let e=await (0,g.S)({grants:{...i.zw,autonomy:eA}});if(eO(!1),!e.ok){let t=e.message||"Could not save the autonomy level";eU(`${t} — you can set this later in Settings → ROOT agent.`);return}a(6)}(0,r.useEffect)(()=>{4!==t||ej.current||(ej.current=!0,(async()=>{eC(""),eg(!0);let e=await (0,f.Q)();if(!e.ok){eg(!1),eC("Could not start the conversation — you can skip to the dashboard below.");return}ex(e.data.id);let t=await (0,v.W)({conversationId:e.data.id,message:R});if(eg(!1),!t.ok)return eC(t.message||"Your agent could not reply (check the model in Settings). You can skip to the dashboard.");e_(t.data.reply)})())},[t]);let eD=ew||ey>=C.length;return(0,n.jsxs)("div",{className:"flex min-h-screen w-full items-center justify-center bg-canvas px-4 py-10",children:[(0,n.jsxs)("div",{className:"w-full max-w-lg",children:[(0,n.jsx)("div",{className:"mb-7 flex items-center justify-center gap-2",children:Array.from({length:7}).map((e,a)=>(0,n.jsx)("span",{className:`h-1.5 rounded-full transition-all ${a===t?"w-7 bg-ink":a<t?"w-1.5 bg-ink":"w-1.5 bg-rule-2"}`},a))}),(0,n.jsxs)("div",{className:"rounded-2xl border border-rule-2 bg-paper px-7 py-8 shadow-sm",children:[0===t&&(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:"mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-ink text-[22px] text-canvas",children:"◆"}),(0,n.jsx)("h1",{className:"text-[22px] font-semibold tracking-[-0.01em] text-ink",children:"Welcome to Nodal-Agents"}),(0,n.jsx)("p",{className:"mx-auto mt-2 max-w-sm text-[13.5px] leading-[1.6] text-ink-3",children:"Let's set up your first AI agent. It takes about a minute: connect a model, give your agent a personality, and say hello."}),(0,n.jsx)("button",{type:"button",onClick:()=>a(1),className:"mt-6 inline-flex h-[38px] items-center justify-center rounded-md bg-ink px-5 text-[13.5px] font-medium text-canvas transition-[filter] hover:brightness-[0.92]",children:"Get started →"})]}),1===t&&(0,n.jsxs)("div",{children:[(0,n.jsx)(M,{n:1,title:"Connect a model",sub:"The brain your agent thinks with. Your key stays on this machine."}),(0,n.jsx)("label",{className:"mt-5 block text-[12px] font-medium text-ink-3",children:"Provider"}),(0,n.jsx)("select",{value:_.value,onChange:e=>{var t;let a;return t=e.target.value,void($(a=k.find(e=>e.value===t)??k[0]),D(a.baseUrl),V("idle"),G(""),B(j(a.value)[0]?.modelId??""))},className:"mt-1.5 w-full rounded-md border border-rule-2 bg-canvas px-3 py-2 text-[13.5px] text-ink",children:k.map(e=>(0,n.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,n.jsx)("label",{className:"mt-4 block text-[12px] font-medium text-ink-3",children:"Model"}),(0,n.jsx)(L,{providerValue:_.value,model:F,onModel:B}),eI.length>0&&(0,n.jsxs)("p",{className:"mt-1.5 text-[11.5px] text-ink-4",children:[eI.length," supported models for ",_.label,"."]}),(0,n.jsx)("label",{className:"mt-4 block text-[12px] font-medium text-ink-3",children:"Base URL"}),(0,n.jsx)("input",{value:q,onChange:e=>D(e.target.value),placeholder:"https://…",className:"mt-1.5 w-full rounded-md border border-rule-2 bg-canvas px-3 py-2 text-[13.5px] text-ink"}),(0,n.jsxs)("label",{className:"mt-4 block text-[12px] font-medium text-ink-3",children:["API key ",_.needsKey?"":"(optional for local)"]}),(0,n.jsx)("input",{value:P,onChange:e=>Y(e.target.value),type:"password",placeholder:_.needsKey?"sk-…":"leave blank for local",className:"mt-1.5 w-full rounded-md border border-rule-2 bg-canvas px-3 py-2 text-[13.5px] text-ink"}),(0,n.jsxs)("div",{className:"mt-4 flex items-center gap-3",children:[(0,n.jsx)("button",{type:"button",onClick:eK,disabled:"testing"===H,className:"inline-flex h-[34px] items-center rounded-md border border-rule-2 bg-canvas px-3.5 text-[13px] font-medium text-ink transition-colors hover:border-ink disabled:opacity-50",children:"testing"===H?"Connecting…":"Test connection"}),"ok"===H&&(0,n.jsxs)("span",{className:"text-[12.5px] font-medium text-lime-600",children:["✓ ",z]}),"fail"===H&&(0,n.jsx)("span",{className:"text-[12.5px] font-medium text-warn",children:z})]}),ee&&(0,n.jsx)("p",{className:"mt-3 text-[12.5px] text-warn",children:ee}),(0,n.jsxs)("div",{className:"mt-6 flex items-center justify-between",children:[(0,n.jsx)("button",{type:"button",onClick:()=>a(0),className:"text-[13px] text-ink-3 hover:text-ink",children:"← Back"}),(0,n.jsx)("button",{type:"button",onClick:eW,disabled:Q,className:"inline-flex h-[38px] items-center justify-center rounded-md bg-ink px-5 text-[13.5px] font-medium text-canvas transition-[filter] hover:brightness-[0.92] disabled:opacity-50",children:Q?"Saving…":"Continue →"})]})]}),2===t&&(0,n.jsxs)("div",{children:[(0,n.jsx)(M,{n:2,title:"Create your agent",sub:"A name and a personality. It also ships with built-in codes of conduct (safe tool use, verify before done, task planning…)."}),(0,n.jsx)("label",{className:"mt-5 block text-[12px] font-medium text-ink-3",children:"Name"}),(0,n.jsx)("input",{value:ea,onChange:e=>en(e.target.value),placeholder:"e.g. Friday",className:"mt-1.5 w-full rounded-md border border-rule-2 bg-canvas px-3 py-2 text-[13.5px] text-ink"}),(0,n.jsx)("label",{className:"mt-4 block text-[12px] font-medium text-ink-3",children:"Personality"}),(0,n.jsx)("textarea",{value:er,onChange:e=>es(e.target.value),rows:11,className:"mt-1.5 w-full rounded-md border border-rule-2 bg-canvas px-3 py-2 font-mono text-[12px] leading-[1.55] text-ink"}),(0,n.jsx)("label",{className:"mt-4 block text-[12px] font-medium text-ink-3",children:"Model"}),(0,n.jsx)(L,{providerValue:_.value,model:F,onModel:B}),eo&&(0,n.jsx)("p",{className:"mt-3 text-[12.5px] text-warn",children:eo}),(0,n.jsxs)("div",{className:"mt-6 flex items-center justify-between",children:[(0,n.jsx)("button",{type:"button",onClick:()=>a(1),className:"text-[13px] text-ink-3 hover:text-ink",children:"← Back"}),(0,n.jsx)("button",{type:"button",onClick:eE,disabled:ei,className:"inline-flex h-[38px] items-center justify-center rounded-md bg-ink px-5 text-[13.5px] font-medium text-canvas transition-[filter] hover:brightness-[0.92] disabled:opacity-50",children:ei?"Creating…":"Create agent →"})]})]}),3===t&&(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:`mx-auto mb-4 flex h-14 w-14 items-center justify-center rounded-full bg-lime-400/15 text-lime-600 transition-all duration-500 ease-out ${d?"scale-100 opacity-100":"scale-50 opacity-0"}`,children:(0,n.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"h-7 w-7",children:(0,n.jsx)("path",{d:"M4 12.5l5 5 11-11",strokeDasharray:"24",strokeDashoffset:24*!d,style:{transition:"stroke-dashoffset 500ms ease 150ms"}})})}),(0,n.jsxs)("h1",{className:`text-[22px] font-semibold tracking-[-0.01em] text-ink transition-all duration-500 ${d?"translate-y-0 opacity-100":"translate-y-1 opacity-0"}`,children:[ea||"Your agent"," is ready"]}),(0,n.jsxs)("p",{className:"mx-auto mt-2 max-w-sm text-[13.5px] leading-[1.6] text-ink-3",children:["Take a minute to meet ",ea||"your agent"," — a few quick questions so it gets to know you. Or head straight to the dashboard."]}),(0,n.jsxs)("div",{className:"mt-6 flex items-center justify-center gap-3",children:[(0,n.jsx)("button",{type:"button",onClick:()=>E("/"),className:"inline-flex h-[38px] items-center justify-center rounded-md border border-rule-2 bg-canvas px-4 text-[13.5px] font-medium text-ink transition-colors hover:border-ink",children:"Skip to dashboard"}),(0,n.jsxs)("button",{type:"button",onClick:()=>a(4),className:"inline-flex h-[38px] items-center justify-center rounded-md bg-ink px-5 text-[13.5px] font-medium text-canvas transition-[filter] hover:brightness-[0.92]",children:["Meet ",ea||"your agent"," →"]})]})]}),4===t&&(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"font-mono text-[10.5px] tracking-[0.18em] uppercase text-ink-4",children:["Meet ",ea||"your agent"]}),(0,n.jsxs)("div",{ref:eR,className:"mt-3 flex h-[46vh] min-h-[260px] flex-col gap-2.5 overflow-y-auto rounded-lg border border-rule-2 bg-canvas p-3.5",children:[0===ep.length&&!eS&&(0,n.jsxs)("div",{className:"m-auto flex flex-col items-center gap-2.5 text-ink-4",children:[(0,n.jsx)("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-rule-2 border-t-ink"}),(0,n.jsx)("span",{className:"text-[12.5px]",children:"Waking up your agent…"})]}),ep.map((e,t)=>(0,n.jsx)("div",{className:`flex ${"user"===e.role?"justify-end":"justify-start"}`,children:(0,n.jsx)("div",{className:`max-w-[82%] whitespace-pre-wrap rounded-2xl px-3.5 py-2 text-[13px] leading-[1.5] ${"user"===e.role?"bg-ink text-canvas":"border border-rule-2 bg-paper text-ink"}`,children:e.text})},t)),eb&&ep.length>0&&(0,n.jsx)("div",{className:"flex justify-start",children:(0,n.jsxs)("div",{className:"flex items-center gap-1 rounded-2xl border border-rule-2 bg-paper px-3.5 py-3",children:[(0,n.jsx)("span",{className:"h-1.5 w-1.5 animate-bounce rounded-full bg-ink-4 [animation-delay:-0.3s]"}),(0,n.jsx)("span",{className:"h-1.5 w-1.5 animate-bounce rounded-full bg-ink-4 [animation-delay:-0.15s]"}),(0,n.jsx)("span",{className:"h-1.5 w-1.5 animate-bounce rounded-full bg-ink-4"})]})})]}),eS&&(0,n.jsx)("p",{className:"mt-3 text-[12.5px] text-warn",children:eS}),(0,n.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,n.jsx)("input",{value:ef,onChange:e=>ev(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),e$())},disabled:eb||0===ep.length,placeholder:"Type your answer…",className:"h-[38px] flex-1 rounded-md border border-rule-2 bg-canvas px-3 text-[13.5px] text-ink disabled:opacity-50"}),(0,n.jsx)("button",{type:"button",onClick:()=>void e$(),disabled:eb||!ef.trim(),className:"inline-flex h-[38px] items-center justify-center rounded-md bg-ink px-4 text-[13.5px] font-medium text-canvas disabled:opacity-40",children:"Send"})]}),(0,n.jsxs)("div",{className:"mt-3 flex items-center justify-between",children:[(0,n.jsx)("button",{type:"button",onClick:()=>a(5),className:"text-[12.5px] text-ink-3 underline hover:text-ink",children:"Skip for now"}),eD&&(0,n.jsx)("button",{type:"button",onClick:()=>a(5),className:"inline-flex h-[38px] items-center justify-center rounded-md bg-ink px-5 text-[13.5px] font-medium text-canvas transition-[filter] hover:brightness-[0.92]",children:"Continue →"})]})]}),5===t&&(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"font-mono text-[10.5px] tracking-[0.18em] uppercase text-ink-4",children:["How ",ea||"your agent"," should work"]}),(0,n.jsx)("h1",{className:"mt-1 text-[20px] font-semibold tracking-[-0.01em] text-ink",children:"Set the autonomy level"}),(0,n.jsxs)("p",{className:"mt-1.5 text-[13px] leading-[1.5] text-ink-3",children:["Based on what you told ",ea||"your agent",", we've pre-selected a level. Adjust it if you like — it decides whether ",ea||"your agent"," asks you to approve its actions before running them, while carrying out what you ask."]}),(0,n.jsx)("div",{className:"mt-5 flex flex-col gap-2.5",children:y.u.map(e=>{let t=eA===e.value;return(0,n.jsxs)("button",{type:"button",onClick:()=>eM(e.value),className:`rounded-lg border px-4 py-3 text-left transition-colors ${t?"border-ink bg-ink/[0.03]":"border-rule-2 bg-canvas hover:border-ink-4"}`,children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("span",{className:`flex h-4 w-4 shrink-0 items-center justify-center rounded-full border-2 ${t?"border-ink":"border-rule-2"}`,children:t&&(0,n.jsx)("span",{className:"h-2 w-2 rounded-full bg-ink"})}),(0,n.jsx)("span",{className:"text-[13.5px] font-medium text-ink",children:e.name})]}),(0,n.jsx)("p",{className:"mt-1 pl-6 text-[12.5px] leading-[1.5] text-ink-3",children:e.description})]},e.value)})}),(0,n.jsx)("p",{className:"mt-3 text-[11.5px] text-ink-4",children:"You can change this anytime in Settings → Autonomy."}),eT&&(0,n.jsx)("p",{className:"mt-3 text-[12.5px] text-warn",children:eT}),(0,n.jsx)("div",{className:"mt-6 flex items-center justify-end",children:(0,n.jsx)("button",{type:"button",onClick:()=>void eq(),disabled:eL,className:"inline-flex h-[38px] items-center justify-center rounded-md bg-ink px-5 text-[13.5px] font-medium text-canvas transition-[filter] hover:brightness-[0.92] disabled:opacity-50",children:eL?"Saving…":"Continue →"})})]}),6===t&&(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:"mx-auto mb-4 flex h-14 w-14 items-center justify-center rounded-2xl bg-conn-vivid/15 text-[26px]",children:"✈️"}),(0,n.jsx)("h1",{className:"text-[22px] font-semibold tracking-[-0.01em] text-ink",children:"Connect Telegram"}),(0,n.jsxs)("p",{className:"mx-auto mt-2 max-w-sm text-[13.5px] leading-[1.6] text-ink-3",children:["Talk to ",ea||"your agent"," from your phone, and let it reach you with updates and questions — right inside Telegram. You can always set this up later."]}),(0,n.jsxs)("div",{className:"mt-6 flex items-center justify-center gap-3",children:[(0,n.jsx)("button",{type:"button",onClick:()=>E("/"),className:"inline-flex h-[38px] items-center justify-center rounded-md border border-rule-2 bg-canvas px-4 text-[13.5px] font-medium text-ink transition-colors hover:border-ink",children:"Skip for now"}),(0,n.jsx)("button",{type:"button",onClick:()=>E(ec?`/agents/${ec}/telegram`:"/"),className:"inline-flex h-[38px] items-center justify-center rounded-md bg-ink px-5 text-[13.5px] font-medium text-canvas transition-[filter] hover:brightness-[0.92]",children:"Connect Telegram →"})]})]})]})]}),O&&(0,n.jsxs)("div",{className:"fixed inset-0 z-50 flex flex-col items-center justify-center bg-canvas",children:[(0,n.jsxs)("div",{className:"relative mb-6 flex h-20 w-20 items-center justify-center",children:[(0,n.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-2xl bg-ink/10"}),(0,n.jsx)("span",{className:"relative flex h-16 w-16 items-center justify-center rounded-2xl bg-ink text-[30px] text-canvas",children:"◆"})]}),(0,n.jsx)("div",{className:"text-[15px] font-semibold tracking-[-0.01em] text-ink",children:"Entering Nodal-Agents"}),(0,n.jsxs)("div",{className:"mt-1 text-[12.5px] text-ink-3",children:["Waking up ",ea||"your agent","…"]}),(0,n.jsx)("div",{className:"mt-6 h-1 w-52 overflow-hidden rounded-full bg-rule-2",children:(0,n.jsx)("div",{className:`h-full rounded-full bg-ink transition-[width] duration-[2000ms] ease-out ${K?"w-full":"w-0"}`})})]})]})}function M({n:e,title:t,sub:a}){return(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"font-mono text-[10.5px] tracking-[0.18em] uppercase text-ink-4",children:["Step ",e," of 3"]}),(0,n.jsx)("h1",{className:"mt-1 text-[20px] font-semibold tracking-[-0.01em] text-ink",children:t}),(0,n.jsx)("p",{className:"mt-1.5 text-[13px] leading-[1.5] text-ink-3",children:a})]})}function L({providerValue:e,model:t,onModel:a}){let r=i.SV[e]??[];if(0===r.length)return(0,n.jsx)("input",{value:t,onChange:e=>a(e.target.value),placeholder:"e.g. llama3.2 — type your local model name",className:"mt-1.5 w-full rounded-md border border-rule-2 bg-canvas px-3 py-2 text-[13.5px] text-ink"});let s=(0,i.eS)(r);return(0,n.jsx)("select",{value:t,onChange:e=>a(e.target.value),className:"mt-1.5 w-full rounded-md border border-rule-2 bg-canvas px-3 py-2 text-[13.5px] text-ink",children:s.map((e,t)=>e.group?(0,n.jsx)("optgroup",{label:e.group,children:e.models.map(e=>(0,n.jsx)("option",{value:e.modelId,children:e.label},e.modelId))},e.group):e.models.map(e=>(0,n.jsx)("option",{value:e.modelId,children:e.label},`${t}-${e.modelId}`)))})}},15695:(e,t,a)=>{"use strict";a.d(t,{t:()=>r});var n=a(64678);let r=(0,n.createServerReference)("4004d900812277dfba594d33d54f4bfdb0d3986eda",n.callServer,void 0,n.findSourceMapURL,"setWorkspaceTimezoneAction")},22163:(e,t,a)=>{"use strict";a.d(t,{u:()=>n});let n=[{value:"propose_confirm",name:"Propose & confirm",description:"While doing what you ask, it pauses for your approval before every action: shell commands, skill scripts, connector writes and the ROOT meta-tools (create agent, skill…) all wait in the Approvals queue before running."},{value:"destructive_gate",name:"Autonomous, gate destructive",description:"While doing what you ask, ordinary actions run without interrupting you (normal commands, scripts, meta-tools). But destructive or heavy ones still ask first: deletions, software installs / large downloads, killing processes, disk operations. The sweet spot — no friction for routine work, a checkpoint before anything risky."},{value:"fully_autonomous",name:"Fully autonomous",description:"While doing what you ask, nothing pauses for approval — every command, script and connector action, plus the ROOT meta-tools, run straight through. Only truly catastrophic shell commands (wiping the disk, etc.) still force a confirmation. Maximum power, no friction: use only if you fully trust it."}]},32588:(e,t,a)=>{"use strict";a.d(t,{W:()=>r});var n=a(64678);let r=(0,n.createServerReference)("40162a1eb76527101e735f9d5484ad419dadd50c09",n.callServer,void 0,n.findSourceMapURL,"sendChatMessageAction")},40075:(e,t,a)=>{"use strict";a.d(t,{S:()=>r});var n=a(64678);let r=(0,n.createServerReference)("4002675d03f3a3ae308ea587d0af754f6ab2e91f03",n.callServer,void 0,n.findSourceMapURL,"setRootAgentAction")},58959:(e,t,a)=>{Promise.resolve().then(a.bind(a,1517))},61178:(e,t,a)=>{"use strict";a.d(t,{L:()=>r});var n=a(64678);let r=(0,n.createServerReference)("40b1e80a920ce475113b5fbce89c2494f0599c0318",n.callServer,void 0,n.findSourceMapURL,"createLlmKeyAction")},64678:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={callServer:function(){return s.callServer},createServerReference:function(){return l.createServerReference},findSourceMapURL:function(){return i.findSourceMapURL}};for(var r in n)Object.defineProperty(t,r,{enumerable:!0,get:n[r]});let s=a(22673),i=a(43145),l=a(87478)},74769:(e,t,a)=>{"use strict";a.d(t,{M:()=>r});var n=a(64678);let r=(0,n.createServerReference)("40dcd921ca377eaff29d59be1d9bc43007b1e02f1c",n.callServer,void 0,n.findSourceMapURL,"createMemoryAction")},80971:(e,t,a)=>{"use strict";a.d(t,{f:()=>r});var n=a(64678);let r=(0,n.createServerReference)("4036c45eb854bbde9ee06cf9db8d3754b3a08030de",n.callServer,void 0,n.findSourceMapURL,"assignSkillAction")},81480:(e,t,a)=>{"use strict";a.d(t,{Q:()=>r});var n=a(64678);let r=(0,n.createServerReference)("0027ed0d23cffc13987606629752e123c0419f928c",n.callServer,void 0,n.findSourceMapURL,"createConversationAction")},89773:(e,t,a)=>{"use strict";a.d(t,{C:()=>r});var n=a(64678);let r=(0,n.createServerReference)("40ee1dadf791a661179a364ced1053a3313c55a4eb",n.callServer,void 0,n.findSourceMapURL,"createAgentAction")},90808:(e,t,a)=>{"use strict";a.d(t,{f:()=>r});var n=a(64678);let r=(0,n.createServerReference)("40029d917e83102fc3fe53281772f0f4a67f3c8121",n.callServer,void 0,n.findSourceMapURL,"testLlmKeyAction")},95879:(e,t,a)=>{"use strict";a.d(t,{Q:()=>r});var n=a(64678);let r=(0,n.createServerReference)("40ef217aa9916f074c45a6a7ebe489ade1058eb9ca",n.callServer,void 0,n.findSourceMapURL,"updateLlmKeyAction")}},e=>{e.O(0,[7424,4964,1065,8724,7358],()=>e(e.s=58959)),_N_E=e.O()}]);
|