plexus-agent-config 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (351) hide show
  1. package/dist/bin.d.ts +3 -0
  2. package/dist/bin.d.ts.map +1 -0
  3. package/dist/bin.js +175 -0
  4. package/dist/bin.js.map +1 -0
  5. package/node_modules/plexus-agent-config-core/dist/agents/adapters/base.d.ts +38 -0
  6. package/node_modules/plexus-agent-config-core/dist/agents/adapters/base.d.ts.map +1 -0
  7. package/node_modules/plexus-agent-config-core/dist/agents/adapters/base.js +125 -0
  8. package/node_modules/plexus-agent-config-core/dist/agents/adapters/base.js.map +1 -0
  9. package/node_modules/plexus-agent-config-core/dist/agents/adapters/codex.d.ts +9 -0
  10. package/node_modules/plexus-agent-config-core/dist/agents/adapters/codex.d.ts.map +1 -0
  11. package/node_modules/plexus-agent-config-core/dist/agents/adapters/codex.js +96 -0
  12. package/node_modules/plexus-agent-config-core/dist/agents/adapters/codex.js.map +1 -0
  13. package/node_modules/plexus-agent-config-core/dist/agents/adapters/index.d.ts +8 -0
  14. package/node_modules/plexus-agent-config-core/dist/agents/adapters/index.d.ts.map +1 -0
  15. package/node_modules/plexus-agent-config-core/dist/agents/adapters/index.js +12 -0
  16. package/node_modules/plexus-agent-config-core/dist/agents/adapters/index.js.map +1 -0
  17. package/node_modules/plexus-agent-config-core/dist/agents/adapters/json-mcp.d.ts +25 -0
  18. package/node_modules/plexus-agent-config-core/dist/agents/adapters/json-mcp.d.ts.map +1 -0
  19. package/node_modules/plexus-agent-config-core/dist/agents/adapters/json-mcp.js +182 -0
  20. package/node_modules/plexus-agent-config-core/dist/agents/adapters/json-mcp.js.map +1 -0
  21. package/node_modules/plexus-agent-config-core/dist/agents/catalog.d.ts +15 -0
  22. package/node_modules/plexus-agent-config-core/dist/agents/catalog.d.ts.map +1 -0
  23. package/node_modules/plexus-agent-config-core/dist/agents/catalog.js +153 -0
  24. package/node_modules/plexus-agent-config-core/dist/agents/catalog.js.map +1 -0
  25. package/node_modules/plexus-agent-config-core/dist/agents/detect.d.ts +14 -0
  26. package/node_modules/plexus-agent-config-core/dist/agents/detect.d.ts.map +1 -0
  27. package/node_modules/plexus-agent-config-core/dist/agents/detect.js +92 -0
  28. package/node_modules/plexus-agent-config-core/dist/agents/detect.js.map +1 -0
  29. package/node_modules/plexus-agent-config-core/dist/agents/index.d.ts +5 -0
  30. package/node_modules/plexus-agent-config-core/dist/agents/index.d.ts.map +1 -0
  31. package/node_modules/plexus-agent-config-core/dist/agents/index.js +5 -0
  32. package/node_modules/plexus-agent-config-core/dist/agents/index.js.map +1 -0
  33. package/node_modules/plexus-agent-config-core/dist/agents/inspect.d.ts +74 -0
  34. package/node_modules/plexus-agent-config-core/dist/agents/inspect.d.ts.map +1 -0
  35. package/node_modules/plexus-agent-config-core/dist/agents/inspect.js +169 -0
  36. package/node_modules/plexus-agent-config-core/dist/agents/inspect.js.map +1 -0
  37. package/node_modules/plexus-agent-config-core/dist/backup/index.d.ts +70 -0
  38. package/node_modules/plexus-agent-config-core/dist/backup/index.d.ts.map +1 -0
  39. package/node_modules/plexus-agent-config-core/dist/backup/index.js +258 -0
  40. package/node_modules/plexus-agent-config-core/dist/backup/index.js.map +1 -0
  41. package/node_modules/plexus-agent-config-core/dist/debug/index.d.ts +71 -0
  42. package/node_modules/plexus-agent-config-core/dist/debug/index.d.ts.map +1 -0
  43. package/node_modules/plexus-agent-config-core/dist/debug/index.js +263 -0
  44. package/node_modules/plexus-agent-config-core/dist/debug/index.js.map +1 -0
  45. package/node_modules/plexus-agent-config-core/dist/effective/index.d.ts +65 -0
  46. package/node_modules/plexus-agent-config-core/dist/effective/index.d.ts.map +1 -0
  47. package/node_modules/plexus-agent-config-core/dist/effective/index.js +227 -0
  48. package/node_modules/plexus-agent-config-core/dist/effective/index.js.map +1 -0
  49. package/node_modules/plexus-agent-config-core/dist/import/from-agents.d.ts +59 -0
  50. package/node_modules/plexus-agent-config-core/dist/import/from-agents.d.ts.map +1 -0
  51. package/node_modules/plexus-agent-config-core/dist/import/from-agents.js +212 -0
  52. package/node_modules/plexus-agent-config-core/dist/import/from-agents.js.map +1 -0
  53. package/node_modules/plexus-agent-config-core/dist/import/index.d.ts +26 -0
  54. package/node_modules/plexus-agent-config-core/dist/import/index.d.ts.map +1 -0
  55. package/node_modules/plexus-agent-config-core/dist/import/index.js +100 -0
  56. package/node_modules/plexus-agent-config-core/dist/import/index.js.map +1 -0
  57. package/node_modules/plexus-agent-config-core/dist/index.d.ts +12 -0
  58. package/node_modules/plexus-agent-config-core/dist/index.d.ts.map +1 -0
  59. package/node_modules/plexus-agent-config-core/dist/index.js +12 -0
  60. package/node_modules/plexus-agent-config-core/dist/index.js.map +1 -0
  61. package/node_modules/plexus-agent-config-core/dist/rules/index.d.ts +6 -0
  62. package/node_modules/plexus-agent-config-core/dist/rules/index.d.ts.map +1 -0
  63. package/node_modules/plexus-agent-config-core/dist/rules/index.js +292 -0
  64. package/node_modules/plexus-agent-config-core/dist/rules/index.js.map +1 -0
  65. package/node_modules/plexus-agent-config-core/dist/spread/index.d.ts +38 -0
  66. package/node_modules/plexus-agent-config-core/dist/spread/index.d.ts.map +1 -0
  67. package/node_modules/plexus-agent-config-core/dist/spread/index.js +190 -0
  68. package/node_modules/plexus-agent-config-core/dist/spread/index.js.map +1 -0
  69. package/node_modules/plexus-agent-config-core/dist/store/config.d.ts +5 -0
  70. package/node_modules/plexus-agent-config-core/dist/store/config.d.ts.map +1 -0
  71. package/node_modules/plexus-agent-config-core/dist/store/config.js +62 -0
  72. package/node_modules/plexus-agent-config-core/dist/store/config.js.map +1 -0
  73. package/node_modules/plexus-agent-config-core/dist/store/custom-agents.d.ts +45 -0
  74. package/node_modules/plexus-agent-config-core/dist/store/custom-agents.d.ts.map +1 -0
  75. package/node_modules/plexus-agent-config-core/dist/store/custom-agents.js +103 -0
  76. package/node_modules/plexus-agent-config-core/dist/store/custom-agents.js.map +1 -0
  77. package/node_modules/plexus-agent-config-core/dist/store/fs-utils.d.ts +16 -0
  78. package/node_modules/plexus-agent-config-core/dist/store/fs-utils.d.ts.map +1 -0
  79. package/node_modules/plexus-agent-config-core/dist/store/fs-utils.js +45 -0
  80. package/node_modules/plexus-agent-config-core/dist/store/fs-utils.js.map +1 -0
  81. package/node_modules/plexus-agent-config-core/dist/store/index.d.ts +9 -0
  82. package/node_modules/plexus-agent-config-core/dist/store/index.d.ts.map +1 -0
  83. package/node_modules/plexus-agent-config-core/dist/store/index.js +9 -0
  84. package/node_modules/plexus-agent-config-core/dist/store/index.js.map +1 -0
  85. package/node_modules/plexus-agent-config-core/dist/store/mcp.d.ts +5 -0
  86. package/node_modules/plexus-agent-config-core/dist/store/mcp.d.ts.map +1 -0
  87. package/node_modules/plexus-agent-config-core/dist/store/mcp.js +30 -0
  88. package/node_modules/plexus-agent-config-core/dist/store/mcp.js.map +1 -0
  89. package/node_modules/plexus-agent-config-core/dist/store/merge.d.ts +15 -0
  90. package/node_modules/plexus-agent-config-core/dist/store/merge.d.ts.map +1 -0
  91. package/node_modules/plexus-agent-config-core/dist/store/merge.js +28 -0
  92. package/node_modules/plexus-agent-config-core/dist/store/merge.js.map +1 -0
  93. package/node_modules/plexus-agent-config-core/dist/store/paths.d.ts +22 -0
  94. package/node_modules/plexus-agent-config-core/dist/store/paths.d.ts.map +1 -0
  95. package/node_modules/plexus-agent-config-core/dist/store/paths.js +107 -0
  96. package/node_modules/plexus-agent-config-core/dist/store/paths.js.map +1 -0
  97. package/node_modules/plexus-agent-config-core/dist/store/rules.d.ts +12 -0
  98. package/node_modules/plexus-agent-config-core/dist/store/rules.d.ts.map +1 -0
  99. package/node_modules/plexus-agent-config-core/dist/store/rules.js +32 -0
  100. package/node_modules/plexus-agent-config-core/dist/store/rules.js.map +1 -0
  101. package/node_modules/plexus-agent-config-core/dist/store/scaffolding.d.ts +11 -0
  102. package/node_modules/plexus-agent-config-core/dist/store/scaffolding.d.ts.map +1 -0
  103. package/node_modules/plexus-agent-config-core/dist/store/scaffolding.js +32 -0
  104. package/node_modules/plexus-agent-config-core/dist/store/scaffolding.js.map +1 -0
  105. package/node_modules/plexus-agent-config-core/dist/store/skills.d.ts +13 -0
  106. package/node_modules/plexus-agent-config-core/dist/store/skills.d.ts.map +1 -0
  107. package/node_modules/plexus-agent-config-core/dist/store/skills.js +84 -0
  108. package/node_modules/plexus-agent-config-core/dist/store/skills.js.map +1 -0
  109. package/node_modules/plexus-agent-config-core/dist/sync/index.d.ts +89 -0
  110. package/node_modules/plexus-agent-config-core/dist/sync/index.d.ts.map +1 -0
  111. package/node_modules/plexus-agent-config-core/dist/sync/index.js +423 -0
  112. package/node_modules/plexus-agent-config-core/dist/sync/index.js.map +1 -0
  113. package/node_modules/plexus-agent-config-core/dist/team/git.d.ts +23 -0
  114. package/node_modules/plexus-agent-config-core/dist/team/git.d.ts.map +1 -0
  115. package/node_modules/plexus-agent-config-core/dist/team/git.js +132 -0
  116. package/node_modules/plexus-agent-config-core/dist/team/git.js.map +1 -0
  117. package/node_modules/plexus-agent-config-core/dist/team/index.d.ts +2 -0
  118. package/node_modules/plexus-agent-config-core/dist/team/index.d.ts.map +1 -0
  119. package/node_modules/plexus-agent-config-core/dist/team/index.js +2 -0
  120. package/node_modules/plexus-agent-config-core/dist/team/index.js.map +1 -0
  121. package/node_modules/plexus-agent-config-core/dist/types.d.ts +142 -0
  122. package/node_modules/plexus-agent-config-core/dist/types.d.ts.map +1 -0
  123. package/node_modules/plexus-agent-config-core/dist/types.js +13 -0
  124. package/node_modules/plexus-agent-config-core/dist/types.js.map +1 -0
  125. package/node_modules/plexus-agent-config-core/package.json +29 -0
  126. package/node_modules/plexus-agent-config-web/.next/BUILD_ID +1 -0
  127. package/node_modules/plexus-agent-config-web/.next/app-path-routes-manifest.json +39 -0
  128. package/node_modules/plexus-agent-config-web/.next/build-manifest.json +20 -0
  129. package/node_modules/plexus-agent-config-web/.next/export-marker.json +6 -0
  130. package/node_modules/plexus-agent-config-web/.next/images-manifest.json +68 -0
  131. package/node_modules/plexus-agent-config-web/.next/next-minimal-server.js.nft.json +1 -0
  132. package/node_modules/plexus-agent-config-web/.next/next-server.js.nft.json +1 -0
  133. package/node_modules/plexus-agent-config-web/.next/package.json +1 -0
  134. package/node_modules/plexus-agent-config-web/.next/prerender-manifest.json +36 -0
  135. package/node_modules/plexus-agent-config-web/.next/react-loadable-manifest.json +1 -0
  136. package/node_modules/plexus-agent-config-web/.next/required-server-files.js +337 -0
  137. package/node_modules/plexus-agent-config-web/.next/required-server-files.json +337 -0
  138. package/node_modules/plexus-agent-config-web/.next/routes-manifest.json +286 -0
  139. package/node_modules/plexus-agent-config-web/.next/server/app/_global-error/page.js +32 -0
  140. package/node_modules/plexus-agent-config-web/.next/server/app/_global-error/page.js.nft.json +1 -0
  141. package/node_modules/plexus-agent-config-web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -0
  142. package/node_modules/plexus-agent-config-web/.next/server/app/_global-error.html +1 -0
  143. package/node_modules/plexus-agent-config-web/.next/server/app/_global-error.meta +16 -0
  144. package/node_modules/plexus-agent-config-web/.next/server/app/_global-error.rsc +14 -0
  145. package/node_modules/plexus-agent-config-web/.next/server/app/_global-error.segments/_full.segment.rsc +14 -0
  146. package/node_modules/plexus-agent-config-web/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +5 -0
  147. package/node_modules/plexus-agent-config-web/.next/server/app/_global-error.segments/_global-error.segment.rsc +5 -0
  148. package/node_modules/plexus-agent-config-web/.next/server/app/_global-error.segments/_head.segment.rsc +5 -0
  149. package/node_modules/plexus-agent-config-web/.next/server/app/_global-error.segments/_index.segment.rsc +5 -0
  150. package/node_modules/plexus-agent-config-web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -0
  151. package/node_modules/plexus-agent-config-web/.next/server/app/_not-found/page.js +2 -0
  152. package/node_modules/plexus-agent-config-web/.next/server/app/_not-found/page.js.nft.json +1 -0
  153. package/node_modules/plexus-agent-config-web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -0
  154. package/node_modules/plexus-agent-config-web/.next/server/app/about/page.js +2 -0
  155. package/node_modules/plexus-agent-config-web/.next/server/app/about/page.js.nft.json +1 -0
  156. package/node_modules/plexus-agent-config-web/.next/server/app/about/page_client-reference-manifest.js +1 -0
  157. package/node_modules/plexus-agent-config-web/.next/server/app/agents/[id]/page.js +2 -0
  158. package/node_modules/plexus-agent-config-web/.next/server/app/agents/[id]/page.js.nft.json +1 -0
  159. package/node_modules/plexus-agent-config-web/.next/server/app/agents/[id]/page_client-reference-manifest.js +1 -0
  160. package/node_modules/plexus-agent-config-web/.next/server/app/api/agent/[id]/file/route.js +1 -0
  161. package/node_modules/plexus-agent-config-web/.next/server/app/api/agent/[id]/file/route.js.nft.json +1 -0
  162. package/node_modules/plexus-agent-config-web/.next/server/app/api/agent/[id]/file/route_client-reference-manifest.js +1 -0
  163. package/node_modules/plexus-agent-config-web/.next/server/app/api/agent/[id]/route.js +1 -0
  164. package/node_modules/plexus-agent-config-web/.next/server/app/api/agent/[id]/route.js.nft.json +1 -0
  165. package/node_modules/plexus-agent-config-web/.next/server/app/api/agent/[id]/route_client-reference-manifest.js +1 -0
  166. package/node_modules/plexus-agent-config-web/.next/server/app/api/agent-catalog/route.js +1 -0
  167. package/node_modules/plexus-agent-config-web/.next/server/app/api/agent-catalog/route.js.nft.json +1 -0
  168. package/node_modules/plexus-agent-config-web/.next/server/app/api/agent-catalog/route_client-reference-manifest.js +1 -0
  169. package/node_modules/plexus-agent-config-web/.next/server/app/api/agents/route.js +1 -0
  170. package/node_modules/plexus-agent-config-web/.next/server/app/api/agents/route.js.nft.json +1 -0
  171. package/node_modules/plexus-agent-config-web/.next/server/app/api/agents/route_client-reference-manifest.js +1 -0
  172. package/node_modules/plexus-agent-config-web/.next/server/app/api/backups/[id]/restore/route.js +1 -0
  173. package/node_modules/plexus-agent-config-web/.next/server/app/api/backups/[id]/restore/route.js.nft.json +1 -0
  174. package/node_modules/plexus-agent-config-web/.next/server/app/api/backups/[id]/restore/route_client-reference-manifest.js +1 -0
  175. package/node_modules/plexus-agent-config-web/.next/server/app/api/backups/route.js +1 -0
  176. package/node_modules/plexus-agent-config-web/.next/server/app/api/backups/route.js.nft.json +1 -0
  177. package/node_modules/plexus-agent-config-web/.next/server/app/api/backups/route_client-reference-manifest.js +1 -0
  178. package/node_modules/plexus-agent-config-web/.next/server/app/api/config/route.js +1 -0
  179. package/node_modules/plexus-agent-config-web/.next/server/app/api/config/route.js.nft.json +1 -0
  180. package/node_modules/plexus-agent-config-web/.next/server/app/api/config/route_client-reference-manifest.js +1 -0
  181. package/node_modules/plexus-agent-config-web/.next/server/app/api/custom-agents/[id]/file/route.js +1 -0
  182. package/node_modules/plexus-agent-config-web/.next/server/app/api/custom-agents/[id]/file/route.js.nft.json +1 -0
  183. package/node_modules/plexus-agent-config-web/.next/server/app/api/custom-agents/[id]/file/route_client-reference-manifest.js +1 -0
  184. package/node_modules/plexus-agent-config-web/.next/server/app/api/custom-agents/[id]/route.js +1 -0
  185. package/node_modules/plexus-agent-config-web/.next/server/app/api/custom-agents/[id]/route.js.nft.json +1 -0
  186. package/node_modules/plexus-agent-config-web/.next/server/app/api/custom-agents/[id]/route_client-reference-manifest.js +1 -0
  187. package/node_modules/plexus-agent-config-web/.next/server/app/api/custom-agents/route.js +1 -0
  188. package/node_modules/plexus-agent-config-web/.next/server/app/api/custom-agents/route.js.nft.json +1 -0
  189. package/node_modules/plexus-agent-config-web/.next/server/app/api/custom-agents/route_client-reference-manifest.js +1 -0
  190. package/node_modules/plexus-agent-config-web/.next/server/app/api/debug/route.js +1 -0
  191. package/node_modules/plexus-agent-config-web/.next/server/app/api/debug/route.js.nft.json +1 -0
  192. package/node_modules/plexus-agent-config-web/.next/server/app/api/debug/route_client-reference-manifest.js +1 -0
  193. package/node_modules/plexus-agent-config-web/.next/server/app/api/import/route.js +1 -0
  194. package/node_modules/plexus-agent-config-web/.next/server/app/api/import/route.js.nft.json +1 -0
  195. package/node_modules/plexus-agent-config-web/.next/server/app/api/import/route_client-reference-manifest.js +1 -0
  196. package/node_modules/plexus-agent-config-web/.next/server/app/api/mcp/[id]/toggle/route.js +1 -0
  197. package/node_modules/plexus-agent-config-web/.next/server/app/api/mcp/[id]/toggle/route.js.nft.json +1 -0
  198. package/node_modules/plexus-agent-config-web/.next/server/app/api/mcp/[id]/toggle/route_client-reference-manifest.js +1 -0
  199. package/node_modules/plexus-agent-config-web/.next/server/app/api/mcp/effective/route.js +1 -0
  200. package/node_modules/plexus-agent-config-web/.next/server/app/api/mcp/effective/route.js.nft.json +1 -0
  201. package/node_modules/plexus-agent-config-web/.next/server/app/api/mcp/effective/route_client-reference-manifest.js +1 -0
  202. package/node_modules/plexus-agent-config-web/.next/server/app/api/mcp/route.js +1 -0
  203. package/node_modules/plexus-agent-config-web/.next/server/app/api/mcp/route.js.nft.json +1 -0
  204. package/node_modules/plexus-agent-config-web/.next/server/app/api/mcp/route_client-reference-manifest.js +1 -0
  205. package/node_modules/plexus-agent-config-web/.next/server/app/api/rules/route.js +1 -0
  206. package/node_modules/plexus-agent-config-web/.next/server/app/api/rules/route.js.nft.json +1 -0
  207. package/node_modules/plexus-agent-config-web/.next/server/app/api/rules/route_client-reference-manifest.js +1 -0
  208. package/node_modules/plexus-agent-config-web/.next/server/app/api/skills/[id]/route.js +1 -0
  209. package/node_modules/plexus-agent-config-web/.next/server/app/api/skills/[id]/route.js.nft.json +1 -0
  210. package/node_modules/plexus-agent-config-web/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -0
  211. package/node_modules/plexus-agent-config-web/.next/server/app/api/skills/[id]/toggle/route.js +1 -0
  212. package/node_modules/plexus-agent-config-web/.next/server/app/api/skills/[id]/toggle/route.js.nft.json +1 -0
  213. package/node_modules/plexus-agent-config-web/.next/server/app/api/skills/[id]/toggle/route_client-reference-manifest.js +1 -0
  214. package/node_modules/plexus-agent-config-web/.next/server/app/api/skills/effective/route.js +1 -0
  215. package/node_modules/plexus-agent-config-web/.next/server/app/api/skills/effective/route.js.nft.json +1 -0
  216. package/node_modules/plexus-agent-config-web/.next/server/app/api/skills/effective/route_client-reference-manifest.js +1 -0
  217. package/node_modules/plexus-agent-config-web/.next/server/app/api/skills/route.js +1 -0
  218. package/node_modules/plexus-agent-config-web/.next/server/app/api/skills/route.js.nft.json +1 -0
  219. package/node_modules/plexus-agent-config-web/.next/server/app/api/skills/route_client-reference-manifest.js +1 -0
  220. package/node_modules/plexus-agent-config-web/.next/server/app/api/spread/route.js +1 -0
  221. package/node_modules/plexus-agent-config-web/.next/server/app/api/spread/route.js.nft.json +1 -0
  222. package/node_modules/plexus-agent-config-web/.next/server/app/api/spread/route_client-reference-manifest.js +1 -0
  223. package/node_modules/plexus-agent-config-web/.next/server/app/api/sync/route.js +1 -0
  224. package/node_modules/plexus-agent-config-web/.next/server/app/api/sync/route.js.nft.json +1 -0
  225. package/node_modules/plexus-agent-config-web/.next/server/app/api/sync/route_client-reference-manifest.js +1 -0
  226. package/node_modules/plexus-agent-config-web/.next/server/app/api/team/route.js +1 -0
  227. package/node_modules/plexus-agent-config-web/.next/server/app/api/team/route.js.nft.json +1 -0
  228. package/node_modules/plexus-agent-config-web/.next/server/app/api/team/route_client-reference-manifest.js +1 -0
  229. package/node_modules/plexus-agent-config-web/.next/server/app/backups/page.js +4 -0
  230. package/node_modules/plexus-agent-config-web/.next/server/app/backups/page.js.nft.json +1 -0
  231. package/node_modules/plexus-agent-config-web/.next/server/app/backups/page_client-reference-manifest.js +1 -0
  232. package/node_modules/plexus-agent-config-web/.next/server/app/debug/page.js +2 -0
  233. package/node_modules/plexus-agent-config-web/.next/server/app/debug/page.js.nft.json +1 -0
  234. package/node_modules/plexus-agent-config-web/.next/server/app/debug/page_client-reference-manifest.js +1 -0
  235. package/node_modules/plexus-agent-config-web/.next/server/app/mcp/page.js +2 -0
  236. package/node_modules/plexus-agent-config-web/.next/server/app/mcp/page.js.nft.json +1 -0
  237. package/node_modules/plexus-agent-config-web/.next/server/app/mcp/page_client-reference-manifest.js +1 -0
  238. package/node_modules/plexus-agent-config-web/.next/server/app/mirror/page.js +2 -0
  239. package/node_modules/plexus-agent-config-web/.next/server/app/mirror/page.js.nft.json +1 -0
  240. package/node_modules/plexus-agent-config-web/.next/server/app/mirror/page_client-reference-manifest.js +1 -0
  241. package/node_modules/plexus-agent-config-web/.next/server/app/page.js +2 -0
  242. package/node_modules/plexus-agent-config-web/.next/server/app/page.js.nft.json +1 -0
  243. package/node_modules/plexus-agent-config-web/.next/server/app/page_client-reference-manifest.js +1 -0
  244. package/node_modules/plexus-agent-config-web/.next/server/app/rules/page.js +10 -0
  245. package/node_modules/plexus-agent-config-web/.next/server/app/rules/page.js.nft.json +1 -0
  246. package/node_modules/plexus-agent-config-web/.next/server/app/rules/page_client-reference-manifest.js +1 -0
  247. package/node_modules/plexus-agent-config-web/.next/server/app/settings/page.js +2 -0
  248. package/node_modules/plexus-agent-config-web/.next/server/app/settings/page.js.nft.json +1 -0
  249. package/node_modules/plexus-agent-config-web/.next/server/app/settings/page_client-reference-manifest.js +1 -0
  250. package/node_modules/plexus-agent-config-web/.next/server/app/skills/page.js +2 -0
  251. package/node_modules/plexus-agent-config-web/.next/server/app/skills/page.js.nft.json +1 -0
  252. package/node_modules/plexus-agent-config-web/.next/server/app/skills/page_client-reference-manifest.js +1 -0
  253. package/node_modules/plexus-agent-config-web/.next/server/app/spread/page.js +2 -0
  254. package/node_modules/plexus-agent-config-web/.next/server/app/spread/page.js.nft.json +1 -0
  255. package/node_modules/plexus-agent-config-web/.next/server/app/spread/page_client-reference-manifest.js +1 -0
  256. package/node_modules/plexus-agent-config-web/.next/server/app/team/page.js +2 -0
  257. package/node_modules/plexus-agent-config-web/.next/server/app/team/page.js.nft.json +1 -0
  258. package/node_modules/plexus-agent-config-web/.next/server/app/team/page_client-reference-manifest.js +1 -0
  259. package/node_modules/plexus-agent-config-web/.next/server/app-paths-manifest.json +39 -0
  260. package/node_modules/plexus-agent-config-web/.next/server/chunks/103.js +18 -0
  261. package/node_modules/plexus-agent-config-web/.next/server/chunks/174.js +1 -0
  262. package/node_modules/plexus-agent-config-web/.next/server/chunks/380.js +1 -0
  263. package/node_modules/plexus-agent-config-web/.next/server/chunks/397.js +26 -0
  264. package/node_modules/plexus-agent-config-web/.next/server/chunks/479.js +45 -0
  265. package/node_modules/plexus-agent-config-web/.next/server/chunks/620.js +1 -0
  266. package/node_modules/plexus-agent-config-web/.next/server/chunks/750.js +1 -0
  267. package/node_modules/plexus-agent-config-web/.next/server/chunks/921.js +5 -0
  268. package/node_modules/plexus-agent-config-web/.next/server/functions-config-manifest.json +4 -0
  269. package/node_modules/plexus-agent-config-web/.next/server/interception-route-rewrite-manifest.js +1 -0
  270. package/node_modules/plexus-agent-config-web/.next/server/middleware-build-manifest.js +1 -0
  271. package/node_modules/plexus-agent-config-web/.next/server/middleware-manifest.json +6 -0
  272. package/node_modules/plexus-agent-config-web/.next/server/middleware-react-loadable-manifest.js +1 -0
  273. package/node_modules/plexus-agent-config-web/.next/server/next-font-manifest.js +1 -0
  274. package/node_modules/plexus-agent-config-web/.next/server/next-font-manifest.json +1 -0
  275. package/node_modules/plexus-agent-config-web/.next/server/pages/500.html +1 -0
  276. package/node_modules/plexus-agent-config-web/.next/server/pages-manifest.json +3 -0
  277. package/node_modules/plexus-agent-config-web/.next/server/prefetch-hints.json +1 -0
  278. package/node_modules/plexus-agent-config-web/.next/server/server-reference-manifest.js +1 -0
  279. package/node_modules/plexus-agent-config-web/.next/server/server-reference-manifest.json +1 -0
  280. package/node_modules/plexus-agent-config-web/.next/server/webpack-runtime.js +1 -0
  281. package/node_modules/plexus-agent-config-web/.next/static/chunks/1968-9d19293a29f03646.js +32 -0
  282. package/node_modules/plexus-agent-config-web/.next/static/chunks/3051-5eb2f5784474c658.js +1 -0
  283. package/node_modules/plexus-agent-config-web/.next/static/chunks/3090-3702701c503793f0.js +1 -0
  284. package/node_modules/plexus-agent-config-web/.next/static/chunks/4399-7cc367307a2c52a6.js +1 -0
  285. package/node_modules/plexus-agent-config-web/.next/static/chunks/5587-933f3258279c6072.js +1 -0
  286. package/node_modules/plexus-agent-config-web/.next/static/chunks/626-7ea78ce012c8d471.js +1 -0
  287. package/node_modules/plexus-agent-config-web/.next/static/chunks/7814-1bc9d30b9724b70c.js +1 -0
  288. package/node_modules/plexus-agent-config-web/.next/static/chunks/87c73c54-64138e17754e338c.js +1 -0
  289. package/node_modules/plexus-agent-config-web/.next/static/chunks/app/_global-error/page-fe6298e28540d3d8.js +1 -0
  290. package/node_modules/plexus-agent-config-web/.next/static/chunks/app/_not-found/page-303a3bb713044693.js +1 -0
  291. package/node_modules/plexus-agent-config-web/.next/static/chunks/app/about/page-64a1ee41b87ea86c.js +1 -0
  292. package/node_modules/plexus-agent-config-web/.next/static/chunks/app/agents/[id]/page-c3c89d8ae72c75c2.js +1 -0
  293. package/node_modules/plexus-agent-config-web/.next/static/chunks/app/api/agent/[id]/file/route-fe6298e28540d3d8.js +1 -0
  294. package/node_modules/plexus-agent-config-web/.next/static/chunks/app/api/agent/[id]/route-fe6298e28540d3d8.js +1 -0
  295. package/node_modules/plexus-agent-config-web/.next/static/chunks/app/api/agent-catalog/route-fe6298e28540d3d8.js +1 -0
  296. package/node_modules/plexus-agent-config-web/.next/static/chunks/app/api/agents/route-fe6298e28540d3d8.js +1 -0
  297. package/node_modules/plexus-agent-config-web/.next/static/chunks/app/api/backups/[id]/restore/route-fe6298e28540d3d8.js +1 -0
  298. package/node_modules/plexus-agent-config-web/.next/static/chunks/app/api/backups/route-fe6298e28540d3d8.js +1 -0
  299. package/node_modules/plexus-agent-config-web/.next/static/chunks/app/api/config/route-fe6298e28540d3d8.js +1 -0
  300. package/node_modules/plexus-agent-config-web/.next/static/chunks/app/api/custom-agents/[id]/file/route-fe6298e28540d3d8.js +1 -0
  301. package/node_modules/plexus-agent-config-web/.next/static/chunks/app/api/custom-agents/[id]/route-fe6298e28540d3d8.js +1 -0
  302. package/node_modules/plexus-agent-config-web/.next/static/chunks/app/api/custom-agents/route-fe6298e28540d3d8.js +1 -0
  303. package/node_modules/plexus-agent-config-web/.next/static/chunks/app/api/debug/route-fe6298e28540d3d8.js +1 -0
  304. package/node_modules/plexus-agent-config-web/.next/static/chunks/app/api/import/route-fe6298e28540d3d8.js +1 -0
  305. package/node_modules/plexus-agent-config-web/.next/static/chunks/app/api/mcp/[id]/toggle/route-fe6298e28540d3d8.js +1 -0
  306. package/node_modules/plexus-agent-config-web/.next/static/chunks/app/api/mcp/effective/route-fe6298e28540d3d8.js +1 -0
  307. package/node_modules/plexus-agent-config-web/.next/static/chunks/app/api/mcp/route-fe6298e28540d3d8.js +1 -0
  308. package/node_modules/plexus-agent-config-web/.next/static/chunks/app/api/rules/route-fe6298e28540d3d8.js +1 -0
  309. package/node_modules/plexus-agent-config-web/.next/static/chunks/app/api/skills/[id]/route-fe6298e28540d3d8.js +1 -0
  310. package/node_modules/plexus-agent-config-web/.next/static/chunks/app/api/skills/[id]/toggle/route-fe6298e28540d3d8.js +1 -0
  311. package/node_modules/plexus-agent-config-web/.next/static/chunks/app/api/skills/effective/route-fe6298e28540d3d8.js +1 -0
  312. package/node_modules/plexus-agent-config-web/.next/static/chunks/app/api/skills/route-fe6298e28540d3d8.js +1 -0
  313. package/node_modules/plexus-agent-config-web/.next/static/chunks/app/api/spread/route-fe6298e28540d3d8.js +1 -0
  314. package/node_modules/plexus-agent-config-web/.next/static/chunks/app/api/sync/route-fe6298e28540d3d8.js +1 -0
  315. package/node_modules/plexus-agent-config-web/.next/static/chunks/app/api/team/route-fe6298e28540d3d8.js +1 -0
  316. package/node_modules/plexus-agent-config-web/.next/static/chunks/app/backups/page-6842a663db4fab47.js +3 -0
  317. package/node_modules/plexus-agent-config-web/.next/static/chunks/app/debug/page-19e534df1d13eb98.js +1 -0
  318. package/node_modules/plexus-agent-config-web/.next/static/chunks/app/layout-798b3b697994c5bf.js +1 -0
  319. package/node_modules/plexus-agent-config-web/.next/static/chunks/app/mcp/page-d0d518965db961f1.js +1 -0
  320. package/node_modules/plexus-agent-config-web/.next/static/chunks/app/mirror/page-e88f348e1a12487a.js +1 -0
  321. package/node_modules/plexus-agent-config-web/.next/static/chunks/app/page-039dbbfad47ff659.js +1 -0
  322. package/node_modules/plexus-agent-config-web/.next/static/chunks/app/rules/page-5bb663fc0ee9960b.js +9 -0
  323. package/node_modules/plexus-agent-config-web/.next/static/chunks/app/settings/page-8164e1d1a8a08038.js +1 -0
  324. package/node_modules/plexus-agent-config-web/.next/static/chunks/app/skills/page-6067058898aa6e10.js +1 -0
  325. package/node_modules/plexus-agent-config-web/.next/static/chunks/app/spread/page-fe6298e28540d3d8.js +1 -0
  326. package/node_modules/plexus-agent-config-web/.next/static/chunks/app/team/page-edd7f54640e60e94.js +1 -0
  327. package/node_modules/plexus-agent-config-web/.next/static/chunks/framework-2c03ddc44b9f482b.js +1 -0
  328. package/node_modules/plexus-agent-config-web/.next/static/chunks/main-488dba80110e3bfb.js +5 -0
  329. package/node_modules/plexus-agent-config-web/.next/static/chunks/main-app-4c4bad3c22a66283.js +1 -0
  330. package/node_modules/plexus-agent-config-web/.next/static/chunks/next/dist/client/components/builtin/app-error-fe6298e28540d3d8.js +1 -0
  331. package/node_modules/plexus-agent-config-web/.next/static/chunks/next/dist/client/components/builtin/forbidden-fe6298e28540d3d8.js +1 -0
  332. package/node_modules/plexus-agent-config-web/.next/static/chunks/next/dist/client/components/builtin/global-error-821a044f296e83b5.js +1 -0
  333. package/node_modules/plexus-agent-config-web/.next/static/chunks/next/dist/client/components/builtin/not-found-fe6298e28540d3d8.js +1 -0
  334. package/node_modules/plexus-agent-config-web/.next/static/chunks/next/dist/client/components/builtin/unauthorized-fe6298e28540d3d8.js +1 -0
  335. package/node_modules/plexus-agent-config-web/.next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
  336. package/node_modules/plexus-agent-config-web/.next/static/chunks/webpack-dd4b9bd51624284c.js +1 -0
  337. package/node_modules/plexus-agent-config-web/.next/static/css/eba3657411e6e6cd.css +5 -0
  338. package/node_modules/plexus-agent-config-web/.next/static/media/19cfc7226ec3afaa-s.woff2 +0 -0
  339. package/node_modules/plexus-agent-config-web/.next/static/media/21350d82a1f187e9-s.woff2 +0 -0
  340. package/node_modules/plexus-agent-config-web/.next/static/media/8e9860b6e62d6359-s.woff2 +0 -0
  341. package/node_modules/plexus-agent-config-web/.next/static/media/ba9851c3c22cd980-s.woff2 +0 -0
  342. package/node_modules/plexus-agent-config-web/.next/static/media/c5fe6dc8356a8c31-s.woff2 +0 -0
  343. package/node_modules/plexus-agent-config-web/.next/static/media/df0a9ae256c0569c-s.woff2 +0 -0
  344. package/node_modules/plexus-agent-config-web/.next/static/media/e4af272ccee01ff0-s.p.woff2 +0 -0
  345. package/node_modules/plexus-agent-config-web/.next/static/mvb1RnSdmeAxbYF-SjSfa/_buildManifest.js +1 -0
  346. package/node_modules/plexus-agent-config-web/.next/static/mvb1RnSdmeAxbYF-SjSfa/_ssgManifest.js +1 -0
  347. package/node_modules/plexus-agent-config-web/next.config.mjs +17 -0
  348. package/node_modules/plexus-agent-config-web/package.json +40 -0
  349. package/node_modules/plexus-agent-config-web/public/architecture/config-sharing-map.html +887 -0
  350. package/node_modules/plexus-agent-config-web/public/favicon.svg +5 -0
  351. package/package.json +64 -0
@@ -0,0 +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()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3969],{4409:(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))},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"]})]})]})]})]})}},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=4409)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[90,483,594,645,1125,1159,2164,2543,3004,3141,3211,4042,4076,4398,4896,5012,5065,5221,6026,6819,6988,7711,7851,7923,8120,8167,9227,9460,9968],{1680:()=>{}},_=>{_.O(0,[587,1968,7358],()=>_(_.s=1680)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[90,483,594,645,1125,1159,2164,2543,3004,3141,3211,4042,4076,4398,4896,5012,5065,5221,6026,6819,6988,7711,7851,7923,8120,8167,9227,9460,9968],{1680:()=>{}},_=>{_.O(0,[587,1968,7358],()=>_(_.s=1680)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[90,483,594,645,1125,1159,2164,2543,3004,3141,3211,4042,4076,4398,4896,5012,5065,5221,6026,6819,6988,7711,7851,7923,8120,8167,9227,9460,9968],{1680:()=>{}},_=>{_.O(0,[587,1968,7358],()=>_(_.s=1680)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[90,483,594,645,1125,1159,2164,2543,3004,3141,3211,4042,4076,4398,4896,5012,5065,5221,6026,6819,6988,7711,7851,7923,8120,8167,9227,9460,9968],{1680:()=>{}},_=>{_.O(0,[587,1968,7358],()=>_(_.s=1680)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[90,483,594,645,1125,1159,2164,2543,3004,3141,3211,4042,4076,4398,4896,5012,5065,5221,6026,6819,6988,7711,7851,7923,8120,8167,9227,9460,9968],{1680:()=>{}},_=>{_.O(0,[587,1968,7358],()=>_(_.s=1680)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[90,483,594,645,1125,1159,2164,2543,3004,3141,3211,4042,4076,4398,4896,5012,5065,5221,6026,6819,6988,7711,7851,7923,8120,8167,9227,9460,9968],{1680:()=>{}},_=>{_.O(0,[587,1968,7358],()=>_(_.s=1680)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[90,483,594,645,1125,1159,2164,2543,3004,3141,3211,4042,4076,4398,4896,5012,5065,5221,6026,6819,6988,7711,7851,7923,8120,8167,9227,9460,9968],{1680:()=>{}},_=>{_.O(0,[587,1968,7358],()=>_(_.s=1680)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[90,483,594,645,1125,1159,2164,2543,3004,3141,3211,4042,4076,4398,4896,5012,5065,5221,6026,6819,6988,7711,7851,7923,8120,8167,9227,9460,9968],{1680:()=>{}},_=>{_.O(0,[587,1968,7358],()=>_(_.s=1680)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[90,483,594,645,1125,1159,2164,2543,3004,3141,3211,4042,4076,4398,4896,5012,5065,5221,6026,6819,6988,7711,7851,7923,8120,8167,9227,9460,9968],{1680:()=>{}},_=>{_.O(0,[587,1968,7358],()=>_(_.s=1680)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[90,483,594,645,1125,1159,2164,2543,3004,3141,3211,4042,4076,4398,4896,5012,5065,5221,6026,6819,6988,7711,7851,7923,8120,8167,9227,9460,9968],{1680:()=>{}},_=>{_.O(0,[587,1968,7358],()=>_(_.s=1680)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[90,483,594,645,1125,1159,2164,2543,3004,3141,3211,4042,4076,4398,4896,5012,5065,5221,6026,6819,6988,7711,7851,7923,8120,8167,9227,9460,9968],{1680:()=>{}},_=>{_.O(0,[587,1968,7358],()=>_(_.s=1680)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[90,483,594,645,1125,1159,2164,2543,3004,3141,3211,4042,4076,4398,4896,5012,5065,5221,6026,6819,6988,7711,7851,7923,8120,8167,9227,9460,9968],{1680:()=>{}},_=>{_.O(0,[587,1968,7358],()=>_(_.s=1680)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[90,483,594,645,1125,1159,2164,2543,3004,3141,3211,4042,4076,4398,4896,5012,5065,5221,6026,6819,6988,7711,7851,7923,8120,8167,9227,9460,9968],{1680:()=>{}},_=>{_.O(0,[587,1968,7358],()=>_(_.s=1680)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[90,483,594,645,1125,1159,2164,2543,3004,3141,3211,4042,4076,4398,4896,5012,5065,5221,6026,6819,6988,7711,7851,7923,8120,8167,9227,9460,9968],{1680:()=>{}},_=>{_.O(0,[587,1968,7358],()=>_(_.s=1680)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[90,483,594,645,1125,1159,2164,2543,3004,3141,3211,4042,4076,4398,4896,5012,5065,5221,6026,6819,6988,7711,7851,7923,8120,8167,9227,9460,9968],{1680:()=>{}},_=>{_.O(0,[587,1968,7358],()=>_(_.s=1680)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[90,483,594,645,1125,1159,2164,2543,3004,3141,3211,4042,4076,4398,4896,5012,5065,5221,6026,6819,6988,7711,7851,7923,8120,8167,9227,9460,9968],{1680:()=>{}},_=>{_.O(0,[587,1968,7358],()=>_(_.s=1680)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[90,483,594,645,1125,1159,2164,2543,3004,3141,3211,4042,4076,4398,4896,5012,5065,5221,6026,6819,6988,7711,7851,7923,8120,8167,9227,9460,9968],{1680:()=>{}},_=>{_.O(0,[587,1968,7358],()=>_(_.s=1680)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[90,483,594,645,1125,1159,2164,2543,3004,3141,3211,4042,4076,4398,4896,5012,5065,5221,6026,6819,6988,7711,7851,7923,8120,8167,9227,9460,9968],{1680:()=>{}},_=>{_.O(0,[587,1968,7358],()=>_(_.s=1680)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[90,483,594,645,1125,1159,2164,2543,3004,3141,3211,4042,4076,4398,4896,5012,5065,5221,6026,6819,6988,7711,7851,7923,8120,8167,9227,9460,9968],{1680:()=>{}},_=>{_.O(0,[587,1968,7358],()=>_(_.s=1680)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[90,483,594,645,1125,1159,2164,2543,3004,3141,3211,4042,4076,4398,4896,5012,5065,5221,6026,6819,6988,7711,7851,7923,8120,8167,9227,9460,9968],{1680:()=>{}},_=>{_.O(0,[587,1968,7358],()=>_(_.s=1680)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[90,483,594,645,1125,1159,2164,2543,3004,3141,3211,4042,4076,4398,4896,5012,5065,5221,6026,6819,6988,7711,7851,7923,8120,8167,9227,9460,9968],{1680:()=>{}},_=>{_.O(0,[587,1968,7358],()=>_(_.s=1680)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[90,483,594,645,1125,1159,2164,2543,3004,3141,3211,4042,4076,4398,4896,5012,5065,5221,6026,6819,6988,7711,7851,7923,8120,8167,9227,9460,9968],{1680:()=>{}},_=>{_.O(0,[587,1968,7358],()=>_(_.s=1680)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[90,483,594,645,1125,1159,2164,2543,3004,3141,3211,4042,4076,4398,4896,5012,5065,5221,6026,6819,6988,7711,7851,7923,8120,8167,9227,9460,9968],{1680:()=>{}},_=>{_.O(0,[587,1968,7358],()=>_(_.s=1680)),_N_E=_.O()}]);
@@ -0,0 +1,3 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2210],{2903:(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
+
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=2903)),_N_E=e.O()}]);
@@ -0,0 +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"}]])},5415:(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=5415)),_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})}},702:(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))},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.1"]})]}),(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"})]})]})}},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=702)),_N_E=e.O()}]);
@@ -0,0 +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()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4352],{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"}]])},9963:(e,s,t)=>{Promise.resolve().then(t.bind(t,7103))}},e=>{e.O(0,[4399,587,1968,7358],()=>e(e.s=9963)),_N_E=e.O()}]);
@@ -0,0 +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()}]);
@@ -0,0 +1,9 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9670],{4110:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});let s=(0,a(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"}]])},5927:(e,t,a)=>{Promise.resolve().then(a.bind(a,8287))},6197:(e,t,a)=>{"use strict";a.d(t,{E:()=>i,m:()=>r});var s=a(4568),n=a(7483);let l=(0,a(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:t,...a}){return(0,s.jsx)("span",{className:(0,n.cn)(l({variant:t}),e),...a})}function r({className:e,tone:t="ok"}){return(0,s.jsx)("span",{className:(0,n.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)})}},6439:(e,t,a)=>{"use strict";a.d(t,{LanguageProvider:()=>c,o:()=>u});var s=a(4568);let n="plexus.locale";function l(e){if(!e)return null;let t=e.toLowerCase();return"zh"===t||t.startsWith("zh-")?"zh":"en"===t||t.startsWith("en-")?"en":null}var i=a(9748),r=a(7620);let o=(0,r.createContext)(null);function d(e){window.localStorage.setItem(n,e),document.cookie=`plexus-locale=${e}; path=/; max-age=31536000; samesite=lax`}function c({children:e,initialLocale:t}){let a=(0,i.useRouter)(),[u,p]=(0,r.useState)(t);(0,r.useEffect)(()=>{var e;let s,i=l(window.localStorage.getItem(n))??t??(s=(Array.isArray(e=window.navigator.languages??window.navigator.language)?e.map((e,t)=>({value:e,q:1,index:t})):"string"==typeof e?e.split(",").map((e,t)=>{let[a="",...s]=e.trim().split(";"),n=s.find(e=>e.trim().startsWith("q=")),l=n?Number(n.trim().slice(2)):1;return{value:a,q:Number.isFinite(l)?l:1,index:t}}):[]).map(e=>({...e,locale:l(e.value)})).filter(e=>null!==e.locale).sort((e,t)=>t.q-e.q||e.index-t.index),s[0]?.locale??"en");if(i!==t){d(i),a.refresh();return}d(i),p(t)},[t,a]);let x=(0,r.useMemo)(()=>({locale:u,setLocale(e){d(e),a.refresh()},toggleLocale(){d("zh"===u?"en":"zh"),a.refresh()}}),[u,a]);return(0,s.jsx)(o.Provider,{value:x,children:e})}function u(){let e=(0,r.useContext)(o);if(!e)throw Error("useLanguage must be used inside LanguageProvider");return e}},7294:(e,t,a)=>{"use strict";a.d(t,{Z:()=>i});var s=a(4568),n=a(7483),l=a(7620);let i=(0,l.forwardRef)(({className:e,...t},a)=>(0,s.jsx)("div",{ref:a,className:(0,n.cn)("rounded-md border border-plexus-border bg-plexus-surface","transition-colors duration-plexus-normal ease-plexus-out",e),...t}));i.displayName="Card",(0,l.forwardRef)(({className:e,...t},a)=>(0,s.jsx)(i,{ref:a,className:(0,n.cn)("hover:border-plexus-border-strong hover:-translate-y-px",e),...t})).displayName="CardHover"},7483:(e,t,a)=>{"use strict";a.d(t,{cn:()=>l});var s=a(9917),n=a(2809);function l(...e){return(0,n.QP)((0,s.$)(e))}},7788:(e,t,a)=>{"use strict";a.d(t,{Button:()=>d});var s=a(4568),n=a(7483),l=a(8347),i=a(1397),r=a(7620);let o=(0,i.F)((0,n.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,r.forwardRef)(({className:e,variant:t,size:a,asChild:i=!1,type:r="button",...d},c)=>{let u=i?l.DX:"button";return(0,s.jsx)(u,{ref:c,type:i?void 0:r,className:(0,n.cn)(o({variant:t,size:a}),e),...d})});d.displayName="Button"},8287:(e,t,a)=>{"use strict";a.d(t,{RulesPanel:()=>R});var s=a(4568),n=a(6439),l=a(6197),i=a(7788),r=a(7294);let o="~/.config/plexus/personal/rules/global.md",d={"claude-code":"Claude Code",cursor:"Cursor",codex:"Codex","gemini-cli":"Gemini CLI","qwen-code":"Qwen Code","factory-droid":"Factory Droid"};function c(e){return"object"==typeof e&&null!==e}function u(e){return"string"==typeof e?e:void 0}function p(e){return"boolean"==typeof e?e:void 0}var x=a(7483),h=a(9250),m=a(8874),g=a(4110),f=a(9789);let y=(0,f.A)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]),v=(0,f.A)("send-horizontal",[["path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",key:"117uat"}],["path",{d:"M6 12h16",key:"s4cdu5"}]]),b=(0,f.A)("arrow-down-to-line",[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]]),k=(0,f.A)("link-2-off",[["path",{d:"M9 17H7A5 5 0 0 1 7 7",key:"10o201"}],["path",{d:"M15 7h2a5 5 0 0 1 4 8",key:"1d3206"}],["line",{x1:"8",x2:"12",y1:"12",y2:"12",key:"rvw6j4"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]),w=(0,f.A)("link-2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]),j=(0,f.A)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);var N=a(7620);function A(e){return function e(t){if(!c(t))return{content:"",canonicalPath:o,agents:[],unavailableReason:"Rules status response was empty."};if(c(t.status))return e(t.status);let a=c(t.canonical)?t.canonical:void 0,s=!!a?.exists||!!t.content,n=Array.isArray(t.agents)?t.agents.map(e=>(function(e,t){if(!c(e))return null;if("exists"in e||"inSync"in e||"agent"in e){let a,s,n,l,i,r,o;return a=p(e.exists)??!1,s=p(e.inSync)??!1,n=p(e.isSymlink)??!1,l=u(e.agent)??u(e.agentId)??"unknown",i=p(e.installed)??!0,r=p(e.enabled)??!0,o="missing",i?r?a&&s?o=n?"linked":"in sync":a&&!t.hasBaseline?o="local only":a&&(o="drift"):o="disabled":o="not installed",{agentId:l,displayName:u(e.displayName)??d[l],targetPath:u(e.targetPath)??"",status:o,installed:i,enabled:r,lastAppliedAt:u(e.lastAppliedAt)}}return{agentId:u(e.agentId)??"unknown",displayName:u(e.displayName)??d[u(e.agentId)??"unknown"],targetPath:u(e.targetPath)??"",status:u(e.status)??"missing",installed:p(e.installed),enabled:p(e.enabled),lastAppliedAt:u(e.lastAppliedAt)}})(e,{hasBaseline:s})).filter(e=>null!==e):[];return{content:u(t.content)??u(a?.content)??"",canonicalPath:u(t.canonicalPath)??u(a?.path)??o,agents:n,updatedAt:u(t.updatedAt)??u(a?.updatedAt),unavailableReason:u(t.unavailableReason)}}(e)}let C={en:{title:"Global Rules",unsaved:"unsaved",saved:"saved",refresh:"Refresh",save:"Save",apply:"Apply to detected agents",applyDirtyTitle:"Save the baseline before applying it.",placeholder:"Write the shared operating rules every agent should receive.",notSavedYet:"Not saved yet",refreshFailed:"Could not refresh rules status.",saveFailed:"Could not save rules.",savedMessage:"Saved to personal rules baseline.",applyFailed:"Could not apply rules.",appliedMessage:"Applied rules to detected agents.",importFailed:"Could not import rules.",importedMessage:"Imported agent rules into the personal baseline.",detachFailed:"Could not detach rules.",linkFailed:"Could not link rules.",targets:"Targets",targetsUsingBaseline:(e,t)=>`${e} of ${t} targets using baseline`,pendingSave:"pending save",baselineReady:"baseline ready",explanation:"Plexus writes the same baseline to Claude Code as CLAUDE.md and to other tools as AGENTS.md. Managed link means the agent file is a symlink to this baseline. Detach keeps a local copy for that agent; Re-link replaces that agent's file with the current baseline and keeps a backup.",lastUpdated:"Last updated:",agentTarget:"Agent target",status:"Status",noTargets:"Rules targets are waiting for the core rules API.",noApplyRecord:"no apply record",appliedAt:e=>`applied ${e}`,import:"Import",detach:"Detach",link:"Link",relink:"Re-link",detachDirtyTitle:"Save or discard baseline edits before detaching.",relinkDirtyTitle:"Save the baseline before linking it.",privacy:"Rules are plain text and user-authored. This page does not read or reveal MCP command environment variables or tokens.",managedLink:"managed link",localCopy:"local copy",detachConfirm:e=>`Detach ${e} from Global Rules?
2
+
3
+ ${e} will keep the current rules as a local file. Future edits to Global Rules will not affect it until you re-link it.`,relinkConfirm:e=>`Re-link ${e} to Global Rules?
4
+
5
+ This replaces ${e}'s current instruction file with the saved Plexus baseline. Plexus snapshots the current file first, so you can restore it from Backups.`,detachedMessage:e=>`Detached ${e}. It now has a local rules file.`,linkedMessage:e=>`Linked ${e} to Global Rules.`},zh:{title:"全局规则",unsaved:"未保存",saved:"已保存",refresh:"刷新",save:"保存",apply:"应用到已检测 Agent",applyDirtyTitle:"先保存基线,再应用到 Agent。",placeholder:"写下所有 Agent 都应该读取的共享规则。",notSavedYet:"尚未保存",refreshFailed:"无法刷新规则状态。",saveFailed:"无法保存规则。",savedMessage:"已保存到个人规则基线。",applyFailed:"无法应用规则。",appliedMessage:"已应用规则到已检测 Agent。",importFailed:"无法导入规则。",importedMessage:"已把该 Agent 的规则导入个人基线。",detachFailed:"无法解除规则同步。",linkFailed:"无法链接规则。",targets:"目标",targetsUsingBaseline:(e,t)=>`${e}/${t} 个目标使用基线`,pendingSave:"待保存",baselineReady:"基线就绪",explanation:"Plexus 会把同一份基线写给 Claude Code 的 CLAUDE.md,也会写给其他工具的 AGENTS.md。托管链接表示 Agent 文件是指向这份基线的软链接。解除同步会为该 Agent 保留一份本地副本;重新链接会用当前基线替换该 Agent 文件,并先做备份。",lastUpdated:"最近更新:",agentTarget:"Agent 目标",status:"状态",noTargets:"规则目标正在等待核心规则 API。",noApplyRecord:"暂无应用记录",appliedAt:e=>`已应用 ${e}`,import:"导入",detach:"解除同步",link:"链接",relink:"重新链接",detachDirtyTitle:"先保存或放弃基线改动,再解除同步。",relinkDirtyTitle:"先保存基线,再重新链接。",privacy:"Rules 是用户编写的纯文本。本页面不会读取或暴露 MCP 命令环境变量或 token。",managedLink:"托管链接",localCopy:"本地副本",detachConfirm:e=>`确定要让 ${e} 解除全局规则同步吗?
6
+
7
+ ${e} 会保留当前规则作为本地文件。之后全局规则的改动不会影响它,除非你重新链接。`,relinkConfirm:e=>`确定要把 ${e} 重新链接到全局规则吗?
8
+
9
+ 这会用已保存的 Plexus 基线替换 ${e} 当前的指令文件。Plexus 会先做快照,你可以在备份页恢复。`,detachedMessage:e=>`${e} 已解除同步,现在使用本地规则文件。`,linkedMessage:e=>`${e} 已链接到全局规则。`}};function M(e,t,a){return e?new Date(e).toLocaleString("zh"===a?"zh-CN":"en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}):t.notSavedYet}async function S(e,t){try{let a=await e.json();return a.error??a.message??t}catch{return t}}function R({initial:e}){let{locale:t}=(0,n.o)(),a=C[t],[o,d]=(0,N.useState)(e),[c,u]=(0,N.useState)(e.content??""),[p,f]=(0,N.useState)(null),[P,$]=(0,N.useState)(e.unavailableReason??null),z=c!==(o.content??""),T=(0,N.useMemo)(()=>o.agents.filter(e=>!1!==e.installed&&!1!==e.enabled),[o.agents]),F=(0,N.useMemo)(()=>T.filter(e=>["linked","copied","in sync"].includes(e.status)).length,[T]);async function I(e){f("refresh");try{let t=await fetch("/api/rules");if(!t.ok)return void $(await S(t,a.refreshFailed));let s=A(await t.json());d(s),u(s.content??""),$(e??s.unavailableReason??null)}finally{f(null)}}async function D(){f("save"),$(null);try{let e=await fetch("/api/rules",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({content:c})});if(!e.ok)return void $(await S(e,a.saveFailed));let t=A(await e.json());d(t),u(t.content??c),$(a.savedMessage)}finally{f(null)}}async function L(){f("apply"),$(null);try{let e=await fetch("/api/rules",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:"apply"})});if(!e.ok)return void $(await S(e,a.applyFailed));let t=A(await e.json());d(t),u(t.content??c),$(a.appliedMessage)}finally{f(null)}}async function W(e){f(`import:${e}`),$(null);try{let t=await fetch("/api/rules",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:"import",agentId:e})});if(!t.ok)return void $(await S(t,a.importFailed));let s=A(await t.json());d(s),u(s.content??""),$(a.importedMessage)}finally{f(null)}}async function E(e,t){if(confirm(a.detachConfirm(t))){f(`detach:${e}`),$(null);try{let s=await fetch("/api/rules",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:"detach",agentId:e})});if(!s.ok)return void $(await S(s,a.detachFailed));let n=A(await s.json());d(n),u(n.content??c),$(a.detachedMessage(t))}finally{f(null)}}}async function B(e,t,s){if("missing"===s||confirm(a.relinkConfirm(t))){f(`relink:${e}`),$(null);try{let s=await fetch("/api/rules",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:"relink",agentId:e})});if(!s.ok)return void $(await S(s,a.linkFailed));let n=A(await s.json());d(n),u(n.content??c),$(a.linkedMessage(t))}finally{f(null)}}}let O=!!o.unavailableReason;return(0,s.jsxs)("div",{className:"grid gap-4 xl:grid-cols-[minmax(0,1fr)_380px]",children:[(0,s.jsxs)(r.Z,{className:"overflow-hidden",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3 border-b border-plexus-border px-5 py-4",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(h.A,{className:"h-4 w-4 text-plexus-accent",strokeWidth:1.5}),(0,s.jsx)("h2",{className:"plexus-title",children:a.title}),z?(0,s.jsx)(l.E,{variant:"divergent",children:a.unsaved}):(0,s.jsx)(l.E,{variant:"synced",children:a.saved})]}),(0,s.jsx)("code",{className:"mt-1 block truncate font-mono text-xs text-plexus-text-3",children:o.canonicalPath})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsxs)(i.Button,{variant:"ghost",size:"sm",onClick:()=>I(),disabled:null!=p,children:["refresh"===p?(0,s.jsx)(m.A,{className:"h-3.5 w-3.5 animate-spin",strokeWidth:1.5}):(0,s.jsx)(g.A,{className:"h-3.5 w-3.5",strokeWidth:1.5}),a.refresh]}),(0,s.jsxs)(i.Button,{variant:"secondary",size:"sm",onClick:D,disabled:null!=p||O,children:["save"===p?(0,s.jsx)(m.A,{className:"h-3.5 w-3.5 animate-spin",strokeWidth:1.5}):(0,s.jsx)(y,{className:"h-3.5 w-3.5",strokeWidth:1.5}),a.save]}),(0,s.jsxs)(i.Button,{variant:"primary",size:"sm",onClick:L,disabled:null!=p||z||O,title:z?a.applyDirtyTitle:void 0,children:["apply"===p?(0,s.jsx)(m.A,{className:"h-3.5 w-3.5 animate-spin",strokeWidth:1.5}):(0,s.jsx)(v,{className:"h-3.5 w-3.5",strokeWidth:1.5}),a.apply]})]})]}),P&&(0,s.jsx)("div",{className:(0,x.cn)("border-b border-plexus-border px-5 py-2 text-xs",o.unavailableReason?"bg-plexus-warn/10 text-plexus-warn":"bg-plexus-surface-2 text-plexus-text-2"),children:P}),(0,s.jsx)("textarea",{className:"min-h-[520px] w-full resize-y bg-plexus-bg p-5 font-mono text-[13px] leading-6 text-plexus-text outline-none placeholder:text-plexus-text-mute focus:bg-plexus-bg",value:c,onChange:e=>u(e.target.value),disabled:O,placeholder:a.placeholder,spellCheck:!1})]}),(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)(r.Z,{className:"px-5 py-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"plexus-eyebrow mb-1",children:a.targets}),(0,s.jsx)("div",{className:"text-sm text-plexus-text-2",children:a.targetsUsingBaseline(F,T.length)})]}),(0,s.jsxs)(l.E,{variant:z?"divergent":"synced",children:[(0,s.jsx)(l.m,{tone:z?"warn":"ok"}),z?a.pendingSave:a.baselineReady]})]}),(0,s.jsx)("div",{className:"mt-4 text-xs leading-relaxed text-plexus-text-3",children:a.explanation}),(0,s.jsxs)("div",{className:"mt-3 text-xs text-plexus-text-3",children:[a.lastUpdated," ",(0,s.jsx)("span",{className:"text-plexus-text-2",children:M(o.updatedAt,a,t)})]})]}),(0,s.jsxs)(r.Z,{className:"overflow-hidden",children:[(0,s.jsxs)("div",{className:"grid grid-cols-[1fr_auto] border-b border-plexus-border px-4 py-3 text-[11px] uppercase tracking-[0.10em] text-plexus-text-3",children:[(0,s.jsx)("div",{children:a.agentTarget}),(0,s.jsx)("div",{children:a.status})]}),0===T.length?(0,s.jsx)("div",{className:"px-4 py-8 text-center text-sm text-plexus-text-3",children:a.noTargets}):T.map(e=>{var n,r,o;let d=p===`import:${e.agentId}`,c=p===`detach:${e.agentId}`,u=p===`relink:${e.agentId}`,x=e.displayName??e.agentId,h=null==p&&!O&&"disabled"!==e.status&&"not installed"!==e.status&&!z,g="linked"===e.status,f=!g&&"disabled"!==e.status&&"not installed"!==e.status;return(0,s.jsxs)("div",{className:"border-b border-plexus-border/60 px-4 py-3 last:border-0 hover:bg-plexus-surface-2/40",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("div",{className:"text-sm font-medium text-plexus-text",children:x}),(0,s.jsx)("code",{className:"mt-1 block truncate font-mono text-xs text-plexus-text-3",children:e.targetPath})]}),(0,s.jsxs)(l.E,{variant:"linked"===(n=e.status)||"copied"===n||"in sync"===n?"synced":"drift"===n?"divergent":"local only"===n?"outline":"missing"===n||"disabled"===n||"not installed"===n?"native":"outline",children:[(0,s.jsx)(l.m,{tone:"linked"===(r=e.status)||"copied"===r||"in sync"===r?"ok":"drift"===r?"warn":"local only"===r?"info":"missing"===r||"disabled"===r||"not installed"===r?"mute":"info"}),(o=e.status,"linked"===o?a.managedLink:"copied"===o||"in sync"===o?a.localCopy:o)]})]}),(0,s.jsxs)("div",{className:"mt-3 flex items-center justify-between gap-3",children:[(0,s.jsx)("span",{className:"text-[11px] text-plexus-text-mute",children:e.lastAppliedAt?a.appliedAt(M(e.lastAppliedAt,a,t)):a.noApplyRecord}),(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[g?null:(0,s.jsxs)(i.Button,{variant:"ghost",size:"sm",onClick:()=>W(e.agentId),disabled:null!=p||O||"missing"===e.status,children:[d?(0,s.jsx)(m.A,{className:"h-3.5 w-3.5 animate-spin",strokeWidth:1.5}):(0,s.jsx)(b,{className:"h-3.5 w-3.5",strokeWidth:1.5}),a.import]}),g?(0,s.jsxs)(i.Button,{variant:"ghost",size:"sm",onClick:()=>E(e.agentId,x),disabled:null!=p||O||z,title:z?a.detachDirtyTitle:void 0,children:[c?(0,s.jsx)(m.A,{className:"h-3.5 w-3.5 animate-spin",strokeWidth:1.5}):(0,s.jsx)(k,{className:"h-3.5 w-3.5",strokeWidth:1.5}),a.detach]}):null,f?(0,s.jsxs)(i.Button,{variant:"secondary",size:"sm",onClick:()=>B(e.agentId,x,e.status),disabled:!h,title:z?a.relinkDirtyTitle:void 0,children:[u?(0,s.jsx)(m.A,{className:"h-3.5 w-3.5 animate-spin",strokeWidth:1.5}):(0,s.jsx)(w,{className:"h-3.5 w-3.5",strokeWidth:1.5}),"missing"===e.status?a.link:a.relink]}):null]})]})]},e.agentId)})]}),(0,s.jsxs)(r.Z,{className:"flex items-start gap-3 px-5 py-4 text-sm text-plexus-text-2",children:[(0,s.jsx)(j,{className:"mt-0.5 h-4 w-4 shrink-0 text-plexus-ok",strokeWidth:1.5}),(0,s.jsx)("div",{children:a.privacy})]})]})]})}},8874:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});let s=(0,a(9789).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},9250:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});let s=(0,a(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"}]])},9748:(e,t,a)=>{"use strict";var s=a(9796);a.o(s,"usePathname")&&a.d(t,{usePathname:function(){return s.usePathname}}),a.o(s,"useRouter")&&a.d(t,{useRouter:function(){return s.useRouter}})}},e=>{e.O(0,[4399,587,1968,7358],()=>e(e.s=5927)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4662],{906:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(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"}]])},1405:(e,t,s)=>{"use strict";s.d(t,{SettingsPanel:()=>c});var a=s(4568),l=s(6439),r=s(7788),n=s(7294),i=s(906),o=s(7620);let d={en:{saved:"Saved",privacyTitle:"Privacy pledge.",privacy:"Plexus runs entirely on your machine. No data is sent anywhere — not even crash reports. The only outbound traffic is the optional git pull when you subscribe to a team config repo.",enabledAgents:"Enabled agents",enabledAgentsHelp:"Disable an agent to skip it during sync, even if it is installed.",syncStrategy:"Sync strategy",syncStrategyHelp:"Symlinks are preferred — changes propagate instantly without re-running sync. Copy fallback is more portable across operating systems but requires sync to refresh files."},zh:{saved:"已保存",privacyTitle:"隐私承诺。",privacy:"Plexus 完全在你的机器上运行。不会发送任何数据,包括崩溃报告。唯一的外部网络请求是你订阅团队配置仓库时可选的 git pull。",enabledAgents:"启用的 Agent",enabledAgentsHelp:"关闭某个 Agent 后,即使它已安装,同步时也会跳过它。",syncStrategy:"同步策略",syncStrategyHelp:"优先使用软链接:改动会立即传播,不需要再次同步。复制模式跨系统更稳,但文件刷新需要重新同步。"}};function c({config:e,agents:t,displayNames:s}){let{locale:x}=(0,l.o)(),u=d[x],[p,m]=(0,o.useState)(e),[g,h]=(0,o.useState)(null);async function b(e){m(e);let t=await fetch("/api/config",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(e)});t.ok?(h(u.saved),setTimeout(()=>h(null),1200)):h(`Error: ${await t.text()}`)}return(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)(n.Z,{className:"border-l-[3px] border-l-plexus-ok px-5 py-4",children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)(i.A,{className:"mt-0.5 h-4 w-4 shrink-0 text-plexus-ok",strokeWidth:1.5}),(0,a.jsxs)("div",{className:"text-xs leading-relaxed text-plexus-text-2",children:[(0,a.jsx)("span",{className:"font-semibold text-plexus-text",children:u.privacyTitle})," ",u.privacy]})]})}),(0,a.jsxs)(n.Z,{className:"p-5",children:[(0,a.jsx)("div",{className:"plexus-eyebrow mb-1",children:u.enabledAgents}),(0,a.jsx)("p",{className:"text-xs text-plexus-text-3",children:u.enabledAgentsHelp}),(0,a.jsx)("div",{className:"mt-4 grid grid-cols-2 gap-3",children:t.map(e=>{let t=!1!==p.agents[e];return(0,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-3 rounded border border-plexus-border bg-plexus-bg px-3 py-2 text-sm hover:border-plexus-border-strong",children:[(0,a.jsx)("input",{type:"checkbox",checked:t,onChange:t=>b({...p,agents:{...p.agents,[e]:t.target.checked}}),className:"h-4 w-4 cursor-pointer accent-plexus-accent"}),(0,a.jsx)("span",{className:t?"text-plexus-text":"text-plexus-text-3",children:s[e]??e})]},e)})})]}),(0,a.jsxs)(n.Z,{className:"p-5",children:[(0,a.jsx)("div",{className:"plexus-eyebrow mb-1",children:u.syncStrategy}),(0,a.jsx)("p",{className:"text-xs text-plexus-text-3",children:u.syncStrategyHelp}),(0,a.jsx)("div",{className:"mt-4 flex gap-2",children:["symlink","copy"].map(e=>{let t=p.syncStrategy===e;return(0,a.jsx)(r.Button,{variant:t?"primary":"secondary",size:"sm",onClick:()=>b({...p,syncStrategy:e}),children:e},e)})})]}),g&&(0,a.jsx)("div",{className:"text-xs text-plexus-text-3",children:g})]})}},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"}]])},4560:(e,t,s)=>{Promise.resolve().then(s.bind(s,5392)),Promise.resolve().then(s.bind(s,1405)),Promise.resolve().then(s.bind(s,7788)),Promise.resolve().then(s.bind(s,4228)),Promise.resolve().then(s.t.bind(s,5587,23))},5392:(e,t,s)=>{"use strict";s.d(t,{CustomAgentsPanel:()=>h});var a=s(4568),l=s(6439),r=s(6197),n=s(7788),i=s(7294),o=s(7378),d=s(3932),c=s(9250),x=s(3035),u=s(6969),p=s(8874),m=s(7620);let g={en:{catalog:"Agent catalog",catalogHelp:"Built-in agents sync Rules, MCP, and Skills. Other popular tools are listed as manual presets so users can quickly track an instruction file without waiting for a native adapter.",addAgent:"Add agent",agent:"Agent",status:"Status",support:"Support",action:"Action",installed:"installed",missing:"missing",fullSync:"full sync",manual:"manual",builtIn:"built-in",tracked:"tracked",trackFile:"Track file",agentId:"Agent id",displayName:"Display name",instructionFilePath:"Instruction file path",pathHelp:"Absolute or ~/ relative. Plexus will create or read the file when you click View / Edit.",note:"Note",optional:"optional",notePlaceholder:"Anything to remember about this agent...",cancel:"Cancel",adding:"Adding...",loading:"Loading custom agents...",noCustom:"No custom agents yet. Click Add agent to register one.",lite:"Lite",instructionsOnly:"instructions only",remove:"Remove",edit:"Edit",close:"Close",save:"Save",saving:"Saving...",editing:"editing",newFile:"new file",snapshotNotice:"Plexus snapshots the current file before save. Missing files are created on first save.",removeConfirm:e=>`Remove custom agent '${e}'? The instruction file on disk is not deleted.`,addFailed:"Failed to add custom agent",readFailed:"Failed to read file",saveFailed:"Failed to save file",saved:"Saved.",savedBackup:e=>`Saved. Backup: ${e}`},zh:{catalog:"Agent 目录",catalogHelp:"内置 Agent 支持 Rules、MCP 和 Skills 的完整同步。其他常见工具会作为手动预设展示,用户可以先追踪一个指令文件,不必等原生适配器。",addAgent:"新增 Agent",agent:"Agent",status:"状态",support:"支持",action:"操作",installed:"已安装",missing:"未发现",fullSync:"完整同步",manual:"手动",builtIn:"内置",tracked:"已追踪",trackFile:"追踪文件",agentId:"Agent ID",displayName:"展示名称",instructionFilePath:"指令文件路径",pathHelp:"支持绝对路径或 ~/ 相对路径。点击查看/编辑时,Plexus 会读取或创建该文件。",note:"备注",optional:"可选",notePlaceholder:"记录这个 Agent 的用途或注意事项...",cancel:"取消",adding:"正在新增...",loading:"正在加载自定义 Agent...",noCustom:"还没有自定义 Agent。点击新增 Agent 登记一个。",lite:"轻量",instructionsOnly:"仅指令文件",remove:"移除",edit:"编辑",close:"关闭",save:"保存",saving:"保存中...",editing:"编辑中",newFile:"新文件",snapshotNotice:"Plexus 会在保存前快照当前文件。缺失文件会在第一次保存时创建。",removeConfirm:e=>`移除自定义 Agent '${e}'?磁盘上的指令文件不会被删除。`,addFailed:"新增自定义 Agent 失败",readFailed:"读取文件失败",saveFailed:"保存文件失败",saved:"已保存。",savedBackup:e=>`已保存。备份:${e}`}};function h(){let{locale:e}=(0,l.o)(),t=g[e],[s,u]=(0,m.useState)([]),[p,h]=(0,m.useState)([]),[f,v]=(0,m.useState)(!0),[y,j]=(0,m.useState)(!1),[N,k]=(0,m.useState)({id:"",displayName:"",instructionFile:"",note:""}),[w,A]=(0,m.useState)(!1),[S,C]=(0,m.useState)(null),F=(0,m.useId)(),P=(0,m.useId)(),z=(0,m.useId)(),E=(0,m.useId)();function M(){j(!1),C(null),k({id:"",displayName:"",instructionFile:"",note:""})}async function H(){v(!0);try{let[e,t]=await Promise.all([fetch("/api/custom-agents"),fetch("/api/agent-catalog")]),s=await e.json(),a=await t.json();u(s.agents??[]),h(a.agents??[])}finally{v(!1)}}async function I(e){e.preventDefault(),A(!0),C(null);try{let e=await fetch("/api/custom-agents",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({id:N.id.trim(),displayName:N.displayName.trim(),instructionFile:N.instructionFile.trim(),note:N.note.trim()||void 0})}),s=await e.json();if(!s.ok)return void C(s.error??t.addFailed);M(),await H()}catch(e){C(e.message)}finally{A(!1)}}async function B(e){if(e.instructionFile){A(!0),C(null);try{let s=await fetch("/api/custom-agents",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({id:e.id,displayName:e.displayName,instructionFile:e.instructionFile,note:e.note})}),a=await s.json();if(!a.ok)return void C(a.error??t.addFailed);await H()}catch(e){C(e.message)}finally{A(!1)}}}async function _(e){if(confirm(t.removeConfirm(e))){A(!0);try{await fetch(`/api/custom-agents/${encodeURIComponent(e)}`,{method:"DELETE"}),await H()}finally{A(!1)}}}(0,m.useEffect)(()=>{let e=!1;return(async()=>{try{let[t,s]=await Promise.all([fetch("/api/custom-agents"),fetch("/api/agent-catalog")]),a=await t.json(),l=await s.json();e||(u(a.agents??[]),h(l.agents??[]))}finally{e||v(!1)}})(),()=>{e=!0}},[]);let R=new Set(s.map(e=>e.id)),T=[...p].sort((e,t)=>Number(t.installed)-Number(e.installed)||e.displayName.localeCompare(t.displayName));return(0,a.jsxs)(i.Z,{className:"p-5",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"plexus-eyebrow mb-1",children:t.catalog}),(0,a.jsx)("p",{className:"max-w-xl text-xs text-plexus-text-3",children:t.catalogHelp})]}),(0,a.jsxs)(n.Button,{variant:"secondary",size:"sm",onClick:()=>j(!0),children:[(0,a.jsx)(o.A,{className:"h-3.5 w-3.5",strokeWidth:1.5}),t.addAgent]})]}),p.length>0&&(0,a.jsxs)("div",{className:"mt-5 overflow-x-auto rounded border border-plexus-border",children:[(0,a.jsxs)("div",{className:"grid min-w-[720px] grid-cols-[1fr_86px_92px_96px] gap-x-4 border-b border-plexus-border bg-plexus-surface-2/40 px-4 py-2.5 text-[11px] uppercase tracking-[0.10em] text-plexus-text-3",children:[(0,a.jsx)("div",{children:t.agent}),(0,a.jsx)("div",{className:"text-right",children:t.status}),(0,a.jsx)("div",{className:"text-right",children:t.support}),(0,a.jsx)("div",{className:"text-right",children:t.action})]}),T.map(e=>{let s=R.has(e.id);return(0,a.jsxs)("div",{className:`grid min-w-[720px] grid-cols-[1fr_86px_92px_96px] gap-x-4 border-b border-plexus-border/60 px-4 py-3 text-sm last:border-0 ${e.installed?"bg-plexus-bg":"bg-plexus-surface text-plexus-text-3"}`,children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("div",{className:"font-semibold text-plexus-text",children:e.displayName}),(0,a.jsx)("div",{className:"font-mono text-[11px] text-plexus-text-3",children:e.id}),(0,a.jsx)("div",{className:"mt-1 truncate font-mono text-[11px] text-plexus-text-2",children:e.mcpPath??e.instructionFile??e.rootDir})]}),(0,a.jsx)("div",{className:"text-right",children:(0,a.jsx)(r.E,{variant:e.installed?"synced":"native",children:e.installed?t.installed:t.missing})}),(0,a.jsx)("div",{className:"text-right",children:(0,a.jsx)(r.E,{variant:e.managed?"personal":"outline",children:"full"===e.support?t.fullSync:t.manual})}),(0,a.jsx)("div",{className:"text-right",children:e.managed?(0,a.jsx)(r.E,{variant:"synced",children:t.builtIn}):s?(0,a.jsx)(r.E,{variant:"native",children:t.tracked}):(0,a.jsx)(n.Button,{variant:"ghost",size:"sm",onClick:()=>B(e),disabled:w||!e.instructionFile,children:t.trackFile})})]},e.id)})]}),y&&(0,a.jsx)("dialog",{open:!0,"aria-labelledby":"custom-agent-form-title",className:"fixed inset-0 z-50 m-0 h-full w-full max-w-none border-0 bg-transparent p-0",children:(0,a.jsx)("div",{role:"presentation",className:"flex h-full w-full cursor-default items-center justify-center bg-black/70 p-4",onClick:M,children:(0,a.jsxs)("form",{onSubmit:I,className:"w-full max-w-2xl space-y-4 rounded-md border border-plexus-border bg-plexus-surface p-5 text-left shadow-lg",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-4 border-b border-plexus-border pb-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{id:"custom-agent-form-title",className:"text-sm font-semibold text-plexus-text",children:t.addAgent}),(0,a.jsx)("p",{className:"mt-1 text-xs text-plexus-text-3",children:t.pathHelp})]}),(0,a.jsx)("button",{type:"button","aria-label":t.close,onClick:M,className:"text-plexus-text-3 hover:text-plexus-text",children:(0,a.jsx)(d.A,{className:"h-4 w-4",strokeWidth:1.5})})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{htmlFor:F,className:"mb-1 block text-[11px] uppercase tracking-[0.10em] text-plexus-text-3",children:t.agentId}),(0,a.jsx)("input",{id:F,type:"text",required:!0,placeholder:"e.g. copilot-cli",value:N.id,onChange:e=>k({...N,id:e.target.value}),pattern:"[a-z0-9](?:[a-z0-9-]*[a-z0-9])?",className:"w-full rounded border border-plexus-border bg-plexus-bg px-3 py-2 text-sm text-plexus-text outline-none focus:border-plexus-accent"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{htmlFor:P,className:"mb-1 block text-[11px] uppercase tracking-[0.10em] text-plexus-text-3",children:t.displayName}),(0,a.jsx)("input",{id:P,type:"text",required:!0,placeholder:"e.g. GitHub Copilot CLI",value:N.displayName,onChange:e=>k({...N,displayName:e.target.value}),className:"w-full rounded border border-plexus-border bg-plexus-bg px-3 py-2 text-sm text-plexus-text outline-none focus:border-plexus-accent"})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{htmlFor:z,className:"mb-1 block text-[11px] uppercase tracking-[0.10em] text-plexus-text-3",children:t.instructionFilePath}),(0,a.jsx)("input",{id:z,type:"text",required:!0,placeholder:"e.g. ~/.config/copilot/AGENTS.md",value:N.instructionFile,onChange:e=>k({...N,instructionFile:e.target.value}),className:"w-full rounded border border-plexus-border bg-plexus-bg px-3 py-2 font-mono text-xs text-plexus-text outline-none focus:border-plexus-accent"})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{htmlFor:E,className:"mb-1 block text-[11px] uppercase tracking-[0.10em] text-plexus-text-3",children:[t.note," ",(0,a.jsxs)("span",{className:"lowercase text-plexus-text-3",children:["(",t.optional,")"]})]}),(0,a.jsx)("input",{id:E,type:"text",maxLength:280,placeholder:t.notePlaceholder,value:N.note,onChange:e=>k({...N,note:e.target.value}),className:"w-full rounded border border-plexus-border bg-plexus-bg px-3 py-2 text-sm text-plexus-text outline-none focus:border-plexus-accent"})]}),S&&(0,a.jsx)("div",{className:"rounded border border-plexus-err/40 bg-plexus-err/10 px-3 py-2 text-xs text-plexus-err",children:S}),(0,a.jsxs)("div",{className:"flex justify-end gap-2 border-t border-plexus-border pt-3",children:[(0,a.jsx)(n.Button,{type:"button",variant:"ghost",size:"sm",onClick:M,children:t.cancel}),(0,a.jsx)(n.Button,{type:"submit",variant:"primary",size:"sm",disabled:w,children:w?t.adding:t.addAgent})]})]})})}),(0,a.jsxs)("div",{className:"mt-5",children:[f&&(0,a.jsx)("div",{className:"text-xs text-plexus-text-3",children:t.loading}),!f&&0===s.length&&(0,a.jsx)("div",{className:"rounded border border-dashed border-plexus-border bg-plexus-bg/40 px-4 py-6 text-center text-xs text-plexus-text-3",children:t.noCustom}),s.length>0&&(0,a.jsxs)("div",{className:"overflow-x-auto rounded border border-plexus-border",children:[(0,a.jsxs)("div",{className:"grid min-w-[720px] grid-cols-[1fr_130px_180px] gap-x-4 border-b border-plexus-border bg-plexus-surface-2/40 px-4 py-2.5 text-[11px] uppercase tracking-[0.10em] text-plexus-text-3",children:[(0,a.jsx)("div",{children:t.agent}),(0,a.jsx)("div",{className:"text-right",children:t.lite}),(0,a.jsx)("div",{className:"text-right",children:t.action})]}),s.map(e=>(0,a.jsxs)("div",{className:"grid min-w-[720px] grid-cols-[1fr_130px_180px] gap-x-4 border-b border-plexus-border/60 px-4 py-3 text-sm last:border-0",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"font-semibold text-plexus-text",children:e.displayName}),(0,a.jsx)("div",{className:"font-mono text-[11px] text-plexus-text-3",children:e.id}),(0,a.jsxs)("div",{className:"mt-1 flex items-center gap-1.5 font-mono text-[11px] text-plexus-text-2",children:[(0,a.jsx)(c.A,{className:"h-3 w-3",strokeWidth:1.5}),e.instructionFile]}),e.note&&(0,a.jsx)("div",{className:"mt-1 text-[11px] italic text-plexus-text-3",children:e.note})]}),(0,a.jsx)("div",{className:"text-right",children:(0,a.jsx)(r.E,{variant:"native",children:t.instructionsOnly})}),(0,a.jsxs)("div",{className:"flex justify-end gap-2 text-right",children:[(0,a.jsx)(b,{agent:e,copy:t}),(0,a.jsxs)(n.Button,{variant:"ghost",size:"sm",onClick:()=>_(e.id),disabled:w,children:[(0,a.jsx)(x.A,{className:"h-3.5 w-3.5",strokeWidth:1.5}),t.remove]})]})]},e.id))]})]})]})}function b({agent:e,copy:t}){let[s,l]=(0,m.useState)(!1),[i,o]=(0,m.useState)(!1),[c,x]=(0,m.useState)(!1),[g,h]=(0,m.useState)(""),[f,v]=(0,m.useState)(!1),[y,j]=(0,m.useState)(null);async function N(){v(!0),j(null);try{let s=await fetch(`/api/custom-agents/${encodeURIComponent(e.id)}/file`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({content:g})}),a=await s.json();if(!a.ok)return void j(a.message??t.saveFailed);x(!0),j(a.backup?t.savedBackup(a.backup):t.saved)}catch(e){j(e.message)}finally{v(!1)}}return(0,m.useEffect)(()=>{s&&!i&&(v(!0),fetch(`/api/custom-agents/${encodeURIComponent(e.id)}/file`).then(e=>e.json()).then(e=>{e.ok?(h(e.content??""),x(!!e.exists)):j(e.message??t.readFailed)}).catch(e=>j(e.message)).finally(()=>{o(!0),v(!1)}))},[s,i,e.id]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(n.Button,{variant:"ghost",size:"sm",onClick:()=>l(!0),children:[(0,a.jsx)(u.A,{className:"h-3.5 w-3.5",strokeWidth:1.5}),t.edit]}),s&&(0,a.jsx)("div",{role:"presentation",className:"fixed inset-0 z-50 flex cursor-default items-center justify-center bg-black/70 p-6",onClick:()=>l(!1),children:(0,a.jsxs)("div",{className:"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",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between border-b border-plexus-border px-5 py-3",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(r.E,{variant:c?"synced":"native",children:c?t.editing:t.newFile}),(0,a.jsx)("span",{className:"text-sm font-semibold text-plexus-text",children:e.displayName})]}),(0,a.jsx)("code",{className:"mt-1 block truncate font-mono text-xs text-plexus-text-3",children:e.instructionFile})]}),(0,a.jsx)("button",{type:"button","aria-label":"Close",onClick:()=>l(!1),className:"text-plexus-text-3 hover:text-plexus-text",children:(0,a.jsx)(d.A,{className:"h-4 w-4",strokeWidth:1.5})})]}),(0,a.jsx)("div",{className:"border-b border-plexus-border bg-plexus-surface-2/40 px-5 py-2 text-xs text-plexus-text-3",children:t.snapshotNotice}),y&&(0,a.jsx)("div",{className:"border-b border-plexus-border bg-plexus-surface-2 px-5 py-2 text-xs text-plexus-text-2",children:y}),(0,a.jsx)("textarea",{className:"flex-1 resize-none bg-plexus-bg p-4 font-mono text-xs text-plexus-text outline-none",value:g,onChange:e=>h(e.target.value)}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-2 border-t border-plexus-border px-5 py-3",children:[(0,a.jsx)(n.Button,{variant:"ghost",size:"sm",onClick:()=>l(!1),children:t.close}),(0,a.jsxs)(n.Button,{variant:"primary",size:"sm",onClick:N,disabled:f,children:[f&&(0,a.jsx)(p.A,{className:"h-3.5 w-3.5 animate-spin",strokeWidth:1.5}),f?t.saving:t.save]})]})]})})]})}},6197:(e,t,s)=>{"use strict";s.d(t,{E:()=>n,m:()=>i});var a=s(4568),l=s(7483);let r=(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 n({className:e,variant:t,...s}){return(0,a.jsx)("span",{className:(0,l.cn)(r({variant:t}),e),...s})}function i({className:e,tone:t="ok"}){return(0,a.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"}[t],e)})}},6439:(e,t,s)=>{"use strict";s.d(t,{LanguageProvider:()=>c,o:()=>x});var a=s(4568);let l="plexus.locale";function r(e){if(!e)return null;let t=e.toLowerCase();return"zh"===t||t.startsWith("zh-")?"zh":"en"===t||t.startsWith("en-")?"en":null}var n=s(9748),i=s(7620);let o=(0,i.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:t}){let s=(0,n.useRouter)(),[x,u]=(0,i.useState)(t);(0,i.useEffect)(()=>{var e;let a,n=r(window.localStorage.getItem(l))??t??(a=(Array.isArray(e=window.navigator.languages??window.navigator.language)?e.map((e,t)=>({value:e,q:1,index:t})):"string"==typeof e?e.split(",").map((e,t)=>{let[s="",...a]=e.trim().split(";"),l=a.find(e=>e.trim().startsWith("q=")),r=l?Number(l.trim().slice(2)):1;return{value:s,q:Number.isFinite(r)?r:1,index:t}}):[]).map(e=>({...e,locale:r(e.value)})).filter(e=>null!==e.locale).sort((e,t)=>t.q-e.q||e.index-t.index),a[0]?.locale??"en");if(n!==t){d(n),s.refresh();return}d(n),u(t)},[t,s]);let p=(0,i.useMemo)(()=>({locale:x,setLocale(e){d(e),s.refresh()},toggleLocale(){d("zh"===x?"en":"zh"),s.refresh()}}),[x,s]);return(0,a.jsx)(o.Provider,{value:p,children:e})}function x(){let e=(0,i.useContext)(o);if(!e)throw Error("useLanguage must be used inside LanguageProvider");return e}},6969:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(9789).A)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]])},7294:(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});var a=s(4568),l=s(7483),r=s(7620);let n=(0,r.forwardRef)(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,l.cn)("rounded-md border border-plexus-border bg-plexus-surface","transition-colors duration-plexus-normal ease-plexus-out",e),...t}));n.displayName="Card",(0,r.forwardRef)(({className:e,...t},s)=>(0,a.jsx)(n,{ref:s,className:(0,l.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:()=>r});var a=s(9917),l=s(2809);function r(...e){return(0,l.QP)((0,a.$)(e))}},7788:(e,t,s)=>{"use strict";s.d(t,{Button:()=>d});var a=s(4568),l=s(7483),r=s(8347),n=s(1397),i=s(7620);let o=(0,n.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,i.forwardRef)(({className:e,variant:t,size:s,asChild:n=!1,type:i="button",...d},c)=>{let x=n?r.DX:"button";return(0,a.jsx)(x,{ref:c,type:n?void 0:i,className:(0,l.cn)(o({variant:t,size:s}),e),...d})});d.displayName="Button"},8874:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(9789).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},9250:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(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"}]])},9748:(e,t,s)=>{"use strict";var a=s(9796);s.o(a,"usePathname")&&s.d(t,{usePathname:function(){return a.usePathname}}),s.o(a,"useRouter")&&s.d(t,{useRouter:function(){return a.useRouter}})}},e=>{e.O(0,[4399,5587,587,1968,7358],()=>e(e.s=4560)),_N_E=e.O()}]);