plexus-agent-config 0.0.3 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +0 -0
- package/package.json +10 -4
- package/vendor/plexus-agent-config-core/package.json +3 -3
- package/vendor/plexus-agent-config-web/.next/BUILD_ID +1 -1
- package/vendor/plexus-agent-config-web/.next/app-path-routes-manifest.json +3 -3
- package/vendor/plexus-agent-config-web/.next/build-manifest.json +6 -6
- package/vendor/plexus-agent-config-web/.next/next-server.js.nft.json +1 -1
- package/vendor/plexus-agent-config-web/.next/prerender-manifest.json +3 -3
- package/vendor/plexus-agent-config-web/.next/required-server-files.js +4 -4
- package/vendor/plexus-agent-config-web/.next/required-server-files.json +4 -4
- package/vendor/plexus-agent-config-web/.next/server/app/_global-error/page.js +3 -3
- package/vendor/plexus-agent-config-web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/_global-error.html +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/_global-error.rsc +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/_not-found/page.js +2 -2
- package/vendor/plexus-agent-config-web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/about/page.js +2 -2
- package/vendor/plexus-agent-config-web/.next/server/app/about/page.js.nft.json +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/about/page_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/agents/[id]/page.js +2 -2
- package/vendor/plexus-agent-config-web/.next/server/app/agents/[id]/page.js.nft.json +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/agents/[id]/page_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/agent/[id]/file/route.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/agent/[id]/file/route_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/agent/[id]/route.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/agent/[id]/route_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/agent-catalog/route.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/agent-catalog/route_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/agents/route.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/agents/route_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/backups/[id]/restore/route.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/backups/[id]/restore/route_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/backups/route.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/backups/route_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/config/route.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/config/route_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/custom-agents/[id]/file/route.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/custom-agents/[id]/file/route_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/custom-agents/[id]/route.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/custom-agents/[id]/route_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/custom-agents/route.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/custom-agents/route_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/debug/route.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/debug/route_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/import/route.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/import/route_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/mcp/[id]/toggle/route.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/mcp/[id]/toggle/route_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/mcp/effective/route.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/mcp/effective/route_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/mcp/route.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/mcp/route_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/rules/route.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/rules/route_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/skills/[id]/route.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/skills/[id]/toggle/route.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/skills/[id]/toggle/route_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/skills/effective/route.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/skills/effective/route_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/skills/route.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/spread/route.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/spread/route_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/sync/route.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/sync/route_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/team/route.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/team/route_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/backups/page.js +2 -2
- package/vendor/plexus-agent-config-web/.next/server/app/backups/page.js.nft.json +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/backups/page_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/debug/page.js +2 -2
- package/vendor/plexus-agent-config-web/.next/server/app/debug/page.js.nft.json +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/debug/page_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/mcp/page.js +2 -2
- package/vendor/plexus-agent-config-web/.next/server/app/mcp/page.js.nft.json +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/mcp/page_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/mirror/page.js +2 -2
- package/vendor/plexus-agent-config-web/.next/server/app/mirror/page.js.nft.json +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/mirror/page_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/page.js +2 -2
- package/vendor/plexus-agent-config-web/.next/server/app/page.js.nft.json +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/rules/page.js +3 -3
- package/vendor/plexus-agent-config-web/.next/server/app/rules/page.js.nft.json +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/rules/page_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/settings/page.js +2 -2
- package/vendor/plexus-agent-config-web/.next/server/app/settings/page.js.nft.json +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/skills/page.js +2 -2
- package/vendor/plexus-agent-config-web/.next/server/app/skills/page.js.nft.json +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/spread/page.js +2 -2
- package/vendor/plexus-agent-config-web/.next/server/app/spread/page.js.nft.json +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/spread/page_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/team/page.js +2 -2
- package/vendor/plexus-agent-config-web/.next/server/app/team/page.js.nft.json +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/team/page_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app-paths-manifest.json +3 -3
- package/vendor/plexus-agent-config-web/.next/server/chunks/479.js +4 -4
- package/vendor/plexus-agent-config-web/.next/server/chunks/554.js +1 -0
- package/vendor/plexus-agent-config-web/.next/server/chunks/750.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/middleware-build-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/next-font-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/next-font-manifest.json +1 -1
- package/vendor/plexus-agent-config-web/.next/server/pages/500.html +1 -1
- package/vendor/plexus-agent-config-web/.next/server/server-reference-manifest.json +1 -1
- package/vendor/plexus-agent-config-web/.next/static/chunks/{1968-9d19293a29f03646.js → 1968-5981314117a6ea1f.js} +2 -2
- package/vendor/plexus-agent-config-web/.next/static/chunks/{87c73c54-64138e17754e338c.js → 87c73c54-f46fec743414da25.js} +1 -1
- package/vendor/plexus-agent-config-web/.next/static/chunks/app/_not-found/page-8ba48265c993686c.js +1 -0
- package/vendor/plexus-agent-config-web/.next/static/chunks/app/about/{page-64a1ee41b87ea86c.js → page-1999365195d3b81a.js} +1 -1
- package/vendor/plexus-agent-config-web/.next/static/chunks/app/agents/[id]/page-02c1c68007fb9b26.js +1 -0
- package/vendor/plexus-agent-config-web/.next/static/chunks/app/backups/{page-6842a663db4fab47.js → page-5d03fe15d06b372e.js} +2 -2
- package/vendor/plexus-agent-config-web/.next/static/chunks/app/debug/{page-19e534df1d13eb98.js → page-2edfcee509b8438c.js} +1 -1
- package/vendor/plexus-agent-config-web/.next/static/chunks/app/layout-ebb341e17e16f301.js +1 -0
- package/vendor/plexus-agent-config-web/.next/static/chunks/app/mcp/{page-d0d518965db961f1.js → page-d4c83712d8c29f02.js} +1 -1
- package/vendor/plexus-agent-config-web/.next/static/chunks/app/mirror/page-5d4ac07dcc3218c5.js +1 -0
- package/vendor/plexus-agent-config-web/.next/static/chunks/app/{page-039dbbfad47ff659.js → page-4f00de3290a21755.js} +1 -1
- package/vendor/plexus-agent-config-web/.next/static/chunks/app/rules/{page-5bb663fc0ee9960b.js → page-f391407e2ebfcf64.js} +2 -2
- package/vendor/plexus-agent-config-web/.next/static/chunks/app/settings/page-0befc46d439ee26c.js +1 -0
- package/vendor/plexus-agent-config-web/.next/static/chunks/app/skills/{page-6067058898aa6e10.js → page-a90fec8f4dae0d22.js} +1 -1
- package/vendor/plexus-agent-config-web/.next/static/chunks/app/team/{page-edd7f54640e60e94.js → page-ecee567abc21176a.js} +1 -1
- package/vendor/plexus-agent-config-web/.next/static/chunks/main-927a633bb48df053.js +5 -0
- package/vendor/plexus-agent-config-web/.next/static/chunks/{main-app-4c4bad3c22a66283.js → main-app-e8d8ab3098122763.js} +1 -1
- package/vendor/plexus-agent-config-web/.next/static/chunks/next/dist/client/components/builtin/global-error-7dbae5819d7bfddc.js +1 -0
- package/vendor/plexus-agent-config-web/.next/static/chunks/webpack-59c0cf3deef5f26f.js +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/package.json +3 -3
- package/vendor/plexus-agent-config-web/package.json +3 -3
- package/vendor/plexus-agent-config-web/.next/server/chunks/620.js +0 -1
- package/vendor/plexus-agent-config-web/.next/static/chunks/app/_not-found/page-303a3bb713044693.js +0 -1
- package/vendor/plexus-agent-config-web/.next/static/chunks/app/agents/[id]/page-c3c89d8ae72c75c2.js +0 -1
- package/vendor/plexus-agent-config-web/.next/static/chunks/app/layout-c148ba3a96b46ad6.js +0 -1
- package/vendor/plexus-agent-config-web/.next/static/chunks/app/mirror/page-e88f348e1a12487a.js +0 -1
- package/vendor/plexus-agent-config-web/.next/static/chunks/app/settings/page-8164e1d1a8a08038.js +0 -1
- package/vendor/plexus-agent-config-web/.next/static/chunks/main-488dba80110e3bfb.js +0 -5
- package/vendor/plexus-agent-config-web/.next/static/chunks/next/dist/client/components/builtin/global-error-821a044f296e83b5.js +0 -1
- package/vendor/plexus-agent-config-web/.next/static/chunks/webpack-dd4b9bd51624284c.js +0 -1
- /package/vendor/plexus-agent-config-web/.next/static/{cYvZNrsyPRNUjzvxkVMIa → F1j5cMKRUWnwXIl46BSnB}/_buildManifest.js +0 -0
- /package/vendor/plexus-agent-config-web/.next/static/{cYvZNrsyPRNUjzvxkVMIa → F1j5cMKRUWnwXIl46BSnB}/_ssgManifest.js +0 -0
package/vendor/plexus-agent-config-web/.next/static/chunks/app/_not-found/page-8ba48265c993686c.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9492],{3496:(e,t,l)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let r=l(4568),n=l(5230),o=function(){return(0,r.jsx)("html",{children:(0,r.jsx)("body",{children:(0,r.jsx)(n.HTTPAccessErrorFallback,{status:404,message:"This page could not be found."})})})};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5230:(e,t,l)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HTTPAccessErrorFallback",{enumerable:!0,get:function(){return o}});let r=l(4568),n=l(6961);function o({status:e,message:t}){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("title",{children:`${e}: ${t}`}),(0,r.jsx)("div",{style:n.styles.error,children:(0,r.jsxs)("div",{children:[(0,r.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}),(0,r.jsx)("h1",{className:"next-error-h1",style:n.styles.h1,children:e}),(0,r.jsx)("div",{style:n.styles.desc,children:(0,r.jsx)("h2",{style:n.styles.h2,children:t})})]})})]})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5914:(e,t,l)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/_not-found/page",function(){return l(3496)}])},6961:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"styles",{enumerable:!0,get:function(){return l}});let l={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},desc:{display:"inline-block"},h1:{display:"inline-block",margin:"0 20px 0 0",padding:"0 23px 0 0",fontSize:24,fontWeight:500,verticalAlign:"top",lineHeight:"49px"},h2:{fontSize:14,fontWeight:400,lineHeight:"49px",margin:0}};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}},e=>{e.O(0,[587,1968,7358],()=>e(e.s=5914)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7220],{906:(e,s,t)=>{"use strict";t.d(s,{A:()=>l});let l=(0,t(9789).A)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},1207:(e,s,t)=>{"use strict";t.d(s,{A:()=>l});let l=(0,t(9789).A)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]])},2328:(e,s,t)=>{Promise.resolve().then(t.bind(t,6036))},4725:(e,s,t)=>{"use strict";t.d(s,{A:()=>l});let l=(0,t(9789).A)("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},4926:(e,s,t)=>{"use strict";t.d(s,{A:()=>l});let l=(0,t(9789).A)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},5830:(e,s,t)=>{"use strict";t.d(s,{A:()=>l});let l=(0,t(9789).A)("plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]])},6036:(e,s,t)=>{"use strict";t.d(s,{ArchitecturePanel:()=>y});var l=t(4568),r=t(6197),a=t(7788),i=t(7294),n=t(7483),o=t(9250),c=t(1207),d=t(5830),x=t(4926),u=t(9789);let p=(0,u.A)("git-branch",[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]]);var m=t(4725),b=t(906);let h=(0,u.A)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);var g=t(7620);let f={en:{badge:"local-first architecture",title:"One source, native files everywhere.",description:"Plexus keeps a canonical store under ~/.config/plexus, then projects rules, skills, and MCP servers back into each agent using the least invasive reversible mechanism.",openDoc:"Open static design",source:"Native import",store:"Canonical store",projection:"Native projection",team:"team",personal:"personal",effective:"effective merge",agentFiles:"agent files",conflict:"primary source resolves conflicts",backups:"snapshots before writes",tabs:{overview:"Overview",rules:"Rules",skills:"Skills",mcp:"MCP",safety:"Safety"},detail:{overview:{title:"Why this is the best default",body:"The design optimizes for local safety: keep one canonical store, preserve each agent's native format, and use symlinks only where the whole target can safely point at Plexus.",bullets:["Team and personal layers merge into one effective view.","Personal entries override team entries with the same ID.","Every enabled agent keeps reading its official native path."]},rules:{title:"Rules use file-level symlinks",body:"Claude.md, AGENTS.md, and GEMINI.md are instruction files. Plexus stores a single baseline at rules/global.md and links agent-native filenames to it.",bullets:["Canonical: ~/.config/plexus/personal/rules/global.md","Targets: ~/.claude/CLAUDE.md, ~/.codex/AGENTS.md, ~/.gemini/GEMINI.md","Fallback: copy when symlinks are unavailable."]},skills:{title:"Skills use directory-level symlinks",body:"A skill is already a folder with SKILL.md inside, so Plexus can share the same directory across agents without translating the content.",bullets:["Canonical: skills/<id>/SKILL.md with Plexus frontmatter.","Targets: ~/.claude/skills/<id>, ~/.codex/skills/<id>, ~/.factory/skills/<id>.","Per-agent enablement lives in plexus_enabled_agents."]},mcp:{title:"MCP uses a hybrid adapter",body:"Some MCP files are single-purpose and can be owned by Plexus. Others contain auth, profiles, history, or UI state, so Plexus rewrites only the MCP section.",bullets:["Shared files: partial-write mcpServers or mcp_servers only.","Exclusive files: native MCP path links to ~/.config/plexus/.cache/mcp/<agent>.json.","Formats stay native: JSON for most agents, TOML for Codex."]},safety:{title:"Safety is built into every write",body:"The sync layer snapshots native files before mutation and quarantines real files or directories that block Plexus-managed symlinks.",bullets:["Snapshots live under ~/.config/plexus/backups.","Collisions move to backups/_collisions instead of being overwritten.","Detach can turn a Plexus-owned instruction symlink back into a local file."]}}},zh:{badge:"本地优先架构",title:"一个源,投射到所有 Agent 原生文件。",description:"Plexus 把配置统一放在 ~/.config/plexus,再用最少侵入、可回滚的方式同步到每个 Agent 原本会读取的位置。",openDoc:"打开静态设计图",source:"原生导入",store:"统一配置源",projection:"原生投射",team:"团队层",personal:"个人层",effective:"合并后的生效视图",agentFiles:"Agent 原生文件",conflict:"Primary source 解决冲突",backups:"写入前自动备份",tabs:{overview:"总览",rules:"规则",skills:"Skills",mcp:"MCP",safety:"安全回滚"},detail:{overview:{title:"为什么这是当前最好的默认解",body:"这个方案优先保证本地安全:统一配置源只放在 Plexus store,每个 Agent 仍读取自己的官方路径,只在能完整托管的地方使用软链接。",bullets:["Team 和 personal 两层会合并成一个 effective view。","同 ID 时个人配置覆盖团队配置。","每个启用的 Agent 仍然读取它自己的原生路径。"]},rules:{title:"Rules 使用文件级软链接",body:"CLAUDE.md、AGENTS.md、GEMINI.md 这类 instruction file 会共享同一个 global.md,但每个 Agent 看到的仍是自己的官方文件名。",bullets:["统一源:~/.config/plexus/personal/rules/global.md","目标:~/.claude/CLAUDE.md、~/.codex/AGENTS.md、~/.gemini/GEMINI.md","如果系统不支持软链接,会 fallback 到 copy。"]},skills:{title:"Skills 使用目录级软链接",body:"Skill 本身就是一个包含 SKILL.md 的目录,所以最干净的方式是让多个 Agent 的 skill 目录指向同一个 Plexus 目录。",bullets:["统一源:skills/<id>/SKILL.md,带 Plexus frontmatter。","目标:~/.claude/skills/<id>、~/.codex/skills/<id>、~/.factory/skills/<id>。","是否同步给某个 Agent 由 plexus_enabled_agents 控制。"]},mcp:{title:"MCP 使用 hybrid adapter",body:"有些 MCP 文件是专用文件,可以完全由 Plexus 托管;有些文件还包含 auth、profile、历史记录或 UI 状态,只能局部写入。",bullets:["shared 文件:只局部改写 mcpServers 或 mcp_servers。","exclusive 文件:Agent 的 MCP 路径软链接到 ~/.config/plexus/.cache/mcp/<agent>.json。","格式保持原生:大多数是 JSON,Codex 是 TOML。"]},safety:{title:"每次写入都先保护现场",body:"同步层在修改原生路径前会做 snapshot;如果目标位置已有真实文件或目录,会先移动到 collision 备份区。",bullets:["快照在 ~/.config/plexus/backups。","冲突文件进入 backups/_collisions,不会原地覆盖。","Detach 可以把 Plexus 管理的 instruction symlink 还原成本地文件。"]}}}},v=[{id:"rules",label:"Rules",icon:o.A,color:"text-plexus-ok",line:"rules/global.md -> CLAUDE.md / AGENTS.md / GEMINI.md"},{id:"skills",label:"Skills",icon:c.A,color:"text-plexus-info",line:"skills/<id>/ -> agent skills or commands directory"},{id:"mcp",label:"MCP",icon:d.A,color:"text-plexus-accent",line:"servers.yaml -> partial-write or cache symlink"}];function y({locale:e}){let s=f[e],[t,o]=(0,g.useState)("overview"),c=s.detail[t];return(0,l.jsx)("div",{className:"space-y-6",children:(0,l.jsxs)(i.Z,{className:"overflow-hidden",children:[(0,l.jsxs)("div",{className:"border-b border-plexus-border bg-plexus-surface-2/35 px-5 py-4",children:[(0,l.jsxs)("div",{className:"mb-3 flex flex-wrap items-center justify-between gap-3",children:[(0,l.jsx)(r.E,{variant:"beta",children:s.badge}),(0,l.jsx)(a.Button,{asChild:!0,variant:"ghost",size:"sm",children:(0,l.jsxs)("a",{href:"/architecture/config-sharing-map.html",target:"_blank",rel:"noreferrer",children:[s.openDoc,(0,l.jsx)(x.A,{className:"h-3.5 w-3.5",strokeWidth:1.5})]})})]}),(0,l.jsx)("h2",{className:"max-w-3xl text-3xl font-semibold tracking-[-0.035em] text-plexus-text",children:s.title}),(0,l.jsx)("p",{className:"mt-3 max-w-3xl text-sm leading-relaxed text-plexus-text-2",children:s.description})]}),(0,l.jsxs)("div",{className:"grid gap-5 p-5 xl:grid-cols-[minmax(0,1.35fr)_minmax(320px,0.65fr)]",children:[(0,l.jsx)("div",{className:"rounded-md border border-plexus-border bg-plexus-bg p-4",children:(0,l.jsxs)("div",{className:"grid gap-4 lg:grid-cols-[1fr_1.15fr_1fr]",children:[(0,l.jsx)(k,{title:s.source,items:[s.agentFiles,s.conflict,s.backups],icon:(0,l.jsx)(p,{className:"h-4 w-4",strokeWidth:1.5})}),(0,l.jsxs)("div",{className:"relative rounded-md border border-plexus-accent/35 bg-plexus-surface p-4 shadow-[0_20px_60px_rgb(var(--plexus-accent)/0.10)]",children:[(0,l.jsxs)("div",{className:"mb-4 flex items-center justify-between gap-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"plexus-eyebrow",children:s.store}),(0,l.jsx)("div",{className:"mt-1 font-mono text-xs text-plexus-text-3",children:"~/.config/plexus"})]}),(0,l.jsx)(m.A,{className:"h-5 w-5 text-plexus-accent",strokeWidth:1.5})]}),(0,l.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,l.jsxs)("div",{className:"rounded border border-plexus-border bg-plexus-bg p-3",children:[(0,l.jsx)("div",{className:"text-sm font-semibold text-plexus-text",children:s.team}),(0,l.jsx)("div",{className:"mt-1 font-mono text-[11px] text-plexus-text-3",children:"team/rules, team/skills, team/mcp"})]}),(0,l.jsxs)("div",{className:"rounded border border-plexus-border bg-plexus-bg p-3",children:[(0,l.jsx)("div",{className:"text-sm font-semibold text-plexus-text",children:s.personal}),(0,l.jsx)("div",{className:"mt-1 font-mono text-[11px] text-plexus-text-3",children:"personal overrides team"})]})]}),(0,l.jsx)("div",{className:"mt-3 rounded border border-plexus-border bg-plexus-surface-2 px-3 py-2 text-xs text-plexus-text-2",children:s.effective}),(0,l.jsx)("div",{className:"mt-4 grid gap-3",children:v.map(e=>{let s=e.icon,r=t===e.id;return(0,l.jsxs)("button",{type:"button",onClick:()=>o(e.id),className:(0,n.cn)("flex items-start gap-3 rounded border px-3 py-2 text-left transition-colors",r?"border-plexus-accent bg-plexus-accent/10":"border-plexus-border bg-plexus-bg hover:border-plexus-border-strong"),children:[(0,l.jsx)(s,{className:(0,n.cn)("mt-0.5 h-4 w-4 shrink-0",e.color),strokeWidth:1.5}),(0,l.jsxs)("span",{children:[(0,l.jsx)("span",{className:"block text-sm font-semibold text-plexus-text",children:e.label}),(0,l.jsx)("span",{className:"mt-0.5 block font-mono text-[11px] text-plexus-text-3",children:e.line})]})]},e.id)})})]}),(0,l.jsx)(k,{title:s.projection,items:["~/.claude/CLAUDE.md","~/.codex/skills/<id>","~/.cursor/mcp.json"],icon:(0,l.jsx)(x.A,{className:"h-4 w-4",strokeWidth:1.5})})]})}),(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsx)("div",{className:"grid grid-cols-2 gap-2",children:Object.keys(s.tabs).map(e=>(0,l.jsx)("button",{type:"button",onClick:()=>o(e),className:(0,n.cn)("h-9 rounded border px-3 text-sm transition-colors",t===e?"border-plexus-accent bg-plexus-accent text-[#1a1a17]":"border-plexus-border bg-plexus-surface-2 text-plexus-text-2 hover:text-plexus-text"),children:s.tabs[e]},e))}),(0,l.jsxs)(i.Z,{className:"p-5",children:[(0,l.jsxs)("div",{className:"mb-3 flex items-center gap-2",children:["safety"===t?(0,l.jsx)(b.A,{className:"h-4 w-4 text-plexus-ok",strokeWidth:1.5}):(0,l.jsx)(h,{className:"h-4 w-4 text-plexus-accent",strokeWidth:1.5}),(0,l.jsx)("h3",{className:"text-lg font-semibold tracking-[-0.015em] text-plexus-text",children:c.title})]}),(0,l.jsx)("p",{className:"text-sm leading-relaxed text-plexus-text-2",children:c.body}),(0,l.jsx)("ul",{className:"mt-4 space-y-2",children:c.bullets.map(e=>(0,l.jsxs)("li",{className:"flex gap-2 text-sm leading-relaxed text-plexus-text-2",children:[(0,l.jsx)("span",{className:"mt-2 h-1.5 w-1.5 shrink-0 rounded-full bg-plexus-accent"}),(0,l.jsx)("span",{children:e})]},e))})]})]})]})]})})}function k({title:e,items:s,icon:t}){return(0,l.jsxs)("div",{className:"rounded-md border border-plexus-border bg-plexus-surface p-4",children:[(0,l.jsxs)("div",{className:"mb-3 flex items-center justify-between gap-3",children:[(0,l.jsx)("div",{className:"plexus-eyebrow",children:e}),(0,l.jsx)("span",{className:"text-plexus-text-3",children:t})]}),(0,l.jsx)("div",{className:"space-y-2",children:s.map(e=>(0,l.jsx)("div",{className:"rounded border border-plexus-border bg-plexus-bg px-3 py-2 font-mono text-[11px] leading-relaxed text-plexus-text-3",children:e},e))})]})}},6197:(e,s,t)=>{"use strict";t.d(s,{E:()=>i,m:()=>n});var l=t(4568),r=t(7483);let a=(0,t(1397).F)("inline-flex items-center gap-1 rounded-sm px-2 h-5 text-[11px] font-medium tracking-[0.01em]",{variants:{variant:{team:"bg-plexus-info/15 text-plexus-info",personal:"bg-plexus-accent-faint text-plexus-accent",synced:"bg-plexus-ok/15 text-plexus-ok",divergent:"bg-plexus-warn/15 text-plexus-warn",native:"bg-plexus-text-3/15 text-plexus-text-3",beta:"bg-plexus-accent-faint text-plexus-accent border border-plexus-accent/25",danger:"bg-plexus-err/13 text-plexus-err",outline:"border border-plexus-border text-plexus-text-2"}},defaultVariants:{variant:"outline"}});function i({className:e,variant:s,...t}){return(0,l.jsx)("span",{className:(0,r.cn)(a({variant:s}),e),...t})}function n({className:e,tone:s="ok"}){return(0,l.jsx)("span",{className:(0,r.cn)("inline-block h-1.5 w-1.5 rounded-full",{ok:"bg-plexus-ok",warn:"bg-plexus-warn",err:"bg-plexus-err",info:"bg-plexus-info",accent:"bg-plexus-accent",mute:"bg-plexus-text-3"}[s],e)})}},7294:(e,s,t)=>{"use strict";t.d(s,{Z:()=>i});var l=t(4568),r=t(7483),a=t(7620);let i=(0,a.forwardRef)(({className:e,...s},t)=>(0,l.jsx)("div",{ref:t,className:(0,r.cn)("rounded-md border border-plexus-border bg-plexus-surface","transition-colors duration-plexus-normal ease-plexus-out",e),...s}));i.displayName="Card",(0,a.forwardRef)(({className:e,...s},t)=>(0,l.jsx)(i,{ref:t,className:(0,r.cn)("hover:border-plexus-border-strong hover:-translate-y-px",e),...s})).displayName="CardHover"},7483:(e,s,t)=>{"use strict";t.d(s,{cn:()=>a});var l=t(9917),r=t(2809);function a(...e){return(0,r.QP)((0,l.$)(e))}},7788:(e,s,t)=>{"use strict";t.d(s,{Button:()=>c});var l=t(4568),r=t(7483),a=t(8347),i=t(1397),n=t(7620);let o=(0,i.F)((0,r.cn)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded font-medium","transition-colors duration-plexus-normal ease-plexus-out","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-plexus-accent/50 focus-visible:ring-offset-1 focus-visible:ring-offset-plexus-bg","disabled:pointer-events-none disabled:opacity-50"),{variants:{variant:{primary:"bg-plexus-accent text-[#1a1a17] hover:bg-plexus-accent-2 border border-plexus-accent",secondary:"bg-plexus-surface-2 text-plexus-text border border-plexus-border hover:bg-plexus-surface hover:border-plexus-border-strong",ghost:"bg-transparent text-plexus-text-2 hover:bg-plexus-surface-2 hover:text-plexus-text border border-transparent",danger:"bg-transparent text-plexus-err border border-plexus-err/35 hover:bg-plexus-err/10","danger-solid":"bg-plexus-err text-white border border-plexus-err hover:bg-plexus-err/90"},size:{default:"h-9 px-3.5 text-sm",sm:"h-7 px-2.5 text-xs",lg:"h-10 px-4 text-sm",icon:"h-9 w-9 p-0"}},defaultVariants:{variant:"secondary",size:"default"}}),c=(0,n.forwardRef)(({className:e,variant:s,size:t,asChild:i=!1,type:n="button",...c},d)=>{let x=i?a.DX:"button";return(0,l.jsx)(x,{ref:d,type:i?void 0:n,className:(0,r.cn)(o({variant:s,size:t}),e),...c})});c.displayName="Button"},9250:(e,s,t)=>{"use strict";t.d(s,{A:()=>l});let l=(0,t(9789).A)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]])}},e=>{e.O(0,[4399,587,1968,7358],()=>e(e.s=2328)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7220],{906:(e,s,t)=>{"use strict";t.d(s,{A:()=>l});let l=(0,t(9789).A)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},1207:(e,s,t)=>{"use strict";t.d(s,{A:()=>l});let l=(0,t(9789).A)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]])},1572:(e,s,t)=>{Promise.resolve().then(t.bind(t,6036))},4725:(e,s,t)=>{"use strict";t.d(s,{A:()=>l});let l=(0,t(9789).A)("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},4926:(e,s,t)=>{"use strict";t.d(s,{A:()=>l});let l=(0,t(9789).A)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},5830:(e,s,t)=>{"use strict";t.d(s,{A:()=>l});let l=(0,t(9789).A)("plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]])},6036:(e,s,t)=>{"use strict";t.d(s,{ArchitecturePanel:()=>y});var l=t(4568),r=t(6197),a=t(7788),i=t(7294),n=t(7483),o=t(9250),c=t(1207),d=t(5830),x=t(4926),u=t(9789);let p=(0,u.A)("git-branch",[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]]);var m=t(4725),b=t(906);let h=(0,u.A)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);var g=t(7620);let f={en:{badge:"local-first architecture",title:"One source, native files everywhere.",description:"Plexus keeps a canonical store under ~/.config/plexus, then projects rules, skills, and MCP servers back into each agent using the least invasive reversible mechanism.",openDoc:"Open static design",source:"Native import",store:"Canonical store",projection:"Native projection",team:"team",personal:"personal",effective:"effective merge",agentFiles:"agent files",conflict:"primary source resolves conflicts",backups:"snapshots before writes",tabs:{overview:"Overview",rules:"Rules",skills:"Skills",mcp:"MCP",safety:"Safety"},detail:{overview:{title:"Why this is the best default",body:"The design optimizes for local safety: keep one canonical store, preserve each agent's native format, and use symlinks only where the whole target can safely point at Plexus.",bullets:["Team and personal layers merge into one effective view.","Personal entries override team entries with the same ID.","Every enabled agent keeps reading its official native path."]},rules:{title:"Rules use file-level symlinks",body:"Claude.md, AGENTS.md, and GEMINI.md are instruction files. Plexus stores a single baseline at rules/global.md and links agent-native filenames to it.",bullets:["Canonical: ~/.config/plexus/personal/rules/global.md","Targets: ~/.claude/CLAUDE.md, ~/.codex/AGENTS.md, ~/.gemini/GEMINI.md","Fallback: copy when symlinks are unavailable."]},skills:{title:"Skills use directory-level symlinks",body:"A skill is already a folder with SKILL.md inside, so Plexus can share the same directory across agents without translating the content.",bullets:["Canonical: skills/<id>/SKILL.md with Plexus frontmatter.","Targets: ~/.claude/skills/<id>, ~/.codex/skills/<id>, ~/.factory/skills/<id>.","Per-agent enablement lives in plexus_enabled_agents."]},mcp:{title:"MCP uses a hybrid adapter",body:"Some MCP files are single-purpose and can be owned by Plexus. Others contain auth, profiles, history, or UI state, so Plexus rewrites only the MCP section.",bullets:["Shared files: partial-write mcpServers or mcp_servers only.","Exclusive files: native MCP path links to ~/.config/plexus/.cache/mcp/<agent>.json.","Formats stay native: JSON for most agents, TOML for Codex."]},safety:{title:"Safety is built into every write",body:"The sync layer snapshots native files before mutation and quarantines real files or directories that block Plexus-managed symlinks.",bullets:["Snapshots live under ~/.config/plexus/backups.","Collisions move to backups/_collisions instead of being overwritten.","Detach can turn a Plexus-owned instruction symlink back into a local file."]}}},zh:{badge:"本地优先架构",title:"一个源,投射到所有 Agent 原生文件。",description:"Plexus 把配置统一放在 ~/.config/plexus,再用最少侵入、可回滚的方式同步到每个 Agent 原本会读取的位置。",openDoc:"打开静态设计图",source:"原生导入",store:"统一配置源",projection:"原生投射",team:"团队层",personal:"个人层",effective:"合并后的生效视图",agentFiles:"Agent 原生文件",conflict:"Primary source 解决冲突",backups:"写入前自动备份",tabs:{overview:"总览",rules:"规则",skills:"Skills",mcp:"MCP",safety:"安全回滚"},detail:{overview:{title:"为什么这是当前最好的默认解",body:"这个方案优先保证本地安全:统一配置源只放在 Plexus store,每个 Agent 仍读取自己的官方路径,只在能完整托管的地方使用软链接。",bullets:["Team 和 personal 两层会合并成一个 effective view。","同 ID 时个人配置覆盖团队配置。","每个启用的 Agent 仍然读取它自己的原生路径。"]},rules:{title:"Rules 使用文件级软链接",body:"CLAUDE.md、AGENTS.md、GEMINI.md 这类 instruction file 会共享同一个 global.md,但每个 Agent 看到的仍是自己的官方文件名。",bullets:["统一源:~/.config/plexus/personal/rules/global.md","目标:~/.claude/CLAUDE.md、~/.codex/AGENTS.md、~/.gemini/GEMINI.md","如果系统不支持软链接,会 fallback 到 copy。"]},skills:{title:"Skills 使用目录级软链接",body:"Skill 本身就是一个包含 SKILL.md 的目录,所以最干净的方式是让多个 Agent 的 skill 目录指向同一个 Plexus 目录。",bullets:["统一源:skills/<id>/SKILL.md,带 Plexus frontmatter。","目标:~/.claude/skills/<id>、~/.codex/skills/<id>、~/.factory/skills/<id>。","是否同步给某个 Agent 由 plexus_enabled_agents 控制。"]},mcp:{title:"MCP 使用 hybrid adapter",body:"有些 MCP 文件是专用文件,可以完全由 Plexus 托管;有些文件还包含 auth、profile、历史记录或 UI 状态,只能局部写入。",bullets:["shared 文件:只局部改写 mcpServers 或 mcp_servers。","exclusive 文件:Agent 的 MCP 路径软链接到 ~/.config/plexus/.cache/mcp/<agent>.json。","格式保持原生:大多数是 JSON,Codex 是 TOML。"]},safety:{title:"每次写入都先保护现场",body:"同步层在修改原生路径前会做 snapshot;如果目标位置已有真实文件或目录,会先移动到 collision 备份区。",bullets:["快照在 ~/.config/plexus/backups。","冲突文件进入 backups/_collisions,不会原地覆盖。","Detach 可以把 Plexus 管理的 instruction symlink 还原成本地文件。"]}}}},v=[{id:"rules",label:"Rules",icon:o.A,color:"text-plexus-ok",line:"rules/global.md -> CLAUDE.md / AGENTS.md / GEMINI.md"},{id:"skills",label:"Skills",icon:c.A,color:"text-plexus-info",line:"skills/<id>/ -> agent skills or commands directory"},{id:"mcp",label:"MCP",icon:d.A,color:"text-plexus-accent",line:"servers.yaml -> partial-write or cache symlink"}];function y({locale:e}){let s=f[e],[t,o]=(0,g.useState)("overview"),c=s.detail[t];return(0,l.jsx)("div",{className:"space-y-6",children:(0,l.jsxs)(i.Z,{className:"overflow-hidden",children:[(0,l.jsxs)("div",{className:"border-b border-plexus-border bg-plexus-surface-2/35 px-5 py-4",children:[(0,l.jsxs)("div",{className:"mb-3 flex flex-wrap items-center justify-between gap-3",children:[(0,l.jsx)(r.E,{variant:"beta",children:s.badge}),(0,l.jsx)(a.Button,{asChild:!0,variant:"ghost",size:"sm",children:(0,l.jsxs)("a",{href:"/architecture/config-sharing-map.html",target:"_blank",rel:"noreferrer",children:[s.openDoc,(0,l.jsx)(x.A,{className:"h-3.5 w-3.5",strokeWidth:1.5})]})})]}),(0,l.jsx)("h2",{className:"max-w-3xl text-3xl font-semibold tracking-[-0.035em] text-plexus-text",children:s.title}),(0,l.jsx)("p",{className:"mt-3 max-w-3xl text-sm leading-relaxed text-plexus-text-2",children:s.description})]}),(0,l.jsxs)("div",{className:"grid gap-5 p-5 xl:grid-cols-[minmax(0,1.35fr)_minmax(320px,0.65fr)]",children:[(0,l.jsx)("div",{className:"rounded-md border border-plexus-border bg-plexus-bg p-4",children:(0,l.jsxs)("div",{className:"grid gap-4 lg:grid-cols-[1fr_1.15fr_1fr]",children:[(0,l.jsx)(k,{title:s.source,items:[s.agentFiles,s.conflict,s.backups],icon:(0,l.jsx)(p,{className:"h-4 w-4",strokeWidth:1.5})}),(0,l.jsxs)("div",{className:"relative rounded-md border border-plexus-accent/35 bg-plexus-surface p-4 shadow-[0_20px_60px_rgb(var(--plexus-accent)/0.10)]",children:[(0,l.jsxs)("div",{className:"mb-4 flex items-center justify-between gap-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"plexus-eyebrow",children:s.store}),(0,l.jsx)("div",{className:"mt-1 font-mono text-xs text-plexus-text-3",children:"~/.config/plexus"})]}),(0,l.jsx)(m.A,{className:"h-5 w-5 text-plexus-accent",strokeWidth:1.5})]}),(0,l.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,l.jsxs)("div",{className:"rounded border border-plexus-border bg-plexus-bg p-3",children:[(0,l.jsx)("div",{className:"text-sm font-semibold text-plexus-text",children:s.team}),(0,l.jsx)("div",{className:"mt-1 font-mono text-[11px] text-plexus-text-3",children:"team/rules, team/skills, team/mcp"})]}),(0,l.jsxs)("div",{className:"rounded border border-plexus-border bg-plexus-bg p-3",children:[(0,l.jsx)("div",{className:"text-sm font-semibold text-plexus-text",children:s.personal}),(0,l.jsx)("div",{className:"mt-1 font-mono text-[11px] text-plexus-text-3",children:"personal overrides team"})]})]}),(0,l.jsx)("div",{className:"mt-3 rounded border border-plexus-border bg-plexus-surface-2 px-3 py-2 text-xs text-plexus-text-2",children:s.effective}),(0,l.jsx)("div",{className:"mt-4 grid gap-3",children:v.map(e=>{let s=e.icon,r=t===e.id;return(0,l.jsxs)("button",{type:"button",onClick:()=>o(e.id),className:(0,n.cn)("flex items-start gap-3 rounded border px-3 py-2 text-left transition-colors",r?"border-plexus-accent bg-plexus-accent/10":"border-plexus-border bg-plexus-bg hover:border-plexus-border-strong"),children:[(0,l.jsx)(s,{className:(0,n.cn)("mt-0.5 h-4 w-4 shrink-0",e.color),strokeWidth:1.5}),(0,l.jsxs)("span",{children:[(0,l.jsx)("span",{className:"block text-sm font-semibold text-plexus-text",children:e.label}),(0,l.jsx)("span",{className:"mt-0.5 block font-mono text-[11px] text-plexus-text-3",children:e.line})]})]},e.id)})})]}),(0,l.jsx)(k,{title:s.projection,items:["~/.claude/CLAUDE.md","~/.codex/skills/<id>","~/.cursor/mcp.json"],icon:(0,l.jsx)(x.A,{className:"h-4 w-4",strokeWidth:1.5})})]})}),(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsx)("div",{className:"grid grid-cols-2 gap-2",children:Object.keys(s.tabs).map(e=>(0,l.jsx)("button",{type:"button",onClick:()=>o(e),className:(0,n.cn)("h-9 rounded border px-3 text-sm transition-colors",t===e?"border-plexus-accent bg-plexus-accent text-[#1a1a17]":"border-plexus-border bg-plexus-surface-2 text-plexus-text-2 hover:text-plexus-text"),children:s.tabs[e]},e))}),(0,l.jsxs)(i.Z,{className:"p-5",children:[(0,l.jsxs)("div",{className:"mb-3 flex items-center gap-2",children:["safety"===t?(0,l.jsx)(b.A,{className:"h-4 w-4 text-plexus-ok",strokeWidth:1.5}):(0,l.jsx)(h,{className:"h-4 w-4 text-plexus-accent",strokeWidth:1.5}),(0,l.jsx)("h3",{className:"text-lg font-semibold tracking-[-0.015em] text-plexus-text",children:c.title})]}),(0,l.jsx)("p",{className:"text-sm leading-relaxed text-plexus-text-2",children:c.body}),(0,l.jsx)("ul",{className:"mt-4 space-y-2",children:c.bullets.map(e=>(0,l.jsxs)("li",{className:"flex gap-2 text-sm leading-relaxed text-plexus-text-2",children:[(0,l.jsx)("span",{className:"mt-2 h-1.5 w-1.5 shrink-0 rounded-full bg-plexus-accent"}),(0,l.jsx)("span",{children:e})]},e))})]})]})]})]})})}function k({title:e,items:s,icon:t}){return(0,l.jsxs)("div",{className:"rounded-md border border-plexus-border bg-plexus-surface p-4",children:[(0,l.jsxs)("div",{className:"mb-3 flex items-center justify-between gap-3",children:[(0,l.jsx)("div",{className:"plexus-eyebrow",children:e}),(0,l.jsx)("span",{className:"text-plexus-text-3",children:t})]}),(0,l.jsx)("div",{className:"space-y-2",children:s.map(e=>(0,l.jsx)("div",{className:"rounded border border-plexus-border bg-plexus-bg px-3 py-2 font-mono text-[11px] leading-relaxed text-plexus-text-3",children:e},e))})]})}},6197:(e,s,t)=>{"use strict";t.d(s,{E:()=>i,m:()=>n});var l=t(4568),r=t(7483);let a=(0,t(1397).F)("inline-flex items-center gap-1 rounded-sm px-2 h-5 text-[11px] font-medium tracking-[0.01em]",{variants:{variant:{team:"bg-plexus-info/15 text-plexus-info",personal:"bg-plexus-accent-faint text-plexus-accent",synced:"bg-plexus-ok/15 text-plexus-ok",divergent:"bg-plexus-warn/15 text-plexus-warn",native:"bg-plexus-text-3/15 text-plexus-text-3",beta:"bg-plexus-accent-faint text-plexus-accent border border-plexus-accent/25",danger:"bg-plexus-err/13 text-plexus-err",outline:"border border-plexus-border text-plexus-text-2"}},defaultVariants:{variant:"outline"}});function i({className:e,variant:s,...t}){return(0,l.jsx)("span",{className:(0,r.cn)(a({variant:s}),e),...t})}function n({className:e,tone:s="ok"}){return(0,l.jsx)("span",{className:(0,r.cn)("inline-block h-1.5 w-1.5 rounded-full",{ok:"bg-plexus-ok",warn:"bg-plexus-warn",err:"bg-plexus-err",info:"bg-plexus-info",accent:"bg-plexus-accent",mute:"bg-plexus-text-3"}[s],e)})}},7294:(e,s,t)=>{"use strict";t.d(s,{Z:()=>i});var l=t(4568),r=t(7483),a=t(7620);let i=(0,a.forwardRef)(({className:e,...s},t)=>(0,l.jsx)("div",{ref:t,className:(0,r.cn)("rounded-md border border-plexus-border bg-plexus-surface","transition-colors duration-plexus-normal ease-plexus-out",e),...s}));i.displayName="Card",(0,a.forwardRef)(({className:e,...s},t)=>(0,l.jsx)(i,{ref:t,className:(0,r.cn)("hover:border-plexus-border-strong hover:-translate-y-px",e),...s})).displayName="CardHover"},7483:(e,s,t)=>{"use strict";t.d(s,{cn:()=>a});var l=t(9917),r=t(2809);function a(...e){return(0,r.QP)((0,l.$)(e))}},7788:(e,s,t)=>{"use strict";t.d(s,{Button:()=>c});var l=t(4568),r=t(7483),a=t(8347),i=t(1397),n=t(7620);let o=(0,i.F)((0,r.cn)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded font-medium","transition-colors duration-plexus-normal ease-plexus-out","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-plexus-accent/50 focus-visible:ring-offset-1 focus-visible:ring-offset-plexus-bg","disabled:pointer-events-none disabled:opacity-50"),{variants:{variant:{primary:"bg-plexus-accent text-[#1a1a17] hover:bg-plexus-accent-2 border border-plexus-accent",secondary:"bg-plexus-surface-2 text-plexus-text border border-plexus-border hover:bg-plexus-surface hover:border-plexus-border-strong",ghost:"bg-transparent text-plexus-text-2 hover:bg-plexus-surface-2 hover:text-plexus-text border border-transparent",danger:"bg-transparent text-plexus-err border border-plexus-err/35 hover:bg-plexus-err/10","danger-solid":"bg-plexus-err text-white border border-plexus-err hover:bg-plexus-err/90"},size:{default:"h-9 px-3.5 text-sm",sm:"h-7 px-2.5 text-xs",lg:"h-10 px-4 text-sm",icon:"h-9 w-9 p-0"}},defaultVariants:{variant:"secondary",size:"default"}}),c=(0,n.forwardRef)(({className:e,variant:s,size:t,asChild:i=!1,type:n="button",...c},d)=>{let x=i?a.DX:"button";return(0,l.jsx)(x,{ref:d,type:i?void 0:n,className:(0,r.cn)(o({variant:s,size:t}),e),...c})});c.displayName="Button"},9250:(e,s,t)=>{"use strict";t.d(s,{A:()=>l});let l=(0,t(9789).A)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]])}},e=>{e.O(0,[4399,587,1968,7358],()=>e(e.s=1572)),_N_E=e.O()}]);
|
package/vendor/plexus-agent-config-web/.next/static/chunks/app/agents/[id]/page-02c1c68007fb9b26.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3969],{4641:(e,s,t)=>{"use strict";t.d(s,{AgentDetail:()=>C});var l=t(4568),r=t(7483),a=t(7943),n=t(1462),i=t(1065);let x={h1:({className:e,...s})=>(0,l.jsx)("h1",{className:(0,r.cn)("mt-0 mb-4 border-plexus-border border-b pb-3 text-2xl font-semibold tracking-normal text-plexus-text",e),...s}),h2:({className:e,...s})=>(0,l.jsx)("h2",{className:(0,r.cn)("mt-7 mb-3 text-xl font-semibold tracking-normal text-plexus-text",e),...s}),h3:({className:e,...s})=>(0,l.jsx)("h3",{className:(0,r.cn)("mt-6 mb-2 text-base font-semibold tracking-normal text-plexus-text",e),...s}),h4:({className:e,...s})=>(0,l.jsx)("h4",{className:(0,r.cn)("mt-5 mb-2 text-sm font-semibold tracking-normal text-plexus-text",e),...s}),p:({className:e,...s})=>(0,l.jsx)("p",{className:(0,r.cn)("my-3 leading-7 text-plexus-text-2",e),...s}),a:({className:e,...s})=>(0,l.jsx)("a",{className:(0,r.cn)("font-medium text-plexus-accent underline-offset-4 hover:underline",e),target:"_blank",rel:"noreferrer",...s}),ul:({className:e,...s})=>(0,l.jsx)("ul",{className:(0,r.cn)("my-3 list-disc space-y-1.5 pl-6 text-plexus-text-2",e),...s}),ol:({className:e,...s})=>(0,l.jsx)("ol",{className:(0,r.cn)("my-3 list-decimal space-y-1.5 pl-6 text-plexus-text-2",e),...s}),li:({className:e,...s})=>(0,l.jsx)("li",{className:(0,r.cn)("pl-1 leading-7",e),...s}),blockquote:({className:e,...s})=>(0,l.jsx)("blockquote",{className:(0,r.cn)("my-4 border-plexus-accent/40 border-l-2 bg-plexus-accent-faint/40 px-4 py-2 text-plexus-text-2",e),...s}),hr:({className:e,...s})=>(0,l.jsx)("hr",{className:(0,r.cn)("my-6 border-plexus-border",e),...s}),code:({className:e,...s})=>(0,l.jsx)("code",{className:(0,r.cn)("rounded-sm bg-plexus-surface-2 px-1.5 py-0.5 font-mono text-[0.88em] text-plexus-text",e),...s}),pre:({className:e,...s})=>(0,l.jsx)("pre",{className:(0,r.cn)("my-4 overflow-x-auto rounded-md border border-plexus-border bg-plexus-bg p-4 text-xs leading-6 text-plexus-text [&_code]:bg-transparent [&_code]:p-0",e),...s}),table:({className:e,...s})=>(0,l.jsx)("div",{className:"my-4 overflow-x-auto rounded-md border border-plexus-border",children:(0,l.jsx)("table",{className:(0,r.cn)("w-full border-collapse text-sm",e),...s})}),th:({className:e,...s})=>(0,l.jsx)("th",{className:(0,r.cn)("border-plexus-border border-b bg-plexus-surface-2 px-3 py-2 text-left font-semibold text-plexus-text",e),...s}),td:({className:e,...s})=>(0,l.jsx)("td",{className:(0,r.cn)("border-plexus-border border-t px-3 py-2 text-plexus-text-2",e),...s})};function c({content:e,className:s}){return e.trim()?(0,l.jsx)("div",{className:(0,r.cn)("min-w-0 text-sm",s),children:(0,l.jsx)(a.oz,{remarkPlugins:[i.A],rehypePlugins:[n.A],components:x,children:e})}):(0,l.jsx)("div",{className:(0,r.cn)("text-sm text-plexus-text-3",s),children:"Empty markdown file."})}var o=t(6197),d=t(7788),u=t(7294),p=t(4926),m=t(8564),h=t(6969),b=t(9250),f=t(5572),g=t(3932),j=t(1207),v=t(8874),N=t(5587),y=t.n(N),k=t(7620);function w(e){return null==e?"—":e<1024?`${e}B`:e<1048576?`${(e/1024).toFixed(1)}KB`:`${(e/1024/1024).toFixed(1)}MB`}function C({data:e}){let s=e.skills.filter(e=>e.isSymlink).length,t=e.skills.length-s;return(0,l.jsxs)("div",{className:"space-y-8",children:[(0,l.jsxs)("section",{className:"space-y-3",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,l.jsx)("h2",{className:"plexus-eyebrow",children:"Instruction Files"}),(0,l.jsx)(d.Button,{asChild:!0,variant:"ghost",size:"sm",children:(0,l.jsxs)(y(),{href:"/rules",children:["Manage in Rules page ",(0,l.jsx)(p.A,{className:"h-3 w-3",strokeWidth:1.5})]})})]}),0===e.instructionFiles.length&&(0,l.jsxs)("div",{className:"text-sm text-plexus-text-3",children:["No conventional instruction file for ",e.displayName,"."]}),e.instructionFiles.length>0&&(0,l.jsxs)(u.Z,{className:"overflow-hidden",children:[e.instructionFiles.map(s=>(0,l.jsx)("div",{className:"border-b border-plexus-border/60 p-4 text-sm last:border-0",children:(0,l.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[(0,l.jsx)("span",{className:"font-semibold text-plexus-text",children:s.label}),s.status.exists?(0,l.jsx)(o.E,{variant:"synced",children:"exists"}):(0,l.jsx)(o.E,{variant:"native",children:"not yet created"})]}),(0,l.jsx)("code",{className:"mt-1 block truncate font-mono text-xs text-plexus-text-3",children:s.status.path})]}),(0,l.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:s.status.exists?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(F,{agentId:e.id,filePath:s.status.path,mode:"view",label:"View"}),(0,l.jsx)(F,{agentId:e.id,filePath:s.status.path,mode:"edit",label:"Edit"})]}):(0,l.jsx)(F,{agentId:e.id,filePath:s.status.path,mode:"edit",label:"Create",allowCreate:!0})})]})},s.status.path)),(0,l.jsx)("div",{className:"border-t border-plexus-border/60 bg-plexus-surface-2/40 px-4 py-3 text-xs text-plexus-text-3",children:"Use Rules to edit the shared baseline, import from this agent, or apply the baseline across all tools."})]})]}),(0,l.jsx)("section",{className:"space-y-3",children:(0,l.jsxs)("details",{className:"group",children:[(0,l.jsxs)("summary",{className:"flex cursor-pointer list-none items-center justify-between rounded-md border border-plexus-border bg-plexus-surface px-4 py-3 transition-colors hover:bg-plexus-surface-2/60",children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)(m.A,{className:"h-4 w-4 text-plexus-text-3 transition-transform group-open:rotate-90",strokeWidth:1.5}),(0,l.jsx)("span",{className:"plexus-eyebrow",children:"Skills"}),(0,l.jsx)("span",{className:"text-sm text-plexus-text-2",children:e.skills.length}),s>0&&(0,l.jsxs)(o.E,{variant:"synced",children:[s," Plexus-owned"]}),t>0&&(0,l.jsxs)(o.E,{variant:"divergent",children:[t," agent-local"]})]}),(0,l.jsxs)(y(),{href:"/skills",onClick:e=>e.stopPropagation(),className:"inline-flex items-center gap-1 text-xs text-plexus-accent hover:underline",children:["Manage in Skills page ",(0,l.jsx)(p.A,{className:"h-3 w-3",strokeWidth:1.5})]})]}),(0,l.jsxs)(u.Z,{className:"mt-2 overflow-hidden",children:[(0,l.jsxs)("div",{className:"grid grid-cols-[1fr_auto_auto] gap-x-4 border-b border-plexus-border px-4 py-3 text-[11px] uppercase tracking-[0.10em] text-plexus-text-3",children:[(0,l.jsx)("div",{children:"ID"}),(0,l.jsx)("div",{className:"text-right",children:"Owner"}),(0,l.jsx)("div",{className:"text-right",children:"Action"})]}),0===e.skills.length&&(0,l.jsx)("div",{className:"px-4 py-8 text-center text-sm text-plexus-text-3",children:"No skills installed for this agent."}),e.skills.slice(0,50).map(s=>(0,l.jsxs)("div",{className:"grid grid-cols-[1fr_auto_auto] gap-x-4 border-b border-plexus-border/60 px-4 py-2.5 text-sm last:border-0 hover:bg-plexus-surface-2/40",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"font-mono text-[13px] text-plexus-text",children:s.id}),s.isSymlink&&s.linkTarget&&(0,l.jsxs)("div",{className:"mt-0.5 text-[10px] text-plexus-text-3",children:["→ ",function(e,s=60){if(e.length<=s)return e;let t=Math.floor(s/2-2),l=Math.floor(s/2-2);return`${e.slice(0,t)}…${e.slice(e.length-l)}`}(s.linkTarget,80)]})]}),(0,l.jsx)("div",{className:"text-right",children:s.isSymlink?(0,l.jsx)(o.E,{variant:"synced",children:"Plexus-owned"}):(0,l.jsx)(o.E,{variant:"divergent",children:"agent-local"})}),(0,l.jsx)("div",{className:"text-right",children:s.hasSkillMd&&(0,l.jsx)(F,{agentId:e.id,filePath:`${s.path}/SKILL.md`,mode:"view",label:"View"})})]},s.path)),e.skills.length>50&&(0,l.jsxs)("div",{className:"border-t border-plexus-border/60 px-4 py-2 text-center text-xs text-plexus-text-3",children:["… and ",e.skills.length-50," more (manage on the Skills page)"]})]})]})}),(0,l.jsx)("section",{className:"space-y-3",children:(0,l.jsxs)("details",{className:"group",children:[(0,l.jsxs)("summary",{className:"flex cursor-pointer list-none items-center justify-between rounded-md border border-plexus-border bg-plexus-surface px-4 py-3 transition-colors hover:bg-plexus-surface-2/60",children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)(m.A,{className:"h-4 w-4 text-plexus-text-3 transition-transform group-open:rotate-90",strokeWidth:1.5}),(0,l.jsx)("span",{className:"plexus-eyebrow",children:"MCP File"}),(0,l.jsx)(o.E,{variant:"exclusive"===e.mcpFileMode?"synced":"divergent",title:"exclusive"===e.mcpFileMode?"Plexus owns this file end-to-end via a symlink.":"Shared file — Plexus only rewrites its own section.",children:e.mcpFileMode}),e.mcpFile.exists?e.mcpFile.isSymlink?(0,l.jsx)(o.E,{variant:"synced",children:"symlink"}):(0,l.jsx)(o.E,{variant:"native",children:"regular file"}):(0,l.jsx)(o.E,{variant:"native",children:"missing"})]}),(0,l.jsx)("span",{className:"text-xs text-plexus-text-3",children:w(e.mcpFile.size)})]}),(0,l.jsxs)(u.Z,{className:"mt-2 p-4 text-sm",children:[(0,l.jsx)("code",{className:"font-mono text-plexus-text-2",children:e.mcpFile.path}),e.mcpFile.isSymlink&&e.mcpFile.linkTarget&&(0,l.jsxs)("div",{className:"mt-2 text-xs text-plexus-text-3",children:[(0,l.jsx)("span",{className:"text-plexus-text",children:"→"})," ",(0,l.jsx)("code",{className:"font-mono",children:e.mcpFile.linkTarget})]}),(0,l.jsxs)("div",{className:"mt-3 flex gap-4 text-xs text-plexus-text-3",children:[(0,l.jsxs)("span",{children:["size: ",w(e.mcpFile.size)]}),(0,l.jsxs)("span",{children:["mtime: ",function(e){if(!e)return"—";let s=new Date(e);return Number.isNaN(s.getTime())?"—":`${s.toISOString().slice(0,19).replace("T"," ")} UTC`}(e.mcpFile.mtime)]})]}),(0,l.jsxs)("div",{className:"mt-4 flex gap-2",children:[(0,l.jsx)(d.Button,{asChild:!0,variant:"ghost",size:"sm",children:(0,l.jsxs)(y(),{href:"/mcp",children:["Edit MCP servers ",(0,l.jsx)(p.A,{className:"h-3.5 w-3.5",strokeWidth:1.5})]})}),e.mcpFile.exists&&(0,l.jsx)(F,{agentId:e.id,filePath:e.mcpFile.path,mode:"view",label:"View raw"})]})]})]})})]})}function F({agentId:e,filePath:s,label:t,mode:r,allowCreate:a}){let n="edit"===r,[i,x]=(0,k.useState)(!1),[u,p]=(0,k.useState)(!1),[m,N]=(0,k.useState)(""),[w,C]=(0,k.useState)(!1),[S,A]=(0,k.useState)(!1),[E,P]=(0,k.useState)(null),z=/\.(md|markdown)$/i.test(s);async function W(){A(!0),P(null);try{let t=await fetch(`/api/agent/${e}/file`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({path:s,content:m})}),l=await t.json();l.ok?(P(l.backup?`Saved. Backup: ${l.backup}`:"Saved."),setTimeout(()=>p(!1),700)):P(`Save failed: ${l.message}`)}finally{A(!1)}}(0,k.useEffect)(()=>{if(u&&!w){if(a){N(""),C(!0);return}fetch(`/api/agent/${e}/file?path=${encodeURIComponent(s)}`).then(e=>e.json()).then(e=>{e.ok?N(e.content):P(`Read failed: ${e.message}`),C(!0)})}},[u,e,s,w,a]);let $=t??(n?"Edit":"View");return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(d.Button,{variant:n?"secondary":"ghost",size:"sm",onClick:function(){n?x(!0):p(!0)},children:[n?(0,l.jsx)(h.A,{className:"h-3.5 w-3.5",strokeWidth:1.5}):(0,l.jsx)(b.A,{className:"h-3.5 w-3.5",strokeWidth:1.5}),$]}),i&&(0,l.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-6",children:[(0,l.jsx)("button",{type:"button","aria-label":"Close confirmation",className:"absolute inset-0 cursor-default bg-black/70",onClick:()=>x(!1)}),(0,l.jsxs)("div",{className:"relative z-10 w-full max-w-md cursor-default overflow-hidden rounded-md border border-plexus-border bg-plexus-surface text-left shadow-lg",children:[(0,l.jsxs)("div",{className:"flex items-start gap-3 border-b border-plexus-border px-5 py-4",children:[(0,l.jsx)("div",{className:"mt-0.5 rounded-md bg-amber-500/10 p-2 text-amber-400",children:(0,l.jsx)(f.A,{className:"h-4 w-4",strokeWidth:1.5})}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsx)("div",{className:"text-sm font-semibold text-plexus-text",children:a?"About to create a live agent file":"About to edit a live agent file"}),(0,l.jsx)("code",{className:"mt-1 block break-all font-mono text-xs text-plexus-text-3",children:s})]}),(0,l.jsx)("button",{type:"button","aria-label":"Cancel",onClick:()=>x(!1),className:"text-plexus-text-3 hover:text-plexus-text",children:(0,l.jsx)(g.A,{className:"h-4 w-4",strokeWidth:1.5})})]}),(0,l.jsxs)("div",{className:"space-y-3 px-5 py-4 text-sm text-plexus-text-2",children:[(0,l.jsx)("p",{children:"Changes save directly to the file the agent reads — there is no staging step."}),(0,l.jsxs)("div",{className:"flex items-start gap-2 rounded-md border border-plexus-border bg-plexus-surface-2/60 px-3 py-2 text-xs",children:[(0,l.jsx)(j.A,{className:"mt-0.5 h-3.5 w-3.5 flex-shrink-0 text-plexus-accent",strokeWidth:1.5}),(0,l.jsxs)("span",{children:["Plexus will ",(0,l.jsx)("span",{className:"text-plexus-text",children:"automatically snapshot"})," the current contents before the first save. If anything goes wrong, restore it from the"," ",(0,l.jsx)(y(),{href:"/backups",className:"text-plexus-accent hover:underline",children:"Backups"})," ","page."]})]})]}),(0,l.jsxs)("div",{className:"flex items-center justify-end gap-2 border-t border-plexus-border bg-plexus-surface-2/40 px-5 py-3",children:[(0,l.jsx)(d.Button,{variant:"ghost",size:"sm",onClick:()=>x(!1),children:"Cancel"}),(0,l.jsxs)(d.Button,{variant:"primary",size:"sm",onClick:function(){x(!1),p(!0)},children:[(0,l.jsx)(h.A,{className:"h-3.5 w-3.5",strokeWidth:1.5}),a?"Create file":"Yes, edit"]})]})]})]}),u&&(0,l.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-6",children:[(0,l.jsx)("button",{type:"button","aria-label":"Close file viewer",className:"absolute inset-0 cursor-default bg-black/70",onClick:()=>p(!1)}),(0,l.jsxs)("div",{className:"relative z-10 flex h-[80vh] w-[80vw] max-w-5xl cursor-default flex-col overflow-hidden rounded-md border border-plexus-border bg-plexus-surface text-left shadow-lg",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between border-b border-plexus-border px-5 py-3",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[n?(0,l.jsx)(o.E,{variant:"divergent",children:"editing"}):(0,l.jsx)(o.E,{variant:"synced",children:"read only"}),(0,l.jsx)("code",{className:"font-mono text-xs text-plexus-text-3",children:s})]}),(0,l.jsx)("button",{type:"button","aria-label":"Close",onClick:()=>p(!1),className:"text-plexus-text-3 hover:text-plexus-text",children:(0,l.jsx)(g.A,{className:"h-4 w-4",strokeWidth:1.5})})]}),n&&(0,l.jsxs)("div",{className:"flex items-center gap-2 border-b border-plexus-border bg-amber-500/5 px-5 py-2 text-xs text-amber-400/90",children:[(0,l.jsx)(j.A,{className:"h-3.5 w-3.5 flex-shrink-0",strokeWidth:1.5}),(0,l.jsxs)("span",{children:["Auto-backup runs before save. Restore from"," ",(0,l.jsx)(y(),{href:"/backups",className:"underline",children:"/backups"})," ","any time."]})]}),E&&(0,l.jsx)("div",{className:"border-b border-plexus-border bg-plexus-surface-2 px-5 py-2 text-xs text-plexus-text-2",children:E}),(0,l.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden bg-plexus-bg",children:w?z?n?(0,l.jsxs)("div",{className:"grid h-full min-h-0 grid-cols-1 lg:grid-cols-2",children:[(0,l.jsxs)("div",{className:"flex min-h-0 flex-col border-plexus-border border-b lg:border-r lg:border-b-0",children:[(0,l.jsx)("div",{className:"border-plexus-border border-b bg-plexus-surface px-4 py-2 text-[11px] font-medium uppercase tracking-[0.12em] text-plexus-text-3",children:"Markdown"}),(0,l.jsx)("textarea",{className:"min-h-[260px] flex-1 resize-none bg-plexus-bg p-4 font-mono text-xs leading-6 text-plexus-text outline-none",value:m,onChange:e=>N(e.target.value),spellCheck:!1})]}),(0,l.jsxs)("div",{className:"flex min-h-0 flex-col",children:[(0,l.jsx)("div",{className:"border-plexus-border border-b bg-plexus-surface px-4 py-2 text-[11px] font-medium uppercase tracking-[0.12em] text-plexus-text-3",children:"Preview"}),(0,l.jsx)("div",{className:"min-h-0 flex-1 overflow-auto px-5 py-4",children:(0,l.jsx)(c,{content:m})})]})]}):(0,l.jsx)("div",{className:"h-full overflow-auto px-6 py-5",children:(0,l.jsx)(c,{content:m})}):(0,l.jsx)("textarea",{className:"h-full w-full resize-none bg-plexus-bg p-4 font-mono text-xs leading-6 text-plexus-text outline-none",value:m,readOnly:!n,onChange:e=>N(e.target.value),spellCheck:!1}):(0,l.jsxs)("div",{className:"flex h-full items-center justify-center gap-2 text-sm text-plexus-text-3",children:[(0,l.jsx)(v.A,{className:"h-4 w-4 animate-spin",strokeWidth:1.5}),"Loading file…"]})}),(0,l.jsxs)("div",{className:"flex items-center justify-end gap-2 border-t border-plexus-border px-5 py-3",children:[(0,l.jsx)(d.Button,{variant:"ghost",size:"sm",onClick:()=>p(!1),children:"Close"}),n&&(0,l.jsxs)(d.Button,{variant:"primary",size:"sm",onClick:W,disabled:S,children:[S&&(0,l.jsx)(v.A,{className:"h-3.5 w-3.5 animate-spin",strokeWidth:1.5}),S?"Saving…":"Save"]})]})]})]})]})}},4980:(e,s,t)=>{Promise.resolve().then(t.bind(t,4641)),Promise.resolve().then(t.bind(t,4228)),Promise.resolve().then(t.t.bind(t,5587,23))},6197:(e,s,t)=>{"use strict";t.d(s,{E:()=>n,m:()=>i});var l=t(4568),r=t(7483);let a=(0,t(1397).F)("inline-flex items-center gap-1 rounded-sm px-2 h-5 text-[11px] font-medium tracking-[0.01em]",{variants:{variant:{team:"bg-plexus-info/15 text-plexus-info",personal:"bg-plexus-accent-faint text-plexus-accent",synced:"bg-plexus-ok/15 text-plexus-ok",divergent:"bg-plexus-warn/15 text-plexus-warn",native:"bg-plexus-text-3/15 text-plexus-text-3",beta:"bg-plexus-accent-faint text-plexus-accent border border-plexus-accent/25",danger:"bg-plexus-err/13 text-plexus-err",outline:"border border-plexus-border text-plexus-text-2"}},defaultVariants:{variant:"outline"}});function n({className:e,variant:s,...t}){return(0,l.jsx)("span",{className:(0,r.cn)(a({variant:s}),e),...t})}function i({className:e,tone:s="ok"}){return(0,l.jsx)("span",{className:(0,r.cn)("inline-block h-1.5 w-1.5 rounded-full",{ok:"bg-plexus-ok",warn:"bg-plexus-warn",err:"bg-plexus-err",info:"bg-plexus-info",accent:"bg-plexus-accent",mute:"bg-plexus-text-3"}[s],e)})}},7294:(e,s,t)=>{"use strict";t.d(s,{Z:()=>n});var l=t(4568),r=t(7483),a=t(7620);let n=(0,a.forwardRef)(({className:e,...s},t)=>(0,l.jsx)("div",{ref:t,className:(0,r.cn)("rounded-md border border-plexus-border bg-plexus-surface","transition-colors duration-plexus-normal ease-plexus-out",e),...s}));n.displayName="Card",(0,a.forwardRef)(({className:e,...s},t)=>(0,l.jsx)(n,{ref:t,className:(0,r.cn)("hover:border-plexus-border-strong hover:-translate-y-px",e),...s})).displayName="CardHover"},7483:(e,s,t)=>{"use strict";t.d(s,{cn:()=>a});var l=t(9917),r=t(2809);function a(...e){return(0,r.QP)((0,l.$)(e))}},7788:(e,s,t)=>{"use strict";t.d(s,{Button:()=>c});var l=t(4568),r=t(7483),a=t(8347),n=t(1397),i=t(7620);let x=(0,n.F)((0,r.cn)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded font-medium","transition-colors duration-plexus-normal ease-plexus-out","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-plexus-accent/50 focus-visible:ring-offset-1 focus-visible:ring-offset-plexus-bg","disabled:pointer-events-none disabled:opacity-50"),{variants:{variant:{primary:"bg-plexus-accent text-[#1a1a17] hover:bg-plexus-accent-2 border border-plexus-accent",secondary:"bg-plexus-surface-2 text-plexus-text border border-plexus-border hover:bg-plexus-surface hover:border-plexus-border-strong",ghost:"bg-transparent text-plexus-text-2 hover:bg-plexus-surface-2 hover:text-plexus-text border border-transparent",danger:"bg-transparent text-plexus-err border border-plexus-err/35 hover:bg-plexus-err/10","danger-solid":"bg-plexus-err text-white border border-plexus-err hover:bg-plexus-err/90"},size:{default:"h-9 px-3.5 text-sm",sm:"h-7 px-2.5 text-xs",lg:"h-10 px-4 text-sm",icon:"h-9 w-9 p-0"}},defaultVariants:{variant:"secondary",size:"default"}}),c=(0,i.forwardRef)(({className:e,variant:s,size:t,asChild:n=!1,type:i="button",...c},o)=>{let d=n?a.DX:"button";return(0,l.jsx)(d,{ref:o,type:n?void 0:i,className:(0,r.cn)(x({variant:s,size:t}),e),...c})});c.displayName="Button"}},e=>{e.O(0,[4399,5587,3090,587,1968,7358],()=>e(e.s=4980)),_N_E=e.O()}]);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2210],{
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2210],{744:(e,s,t)=>{Promise.resolve().then(t.bind(t,5537))},4110:(e,s,t)=>{"use strict";t.d(s,{A:()=>r});let r=(0,t(9789).A)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},5537:(e,s,t)=>{"use strict";t.d(s,{BackupsPanel:()=>h});var r=t(4568),a=t(7788),i=t(7294),n=t(4110),l=t(7812),o=t(8564),d=t(8874);let c=(0,t(9789).A)("undo-2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);var x=t(7620);function u(e,s=60){if(e.length<=s)return e;let t=Math.floor(s/2-2),r=Math.floor(s/2-2);return`${e.slice(0,t)}…${e.slice(e.length-r)}`}function h({initial:e}){let[s,t]=(0,x.useState)(e),[p,m]=(0,x.useState)(null),[f,g]=(0,x.useState)(null),[b,v]=(0,x.useState)(new Set);async function N(){let e=await fetch("/api/backups");t((await e.json()).snapshots??[])}async function j(e){if(confirm(`Restore snapshot ${e}?
|
|
2
2
|
|
|
3
|
-
This overwrites the current files at the backed-up paths. Plexus does NOT take a fresh snapshot before restoring — the latest agent state will be lost.`)){m(e),g(null);try{let s=await fetch(`/api/backups/${encodeURIComponent(e)}/restore`,{method:"POST"}),t=await s.json();t.ok?g(`Restored ${t.restored} file(s) from ${e}.${t.errors?.length?` Errors: ${t.errors.join("; ")}`:""}`):g(`Restore failed: ${t.errors?.join("; ")??t.message}`),await N()}finally{m(null)}}}return(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"text-xs tracking-[0.02em] text-plexus-text-3",children:[s.length," snapshot",1===s.length?"":"s"," \xb7 Plexus keeps the most recent 20"]}),(0,r.jsxs)(a.Button,{variant:"ghost",size:"sm",onClick:N,children:[(0,r.jsx)(n.A,{className:"h-3.5 w-3.5",strokeWidth:1.5})," Refresh"]})]}),f&&(0,r.jsx)(i.Z,{className:"border-l-[3px] border-l-plexus-ok px-4 py-2.5 text-xs text-plexus-text-2",children:f}),0===s.length?(0,r.jsxs)(i.Z,{className:"px-5 py-10 text-center",children:[(0,r.jsx)("div",{className:"text-sm text-plexus-text-2",children:"No snapshots yet — they'll appear here after your first sync or edit."}),(0,r.jsx)("div",{className:"mt-1 text-xs text-plexus-text-3",children:"Plexus auto-snapshots every agent's MCP file before any write."})]}):(0,r.jsx)("div",{className:"space-y-2",children:s.map(e=>{let s=new Date(e.id.replace(/-/g,":").slice(0,23)),t=b.has(e.id);return(0,r.jsxs)(i.Z,{className:"p-4",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("div",{className:"font-mono text-sm text-plexus-text",children:Number.isNaN(s.getTime())?e.id:s.toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}),(0,r.jsxs)("div",{className:"mt-0.5 truncate text-xs text-plexus-text-3",children:[e.entries.length," file",1===e.entries.length?"":"s"," \xb7"," ",(0,r.jsx)("code",{className:"font-mono",children:u(e.dir,70)})]})]}),(0,r.jsxs)("div",{className:"flex shrink-0 gap-2",children:[(0,r.jsxs)(a.Button,{variant:"ghost",size:"sm",onClick:()=>{var s;let t;return s=e.id,void((t=new Set(b)).has(s)?t.delete(s):t.add(s),v(t))},children:[t?(0,r.jsx)(l.A,{className:"h-3.5 w-3.5",strokeWidth:1.5}):(0,r.jsx)(o.A,{className:"h-3.5 w-3.5",strokeWidth:1.5}),t?"Hide":"Details"]}),(0,r.jsxs)(a.Button,{variant:"danger",size:"sm",onClick:()=>j(e.id),disabled:p===e.id||0===e.entries.length,title:"Overwrite live agent files with this snapshot",children:[p===e.id?(0,r.jsx)(d.A,{className:"h-3.5 w-3.5 animate-spin",strokeWidth:1.5}):(0,r.jsx)(c,{className:"h-3.5 w-3.5",strokeWidth:1.5}),p===e.id?"Restoring…":"Restore"]})]})]}),t&&(0,r.jsxs)("div",{className:"mt-3 space-y-1 border-t border-plexus-border pt-3 text-xs",children:[0===e.entries.length&&(0,r.jsx)("div",{className:"text-plexus-text-3",children:"No file entries."}),e.entries.map(e=>(0,r.jsxs)("div",{className:"grid grid-cols-[1fr_auto] gap-3",children:[(0,r.jsx)("code",{className:"font-mono text-plexus-text",children:u(e.originalPath,80)}),(0,r.jsx)("span",{className:"text-plexus-text-3",children:e.agent??"single-file"})]},`${e.agent??"single"}:${e.originalPath}`))]})]},e.id)})})]})}},7294:(e,s,t)=>{"use strict";t.d(s,{Z:()=>n});var r=t(4568),a=t(7483),i=t(7620);let n=(0,i.forwardRef)(({className:e,...s},t)=>(0,r.jsx)("div",{ref:t,className:(0,a.cn)("rounded-md border border-plexus-border bg-plexus-surface","transition-colors duration-plexus-normal ease-plexus-out",e),...s}));n.displayName="Card",(0,i.forwardRef)(({className:e,...s},t)=>(0,r.jsx)(n,{ref:t,className:(0,a.cn)("hover:border-plexus-border-strong hover:-translate-y-px",e),...s})).displayName="CardHover"},7483:(e,s,t)=>{"use strict";t.d(s,{cn:()=>i});var r=t(9917),a=t(2809);function i(...e){return(0,a.QP)((0,r.$)(e))}},7788:(e,s,t)=>{"use strict";t.d(s,{Button:()=>d});var r=t(4568),a=t(7483),i=t(8347),n=t(1397),l=t(7620);let o=(0,n.F)((0,a.cn)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded font-medium","transition-colors duration-plexus-normal ease-plexus-out","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-plexus-accent/50 focus-visible:ring-offset-1 focus-visible:ring-offset-plexus-bg","disabled:pointer-events-none disabled:opacity-50"),{variants:{variant:{primary:"bg-plexus-accent text-[#1a1a17] hover:bg-plexus-accent-2 border border-plexus-accent",secondary:"bg-plexus-surface-2 text-plexus-text border border-plexus-border hover:bg-plexus-surface hover:border-plexus-border-strong",ghost:"bg-transparent text-plexus-text-2 hover:bg-plexus-surface-2 hover:text-plexus-text border border-transparent",danger:"bg-transparent text-plexus-err border border-plexus-err/35 hover:bg-plexus-err/10","danger-solid":"bg-plexus-err text-white border border-plexus-err hover:bg-plexus-err/90"},size:{default:"h-9 px-3.5 text-sm",sm:"h-7 px-2.5 text-xs",lg:"h-10 px-4 text-sm",icon:"h-9 w-9 p-0"}},defaultVariants:{variant:"secondary",size:"default"}}),d=(0,l.forwardRef)(({className:e,variant:s,size:t,asChild:n=!1,type:l="button",...d},c)=>{let x=n?i.DX:"button";return(0,r.jsx)(x,{ref:c,type:n?void 0:l,className:(0,a.cn)(o({variant:s,size:t}),e),...d})});d.displayName="Button"},7812:(e,s,t)=>{"use strict";t.d(s,{A:()=>r});let r=(0,t(9789).A)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},8564:(e,s,t)=>{"use strict";t.d(s,{A:()=>r});let r=(0,t(9789).A)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},8874:(e,s,t)=>{"use strict";t.d(s,{A:()=>r});let r=(0,t(9789).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])}},e=>{e.O(0,[4399,587,1968,7358],()=>e(e.s=
|
|
3
|
+
This overwrites the current files at the backed-up paths. Plexus does NOT take a fresh snapshot before restoring — the latest agent state will be lost.`)){m(e),g(null);try{let s=await fetch(`/api/backups/${encodeURIComponent(e)}/restore`,{method:"POST"}),t=await s.json();t.ok?g(`Restored ${t.restored} file(s) from ${e}.${t.errors?.length?` Errors: ${t.errors.join("; ")}`:""}`):g(`Restore failed: ${t.errors?.join("; ")??t.message}`),await N()}finally{m(null)}}}return(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"text-xs tracking-[0.02em] text-plexus-text-3",children:[s.length," snapshot",1===s.length?"":"s"," \xb7 Plexus keeps the most recent 20"]}),(0,r.jsxs)(a.Button,{variant:"ghost",size:"sm",onClick:N,children:[(0,r.jsx)(n.A,{className:"h-3.5 w-3.5",strokeWidth:1.5})," Refresh"]})]}),f&&(0,r.jsx)(i.Z,{className:"border-l-[3px] border-l-plexus-ok px-4 py-2.5 text-xs text-plexus-text-2",children:f}),0===s.length?(0,r.jsxs)(i.Z,{className:"px-5 py-10 text-center",children:[(0,r.jsx)("div",{className:"text-sm text-plexus-text-2",children:"No snapshots yet — they'll appear here after your first sync or edit."}),(0,r.jsx)("div",{className:"mt-1 text-xs text-plexus-text-3",children:"Plexus auto-snapshots every agent's MCP file before any write."})]}):(0,r.jsx)("div",{className:"space-y-2",children:s.map(e=>{let s=new Date(e.id.replace(/-/g,":").slice(0,23)),t=b.has(e.id);return(0,r.jsxs)(i.Z,{className:"p-4",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("div",{className:"font-mono text-sm text-plexus-text",children:Number.isNaN(s.getTime())?e.id:s.toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}),(0,r.jsxs)("div",{className:"mt-0.5 truncate text-xs text-plexus-text-3",children:[e.entries.length," file",1===e.entries.length?"":"s"," \xb7"," ",(0,r.jsx)("code",{className:"font-mono",children:u(e.dir,70)})]})]}),(0,r.jsxs)("div",{className:"flex shrink-0 gap-2",children:[(0,r.jsxs)(a.Button,{variant:"ghost",size:"sm",onClick:()=>{var s;let t;return s=e.id,void((t=new Set(b)).has(s)?t.delete(s):t.add(s),v(t))},children:[t?(0,r.jsx)(l.A,{className:"h-3.5 w-3.5",strokeWidth:1.5}):(0,r.jsx)(o.A,{className:"h-3.5 w-3.5",strokeWidth:1.5}),t?"Hide":"Details"]}),(0,r.jsxs)(a.Button,{variant:"danger",size:"sm",onClick:()=>j(e.id),disabled:p===e.id||0===e.entries.length,title:"Overwrite live agent files with this snapshot",children:[p===e.id?(0,r.jsx)(d.A,{className:"h-3.5 w-3.5 animate-spin",strokeWidth:1.5}):(0,r.jsx)(c,{className:"h-3.5 w-3.5",strokeWidth:1.5}),p===e.id?"Restoring…":"Restore"]})]})]}),t&&(0,r.jsxs)("div",{className:"mt-3 space-y-1 border-t border-plexus-border pt-3 text-xs",children:[0===e.entries.length&&(0,r.jsx)("div",{className:"text-plexus-text-3",children:"No file entries."}),e.entries.map(e=>(0,r.jsxs)("div",{className:"grid grid-cols-[1fr_auto] gap-3",children:[(0,r.jsx)("code",{className:"font-mono text-plexus-text",children:u(e.originalPath,80)}),(0,r.jsx)("span",{className:"text-plexus-text-3",children:e.agent??"single-file"})]},`${e.agent??"single"}:${e.originalPath}`))]})]},e.id)})})]})}},7294:(e,s,t)=>{"use strict";t.d(s,{Z:()=>n});var r=t(4568),a=t(7483),i=t(7620);let n=(0,i.forwardRef)(({className:e,...s},t)=>(0,r.jsx)("div",{ref:t,className:(0,a.cn)("rounded-md border border-plexus-border bg-plexus-surface","transition-colors duration-plexus-normal ease-plexus-out",e),...s}));n.displayName="Card",(0,i.forwardRef)(({className:e,...s},t)=>(0,r.jsx)(n,{ref:t,className:(0,a.cn)("hover:border-plexus-border-strong hover:-translate-y-px",e),...s})).displayName="CardHover"},7483:(e,s,t)=>{"use strict";t.d(s,{cn:()=>i});var r=t(9917),a=t(2809);function i(...e){return(0,a.QP)((0,r.$)(e))}},7788:(e,s,t)=>{"use strict";t.d(s,{Button:()=>d});var r=t(4568),a=t(7483),i=t(8347),n=t(1397),l=t(7620);let o=(0,n.F)((0,a.cn)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded font-medium","transition-colors duration-plexus-normal ease-plexus-out","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-plexus-accent/50 focus-visible:ring-offset-1 focus-visible:ring-offset-plexus-bg","disabled:pointer-events-none disabled:opacity-50"),{variants:{variant:{primary:"bg-plexus-accent text-[#1a1a17] hover:bg-plexus-accent-2 border border-plexus-accent",secondary:"bg-plexus-surface-2 text-plexus-text border border-plexus-border hover:bg-plexus-surface hover:border-plexus-border-strong",ghost:"bg-transparent text-plexus-text-2 hover:bg-plexus-surface-2 hover:text-plexus-text border border-transparent",danger:"bg-transparent text-plexus-err border border-plexus-err/35 hover:bg-plexus-err/10","danger-solid":"bg-plexus-err text-white border border-plexus-err hover:bg-plexus-err/90"},size:{default:"h-9 px-3.5 text-sm",sm:"h-7 px-2.5 text-xs",lg:"h-10 px-4 text-sm",icon:"h-9 w-9 p-0"}},defaultVariants:{variant:"secondary",size:"default"}}),d=(0,l.forwardRef)(({className:e,variant:s,size:t,asChild:n=!1,type:l="button",...d},c)=>{let x=n?i.DX:"button";return(0,r.jsx)(x,{ref:c,type:n?void 0:l,className:(0,a.cn)(o({variant:s,size:t}),e),...d})});d.displayName="Button"},7812:(e,s,t)=>{"use strict";t.d(s,{A:()=>r});let r=(0,t(9789).A)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},8564:(e,s,t)=>{"use strict";t.d(s,{A:()=>r});let r=(0,t(9789).A)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},8874:(e,s,t)=>{"use strict";t.d(s,{A:()=>r});let r=(0,t(9789).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])}},e=>{e.O(0,[4399,587,1968,7358],()=>e(e.s=744)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9302],{4110:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(9789).A)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9302],{4110:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(9789).A)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},6712:(e,t,s)=>{Promise.resolve().then(s.bind(s,8725))},7024:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(9789).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},7294:(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var r=s(4568),a=s(7483),n=s(7620);let l=(0,n.forwardRef)(({className:e,...t},s)=>(0,r.jsx)("div",{ref:s,className:(0,a.cn)("rounded-md border border-plexus-border bg-plexus-surface","transition-colors duration-plexus-normal ease-plexus-out",e),...t}));l.displayName="Card",(0,n.forwardRef)(({className:e,...t},s)=>(0,r.jsx)(l,{ref:s,className:(0,a.cn)("hover:border-plexus-border-strong hover:-translate-y-px",e),...t})).displayName="CardHover"},7483:(e,t,s)=>{"use strict";s.d(t,{cn:()=>n});var r=s(9917),a=s(2809);function n(...e){return(0,a.QP)((0,r.$)(e))}},7788:(e,t,s)=>{"use strict";s.d(t,{Button:()=>c});var r=s(4568),a=s(7483),n=s(8347),l=s(1397),i=s(7620);let o=(0,l.F)((0,a.cn)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded font-medium","transition-colors duration-plexus-normal ease-plexus-out","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-plexus-accent/50 focus-visible:ring-offset-1 focus-visible:ring-offset-plexus-bg","disabled:pointer-events-none disabled:opacity-50"),{variants:{variant:{primary:"bg-plexus-accent text-[#1a1a17] hover:bg-plexus-accent-2 border border-plexus-accent",secondary:"bg-plexus-surface-2 text-plexus-text border border-plexus-border hover:bg-plexus-surface hover:border-plexus-border-strong",ghost:"bg-transparent text-plexus-text-2 hover:bg-plexus-surface-2 hover:text-plexus-text border border-transparent",danger:"bg-transparent text-plexus-err border border-plexus-err/35 hover:bg-plexus-err/10","danger-solid":"bg-plexus-err text-white border border-plexus-err hover:bg-plexus-err/90"},size:{default:"h-9 px-3.5 text-sm",sm:"h-7 px-2.5 text-xs",lg:"h-10 px-4 text-sm",icon:"h-9 w-9 p-0"}},defaultVariants:{variant:"secondary",size:"default"}}),c=(0,i.forwardRef)(({className:e,variant:t,size:s,asChild:l=!1,type:i="button",...c},d)=>{let u=l?n.DX:"button";return(0,r.jsx)(u,{ref:d,type:l?void 0:i,className:(0,a.cn)(o({variant:t,size:s}),e),...c})});c.displayName="Button"},8725:(e,t,s)=>{"use strict";s.d(t,{DebugPanel:()=>u});var r=s(4568),a=s(7788),n=s(7294),l=s(8874),i=s(4110),o=s(7024);let c=(0,s(9789).A)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);var d=s(7620);function u({initialText:e}){let[t,s]=(0,d.useState)(e),[x,p]=(0,d.useState)(!1),[h,b]=(0,d.useState)(!1),[f,g]=(0,d.useState)(null);async function m(){p(!0),g(null);try{let e=await fetch("/api/debug",{cache:"no-store"}),t=await e.json();"string"==typeof t.text?s(t.text):g("Unexpected response shape from /api/debug")}catch(e){g(e instanceof Error?e.message:String(e))}finally{p(!1)}}async function v(){try{await navigator.clipboard.writeText(t),b(!0),setTimeout(()=>b(!1),1500)}catch(e){g(e instanceof Error?e.message:String(e))}}let y=t.split("\n").length,w=new Blob([t]).size;return(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"text-xs tracking-[0.02em] text-plexus-text-3",children:[y," lines \xb7 ",w.toLocaleString()," bytes \xb7 paths only, no file contents"]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsxs)(a.Button,{variant:"ghost",size:"sm",onClick:m,disabled:x,children:[x?(0,r.jsx)(l.A,{className:"h-3.5 w-3.5 animate-spin",strokeWidth:1.5}):(0,r.jsx)(i.A,{className:"h-3.5 w-3.5",strokeWidth:1.5}),"Refresh"]}),(0,r.jsxs)(a.Button,{variant:"primary",size:"sm",onClick:v,children:[h?(0,r.jsx)(o.A,{className:"h-3.5 w-3.5",strokeWidth:1.5}):(0,r.jsx)(c,{className:"h-3.5 w-3.5",strokeWidth:1.5}),h?"Copied":"Copy to clipboard"]})]})]}),f&&(0,r.jsx)(n.Z,{className:"border-l-[3px] border-l-plexus-err px-4 py-2.5 text-xs text-plexus-text-2",children:f}),(0,r.jsx)(n.Z,{className:"p-0",children:(0,r.jsx)("textarea",{readOnly:!0,value:t,spellCheck:!1,className:"w-full resize-y rounded-md bg-plexus-surface px-4 py-3 font-mono text-xs leading-relaxed text-plexus-text outline-none",style:{minHeight:"60vh"}})})]})}},8874:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(9789).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])}},e=>{e.O(0,[4399,587,1968,7358],()=>e(e.s=6712)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{572:(e,s,t)=>{"use strict";t.d(s,{ThemeProvider:()=>l});var r=t(4568),a=t(9227);function l({children:e}){return(0,r.jsx)(a.N,{attribute:"data-theme",defaultTheme:"light",enableSystem:!0,disableTransitionOnChange:!0,themes:["dark","light"],children:e})}},1107:(e,s,t)=>{"use strict";t.d(s,{AppSidebar:()=>w});var r=t(4568),a=t(6439),l=t(6197),n=t(7483),i=t(4435),o=t(6581),u=t(5830),x=t(1207),c=t(7939),p=t(2928),d=t(6706),b=t(6356),m=t(5885),h=t(5587),g=t.n(h),f=t(9748);let v={en:{tagline:"team agent config",workspace:"Workspace",configuration:"Configuration",dashboard:"Dashboard",rules:"Rules",mcp:"MCP Servers",skills:"Skills",mirror:"Mirror",backups:"Backups",debug:"Debug",team:"Team",settings:"Settings",poweredBy:"Powered by",idle:"Idle",runSync:"Run sync to see status"},zh:{tagline:"团队 AI Agent 配置",workspace:"工作区",configuration:"配置",dashboard:"仪表盘",rules:"规则",mcp:"MCP 服务",skills:"技能",mirror:"镜像同步",backups:"备份",debug:"调试",team:"团队",settings:"设置",poweredBy:"Powered by",idle:"空闲",runSync:"运行同步后查看状态"}};function k({className:e}){return(0,r.jsxs)("svg",{role:"img",viewBox:"0 0 24 24",className:e,fill:"currentColor",children:[(0,r.jsx)("title",{children:"GitHub"}),(0,r.jsx)("path",{d:"M12 .5C5.65.5.5 5.65.5 12c0 5.09 3.29 9.39 7.86 10.91.58.11.79-.25.79-.56v-2.14c-3.2.7-3.88-1.36-3.88-1.36-.52-1.33-1.28-1.69-1.28-1.69-1.05-.72.08-.71.08-.71 1.16.08 1.77 1.19 1.77 1.19 1.03 1.76 2.7 1.25 3.36.96.1-.75.4-1.25.73-1.54-2.55-.29-5.24-1.28-5.24-5.69 0-1.26.45-2.28 1.19-3.09-.12-.29-.52-1.46.11-3.04 0 0 .97-.31 3.16 1.18a10.9 10.9 0 0 1 5.75 0c2.19-1.49 3.16-1.18 3.16-1.18.63 1.58.23 2.75.11 3.04.74.81 1.19 1.83 1.19 3.09 0 4.42-2.69 5.4-5.25 5.69.41.36.78 1.06.78 2.14v3.16c0 .31.21.67.79.56A11.52 11.52 0 0 0 23.5 12C23.5 5.65 18.35.5 12 .5Z"})]})}function w(){let e=(0,f.usePathname)(),{locale:s}=(0,a.o)(),t=v[s];return(0,r.jsxs)("aside",{className:"flex w-full shrink-0 flex-col border-plexus-border border-b bg-plexus-surface px-3 py-5 lg:sticky lg:top-0 lg:h-screen lg:w-[240px] lg:border-r lg:border-b-0",children:[(0,r.jsxs)("div",{className:"mb-6 px-2",children:[(0,r.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,r.jsx)("span",{className:"inline-block h-2.5 w-2.5 rounded-full bg-plexus-accent"}),(0,r.jsx)("span",{className:"plexus-title",children:"Plexus"}),(0,r.jsxs)("span",{className:"font-mono text-[11px] text-plexus-text-3",children:["v","0.0.6"]})]}),(0,r.jsx)("div",{className:"mt-1 px-3 text-[12px] tracking-[0.02em] text-plexus-text-3",children:t.tagline})]}),[{group:t.workspace,items:[{href:"/",label:t.dashboard,icon:i.A},{href:"/rules",label:t.rules,icon:o.A},{href:"/mcp",label:t.mcp,icon:u.A},{href:"/skills",label:t.skills,icon:x.A},{href:"/mirror",label:t.mirror,icon:c.A}]},{group:t.configuration,items:[{href:"/backups",label:t.backups,icon:p.A},{href:"/debug",label:t.debug,icon:d.A},{href:"/team",label:t.team,icon:b.A,beta:!0},{href:"/settings",label:t.settings,icon:m.A}]}].map((s,t)=>(0,r.jsxs)("div",{className:(0,n.cn)("px-1",0===t?"mb-2":""),children:[t>0&&(0,r.jsx)("div",{className:"my-3.5 h-px bg-plexus-border"}),(0,r.jsx)("div",{className:"plexus-eyebrow mb-2 px-2",children:s.group}),(0,r.jsx)("div",{className:"flex flex-col gap-0.5",children:s.items.map(s=>{let t="/"===s.href?"/"===e:e===s.href||e.startsWith(`${s.href}/`),a=s.icon;return(0,r.jsxs)(g(),{href:s.href,className:(0,n.cn)("flex h-8 items-center gap-2.5 rounded-sm px-2.5 text-[13px]","transition-colors duration-plexus-fast ease-plexus-out",t?"bg-plexus-surface-2 text-plexus-text shadow-[inset_2px_0_0_var(--plexus-accent)]":"text-plexus-text-2 hover:bg-plexus-surface-2 hover:text-plexus-text"),children:[(0,r.jsx)(a,{className:"h-4 w-4 shrink-0",strokeWidth:1.5}),(0,r.jsx)("span",{children:s.label}),s.beta&&(0,r.jsx)(l.E,{variant:"beta",className:"ml-auto",children:"beta"})]},s.href)})})]},s.group)),(0,r.jsxs)("div",{className:"mt-auto border-t border-plexus-border px-3 pt-4",children:[(0,r.jsxs)("a",{href:"https://github.com/miniLV/Plexus",target:"_blank",rel:"noreferrer",className:"group mb-4 flex items-center gap-2.5 rounded-md border border-plexus-border bg-plexus-surface-2/70 px-2.5 py-2 shadow-[inset_0_1px_0_rgb(255_255_255/0.035)] transition-colors duration-plexus-fast ease-plexus-out hover:border-plexus-accent/45 hover:bg-plexus-surface-2",children:[(0,r.jsx)("span",{className:"grid h-7 w-7 shrink-0 place-items-center rounded-sm border border-plexus-border bg-plexus-bg text-plexus-text-2 transition-colors duration-plexus-fast ease-plexus-out group-hover:border-plexus-accent/40 group-hover:text-plexus-accent",children:(0,r.jsx)(k,{className:"h-4 w-4"})}),(0,r.jsxs)("span",{className:"min-w-0 leading-none",children:[(0,r.jsx)("span",{className:"block text-[9px] font-medium uppercase tracking-[0.14em] text-plexus-text-mute",children:t.poweredBy}),(0,r.jsx)("span",{className:"mt-1 block text-[13px] font-semibold tracking-[0.01em] text-plexus-text",children:"miniLV"})]})]}),(0,r.jsxs)("div",{className:"mb-1 flex items-center gap-2",children:[(0,r.jsxs)("span",{className:"relative inline-flex h-1.5 w-1.5",children:[(0,r.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-plexus-ok opacity-60"}),(0,r.jsx)("span",{className:"relative inline-flex h-1.5 w-1.5 rounded-full bg-plexus-ok"})]}),(0,r.jsx)("span",{className:"text-sm font-medium text-plexus-text",children:t.idle})]}),(0,r.jsx)("div",{className:"text-[12px] tracking-[0.02em] text-plexus-text-3",children:t.runSync})]})]})}},1458:(e,s,t)=>{"use strict";t.d(s,{AppTopbar:()=>m});var r=t(4568),a=t(6439),l=t(7788),n=t(3913);function i(){let{locale:e,toggleLocale:s}=(0,a.o)();return(0,r.jsxs)(l.Button,{type:"button",variant:"ghost",size:"sm",onClick:s,title:"zh"===e?"Switch to English":"切换到中文",className:"h-9",children:[(0,r.jsx)(n.A,{className:"h-4 w-4",strokeWidth:1.5}),"zh"===e?"English":"中文"]})}var o=t(7483),u=t(9227),x=t(7620);function c({className:e}){let{resolvedTheme:s,setTheme:t}=(0,u.D)(),[a,l]=(0,x.useState)(!1);(0,x.useEffect)(()=>l(!0),[]);let n=a&&"light"===s;return(0,r.jsx)("button",{type:"button","aria-label":"Toggle theme",title:n?"Switch to dark":"Switch to light",onClick:()=>t(n?"dark":"light"),className:(0,o.cn)("relative h-7 w-14 rounded-full border border-plexus-border bg-plexus-surface-2","transition-colors duration-plexus-normal",e),children:(0,r.jsx)("span",{className:(0,o.cn)("absolute top-[2px] left-[2px] h-[22px] w-[22px] rounded-full bg-plexus-accent","transition-transform duration-plexus-normal ease-plexus-out",n&&"translate-x-7")})})}var p=t(8742),d=t(9748);let b={en:{workspace:"Workspace",configuration:"Configuration",dashboard:"Dashboard",rules:"Rules",mcp:"MCP Servers",skills:"Skills",mirror:"Mirror",backups:"Backups",debug:"Debug",team:"Team",settings:"Settings",agentDetail:"Agent detail",plexus:"Plexus",searchTitle:"Search (coming soon)",search:"Search..."},zh:{workspace:"工作区",configuration:"配置",dashboard:"仪表盘",rules:"规则",mcp:"MCP 服务",skills:"技能",mirror:"镜像同步",backups:"备份",debug:"调试",team:"团队",settings:"设置",agentDetail:"Agent 详情",plexus:"Plexus",searchTitle:"搜索(即将支持)",search:"搜索..."}};function m(){let e=(0,d.usePathname)(),{locale:s}=(0,a.o)(),t=b[s],{group:l,label:n}=function(e,s){let t={"/":s.dashboard,"/rules":s.rules,"/mcp":s.mcp,"/skills":s.skills,"/mirror":s.mirror,"/backups":s.backups,"/debug":s.debug,"/team":s.team,"/settings":s.settings};if("/"===e)return{group:s.workspace,label:s.dashboard};if(e.startsWith("/agents/"))return{group:`${s.workspace} / ${s.dashboard}`,label:s.agentDetail};let r=`/${e.split("/")[1]}`,a=t[r]??s.plexus;return{group:"/backups"===r||"/team"===r||"/settings"===r||"/debug"===r?s.configuration:s.workspace,label:a}}(e,t);return(0,r.jsxs)("header",{className:"flex min-h-[64px] shrink-0 flex-wrap items-center justify-between gap-3 border-b border-plexus-border px-4 py-3 lg:px-10",children:[(0,r.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-3 text-[12px] tracking-[0.02em] text-plexus-text-3",children:[l.split(" / ").map((e,s,t)=>(0,r.jsxs)("span",{className:"flex items-center gap-3",children:[(0,r.jsx)("span",{children:e}),s<t.length-1&&(0,r.jsx)("span",{children:"/"})]},`${e}-${s}`)),(0,r.jsx)("span",{children:"/"}),(0,r.jsx)("span",{className:"text-plexus-text-2",children:n})]}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2 lg:gap-3",children:[(0,r.jsxs)("button",{type:"button",className:"inline-flex h-9 items-center gap-2 rounded border border-transparent px-3 text-plexus-text-2 hover:bg-plexus-surface-2 hover:text-plexus-text",title:t.searchTitle,disabled:!0,children:[(0,r.jsx)(p.A,{className:"h-4 w-4",strokeWidth:1.5}),(0,r.jsx)("span",{className:"text-[12px] tracking-[0.02em] text-plexus-text-3",children:t.search}),(0,r.jsx)("span",{className:"ml-2 rounded border border-plexus-border bg-plexus-surface-2 px-1.5 py-0.5 font-mono text-[11px] text-plexus-text-mute",children:"⌘K"})]}),(0,r.jsx)(i,{}),(0,r.jsx)(c,{}),(0,r.jsx)("div",{className:"grid h-8 w-8 place-items-center rounded-full bg-plexus-accent-faint font-semibold text-plexus-accent",children:"M"})]})]})}},4309:(e,s,t)=>{Promise.resolve().then(t.bind(t,1107)),Promise.resolve().then(t.bind(t,1458)),Promise.resolve().then(t.bind(t,6439)),Promise.resolve().then(t.bind(t,572)),Promise.resolve().then(t.bind(t,4757)),Promise.resolve().then(t.t.bind(t,3597,23)),Promise.resolve().then(t.t.bind(t,6944,23))},4757:(e,s,t)=>{"use strict";t.d(s,{TooltipProvider:()=>i});var r=t(4568),a=t(7483),l=t(7257),n=t(7620);let i=l.Kq;l.bL,l.l9,(0,n.forwardRef)(({className:e,sideOffset:s=6,...t},n)=>(0,r.jsx)(l.ZL,{children:(0,r.jsx)(l.UC,{ref:n,sideOffset:s,className:(0,a.cn)("z-50 rounded-sm border border-plexus-border bg-plexus-surface-2","px-2 py-1 text-xs text-plexus-text shadow-sm","animate-in fade-in-0 zoom-in-95",e),...t})})).displayName=l.UC.displayName},6197:(e,s,t)=>{"use strict";t.d(s,{E:()=>n,m:()=>i});var r=t(4568),a=t(7483);let l=(0,t(1397).F)("inline-flex items-center gap-1 rounded-sm px-2 h-5 text-[11px] font-medium tracking-[0.01em]",{variants:{variant:{team:"bg-plexus-info/15 text-plexus-info",personal:"bg-plexus-accent-faint text-plexus-accent",synced:"bg-plexus-ok/15 text-plexus-ok",divergent:"bg-plexus-warn/15 text-plexus-warn",native:"bg-plexus-text-3/15 text-plexus-text-3",beta:"bg-plexus-accent-faint text-plexus-accent border border-plexus-accent/25",danger:"bg-plexus-err/13 text-plexus-err",outline:"border border-plexus-border text-plexus-text-2"}},defaultVariants:{variant:"outline"}});function n({className:e,variant:s,...t}){return(0,r.jsx)("span",{className:(0,a.cn)(l({variant:s}),e),...t})}function i({className:e,tone:s="ok"}){return(0,r.jsx)("span",{className:(0,a.cn)("inline-block h-1.5 w-1.5 rounded-full",{ok:"bg-plexus-ok",warn:"bg-plexus-warn",err:"bg-plexus-err",info:"bg-plexus-info",accent:"bg-plexus-accent",mute:"bg-plexus-text-3"}[s],e)})}},6439:(e,s,t)=>{"use strict";t.d(s,{LanguageProvider:()=>x,o:()=>c});var r=t(4568);let a="plexus.locale";function l(e){if(!e)return null;let s=e.toLowerCase();return"zh"===s||s.startsWith("zh-")?"zh":"en"===s||s.startsWith("en-")?"en":null}var n=t(9748),i=t(7620);let o=(0,i.createContext)(null);function u(e){window.localStorage.setItem(a,e),document.cookie=`plexus-locale=${e}; path=/; max-age=31536000; samesite=lax`}function x({children:e,initialLocale:s}){let t=(0,n.useRouter)(),[c,p]=(0,i.useState)(s);(0,i.useEffect)(()=>{var e;let r,n=l(window.localStorage.getItem(a))??s??(r=(Array.isArray(e=window.navigator.languages??window.navigator.language)?e.map((e,s)=>({value:e,q:1,index:s})):"string"==typeof e?e.split(",").map((e,s)=>{let[t="",...r]=e.trim().split(";"),a=r.find(e=>e.trim().startsWith("q=")),l=a?Number(a.trim().slice(2)):1;return{value:t,q:Number.isFinite(l)?l:1,index:s}}):[]).map(e=>({...e,locale:l(e.value)})).filter(e=>null!==e.locale).sort((e,s)=>s.q-e.q||e.index-s.index),r[0]?.locale??"en");if(n!==s){u(n),t.refresh();return}u(n),p(s)},[s,t]);let d=(0,i.useMemo)(()=>({locale:c,setLocale(e){u(e),t.refresh()},toggleLocale(){u("zh"===c?"en":"zh"),t.refresh()}}),[c,t]);return(0,r.jsx)(o.Provider,{value:d,children:e})}function c(){let e=(0,i.useContext)(o);if(!e)throw Error("useLanguage must be used inside LanguageProvider");return e}},6944:()=>{},7483:(e,s,t)=>{"use strict";t.d(s,{cn:()=>l});var r=t(9917),a=t(2809);function l(...e){return(0,a.QP)((0,r.$)(e))}},7788:(e,s,t)=>{"use strict";t.d(s,{Button:()=>u});var r=t(4568),a=t(7483),l=t(8347),n=t(1397),i=t(7620);let o=(0,n.F)((0,a.cn)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded font-medium","transition-colors duration-plexus-normal ease-plexus-out","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-plexus-accent/50 focus-visible:ring-offset-1 focus-visible:ring-offset-plexus-bg","disabled:pointer-events-none disabled:opacity-50"),{variants:{variant:{primary:"bg-plexus-accent text-[#1a1a17] hover:bg-plexus-accent-2 border border-plexus-accent",secondary:"bg-plexus-surface-2 text-plexus-text border border-plexus-border hover:bg-plexus-surface hover:border-plexus-border-strong",ghost:"bg-transparent text-plexus-text-2 hover:bg-plexus-surface-2 hover:text-plexus-text border border-transparent",danger:"bg-transparent text-plexus-err border border-plexus-err/35 hover:bg-plexus-err/10","danger-solid":"bg-plexus-err text-white border border-plexus-err hover:bg-plexus-err/90"},size:{default:"h-9 px-3.5 text-sm",sm:"h-7 px-2.5 text-xs",lg:"h-10 px-4 text-sm",icon:"h-9 w-9 p-0"}},defaultVariants:{variant:"secondary",size:"default"}}),u=(0,i.forwardRef)(({className:e,variant:s,size:t,asChild:n=!1,type:i="button",...u},x)=>{let c=n?l.DX:"button";return(0,r.jsx)(c,{ref:x,type:n?void 0:i,className:(0,a.cn)(o({variant:s,size:t}),e),...u})});u.displayName="Button"}},e=>{e.O(0,[2380,4399,5587,3051,626,587,1968,7358],()=>e(e.s=4309)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[313],{169:(e,t,s)=>{"use strict";s.d(t,{McpEditor:()=>p});var a=s(4568),r=s(6197),n=s(7788),l=s(7294),o=s(3932),i=s(7378),d=s(3035),c=s(7620);let x={"claude-code":"Claude",cursor:"Cursor",codex:"Codex","gemini-cli":"Gemini","qwen-code":"Qwen","factory-droid":"Droid"};function p({initial:e,agents:t,displayNames:s,installed:u}){let[m,h]=(0,c.useState)(e),[g,b]=(0,c.useState)(null),[f,y]=(0,c.useState)(!1),[v,j]=(0,c.useState)({id:"",command:"",args:"",enabledAgents:t}),[N,w]=(0,c.useState)(null);async function k(){let e=await fetch("/api/mcp/effective");h((await e.json()).rows??[])}async function C(e,t,s){if("team"!==e.authority){b(`${e.id}:${t}`);try{let a=await fetch(`/api/mcp/${encodeURIComponent(e.id)}/toggle`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({agent:t,enabled:s})}),r=await a.json();r.ok||w(`Error: ${r.message}`),await k()}finally{b(null)}}}async function A(){if(!v.id||!v.command)return void w("id and command are required");if(m.some(e=>e.id===v.id))return void w(`Duplicate id: ${v.id}`);b("__new__");try{let e=await fetch("/api/mcp",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({servers:[...m.filter(e=>"personal"===e.authority).map(e=>({id:e.id,command:e.command,args:e.args,env:e.env,layer:"personal",enabledAgents:e.enabledAgents??[]})),{id:v.id,command:v.command,args:v.args.split(/\s+/).filter(Boolean),layer:"personal",enabledAgents:v.enabledAgents}]})});if(!e.ok)return void w(await e.text());await fetch("/api/sync",{method:"POST"}),j({id:"",command:"",args:"",enabledAgents:t}),y(!1),w(null),await k()}finally{b(null)}}async function P(e){if("personal"===e.authority&&confirm(`Delete ${e.id} from Plexus and all agents?`)){b(e.id);try{let t=m.filter(t=>"personal"===t.authority&&t.id!==e.id).map(e=>({id:e.id,command:e.command,args:e.args,env:e.env,layer:"personal",enabledAgents:e.enabledAgents??[]}));await fetch("/api/mcp",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({servers:t})}),await fetch("/api/sync",{method:"POST"}),await k()}finally{b(null)}}}return(0,a.jsxs)("div",{className:"space-y-5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"text-xs tracking-[0.02em] text-plexus-text-3",children:[m.length," unique server",1===m.length?"":"s"," \xb7"," ",m.filter(e=>"personal"===e.authority).length," in personal store \xb7"," ",m.filter(e=>"native"===e.authority).length," native-only"]}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[N&&(0,a.jsx)("span",{className:"text-xs text-plexus-err",children:N}),(0,a.jsxs)(n.Button,{variant:f?"ghost":"secondary",size:"sm",onClick:()=>y(!f),children:[f?(0,a.jsx)(o.A,{className:"h-3.5 w-3.5",strokeWidth:1.5}):(0,a.jsx)(i.A,{className:"h-3.5 w-3.5",strokeWidth:1.5}),f?"Cancel":"Add MCP"]})]})]}),f&&(0,a.jsxs)(l.Z,{className:"space-y-3 border-l-[3px] border-l-plexus-accent p-4",children:[(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,a.jsx)("input",{className:"h-9 rounded border border-plexus-border bg-plexus-bg px-3 text-sm placeholder:text-plexus-text-mute focus:border-plexus-accent focus:outline-none",placeholder:"id (e.g. github)",value:v.id,onChange:e=>j({...v,id:e.target.value})}),(0,a.jsx)("input",{className:"h-9 rounded border border-plexus-border bg-plexus-bg px-3 text-sm placeholder:text-plexus-text-mute focus:border-plexus-accent focus:outline-none",placeholder:"command (e.g. npx)",value:v.command,onChange:e=>j({...v,command:e.target.value})})]}),(0,a.jsx)("input",{className:"h-9 w-full rounded border border-plexus-border bg-plexus-bg px-3 font-mono text-sm placeholder:text-plexus-text-mute focus:border-plexus-accent focus:outline-none",placeholder:"args (space-separated)",value:v.args,onChange:e=>j({...v,args:e.target.value})}),(0,a.jsx)(n.Button,{variant:"primary",size:"sm",onClick:A,disabled:"__new__"===g,children:"Save and sync"})]}),(0,a.jsx)(l.Z,{className:"overflow-hidden",children:(0,a.jsxs)("table",{className:"w-full border-collapse text-sm",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"border-b border-plexus-border text-left text-[11px] uppercase tracking-[0.10em] text-plexus-text-3",children:[(0,a.jsx)("th",{className:"px-4 py-3 font-medium",children:"ID"}),(0,a.jsx)("th",{className:"px-4 py-3 font-medium",children:"Layer"}),(0,a.jsx)("th",{className:"px-4 py-3 font-medium",children:"Command"}),t.map(e=>(0,a.jsx)("th",{className:"px-2 py-3 text-center font-medium",children:s[e]??x[e]??e},e)),(0,a.jsx)("th",{className:"px-4 py-3"})]})}),(0,a.jsxs)("tbody",{children:[0===m.length&&(0,a.jsx)("tr",{children:(0,a.jsxs)("td",{colSpan:4+t.length,className:"px-4 py-10 text-center text-sm text-plexus-text-3",children:["No MCP servers anywhere. Click ",(0,a.jsx)("span",{className:"text-plexus-text",children:"Add MCP"})," ","to create one."]})}),m.map(e=>{var n;return(0,a.jsxs)("tr",{className:"border-b border-plexus-border/60 last:border-0 hover:bg-plexus-surface-2/40",children:[(0,a.jsx)("td",{className:"px-4 py-3 font-mono text-[13px] text-plexus-text",children:e.id}),(0,a.jsx)("td",{className:"px-4 py-3",children:(0,a.jsx)(r.E,{variant:"team"===(n=e.authority)?"team":"personal"===n?"personal":"native",title:"native"===e.authority?"Only in agent native config — toggling promotes to personal":"team"===e.authority?"Authority lives in the team layer (read-only)":"Managed in your personal Plexus layer",children:e.authority})}),(0,a.jsxs)("td",{className:"px-4 py-3 font-mono text-xs text-plexus-text-3",children:[e.command," ",(e.args??[]).join(" ")]}),t.map(t=>{let r=e.effectiveAgents.includes(t),n=g===`${e.id}:${t}`,l="team"===e.authority||!u[t];return(0,a.jsx)("td",{className:"px-2 py-3 text-center",children:(0,a.jsx)("input",{type:"checkbox",checked:r,disabled:l||n,onChange:s=>C(e,t,s.target.checked),className:"h-4 w-4 cursor-pointer accent-plexus-accent disabled:cursor-not-allowed disabled:opacity-40",title:u[t]?"":`${s[t]} not installed`})},t)}),(0,a.jsx)("td",{className:"px-4 py-3 text-right",children:"personal"===e.authority&&(0,a.jsx)("button",{type:"button",onClick:()=>P(e),disabled:g===e.id,className:"text-plexus-text-3 hover:text-plexus-err disabled:opacity-50",title:"Delete from Plexus and all agents",children:(0,a.jsx)(d.A,{className:"h-3.5 w-3.5",strokeWidth:1.5})})})]},e.id)})]})]})}),(0,a.jsxs)(l.Z,{className:"space-y-2 px-4 py-3 text-xs leading-relaxed text-plexus-text-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(r.E,{variant:"native",children:"native"})," items are still only in the agent's own config. Toggling promotes them into your personal Plexus store. ",(0,a.jsx)(r.E,{variant:"team",children:"team"})," ","items live in the team repo and are read-only here."]}),(0,a.jsxs)("details",{children:[(0,a.jsx)("summary",{className:"cursor-pointer text-plexus-text-2 hover:text-plexus-text",children:"How does checking a box change the file system?"}),(0,a.jsxs)("div",{className:"mt-2 space-y-2 leading-relaxed",children:[(0,a.jsxs)("p",{children:[(0,a.jsx)("strong",{className:"text-plexus-text",children:"Cursor / Factory Droid"}),": their MCP file is a single symlink to"," ",(0,a.jsx)("code",{className:"rounded bg-plexus-surface-2 px-1 py-0.5 font-mono text-[11px]",children:"~/.config/plexus/.cache/mcp/<agent>.json"}),". Plexus regenerates that cache file from your store; the agent transparently sees the new entries via the symlink."]}),(0,a.jsxs)("p",{children:[(0,a.jsx)("strong",{className:"text-plexus-text",children:"Claude Code / Codex / Gemini CLI / Qwen Code"}),": their files carry many unrelated keys (auth/history/[profile]…), so Plexus partial-writes only the"," ",(0,a.jsx)("code",{className:"rounded bg-plexus-surface-2 px-1 py-0.5 font-mono text-[11px]",children:"mcpServers"})," ","section. The rest of the file is preserved byte-for-byte."]}),(0,a.jsxs)("p",{children:["Every toggle takes a backup snapshot to"," ",(0,a.jsx)("code",{className:"rounded bg-plexus-surface-2 px-1 py-0.5 font-mono text-[11px]",children:"~/.config/plexus/backups/<timestamp>/"})," ","first."]})]})]})]})]})}},3035:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(9789).A)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]])},3932:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(9789).A)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},6197:(e,t,s)=>{"use strict";s.d(t,{E:()=>l,m:()=>o});var a=s(4568),r=s(7483);let n=(0,s(1397).F)("inline-flex items-center gap-1 rounded-sm px-2 h-5 text-[11px] font-medium tracking-[0.01em]",{variants:{variant:{team:"bg-plexus-info/15 text-plexus-info",personal:"bg-plexus-accent-faint text-plexus-accent",synced:"bg-plexus-ok/15 text-plexus-ok",divergent:"bg-plexus-warn/15 text-plexus-warn",native:"bg-plexus-text-3/15 text-plexus-text-3",beta:"bg-plexus-accent-faint text-plexus-accent border border-plexus-accent/25",danger:"bg-plexus-err/13 text-plexus-err",outline:"border border-plexus-border text-plexus-text-2"}},defaultVariants:{variant:"outline"}});function l({className:e,variant:t,...s}){return(0,a.jsx)("span",{className:(0,r.cn)(n({variant:t}),e),...s})}function o({className:e,tone:t="ok"}){return(0,a.jsx)("span",{className:(0,r.cn)("inline-block h-1.5 w-1.5 rounded-full",{ok:"bg-plexus-ok",warn:"bg-plexus-warn",err:"bg-plexus-err",info:"bg-plexus-info",accent:"bg-plexus-accent",mute:"bg-plexus-text-3"}[t],e)})}},7294:(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var a=s(4568),r=s(7483),n=s(7620);let l=(0,n.forwardRef)(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,r.cn)("rounded-md border border-plexus-border bg-plexus-surface","transition-colors duration-plexus-normal ease-plexus-out",e),...t}));l.displayName="Card",(0,n.forwardRef)(({className:e,...t},s)=>(0,a.jsx)(l,{ref:s,className:(0,r.cn)("hover:border-plexus-border-strong hover:-translate-y-px",e),...t})).displayName="CardHover"},7378:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(9789).A)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},7483:(e,t,s)=>{"use strict";s.d(t,{cn:()=>n});var a=s(9917),r=s(2809);function n(...e){return(0,r.QP)((0,a.$)(e))}},7788:(e,t,s)=>{"use strict";s.d(t,{Button:()=>d});var a=s(4568),r=s(7483),n=s(8347),l=s(1397),o=s(7620);let i=(0,l.F)((0,r.cn)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded font-medium","transition-colors duration-plexus-normal ease-plexus-out","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-plexus-accent/50 focus-visible:ring-offset-1 focus-visible:ring-offset-plexus-bg","disabled:pointer-events-none disabled:opacity-50"),{variants:{variant:{primary:"bg-plexus-accent text-[#1a1a17] hover:bg-plexus-accent-2 border border-plexus-accent",secondary:"bg-plexus-surface-2 text-plexus-text border border-plexus-border hover:bg-plexus-surface hover:border-plexus-border-strong",ghost:"bg-transparent text-plexus-text-2 hover:bg-plexus-surface-2 hover:text-plexus-text border border-transparent",danger:"bg-transparent text-plexus-err border border-plexus-err/35 hover:bg-plexus-err/10","danger-solid":"bg-plexus-err text-white border border-plexus-err hover:bg-plexus-err/90"},size:{default:"h-9 px-3.5 text-sm",sm:"h-7 px-2.5 text-xs",lg:"h-10 px-4 text-sm",icon:"h-9 w-9 p-0"}},defaultVariants:{variant:"secondary",size:"default"}}),d=(0,o.forwardRef)(({className:e,variant:t,size:s,asChild:l=!1,type:o="button",...d},c)=>{let x=l?n.DX:"button";return(0,a.jsx)(x,{ref:c,type:l?void 0:o,className:(0,r.cn)(i({variant:t,size:s}),e),...d})});d.displayName="Button"},9687:(e,t,s)=>{Promise.resolve().then(s.bind(s,169))}},e=>{e.O(0,[4399,587,1968,7358],()=>e(e.s=9687)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[313],{169:(e,t,s)=>{"use strict";s.d(t,{McpEditor:()=>p});var a=s(4568),r=s(6197),n=s(7788),l=s(7294),o=s(3932),i=s(7378),d=s(3035),c=s(7620);let x={"claude-code":"Claude",cursor:"Cursor",codex:"Codex","gemini-cli":"Gemini","qwen-code":"Qwen","factory-droid":"Droid"};function p({initial:e,agents:t,displayNames:s,installed:u}){let[m,h]=(0,c.useState)(e),[g,b]=(0,c.useState)(null),[f,y]=(0,c.useState)(!1),[v,j]=(0,c.useState)({id:"",command:"",args:"",enabledAgents:t}),[N,w]=(0,c.useState)(null);async function k(){let e=await fetch("/api/mcp/effective");h((await e.json()).rows??[])}async function C(e,t,s){if("team"!==e.authority){b(`${e.id}:${t}`);try{let a=await fetch(`/api/mcp/${encodeURIComponent(e.id)}/toggle`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({agent:t,enabled:s})}),r=await a.json();r.ok||w(`Error: ${r.message}`),await k()}finally{b(null)}}}async function A(){if(!v.id||!v.command)return void w("id and command are required");if(m.some(e=>e.id===v.id))return void w(`Duplicate id: ${v.id}`);b("__new__");try{let e=await fetch("/api/mcp",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({servers:[...m.filter(e=>"personal"===e.authority).map(e=>({id:e.id,command:e.command,args:e.args,env:e.env,layer:"personal",enabledAgents:e.enabledAgents??[]})),{id:v.id,command:v.command,args:v.args.split(/\s+/).filter(Boolean),layer:"personal",enabledAgents:v.enabledAgents}]})});if(!e.ok)return void w(await e.text());await fetch("/api/sync",{method:"POST"}),j({id:"",command:"",args:"",enabledAgents:t}),y(!1),w(null),await k()}finally{b(null)}}async function P(e){if("personal"===e.authority&&confirm(`Delete ${e.id} from Plexus and all agents?`)){b(e.id);try{let t=m.filter(t=>"personal"===t.authority&&t.id!==e.id).map(e=>({id:e.id,command:e.command,args:e.args,env:e.env,layer:"personal",enabledAgents:e.enabledAgents??[]}));await fetch("/api/mcp",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({servers:t})}),await fetch("/api/sync",{method:"POST"}),await k()}finally{b(null)}}}return(0,a.jsxs)("div",{className:"space-y-5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"text-xs tracking-[0.02em] text-plexus-text-3",children:[m.length," unique server",1===m.length?"":"s"," \xb7"," ",m.filter(e=>"personal"===e.authority).length," in personal store \xb7"," ",m.filter(e=>"native"===e.authority).length," native-only"]}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[N&&(0,a.jsx)("span",{className:"text-xs text-plexus-err",children:N}),(0,a.jsxs)(n.Button,{variant:f?"ghost":"secondary",size:"sm",onClick:()=>y(!f),children:[f?(0,a.jsx)(o.A,{className:"h-3.5 w-3.5",strokeWidth:1.5}):(0,a.jsx)(i.A,{className:"h-3.5 w-3.5",strokeWidth:1.5}),f?"Cancel":"Add MCP"]})]})]}),f&&(0,a.jsxs)(l.Z,{className:"space-y-3 border-l-[3px] border-l-plexus-accent p-4",children:[(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,a.jsx)("input",{className:"h-9 rounded border border-plexus-border bg-plexus-bg px-3 text-sm placeholder:text-plexus-text-mute focus:border-plexus-accent focus:outline-none",placeholder:"id (e.g. github)",value:v.id,onChange:e=>j({...v,id:e.target.value})}),(0,a.jsx)("input",{className:"h-9 rounded border border-plexus-border bg-plexus-bg px-3 text-sm placeholder:text-plexus-text-mute focus:border-plexus-accent focus:outline-none",placeholder:"command (e.g. npx)",value:v.command,onChange:e=>j({...v,command:e.target.value})})]}),(0,a.jsx)("input",{className:"h-9 w-full rounded border border-plexus-border bg-plexus-bg px-3 font-mono text-sm placeholder:text-plexus-text-mute focus:border-plexus-accent focus:outline-none",placeholder:"args (space-separated)",value:v.args,onChange:e=>j({...v,args:e.target.value})}),(0,a.jsx)(n.Button,{variant:"primary",size:"sm",onClick:A,disabled:"__new__"===g,children:"Save and sync"})]}),(0,a.jsx)(l.Z,{className:"overflow-hidden",children:(0,a.jsxs)("table",{className:"w-full border-collapse text-sm",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"border-b border-plexus-border text-left text-[11px] uppercase tracking-[0.10em] text-plexus-text-3",children:[(0,a.jsx)("th",{className:"px-4 py-3 font-medium",children:"ID"}),(0,a.jsx)("th",{className:"px-4 py-3 font-medium",children:"Layer"}),(0,a.jsx)("th",{className:"px-4 py-3 font-medium",children:"Command"}),t.map(e=>(0,a.jsx)("th",{className:"px-2 py-3 text-center font-medium",children:s[e]??x[e]??e},e)),(0,a.jsx)("th",{className:"px-4 py-3"})]})}),(0,a.jsxs)("tbody",{children:[0===m.length&&(0,a.jsx)("tr",{children:(0,a.jsxs)("td",{colSpan:4+t.length,className:"px-4 py-10 text-center text-sm text-plexus-text-3",children:["No MCP servers anywhere. Click ",(0,a.jsx)("span",{className:"text-plexus-text",children:"Add MCP"})," ","to create one."]})}),m.map(e=>{var n;return(0,a.jsxs)("tr",{className:"border-b border-plexus-border/60 last:border-0 hover:bg-plexus-surface-2/40",children:[(0,a.jsx)("td",{className:"px-4 py-3 font-mono text-[13px] text-plexus-text",children:e.id}),(0,a.jsx)("td",{className:"px-4 py-3",children:(0,a.jsx)(r.E,{variant:"team"===(n=e.authority)?"team":"personal"===n?"personal":"native",title:"native"===e.authority?"Only in agent native config — toggling promotes to personal":"team"===e.authority?"Authority lives in the team layer (read-only)":"Managed in your personal Plexus layer",children:e.authority})}),(0,a.jsxs)("td",{className:"px-4 py-3 font-mono text-xs text-plexus-text-3",children:[e.command," ",(e.args??[]).join(" ")]}),t.map(t=>{let r=e.effectiveAgents.includes(t),n=g===`${e.id}:${t}`,l="team"===e.authority||!u[t];return(0,a.jsx)("td",{className:"px-2 py-3 text-center",children:(0,a.jsx)("input",{type:"checkbox",checked:r,disabled:l||n,onChange:s=>C(e,t,s.target.checked),className:"h-4 w-4 cursor-pointer accent-plexus-accent disabled:cursor-not-allowed disabled:opacity-40",title:u[t]?"":`${s[t]} not installed`})},t)}),(0,a.jsx)("td",{className:"px-4 py-3 text-right",children:"personal"===e.authority&&(0,a.jsx)("button",{type:"button",onClick:()=>P(e),disabled:g===e.id,className:"text-plexus-text-3 hover:text-plexus-err disabled:opacity-50",title:"Delete from Plexus and all agents",children:(0,a.jsx)(d.A,{className:"h-3.5 w-3.5",strokeWidth:1.5})})})]},e.id)})]})]})}),(0,a.jsxs)(l.Z,{className:"space-y-2 px-4 py-3 text-xs leading-relaxed text-plexus-text-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(r.E,{variant:"native",children:"native"})," items are still only in the agent's own config. Toggling promotes them into your personal Plexus store. ",(0,a.jsx)(r.E,{variant:"team",children:"team"})," ","items live in the team repo and are read-only here."]}),(0,a.jsxs)("details",{children:[(0,a.jsx)("summary",{className:"cursor-pointer text-plexus-text-2 hover:text-plexus-text",children:"How does checking a box change the file system?"}),(0,a.jsxs)("div",{className:"mt-2 space-y-2 leading-relaxed",children:[(0,a.jsxs)("p",{children:[(0,a.jsx)("strong",{className:"text-plexus-text",children:"Cursor / Factory Droid"}),": their MCP file is a single symlink to"," ",(0,a.jsx)("code",{className:"rounded bg-plexus-surface-2 px-1 py-0.5 font-mono text-[11px]",children:"~/.config/plexus/.cache/mcp/<agent>.json"}),". Plexus regenerates that cache file from your store; the agent transparently sees the new entries via the symlink."]}),(0,a.jsxs)("p",{children:[(0,a.jsx)("strong",{className:"text-plexus-text",children:"Claude Code / Codex / Gemini CLI / Qwen Code"}),": their files carry many unrelated keys (auth/history/[profile]…), so Plexus partial-writes only the"," ",(0,a.jsx)("code",{className:"rounded bg-plexus-surface-2 px-1 py-0.5 font-mono text-[11px]",children:"mcpServers"})," ","section. The rest of the file is preserved byte-for-byte."]}),(0,a.jsxs)("p",{children:["Every toggle takes a backup snapshot to"," ",(0,a.jsx)("code",{className:"rounded bg-plexus-surface-2 px-1 py-0.5 font-mono text-[11px]",children:"~/.config/plexus/backups/<timestamp>/"})," ","first."]})]})]})]})]})}},964:(e,t,s)=>{Promise.resolve().then(s.bind(s,169))},3035:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(9789).A)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]])},3932:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(9789).A)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},6197:(e,t,s)=>{"use strict";s.d(t,{E:()=>l,m:()=>o});var a=s(4568),r=s(7483);let n=(0,s(1397).F)("inline-flex items-center gap-1 rounded-sm px-2 h-5 text-[11px] font-medium tracking-[0.01em]",{variants:{variant:{team:"bg-plexus-info/15 text-plexus-info",personal:"bg-plexus-accent-faint text-plexus-accent",synced:"bg-plexus-ok/15 text-plexus-ok",divergent:"bg-plexus-warn/15 text-plexus-warn",native:"bg-plexus-text-3/15 text-plexus-text-3",beta:"bg-plexus-accent-faint text-plexus-accent border border-plexus-accent/25",danger:"bg-plexus-err/13 text-plexus-err",outline:"border border-plexus-border text-plexus-text-2"}},defaultVariants:{variant:"outline"}});function l({className:e,variant:t,...s}){return(0,a.jsx)("span",{className:(0,r.cn)(n({variant:t}),e),...s})}function o({className:e,tone:t="ok"}){return(0,a.jsx)("span",{className:(0,r.cn)("inline-block h-1.5 w-1.5 rounded-full",{ok:"bg-plexus-ok",warn:"bg-plexus-warn",err:"bg-plexus-err",info:"bg-plexus-info",accent:"bg-plexus-accent",mute:"bg-plexus-text-3"}[t],e)})}},7294:(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var a=s(4568),r=s(7483),n=s(7620);let l=(0,n.forwardRef)(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,r.cn)("rounded-md border border-plexus-border bg-plexus-surface","transition-colors duration-plexus-normal ease-plexus-out",e),...t}));l.displayName="Card",(0,n.forwardRef)(({className:e,...t},s)=>(0,a.jsx)(l,{ref:s,className:(0,r.cn)("hover:border-plexus-border-strong hover:-translate-y-px",e),...t})).displayName="CardHover"},7378:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(9789).A)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},7483:(e,t,s)=>{"use strict";s.d(t,{cn:()=>n});var a=s(9917),r=s(2809);function n(...e){return(0,r.QP)((0,a.$)(e))}},7788:(e,t,s)=>{"use strict";s.d(t,{Button:()=>d});var a=s(4568),r=s(7483),n=s(8347),l=s(1397),o=s(7620);let i=(0,l.F)((0,r.cn)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded font-medium","transition-colors duration-plexus-normal ease-plexus-out","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-plexus-accent/50 focus-visible:ring-offset-1 focus-visible:ring-offset-plexus-bg","disabled:pointer-events-none disabled:opacity-50"),{variants:{variant:{primary:"bg-plexus-accent text-[#1a1a17] hover:bg-plexus-accent-2 border border-plexus-accent",secondary:"bg-plexus-surface-2 text-plexus-text border border-plexus-border hover:bg-plexus-surface hover:border-plexus-border-strong",ghost:"bg-transparent text-plexus-text-2 hover:bg-plexus-surface-2 hover:text-plexus-text border border-transparent",danger:"bg-transparent text-plexus-err border border-plexus-err/35 hover:bg-plexus-err/10","danger-solid":"bg-plexus-err text-white border border-plexus-err hover:bg-plexus-err/90"},size:{default:"h-9 px-3.5 text-sm",sm:"h-7 px-2.5 text-xs",lg:"h-10 px-4 text-sm",icon:"h-9 w-9 p-0"}},defaultVariants:{variant:"secondary",size:"default"}}),d=(0,o.forwardRef)(({className:e,variant:t,size:s,asChild:l=!1,type:o="button",...d},c)=>{let x=l?n.DX:"button";return(0,a.jsx)(x,{ref:c,type:l?void 0:o,className:(0,r.cn)(i({variant:t,size:s}),e),...d})});d.displayName="Button"}},e=>{e.O(0,[4399,587,1968,7358],()=>e(e.s=964)),_N_E=e.O()}]);
|
package/vendor/plexus-agent-config-web/.next/static/chunks/app/mirror/page-5d4ac07dcc3218c5.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4352],{2015:(e,s,t)=>{Promise.resolve().then(t.bind(t,7103))},4110:(e,s,t)=>{"use strict";t.d(s,{A:()=>r});let r=(0,t(9789).A)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},4926:(e,s,t)=>{"use strict";t.d(s,{A:()=>r});let r=(0,t(9789).A)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},6197:(e,s,t)=>{"use strict";t.d(s,{E:()=>i,m:()=>n});var r=t(4568),a=t(7483);let l=(0,t(1397).F)("inline-flex items-center gap-1 rounded-sm px-2 h-5 text-[11px] font-medium tracking-[0.01em]",{variants:{variant:{team:"bg-plexus-info/15 text-plexus-info",personal:"bg-plexus-accent-faint text-plexus-accent",synced:"bg-plexus-ok/15 text-plexus-ok",divergent:"bg-plexus-warn/15 text-plexus-warn",native:"bg-plexus-text-3/15 text-plexus-text-3",beta:"bg-plexus-accent-faint text-plexus-accent border border-plexus-accent/25",danger:"bg-plexus-err/13 text-plexus-err",outline:"border border-plexus-border text-plexus-text-2"}},defaultVariants:{variant:"outline"}});function i({className:e,variant:s,...t}){return(0,r.jsx)("span",{className:(0,a.cn)(l({variant:s}),e),...t})}function n({className:e,tone:s="ok"}){return(0,r.jsx)("span",{className:(0,a.cn)("inline-block h-1.5 w-1.5 rounded-full",{ok:"bg-plexus-ok",warn:"bg-plexus-warn",err:"bg-plexus-err",info:"bg-plexus-info",accent:"bg-plexus-accent",mute:"bg-plexus-text-3"}[s],e)})}},7103:(e,s,t)=>{"use strict";t.d(s,{MirrorPanel:()=>p});var r=t(4568),a=t(6197),l=t(7788),i=t(7294),n=t(4110),c=t(8874),o=t(4926),d=t(7620);let x={"claude-code":"partial-write",cursor:"symlink",codex:"partial-write","gemini-cli":"partial-write","qwen-code":"partial-write","factory-droid":"symlink"};function p({agents:e,displayNames:s,installed:t}){let u=e.filter(e=>t[e]),[m,h]=(0,d.useState)(u[0]??e[0]),[g,b]=(0,d.useState)(new Set(u.filter(s=>s!==(u[0]??e[0])))),[v,f]=(0,d.useState)([]),[w,j]=(0,d.useState)(!1),[y,N]=(0,d.useState)(null);async function k(){let e=[];for(let s of g)e.push({agent:s,preview:null,loading:!0});f(e),f(await Promise.all(Array.from(g).map(async e=>{if(e===m)return{agent:e,preview:null,loading:!1};try{let s=await fetch(`/api/spread?from=${encodeURIComponent(m)}&to=${encodeURIComponent(e)}`),t=await s.json();return{agent:e,preview:t,loading:!1}}catch{return{agent:e,preview:null,loading:!1}}})))}async function $(){j(!0),N(null);let e=0,t=0,r=[];for(let a of v){if(!a.preview)continue;let l=a.preview.mcp.map(e=>e.item.id),i=a.preview.skills.map(e=>e.item.id);if(0!==l.length||0!==i.length)try{let n=await fetch("/api/spread",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({from:m,to:a.agent,mcpIds:l,skillIds:i})}),c=await n.json();c.ok?(e+=c.mcpAdded??0,t+=c.skillsAdded??0):r.push(`${s[a.agent]}: ${c.error??"unknown"}`)}catch(e){r.push(`${s[a.agent]}: ${e.message}`)}}N(r.length>0?`Mirrored ${e} MCP, ${t} skill(s). Errors: ${r.join("; ")}`:`Mirrored ${e} MCP and ${t} skill(s) across ${v.filter(e=>e.preview&&(e.preview.mcp.length||e.preview.skills.length)).length} target agent(s).`),j(!1),await k()}(0,d.useEffect)(()=>{m&&g.size>0?k():f([])},[m,Array.from(g).join(",")]);let C=v.reduce((e,s)=>e+(s.preview?s.preview.mcp.length+s.preview.skills.length:0),0);return(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)(i.Z,{className:"p-5",children:[(0,r.jsxs)("div",{className:"grid grid-cols-[auto_1fr] gap-x-6 gap-y-5",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"plexus-eyebrow mb-1.5",children:"Source"}),(0,r.jsx)("select",{className:"h-9 rounded border border-plexus-border bg-plexus-bg px-3 text-sm focus:border-plexus-accent focus:outline-none",value:m,onChange:e=>h(e.target.value),children:e.map(e=>(0,r.jsxs)("option",{value:e,disabled:!t[e],children:[s[e]??e,t[e]?"":" (not installed)"]},e))})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"plexus-eyebrow mb-1.5",children:"Target agents (mirror destinations)"}),(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:e.filter(e=>e!==m).map(e=>{let l=g.has(e);return(0,r.jsxs)("label",{className:`flex cursor-pointer items-center gap-2 rounded border px-3 py-1.5 text-sm transition-colors duration-plexus-fast ${l?"border-plexus-accent bg-plexus-accent/12 text-plexus-text":"border-plexus-border text-plexus-text-2 hover:bg-plexus-surface-2"} ${!t[e]?"cursor-not-allowed opacity-40":""}`,children:[(0,r.jsx)("input",{type:"checkbox",checked:l,disabled:!t[e],onChange:()=>(function(e){if(e===m)return;let s=new Set(g);s.has(e)?s.delete(e):s.add(e),b(s)})(e),className:"h-4 w-4 accent-plexus-accent"}),(0,r.jsx)("span",{children:s[e]??e}),(0,r.jsxs)(a.E,{variant:"outline",className:"text-[10px]",children:["via ",x[e]??"?"]})]},e)})})]})]}),(0,r.jsxs)("div",{className:"mt-6 flex items-center justify-between border-t border-plexus-border pt-4",children:[(0,r.jsx)("div",{className:"text-xs tracking-[0.02em] text-plexus-text-3",children:0===C?0===g.size?"Pick at least one target.":"Targets are already up-to-date with source.":`${C} item${1===C?"":"s"} will be mirrored to ${g.size} agent${1===g.size?"":"s"}.`}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsxs)(l.Button,{variant:"ghost",size:"sm",onClick:k,disabled:0===g.size,children:[(0,r.jsx)(n.A,{className:"h-3.5 w-3.5",strokeWidth:1.5})," Refresh"]}),(0,r.jsxs)(l.Button,{variant:"primary",onClick:$,disabled:w||0===C,children:[w?(0,r.jsx)(c.A,{className:"h-4 w-4 animate-spin",strokeWidth:1.5}):(0,r.jsx)(o.A,{className:"h-4 w-4",strokeWidth:1.5}),w?"Mirroring…":`Mirror ${C} → ${g.size} agent${1===g.size?"":"s"}`]})]})]}),y&&(0,r.jsx)("div",{className:"mt-4 rounded border border-plexus-border bg-plexus-bg px-3 py-2 text-xs text-plexus-text-2",children:y})]}),v.length>0&&(0,r.jsx)("div",{className:"space-y-3",children:v.map(e=>(0,r.jsxs)(i.Z,{className:"p-4",children:[(0,r.jsxs)("div",{className:"flex items-baseline gap-3",children:[(0,r.jsx)("div",{className:"text-sm font-semibold text-plexus-text",children:s[e.agent]}),(0,r.jsxs)(a.E,{variant:"outline",className:"text-[10px]",children:["via ",x[e.agent]??"?"]}),(0,r.jsx)("div",{className:"ml-auto text-xs tracking-[0.02em] text-plexus-text-3",children:e.loading?"loading…":e.preview?`${e.preview.mcp.length} MCP \xb7 ${e.preview.skills.length} skill${1===e.preview.skills.length?"":"s"} to mirror`:"unable to load"})]}),e.preview&&(e.preview.mcp.length>0||e.preview.skills.length>0)&&(0,r.jsxs)("div",{className:"mt-3 grid grid-cols-2 gap-4 text-xs",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-1.5 font-medium text-plexus-text",children:["MCP (",e.preview.mcp.length,")"]}),(0,r.jsxs)("ul",{className:"space-y-0.5 text-plexus-text-3",children:[e.preview.mcp.slice(0,12).map(e=>(0,r.jsxs)("li",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"font-mono text-plexus-text",children:e.item.id}),!e.inStore&&(0,r.jsx)(a.E,{variant:"divergent",className:"text-[9px]",children:"will import"})]},e.item.id)),e.preview.mcp.length>12&&(0,r.jsxs)("li",{children:["… +",e.preview.mcp.length-12," more"]})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-1.5 font-medium text-plexus-text",children:["Skills (",e.preview.skills.length,")"]}),(0,r.jsxs)("ul",{className:"max-h-40 space-y-0.5 overflow-auto text-plexus-text-3",children:[e.preview.skills.slice(0,30).map(e=>(0,r.jsx)("li",{children:(0,r.jsx)("span",{className:"font-mono text-plexus-text",children:e.item.id})},e.item.id)),e.preview.skills.length>30&&(0,r.jsxs)("li",{children:["… +",e.preview.skills.length-30," more"]})]})]})]}),e.preview&&0===e.preview.mcp.length&&0===e.preview.skills.length&&(0,r.jsxs)("div",{className:"mt-2 flex items-center gap-1.5 text-xs text-plexus-ok",children:[(0,r.jsx)(a.m,{tone:"ok"})," already up-to-date with source"]})]},e.agent))}),(0,r.jsx)(i.Z,{className:"p-4",children:(0,r.jsxs)("details",{className:"text-xs leading-relaxed text-plexus-text-3",children:[(0,r.jsx)("summary",{className:"cursor-pointer text-plexus-text-2 hover:text-plexus-text",children:"What does mirror actually do under the hood?"}),(0,r.jsxs)("div",{className:"mt-3 space-y-2 leading-relaxed",children:[(0,r.jsxs)("p",{children:["For each target agent, Plexus imports any source-agent items not yet in its store, adds the target to ",(0,r.jsx)("code",{className:"font-mono",children:"enabledAgents"}),", and runs sync."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("span",{className:"text-plexus-accent",children:"Cursor"})," /"," ",(0,r.jsx)("span",{className:"text-plexus-accent",children:"Factory Droid"}),": their MCP file becomes a symlink to"," ",(0,r.jsx)("code",{className:"rounded bg-plexus-surface-2 px-1 py-0.5 font-mono text-[11px]",children:"~/.config/plexus/.cache/mcp/<agent>.json"}),". Editing either side edits the same bytes — there is one source of truth."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("span",{className:"text-plexus-accent",children:"Claude Code"})," /"," ",(0,r.jsx)("span",{className:"text-plexus-accent",children:"Codex"})," /"," ",(0,r.jsx)("span",{className:"text-plexus-accent",children:"Gemini CLI"})," /"," ",(0,r.jsx)("span",{className:"text-plexus-accent",children:"Qwen Code"}),": their files carry unrelated keys (auth, history, settings, [profile], [auth]). Plexus partial-writes the MCP section in place; everything else is preserved verbatim."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("span",{className:"text-plexus-accent",children:"Skills"}),": written as symlinks from each agent's skill dir to the Plexus personal store. All agents read the same SKILL.md."]}),(0,r.jsxs)("p",{children:["Every sync first snapshots managed agents' MCP files into"," ",(0,r.jsx)("code",{className:"rounded bg-plexus-surface-2 px-1 py-0.5 font-mono text-[11px]",children:"~/.config/plexus/backups/<timestamp>/"}),"."]})]})]})})]})}},7294:(e,s,t)=>{"use strict";t.d(s,{Z:()=>i});var r=t(4568),a=t(7483),l=t(7620);let i=(0,l.forwardRef)(({className:e,...s},t)=>(0,r.jsx)("div",{ref:t,className:(0,a.cn)("rounded-md border border-plexus-border bg-plexus-surface","transition-colors duration-plexus-normal ease-plexus-out",e),...s}));i.displayName="Card",(0,l.forwardRef)(({className:e,...s},t)=>(0,r.jsx)(i,{ref:t,className:(0,a.cn)("hover:border-plexus-border-strong hover:-translate-y-px",e),...s})).displayName="CardHover"},7483:(e,s,t)=>{"use strict";t.d(s,{cn:()=>l});var r=t(9917),a=t(2809);function l(...e){return(0,a.QP)((0,r.$)(e))}},7788:(e,s,t)=>{"use strict";t.d(s,{Button:()=>o});var r=t(4568),a=t(7483),l=t(8347),i=t(1397),n=t(7620);let c=(0,i.F)((0,a.cn)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded font-medium","transition-colors duration-plexus-normal ease-plexus-out","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-plexus-accent/50 focus-visible:ring-offset-1 focus-visible:ring-offset-plexus-bg","disabled:pointer-events-none disabled:opacity-50"),{variants:{variant:{primary:"bg-plexus-accent text-[#1a1a17] hover:bg-plexus-accent-2 border border-plexus-accent",secondary:"bg-plexus-surface-2 text-plexus-text border border-plexus-border hover:bg-plexus-surface hover:border-plexus-border-strong",ghost:"bg-transparent text-plexus-text-2 hover:bg-plexus-surface-2 hover:text-plexus-text border border-transparent",danger:"bg-transparent text-plexus-err border border-plexus-err/35 hover:bg-plexus-err/10","danger-solid":"bg-plexus-err text-white border border-plexus-err hover:bg-plexus-err/90"},size:{default:"h-9 px-3.5 text-sm",sm:"h-7 px-2.5 text-xs",lg:"h-10 px-4 text-sm",icon:"h-9 w-9 p-0"}},defaultVariants:{variant:"secondary",size:"default"}}),o=(0,n.forwardRef)(({className:e,variant:s,size:t,asChild:i=!1,type:n="button",...o},d)=>{let x=i?l.DX:"button";return(0,r.jsx)(x,{ref:d,type:i?void 0:n,className:(0,a.cn)(c({variant:s,size:t}),e),...o})});o.displayName="Button"},8874:(e,s,t)=>{"use strict";t.d(s,{A:()=>r});let r=(0,t(9789).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])}},e=>{e.O(0,[4399,587,1968,7358],()=>e(e.s=2015)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8974],{6197:(e,s,r)=>{"use strict";r.d(s,{E:()=>a,m:()=>o});var t=r(4568),l=r(7483);let n=(0,r(1397).F)("inline-flex items-center gap-1 rounded-sm px-2 h-5 text-[11px] font-medium tracking-[0.01em]",{variants:{variant:{team:"bg-plexus-info/15 text-plexus-info",personal:"bg-plexus-accent-faint text-plexus-accent",synced:"bg-plexus-ok/15 text-plexus-ok",divergent:"bg-plexus-warn/15 text-plexus-warn",native:"bg-plexus-text-3/15 text-plexus-text-3",beta:"bg-plexus-accent-faint text-plexus-accent border border-plexus-accent/25",danger:"bg-plexus-err/13 text-plexus-err",outline:"border border-plexus-border text-plexus-text-2"}},defaultVariants:{variant:"outline"}});function a({className:e,variant:s,...r}){return(0,t.jsx)("span",{className:(0,l.cn)(n({variant:s}),e),...r})}function o({className:e,tone:s="ok"}){return(0,t.jsx)("span",{className:(0,l.cn)("inline-block h-1.5 w-1.5 rounded-full",{ok:"bg-plexus-ok",warn:"bg-plexus-warn",err:"bg-plexus-err",info:"bg-plexus-info",accent:"bg-plexus-accent",mute:"bg-plexus-text-3"}[s],e)})}},6439:(e,s,r)=>{"use strict";r.d(s,{LanguageProvider:()=>c,o:()=>x});var t=r(4568);let l="plexus.locale";function n(e){if(!e)return null;let s=e.toLowerCase();return"zh"===s||s.startsWith("zh-")?"zh":"en"===s||s.startsWith("en-")?"en":null}var a=r(9748),o=r(7620);let i=(0,o.createContext)(null);function d(e){window.localStorage.setItem(l,e),document.cookie=`plexus-locale=${e}; path=/; max-age=31536000; samesite=lax`}function c({children:e,initialLocale:s}){let r=(0,a.useRouter)(),[x,u]=(0,o.useState)(s);(0,o.useEffect)(()=>{var e;let t,a=n(window.localStorage.getItem(l))??s??(t=(Array.isArray(e=window.navigator.languages??window.navigator.language)?e.map((e,s)=>({value:e,q:1,index:s})):"string"==typeof e?e.split(",").map((e,s)=>{let[r="",...t]=e.trim().split(";"),l=t.find(e=>e.trim().startsWith("q=")),n=l?Number(l.trim().slice(2)):1;return{value:r,q:Number.isFinite(n)?n:1,index:s}}):[]).map(e=>({...e,locale:n(e.value)})).filter(e=>null!==e.locale).sort((e,s)=>s.q-e.q||e.index-s.index),t[0]?.locale??"en");if(a!==s){d(a),r.refresh();return}d(a),u(s)},[s,r]);let p=(0,o.useMemo)(()=>({locale:x,setLocale(e){d(e),r.refresh()},toggleLocale(){d("zh"===x?"en":"zh"),r.refresh()}}),[x,r]);return(0,t.jsx)(i.Provider,{value:p,children:e})}function x(){let e=(0,o.useContext)(i);if(!e)throw Error("useLanguage must be used inside LanguageProvider");return e}},6713:(e,s,r)=>{"use strict";r.d(s,{SyncButton:()=>S});var t=r(4568);let l={"claude-code":"Claude Code",cursor:"Cursor",codex:"Codex","gemini-cli":"Gemini CLI","qwen-code":"Qwen Code","factory-droid":"Factory Droid"},n={"claude-code":"Claude",cursor:"Cursor",codex:"Codex","gemini-cli":"Gemini","qwen-code":"Qwen","factory-droid":"Droid"};function a(e){return l[e]??e}var o=r(7483);let i={xs:"h-4 w-4",sm:"h-5 w-5",md:"h-6 w-6"},d={xs:"h-3 w-3",sm:"h-3.5 w-3.5",md:"h-4 w-4"},c={xs:"text-[8px]",sm:"text-[10px]",md:"text-[11px]"},x={"claude-code":{title:"Claude",className:"border-[#D97757]/25 bg-[#D97757]/10 text-[#D97757]",path:"m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z"},cursor:{title:"Cursor",className:"border-black/10 bg-white text-black",path:"M11.503.131 1.891 5.678a.84.84 0 0 0-.42.726v11.188c0 .3.162.575.42.724l9.609 5.55a1 1 0 0 0 .998 0l9.61-5.55a.84.84 0 0 0 .42-.724V6.404a.84.84 0 0 0-.42-.726L12.497.131a1.01 1.01 0 0 0-.996 0M2.657 6.338h18.55c.263 0 .43.287.297.515L12.23 22.918c-.062.107-.229.064-.229-.06V12.335a.59.59 0 0 0-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23"},codex:{title:"OpenAI",className:"border-plexus-border bg-plexus-surface-2 text-plexus-text",path:"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"},"gemini-cli":{title:"Google Gemini",className:"border-[#8E75B2]/25 bg-[#8E75B2]/10 text-[#8E75B2]",path:"M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81"}};function u({agentId:e,size:s="sm",className:r}){let l=x[e],p=a(e);if(!l)return(0,t.jsx)("span",{"aria-hidden":"true",className:(0,o.cn)("inline-flex shrink-0 items-center justify-center rounded border border-plexus-border bg-plexus-surface-2 font-mono font-semibold text-plexus-text-2",i[s],c[s],r),title:p,children:(n[e]??a(e)).split(/\s+/).map(e=>e[0]).join("").slice(0,2).toUpperCase()});return(0,t.jsx)("span",{"aria-hidden":"true",className:(0,o.cn)("inline-flex shrink-0 items-center justify-center rounded border",i[s],l.className,r),title:p,children:(0,t.jsxs)("svg",{role:"img",viewBox:"0 0 24 24",className:(0,o.cn)(d[s],l.iconClassName),fill:"currentColor",children:[(0,t.jsx)("title",{children:l.title}),(0,t.jsx)("path",{d:l.path})]})})}function p({agentId:e,label:s,iconSize:r="sm",className:l,labelClassName:n}){return(0,t.jsxs)("span",{className:(0,o.cn)("inline-flex min-w-0 items-center gap-1.5",l),children:[(0,t.jsx)(u,{agentId:e,size:r}),(0,t.jsx)("span",{className:(0,o.cn)("truncate",n),children:s??a(e)})]})}var m=r(6439),h=r(6197),b=r(7788),g=r(6163),f=r(7812),v=r(7024),j=r(8874),w=r(4110),y=r(3932),N=r(9748),k=r(7620);let C={en:{chooseSource:"Choose source",analyzing:"Analyzing local agents...",smartMerge:(e,s)=>`Smart merge: ${e} safe \xb7 ${s} conflicts`,primary:"Primary",source:"Source:",noSource:"No local source config yet",sharing:"Sharing...",share:"Share config everywhere",shareFailed:"Share failed",configShared:"Config shared",syncedWith:e=>`Synced with ${e} agents.`,close:"Close",imported:"Imported",enabled:"Enabled",skills:"skills",resolved:(e,s)=>`Resolved ${e} conflicts with ${s}.`,rulesApplied:e=>`Rules applied to ${e} targets.`,error:"error",done:"Done"},zh:{chooseSource:"选择来源",analyzing:"正在分析本地 Agent...",smartMerge:(e,s)=>`智能合并:${e} 个安全 \xb7 ${s} 个冲突`,primary:"主来源",source:"来源:",noSource:"还没有本地来源配置",sharing:"正在同步...",share:"同步到所有配置",shareFailed:"同步失败",configShared:"配置已同步",syncedWith:e=>`已同步到 ${e} 个 Agent。`,close:"关闭",imported:"已导入",enabled:"已启用",skills:"技能",resolved:(e,s)=>`已使用 ${s} 解决 ${e} 个冲突。`,rulesApplied:e=>`规则已应用到 ${e} 个目标。`,error:"错误",done:"完成"}};function S(){let{locale:e}=(0,m.o)(),s=C[e],r=(0,N.useRouter)(),[l,n]=(0,k.useState)(!1),[o,i]=(0,k.useState)(!0),[d,c]=(0,k.useState)(null),[x,u]=(0,k.useState)(""),[S,z]=(0,k.useState)(null),[A,L]=(0,k.useState)(!1),[P,$]=(0,k.useState)(!1);async function E(e){i(!0);try{let s=e?`?preferredAgent=${e}`:"",r=await fetch(`/api/sync${s}`),t=await r.json();c(t.error?null:t);let l=t.selectedPrimaryAgent??t.recommendedPrimaryAgent??t.sources?.find(e=>e.total>0)?.agent??"";u(l)}catch{c(null)}finally{i(!1)}}async function M(){n(!0),z(null);try{let e=await fetch("/api/sync",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({preferredAgent:x||void 0})}),s=await e.json();z(s),L(!0),s.plan&&c(s.plan),s.error||(r.refresh(),E(x||void 0))}catch(e){z({error:String(e)}),L(!0)}finally{n(!1)}}(0,k.useEffect)(()=>{E()},[]);let W=d?.sources.filter(e=>e.total>0)??[],q=W.length>1||(d?.conflictCount??0)>0,I=(d?.mcp.safe??0)+(d?.skills.safe??0),B=x?a(x):s.chooseSource;return(0,t.jsxs)("div",{className:"flex flex-col items-end gap-2",children:[(o||d)&&(0,t.jsx)("div",{className:"flex max-w-[30rem] flex-wrap items-center justify-end gap-2 text-xs text-plexus-text-3",children:o?(0,t.jsx)("span",{className:"inline-flex h-8 items-center rounded border border-plexus-border bg-plexus-surface px-2.5",children:s.analyzing}):d&&q?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("span",{className:"inline-flex h-8 items-center gap-2 rounded border border-plexus-border bg-plexus-surface px-2.5",children:[(0,t.jsx)(h.m,{tone:d.conflictCount>0?"warn":"ok"}),s.smartMerge(I,d.conflictCount)]}),(0,t.jsxs)(g.bL,{open:P,onOpenChange:$,children:[(0,t.jsx)(g.l9,{asChild:!0,children:(0,t.jsxs)("button",{type:"button",className:"inline-flex h-8 items-center gap-2 rounded border border-plexus-border bg-plexus-surface px-2.5 text-xs text-plexus-text-2 shadow-sm outline-none transition-colors hover:border-plexus-border-strong hover:bg-plexus-surface-2 focus-visible:ring-2 focus-visible:ring-plexus-accent/45",children:[(0,t.jsx)("span",{className:"text-plexus-text-3",children:s.primary}),x?(0,t.jsx)(p,{agentId:x,label:B,iconSize:"xs",labelClassName:"font-medium text-plexus-text"}):(0,t.jsx)("span",{className:"font-medium text-plexus-text",children:B}),(0,t.jsx)(f.A,{className:"h-3.5 w-3.5 text-plexus-text-3",strokeWidth:1.5})]})}),(0,t.jsx)(g.ZL,{children:(0,t.jsx)(g.UC,{align:"end",sideOffset:6,className:"z-50 w-64 overflow-hidden rounded-md border border-plexus-border bg-plexus-surface p-1 shadow-lg outline-none animate-in fade-in-0 zoom-in-95",children:W.map(e=>{let s=e.agent===x;return(0,t.jsxs)("button",{type:"button",className:"flex w-full items-center justify-between gap-3 rounded-sm px-3 py-2 text-left text-sm text-plexus-text transition-colors hover:bg-plexus-surface-2 focus:bg-plexus-surface-2 focus:outline-none",onClick:()=>{u(e.agent),$(!1),E(e.agent)},children:[(0,t.jsxs)("span",{children:[(0,t.jsx)(p,{agentId:e.agent,iconSize:"xs",labelClassName:"font-medium"}),(0,t.jsxs)("span",{className:"mt-0.5 block font-mono text-[11px] text-plexus-text-3",children:[e.mcp," MCP \xb7 ",e.skills," skills",e.rules?" \xb7 rules":""]})]}),s?(0,t.jsx)(v.A,{className:"h-4 w-4 text-plexus-ok",strokeWidth:1.7}):null]},e.agent)})})})]})]}):d&&W[0]?(0,t.jsxs)("span",{className:"inline-flex h-8 items-center gap-2 rounded border border-plexus-border bg-plexus-surface px-2.5",children:[(0,t.jsx)("span",{children:s.source}),(0,t.jsx)(p,{agentId:W[0].agent,iconSize:"xs"})]}):(0,t.jsx)("span",{className:"inline-flex h-8 items-center rounded border border-plexus-border bg-plexus-surface px-2.5",children:s.noSource})}),(0,t.jsxs)(b.Button,{variant:"secondary",className:"border-plexus-accent/35 bg-plexus-accent/10 text-plexus-text shadow-sm hover:border-plexus-accent/55 hover:bg-plexus-accent/15",onClick:M,disabled:l,children:[l?(0,t.jsx)(j.A,{className:"h-4 w-4 animate-spin",strokeWidth:1.5}):(0,t.jsx)(w.A,{className:"h-4 w-4",strokeWidth:1.5}),l?s.sharing:s.share]}),A&&S?(0,t.jsx)("div",{className:"fixed inset-0 z-50 flex cursor-default items-center justify-center bg-black/55 p-6",onClick:()=>L(!1),children:(0,t.jsxs)("dialog",{open:!0,"aria-modal":"true",className:"w-full max-w-lg cursor-default overflow-hidden rounded-md border border-plexus-border bg-plexus-surface text-left shadow-lg",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4 border-b border-plexus-border px-5 py-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm font-semibold text-plexus-text",children:[(0,t.jsx)(h.m,{tone:S.error?"err":"ok"}),S.error?s.shareFailed:s.configShared]}),S.error?null:(0,t.jsx)("div",{className:"mt-1 text-xs text-plexus-text-3",children:s.syncedWith(S.targetAgents?.length??S.results?.length??0)})]}),(0,t.jsx)("button",{type:"button","aria-label":s.close,className:"rounded-sm p-1 text-plexus-text-3 hover:bg-plexus-surface-2 hover:text-plexus-text",onClick:()=>L(!1),children:(0,t.jsx)(y.A,{className:"h-4 w-4",strokeWidth:1.5})})]}),(0,t.jsx)("div",{className:"space-y-4 px-5 py-4 text-sm",children:S.error?(0,t.jsx)("div",{className:"rounded border border-plexus-err/30 bg-plexus-err/10 px-3 py-2 text-xs text-plexus-err",children:S.error}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[S.imported?(0,t.jsxs)("div",{className:"rounded border border-plexus-border bg-plexus-surface-2/50 px-3 py-2",children:[(0,t.jsx)("div",{className:"plexus-eyebrow mb-1",children:s.imported}),(0,t.jsxs)("div",{className:"text-sm font-medium text-plexus-text",children:[S.imported.mcpWritten+S.imported.mcpExtended," MCP \xb7"," ",S.imported.skillsWritten+S.imported.skillsExtended," ",s.skills]})]}):null,S.shared?(0,t.jsxs)("div",{className:"rounded border border-plexus-border bg-plexus-surface-2/50 px-3 py-2",children:[(0,t.jsx)("div",{className:"plexus-eyebrow mb-1",children:s.enabled}),(0,t.jsxs)("div",{className:"text-sm font-medium text-plexus-text",children:[S.shared.mcp," MCP \xb7 ",S.shared.skills," ",s.skills]})]}):null]}),(0,t.jsxs)("div",{className:"space-y-2",children:[S.preferredAgent&&(S.conflictsResolved??0)>0?(0,t.jsx)("div",{className:"text-xs text-plexus-text-3",children:s.resolved(S.conflictsResolved??0,a(S.preferredAgent))}):null,S.rules?.skipped?(0,t.jsx)("div",{className:"text-xs text-plexus-warn",children:S.rules.skipped}):(0,t.jsx)("div",{className:"text-xs text-plexus-text-3",children:s.rulesApplied(S.rules?.applied.filter(e=>e.applied).length??0)})]}),S.results&&S.results.length>0?(0,t.jsx)("div",{className:"overflow-hidden rounded border border-plexus-border",children:S.results.map(e=>(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-plexus-border/60 px-3 py-2 text-xs last:border-0",children:[(0,t.jsx)(p,{agentId:e.agent,iconSize:"xs",labelClassName:"text-plexus-text-2"}),e.errors.length>0?(0,t.jsxs)(h.E,{variant:"danger",children:[e.errors.length," ",s.error]}):(0,t.jsxs)("span",{className:"font-mono text-plexus-ok",children:["mcp ",e.applied.mcp," \xb7 skills ",e.applied.skills]})]},e.agent))}):null]})}),(0,t.jsx)("div",{className:"flex items-center justify-end border-t border-plexus-border bg-plexus-surface-2/35 px-5 py-3",children:(0,t.jsx)(b.Button,{variant:"secondary",size:"sm",onClick:()=>L(!1),children:s.done})})]})}):null]})}},7483:(e,s,r)=>{"use strict";r.d(s,{cn:()=>n});var t=r(9917),l=r(2809);function n(...e){return(0,l.QP)((0,t.$)(e))}},7788:(e,s,r)=>{"use strict";r.d(s,{Button:()=>d});var t=r(4568),l=r(7483),n=r(8347),a=r(1397),o=r(7620);let i=(0,a.F)((0,l.cn)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded font-medium","transition-colors duration-plexus-normal ease-plexus-out","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-plexus-accent/50 focus-visible:ring-offset-1 focus-visible:ring-offset-plexus-bg","disabled:pointer-events-none disabled:opacity-50"),{variants:{variant:{primary:"bg-plexus-accent text-[#1a1a17] hover:bg-plexus-accent-2 border border-plexus-accent",secondary:"bg-plexus-surface-2 text-plexus-text border border-plexus-border hover:bg-plexus-surface hover:border-plexus-border-strong",ghost:"bg-transparent text-plexus-text-2 hover:bg-plexus-surface-2 hover:text-plexus-text border border-transparent",danger:"bg-transparent text-plexus-err border border-plexus-err/35 hover:bg-plexus-err/10","danger-solid":"bg-plexus-err text-white border border-plexus-err hover:bg-plexus-err/90"},size:{default:"h-9 px-3.5 text-sm",sm:"h-7 px-2.5 text-xs",lg:"h-10 px-4 text-sm",icon:"h-9 w-9 p-0"}},defaultVariants:{variant:"secondary",size:"default"}}),d=(0,o.forwardRef)(({className:e,variant:s,size:r,asChild:a=!1,type:o="button",...d},c)=>{let x=a?n.DX:"button";return(0,t.jsx)(x,{ref:c,type:a?void 0:o,className:(0,l.cn)(i({variant:s,size:r}),e),...d})});d.displayName="Button"},8283:(e,s,r)=>{Promise.resolve().then(r.bind(r,6713)),Promise.resolve().then(r.bind(r,4228)),Promise.resolve().then(r.t.bind(r,5587,23))}},e=>{e.O(0,[4399,5587,3051,7814,587,1968,7358],()=>e(e.s=8283)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8974],{6197:(e,s,r)=>{"use strict";r.d(s,{E:()=>a,m:()=>o});var t=r(4568),l=r(7483);let n=(0,r(1397).F)("inline-flex items-center gap-1 rounded-sm px-2 h-5 text-[11px] font-medium tracking-[0.01em]",{variants:{variant:{team:"bg-plexus-info/15 text-plexus-info",personal:"bg-plexus-accent-faint text-plexus-accent",synced:"bg-plexus-ok/15 text-plexus-ok",divergent:"bg-plexus-warn/15 text-plexus-warn",native:"bg-plexus-text-3/15 text-plexus-text-3",beta:"bg-plexus-accent-faint text-plexus-accent border border-plexus-accent/25",danger:"bg-plexus-err/13 text-plexus-err",outline:"border border-plexus-border text-plexus-text-2"}},defaultVariants:{variant:"outline"}});function a({className:e,variant:s,...r}){return(0,t.jsx)("span",{className:(0,l.cn)(n({variant:s}),e),...r})}function o({className:e,tone:s="ok"}){return(0,t.jsx)("span",{className:(0,l.cn)("inline-block h-1.5 w-1.5 rounded-full",{ok:"bg-plexus-ok",warn:"bg-plexus-warn",err:"bg-plexus-err",info:"bg-plexus-info",accent:"bg-plexus-accent",mute:"bg-plexus-text-3"}[s],e)})}},6439:(e,s,r)=>{"use strict";r.d(s,{LanguageProvider:()=>c,o:()=>x});var t=r(4568);let l="plexus.locale";function n(e){if(!e)return null;let s=e.toLowerCase();return"zh"===s||s.startsWith("zh-")?"zh":"en"===s||s.startsWith("en-")?"en":null}var a=r(9748),o=r(7620);let i=(0,o.createContext)(null);function d(e){window.localStorage.setItem(l,e),document.cookie=`plexus-locale=${e}; path=/; max-age=31536000; samesite=lax`}function c({children:e,initialLocale:s}){let r=(0,a.useRouter)(),[x,u]=(0,o.useState)(s);(0,o.useEffect)(()=>{var e;let t,a=n(window.localStorage.getItem(l))??s??(t=(Array.isArray(e=window.navigator.languages??window.navigator.language)?e.map((e,s)=>({value:e,q:1,index:s})):"string"==typeof e?e.split(",").map((e,s)=>{let[r="",...t]=e.trim().split(";"),l=t.find(e=>e.trim().startsWith("q=")),n=l?Number(l.trim().slice(2)):1;return{value:r,q:Number.isFinite(n)?n:1,index:s}}):[]).map(e=>({...e,locale:n(e.value)})).filter(e=>null!==e.locale).sort((e,s)=>s.q-e.q||e.index-s.index),t[0]?.locale??"en");if(a!==s){d(a),r.refresh();return}d(a),u(s)},[s,r]);let p=(0,o.useMemo)(()=>({locale:x,setLocale(e){d(e),r.refresh()},toggleLocale(){d("zh"===x?"en":"zh"),r.refresh()}}),[x,r]);return(0,t.jsx)(i.Provider,{value:p,children:e})}function x(){let e=(0,o.useContext)(i);if(!e)throw Error("useLanguage must be used inside LanguageProvider");return e}},6713:(e,s,r)=>{"use strict";r.d(s,{SyncButton:()=>S});var t=r(4568);let l={"claude-code":"Claude Code",cursor:"Cursor",codex:"Codex","gemini-cli":"Gemini CLI","qwen-code":"Qwen Code","factory-droid":"Factory Droid"},n={"claude-code":"Claude",cursor:"Cursor",codex:"Codex","gemini-cli":"Gemini","qwen-code":"Qwen","factory-droid":"Droid"};function a(e){return l[e]??e}var o=r(7483);let i={xs:"h-4 w-4",sm:"h-5 w-5",md:"h-6 w-6"},d={xs:"h-3 w-3",sm:"h-3.5 w-3.5",md:"h-4 w-4"},c={xs:"text-[8px]",sm:"text-[10px]",md:"text-[11px]"},x={"claude-code":{title:"Claude",className:"border-[#D97757]/25 bg-[#D97757]/10 text-[#D97757]",path:"m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z"},cursor:{title:"Cursor",className:"border-black/10 bg-white text-black",path:"M11.503.131 1.891 5.678a.84.84 0 0 0-.42.726v11.188c0 .3.162.575.42.724l9.609 5.55a1 1 0 0 0 .998 0l9.61-5.55a.84.84 0 0 0 .42-.724V6.404a.84.84 0 0 0-.42-.726L12.497.131a1.01 1.01 0 0 0-.996 0M2.657 6.338h18.55c.263 0 .43.287.297.515L12.23 22.918c-.062.107-.229.064-.229-.06V12.335a.59.59 0 0 0-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23"},codex:{title:"OpenAI",className:"border-plexus-border bg-plexus-surface-2 text-plexus-text",path:"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"},"gemini-cli":{title:"Google Gemini",className:"border-[#8E75B2]/25 bg-[#8E75B2]/10 text-[#8E75B2]",path:"M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81"}};function u({agentId:e,size:s="sm",className:r}){let l=x[e],p=a(e);if(!l)return(0,t.jsx)("span",{"aria-hidden":"true",className:(0,o.cn)("inline-flex shrink-0 items-center justify-center rounded border border-plexus-border bg-plexus-surface-2 font-mono font-semibold text-plexus-text-2",i[s],c[s],r),title:p,children:(n[e]??a(e)).split(/\s+/).map(e=>e[0]).join("").slice(0,2).toUpperCase()});return(0,t.jsx)("span",{"aria-hidden":"true",className:(0,o.cn)("inline-flex shrink-0 items-center justify-center rounded border",i[s],l.className,r),title:p,children:(0,t.jsxs)("svg",{role:"img",viewBox:"0 0 24 24",className:(0,o.cn)(d[s],l.iconClassName),fill:"currentColor",children:[(0,t.jsx)("title",{children:l.title}),(0,t.jsx)("path",{d:l.path})]})})}function p({agentId:e,label:s,iconSize:r="sm",className:l,labelClassName:n}){return(0,t.jsxs)("span",{className:(0,o.cn)("inline-flex min-w-0 items-center gap-1.5",l),children:[(0,t.jsx)(u,{agentId:e,size:r}),(0,t.jsx)("span",{className:(0,o.cn)("truncate",n),children:s??a(e)})]})}var m=r(6439),h=r(6197),b=r(7788),g=r(6163),f=r(7812),v=r(7024),j=r(8874),w=r(4110),y=r(3932),N=r(9748),k=r(7620);let C={en:{chooseSource:"Choose source",analyzing:"Analyzing local agents...",smartMerge:(e,s)=>`Smart merge: ${e} safe \xb7 ${s} conflicts`,primary:"Primary",source:"Source:",noSource:"No local source config yet",sharing:"Sharing...",share:"Share config everywhere",shareFailed:"Share failed",configShared:"Config shared",syncedWith:e=>`Synced with ${e} agents.`,close:"Close",imported:"Imported",enabled:"Enabled",skills:"skills",resolved:(e,s)=>`Resolved ${e} conflicts with ${s}.`,rulesApplied:e=>`Rules applied to ${e} targets.`,error:"error",done:"Done"},zh:{chooseSource:"选择来源",analyzing:"正在分析本地 Agent...",smartMerge:(e,s)=>`智能合并:${e} 个安全 \xb7 ${s} 个冲突`,primary:"主来源",source:"来源:",noSource:"还没有本地来源配置",sharing:"正在同步...",share:"同步到所有配置",shareFailed:"同步失败",configShared:"配置已同步",syncedWith:e=>`已同步到 ${e} 个 Agent。`,close:"关闭",imported:"已导入",enabled:"已启用",skills:"技能",resolved:(e,s)=>`已使用 ${s} 解决 ${e} 个冲突。`,rulesApplied:e=>`规则已应用到 ${e} 个目标。`,error:"错误",done:"完成"}};function S(){let{locale:e}=(0,m.o)(),s=C[e],r=(0,N.useRouter)(),[l,n]=(0,k.useState)(!1),[o,i]=(0,k.useState)(!0),[d,c]=(0,k.useState)(null),[x,u]=(0,k.useState)(""),[S,z]=(0,k.useState)(null),[A,L]=(0,k.useState)(!1),[P,$]=(0,k.useState)(!1);async function E(e){i(!0);try{let s=e?`?preferredAgent=${e}`:"",r=await fetch(`/api/sync${s}`),t=await r.json();c(t.error?null:t);let l=t.selectedPrimaryAgent??t.recommendedPrimaryAgent??t.sources?.find(e=>e.total>0)?.agent??"";u(l)}catch{c(null)}finally{i(!1)}}async function M(){n(!0),z(null);try{let e=await fetch("/api/sync",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({preferredAgent:x||void 0})}),s=await e.json();z(s),L(!0),s.plan&&c(s.plan),s.error||(r.refresh(),E(x||void 0))}catch(e){z({error:String(e)}),L(!0)}finally{n(!1)}}(0,k.useEffect)(()=>{E()},[]);let W=d?.sources.filter(e=>e.total>0)??[],q=W.length>1||(d?.conflictCount??0)>0,I=(d?.mcp.safe??0)+(d?.skills.safe??0),B=x?a(x):s.chooseSource;return(0,t.jsxs)("div",{className:"flex flex-col items-end gap-2",children:[(o||d)&&(0,t.jsx)("div",{className:"flex max-w-[30rem] flex-wrap items-center justify-end gap-2 text-xs text-plexus-text-3",children:o?(0,t.jsx)("span",{className:"inline-flex h-8 items-center rounded border border-plexus-border bg-plexus-surface px-2.5",children:s.analyzing}):d&&q?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("span",{className:"inline-flex h-8 items-center gap-2 rounded border border-plexus-border bg-plexus-surface px-2.5",children:[(0,t.jsx)(h.m,{tone:d.conflictCount>0?"warn":"ok"}),s.smartMerge(I,d.conflictCount)]}),(0,t.jsxs)(g.bL,{open:P,onOpenChange:$,children:[(0,t.jsx)(g.l9,{asChild:!0,children:(0,t.jsxs)("button",{type:"button",className:"inline-flex h-8 items-center gap-2 rounded border border-plexus-border bg-plexus-surface px-2.5 text-xs text-plexus-text-2 shadow-sm outline-none transition-colors hover:border-plexus-border-strong hover:bg-plexus-surface-2 focus-visible:ring-2 focus-visible:ring-plexus-accent/45",children:[(0,t.jsx)("span",{className:"text-plexus-text-3",children:s.primary}),x?(0,t.jsx)(p,{agentId:x,label:B,iconSize:"xs",labelClassName:"font-medium text-plexus-text"}):(0,t.jsx)("span",{className:"font-medium text-plexus-text",children:B}),(0,t.jsx)(f.A,{className:"h-3.5 w-3.5 text-plexus-text-3",strokeWidth:1.5})]})}),(0,t.jsx)(g.ZL,{children:(0,t.jsx)(g.UC,{align:"end",sideOffset:6,className:"z-50 w-64 overflow-hidden rounded-md border border-plexus-border bg-plexus-surface p-1 shadow-lg outline-none animate-in fade-in-0 zoom-in-95",children:W.map(e=>{let s=e.agent===x;return(0,t.jsxs)("button",{type:"button",className:"flex w-full items-center justify-between gap-3 rounded-sm px-3 py-2 text-left text-sm text-plexus-text transition-colors hover:bg-plexus-surface-2 focus:bg-plexus-surface-2 focus:outline-none",onClick:()=>{u(e.agent),$(!1),E(e.agent)},children:[(0,t.jsxs)("span",{children:[(0,t.jsx)(p,{agentId:e.agent,iconSize:"xs",labelClassName:"font-medium"}),(0,t.jsxs)("span",{className:"mt-0.5 block font-mono text-[11px] text-plexus-text-3",children:[e.mcp," MCP \xb7 ",e.skills," skills",e.rules?" \xb7 rules":""]})]}),s?(0,t.jsx)(v.A,{className:"h-4 w-4 text-plexus-ok",strokeWidth:1.7}):null]},e.agent)})})})]})]}):d&&W[0]?(0,t.jsxs)("span",{className:"inline-flex h-8 items-center gap-2 rounded border border-plexus-border bg-plexus-surface px-2.5",children:[(0,t.jsx)("span",{children:s.source}),(0,t.jsx)(p,{agentId:W[0].agent,iconSize:"xs"})]}):(0,t.jsx)("span",{className:"inline-flex h-8 items-center rounded border border-plexus-border bg-plexus-surface px-2.5",children:s.noSource})}),(0,t.jsxs)(b.Button,{variant:"secondary",className:"border-plexus-accent/35 bg-plexus-accent/10 text-plexus-text shadow-sm hover:border-plexus-accent/55 hover:bg-plexus-accent/15",onClick:M,disabled:l,children:[l?(0,t.jsx)(j.A,{className:"h-4 w-4 animate-spin",strokeWidth:1.5}):(0,t.jsx)(w.A,{className:"h-4 w-4",strokeWidth:1.5}),l?s.sharing:s.share]}),A&&S?(0,t.jsx)("div",{className:"fixed inset-0 z-50 flex cursor-default items-center justify-center bg-black/55 p-6",onClick:()=>L(!1),children:(0,t.jsxs)("dialog",{open:!0,"aria-modal":"true",className:"w-full max-w-lg cursor-default overflow-hidden rounded-md border border-plexus-border bg-plexus-surface text-left shadow-lg",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4 border-b border-plexus-border px-5 py-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm font-semibold text-plexus-text",children:[(0,t.jsx)(h.m,{tone:S.error?"err":"ok"}),S.error?s.shareFailed:s.configShared]}),S.error?null:(0,t.jsx)("div",{className:"mt-1 text-xs text-plexus-text-3",children:s.syncedWith(S.targetAgents?.length??S.results?.length??0)})]}),(0,t.jsx)("button",{type:"button","aria-label":s.close,className:"rounded-sm p-1 text-plexus-text-3 hover:bg-plexus-surface-2 hover:text-plexus-text",onClick:()=>L(!1),children:(0,t.jsx)(y.A,{className:"h-4 w-4",strokeWidth:1.5})})]}),(0,t.jsx)("div",{className:"space-y-4 px-5 py-4 text-sm",children:S.error?(0,t.jsx)("div",{className:"rounded border border-plexus-err/30 bg-plexus-err/10 px-3 py-2 text-xs text-plexus-err",children:S.error}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[S.imported?(0,t.jsxs)("div",{className:"rounded border border-plexus-border bg-plexus-surface-2/50 px-3 py-2",children:[(0,t.jsx)("div",{className:"plexus-eyebrow mb-1",children:s.imported}),(0,t.jsxs)("div",{className:"text-sm font-medium text-plexus-text",children:[S.imported.mcpWritten+S.imported.mcpExtended," MCP \xb7"," ",S.imported.skillsWritten+S.imported.skillsExtended," ",s.skills]})]}):null,S.shared?(0,t.jsxs)("div",{className:"rounded border border-plexus-border bg-plexus-surface-2/50 px-3 py-2",children:[(0,t.jsx)("div",{className:"plexus-eyebrow mb-1",children:s.enabled}),(0,t.jsxs)("div",{className:"text-sm font-medium text-plexus-text",children:[S.shared.mcp," MCP \xb7 ",S.shared.skills," ",s.skills]})]}):null]}),(0,t.jsxs)("div",{className:"space-y-2",children:[S.preferredAgent&&(S.conflictsResolved??0)>0?(0,t.jsx)("div",{className:"text-xs text-plexus-text-3",children:s.resolved(S.conflictsResolved??0,a(S.preferredAgent))}):null,S.rules?.skipped?(0,t.jsx)("div",{className:"text-xs text-plexus-warn",children:S.rules.skipped}):(0,t.jsx)("div",{className:"text-xs text-plexus-text-3",children:s.rulesApplied(S.rules?.applied.filter(e=>e.applied).length??0)})]}),S.results&&S.results.length>0?(0,t.jsx)("div",{className:"overflow-hidden rounded border border-plexus-border",children:S.results.map(e=>(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-plexus-border/60 px-3 py-2 text-xs last:border-0",children:[(0,t.jsx)(p,{agentId:e.agent,iconSize:"xs",labelClassName:"text-plexus-text-2"}),e.errors.length>0?(0,t.jsxs)(h.E,{variant:"danger",children:[e.errors.length," ",s.error]}):(0,t.jsxs)("span",{className:"font-mono text-plexus-ok",children:["mcp ",e.applied.mcp," \xb7 skills ",e.applied.skills]})]},e.agent))}):null]})}),(0,t.jsx)("div",{className:"flex items-center justify-end border-t border-plexus-border bg-plexus-surface-2/35 px-5 py-3",children:(0,t.jsx)(b.Button,{variant:"secondary",size:"sm",onClick:()=>L(!1),children:s.done})})]})}):null]})}},7483:(e,s,r)=>{"use strict";r.d(s,{cn:()=>n});var t=r(9917),l=r(2809);function n(...e){return(0,l.QP)((0,t.$)(e))}},7788:(e,s,r)=>{"use strict";r.d(s,{Button:()=>d});var t=r(4568),l=r(7483),n=r(8347),a=r(1397),o=r(7620);let i=(0,a.F)((0,l.cn)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded font-medium","transition-colors duration-plexus-normal ease-plexus-out","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-plexus-accent/50 focus-visible:ring-offset-1 focus-visible:ring-offset-plexus-bg","disabled:pointer-events-none disabled:opacity-50"),{variants:{variant:{primary:"bg-plexus-accent text-[#1a1a17] hover:bg-plexus-accent-2 border border-plexus-accent",secondary:"bg-plexus-surface-2 text-plexus-text border border-plexus-border hover:bg-plexus-surface hover:border-plexus-border-strong",ghost:"bg-transparent text-plexus-text-2 hover:bg-plexus-surface-2 hover:text-plexus-text border border-transparent",danger:"bg-transparent text-plexus-err border border-plexus-err/35 hover:bg-plexus-err/10","danger-solid":"bg-plexus-err text-white border border-plexus-err hover:bg-plexus-err/90"},size:{default:"h-9 px-3.5 text-sm",sm:"h-7 px-2.5 text-xs",lg:"h-10 px-4 text-sm",icon:"h-9 w-9 p-0"}},defaultVariants:{variant:"secondary",size:"default"}}),d=(0,o.forwardRef)(({className:e,variant:s,size:r,asChild:a=!1,type:o="button",...d},c)=>{let x=a?n.DX:"button";return(0,t.jsx)(x,{ref:c,type:a?void 0:o,className:(0,l.cn)(i({variant:s,size:r}),e),...d})});d.displayName="Button"},9874:(e,s,r)=>{Promise.resolve().then(r.bind(r,6713)),Promise.resolve().then(r.bind(r,4228)),Promise.resolve().then(r.t.bind(r,5587,23))}},e=>{e.O(0,[4399,5587,3051,7814,587,1968,7358],()=>e(e.s=9874)),_N_E=e.O()}]);
|