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.
Files changed (165) hide show
  1. package/cli.js +335 -35
  2. package/migrations/0054_audit2_db_integrity.sql +52 -0
  3. package/migrations/0055_entity_settings.sql +22 -0
  4. package/migrations/0056_agents_skills_entity_scoped_unique.sql +23 -0
  5. package/migrations/0057_telegram_allowed_chats.sql +34 -0
  6. package/migrations/meta/_journal.json +28 -0
  7. package/package.json +1 -1
  8. package/runner.js +47123 -35332
  9. package/web/.next/BUILD_ID +1 -1
  10. package/web/.next/app-path-routes-manifest.json +4 -4
  11. package/web/.next/build-manifest.json +2 -2
  12. package/web/.next/prerender-manifest.json +3 -3
  13. package/web/.next/server/app/(dashboard)/agents/[id]/edit/page.js +3 -3
  14. package/web/.next/server/app/(dashboard)/agents/[id]/edit/page.js.nft.json +1 -1
  15. package/web/.next/server/app/(dashboard)/agents/[id]/edit/page_client-reference-manifest.js +1 -1
  16. package/web/.next/server/app/(dashboard)/agents/[id]/telegram/page.js +2 -2
  17. package/web/.next/server/app/(dashboard)/agents/[id]/telegram/page.js.nft.json +1 -1
  18. package/web/.next/server/app/(dashboard)/agents/[id]/telegram/page_client-reference-manifest.js +1 -1
  19. package/web/.next/server/app/(dashboard)/agents/page.js +2 -2
  20. package/web/.next/server/app/(dashboard)/agents/page.js.nft.json +1 -1
  21. package/web/.next/server/app/(dashboard)/agents/page_client-reference-manifest.js +1 -1
  22. package/web/.next/server/app/(dashboard)/approvals/page.js +2 -2
  23. package/web/.next/server/app/(dashboard)/approvals/page.js.nft.json +1 -1
  24. package/web/.next/server/app/(dashboard)/approvals/page_client-reference-manifest.js +1 -1
  25. package/web/.next/server/app/(dashboard)/automations/page.js +2 -2
  26. package/web/.next/server/app/(dashboard)/automations/page.js.nft.json +1 -1
  27. package/web/.next/server/app/(dashboard)/automations/page_client-reference-manifest.js +1 -1
  28. package/web/.next/server/app/(dashboard)/chat/page.js +2 -2
  29. package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
  30. package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
  31. package/web/.next/server/app/(dashboard)/connectors/page.js +1 -1
  32. package/web/.next/server/app/(dashboard)/connectors/page.js.nft.json +1 -1
  33. package/web/.next/server/app/(dashboard)/connectors/page_client-reference-manifest.js +1 -1
  34. package/web/.next/server/app/(dashboard)/credentials/page.js +1 -1
  35. package/web/.next/server/app/(dashboard)/credentials/page.js.nft.json +1 -1
  36. package/web/.next/server/app/(dashboard)/credentials/page_client-reference-manifest.js +1 -1
  37. package/web/.next/server/app/(dashboard)/jobs/[id]/page.js +2 -2
  38. package/web/.next/server/app/(dashboard)/jobs/[id]/page.js.nft.json +1 -1
  39. package/web/.next/server/app/(dashboard)/jobs/[id]/page_client-reference-manifest.js +1 -1
  40. package/web/.next/server/app/(dashboard)/jobs/page.js +2 -2
  41. package/web/.next/server/app/(dashboard)/jobs/page.js.nft.json +1 -1
  42. package/web/.next/server/app/(dashboard)/jobs/page_client-reference-manifest.js +1 -1
  43. package/web/.next/server/app/(dashboard)/learned-skills/page.js +2 -2
  44. package/web/.next/server/app/(dashboard)/learned-skills/page.js.nft.json +1 -1
  45. package/web/.next/server/app/(dashboard)/learned-skills/page_client-reference-manifest.js +1 -1
  46. package/web/.next/server/app/(dashboard)/llm-providers/page.js +1 -1
  47. package/web/.next/server/app/(dashboard)/llm-providers/page.js.nft.json +1 -1
  48. package/web/.next/server/app/(dashboard)/llm-providers/page_client-reference-manifest.js +1 -1
  49. package/web/.next/server/app/(dashboard)/logs/page.js +2 -2
  50. package/web/.next/server/app/(dashboard)/logs/page.js.nft.json +1 -1
  51. package/web/.next/server/app/(dashboard)/logs/page_client-reference-manifest.js +1 -1
  52. package/web/.next/server/app/(dashboard)/mcp/page.js +2 -2
  53. package/web/.next/server/app/(dashboard)/mcp/page.js.nft.json +1 -1
  54. package/web/.next/server/app/(dashboard)/mcp/page_client-reference-manifest.js +1 -1
  55. package/web/.next/server/app/(dashboard)/memories/page.js +2 -2
  56. package/web/.next/server/app/(dashboard)/memories/page.js.nft.json +1 -1
  57. package/web/.next/server/app/(dashboard)/memories/page_client-reference-manifest.js +1 -1
  58. package/web/.next/server/app/(dashboard)/page.js +2 -2
  59. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  60. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  61. package/web/.next/server/app/(dashboard)/settings/page.js +2 -2
  62. package/web/.next/server/app/(dashboard)/settings/page.js.nft.json +1 -1
  63. package/web/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
  64. package/web/.next/server/app/(dashboard)/settings/root-context/page.js +2 -2
  65. package/web/.next/server/app/(dashboard)/settings/root-context/page.js.nft.json +1 -1
  66. package/web/.next/server/app/(dashboard)/settings/root-context/page_client-reference-manifest.js +1 -1
  67. package/web/.next/server/app/(dashboard)/skills/[id]/edit/page.js +2 -2
  68. package/web/.next/server/app/(dashboard)/skills/[id]/edit/page.js.nft.json +1 -1
  69. package/web/.next/server/app/(dashboard)/skills/[id]/edit/page_client-reference-manifest.js +1 -1
  70. package/web/.next/server/app/(dashboard)/skills/new/page.js +2 -2
  71. package/web/.next/server/app/(dashboard)/skills/new/page.js.nft.json +1 -1
  72. package/web/.next/server/app/(dashboard)/skills/new/page_client-reference-manifest.js +1 -1
  73. package/web/.next/server/app/(dashboard)/skills/page.js +2 -2
  74. package/web/.next/server/app/(dashboard)/skills/page.js.nft.json +1 -1
  75. package/web/.next/server/app/(dashboard)/skills/page_client-reference-manifest.js +1 -1
  76. package/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  77. package/web/.next/server/app/_global-error.html +1 -1
  78. package/web/.next/server/app/_global-error.rsc +2 -2
  79. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +2 -2
  80. package/web/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  81. package/web/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  82. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  83. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +2 -2
  84. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  85. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  86. package/web/.next/server/app/_not-found.html +1 -1
  87. package/web/.next/server/app/_not-found.rsc +3 -3
  88. package/web/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
  89. package/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  90. package/web/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
  91. package/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  92. package/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  93. package/web/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  94. package/web/.next/server/app/api/auth/[...all]/route.js +1 -1
  95. package/web/.next/server/app/api/auth/[...all]/route.js.nft.json +1 -1
  96. package/web/.next/server/app/api/oauth/[provider]/callback/route.js +1 -1
  97. package/web/.next/server/app/api/oauth/[provider]/callback/route.js.nft.json +1 -1
  98. package/web/.next/server/app/api/oauth/[provider]/start/route.js +1 -1
  99. package/web/.next/server/app/api/oauth/[provider]/start/route.js.nft.json +1 -1
  100. package/web/.next/server/app/login/page_client-reference-manifest.js +1 -1
  101. package/web/.next/server/app/onboarding/page.js +205 -185
  102. package/web/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  103. package/web/.next/server/app-paths-manifest.json +4 -4
  104. package/web/.next/server/chunks/2713.js +47 -27
  105. package/web/.next/server/chunks/3223.js +1 -1
  106. package/web/.next/server/chunks/4574.js +1 -1
  107. package/web/.next/server/chunks/5515.js +1 -0
  108. package/web/.next/server/chunks/6468.js +1 -0
  109. package/web/.next/server/chunks/8410.js +1 -0
  110. package/web/.next/server/chunks/{4488.js → 8810.js} +2 -2
  111. package/web/.next/server/chunks/{3154.js → 960.js} +10 -10
  112. package/web/.next/server/middleware-build-manifest.js +1 -1
  113. package/web/.next/server/pages/404.html +1 -1
  114. package/web/.next/server/pages/500.html +1 -1
  115. package/web/.next/server/server-reference-manifest.js +1 -1
  116. package/web/.next/server/server-reference-manifest.json +1 -1
  117. package/web/.next/static/chunks/4964-c6711d3d479b6085.js +1 -0
  118. package/web/.next/static/chunks/{9836-6830cb9d49ad261f.js → 9836-177f6ca2f15ff703.js} +1 -1
  119. package/web/.next/static/chunks/app/(dashboard)/agents/[id]/edit/page-cfce874f4acede5e.js +6 -0
  120. package/web/.next/static/chunks/app/(dashboard)/agents/[id]/telegram/page-9249c2839f551ba1.js +1 -0
  121. package/web/.next/static/chunks/app/(dashboard)/agents/page-7d784d737acedccf.js +1 -0
  122. package/web/.next/static/chunks/app/(dashboard)/approvals/{page-9a01cb723a6ccff0.js → page-b3a838ecbc94a030.js} +1 -1
  123. package/web/.next/static/chunks/app/(dashboard)/automations/page-b1b548de4f52696c.js +1 -0
  124. package/web/.next/static/chunks/app/(dashboard)/chat/{page-a6cc7a58986c0340.js → page-bcf6dcc73b370eb0.js} +1 -1
  125. package/web/.next/static/chunks/app/(dashboard)/connectors/{page-21d6c042800c8cd3.js → page-2c6f913cc6aea4b7.js} +1 -1
  126. package/web/.next/static/chunks/app/(dashboard)/jobs/[id]/page-43f033251eddcc4b.js +1 -0
  127. package/web/.next/static/chunks/app/(dashboard)/jobs/page-1f892f950bb30403.js +1 -0
  128. package/web/.next/static/chunks/app/(dashboard)/layout-e184673151ff8a05.js +1 -0
  129. package/web/.next/static/chunks/app/(dashboard)/learned-skills/page-f873bb6f8539e47e.js +1 -0
  130. package/web/.next/static/chunks/app/(dashboard)/llm-providers/page-64adda30176f4ccb.js +1 -0
  131. package/web/.next/static/chunks/app/(dashboard)/logs/page-79cfd9141c39d8ef.js +1 -0
  132. package/web/.next/static/chunks/app/(dashboard)/mcp/page-d276d7bab25286a1.js +1 -0
  133. package/web/.next/static/chunks/app/(dashboard)/memories/page-c66720494a340503.js +1 -0
  134. package/web/.next/static/chunks/app/(dashboard)/page-3649204dd27a0ad0.js +1 -0
  135. package/web/.next/static/chunks/app/(dashboard)/settings/page-1cab404d2eccfd80.js +1 -0
  136. package/web/.next/static/chunks/app/(dashboard)/settings/root-context/page-b5898c5444f88c9a.js +1 -0
  137. package/web/.next/static/chunks/app/(dashboard)/skills/[id]/edit/page-82d91fc6b6acc161.js +1 -0
  138. package/web/.next/static/chunks/app/(dashboard)/skills/new/page-58b5ed04583ca7d4.js +1 -0
  139. package/web/.next/static/chunks/app/(dashboard)/skills/page-312bd4ae8ddc8114.js +1 -0
  140. package/web/.next/static/chunks/app/onboarding/{page-a4116e2f430eaff8.js → page-f2f04878e81fdf23.js} +2 -2
  141. package/web/.next/static/css/{eff119dd24f92093.css → 4d808b91d7b58fce.css} +1 -1
  142. package/web/.next/server/chunks/4626.js +0 -1
  143. package/web/.next/server/chunks/8971.js +0 -1
  144. package/web/.next/server/chunks/9043.js +0 -1
  145. package/web/.next/static/chunks/4964-08171c654e41b0a4.js +0 -1
  146. package/web/.next/static/chunks/app/(dashboard)/agents/[id]/edit/page-fa5717f0d0450659.js +0 -6
  147. package/web/.next/static/chunks/app/(dashboard)/agents/[id]/telegram/page-73012222871598aa.js +0 -1
  148. package/web/.next/static/chunks/app/(dashboard)/agents/page-7e9616b28c098e9e.js +0 -1
  149. package/web/.next/static/chunks/app/(dashboard)/automations/page-85c985cd687406ed.js +0 -1
  150. package/web/.next/static/chunks/app/(dashboard)/jobs/[id]/page-f6b993a88c70a2fe.js +0 -1
  151. package/web/.next/static/chunks/app/(dashboard)/jobs/page-d0d6b9db1b68451f.js +0 -1
  152. package/web/.next/static/chunks/app/(dashboard)/layout-d2ac2646967496bb.js +0 -1
  153. package/web/.next/static/chunks/app/(dashboard)/learned-skills/page-ec6312f6dfd7ee23.js +0 -1
  154. package/web/.next/static/chunks/app/(dashboard)/llm-providers/page-1fb26463eddf509c.js +0 -1
  155. package/web/.next/static/chunks/app/(dashboard)/logs/page-0bca733315e8a208.js +0 -1
  156. package/web/.next/static/chunks/app/(dashboard)/mcp/page-ff56ecf2f65f5466.js +0 -1
  157. package/web/.next/static/chunks/app/(dashboard)/memories/page-fe4d9438c93750d6.js +0 -1
  158. package/web/.next/static/chunks/app/(dashboard)/page-9402fe2931216f4b.js +0 -1
  159. package/web/.next/static/chunks/app/(dashboard)/settings/page-995662f10ebff365.js +0 -1
  160. package/web/.next/static/chunks/app/(dashboard)/settings/root-context/page-785b6ce3e4c5890b.js +0 -1
  161. package/web/.next/static/chunks/app/(dashboard)/skills/[id]/edit/page-2106201c4df8b5a4.js +0 -1
  162. package/web/.next/static/chunks/app/(dashboard)/skills/new/page-0135bcb86ab60dc2.js +0 -1
  163. package/web/.next/static/chunks/app/(dashboard)/skills/page-54e939d40c8b5b6d.js +0 -1
  164. /package/web/.next/static/{KFac7DQ7gdp9XPQ2bnb-2 → SgnP_MouhUmw0bBf-lUmD}/_buildManifest.js +0 -0
  165. /package/web/.next/static/{KFac7DQ7gdp9XPQ2bnb-2 → SgnP_MouhUmw0bBf-lUmD}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1670],{5977:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});var n=a(78604);let r=n.forwardRef((e,t)=>{let{alt:a,color:r="currentColor",size:o="1em",weight:s="regular",mirrored:l=!1,children:i,weights:c,...d}=e;return n.createElement("svg",{ref:t,xmlns:"http://www.w3.org/2000/svg",width:o,height:o,fill:r,viewBox:"0 0 256 256",transform:l?"scale(-1, 1)":void 0,...d},!!a&&n.createElement("title",null,a),i,c.get(s))});r.displayName="SSRBase"},6057:(e,t,a)=>{"use strict";a.d(t,{v:()=>r});var n=a(3680);function r({label:e,children:t}){return(0,n.jsxs)("div",{className:"mt-3.5 bg-paper border border-rule-2 rounded-[14px] p-5",children:[e&&(0,n.jsx)("div",{className:"text-[14px] leading-none text-ink-3 mb-2.5",children:e}),t]})}},16690:(e,t,a)=>{"use strict";a.d(t,{Q:()=>l});var n=a(78604),r=a(53087);let o=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,28H88A12,12,0,0,0,76,40V76H40A12,12,0,0,0,28,88V216a12,12,0,0,0,12,12H168a12,12,0,0,0,12-12V180h36a12,12,0,0,0,12-12V40A12,12,0,0,0,216,28ZM156,204H52V100H156Zm48-48H180V88a12,12,0,0,0-12-12H100V52H204Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,40V168H168V88H88V40Z",opacity:"0.2"}),n.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32Zm-8,128H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,34H88a6,6,0,0,0-6,6V82H40a6,6,0,0,0-6,6V216a6,6,0,0,0,6,6H168a6,6,0,0,0,6-6V174h42a6,6,0,0,0,6-6V40A6,6,0,0,0,216,34ZM162,210H46V94H162Zm48-48H174V88a6,6,0,0,0-6-6H94V46H210Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,36H88a4,4,0,0,0-4,4V84H40a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H168a4,4,0,0,0,4-4V172h44a4,4,0,0,0,4-4V40A4,4,0,0,0,216,36ZM164,212H44V92H164Zm48-48H172V88a4,4,0,0,0-4-4H92V44H212Z"}))]]),s=n.forwardRef((e,t)=>n.createElement(r.A,{ref:t,...e,weights:o}));s.displayName="CopyIcon";let l=s},18610:(e,t,a)=>{Promise.resolve().then(a.bind(a,68555)),Promise.resolve().then(a.bind(a,96470)),Promise.resolve().then(a.bind(a,28136)),Promise.resolve().then(a.bind(a,61897)),Promise.resolve().then(a.bind(a,35762)),Promise.resolve().then(a.bind(a,54006)),Promise.resolve().then(a.bind(a,96404)),Promise.resolve().then(a.bind(a,88563)),Promise.resolve().then(a.bind(a,81671)),Promise.resolve().then(a.bind(a,64676)),Promise.resolve().then(a.bind(a,11248))},21115:(e,t,a)=>{"use strict";a.d(t,{t:()=>r});var n=a(3680);function r({active:e,onClick:t,name:a,description:o}){return(0,n.jsxs)("div",{role:"radio","aria-checked":e,tabIndex:0,onClick:t,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),t())},className:["flex items-start gap-3.5 px-4 py-3.5 rounded-[10px] border cursor-pointer mb-2 transition-[border-color,background-color] duration-[120ms]",e?"border-conn-vivid bg-conn-vivid/[0.06]":"border-rule-2 bg-paper hover:border-rule"].join(" "),children:[(0,n.jsx)("span",{className:["mt-0.5 flex-shrink-0 w-[18px] h-[18px] rounded-full border-[1.6px] flex items-center justify-center",e?"border-conn-vivid":"border-rule"].join(" "),children:e&&(0,n.jsx)("span",{className:"w-2 h-2 rounded-full bg-conn-vivid"})}),(0,n.jsxs)("span",{className:"flex-1 min-w-0",children:[(0,n.jsx)("span",{className:"block text-[14px] font-medium leading-[1.3] text-ink",children:a}),(0,n.jsx)("span",{className:"block text-[13px] leading-[1.4] text-ink-3 mt-0.5",children:o})]})]})}},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."}]},26675:(e,t,a)=>{"use strict";a.d(t,{F:()=>r});var n=a(64678);let r=(0,n.createServerReference)("40f173b37e96ef868939c5613d89387d926a057ea4",n.callServer,void 0,n.findSourceMapURL,"setInstallNotesAction")},28136:(e,t,a)=>{"use strict";a.d(t,{default:()=>h});var n=a(3680),r=a(78604),o=a(39504),s=a(64678);let l=(0,s.createServerReference)("40679bd9bb515ded07a7b7c88cb2bddbb958bc85d4",s.callServer,void 0,s.findSourceMapURL,"updateNetworkSettingsAction");var i=a(21115),c=a(47091);function d({subtitle:e,url:t}){async function a(){try{await navigator.clipboard.writeText(t),o.oR.success("Copied")}catch{o.oR.error("Could not copy")}}return(0,n.jsxs)("div",{className:"flex items-center gap-3 bg-canvas/40 border border-rule-2 rounded-[9px] px-4 py-3.5 mt-2",children:[(0,n.jsxs)("span",{className:"flex-1 min-w-0",children:[(0,n.jsx)("span",{className:"block text-xs leading-[1.4] text-ink-4",children:e}),(0,n.jsx)("span",{className:"block font-mono text-[14px] leading-[1.4] text-ink tracking-[0.02em] mt-1.5",children:t})]}),(0,n.jsxs)("button",{type:"button",onClick:a,className:"flex-shrink-0 flex items-center gap-1.5 px-2.5 py-1.5 border border-rule text-ink-3 rounded-[7px] text-xs font-medium hover:border-rule-2 hover:text-ink transition-colors",children:[(0,n.jsxs)("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"w-3.5 h-3.5",children:[(0,n.jsx)("rect",{x:"3",y:"3",width:"8",height:"8",rx:"1"}),(0,n.jsx)("rect",{x:"5",y:"5",width:"8",height:"8",rx:"1"})]}),"Copy"]})]})}var m=a(78933),u=a(6057);function h({initial:e}){let[t,a]=(0,r.useState)(e.configuredBind),[s,p]=(0,r.useTransition)(),[x,g]=(0,r.useState)(!1);return(0,n.jsx)("form",{onSubmit:function(e){e.preventDefault(),p(async()=>{let e=await l({bind:t});e.ok?(o.oR.success("Network settings saved"),g(e.data.requiresRestart)):o.oR.error(e.message)})},children:(0,n.jsxs)(u.v,{label:"Network access",children:[(0,n.jsx)(i.t,{active:"loopback"===t,onClick:()=>a("loopback"),name:"Local only (127.0.0.1)",description:"Only this machine can reach the dashboard. No auth required by default."}),(0,n.jsx)(i.t,{active:"lan"===t,onClick:()=>a("lan"),name:"LAN (0.0.0.0) — accessible from your network",description:"Other devices on the same Wi-Fi can reach the dashboard. Sign-in required (local-auth)."}),"lan"===t&&e.lanAddresses.length>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.A,{variant:"info",children:"Any device on the same Wi-Fi can open the dashboard. Combine with email + password auth to avoid unintended access."}),e.lanAddresses.map(t=>{let a=`http://${t}:${e.webPort}`;return(0,n.jsx)(d,{subtitle:"From your phone or another device on the same network, open:",url:a},t)}),(0,n.jsx)("p",{className:"text-[13px] leading-[1.5] text-ink-4 mt-2.5 mx-1",children:"Windows Defender may prompt the first time another device tries to connect — allow access on private networks."}),(0,n.jsx)(c.A,{variant:"warn",children:(0,n.jsxs)("span",{children:[(0,n.jsx)("b",{className:"block font-medium text-ink",children:"LAN exposes this dashboard beyond your machine"}),"Anyone on the same Wi-Fi can attempt to reach the URL above. Keep email + password auth enabled and avoid open / public networks."]})})]}),"lan"===t&&0===e.lanAddresses.length&&(0,n.jsx)(c.A,{variant:"warn",children:"No LAN interface detected. Make sure this machine is connected to a network before enabling LAN access."}),!e.configPathExists&&(0,n.jsxs)(c.A,{variant:"warn",children:[(0,n.jsx)("b",{className:"block font-medium text-ink",children:"Config file missing"}),"~/.nodalai/config.json wasn't found. Save will fail until you've run"," ",(0,n.jsx)("code",{className:"font-mono text-[12px]",children:"nodal-agents init"})," at least once."]}),x&&(0,n.jsxs)(c.A,{variant:"info",title:"Saved. Restart required.",children:["Run ",(0,n.jsx)("code",{className:"font-mono text-[12px]",children:"nodal-agents down && nodal-agents up"})," ","to activate the new network mode."]}),(0,n.jsx)(m.h,{onCancel:function(){a(e.configuredBind),g(!1)},pending:s})]})})}},32928:(e,t,a)=>{"use strict";a.d(t,{e:()=>l});var n=a(78604),r=a(53087);let o=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(r.A,{ref:t,...e,weights:o}));s.displayName="MagnifyingGlassIcon";let l=s},33254:(e,t,a)=>{"use strict";a.d(t,{w:()=>r});var n=a(3680);function r({label:e,lede:t,children:a}){return(0,n.jsxs)("section",{className:"mt-7",children:[(0,n.jsx)("div",{className:"font-mono text-[11px] tracking-[0.18em] uppercase text-ink-4",children:e}),t&&(0,n.jsx)("p",{className:"text-[14px] leading-[1.5] text-ink-3 mt-1.5",children:t}),a]})}},35762:(e,t,a)=>{"use strict";a.d(t,{default:()=>p});var n=a(3680),r=a(78604),o=a(39504),s=a(64678);let l=(0,s.createServerReference)("406fda24563836fc9a76a74aaafd85587b6cef417b",s.callServer,void 0,s.findSourceMapURL,"updateAuthSettingsAction");var i=a(14308),c=a(21115),d=a(47091);function m({name:e,description:t,action:a}){return(0,n.jsxs)("div",{className:"flex items-center gap-3.5 px-4 py-3.5 rounded-[10px] bg-canvas/40 border border-rule-2 mt-2",children:[(0,n.jsxs)("span",{className:"flex-1 min-w-0",children:[(0,n.jsx)("span",{className:"block text-[14px] font-medium leading-[1.3] text-ink",children:e}),(0,n.jsx)("span",{className:"block text-[13px] leading-[1.4] text-ink-3 mt-0.5",children:t})]}),(0,n.jsx)("span",{className:"flex-shrink-0",children:a})]})}var u=a(78933),h=a(6057);function p({initial:e}){let[t,a]=(0,r.useState)(e.configuredMode),[s,x]=(0,r.useState)(!1),[g,b]=(0,r.useTransition)(),[v,f]=(0,r.useState)(!1),[k,w]=(0,r.useState)(!1);return(0,n.jsxs)("form",{onSubmit:function(e){e.preventDefault();let a=new FormData(e.currentTarget);b(async()=>{let e=await l({mode:t,googleClientId:s?a.get("googleClientId"):void 0,googleClientSecret:s?a.get("googleClientSecret"):void 0,clearGoogle:!1});e.ok?(o.oR.success("Auth settings saved"),w(e.data.requiresRestart)):o.oR.error(e.message)})},children:[(0,n.jsxs)(h.v,{label:"Auth mode",children:[(0,n.jsx)(c.t,{active:"local-trust"===t,onClick:()=>a("local-trust"),name:"No auth (local-trust)",description:"Single hardcoded user. Recommended for solo loopback installs."}),(0,n.jsx)(c.t,{active:"local-auth"===t,onClick:()=>a("local-auth"),name:"Email + password (local-auth)",description:"Sign-up + login via better-auth. Optional Google OAuth on top."}),"local-auth"===t&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.A,{variant:"info",children:"Each user signs in with email + password. Sessions are stored in the local DB and can be revoked from this page."}),(0,n.jsx)(m,{name:"Google OAuth",description:e.googleConfigured?"Configured.":"Optional. Add to allow Google sign-in alongside email + password.",action:(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)("button",{type:"button",onClick:()=>x(e=>!e),className:"flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium border border-rule text-ink-3 rounded-[7px] hover:border-rule-2 hover:text-ink transition-colors",children:s?"Hide fields":e.googleConfigured?"Rotate":"Add"}),e.googleConfigured&&(0,n.jsx)("button",{type:"button",onClick:()=>f(!0),disabled:g,className:"px-3 py-1.5 text-xs font-medium border border-warn/40 text-warn rounded-[7px] hover:border-warn hover:bg-warn-bg disabled:opacity-40 transition-colors",children:"Remove"})]})}),s&&(0,n.jsxs)("div",{className:"mt-3 grid grid-cols-1 sm:grid-cols-2 gap-3 px-1",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"block text-xs text-ink-3 mb-1",htmlFor:"google-client-id",children:"Client ID"}),(0,n.jsx)("input",{id:"google-client-id",name:"googleClientId",type:"text",placeholder:"xxx.apps.googleusercontent.com",className:"w-full bg-canvas 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:"google-client-secret",children:"Client secret"}),(0,n.jsx)("input",{id:"google-client-secret",name:"googleClientSecret",type:"password",placeholder:e.googleConfigured?"•••••••• (overwrite)":"",className:"w-full bg-canvas 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)("p",{className:"sm:col-span-2 text-[12px] text-ink-4",children:["Use authorized JavaScript origins"," ",(0,n.jsx)("code",{className:"font-mono",children:"http://localhost:3000"})," and redirect URI"," ",(0,n.jsx)("code",{className:"font-mono",children:"http://localhost:3000/api/auth/callback/google"})," ","in the Google Cloud Console."]})]})]}),!e.configPathExists&&(0,n.jsxs)(d.A,{variant:"warn",children:[(0,n.jsx)("b",{className:"block font-medium text-ink",children:"Config file missing"}),"~/.nodalai/config.json wasn't found. Save will fail until you've run"," ",(0,n.jsx)("code",{className:"font-mono text-[12px]",children:"nodal-agents init"})," at least once."]}),(0,n.jsx)(d.A,{variant:"warn",children:(0,n.jsxs)("span",{children:[(0,n.jsx)("b",{className:"block font-medium text-ink",children:"Switching auth mode signs everyone out"}),"Active sessions are invalidated when the auth mode changes. Make sure you can still sign in with the new method before applying."]})}),k&&(0,n.jsxs)(d.A,{variant:"info",title:"Saved. Restart required.",children:["Run ",(0,n.jsx)("code",{className:"font-mono text-[12px]",children:"nodal-agents down && nodal-agents up"})," ","to activate the new auth mode."]}),(0,n.jsx)(u.h,{onCancel:function(){a(e.configuredMode),x(!1),w(!1)},pending:g})]}),(0,n.jsx)(i.A,{open:v,title:"Remove Google OAuth credentials?",message:"The clientId and clientSecret will be removed from ~/.nodalai/config.json. Users with active Google sessions will need to sign in again with email + password.",confirmLabel:"Remove",onConfirm:function(){f(!1),b(async()=>{let e=await l({mode:t,clearGoogle:!0});e.ok?o.oR.success("Google credentials removed"):o.oR.error(e.message)})},onCancel:()=>f(!1)})]})}},44496:(e,t,a)=>{"use strict";a.d(t,{W:()=>r});var n=a(64678);let r=(0,n.createServerReference)("40a4aa24576354b17648a91aa1f592381a155e25d3",n.callServer,void 0,n.findSourceMapURL,"switchWorkspaceAction")},46819:(e,t,a)=>{"use strict";a.d(t,{t:()=>r});var n=a(64678);let r=(0,n.createServerReference)("4058063eaab019a562bcec2a4f0d4c5416f3786785",n.callServer,void 0,n.findSourceMapURL,"setWorkspaceTimezoneAction")},47091:(e,t,a)=>{"use strict";a.d(t,{A:()=>h});var n=a(3680),r=a(78604),o=a(5977);let s=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M108,84a16,16,0,1,1,16,16A16,16,0,0,1,108,84Zm128,44A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Zm-72,36.68V132a20,20,0,0,0-20-20,12,12,0,0,0-4,23.32V168a20,20,0,0,0,20,20,12,12,0,0,0,4-23.32Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),r.createElement("path",{d:"M144,176a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176Zm88-48A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128ZM124,96a12,12,0,1,0-12-12A12,12,0,0,0,124,96Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-4,48a12,12,0,1,1-12,12A12,12,0,0,1,124,72Zm12,112a16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40a8,8,0,0,1,0,16Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M142,176a6,6,0,0,1-6,6,14,14,0,0,1-14-14V128a2,2,0,0,0-2-2,6,6,0,0,1,0-12,14,14,0,0,1,14,14v40a2,2,0,0,0,2,2A6,6,0,0,1,142,176ZM124,94a10,10,0,1,0-10-10A10,10,0,0,0,124,94Zm106,34A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M140,176a4,4,0,0,1-4,4,12,12,0,0,1-12-12V128a4,4,0,0,0-4-4,4,4,0,0,1,0-8,12,12,0,0,1,12,12v40a4,4,0,0,0,4,4A4,4,0,0,1,140,176ZM124,92a8,8,0,1,0-8-8A8,8,0,0,0,124,92Zm104,36A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"}))]]),l=r.forwardRef((e,t)=>r.createElement(o.A,{ref:t,...e,weights:s}));l.displayName="InfoIcon";var i=a(50131),c=a(97450);let d=r.forwardRef((e,t)=>r.createElement(o.A,{ref:t,...e,weights:c.A}));d.displayName="LightbulbIcon";let m={info:{bg:"bg-run-bg",icon:"text-conn-vivid",iconColor:"text-conn-vivid"},warn:{bg:"bg-warn-bg",icon:"text-skill-vivid",iconColor:"text-skill-vivid"},tip:{bg:"bg-paper border border-rule-2",icon:"text-ink-3",iconColor:"text-ink-3"}},u={info:l,warn:i.N,tip:d};function h({variant:e,title:t,children:a,className:r=""}){let o=m[e],s=u[e];return(0,n.jsxs)("div",{className:`flex items-start gap-2.5 rounded-[9px] px-3.5 py-2.5 text-[13px] leading-[1.5] text-ink-2 ${o.bg} ${r}`,children:[(0,n.jsx)(s,{size:16,weight:"regular",className:`mt-0.5 shrink-0 ${o.iconColor}`}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[t&&(0,n.jsx)("b",{className:"block font-medium text-ink",children:t}),a]})]})}},47883:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});var n=a(78604);let r=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M240.26,186.1,152.81,34.23h0a28.74,28.74,0,0,0-49.62,0L15.74,186.1a27.45,27.45,0,0,0,0,27.71A28.31,28.31,0,0,0,40.55,228h174.9a28.31,28.31,0,0,0,24.79-14.19A27.45,27.45,0,0,0,240.26,186.1Zm-20.8,15.7a4.46,4.46,0,0,1-4,2.2H40.55a4.46,4.46,0,0,1-4-2.2,3.56,3.56,0,0,1,0-3.73L124,46.2a4.77,4.77,0,0,1,8,0l87.44,151.87A3.56,3.56,0,0,1,219.46,201.8ZM116,136V104a12,12,0,0,1,24,0v32a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,176Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M215.46,216H40.54C27.92,216,20,202.79,26.13,192.09L113.59,40.22c6.3-11,22.52-11,28.82,0l87.46,151.87C236,202.79,228.08,216,215.46,216Z",opacity:"0.2"}),n.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM120,104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm8,88a12,12,0,1,1,12-12A12,12,0,0,1,128,192Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M235.07,189.09,147.61,37.22h0a22.75,22.75,0,0,0-39.22,0L20.93,189.09a21.53,21.53,0,0,0,0,21.72A22.35,22.35,0,0,0,40.55,222h174.9a22.35,22.35,0,0,0,19.6-11.19A21.53,21.53,0,0,0,235.07,189.09ZM224.66,204.8a10.46,10.46,0,0,1-9.21,5.2H40.55a10.46,10.46,0,0,1-9.21-5.2,9.51,9.51,0,0,1,0-9.72L118.79,43.21a10.75,10.75,0,0,1,18.42,0l87.46,151.87A9.51,9.51,0,0,1,224.66,204.8ZM122,144V104a6,6,0,0,1,12,0v40a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,180Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M233.34,190.09,145.88,38.22h0a20.75,20.75,0,0,0-35.76,0L22.66,190.09a19.52,19.52,0,0,0,0,19.71A20.36,20.36,0,0,0,40.54,220H215.46a20.36,20.36,0,0,0,17.86-10.2A19.52,19.52,0,0,0,233.34,190.09ZM226.4,205.8a12.47,12.47,0,0,1-10.94,6.2H40.54a12.47,12.47,0,0,1-10.94-6.2,11.45,11.45,0,0,1,0-11.72L117.05,42.21a12.76,12.76,0,0,1,21.9,0L226.4,194.08A11.45,11.45,0,0,1,226.4,205.8ZM124,144V104a4,4,0,0,1,8,0v40a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,180Z"}))]])},50131:(e,t,a)=>{"use strict";a.d(t,{N:()=>l});var n=a(78604),r=a(5977),o=a(47883);let s=n.forwardRef((e,t)=>n.createElement(r.A,{ref:t,...e,weights:o.A}));s.displayName="WarningIcon";let l=s},54006:(e,t,a)=>{"use strict";a.d(t,{default:()=>d});var n=a(3680),r=a(78604),o=a(39504),s=a(46819),l=a(6057),i=a(78933);let c=["Europe/Paris","Europe/London","America/New_York","America/Los_Angeles","America/Sao_Paulo","Asia/Singapore","Asia/Tokyo","Asia/Kolkata","Asia/Dubai","Australia/Sydney","UTC"];function d({initial:e,isExplicit:t}){let[a,m]=(0,r.useState)(e),[u,h]=(0,r.useTransition)(),p=Array.from(new Set([e,...c])),x=(()=>{try{return new Intl.DateTimeFormat("en-GB",{timeZone:a,weekday:"short",hour:"2-digit",minute:"2-digit",hour12:!1}).format(new Date)}catch{return""}})();return(0,n.jsx)("form",{onSubmit:function(e){e.preventDefault(),h(async()=>{let e=await (0,s.t)({timezone:a});e.ok?o.oR.success(`Timezone set to ${a} — agents schedule and read time in this zone.`):o.oR.error(e.message)})},children:(0,n.jsxs)(l.v,{children:[(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsxs)("p",{className:"text-[13px] leading-[1.5] text-ink-3",children:["The timezone your agents use to tell the time and schedule automations. Detected from your browser at setup",t?"":" (currently the server default — set it to be sure)",".",x?` It is currently ${x} there.`:""]}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("input",{list:"tz-options",value:a,onChange:e=>m(e.target.value),placeholder:"e.g. Europe/Paris",className:"w-full rounded-[9px] border border-rule-2 bg-canvas px-3 py-2.5 text-[14px] text-ink placeholder:text-ink-4 focus:outline-none focus:ring-1 focus:ring-ink/20"}),(0,n.jsx)("datalist",{id:"tz-options",children:p.map(e=>(0,n.jsx)("option",{value:e},e))}),(0,n.jsx)("button",{type:"button",onClick:function(){try{let e=Intl.DateTimeFormat().resolvedOptions().timeZone;e&&m(e)}catch{o.oR.error("Could not detect the browser timezone.")}},className:"shrink-0 rounded-[9px] border border-rule-2 px-3 py-2.5 text-[13px] text-ink-2 hover:bg-canvas-2",children:"Detect"})]})]}),(0,n.jsx)(i.h,{onCancel:()=>m(e),pending:u})]})})}},61897:(e,t,a)=>{"use strict";a.d(t,{default:()=>p});var n=a(3680),r=a(78604),o=a(27540),s=a(39504),l=a(89033),i=a(22163),c=a(14964),d=a(33254),m=a(6057),u=a(78933),h=a(21115);function p({agents:e,initialRootAgentId:t,initialGrants:a}){let x=(0,o.useRouter)(),[g,b]=(0,r.useTransition)(),v=e.find(e=>e.id===t)??null,[f,k]=(0,r.useState)(a??c.zw);return(0,n.jsx)(d.w,{label:"ROOT agent",lede:"Your first orchestrator is automatically this workspace's ROOT — the single top-level agent that can manage it (create skills/agents, assign skills) on your behalf. Tune its powers below.",children:null===v?(0,n.jsx)("div",{className:"mt-3.5 rounded-xl border border-rule-2 bg-paper px-[18px] py-4",children:(0,n.jsxs)("p",{className:"text-[14px] text-ink-3",children:["No ROOT agent yet."," ",(0,n.jsx)("a",{href:"/agents",className:"font-medium text-ink underline decoration-rule underline-offset-[3px] hover:decoration-ink-3",children:"Create an orchestrator agent"})," ","— the first one you create becomes this workspace's ROOT automatically."]})}):(0,n.jsx)("form",{onSubmit:function(e){e.preventDefault(),b(async()=>{let e=await (0,l.S)({grants:f});e.ok?(s.oR.success("ROOT agent configuration saved"),x.refresh()):s.oR.error(e.message)})},children:(0,n.jsxs)(m.v,{children:[(0,n.jsxs)("div",{className:"mb-4",children:[(0,n.jsx)("div",{className:"mb-1.5 text-[14px] leading-none text-ink-3",children:"ROOT agent"}),(0,n.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-rule bg-paper px-3 py-2",children:[(0,n.jsx)("span",{className:"text-[14px] font-medium text-ink",children:v.name}),(0,n.jsx)("span",{className:"rounded-full border border-rule-2 px-2 py-0.5 text-[11px] font-medium uppercase tracking-wide text-ink-4",children:"Origin orchestrator"}),(0,n.jsx)("a",{href:"/settings/root-context",className:"ml-auto text-[13px] font-medium text-ink-3 underline decoration-rule underline-offset-[3px] hover:text-ink hover:decoration-ink-3",children:"View & edit context →"})]})]}),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"mb-4",children:[(0,n.jsx)("div",{className:"mb-2 text-[14px] leading-none text-ink-3",children:"Allowed actions"}),(0,n.jsx)("div",{className:"flex flex-col gap-1.5",children:[{key:"createAgent",label:"Create agents"},{key:"updateAgent",label:"Edit agents (model, personality, name)"},{key:"attachAgent",label:"Attach / detach sub-agents"},{key:"createSkill",label:"Create skills"},{key:"updateSkill",label:"Update skills"},{key:"assignSkill",label:"Assign / unassign skills"},{key:"createMcp",label:"Create MCP servers"},{key:"attachMcp",label:"Attach / detach MCP servers"},{key:"createConnector",label:"Create connectors"},{key:"attachConnector",label:"Attach / detach connectors"},{key:"manageSchedules",label:"Manage schedules (create / edit / pause cron)"}].map(({key:e,label:t})=>(0,n.jsxs)("label",{className:"flex cursor-pointer items-center gap-2.5 select-none",children:[(0,n.jsx)("input",{type:"checkbox",checked:f[e],onChange:()=>{k(t=>({...t,[e]:!t[e]}))},disabled:g,className:"h-4 w-4 cursor-pointer rounded border border-rule bg-canvas accent-conn-vivid disabled:opacity-50"}),(0,n.jsx)("span",{className:"text-[14px] text-ink-2",children:t})]},e))})]}),(0,n.jsxs)("div",{className:"mb-1",children:[(0,n.jsx)("div",{className:"mb-2.5 text-[14px] leading-none text-ink-3",children:"Autonomy level"}),(0,n.jsx)("div",{role:"radiogroup","aria-label":"Autonomy level",children:i.u.map(e=>(0,n.jsx)(h.t,{active:f.autonomy===e.value,onClick:()=>{var t;return t=e.value,void k(e=>({...e,autonomy:t}))},name:e.name,description:e.description},e.value))})]})]}),(0,n.jsx)(u.h,{onCancel:function(){k(a??c.zw)},pending:g,saveLabel:"Save"})]})})})}},68555:(e,t,a)=>{"use strict";a.d(t,{default:()=>c});var n=a(3680),r=a(78604),o=a(39504),s=a(26675),l=a(6057),i=a(78933);function c({initial:e}){let[t,a]=(0,r.useState)(e),[d,m]=(0,r.useTransition)();return(0,n.jsx)("form",{onSubmit:function(e){e.preventDefault(),m(async()=>{let e=await (0,s.F)(t);e.ok?o.oR.success("Install notes saved — agents will see them on the next job."):o.oR.error(e.message)})},children:(0,n.jsxs)(l.v,{children:[(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)("p",{className:"text-[13px] leading-[1.5] text-ink-3",children:"These notes are injected into every agent's runtime context and apply live (no restart needed). Use them for machine-specifics the system can't auto-detect — for example: “ComfyUI runs on :8188”, a local GPU, a local API path, or services the agent should call directly."}),(0,n.jsx)("textarea",{value:t,onChange:e=>a(e.target.value),rows:5,maxLength:4e3,placeholder:"e.g. ComfyUI runs on :8188 with no auth. GPU: RTX 4090. Ollama on :11434.",className:"w-full resize-y rounded-[9px] border border-rule-2 bg-canvas px-3 py-2.5 text-[14px] leading-[1.55] text-ink placeholder:text-ink-4 focus:outline-none focus:ring-1 focus:ring-ink/20"}),(0,n.jsxs)("div",{className:"text-right text-[12px] text-ink-4",children:[t.length," / 4000"]})]}),(0,n.jsx)(i.h,{onCancel:function(){a(e)},pending:d})]})})}},69811:(e,t,a)=>{"use strict";a.d(t,{A:()=>o,S:()=>r});var n=a(3680);let r=["\uD83D\uDDC2️","\uD83C\uDFE0","\uD83D\uDCBC","\uD83D\uDE80","\uD83E\uDDEA","\uD83C\uDFA8","\uD83D\uDCCA","\uD83D\uDEE0️","\uD83C\uDF10","⚡","\uD83E\uDD16","\uD83D\uDCE6"];function o({value:e,onChange:t,disabled:a}){return(0,n.jsx)("div",{className:"flex flex-wrap gap-1",children:r.map(r=>{let o=e===r;return(0,n.jsx)("button",{type:"button",disabled:a,"aria-pressed":o,onClick:()=>t(r),className:`flex h-8 w-8 items-center justify-center rounded-md border text-[16px] leading-none transition-colors disabled:opacity-50 ${o?"border-ink bg-hover-2":"border-rule-2 hover:bg-hover"}`,children:r},r)})})}},73340:(e,t,a)=>{"use strict";a.d(t,{O:()=>r});var n=a(64678);let r=(0,n.createServerReference)("4058ff9b5b556469d2162bd3727e7ac8d2c70a501a",n.callServer,void 0,n.findSourceMapURL,"createWorkspaceAction")},78933:(e,t,a)=>{"use strict";a.d(t,{h:()=>r});var n=a(3680);function r({onCancel:e,pending:t,saveLabel:a="Save"}){return(0,n.jsxs)("div",{className:"flex justify-end gap-2 mt-[18px]",children:[(0,n.jsx)("button",{type:"button",onClick:e,className:"h-[34px] px-3.5 rounded-[9px] cursor-pointer bg-paper border border-rule text-[14px] font-medium text-ink-2 hover:bg-hover hover:border-rule-2 transition-colors",children:"Cancel"}),(0,n.jsx)("button",{type:"submit",disabled:t,className:"h-[34px] px-4 rounded-[9px] border-0 cursor-pointer bg-ink text-canvas text-[14px] font-medium hover:brightness-90 disabled:opacity-50 transition-[filter,opacity]",children:t?"Saving…":a})]})}},81671:(e,t,a)=>{"use strict";a.d(t,{default:()=>s});var n=a(3680),r=a(39504),o=a(16690);function s({display:e,value:t,href:a}){async function l(){try{await navigator.clipboard.writeText(t),r.oR.success("Path copied")}catch{r.oR.error("Could not copy")}}let i=(0,n.jsx)("span",{title:t,className:"block truncate rounded-md bg-hover px-2 py-1 font-mono text-[12.5px] text-ink-2",children:e});return(0,n.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,n.jsx)("span",{className:"min-w-0 flex-1",children:a?(0,n.jsx)("a",{href:a,title:t,className:"block min-w-0 hover:opacity-80",children:i}):i}),(0,n.jsxs)("button",{type:"button",onClick:l,title:"Copy full path",className:"inline-flex h-[28px] shrink-0 items-center gap-1.5 rounded-md border border-rule-2 px-2.5 text-[12px] font-medium text-ink-3 transition-colors hover:border-rule hover:text-ink",children:[(0,n.jsx)(o.Q,{size:13})," Copy"]})]})}},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")},96404:(e,t,a)=>{"use strict";a.d(t,{default:()=>f});var n=a(3680),r=a(78604),o=a(27540),s=a(39504),l=a(64678);let i=(0,l.createServerReference)("003af1098fb2ea2815dd2e35d8d89187a071b69280",l.callServer,void 0,l.findSourceMapURL,"listWorkspacesAction");var c=a(73340);let d=(0,l.createServerReference)("405922c2e5048693dc260e7050cbee254aae1dda5c",l.callServer,void 0,l.findSourceMapURL,"renameWorkspaceAction"),m=(0,l.createServerReference)("40dd870fbded89c5d8e8d1688111be85294ff2e2b1",l.callServer,void 0,l.findSourceMapURL,"deleteWorkspaceAction");var u=a(44496),h=a(14308),p=a(33254),x=a(6057),g=a(78933);function b({variant:e,children:t}){return(0,n.jsx)("span",{className:["inline-flex items-center gap-1.5 h-[22px] px-2 rounded-[5px] font-mono font-semibold text-[11px] tracking-[0.08em]","ok"===e?"bg-lime-400/20 text-lime-600 dark:text-lime-300":"bg-orange-500/[0.13] text-orange-700 dark:text-orange-400"].join(" "),children:t})}var v=a(69811);function f({initial:e}){let t=(0,o.useRouter)(),[a,l]=(0,r.useState)(e),[k,w]=(0,r.useState)(""),[A,y]=(0,r.useState)(v.S[0]),[j,N]=(0,r.useTransition)(),[C,Z]=(0,r.useState)(null),[S,M]=(0,r.useState)(""),[E,R]=(0,r.useState)(v.S[0]),[H,V]=(0,r.useTransition)(),[F,L]=(0,r.useState)(null),[O,T]=(0,r.useTransition)();async function P(){let e=await i();e.ok&&l(e.data)}function U(){Z(null),M("")}async function W(e){let a=await (0,u.W)({id:e});a.ok?(await P(),t.refresh()):s.oR.error(a.message)}return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(p.w,{label:"Workspaces",lede:"Manage your workspaces. Each workspace scopes agents, credentials, and data independently.",children:[(0,n.jsx)("div",{className:"mt-3.5 rounded-xl border border-rule-2 bg-paper overflow-hidden",children:0===a.length?(0,n.jsx)("p",{className:"px-[18px] py-4 text-[14px] text-ink-4",children:"No workspaces found."}):a.map(e=>{let a=C===e.id;return(0,n.jsxs)("div",{className:"flex items-center gap-3 px-[18px] py-3.5 border-b border-rule-2 last:border-b-0",children:[(0,n.jsx)("span",{className:"flex h-[28px] w-[28px] shrink-0 items-center justify-center rounded-md border border-rule-2 bg-canvas font-mono text-[14px] leading-none",children:e.icon??e.name.slice(0,1).toUpperCase()}),(0,n.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[a?(0,n.jsxs)("form",{onSubmit:a=>{var n;let r;return n=e.id,a.preventDefault(),void((r=S.trim())&&V(async()=>{let e=await d({id:n,name:r,icon:E});e.ok?(s.oR.success("Workspace updated"),Z(null),await P(),t.refresh()):s.oR.error(e.message)}))},className:"flex flex-col gap-2",children:[(0,n.jsx)(v.A,{value:E,onChange:R,disabled:H}),(0,n.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,n.jsx)("input",{autoFocus:!0,type:"text",value:S,onChange:e=>M(e.target.value),maxLength:60,disabled:H,className:"w-44 rounded-md border border-rule bg-canvas px-2 py-1 text-[13px] text-ink focus:border-ink-3 focus:outline-none"}),(0,n.jsx)("button",{type:"submit",disabled:!S.trim(),className:"rounded-md bg-ink px-2.5 py-1 text-[12px] font-medium text-canvas hover:brightness-90 disabled:opacity-50",children:"Save"}),(0,n.jsx)("button",{type:"button",onClick:U,className:"rounded-md border border-rule px-2 py-1 text-[12px] text-ink-3 hover:border-rule-2 hover:text-ink-2",children:"Cancel"})]})]}):(0,n.jsx)("span",{className:"text-[14px] font-medium text-ink leading-none",children:e.name}),(0,n.jsx)("span",{className:"font-mono text-[11px] text-ink-4 leading-none mt-0.5",children:e.role})]}),(0,n.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[e.active&&(0,n.jsx)(b,{variant:"ok",children:"ACTIVE"}),!e.active&&(0,n.jsx)("button",{type:"button",onClick:()=>W(e.id),className:"rounded-md border border-rule px-2.5 py-1 text-[12px] text-ink-3 hover:border-rule-2 hover:text-ink-2 transition-colors",children:"Switch"}),!a&&(0,n.jsx)("button",{type:"button",onClick:()=>{Z(e.id),M(e.name),R(e.icon??v.S[0])},className:"rounded-md border border-rule px-2.5 py-1 text-[12px] text-ink-3 hover:border-rule-2 hover:text-ink-2 transition-colors",children:"Rename"}),"owner"===e.role&&!e.active&&(0,n.jsx)("button",{type:"button",onClick:()=>L(e),disabled:O,className:"rounded-md border border-rule px-2.5 py-1 text-[12px] text-err hover:border-err/40 hover:bg-err/5 disabled:opacity-50 transition-colors",children:"Delete"})]})]},e.id)})}),(0,n.jsx)("form",{onSubmit:function(e){e.preventDefault();let a=k.trim();a&&N(async()=>{let e=await (0,c.O)({name:a,icon:A});e.ok?(s.oR.success(`Workspace "${a}" created`),w(""),y(v.S[0]),await P(),t.refresh()):s.oR.error(e.message)})},children:(0,n.jsxs)(x.v,{label:"Create workspace",children:[(0,n.jsx)("div",{className:"mb-2",children:(0,n.jsx)(v.A,{value:A,onChange:y,disabled:j})}),(0,n.jsx)("div",{className:"flex gap-2 items-center",children:(0,n.jsx)("input",{type:"text",value:k,onChange:e=>w(e.target.value),placeholder:"Workspace name",maxLength:60,disabled:j,className:"min-w-0 flex-1 rounded-lg border border-rule bg-canvas px-3 py-2 text-[14px] text-ink placeholder:text-ink-4 focus:border-ink-3 focus:outline-none disabled:opacity-50"})}),(0,n.jsx)(g.h,{onCancel:()=>w(""),pending:j,saveLabel:"Create"})]})})]}),(0,n.jsx)(h.A,{open:null!==F,title:"Delete workspace?",message:F?`This will permanently delete "${F.name}" and all its data (agents, jobs, credentials). This cannot be undone.`:"",confirmLabel:"Delete",destructive:!0,onConfirm:function(){if(!F)return;let{id:e,name:a}=F;T(async()=>{L(null);let n=await m({id:e});n.ok?(s.oR.success(`Workspace "${a}" deleted`),await P(),t.refresh()):s.oR.error(n.message)})},onCancel:()=>L(null)})]})}},96470:(e,t,a)=>{"use strict";a.d(t,{default:()=>d});var n=a(3680),r=a(78604),o=a(39504),s=a(64678);let l=(0,s.createServerReference)("402ca1d6c854c9f3f96f34454a3aa76e6a3de9ae52",s.callServer,void 0,s.findSourceMapURL,"setLanCommandYoloAction");var i=a(14308),c=a(47091);function d({initial:e}){let[t,a]=(0,r.useState)(e.lanCommandYolo),[s,m]=(0,r.useState)(!1),[u,h]=(0,r.useTransition)();function p(e){a(e),h(async()=>{let t=await l({enabled:e});t.ok?o.oR.success(e?"Yolo mode enabled for this workspace — agents with the command-execution skill can auto-run commands.":"Yolo mode disabled — commands require approval again."):(o.oR.error(t.message),a(!e))})}let x=!e.isOwner||u;return(0,n.jsxs)("div",{className:"flex items-start gap-4 rounded-xl border border-rule-2 bg-paper px-[18px] py-4",children:[(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("span",{className:"text-[14px] font-medium text-ink",children:"Allow command auto-run (Yolo) in LAN / multi-user mode"}),(0,n.jsx)("span",{className:"inline-flex h-[18px] items-center rounded-full bg-err/10 px-2 font-mono text-[11px] uppercase tracking-[0.1em] text-err",children:"owner only"})]}),(0,n.jsxs)("p",{className:"mt-1 text-[13px] leading-[1.4] text-ink-3",children:["When on, workspace agents with the"," ",(0,n.jsx)("span",{className:"font-medium text-ink-2",children:"command-execution"}),"skill can be set to auto-run shell commands with no per-command approval. The toggle on each agent's Autonomy tab becomes available. Commands are still logged."]}),!e.isOwner&&(0,n.jsx)("p",{className:"mt-2 text-[12px] text-ink-4",children:"Only the workspace owner can change this setting."}),t&&e.isOwner&&(0,n.jsx)(c.A,{variant:"warn",children:(0,n.jsxs)("span",{children:[(0,n.jsx)("b",{className:"block font-medium text-ink",children:"Yolo is enabled — commands run with no approval gate"}),"Any agent in this workspace that has the command-execution skill and Yolo toggled on will execute shell commands immediately. Only agents you fully trust should have this combination."]})})]}),(0,n.jsx)("button",{type:"button",role:"switch","aria-checked":t,disabled:x,onClick:function(){t?p(!1):m(!0)},className:["relative mt-0.5 inline-flex h-[22px] w-[38px] shrink-0 cursor-pointer items-center rounded-full border transition-colors focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",t?"border-err/40 bg-err/20":"border-rule-2 bg-canvas"].join(" "),children:(0,n.jsx)("span",{className:["inline-block h-[16px] w-[16px] rounded-full shadow-sm transition-transform",t?"translate-x-[18px] bg-err":"translate-x-[2px] bg-ink-3"].join(" ")})}),(0,n.jsx)(i.A,{open:s,title:"Enable Yolo mode for this workspace?",message:"This lets any agent in this workspace auto-run shell commands with no approval gate, as long as it has the command-execution skill and Yolo toggled on in its Autonomy tab. Only enable for agents you fully trust. Commands are still logged.",confirmLabel:"Enable Yolo",destructive:!0,onConfirm:()=>{m(!1),p(!0)},onCancel:()=>m(!1)})]})}},97450:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});var n=a(78604);let r=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M180,232a12,12,0,0,1-12,12H88a12,12,0,0,1,0-24h80A12,12,0,0,1,180,232Zm40-128a91.51,91.51,0,0,1-35.17,72.35A12.26,12.26,0,0,0,180,186v2a20,20,0,0,1-20,20H96a20,20,0,0,1-20-20v-2a12,12,0,0,0-4.7-9.51A91.57,91.57,0,0,1,36,104.52C35.73,54.69,76,13.2,125.79,12A92,92,0,0,1,220,104Zm-24,0a68,68,0,0,0-69.65-68C89.56,36.88,59.8,67.55,60,104.38a67.71,67.71,0,0,0,26.1,53.19A35.87,35.87,0,0,1,100,184h56.1A36.13,36.13,0,0,1,170,157.49,67.68,67.68,0,0,0,196,104Zm-20.07-5.32a48.5,48.5,0,0,0-31.91-40,12,12,0,0,0-8,22.62,24.31,24.31,0,0,1,16.09,20,12,12,0,0,0,23.86-2.64Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,104a79.86,79.86,0,0,1-30.59,62.92A24.29,24.29,0,0,0,168,186v6a8,8,0,0,1-8,8H96a8,8,0,0,1-8-8v-6a24.11,24.11,0,0,0-9.3-19A79.87,79.87,0,0,1,48,104.45C47.76,61.09,82.72,25,126.07,24A80,80,0,0,1,208,104Z",opacity:"0.2"}),n.createElement("path",{d:"M176,232a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h80A8,8,0,0,1,176,232Zm40-128a87.55,87.55,0,0,1-33.64,69.21A16.24,16.24,0,0,0,176,186v6a16,16,0,0,1-16,16H96a16,16,0,0,1-16-16v-6a16,16,0,0,0-6.23-12.66A87.59,87.59,0,0,1,40,104.49C39.74,56.83,78.26,17.14,125.88,16A88,88,0,0,1,216,104Zm-16,0a72,72,0,0,0-73.74-72c-39,.92-70.47,33.39-70.26,72.39a71.65,71.65,0,0,0,27.64,56.3A32,32,0,0,1,96,186v6h64v-6a32.15,32.15,0,0,1,12.47-25.35A71.65,71.65,0,0,0,200,104Zm-16.11-9.34a57.6,57.6,0,0,0-46.56-46.55,8,8,0,0,0-2.66,15.78c16.57,2.79,30.63,16.85,33.44,33.45A8,8,0,0,0,176,104a9,9,0,0,0,1.35-.11A8,8,0,0,0,183.89,94.66Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M176,232a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h80A8,8,0,0,1,176,232Zm40-128a87.55,87.55,0,0,1-33.64,69.21A16.24,16.24,0,0,0,176,186v6a16,16,0,0,1-16,16H96a16,16,0,0,1-16-16v-6a16,16,0,0,0-6.23-12.66A87.59,87.59,0,0,1,40,104.49C39.74,56.83,78.26,17.14,125.88,16A88,88,0,0,1,216,104Zm-32.11-9.34a57.6,57.6,0,0,0-46.56-46.55,8,8,0,0,0-2.66,15.78c16.57,2.79,30.63,16.85,33.44,33.45A8,8,0,0,0,176,104a9,9,0,0,0,1.35-.11A8,8,0,0,0,183.89,94.66Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M174,232a6,6,0,0,1-6,6H88a6,6,0,0,1,0-12h80A6,6,0,0,1,174,232Zm40-128a85.56,85.56,0,0,1-32.88,67.64A18.23,18.23,0,0,0,174,186v6a14,14,0,0,1-14,14H96a14,14,0,0,1-14-14v-6a18,18,0,0,0-7-14.23h0a85.59,85.59,0,0,1-33-67.24C41.74,57.91,79.39,19.12,125.93,18A86,86,0,0,1,214,104Zm-12,0a74,74,0,0,0-75.79-74C86.17,31,53.78,64.34,54,104.42a73.67,73.67,0,0,0,28.4,57.87A29.92,29.92,0,0,1,94,186v6a2,2,0,0,0,2,2h64a2,2,0,0,0,2-2v-6a30.18,30.18,0,0,1,11.7-23.78A73.59,73.59,0,0,0,202,104Zm-20.08-9A55.58,55.58,0,0,0,137,50.08a6,6,0,1,0-2,11.84C152.38,64.84,167.13,79.6,170.08,97a6,6,0,0,0,5.91,5,6.87,6.87,0,0,0,1-.08A6,6,0,0,0,181.92,95Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M176,232a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h80A8,8,0,0,1,176,232Zm40-128a87.55,87.55,0,0,1-33.64,69.21A16.24,16.24,0,0,0,176,186v6a16,16,0,0,1-16,16H96a16,16,0,0,1-16-16v-6a16,16,0,0,0-6.23-12.66A87.59,87.59,0,0,1,40,104.49C39.74,56.83,78.26,17.14,125.88,16A88,88,0,0,1,216,104Zm-16,0a72,72,0,0,0-73.74-72c-39,.92-70.47,33.39-70.26,72.39a71.65,71.65,0,0,0,27.64,56.3A32,32,0,0,1,96,186v6h64v-6a32.15,32.15,0,0,1,12.47-25.35A71.65,71.65,0,0,0,200,104Zm-16.11-9.34a57.6,57.6,0,0,0-46.56-46.55,8,8,0,0,0-2.66,15.78c16.57,2.79,30.63,16.85,33.44,33.45A8,8,0,0,0,176,104a9,9,0,0,0,1.35-.11A8,8,0,0,0,183.89,94.66Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M172,232a4,4,0,0,1-4,4H88a4,4,0,0,1,0-8h80A4,4,0,0,1,172,232Zm40-128a83.59,83.59,0,0,1-32.11,66.06A20.2,20.2,0,0,0,172,186v6a12,12,0,0,1-12,12H96a12,12,0,0,1-12-12v-6a20,20,0,0,0-7.76-15.81A83.58,83.58,0,0,1,44,104.47C43.75,59,80.52,21.09,126,20a84,84,0,0,1,86,84Zm-8,0a76,76,0,0,0-77.83-76C85,29,51.77,63.27,52,104.43a75.62,75.62,0,0,0,29.17,59.43A28,28,0,0,1,92,186v6a4,4,0,0,0,4,4h64a4,4,0,0,0,4-4v-6a28.14,28.14,0,0,1,10.94-22.2A75.62,75.62,0,0,0,204,104ZM136.66,52.06a4,4,0,0,0-1.32,7.88C153.53,63,169,78.45,172.06,96.67A4,4,0,0,0,176,100a3.88,3.88,0,0,0,.67-.06,4,4,0,0,0,3.27-4.61A53.51,53.51,0,0,0,136.66,52.06Z"}))]])}},e=>{e.O(0,[3363,8161,7424,9836,4964,1065,8724,7358],()=>e(e.s=18610)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2945],{11248:(e,t,n)=>{"use strict";n.d(t,{default:()=>i});var r=n(3680),s=n(78604),a=n(32895),l=n(97713);function i(){let[e,t]=(0,s.useState)("light"),[n,i]=(0,s.useState)(!1);(0,s.useEffect)(()=>{t("u"<typeof document?"light":"dark"===document.documentElement.getAttribute("data-theme")?"dark":"light"),i(!0)},[]);let o="dark"===e?a.b:l.A,c="dark"===e?"Switch to light theme":"Switch to dark theme";return(0,r.jsx)("button",{type:"button",onClick:()=>{let n="dark"===e?"light":"dark";document.documentElement.setAttribute("data-theme",n);try{localStorage.setItem("nodal.theme",n)}catch{}t(n)},"aria-label":c,title:c,className:"flex h-[34px] w-[34px] items-center justify-center rounded-md border border-rule-2 bg-paper text-ink-2 transition-colors hover:text-ink",suppressHydrationWarning:!0,children:n?(0,r.jsx)(o,{size:15}):(0,r.jsx)(l.A,{size:15})})}},26675:(e,t,n)=>{"use strict";n.d(t,{F:()=>s});var r=n(64678);let s=(0,r.createServerReference)("40f173b37e96ef868939c5613d89387d926a057ea4",r.callServer,void 0,r.findSourceMapURL,"setInstallNotesAction")},32928:(e,t,n)=>{"use strict";n.d(t,{e:()=>i});var r=n(78604),s=n(53087);let a=new Map([["bold",r.createElement(r.Fragment,null,r.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",r.createElement(r.Fragment,null,r.createElement("path",{d:"M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z",opacity:"0.2"}),r.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",r.createElement(r.Fragment,null,r.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",r.createElement(r.Fragment,null,r.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",r.createElement(r.Fragment,null,r.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",r.createElement(r.Fragment,null,r.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"}))]]),l=r.forwardRef((e,t)=>r.createElement(s.A,{ref:t,...e,weights:a}));l.displayName="MagnifyingGlassIcon";let i=l},39186:(e,t,n)=>{"use strict";n.d(t,{ApprovalsProvider:()=>o,e:()=>d});var r=n(3680),s=n(78604),a=n(64678);let l=(0,a.createServerReference)("4091a56ae49f9692f037a27b1733ac3e62709ec8ea",a.callServer,void 0,a.findSourceMapURL,"listApprovalsAction"),i=(0,s.createContext)(null);function o({initial:e,children:t}){let[n,a]=(0,s.useState)(e),c=(0,s.useCallback)(async()=>{let e=await l({status:"pending"});e.ok&&a(e.data.map(e=>({id:e.id,jobId:e.jobId,toolName:e.toolName,agentName:e.agentName,toolInput:e.toolInput,requestedAt:e.requestedAt})))},[]);(0,s.useEffect)(()=>{let e=setInterval(()=>{document.hidden||c()},15e3);function t(){document.hidden||c()}return document.addEventListener("visibilitychange",t),()=>{clearInterval(e),document.removeEventListener("visibilitychange",t)}},[c]);let d=(0,s.useCallback)(()=>{c()},[c]);return(0,r.jsx)(i.Provider,{value:{pending:n,refresh:d},children:t})}let c={pending:[],refresh:()=>{}};function d(){let e=(0,s.useContext)(i);return e||(console.warn("[useApprovals] called outside <ApprovalsProvider> — returning empty state."),c)}},47663:(e,t,n)=>{"use strict";n.d(t,{C:()=>s});var r=n(64678);let s=(0,r.createServerReference)("406589af82ec340355335d69e976a33b4a5205acdc",r.callServer,void 0,r.findSourceMapURL,"resolveApprovalAction")},56947:(e,t,n)=>{Promise.resolve().then(n.bind(n,59713))},59713:(e,t,n)=>{"use strict";n.d(t,{default:()=>v});var r=n(3680),s=n(78604),a=n(63363),l=n.n(a),i=n(39504),o=n(64678);let c=(0,o.createServerReference)("40c5cc9fc2de133991c879d7f4cea5540dc62b7c14",o.callServer,void 0,o.findSourceMapURL,"updateRootPersonalityAction");var d=n(26675),x=n(70876),u=n(93518),p=n(77045),m=n(73868);let h="mt-2 w-full rounded-md border border-rule-2 bg-canvas px-3 py-2.5 font-mono text-[13px] leading-[1.55] text-ink";function f({children:e}){return(0,r.jsx)("div",{className:"font-mono text-[11px] tracking-[0.18em] uppercase text-ink-4",children:e})}function v({rootName:e,systemPrompt:t,personality:n,skills:a,installNotes:o,memories:g}){let[b,k]=(0,s.useState)(n),[j,N]=(0,s.useState)(!1),[y,w]=(0,s.useState)(o),[S,A]=(0,s.useState)(!1),[E,R]=(0,s.useState)(Object.fromEntries(a.map(e=>[e.id,e.content]))),[C,M]=(0,s.useState)(null),[I,L]=(0,s.useState)({}),[Z,$]=(0,s.useState)(g);async function O(){N(!0);let e=await c({personality:b});N(!1),i.oR[e.ok?"success":"error"](e.ok?"Personality saved":e.message)}async function z(){A(!0);let e=await (0,d.F)(y);A(!1),i.oR[e.ok?"success":"error"](e.ok?"Install notes saved":e.message)}async function F(e){M(e.id);let t=await (0,x.R)({id:e.id,name:e.name,description:e.description??void 0,content:E[e.id]??""});M(null),i.oR[t.ok?"success":"error"](t.ok?`Saved "${e.name}"`:t.message)}async function P(e){let t=await (0,u.t)(e);t.ok?($(t=>t.filter(t=>t.id!==e)),i.oR.success("Memory removed")):i.oR.error(t.message)}return(0,r.jsxs)(m.A,{title:"Root context",subtitle:"What the ROOT agent sees every turn.",children:[(0,r.jsx)(l(),{href:"/settings",className:"text-xs text-ink-3 hover:text-ink-2 transition-colors",children:"← Settings"}),e?(0,r.jsxs)("div",{className:"mt-7 flex flex-col gap-9",children:[(0,r.jsxs)("section",{children:[(0,r.jsxs)(f,{children:["Full system prompt — exactly what ",e," receives"]}),(0,r.jsx)("p",{className:"mt-1 text-[13px] text-ink-3",children:"The complete context assembled per turn: identity, personality, runtime, built-in capabilities, workspaces, memory, and every skill. Read-only — edit the pieces below."}),(0,r.jsx)("textarea",{readOnly:!0,value:t,rows:18,className:"mt-2 w-full rounded-md border border-rule-2 bg-canvas px-3 py-2.5 font-mono text-[12px] leading-[1.5] text-ink-2"})]}),(0,r.jsxs)("section",{children:[(0,r.jsx)(f,{children:"Identity & personality"}),(0,r.jsx)("textarea",{value:b,onChange:e=>k(e.target.value),rows:12,className:h}),(0,r.jsx)("div",{className:"mt-2 flex justify-end",children:(0,r.jsx)(p.A,{onClick:O,size:"sm",children:j?"Saving…":"Save personality"})})]}),(0,r.jsxs)("section",{children:[(0,r.jsxs)(f,{children:["Skills (",a.length,")"]}),(0,r.jsx)("p",{className:"mt-1 text-[13px] text-ink-3",children:"Each skill's full markdown is injected into the prompt. Edit here to change how the agent behaves."}),(0,r.jsxs)("div",{className:"mt-3 flex flex-col gap-2.5",children:[a.map(e=>{let t=!!I[e.id];return(0,r.jsxs)("div",{className:"overflow-hidden rounded-xl border border-rule-2 bg-paper",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>L(t=>({...t,[e.id]:!t[e.id]})),className:"flex w-full items-center gap-2 px-4 py-3 text-left hover:bg-hover",children:[(0,r.jsx)("span",{className:"w-3 shrink-0 text-[12px] text-ink-4",children:t?"▾":"▸"}),(0,r.jsx)("span",{className:"shrink-0 text-[14px] font-semibold text-ink",children:e.name}),e.description&&(0,r.jsxs)("span",{className:"min-w-0 truncate text-[13px] text-ink-3",children:["— ",e.description]}),(0,r.jsxs)("span",{className:"ml-auto shrink-0 font-mono text-[11px] text-ink-4",children:[(E[e.id]??"").length," chars"]})]}),t&&(0,r.jsxs)("div",{className:"px-4 pb-4",children:[(0,r.jsx)("textarea",{value:E[e.id]??"",onChange:t=>R(n=>({...n,[e.id]:t.target.value})),rows:12,className:h}),(0,r.jsx)("div",{className:"mt-2 flex justify-end",children:(0,r.jsx)(p.A,{onClick:()=>F(e),size:"sm",children:C===e.id?"Saving…":"Save"})})]})]},e.id)}),0===a.length&&(0,r.jsx)("div",{className:"text-[13px] text-ink-4",children:"No skills attached."})]})]}),(0,r.jsxs)("section",{children:[(0,r.jsx)(f,{children:"Install notes (Runtime block)"}),(0,r.jsx)("p",{className:"mt-1 text-[13px] text-ink-3",children:"Operator notes about this machine (endpoints, model names, paths) — injected into every agent's ## Runtime block."}),(0,r.jsx)("textarea",{value:y,onChange:e=>w(e.target.value),rows:6,placeholder:"e.g. ComfyUI runs on port 8000; substitute models, don't block.",className:h}),(0,r.jsx)("div",{className:"mt-2 flex justify-end",children:(0,r.jsx)(p.A,{onClick:z,size:"sm",children:S?"Saving…":"Save notes"})})]}),(0,r.jsxs)("section",{children:[(0,r.jsxs)(f,{children:["Persistent memory (",Z.length,")"]}),(0,r.jsx)("p",{className:"mt-1 text-[13px] text-ink-3",children:"Durable facts injected into the prompt. Remove anything stale or wrong."}),(0,r.jsxs)("div",{className:"mt-3 flex flex-col gap-2",children:[Z.map(e=>(0,r.jsxs)("div",{className:"flex items-start gap-3 rounded-lg border border-rule-2 bg-paper px-3.5 py-2.5",children:[(0,r.jsx)("span",{className:"mt-0.5 shrink-0 rounded bg-conn-vivid/12 px-1.5 py-0.5 font-mono text-[11px] uppercase tracking-wide text-ink-3",children:e.category}),(0,r.jsx)("span",{className:"min-w-0 flex-1 text-[14px] leading-[1.5] text-ink",children:e.fact}),(0,r.jsx)("button",{type:"button",onClick:()=>P(e.id),className:"shrink-0 text-[13px] text-ink-3 transition-colors hover:text-warn",children:"Remove"})]},e.id)),0===Z.length&&(0,r.jsx)("div",{className:"text-[13px] text-ink-4",children:"No memories yet."})]})]})]}):(0,r.jsx)("div",{className:"mt-6 rounded-xl border border-rule-2 bg-paper p-5 text-[14px] text-ink-3",children:"No ROOT agent yet. Create your first agent — the workspace's origin orchestrator becomes the ROOT."})]})}},64676:(e,t,n)=>{"use strict";n.d(t,{default:()=>l});var r=n(3680),s=n(32928),a=n(78604);function l({placeholder:e="Search agents, skills, runs…",keyboardShortcut:t=!0,onSubmit:n,className:i=""}){let o=(0,a.useRef)(null);return(0,a.useEffect)(()=>{if(!t)return;let e=e=>{if("/"!==e.key)return;let t=e.target;t&&/^(input|textarea|select)$/i.test(t.tagName)||t?.isContentEditable||(e.preventDefault(),o.current?.focus())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[t]),(0,r.jsxs)("form",{onSubmit:e=>{e.preventDefault(),n?.(o.current?.value??"")},className:`flex h-[34px] min-w-[280px] items-center gap-2 rounded-md border border-rule-2 bg-paper px-3 text-[13px] text-ink-4 ${i}`,children:[(0,r.jsx)(s.e,{size:13,className:"shrink-0"}),(0,r.jsx)("input",{ref:o,type:"search",placeholder:e,className:"flex-1 border-0 bg-transparent text-[14px] leading-none text-ink outline-none placeholder:text-ink-4"}),(0,r.jsx)("span",{className:"rounded-[5px] border border-rule bg-black/5 px-1.5 py-[1px] font-mono text-[12px] leading-none text-ink-4 dark:bg-white/[0.06]",children:"/"})]})}},70876:(e,t,n)=>{"use strict";n.d(t,{R:()=>s});var r=n(64678);let s=(0,r.createServerReference)("40b5a729e2b6d64e9e74b17ca364f38200ee022bc5",r.callServer,void 0,r.findSourceMapURL,"updateSkillAction")},73868:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(3680),s=n(64676),a=n(11248),l=n(88563);function i({title:e,subtitle:t}){return(0,r.jsxs)("header",{className:"flex items-center justify-between gap-4 border-b border-rule-2 px-5 pt-5 pb-4 sm:px-8 lg:px-9",children:[(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsx)("h1",{className:"text-[28px] leading-[1.15] font-semibold tracking-[-0.015em] text-ink",children:e}),t&&(0,r.jsx)("p",{className:"mt-1.5 text-[14px] leading-[1.5] text-ink-3",children:t})]}),(0,r.jsxs)("div",{className:"hidden shrink-0 items-center gap-2 lg:flex",children:[(0,r.jsx)(s.default,{className:"hidden md:flex"}),(0,r.jsx)(l.default,{}),(0,r.jsx)(a.default,{})]})]})}function o({title:e,subtitle:t,toolbar:n,children:s,fluid:a=!1,bodyClassName:l=""}){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i,{title:e,subtitle:t}),(0,r.jsxs)("div",{className:`px-5 pt-6 pb-10 sm:px-8 lg:px-9 ${a?"":"max-w-6xl"} ${l}`,children:[n&&(0,r.jsx)("div",{className:"mb-5",children:n}),s]})]})}},77045:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(3680),s=n(63363),a=n.n(s);let l={ink:"bg-ink text-canvas border-0 hover:brightness-[0.92]",agent:"bg-agent-vivid text-[#1a2200] border-0 hover:brightness-[0.96]",coral:"bg-skill-vivid text-white border-0 hover:brightness-[0.94]",blue:"bg-conn-vivid text-white border-0 hover:brightness-[0.94]",neutral:"border border-rule-2 bg-paper text-ink hover:bg-hover"};function i(e){let{children:t,variant:n="ink",size:s="md",className:i=""}=e,o=`inline-flex cursor-pointer items-center justify-center gap-1.5 rounded-md font-medium leading-none transition-[filter,background-color] ${"md"===s?"h-[34px] px-3.5 text-[14px]":"h-[30px] px-3 text-[13px]"} ${l[n]} ${i}`;if("href"in e&&e.href){let{href:n,variant:s,size:l,className:i,children:c,...d}=e;return(0,r.jsx)(a(),{href:n,className:o,...d,children:t})}let{variant:c,size:d,className:x,children:u,...p}=e;return(0,r.jsx)("button",{type:"button",className:o,...p,children:t})}},88563:(e,t,n)=>{"use strict";n.d(t,{default:()=>p});var r=n(3680),s=n(78604),a=n(63363),l=n.n(a),i=n(7101),o=n(39504),c=n(47663),d=n(39186);function x({item:e,onApproved:t}){let[n,a]=(0,s.useTransition)();return(0,r.jsx)("button",{type:"button",onClick:n=>{n.preventDefault(),n.stopPropagation(),a(async()=>{let n=await (0,c.C)({approvalRequestId:e.id,decision:"approve"});n.ok?(o.oR.success("Approved"),t()):o.oR.error(n.message)})},disabled:n,className:"shrink-0 rounded-md bg-ok px-2.5 py-1 text-[12px] font-semibold text-canvas transition-[filter] hover:brightness-[0.92] disabled:opacity-40",children:n?"…":"Approve"})}function u({items:e,onClose:t,onApproved:n}){let a=(0,s.useRef)(null);return(0,s.useEffect)(()=>{function e(e){a.current&&!a.current.contains(e.target)&&t()}return document.addEventListener("pointerdown",e),()=>document.removeEventListener("pointerdown",e)},[t]),(0,s.useEffect)(()=>{function e(e){"Escape"===e.key&&t()}return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[t]),(0,r.jsxs)("div",{ref:a,className:"absolute right-0 top-full z-50 mt-1.5 w-[340px] rounded-xl border border-rule-2 bg-paper shadow-lg",role:"dialog","aria-label":"Pending approvals",children:[(0,r.jsx)("div",{className:"border-b border-rule-2 px-4 py-3",children:(0,r.jsxs)("p",{className:"text-[14px] font-semibold text-ink",children:["Pending approvals (",e.length,")"]})}),0===e.length?(0,r.jsx)("p",{className:"px-4 py-5 text-center text-[13px] text-ink-3",children:"No pending approvals."}):(0,r.jsx)("ul",{className:"max-h-[340px] divide-y divide-rule-2 overflow-y-auto",children:e.map(e=>(0,r.jsx)("li",{children:(0,r.jsxs)(l(),{href:`/jobs/${e.jobId}`,onClick:t,className:"flex items-start gap-3 px-4 py-3 transition-colors hover:bg-hover",children:[(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsxs)("p",{className:"truncate text-[13px] font-medium text-ink",children:[e.agentName??"Agent",(0,r.jsx)("span",{className:"mx-1 text-ink-4",children:"\xb7"}),(0,r.jsx)("code",{className:"rounded bg-canvas px-1 py-0.5 font-mono text-[12px] text-ink-2",children:e.toolName})]}),(0,r.jsx)("p",{className:"mt-0.5 truncate text-[12px] text-ink-3",children:function(e){if(!e)return"—";if("string"==typeof e.purpose&&e.purpose.trim()){let t=e.purpose.trim();return t.length>80?t.slice(0,77)+"…":t}if("string"==typeof e.command){let t=e.command;return t.length>60?t.slice(0,57)+"…":t}let t=JSON.stringify(e);return t.length>60?t.slice(0,57)+"…":t}(e.toolInput)}),(0,r.jsx)("p",{className:"mt-0.5 text-[11px] text-ink-4",children:function(e){if(!e)return"—";let t=Math.floor((Date.now()-new Date(e).getTime())/1e3);if(t<60)return`${t}s ago`;let n=Math.floor(t/60);if(n<60)return`${n}m ago`;let r=Math.floor(n/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}(e.requestedAt)})]}),(0,r.jsx)(x,{item:e,onApproved:n})]})},e.id))}),(0,r.jsx)("div",{className:"border-t border-rule-2 px-4 py-2.5",children:(0,r.jsx)(l(),{href:"/approvals",onClick:t,className:"text-[13px] font-medium text-ink-2 transition-colors hover:text-ink",children:"See all approvals →"})})]})}function p(){let{pending:e,refresh:t}=(0,d.e)(),[n,a]=(0,s.useState)(!1),l=(0,s.useRef)(null),o=e.length,c=(0,s.useCallback)(()=>a(!1),[]),x=(0,s.useCallback)(()=>a(e=>!e),[]),p=(0,s.useCallback)(()=>{t()},[t]);return(0,r.jsxs)("div",{ref:l,className:"relative",children:[(0,r.jsxs)("button",{type:"button","aria-label":"Notifications",title:"Notifications",onClick:x,className:"relative flex h-[34px] w-[34px] shrink-0 items-center justify-center rounded-md border border-rule-2 bg-paper text-ink-2 transition-colors hover:text-ink",children:[(0,r.jsx)(i.I,{size:15}),o>0&&(0,r.jsx)("span",{className:"absolute -top-1 -right-1 flex h-4 min-w-[16px] items-center justify-center rounded-full bg-err px-1 text-[11px] font-bold leading-none text-canvas",children:o>99?"99+":o})]}),n&&(0,r.jsx)(u,{items:e,onClose:c,onApproved:p})]})}},93518:(e,t,n)=>{"use strict";n.d(t,{t:()=>s});var r=n(64678);let s=(0,r.createServerReference)("40d01399a20d83ff16f6caafa35588cf2a0c558a2a",r.callServer,void 0,r.findSourceMapURL,"deleteMemoryAction")}},e=>{e.O(0,[3363,8161,1065,8724,7358],()=>e(e.s=56947)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[694],{22721:(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)("400fca191a94e63b7e7b8a3b20ca1d1efe13175b6c",i.callServer,void 0,i.findSourceMapURL,"resetSkillToDefaultAction");var d=l(70876);let c=(0,i.createServerReference)("4098fedc9bccfcb345d86e07ffcbc1fe5cb0db9aab",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"})]})]})}},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},53404:(e,t,l)=>{Promise.resolve().then(l.bind(l,22721)),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))},70876:(e,t,l)=>{"use strict";l.d(t,{R:()=>a});var n=l(64678);let a=(0,n.createServerReference)("40b5a729e2b6d64e9e74b17ca364f38200ee022bc5",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()}]);
@@ -1 +0,0 @@
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"},22721:(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)("400fca191a94e63b7e7b8a3b20ca1d1efe13175b6c",i.callServer,void 0,i.findSourceMapURL,"resetSkillToDefaultAction");var d=l(70876);let c=(0,i.createServerReference)("4098fedc9bccfcb345d86e07ffcbc1fe5cb0db9aab",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,b]=(0,n.useTransition)(),[p,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};b(async()=>{let e=await (0,d.R)(t);e.ok?(s.oR.success("Skill updated"),l.push("/skills")):s.oR.error(e.message)})}else b(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: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 a=e.initial.id;x(!1),b(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"})]})]})}},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},54465:(e,t,l)=>{Promise.resolve().then(l.bind(l,22721)),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))},70876:(e,t,l)=>{"use strict";l.d(t,{R:()=>n});var a=l(64678);let n=(0,a.createServerReference)("40b5a729e2b6d64e9e74b17ca364f38200ee022bc5",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()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8141],{38159:(e,s,t)=>{"use strict";t.d(s,{f:()=>n});var l=t(64678);let n=(0,l.createServerReference)("4056a53c1a88bd3360e09feb50931ded6515d71fc1",l.callServer,void 0,l.findSourceMapURL,"assignSkillAction")},52033:(e,s,t)=>{Promise.resolve().then(t.bind(t,88453))},88453:(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)("40e4f6e6802428941909c2d2ca74a62cc282cd10be",v.callServer,void 0,v.findSourceMapURL,"deleteSkillAction"),y=(0,v.createServerReference)("40261cbfbf57957c5512ffb45890d992584d11a42a",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)("400508ecdb21739070a8d0d26dcf75cecf1bafad36",v.callServer,void 0,v.findSourceMapURL,"unassignSkillAction");var L=t(38159),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)("406a1f2c216816293a20bf6ac0af62408987c0f1e9",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})]})}},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()}]);