@geminilight/mindos-windows-arm64 1.0.6 → 1.0.8

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 (483) hide show
  1. package/_standalone/.mindos-build-version +1 -1
  2. package/_standalone/__next/BUILD_ID +1 -1
  3. package/_standalone/__next/app-path-routes-manifest.json +24 -24
  4. package/_standalone/__next/build-manifest.json +3 -3
  5. package/_standalone/__next/prerender-manifest.json +3 -3
  6. package/_standalone/__next/react-loadable-manifest.json +48 -7
  7. package/_standalone/__next/server/app/.well-known/agent-card.json/route_client-reference-manifest.js +1 -1
  8. package/_standalone/__next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  9. package/_standalone/__next/server/app/_global-error.html +2 -2
  10. package/_standalone/__next/server/app/_global-error.rsc +1 -1
  11. package/_standalone/__next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  12. package/_standalone/__next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  13. package/_standalone/__next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  14. package/_standalone/__next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  15. package/_standalone/__next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  16. package/_standalone/__next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  17. package/_standalone/__next/server/app/_not-found/page.js +1 -1
  18. package/_standalone/__next/server/app/_not-found/page.js.nft.json +1 -1
  19. package/_standalone/__next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  20. package/_standalone/__next/server/app/agents/[agentKey]/page.js +2 -2
  21. package/_standalone/__next/server/app/agents/[agentKey]/page.js.nft.json +1 -1
  22. package/_standalone/__next/server/app/agents/[agentKey]/page_client-reference-manifest.js +1 -1
  23. package/_standalone/__next/server/app/agents/page.js +2 -2
  24. package/_standalone/__next/server/app/agents/page.js.nft.json +1 -1
  25. package/_standalone/__next/server/app/agents/page_client-reference-manifest.js +1 -1
  26. package/_standalone/__next/server/app/api/a2a/agents/route_client-reference-manifest.js +1 -1
  27. package/_standalone/__next/server/app/api/a2a/delegations/route_client-reference-manifest.js +1 -1
  28. package/_standalone/__next/server/app/api/a2a/discover/route_client-reference-manifest.js +1 -1
  29. package/_standalone/__next/server/app/api/a2a/route_client-reference-manifest.js +1 -1
  30. package/_standalone/__next/server/app/api/acp/config/route_client-reference-manifest.js +1 -1
  31. package/_standalone/__next/server/app/api/acp/detect/route_client-reference-manifest.js +1 -1
  32. package/_standalone/__next/server/app/api/acp/install/route_client-reference-manifest.js +1 -1
  33. package/_standalone/__next/server/app/api/acp/registry/route_client-reference-manifest.js +1 -1
  34. package/_standalone/__next/server/app/api/acp/session/route_client-reference-manifest.js +1 -1
  35. package/_standalone/__next/server/app/api/agent-activity/route_client-reference-manifest.js +1 -1
  36. package/_standalone/__next/server/app/api/agents/copy-skill/route_client-reference-manifest.js +1 -1
  37. package/_standalone/__next/server/app/api/agents/custom/detect/route_client-reference-manifest.js +1 -1
  38. package/_standalone/__next/server/app/api/agents/custom/route_client-reference-manifest.js +1 -1
  39. package/_standalone/__next/server/app/api/ask/route.js +2 -2
  40. package/_standalone/__next/server/app/api/ask/route_client-reference-manifest.js +1 -1
  41. package/_standalone/__next/server/app/api/ask-sessions/route_client-reference-manifest.js +1 -1
  42. package/_standalone/__next/server/app/api/auth/route_client-reference-manifest.js +1 -1
  43. package/_standalone/__next/server/app/api/backlinks/route_client-reference-manifest.js +1 -1
  44. package/_standalone/__next/server/app/api/bootstrap/route_client-reference-manifest.js +1 -1
  45. package/_standalone/__next/server/app/api/changes/route_client-reference-manifest.js +1 -1
  46. package/_standalone/__next/server/app/api/channels/verify/route_client-reference-manifest.js +1 -1
  47. package/_standalone/__next/server/app/api/connect/route_client-reference-manifest.js +1 -1
  48. package/_standalone/__next/server/app/api/embedding/route_client-reference-manifest.js +1 -1
  49. package/_standalone/__next/server/app/api/export/route_client-reference-manifest.js +1 -1
  50. package/_standalone/__next/server/app/api/extract-docx/route_client-reference-manifest.js +1 -1
  51. package/_standalone/__next/server/app/api/extract-pdf/route_client-reference-manifest.js +1 -1
  52. package/_standalone/__next/server/app/api/file/import/route_client-reference-manifest.js +1 -1
  53. package/_standalone/__next/server/app/api/file/raw/route_client-reference-manifest.js +1 -1
  54. package/_standalone/__next/server/app/api/file/route_client-reference-manifest.js +1 -1
  55. package/_standalone/__next/server/app/api/files/route_client-reference-manifest.js +1 -1
  56. package/_standalone/__next/server/app/api/git/route_client-reference-manifest.js +1 -1
  57. package/_standalone/__next/server/app/api/graph/route_client-reference-manifest.js +1 -1
  58. package/_standalone/__next/server/app/api/health/route_client-reference-manifest.js +1 -1
  59. package/_standalone/__next/server/app/api/im/activity/route_client-reference-manifest.js +1 -1
  60. package/_standalone/__next/server/app/api/im/config/route_client-reference-manifest.js +1 -1
  61. package/_standalone/__next/server/app/api/im/feishu/long-connection/event/route_client-reference-manifest.js +1 -1
  62. package/_standalone/__next/server/app/api/im/feishu/long-connection/route_client-reference-manifest.js +1 -1
  63. package/_standalone/__next/server/app/api/im/status/route_client-reference-manifest.js +1 -1
  64. package/_standalone/__next/server/app/api/im/test/route_client-reference-manifest.js +1 -1
  65. package/_standalone/__next/server/app/api/im/webhook/feishu/route_client-reference-manifest.js +1 -1
  66. package/_standalone/__next/server/app/api/im/webhook-status/route_client-reference-manifest.js +1 -1
  67. package/_standalone/__next/server/app/api/inbox/clip/route_client-reference-manifest.js +1 -1
  68. package/_standalone/__next/server/app/api/inbox/route_client-reference-manifest.js +1 -1
  69. package/_standalone/__next/server/app/api/init/route_client-reference-manifest.js +1 -1
  70. package/_standalone/__next/server/app/api/lint/route_client-reference-manifest.js +1 -1
  71. package/_standalone/__next/server/app/api/mcp/agents/route_client-reference-manifest.js +1 -1
  72. package/_standalone/__next/server/app/api/mcp/direct-tools/route_client-reference-manifest.js +1 -1
  73. package/_standalone/__next/server/app/api/mcp/install/route_client-reference-manifest.js +1 -1
  74. package/_standalone/__next/server/app/api/mcp/install-skill/route_client-reference-manifest.js +1 -1
  75. package/_standalone/__next/server/app/api/mcp/restart/route_client-reference-manifest.js +1 -1
  76. package/_standalone/__next/server/app/api/mcp/status/route_client-reference-manifest.js +1 -1
  77. package/_standalone/__next/server/app/api/mcp/tools/route_client-reference-manifest.js +1 -1
  78. package/_standalone/__next/server/app/api/mcp/uninstall/route_client-reference-manifest.js +1 -1
  79. package/_standalone/__next/server/app/api/monitoring/route_client-reference-manifest.js +1 -1
  80. package/_standalone/__next/server/app/api/obsidian/compat-report/route_client-reference-manifest.js +1 -1
  81. package/_standalone/__next/server/app/api/obsidian/import/route_client-reference-manifest.js +1 -1
  82. package/_standalone/__next/server/app/api/obsidian-plugins/settings/route_client-reference-manifest.js +1 -1
  83. package/_standalone/__next/server/app/api/recent-files/route_client-reference-manifest.js +1 -1
  84. package/_standalone/__next/server/app/api/restart/route_client-reference-manifest.js +1 -1
  85. package/_standalone/__next/server/app/api/search/prewarm/route_client-reference-manifest.js +1 -1
  86. package/_standalone/__next/server/app/api/search/route_client-reference-manifest.js +1 -1
  87. package/_standalone/__next/server/app/api/settings/list-models/route_client-reference-manifest.js +1 -1
  88. package/_standalone/__next/server/app/api/settings/reset-token/route_client-reference-manifest.js +1 -1
  89. package/_standalone/__next/server/app/api/settings/route_client-reference-manifest.js +1 -1
  90. package/_standalone/__next/server/app/api/settings/test-key/route_client-reference-manifest.js +1 -1
  91. package/_standalone/__next/server/app/api/setup/check-path/route_client-reference-manifest.js +1 -1
  92. package/_standalone/__next/server/app/api/setup/check-port/route_client-reference-manifest.js +1 -1
  93. package/_standalone/__next/server/app/api/setup/generate-token/route_client-reference-manifest.js +1 -1
  94. package/_standalone/__next/server/app/api/setup/ls/route_client-reference-manifest.js +1 -1
  95. package/_standalone/__next/server/app/api/setup/route_client-reference-manifest.js +1 -1
  96. package/_standalone/__next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  97. package/_standalone/__next/server/app/api/space-overview/route_client-reference-manifest.js +1 -1
  98. package/_standalone/__next/server/app/api/sync/route_client-reference-manifest.js +1 -1
  99. package/_standalone/__next/server/app/api/tree-version/route_client-reference-manifest.js +1 -1
  100. package/_standalone/__next/server/app/api/uninstall/route_client-reference-manifest.js +1 -1
  101. package/_standalone/__next/server/app/api/update/route_client-reference-manifest.js +1 -1
  102. package/_standalone/__next/server/app/api/update-check/route_client-reference-manifest.js +1 -1
  103. package/_standalone/__next/server/app/api/update-status/route_client-reference-manifest.js +1 -1
  104. package/_standalone/__next/server/app/api/workflows/route_client-reference-manifest.js +1 -1
  105. package/_standalone/__next/server/app/capture/history/page.js +1 -1
  106. package/_standalone/__next/server/app/capture/history/page.js.nft.json +1 -1
  107. package/_standalone/__next/server/app/capture/history/page_client-reference-manifest.js +1 -1
  108. package/_standalone/__next/server/app/capture/page.js +1 -1
  109. package/_standalone/__next/server/app/capture/page.js.nft.json +1 -1
  110. package/_standalone/__next/server/app/capture/page_client-reference-manifest.js +1 -1
  111. package/_standalone/__next/server/app/changelog/page.js +1 -1
  112. package/_standalone/__next/server/app/changelog/page.js.nft.json +1 -1
  113. package/_standalone/__next/server/app/changelog/page_client-reference-manifest.js +1 -1
  114. package/_standalone/__next/server/app/changes/page.js +1 -1
  115. package/_standalone/__next/server/app/changes/page.js.nft.json +1 -1
  116. package/_standalone/__next/server/app/changes/page_client-reference-manifest.js +1 -1
  117. package/_standalone/__next/server/app/echo/[segment]/page.js +4 -4
  118. package/_standalone/__next/server/app/echo/[segment]/page.js.nft.json +1 -1
  119. package/_standalone/__next/server/app/echo/[segment]/page_client-reference-manifest.js +1 -1
  120. package/_standalone/__next/server/app/echo/page.js +1 -1
  121. package/_standalone/__next/server/app/echo/page.js.nft.json +1 -1
  122. package/_standalone/__next/server/app/echo/page_client-reference-manifest.js +1 -1
  123. package/_standalone/__next/server/app/explore/page.js +3 -3
  124. package/_standalone/__next/server/app/explore/page.js.nft.json +1 -1
  125. package/_standalone/__next/server/app/explore/page_client-reference-manifest.js +1 -1
  126. package/_standalone/__next/server/app/help/page.js +2 -2
  127. package/_standalone/__next/server/app/help/page.js.nft.json +1 -1
  128. package/_standalone/__next/server/app/help/page_client-reference-manifest.js +1 -1
  129. package/_standalone/__next/server/app/inbox/history/page.js +1 -1
  130. package/_standalone/__next/server/app/inbox/history/page.js.nft.json +1 -1
  131. package/_standalone/__next/server/app/inbox/history/page_client-reference-manifest.js +1 -1
  132. package/_standalone/__next/server/app/login/page.js +1 -1
  133. package/_standalone/__next/server/app/login/page.js.nft.json +1 -1
  134. package/_standalone/__next/server/app/login/page_client-reference-manifest.js +1 -1
  135. package/_standalone/__next/server/app/page.js +1 -1
  136. package/_standalone/__next/server/app/page.js.nft.json +1 -1
  137. package/_standalone/__next/server/app/page_client-reference-manifest.js +1 -1
  138. package/_standalone/__next/server/app/settings/page.js +8 -3
  139. package/_standalone/__next/server/app/settings/page.js.nft.json +1 -1
  140. package/_standalone/__next/server/app/settings/page_client-reference-manifest.js +1 -1
  141. package/_standalone/__next/server/app/setup/page.js +1 -1
  142. package/_standalone/__next/server/app/setup/page.js.nft.json +1 -1
  143. package/_standalone/__next/server/app/setup/page_client-reference-manifest.js +1 -1
  144. package/_standalone/__next/server/app/todo/page.js +1 -1
  145. package/_standalone/__next/server/app/todo/page.js.nft.json +1 -1
  146. package/_standalone/__next/server/app/todo/page_client-reference-manifest.js +1 -1
  147. package/_standalone/__next/server/app/trash/page.js +2 -2
  148. package/_standalone/__next/server/app/trash/page.js.nft.json +1 -1
  149. package/_standalone/__next/server/app/trash/page_client-reference-manifest.js +1 -1
  150. package/_standalone/__next/server/app/view/[...path]/page.js +3 -3
  151. package/_standalone/__next/server/app/view/[...path]/page.js.nft.json +1 -1
  152. package/_standalone/__next/server/app/view/[...path]/page_client-reference-manifest.js +1 -1
  153. package/_standalone/__next/server/app/wiki/page.js +1 -1
  154. package/_standalone/__next/server/app/wiki/page.js.nft.json +1 -1
  155. package/_standalone/__next/server/app/wiki/page_client-reference-manifest.js +1 -1
  156. package/_standalone/__next/server/app-paths-manifest.json +24 -24
  157. package/_standalone/__next/server/chunks/103.js +1 -1
  158. package/_standalone/__next/server/chunks/1976.js +1 -1
  159. package/_standalone/__next/server/chunks/6602.js +43 -66
  160. package/_standalone/__next/server/chunks/6646.js +16 -0
  161. package/_standalone/__next/server/chunks/8461.js +7 -7
  162. package/_standalone/__next/server/chunks/9868.js +2 -0
  163. package/_standalone/__next/server/chunks/{3219.js → 9969.js} +4 -4
  164. package/_standalone/__next/server/middleware-build-manifest.js +1 -1
  165. package/_standalone/__next/server/middleware-react-loadable-manifest.js +1 -1
  166. package/_standalone/__next/server/pages/500.html +2 -2
  167. package/_standalone/__next/server/server-reference-manifest.js +1 -1
  168. package/_standalone/__next/server/server-reference-manifest.json +1 -1
  169. package/_standalone/__next/static/chunks/{1430-c4ffa328888515c1.js → 1104-0822d9349a412b9b.js} +7 -2
  170. package/_standalone/__next/static/chunks/1655.0a559759973b42e9.js +1 -0
  171. package/_standalone/__next/static/chunks/{2073-3f913ebb13702b7e.js → 2073-fadffc82a27afdc7.js} +2 -2
  172. package/{static-web/_next/static/chunks/9216.d3339c27169b21bf.js → _standalone/__next/static/chunks/2245.ef71edb24c5232c2.js} +1 -1
  173. package/_standalone/__next/static/chunks/2258-2d3b5aac6a1fa92a.js +53 -0
  174. package/{static-web/_next/static/chunks/4937-4101fcdadacf46e3.js → _standalone/__next/static/chunks/2409-244f9b90dceb0c04.js} +1 -1
  175. package/_standalone/__next/static/chunks/3279-b49c25a4f2964b16.js +1 -0
  176. package/_standalone/__next/static/chunks/3807-115388f118106ca8.js +1 -0
  177. package/_standalone/__next/static/chunks/3966.ea75f9c5490955de.js +1 -0
  178. package/_standalone/__next/static/chunks/4010.48b219cb22dfa5d8.js +10 -0
  179. package/_standalone/__next/static/chunks/5026-7fed7ca22272c18f.js +1 -0
  180. package/_standalone/__next/static/chunks/5152-87e6ed56dfd7d17d.js +1 -0
  181. package/_standalone/__next/static/chunks/577.5e448c99068f1323.js +1 -0
  182. package/_standalone/__next/static/chunks/5913.a0a734f87b13f81a.js +1 -0
  183. package/_standalone/__next/static/chunks/596.9cbaf6ba90cb204f.js +7 -0
  184. package/_standalone/__next/static/chunks/6223-3fb90852221bda56.js +1 -0
  185. package/_standalone/__next/static/chunks/6343.582d063078c45d73.js +6 -0
  186. package/_standalone/__next/static/chunks/8174-50048777dc2469c0.js +1 -0
  187. package/_standalone/__next/static/chunks/{5913.3cee388e26959b62.js → 8294.cc9f9ff2f8b219ed.js} +1 -1
  188. package/_standalone/__next/static/chunks/8626-7da79d9ab2504eed.js +1 -0
  189. package/_standalone/__next/static/chunks/{8732.9002f42201b06fe8.js → 8732.87554c78e8825fac.js} +4 -4
  190. package/_standalone/__next/static/chunks/8922-3babcd35e18e9e4f.js +1 -0
  191. package/_standalone/__next/static/chunks/9440-eee639175695be7d.js +33 -0
  192. package/_standalone/__next/static/chunks/9479-b48d19e3588823c1.js +34 -0
  193. package/_standalone/__next/static/chunks/{9602.4e99e3525e5f062c.js → 9602.218427fc7b3d6b11.js} +1 -1
  194. package/_standalone/__next/static/chunks/app/agents/[agentKey]/page-ef111ea0a3368752.js +1 -0
  195. package/_standalone/__next/static/chunks/app/agents/page-aacead0f47cedb0d.js +1 -0
  196. package/_standalone/__next/static/chunks/app/layout-ed608bbf9585e78f.js +99 -0
  197. package/_standalone/__next/static/chunks/app/page-d22928276c36528c.js +1 -0
  198. package/_standalone/__next/static/chunks/app/settings/{page-c9f44b3447a41431.js → page-045afd8c0908f923.js} +1 -1
  199. package/{static-web/_next/static/chunks/app/setup/page-f5de08d0d588c778.js → _standalone/__next/static/chunks/app/setup/page-034a608f19d04653.js} +1 -1
  200. package/_standalone/__next/static/chunks/app/trash/page-251aaf5aac9d5a0b.js +1 -0
  201. package/_standalone/__next/static/chunks/app/view/[...path]/page-7e17c3d13fe2e275.js +12 -0
  202. package/_standalone/__next/static/chunks/webpack-1decda0633a8a874.js +1 -0
  203. package/_standalone/__next/static/css/5f000212c8b2e09a.css +1 -0
  204. package/_standalone/__node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  205. package/_standalone/__node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  206. package/_standalone/__node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  207. package/_standalone/__node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  208. package/_standalone/__node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  209. package/_standalone/__node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  210. package/_standalone/__node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  211. package/_standalone/__node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  212. package/_standalone/__node_modules/@aws-sdk/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  213. package/_standalone/__node_modules/@aws-sdk/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  214. package/_standalone/__node_modules/@aws-sdk/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  215. package/_standalone/__node_modules/@aws-sdk/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  216. package/_standalone/__node_modules/@aws-sdk/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  217. package/_standalone/__node_modules/@aws-sdk/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  218. package/_standalone/__node_modules/@aws-sdk/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  219. package/_standalone/__node_modules/@aws-sdk/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  220. package/_standalone/__node_modules/@aws-sdk/middleware-sdk-s3/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  221. package/_standalone/__node_modules/@aws-sdk/middleware-sdk-s3/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  222. package/_standalone/__node_modules/@aws-sdk/middleware-sdk-s3/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  223. package/_standalone/__node_modules/@aws-sdk/middleware-sdk-s3/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  224. package/_standalone/__node_modules/@aws-sdk/middleware-sdk-s3/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  225. package/_standalone/__node_modules/@aws-sdk/middleware-sdk-s3/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  226. package/_standalone/__node_modules/@aws-sdk/middleware-sdk-s3/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  227. package/_standalone/__node_modules/@aws-sdk/middleware-sdk-s3/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  228. package/_standalone/__node_modules/@aws-sdk/middleware-websocket/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  229. package/_standalone/__node_modules/@aws-sdk/middleware-websocket/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  230. package/_standalone/__node_modules/@aws-sdk/middleware-websocket/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  231. package/_standalone/__node_modules/@aws-sdk/middleware-websocket/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  232. package/_standalone/__node_modules/@aws-sdk/middleware-websocket/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  233. package/_standalone/__node_modules/@aws-sdk/middleware-websocket/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  234. package/_standalone/__node_modules/@aws-sdk/middleware-websocket/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  235. package/_standalone/__node_modules/@aws-sdk/middleware-websocket/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  236. package/_standalone/__node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  237. package/_standalone/__node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  238. package/_standalone/__node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  239. package/_standalone/__node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  240. package/_standalone/__node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  241. package/_standalone/__node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  242. package/_standalone/__node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  243. package/_standalone/__node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  244. package/_standalone/__node_modules/@mariozechner/pi-coding-agent/node_modules/strip-ansi/node_modules/ansi-regex/index.js +14 -0
  245. package/_standalone/__node_modules/@mariozechner/pi-coding-agent/node_modules/strip-ansi/node_modules/ansi-regex/license +9 -0
  246. package/_standalone/__node_modules/@mariozechner/pi-coding-agent/node_modules/strip-ansi/node_modules/ansi-regex/package.json +61 -0
  247. package/_standalone/__node_modules/@smithy/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  248. package/_standalone/__node_modules/@smithy/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  249. package/_standalone/__node_modules/@smithy/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  250. package/_standalone/__node_modules/@smithy/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  251. package/_standalone/__node_modules/@smithy/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  252. package/_standalone/__node_modules/@smithy/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  253. package/_standalone/__node_modules/@smithy/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  254. package/_standalone/__node_modules/@smithy/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  255. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  256. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  257. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  258. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  259. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  260. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  261. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  262. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  263. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  264. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  265. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  266. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  267. package/_standalone/__node_modules/@smithy/signature-v4/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  268. package/_standalone/__node_modules/@smithy/signature-v4/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  269. package/_standalone/__node_modules/@smithy/signature-v4/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  270. package/_standalone/__node_modules/@smithy/signature-v4/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  271. package/_standalone/__node_modules/@smithy/signature-v4/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  272. package/_standalone/__node_modules/@smithy/signature-v4/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  273. package/_standalone/__node_modules/@smithy/signature-v4/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  274. package/_standalone/__node_modules/@smithy/signature-v4/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  275. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  276. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  277. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  278. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  279. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  280. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  281. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  282. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  283. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  284. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  285. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  286. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  287. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  288. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  289. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  290. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  291. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  292. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  293. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  294. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  295. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  296. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  297. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  298. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  299. package/_standalone/__node_modules/bignumber.js/doc/API.html +2249 -0
  300. package/_standalone/__node_modules/entities/LICENSE +11 -0
  301. package/_standalone/__node_modules/entities/dist/decode-codepoint.js +46 -0
  302. package/_standalone/__node_modules/entities/dist/decode.js +544 -0
  303. package/_standalone/__node_modules/entities/dist/encode.js +90 -0
  304. package/_standalone/__node_modules/entities/dist/escape.js +132 -0
  305. package/_standalone/__node_modules/entities/dist/generated/decode-data-html.js +5 -0
  306. package/_standalone/__node_modules/entities/dist/generated/decode-data-xml.js +5 -0
  307. package/_standalone/__node_modules/entities/dist/generated/encode-html.js +12 -0
  308. package/_standalone/__node_modules/entities/dist/index.js +91 -0
  309. package/_standalone/__node_modules/entities/dist/internal/bin-trie-flags.js +18 -0
  310. package/_standalone/__node_modules/entities/dist/internal/decode-shared.js +17 -0
  311. package/_standalone/__node_modules/entities/dist/internal/encode-shared.js +93 -0
  312. package/_standalone/__node_modules/entities/package.json +83 -0
  313. package/_standalone/__node_modules/entities/src/decode-codepoint.ts +50 -0
  314. package/_standalone/__node_modules/entities/src/decode.ts +671 -0
  315. package/_standalone/__node_modules/entities/src/encode.ts +95 -0
  316. package/_standalone/__node_modules/entities/src/escape.ts +160 -0
  317. package/_standalone/__node_modules/entities/src/generated/decode-data-html.ts +7 -0
  318. package/_standalone/__node_modules/entities/src/generated/decode-data-xml.ts +7 -0
  319. package/_standalone/__node_modules/entities/src/generated/encode-html.ts +18 -0
  320. package/_standalone/__node_modules/entities/src/index.ts +162 -0
  321. package/_standalone/__node_modules/entities/src/internal/bin-trie-flags.ts +16 -0
  322. package/_standalone/__node_modules/entities/src/internal/decode-shared.ts +18 -0
  323. package/_standalone/__node_modules/entities/src/internal/encode-shared.ts +123 -0
  324. package/_standalone/__node_modules/has-flag/index.js +8 -0
  325. package/_standalone/__node_modules/has-flag/license +9 -0
  326. package/_standalone/__node_modules/has-flag/package.json +46 -0
  327. package/_standalone/__node_modules/koffi/doc/benchmarks.md +126 -0
  328. package/_standalone/__node_modules/koffi/doc/callbacks.md +210 -0
  329. package/_standalone/__node_modules/koffi/doc/contribute.md +148 -0
  330. package/_standalone/__node_modules/koffi/doc/functions.md +250 -0
  331. package/_standalone/__node_modules/koffi/doc/index.md +61 -0
  332. package/_standalone/__node_modules/koffi/doc/input.md +471 -0
  333. package/_standalone/__node_modules/koffi/doc/migration.md +159 -0
  334. package/_standalone/__node_modules/koffi/doc/misc.md +180 -0
  335. package/_standalone/__node_modules/koffi/doc/output.md +305 -0
  336. package/_standalone/__node_modules/koffi/doc/packaging.md +88 -0
  337. package/_standalone/__node_modules/koffi/doc/platforms.md +36 -0
  338. package/_standalone/__node_modules/koffi/doc/pointers.md +328 -0
  339. package/_standalone/__node_modules/koffi/doc/start.md +118 -0
  340. package/_standalone/__node_modules/koffi/doc/unions.md +186 -0
  341. package/_standalone/__node_modules/koffi/doc/variables.md +102 -0
  342. package/_standalone/__node_modules/supports-color/browser.js +5 -0
  343. package/_standalone/__node_modules/supports-color/index.js +135 -0
  344. package/_standalone/__node_modules/supports-color/license +9 -0
  345. package/_standalone/__node_modules/supports-color/package.json +53 -0
  346. package/_standalone/__node_modules/yaml/browser/dist/doc/Document.js +335 -0
  347. package/_standalone/__node_modules/yaml/browser/dist/doc/anchors.js +71 -0
  348. package/_standalone/__node_modules/yaml/browser/dist/doc/applyReviver.js +55 -0
  349. package/_standalone/__node_modules/yaml/browser/dist/doc/createNode.js +88 -0
  350. package/_standalone/__node_modules/yaml/browser/dist/doc/directives.js +176 -0
  351. package/_standalone/__node_modules/yaml/dist/doc/Document.js +337 -0
  352. package/_standalone/__node_modules/yaml/dist/doc/anchors.js +76 -0
  353. package/_standalone/__node_modules/yaml/dist/doc/applyReviver.js +57 -0
  354. package/_standalone/__node_modules/yaml/dist/doc/createNode.js +90 -0
  355. package/_standalone/__node_modules/yaml/dist/doc/directives.js +178 -0
  356. package/_standalone/public/agent-icons/claude.svg +1 -0
  357. package/_standalone/public/agent-icons/cursor.svg +1 -0
  358. package/_standalone/public/agent-icons/github-copilot.svg +1 -0
  359. package/_standalone/public/agent-icons/google.svg +1 -0
  360. package/_standalone/public/agent-icons/openai.svg +1 -0
  361. package/_standalone/public/agent-icons/windsurf.svg +1 -0
  362. package/bin/lib/stop.js +45 -0
  363. package/bin/lib/sync.js +32 -19
  364. package/dist/server/handlers/file.js +5 -2
  365. package/dist/server/handlers/file.js.map +1 -1
  366. package/dist/server/handlers/mcp-restart.d.ts +2 -0
  367. package/dist/server/handlers/mcp-restart.d.ts.map +1 -1
  368. package/dist/server/handlers/mcp-restart.js +45 -2
  369. package/dist/server/handlers/mcp-restart.js.map +1 -1
  370. package/dist/server/handlers/skills.d.ts.map +1 -1
  371. package/dist/server/handlers/skills.js +17 -3
  372. package/dist/server/handlers/skills.js.map +1 -1
  373. package/dist/server/handlers/sync.d.ts.map +1 -1
  374. package/dist/server/handlers/sync.js +28 -10
  375. package/dist/server/handlers/sync.js.map +1 -1
  376. package/dist/server/index.d.ts +1 -1
  377. package/dist/server/index.d.ts.map +1 -1
  378. package/dist/server/index.js +1 -1
  379. package/dist/server/index.js.map +1 -1
  380. package/dist/server/runtime.d.ts.map +1 -1
  381. package/dist/server/runtime.js +20 -21
  382. package/dist/server/runtime.js.map +1 -1
  383. package/package.json +1 -1
  384. package/runtime-manifest.json +1 -1
  385. package/scripts/build-bun-binary.mjs +139 -6
  386. package/scripts/prepare-standalone.mjs +0 -1
  387. package/scripts/prepare-static-web.mjs +52 -4
  388. package/scripts/release.sh +1 -1
  389. package/scripts/setup.js +115 -2
  390. package/scripts/verify-standalone.mjs +12 -0
  391. package/static-web/.mindos-build-version +1 -1
  392. package/static-web/_next/static/chunks/{1430-c4ffa328888515c1.js → 1104-0822d9349a412b9b.js} +7 -2
  393. package/static-web/_next/static/chunks/1655.0a559759973b42e9.js +1 -0
  394. package/static-web/_next/static/chunks/{2073-3f913ebb13702b7e.js → 2073-fadffc82a27afdc7.js} +2 -2
  395. package/{_standalone/__next/static/chunks/9216.d3339c27169b21bf.js → static-web/_next/static/chunks/2245.ef71edb24c5232c2.js} +1 -1
  396. package/static-web/_next/static/chunks/2258-2d3b5aac6a1fa92a.js +53 -0
  397. package/{_standalone/__next/static/chunks/4937-4101fcdadacf46e3.js → static-web/_next/static/chunks/2409-244f9b90dceb0c04.js} +1 -1
  398. package/static-web/_next/static/chunks/3279-b49c25a4f2964b16.js +1 -0
  399. package/static-web/_next/static/chunks/3807-115388f118106ca8.js +1 -0
  400. package/static-web/_next/static/chunks/3966.ea75f9c5490955de.js +1 -0
  401. package/static-web/_next/static/chunks/4010.48b219cb22dfa5d8.js +10 -0
  402. package/static-web/_next/static/chunks/5026-7fed7ca22272c18f.js +1 -0
  403. package/static-web/_next/static/chunks/5152-87e6ed56dfd7d17d.js +1 -0
  404. package/static-web/_next/static/chunks/577.5e448c99068f1323.js +1 -0
  405. package/static-web/_next/static/chunks/5913.a0a734f87b13f81a.js +1 -0
  406. package/static-web/_next/static/chunks/596.9cbaf6ba90cb204f.js +7 -0
  407. package/static-web/_next/static/chunks/6223-3fb90852221bda56.js +1 -0
  408. package/static-web/_next/static/chunks/6343.582d063078c45d73.js +6 -0
  409. package/static-web/_next/static/chunks/8174-50048777dc2469c0.js +1 -0
  410. package/static-web/_next/static/chunks/{5913.3cee388e26959b62.js → 8294.cc9f9ff2f8b219ed.js} +1 -1
  411. package/static-web/_next/static/chunks/8626-7da79d9ab2504eed.js +1 -0
  412. package/static-web/_next/static/chunks/{8732.9002f42201b06fe8.js → 8732.87554c78e8825fac.js} +4 -4
  413. package/static-web/_next/static/chunks/8922-3babcd35e18e9e4f.js +1 -0
  414. package/static-web/_next/static/chunks/9440-eee639175695be7d.js +33 -0
  415. package/static-web/_next/static/chunks/9479-b48d19e3588823c1.js +34 -0
  416. package/static-web/_next/static/chunks/{9602.4e99e3525e5f062c.js → 9602.218427fc7b3d6b11.js} +1 -1
  417. package/static-web/_next/static/chunks/app/agents/[agentKey]/page-ef111ea0a3368752.js +1 -0
  418. package/static-web/_next/static/chunks/app/agents/page-aacead0f47cedb0d.js +1 -0
  419. package/static-web/_next/static/chunks/app/layout-ed608bbf9585e78f.js +99 -0
  420. package/static-web/_next/static/chunks/app/page-d22928276c36528c.js +1 -0
  421. package/static-web/_next/static/chunks/app/settings/{page-c9f44b3447a41431.js → page-045afd8c0908f923.js} +1 -1
  422. package/{_standalone/__next/static/chunks/app/setup/page-f5de08d0d588c778.js → static-web/_next/static/chunks/app/setup/page-034a608f19d04653.js} +1 -1
  423. package/static-web/_next/static/chunks/app/trash/page-251aaf5aac9d5a0b.js +1 -0
  424. package/static-web/_next/static/chunks/app/view/[...path]/page-7e17c3d13fe2e275.js +12 -0
  425. package/static-web/_next/static/chunks/webpack-1decda0633a8a874.js +1 -0
  426. package/static-web/_next/static/css/5f000212c8b2e09a.css +1 -0
  427. package/static-web/agent-icons/claude.svg +1 -0
  428. package/static-web/agent-icons/cursor.svg +1 -0
  429. package/static-web/agent-icons/github-copilot.svg +1 -0
  430. package/static-web/agent-icons/google.svg +1 -0
  431. package/static-web/agent-icons/openai.svg +1 -0
  432. package/static-web/agent-icons/windsurf.svg +1 -0
  433. package/static-web/help/index.html +5 -20
  434. package/static-web/index.html +8 -22
  435. package/static-web/setup/index.html +5 -20
  436. package/static-web/static-web-manifest.json +1 -1
  437. package/static-web/wiki/index.html +5 -20
  438. package/_standalone/__next/server/chunks/2037.js +0 -2
  439. package/_standalone/__next/server/chunks/9350.js +0 -11
  440. package/_standalone/__next/static/chunks/2288-4dcb8ad3ccbd651e.js +0 -1
  441. package/_standalone/__next/static/chunks/2461-a1073a0bd04c228a.js +0 -33
  442. package/_standalone/__next/static/chunks/3424-060f01a8983e438d.js +0 -1
  443. package/_standalone/__next/static/chunks/4172-4fc551f07f7d082f.js +0 -1
  444. package/_standalone/__next/static/chunks/4454-f582e17b76ccf1d1.js +0 -1
  445. package/_standalone/__next/static/chunks/47-41e1a06e6d389b69.js +0 -48
  446. package/_standalone/__next/static/chunks/5152-2db55438be7ecb94.js +0 -1
  447. package/_standalone/__next/static/chunks/5200-6c82e5ce54a95b4b.js +0 -6
  448. package/_standalone/__next/static/chunks/6274-f173cb227ad1ef21.js +0 -1
  449. package/_standalone/__next/static/chunks/6947.7e50e18da7dc4aef.js +0 -1
  450. package/_standalone/__next/static/chunks/725-3b648bf7929ff78d.js +0 -1
  451. package/_standalone/__next/static/chunks/9479-7b304601a56304cd.js +0 -32
  452. package/_standalone/__next/static/chunks/app/agents/[agentKey]/page-44c493b744d18249.js +0 -1
  453. package/_standalone/__next/static/chunks/app/agents/page-6591b482a193e657.js +0 -1
  454. package/_standalone/__next/static/chunks/app/layout-5966cd317bbed698.js +0 -114
  455. package/_standalone/__next/static/chunks/app/page-5c9489e28657376e.js +0 -1
  456. package/_standalone/__next/static/chunks/app/trash/page-d87207a63591ee16.js +0 -1
  457. package/_standalone/__next/static/chunks/app/view/[...path]/page-1898f4ae4ab28db0.js +0 -12
  458. package/_standalone/__next/static/chunks/webpack-75abef9cbb1ea912.js +0 -1
  459. package/_standalone/__next/static/css/0d2fd378b5449176.css +0 -1
  460. package/static-web/_next/static/chunks/2288-4dcb8ad3ccbd651e.js +0 -1
  461. package/static-web/_next/static/chunks/2461-a1073a0bd04c228a.js +0 -33
  462. package/static-web/_next/static/chunks/3424-060f01a8983e438d.js +0 -1
  463. package/static-web/_next/static/chunks/4172-4fc551f07f7d082f.js +0 -1
  464. package/static-web/_next/static/chunks/4454-f582e17b76ccf1d1.js +0 -1
  465. package/static-web/_next/static/chunks/47-41e1a06e6d389b69.js +0 -48
  466. package/static-web/_next/static/chunks/5152-2db55438be7ecb94.js +0 -1
  467. package/static-web/_next/static/chunks/5200-6c82e5ce54a95b4b.js +0 -6
  468. package/static-web/_next/static/chunks/6274-f173cb227ad1ef21.js +0 -1
  469. package/static-web/_next/static/chunks/6947.7e50e18da7dc4aef.js +0 -1
  470. package/static-web/_next/static/chunks/725-3b648bf7929ff78d.js +0 -1
  471. package/static-web/_next/static/chunks/9479-7b304601a56304cd.js +0 -32
  472. package/static-web/_next/static/chunks/app/agents/[agentKey]/page-44c493b744d18249.js +0 -1
  473. package/static-web/_next/static/chunks/app/agents/page-6591b482a193e657.js +0 -1
  474. package/static-web/_next/static/chunks/app/layout-5966cd317bbed698.js +0 -114
  475. package/static-web/_next/static/chunks/app/page-5c9489e28657376e.js +0 -1
  476. package/static-web/_next/static/chunks/app/trash/page-d87207a63591ee16.js +0 -1
  477. package/static-web/_next/static/chunks/app/view/[...path]/page-1898f4ae4ab28db0.js +0 -12
  478. package/static-web/_next/static/chunks/webpack-75abef9cbb1ea912.js +0 -1
  479. package/static-web/_next/static/css/0d2fd378b5449176.css +0 -1
  480. /package/_standalone/__next/static/{J9M4pgRyRHH7Ofbxuuklh → apol5mbXb7N_sqaKgpXN1}/_buildManifest.js +0 -0
  481. /package/_standalone/__next/static/{J9M4pgRyRHH7Ofbxuuklh → apol5mbXb7N_sqaKgpXN1}/_ssgManifest.js +0 -0
  482. /package/static-web/_next/static/{J9M4pgRyRHH7Ofbxuuklh → apol5mbXb7N_sqaKgpXN1}/_buildManifest.js +0 -0
  483. /package/static-web/_next/static/{J9M4pgRyRHH7Ofbxuuklh → apol5mbXb7N_sqaKgpXN1}/_ssgManifest.js +0 -0
@@ -96,11 +96,11 @@ function createRuntimeArchive(runtimeRoot, archivePath, options = {}) {
96
96
 
97
97
  function createEntrySource({ productName, version, platform }) {
98
98
  return `import runtimeArchivePath from "./runtime.tar.gz" with { type: "file" };
99
- import { spawnSync } from "node:child_process";
100
- import { existsSync, mkdirSync, readFileSync, renameSync, rmSync } from "node:fs";
99
+ import { existsSync, mkdirSync, readFileSync, renameSync, rmSync, symlinkSync, writeFileSync } from "node:fs";
101
100
  import { homedir, tmpdir } from "node:os";
102
- import { dirname, isAbsolute, resolve } from "node:path";
101
+ import { dirname, isAbsolute, relative, resolve, sep as pathSep } from "node:path";
103
102
  import { pathToFileURL } from "node:url";
103
+ import { gunzipSync } from "node:zlib";
104
104
 
105
105
  const PRODUCT_NAME = ${JSON.stringify(productName)};
106
106
  const PRODUCT_VERSION = ${JSON.stringify(version)};
@@ -141,9 +141,7 @@ async function extractRuntime() {
141
141
  const tempArchive = resolve(tempRoot, "runtime.tar.gz");
142
142
  await Bun.write(tempArchive, Bun.file(runtimeArchivePath));
143
143
 
144
- const result = spawnSync("tar", ["-xzf", tempArchive, "-C", tempRoot], { stdio: "inherit" });
145
- if (result.error) throw result.error;
146
- if (result.status !== 0) throw new Error(\`Failed to extract embedded runtime.tar.gz for \${PRODUCT_NAME}\`);
144
+ extractTarGzSafe(tempArchive, tempRoot);
147
145
  rmSync(tempArchive, { force: true });
148
146
 
149
147
  rmSync(root, { recursive: true, force: true });
@@ -167,6 +165,141 @@ async function acquireExtractLock(lockDir) {
167
165
  }
168
166
  }
169
167
 
168
+ function extractTarGzSafe(archivePath, destDir) {
169
+ const tar = gunzipSync(readFileSync(archivePath));
170
+ let offset = 0;
171
+ let longName = null;
172
+
173
+ while (offset + 512 <= tar.length) {
174
+ const header = tar.subarray(offset, offset + 512);
175
+ offset += 512;
176
+ if (isZeroBlock(header)) break;
177
+
178
+ const nameRaw = readTarString(header, 0, 100);
179
+ const linkName = readTarString(header, 157, 100);
180
+ const size = readTarOctal(header, 124, 12);
181
+ const typeflag = header[156];
182
+ const prefix = readTarString(header, 345, 155);
183
+ const dataEnd = offset + size;
184
+ if (dataEnd > tar.length) throw new Error("Invalid runtime tar entry size");
185
+
186
+ const paddedSize = Math.ceil(size / 512) * 512;
187
+
188
+ if (typeflag === 0x4c) {
189
+ longName = tar.subarray(offset, dataEnd).toString("utf-8").replace(/\\0.*$/, "");
190
+ offset += paddedSize;
191
+ continue;
192
+ }
193
+
194
+ if (typeflag === 0x78) {
195
+ const paxPath = readPaxPath(tar.subarray(offset, dataEnd).toString("utf-8"));
196
+ if (paxPath) longName = paxPath;
197
+ offset += paddedSize;
198
+ continue;
199
+ }
200
+ if (typeflag === 0x67) {
201
+ offset += paddedSize;
202
+ continue;
203
+ }
204
+
205
+ const entryName = longName || (prefix ? \`\${prefix}/\${nameRaw}\` : nameRaw);
206
+ longName = null;
207
+ if (!entryName || entryName === "." || entryName === "./") {
208
+ offset += paddedSize;
209
+ continue;
210
+ }
211
+
212
+ const entryPath = resolveTarEntryPath(destDir, entryName);
213
+ const isDir = typeflag === 0x35 || entryName.endsWith("/");
214
+ const isFile = typeflag === 0 || typeflag === 0x30;
215
+ const isSymlink = typeflag === 0x32;
216
+
217
+ if (isDir) {
218
+ mkdirSync(entryPath, { recursive: true });
219
+ } else if (isFile) {
220
+ mkdirSync(dirname(entryPath), { recursive: true });
221
+ writeFileSync(entryPath, tar.subarray(offset, dataEnd));
222
+ } else if (isSymlink) {
223
+ const safeLinkName = resolveTarSymlinkTarget(destDir, entryPath, linkName);
224
+ mkdirSync(dirname(entryPath), { recursive: true });
225
+ symlinkSync(safeLinkName, entryPath);
226
+ }
227
+
228
+ offset += paddedSize;
229
+ }
230
+ }
231
+
232
+ function resolveTarEntryPath(destDir, entryName) {
233
+ const normalizedEntry = entryName.replaceAll("\\\\", "/");
234
+ if (
235
+ normalizedEntry.startsWith("/")
236
+ || normalizedEntry.startsWith("//")
237
+ || /^[A-Za-z]:/.test(entryName)
238
+ || /^[A-Za-z]:/.test(normalizedEntry)
239
+ || normalizedEntry.split("/").includes("..")
240
+ ) {
241
+ throw new Error(\`Tar entry outside extraction directory: \${entryName}\`);
242
+ }
243
+
244
+ const root = resolve(destDir);
245
+ const target = resolve(root, normalizedEntry);
246
+ const rel = relative(root, target);
247
+ if (rel === ".." || rel.startsWith(\`..\${pathSep}\`) || isAbsolute(rel)) {
248
+ throw new Error(\`Tar entry outside extraction directory: \${entryName}\`);
249
+ }
250
+ return target;
251
+ }
252
+
253
+ function resolveTarSymlinkTarget(destDir, entryPath, linkName) {
254
+ const normalizedLink = linkName.replaceAll("\\\\", "/");
255
+ if (!normalizedLink || normalizedLink.startsWith("/") || normalizedLink.startsWith("//") || /^[A-Za-z]:/.test(normalizedLink)) {
256
+ throw new Error(\`Tar symlink outside extraction directory: \${linkName}\`);
257
+ }
258
+ const root = resolve(destDir);
259
+ const target = resolve(dirname(entryPath), normalizedLink);
260
+ const rel = relative(root, target);
261
+ if (rel === ".." || rel.startsWith(\`..\${pathSep}\`) || isAbsolute(rel)) {
262
+ throw new Error(\`Tar symlink outside extraction directory: \${linkName}\`);
263
+ }
264
+ return normalizedLink;
265
+ }
266
+
267
+ function readTarString(buffer, offset, length) {
268
+ const slice = buffer.subarray(offset, offset + length);
269
+ const nul = slice.indexOf(0);
270
+ return slice.subarray(0, nul === -1 ? length : nul).toString("utf-8");
271
+ }
272
+
273
+ function readTarOctal(buffer, offset, length) {
274
+ const raw = readTarString(buffer, offset, length).trim();
275
+ if (!raw) return 0;
276
+ const parsed = Number.parseInt(raw.replace(/\\0/g, ""), 8);
277
+ if (!Number.isFinite(parsed)) throw new Error("Invalid runtime tar entry size");
278
+ return parsed;
279
+ }
280
+
281
+ function readPaxPath(content) {
282
+ let cursor = 0;
283
+ while (cursor < content.length) {
284
+ const space = content.indexOf(" ", cursor);
285
+ if (space === -1) return null;
286
+ const length = Number.parseInt(content.slice(cursor, space), 10);
287
+ if (!Number.isFinite(length) || length <= 0) return null;
288
+ const record = content.slice(space + 1, cursor + length).replace(/\\n$/, "");
289
+ const eq = record.indexOf("=");
290
+ if (eq > 0 && record.slice(0, eq) === "path") return record.slice(eq + 1);
291
+ cursor += length;
292
+ }
293
+ return null;
294
+ }
295
+
296
+ function isZeroBlock(buffer) {
297
+ for (const byte of buffer) {
298
+ if (byte !== 0) return false;
299
+ }
300
+ return true;
301
+ }
302
+
170
303
  function mapRuntimeJsPath(root, candidate) {
171
304
  const absolute = isAbsolute(candidate) ? candidate : resolve(process.cwd(), candidate);
172
305
  if (existsSync(absolute)) return absolute;
@@ -175,7 +175,6 @@ function pruneRuntimeNodeModules(dir) {
175
175
  'benchmark',
176
176
  'benchmarks',
177
177
  'coverage',
178
- 'doc',
179
178
  'docs',
180
179
  'example',
181
180
  'examples',
@@ -9,8 +9,9 @@
9
9
  import { cpSync, existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
10
10
  import { createServer } from 'node:net';
11
11
  import { tmpdir } from 'node:os';
12
- import { dirname, resolve } from 'node:path';
12
+ import { dirname, isAbsolute, relative, resolve } from 'node:path';
13
13
  import { spawn } from 'node:child_process';
14
+ import { createRequire } from 'node:module';
14
15
  import { fileURLToPath } from 'node:url';
15
16
 
16
17
  const __dirname = dirname(fileURLToPath(import.meta.url));
@@ -43,6 +44,13 @@ if (!existsSync(nextStaticDir)) {
43
44
  process.exit(1);
44
45
  }
45
46
 
47
+ try {
48
+ assertStandaloneNextDependencyClosure();
49
+ } catch (error) {
50
+ console.error(`[prepare-static-web] ${error instanceof Error ? error.message : String(error)}`);
51
+ process.exit(1);
52
+ }
53
+
46
54
  const tempRoot = mkdtempSync(resolve(tmpdir(), 'mindos-static-web-'));
47
55
  const tempHome = resolve(tempRoot, 'home');
48
56
  const tempMind = resolve(tempRoot, 'mind');
@@ -58,14 +66,13 @@ writeFileSync(resolve(tempHome, '.mindos', 'config.json'), JSON.stringify({
58
66
  const port = await getFreePort();
59
67
  const child = spawn(process.execPath, [webStandaloneServer], {
60
68
  cwd: webStandaloneDir,
61
- env: {
62
- ...process.env,
69
+ env: createStandaloneServerEnv({
63
70
  HOME: tempHome,
64
71
  MIND_ROOT: tempMind,
65
72
  NODE_ENV: 'production',
66
73
  HOSTNAME: '127.0.0.1',
67
74
  PORT: String(port),
68
- },
75
+ }),
69
76
  stdio: ['ignore', 'pipe', 'pipe'],
70
77
  });
71
78
 
@@ -159,3 +166,44 @@ async function fetchHtml(url) {
159
166
  if (!html.includes('<html')) throw new Error(`Snapshot ${url} did not return HTML`);
160
167
  return html;
161
168
  }
169
+
170
+ function assertStandaloneNextDependencyClosure() {
171
+ const requireFromStandaloneServer = createRequire(webStandaloneServer);
172
+ const requiredModules = [
173
+ 'next',
174
+ 'next/dist/server/lib/start-server',
175
+ 'next/dist/server/lib/cpu-profile',
176
+ ];
177
+
178
+ for (const moduleName of requiredModules) {
179
+ const resolvedPath = requireFromStandaloneServer.resolve(moduleName);
180
+ const relativePath = relative(webStandaloneDir, resolvedPath);
181
+ if (relativePath.startsWith('..') || isAbsolute(relativePath)) {
182
+ throw new Error(
183
+ `Standalone Web snapshot would resolve ${moduleName} outside .next/standalone: ${resolvedPath}`
184
+ );
185
+ }
186
+ }
187
+ }
188
+
189
+ function createStandaloneServerEnv(overrides) {
190
+ const allowedPassthrough = [
191
+ 'PATH',
192
+ 'SystemRoot',
193
+ 'WINDIR',
194
+ 'COMSPEC',
195
+ 'TEMP',
196
+ 'TMP',
197
+ 'TMPDIR',
198
+ ];
199
+ const env = {};
200
+
201
+ for (const key of allowedPassthrough) {
202
+ if (process.env[key]) env[key] = process.env[key];
203
+ }
204
+
205
+ return {
206
+ ...env,
207
+ ...overrides,
208
+ };
209
+ }
@@ -95,7 +95,7 @@ fi
95
95
  echo " ✅ mindos --help works"
96
96
 
97
97
  # Verify key files are present in the installed main package
98
- for f in bin/mindos-shim.cjs dist/foundation.js dist/protocols/acp/index.js; do
98
+ for f in bin/mindos-shim.cjs dist/index.js dist/protocols/acp/index.js dist/protocols/mcp-server/index.cjs; do
99
99
  if [ ! -f "$SMOKE_DIR/node_modules/@geminilight/mindos/$f" ]; then
100
100
  echo "❌ Missing file in package: $f"
101
101
  rm -rf "$SMOKE_DIR"
package/scripts/setup.js CHANGED
@@ -21,7 +21,7 @@
21
21
  */
22
22
 
23
23
  import { existsSync, cpSync, writeFileSync, readFileSync, mkdirSync, createWriteStream, rmSync, openSync } from 'node:fs';
24
- import { resolve, dirname, join } from 'node:path';
24
+ import { resolve, dirname, join, relative, isAbsolute, sep as pathSep } from 'node:path';
25
25
  import { homedir, tmpdir, networkInterfaces } from 'node:os';
26
26
  import { fileURLToPath } from 'node:url';
27
27
  import { createInterface } from 'node:readline';
@@ -30,6 +30,7 @@ import { execFileSync, spawn } from 'node:child_process';
30
30
  import { randomBytes, createHash } from 'node:crypto';
31
31
  import { createConnection } from 'node:net';
32
32
  import http from 'node:http';
33
+ import { gunzipSync } from 'node:zlib';
33
34
  import { MCP_AGENTS, SKILL_AGENT_REGISTRY, detectAgentPresence } from '../bin/lib/mcp-agents.js';
34
35
  import { resolveNpmInvocation, resolveNpxInvocation } from '../bin/lib/npm-invocation.js';
35
36
 
@@ -542,7 +543,7 @@ async function downloadAndExtract(url, destDir) {
542
543
 
543
544
  const extractDir = join(tmp, 'extracted');
544
545
  mkdirSync(extractDir, { recursive: true });
545
- execFileSync('tar', ['-xzf', tarPath, '-C', extractDir]);
546
+ extractTarGzSafe(tarPath, extractDir);
546
547
 
547
548
  const { readdirSync, statSync } = await import('node:fs');
548
549
  let contentRoot = extractDir;
@@ -556,6 +557,118 @@ async function downloadAndExtract(url, destDir) {
556
557
  rmSync(tmp, { recursive: true, force: true });
557
558
  }
558
559
 
560
+ function extractTarGzSafe(tarPath, destDir) {
561
+ const tar = gunzipSync(readFileSync(tarPath));
562
+ let offset = 0;
563
+ let longName = null;
564
+
565
+ while (offset + 512 <= tar.length) {
566
+ const header = tar.subarray(offset, offset + 512);
567
+ offset += 512;
568
+ if (isZeroBlock(header)) break;
569
+
570
+ const nameRaw = readTarString(header, 0, 100);
571
+ const size = readTarOctal(header, 124, 12);
572
+ const typeflag = header[156];
573
+ const prefix = readTarString(header, 345, 155);
574
+ const dataEnd = offset + size;
575
+ if (dataEnd > tar.length) throw new Error('Invalid template tar entry size');
576
+
577
+ const paddedSize = Math.ceil(size / 512) * 512;
578
+ if (typeflag === 0x4c) {
579
+ longName = tar.subarray(offset, dataEnd).toString('utf-8').replace(/\0.*$/, '');
580
+ offset += paddedSize;
581
+ continue;
582
+ }
583
+ if (typeflag === 0x78) {
584
+ const paxPath = readPaxPath(tar.subarray(offset, dataEnd).toString('utf-8'));
585
+ if (paxPath) longName = paxPath;
586
+ offset += paddedSize;
587
+ continue;
588
+ }
589
+ if (typeflag === 0x67) {
590
+ offset += paddedSize;
591
+ continue;
592
+ }
593
+
594
+ const entryName = longName || (prefix ? `${prefix}/${nameRaw}` : nameRaw);
595
+ longName = null;
596
+ if (!entryName || entryName === '.' || entryName === './') {
597
+ offset += paddedSize;
598
+ continue;
599
+ }
600
+
601
+ const entryPath = resolveTarEntryPath(destDir, entryName);
602
+ const isDir = typeflag === 0x35 || entryName.endsWith('/');
603
+ const isFile = typeflag === 0 || typeflag === 0x30;
604
+ if (isDir) {
605
+ mkdirSync(entryPath, { recursive: true });
606
+ } else if (isFile) {
607
+ mkdirSync(dirname(entryPath), { recursive: true });
608
+ writeFileSync(entryPath, tar.subarray(offset, dataEnd));
609
+ }
610
+
611
+ offset += paddedSize;
612
+ }
613
+ }
614
+
615
+ function resolveTarEntryPath(destDir, entryName) {
616
+ const normalizedEntry = entryName.replaceAll('\\', '/');
617
+ if (
618
+ normalizedEntry.startsWith('/')
619
+ || normalizedEntry.startsWith('//')
620
+ || /^[A-Za-z]:/.test(entryName)
621
+ || /^[A-Za-z]:/.test(normalizedEntry)
622
+ || normalizedEntry.split('/').includes('..')
623
+ ) {
624
+ throw new Error(`Template tar entry outside extraction directory: ${entryName}`);
625
+ }
626
+
627
+ const root = resolve(destDir);
628
+ const target = resolve(root, normalizedEntry);
629
+ const rel = relative(root, target);
630
+ if (rel === '..' || rel.startsWith(`..${pathSep}`) || isAbsolute(rel)) {
631
+ throw new Error(`Template tar entry outside extraction directory: ${entryName}`);
632
+ }
633
+ return target;
634
+ }
635
+
636
+ function readTarString(buffer, offset, length) {
637
+ const slice = buffer.subarray(offset, offset + length);
638
+ const nul = slice.indexOf(0);
639
+ return slice.subarray(0, nul === -1 ? length : nul).toString('utf-8');
640
+ }
641
+
642
+ function readTarOctal(buffer, offset, length) {
643
+ const raw = readTarString(buffer, offset, length).trim();
644
+ if (!raw) return 0;
645
+ const parsed = Number.parseInt(raw.replace(/\0/g, ''), 8);
646
+ if (!Number.isFinite(parsed)) throw new Error('Invalid template tar entry size');
647
+ return parsed;
648
+ }
649
+
650
+ function readPaxPath(content) {
651
+ let cursor = 0;
652
+ while (cursor < content.length) {
653
+ const space = content.indexOf(' ', cursor);
654
+ if (space === -1) return null;
655
+ const length = Number.parseInt(content.slice(cursor, space), 10);
656
+ if (!Number.isFinite(length) || length <= 0) return null;
657
+ const record = content.slice(space + 1, cursor + length).replace(/\n$/, '');
658
+ const eq = record.indexOf('=');
659
+ if (eq > 0 && record.slice(0, eq) === 'path') return record.slice(eq + 1);
660
+ cursor += length;
661
+ }
662
+ return null;
663
+ }
664
+
665
+ function isZeroBlock(buffer) {
666
+ for (const byte of buffer) {
667
+ if (byte !== 0) return false;
668
+ }
669
+ return true;
670
+ }
671
+
559
672
  async function applyTemplate(tpl, mindDir) {
560
673
  if (tpl === 'custom') {
561
674
  let source = '';
@@ -85,6 +85,17 @@ function waitHealth(timeoutMs) {
85
85
  });
86
86
  }
87
87
 
88
+ function waitMcpAgents(timeoutMs) {
89
+ return waitHttpOk('/api/mcp/agents', timeoutMs, (body) => {
90
+ try {
91
+ const j = JSON.parse(body);
92
+ return Array.isArray(j.agents) && j.agents.length > 0;
93
+ } catch {
94
+ return false;
95
+ }
96
+ });
97
+ }
98
+
88
99
  let stderr = '';
89
100
  const child = spawn(nodeBin, [serverJs], {
90
101
  cwd: appDir,
@@ -113,6 +124,7 @@ function killChild() {
113
124
  async function main() {
114
125
  try {
115
126
  await waitHealth(90_000);
127
+ await waitMcpAgents(30_000);
116
128
  await waitHttpOk('/', 30_000, (body) => body.includes('MindOS') || body.includes('__next'));
117
129
  console.log(`[verify-standalone] OK (port ${port})`);
118
130
  return 0;
@@ -1 +1 @@
1
- 1.0.6
1
+ 1.0.8
@@ -1,4 +1,4 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1430],{20538:(e,t,r)=>{function s(e){return{connected:e.filter(e=>e.present&&e.installed),detected:e.filter(e=>e.present&&!e.installed),notFound:e.filter(e=>!e.present)}}function n(e){return e.present&&e.installed?"connected":e.present?"detected":"notFound"}function i(e){return f(`${e.name} ${e.description}`)}function a(e){let t=[];return e.mcpEnabled&&!e.mcpRunning&&t.push({id:"mcp-stopped",severity:"error",title:e.copy.riskMcpStopped}),e.detectedCount>0&&t.push({id:"detected-unconfigured",severity:"warn",title:e.copy.riskDetected(e.detectedCount)}),e.allSkillsDisabled&&t.push({id:"skills-disabled",severity:"warn",title:e.copy.riskSkillsDisabled}),t}function l(e){return new Set(e.filter(e=>!e.enabled&&"user"===e.source||0===e.description.trim().length).map(e=>e.name))}function o(e){let t=e.filter(e=>!e.ok).map(e=>e.skillName);return{total:e.length,succeeded:e.length-t.length,failed:t.length,failedSkills:t}}function d(e,t){let r=t.query.trim().toLowerCase();return e.filter(e=>{let s;return("all"===t.status||n(e)===t.status)&&("all"===t.transport||("stdio"===(s=(e.transport??e.preferredTransport??"").toLowerCase())||"http"===s?s:"other")===t.transport)&&(!r||`${e.name} ${e.key} ${e.configPath??""}`.toLowerCase().includes(r))})}function c(e){let t=e.filter(e=>!e.ok).length;return{total:e.length,succeeded:e.length-t,failed:t}}function u(e){let t=new Map;for(let r of e)for(let e of r.configuredMcpServers??[]){let s=t.get(e);s?s.push(r.name):t.set(e,[r.name])}return[...t.entries()].map(([e,t])=>({serverName:e,agents:t})).sort((e,t)=>t.agents.length-e.agents.length||e.serverName.localeCompare(t.serverName))}function m(e){let t=new Map;for(let r of e)for(let e of r.installedSkillNames??[]){let s=t.get(e);s?s.push(r.name):t.set(e,[r.name])}return[...t.entries()].map(([e,t])=>({skillName:e,agents:t})).sort((e,t)=>t.agents.length-e.agents.length||e.skillName.localeCompare(t.skillName))}r.d(t,{$2:()=>i,$t:()=>s,G9:()=>j,GU:()=>h,HL:()=>u,IK:()=>l,Ri:()=>v,ag:()=>b,fH:()=>d,gJ:()=>x,qC:()=>g,x3:()=>m,xJ:()=>c,xR:()=>o,yQ:()=>f,yv:()=>n,zK:()=>a});let p={connected:0,detected:1,notFound:2};function x(e){return[...e].sort((e,t)=>{let r=p[n(e)],s=p[n(t)];return r!==s?r-s:e.name.localeCompare(t.name)})}function g(e,t){let r=t.query.trim().toLowerCase();return e.filter(e=>("all"===t.source||e.source===t.source)&&(!r||`${e.name} ${e.description} ${e.path}`.toLowerCase().includes(r)))}function f(e){let t=e.toLowerCase();return t.includes("search")||t.includes("research")||t.includes("arxiv")||t.includes("paper")?"research":t.includes("doc")||t.includes("write")||t.includes("readme")||t.includes("copy")||t.includes("slide")||t.includes("ppt")?"docs":t.includes("deploy")||t.includes("ops")||t.includes("ci")||t.includes("ship")||t.includes("qa")||t.includes("review")||t.includes("test")?"ops":t.includes("memory")||t.includes("mind")||t.includes("handoff")||t.includes("session")?"memory":"coding"}function b(e,t){let r=new Set(e.map(e=>e.name)),s=new Map;for(let e of t)s.set(e.skillName,e.agents);let n=[];for(let t of e)n.push({name:t.name,kind:"mindos",mindosSkill:t,agents:s.get(t.name)??[],capability:i(t),enabled:t.enabled,source:t.source,description:t.description});for(let e of t)r.has(e.skillName)||n.push({name:e.skillName,kind:"native",agents:e.agents,capability:f(e.skillName),enabled:!0,source:"native",description:""});return n}function h(e){return{research:e.filter(e=>"research"===e.capability),coding:e.filter(e=>"coding"===e.capability),docs:e.filter(e=>"docs"===e.capability),ops:e.filter(e=>"ops"===e.capability),memory:e.filter(e=>"memory"===e.capability)}}function v(e,t){let r=t.query.trim().toLowerCase(),s=new Set(e.filter(e=>"mindos"===e.kind&&(!e.enabled&&"user"===e.source||0===e.description.trim().length)).map(e=>e.name));return e.filter(e=>("all"===t.source||("native"!==t.source||"native"===e.kind)&&("builtin"!==t.source||"builtin"===e.source)&&("user"!==t.source||"user"===e.source))&&("enabled"!==t.status||!!e.enabled)&&("disabled"!==t.status||!e.enabled)&&("attention"!==t.status||!!s.has(e.name))&&("all"===t.capability||e.capability===t.capability)&&(!r||!!`${e.name} ${e.description}`.toLowerCase().includes(r))&&!0)}function j(e,t){return e.filter(e=>"mindos"===e.kind&&e.enabled!==t).map(e=>e.name)}},23684:(e,t,r)=>{r.d(t,{default:()=>i});var s=r(66839),n=r(44223);function i({href:e,label:t="Redirecting..."}){return(0,n.useEffect)(()=>{window.location.replace(e)},[e]),(0,s.jsx)("main",{className:"min-h-screen flex items-center justify-center px-6",children:(0,s.jsx)("a",{href:e,className:"text-sm underline-offset-4 hover:underline focus-visible:ring-2 focus-visible:ring-ring rounded-sm",style:{color:"var(--muted-foreground)"},children:t})})}},45149:(e,t,r)=>{r.d(t,{A:()=>S});var s=r(66839),n=r(44223),i=r(38325),a=r(26732),l=r(30401),o=r(30626),d=r(88283),c=r(29696),u=r(72799),m=r(73601),p=r(24336),x=r(44361),g=r(72615),f=r(9181),b=r(31606),h=r(65264),v=r(46990),j=r(79455),y=r(69527),N=r(82977),k=r(84734),C=r(20538);let A={research:i.A,coding:a.A,docs:l.A,ops:o.A,memory:d.A};function w({text:e,className:t=""}){let r=(0,n.useMemo)(()=>{var t;let r;return t=e,(r=(r=(0,N.ZD)(t).replace(/```(\w*)\n([\s\S]*?)```/g,(e,t,r)=>`<pre><code>${r.trimEnd()}</code></pre>`).replace(/`([^`]+)`/g,"<code>$1</code>").replace(/^#### (.+)$/gm,"<h4>$1</h4>").replace(/^### (.+)$/gm,"<h3>$1</h3>").replace(/^## (.+)$/gm,"<h2>$1</h2>").replace(/^# (.+)$/gm,"<h1>$1</h1>").replace(/\*\*(.+?)\*\*/g,"<strong>$1</strong>").replace(/\*(.+?)\*/g,"<em>$1</em>").replace(/^---$/gm,"<hr/>").replace(/^- (.+)$/gm,"<li>$1</li>").replace(/^\* (.+)$/gm,"<li>$1</li>").replace(/^\d+\. (.+)$/gm,"<li>$1</li>")).replace(/((?:<li>.*<\/li>\n?)+)/g,"<ul>$1</ul>")).split("\n").map(e=>{let t=e.trim();return t?/^<(h[1-4]|ul|ol|li|pre|hr|div|p|blockquote)/.test(t)?e:`<p>${t}</p>`:""}).join("\n")},[e]);return(0,s.jsx)("div",{className:`prose prose-sm prose-invert max-w-none
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1104],{20538:(e,t,r)=>{function s(e){return{connected:e.filter(e=>e.present&&e.installed),detected:e.filter(e=>e.present&&!e.installed),notFound:e.filter(e=>!e.present)}}function n(e){return e.present&&e.installed?"connected":e.present?"detected":"notFound"}function i(e){return f(`${e.name} ${e.description}`)}function o(e){let t=[];return e.mcpEnabled&&!e.mcpRunning&&t.push({id:"mcp-stopped",severity:"error",title:e.copy.riskMcpStopped}),e.detectedCount>0&&t.push({id:"detected-unconfigured",severity:"warn",title:e.copy.riskDetected(e.detectedCount)}),e.allSkillsDisabled&&t.push({id:"skills-disabled",severity:"warn",title:e.copy.riskSkillsDisabled}),t}function a(e){return new Set(e.filter(e=>!e.enabled&&"user"===e.source||0===e.description.trim().length).map(e=>e.name))}function l(e){let t=e.filter(e=>!e.ok).map(e=>e.skillName);return{total:e.length,succeeded:e.length-t.length,failed:t.length,failedSkills:t}}function d(e,t){let r=t.query.trim().toLowerCase();return e.filter(e=>{let s;return("all"===t.status||n(e)===t.status)&&("all"===t.transport||("stdio"===(s=(e.transport??e.preferredTransport??"").toLowerCase())||"http"===s?s:"other")===t.transport)&&(!r||`${e.name} ${e.key} ${e.configPath??""}`.toLowerCase().includes(r))})}function c(e){let t=e.filter(e=>!e.ok).length;return{total:e.length,succeeded:e.length-t,failed:t}}function u(e){let t=new Map;for(let r of e)for(let e of r.configuredMcpServers??[]){let s=t.get(e);s?s.push(r.name):t.set(e,[r.name])}return[...t.entries()].map(([e,t])=>({serverName:e,agents:t})).sort((e,t)=>t.agents.length-e.agents.length||e.serverName.localeCompare(t.serverName))}function m(e){let t=new Map;for(let r of e)for(let e of r.installedSkillNames??[]){let s=t.get(e);s?s.push(r.name):t.set(e,[r.name])}return[...t.entries()].map(([e,t])=>({skillName:e,agents:t})).sort((e,t)=>t.agents.length-e.agents.length||e.skillName.localeCompare(t.skillName))}r.d(t,{$2:()=>i,$t:()=>s,G9:()=>j,GU:()=>h,HL:()=>u,IK:()=>a,Ri:()=>v,ag:()=>b,fH:()=>d,gJ:()=>g,qC:()=>x,x3:()=>m,xJ:()=>c,xR:()=>l,yQ:()=>f,yv:()=>n,zK:()=>o});let p={connected:0,detected:1,notFound:2};function g(e){return[...e].sort((e,t)=>{let r=p[n(e)],s=p[n(t)];return r!==s?r-s:e.name.localeCompare(t.name)})}function x(e,t){let r=t.query.trim().toLowerCase();return e.filter(e=>("all"===t.source||e.source===t.source)&&(!r||`${e.name} ${e.description} ${e.path}`.toLowerCase().includes(r)))}function f(e){let t=e.toLowerCase();return t.includes("search")||t.includes("research")||t.includes("arxiv")||t.includes("paper")?"research":t.includes("doc")||t.includes("write")||t.includes("readme")||t.includes("copy")||t.includes("slide")||t.includes("ppt")?"docs":t.includes("deploy")||t.includes("ops")||t.includes("ci")||t.includes("ship")||t.includes("qa")||t.includes("review")||t.includes("test")?"ops":t.includes("memory")||t.includes("mind")||t.includes("handoff")||t.includes("session")?"memory":"coding"}function b(e,t){let r=new Set(e.map(e=>e.name)),s=new Map;for(let e of t)s.set(e.skillName,e.agents);let n=[];for(let t of e)n.push({name:t.name,kind:"mindos",mindosSkill:t,agents:s.get(t.name)??[],capability:i(t),enabled:t.enabled,source:t.source,description:t.description});for(let e of t)r.has(e.skillName)||n.push({name:e.skillName,kind:"native",agents:e.agents,capability:f(e.skillName),enabled:!0,source:"native",description:""});return n}function h(e){return{research:e.filter(e=>"research"===e.capability),coding:e.filter(e=>"coding"===e.capability),docs:e.filter(e=>"docs"===e.capability),ops:e.filter(e=>"ops"===e.capability),memory:e.filter(e=>"memory"===e.capability)}}function v(e,t){let r=t.query.trim().toLowerCase(),s=new Set(e.filter(e=>"mindos"===e.kind&&(!e.enabled&&"user"===e.source||0===e.description.trim().length)).map(e=>e.name));return e.filter(e=>("all"===t.source||("native"!==t.source||"native"===e.kind)&&("builtin"!==t.source||"builtin"===e.source)&&("user"!==t.source||"user"===e.source))&&("enabled"!==t.status||!!e.enabled)&&("disabled"!==t.status||!e.enabled)&&("attention"!==t.status||!!s.has(e.name))&&("all"===t.capability||e.capability===t.capability)&&(!r||!!`${e.name} ${e.description}`.toLowerCase().includes(r))&&!0)}function j(e,t){return e.filter(e=>"mindos"===e.kind&&e.enabled!==t).map(e=>e.name)}},23684:(e,t,r)=>{r.d(t,{default:()=>i});var s=r(66839),n=r(44223);function i({href:e,label:t="Redirecting..."}){return(0,n.useEffect)(()=>{window.location.replace(e)},[e]),(0,s.jsx)("main",{className:"min-h-screen flex items-center justify-center px-6",children:(0,s.jsx)("a",{href:e,className:"text-sm underline-offset-4 hover:underline focus-visible:ring-2 focus-visible:ring-ring rounded-sm",style:{color:"var(--muted-foreground)"},children:t})})}},45149:(e,t,r)=>{r.d(t,{A:()=>S});var s=r(66839),n=r(44223),i=r(38325),o=r(26732),a=r(30401),l=r(30626),d=r(88283),c=r(29696),u=r(72799),m=r(73601),p=r(24336),g=r(44361),x=r(72615),f=r(9181),b=r(31606),h=r(65264),v=r(46990),j=r(79455),y=r(69527),N=r(82977),k=r(84734),C=r(20538);let A={research:i.A,coding:o.A,docs:a.A,ops:l.A,memory:d.A};function w({text:e,className:t=""}){let r=(0,n.useMemo)(()=>{var t;let r;return t=e,(r=(r=(0,N.ZD)(t).replace(/```(\w*)\n([\s\S]*?)```/g,(e,t,r)=>`<pre><code>${r.trimEnd()}</code></pre>`).replace(/`([^`]+)`/g,"<code>$1</code>").replace(/^#### (.+)$/gm,"<h4>$1</h4>").replace(/^### (.+)$/gm,"<h3>$1</h3>").replace(/^## (.+)$/gm,"<h2>$1</h2>").replace(/^# (.+)$/gm,"<h1>$1</h1>").replace(/\*\*(.+?)\*\*/g,"<strong>$1</strong>").replace(/\*(.+?)\*/g,"<em>$1</em>").replace(/^---$/gm,"<hr/>").replace(/^- (.+)$/gm,"<li>$1</li>").replace(/^\* (.+)$/gm,"<li>$1</li>").replace(/^\d+\. (.+)$/gm,"<li>$1</li>")).replace(/((?:<li>.*<\/li>\n?)+)/g,"<ul>$1</ul>")).split("\n").map(e=>{let t=e.trim();return t?/^<(h[1-4]|ul|ol|li|pre|hr|div|p|blockquote)/.test(t)?e:`<p>${t}</p>`:""}).join("\n")},[e]);return(0,s.jsx)("div",{className:`prose prose-sm prose-invert max-w-none
2
2
  prose-headings:text-foreground prose-headings:font-semibold prose-headings:mt-4 prose-headings:mb-2
3
3
  prose-h1:text-sm prose-h2:text-xs prose-h3:text-xs
4
4
  prose-p:text-xs prose-p:text-foreground/80 prose-p:leading-relaxed prose-p:my-1.5
@@ -8,4 +8,9 @@
8
8
  prose-pre:bg-muted/30 prose-pre:border prose-pre:border-border/50 prose-pre:rounded-lg prose-pre:p-3 prose-pre:text-2xs prose-pre:overflow-x-auto
9
9
  prose-ul:my-1 prose-ol:my-1
10
10
  prose-hr:border-border/30 prose-hr:my-3
11
- ${t}`,dangerouslySetInnerHTML:{__html:r}})}function S({open:e,skillName:t,skill:r,agentNames:i=[],allAgentNames:a=[],isNative:l=!1,nativeSourcePath:o,copy:d,onClose:N,onToggle:S,onDelete:T,onRefresh:z,onAddAgent:L,onRemoveAgent:E}){let K,P,[F,M]=(0,n.useState)(null),[O,W]=(0,n.useState)(""),[R,q]=(0,n.useState)(!1),[J,H]=(0,n.useState)(!1),[_,B]=(0,n.useState)(!1),[I,U]=(0,n.useState)(!1),[G,Q]=(0,n.useState)(null),[V,Z]=(0,n.useState)(!1),[Y,X]=(0,n.useState)(!1),[ee,et]=(0,n.useState)(!1),er=(0,n.useCallback)(async()=>{if(t){q(!0),H(!1);try{if(l&&o){let e=await (0,h.n)("/api/skills",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"read-native",name:t,sourcePath:o})});M(e.content),W(e.description||"")}else if(!l){let e=await (0,h.n)("/api/skills",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"read",name:t})});M(e.content)}}catch{H(!0)}finally{q(!1)}}},[t,l,o]);(0,n.useEffect)(()=>{e&&t&&(M(null),W(""),H(!1),Q(null),U(!1),Z(!1),X(!1),et(!1),er())},[e,t,er]),(0,n.useEffect)(()=>{if(e)return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t);function t(e){"Escape"===e.key&&N()}},[e,N]);let es=(0,n.useCallback)(async()=>{!F||await (0,v.l)(F)&&j.oR.copy()},[F]),en=(0,n.useCallback)(async e=>{if(t&&S){Z(!0);try{await S(t,e)}finally{Z(!1)}}},[t,S]),ei=(0,n.useCallback)(async()=>{if(t&&T){B(!1),U(!0);try{await T(t),Q(d.deleted),await z?.(),setTimeout(()=>N(),800)}catch{Q(d.deleteFailed),U(!1)}}},[t,T,z,N,d.deleted,d.deleteFailed]);if(!e||!t)return null;let ea=r?(0,C.yQ)(`${r.name} ${r.description}`):(0,C.yQ)(t),el=A[ea]??c.A,eo=r?.source==="user",ed=l?d.sourceNative:r?.source==="builtin"?d.sourceBuiltin:d.sourceUser,ec=r?.description||O||"",eu=r?.path||(l&&o?`${o}/${t}/SKILL.md`:""),em=F?(K=F,(P=F.match(/^---\n[\s\S]*?\n---\n?/))&&(K=F.slice(P[0].length).trim()),{triggerConditions:ec||"",instructions:K}):null,ep=a.filter(e=>!i.includes(e));return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"fixed inset-0 z-40 overlay-backdrop",onClick:N,"aria-hidden":"true"}),(0,s.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":t,className:"fixed right-0 top-0 z-50 h-full w-full max-w-md border-l border-border bg-card shadow-2xl flex flex-col animate-in slide-in-from-right duration-200",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 px-5 py-4 border-b border-border/60 bg-gradient-to-r from-card to-card/80 shrink-0",children:[(0,s.jsx)("div",{className:"w-9 h-9 rounded-xl bg-[var(--amber)]/[0.08] flex items-center justify-center text-[var(--amber)] shrink-0",children:(0,s.jsx)(el,{size:18})}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-foreground truncate",children:t}),(0,s.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,s.jsx)("span",{className:`text-2xs px-2 py-0.5 rounded-full font-medium select-none ${l||r?.source==="builtin"?"bg-muted text-muted-foreground":"bg-[var(--amber-dim)] text-[var(--amber-text)]"}`,children:ed}),(0,s.jsx)("span",{className:"text-2xs text-muted-foreground/60 capitalize",children:ea})]})]}),(0,s.jsx)("button",{type:"button",onClick:N,className:"shrink-0 p-1.5 rounded-md text-muted-foreground hover:text-foreground hover:bg-muted cursor-pointer transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":d.close,children:(0,s.jsx)(u.A,{size:16})})]}),(0,s.jsxs)("div",{className:"flex-1 overflow-y-auto px-5 py-4 space-y-5",children:[ec&&(0,s.jsxs)("section",{children:[(0,s.jsx)(D,{label:"Trigger Conditions"}),(0,s.jsx)("div",{className:"rounded-lg border border-border/40 bg-muted/[0.03] p-3.5",children:(0,s.jsx)("p",{className:"text-xs text-foreground/80 leading-relaxed whitespace-pre-wrap",children:ec})})]}),!ec&&!l&&(0,s.jsx)("p",{className:"text-sm text-muted-foreground italic",children:d.noDescription}),(0,s.jsx)("section",{children:(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[!l&&r&&(0,s.jsx)($,{label:d.enabled,value:r.enabled?"✓":"—",tone:r.enabled?"ok":"muted"}),(0,s.jsx)($,{label:d.capability,value:ea}),(0,s.jsx)($,{label:d.source,value:ed}),(0,s.jsx)($,{label:d.agents,value:String(i.length)})]})}),(0,s.jsxs)("section",{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,s.jsx)(D,{label:d.agents,noMargin:!0}),L&&ep.length>0&&(0,s.jsxs)("button",{type:"button",onClick:()=>X(!Y),className:"inline-flex items-center gap-1 text-2xs font-medium text-[var(--amber)] hover:opacity-80 transition-opacity cursor-pointer",children:[(0,s.jsx)(m.A,{size:12}),(0,s.jsx)("span",{children:"Add"})]})]}),Y&&ep.length>0&&(0,s.jsx)("div",{className:"flex flex-wrap gap-1.5 mb-2 p-2 rounded-lg border border-dashed border-[var(--amber)]/30 bg-[var(--amber)]/[0.03]",children:ep.map(e=>(0,s.jsxs)("button",{type:"button",onClick:()=>{L?.(t,e),X(!1)},className:"inline-flex items-center gap-1 px-2 py-1 text-2xs rounded-md border border-border bg-card hover:bg-muted cursor-pointer transition-colors",children:[(0,s.jsx)(m.A,{size:10,className:"text-[var(--amber)]"}),(0,s.jsx)("span",{className:"text-foreground/80",children:e})]},e))}),i.length>0?(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:i.map(e=>(0,s.jsx)(k.lx,{name:e,size:"sm",onRemove:E?()=>E(t,e):void 0},e))}):(0,s.jsx)("div",{className:"rounded-lg border border-border/40 bg-card/30 p-3 text-center",children:(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:d.noAgents})})]}),(null!==F||R||J)&&(0,s.jsxs)("section",{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,s.jsx)(D,{label:"Instructions",noMargin:!0}),(0,s.jsx)("div",{className:"flex items-center gap-2",children:F&&(0,s.jsxs)("button",{type:"button",onClick:es,className:"inline-flex items-center gap-1 text-2xs text-muted-foreground hover:text-foreground cursor-pointer transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded px-1.5 py-0.5","aria-label":d.copyContent,children:[(0,s.jsx)(p.A,{size:11}),d.copyContent]})})]}),R&&(0,s.jsxs)("div",{className:"rounded-lg border border-border bg-background p-6 flex items-center justify-center gap-2 text-sm text-muted-foreground",children:[(0,s.jsx)(x.A,{size:14,className:"animate-spin"}),d.loading]}),J&&(0,s.jsxs)("div",{className:"rounded-lg border border-destructive/20 bg-destructive/[0.03] p-4 text-center space-y-2",children:[(0,s.jsx)("p",{className:"text-sm text-destructive",children:d.loadFailed}),(0,s.jsx)("button",{type:"button",onClick:er,className:"text-xs text-foreground underline hover:no-underline cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded",children:d.retry})]}),em&&!R&&!J&&(0,s.jsx)("div",{className:`rounded-lg border border-border/50 bg-muted/[0.02] p-4 overflow-hidden transition-all duration-200 ${!ee?"max-h-60":""}`,children:(0,s.jsx)(w,{text:em.instructions})}),em&&!R&&!J&&em.instructions.split("\n").length>15&&(0,s.jsxs)("button",{type:"button",onClick:()=>et(!ee),className:"inline-flex items-center gap-1 mt-2 text-2xs font-medium text-[var(--amber)] hover:opacity-80 transition-opacity cursor-pointer",children:[(0,s.jsx)(g.A,{size:12,className:`transition-transform duration-200 ${ee?"rotate-180":""}`}),(0,s.jsx)("span",{children:ee?"Collapse":"View All"})]})]}),eu&&(0,s.jsxs)("section",{children:[(0,s.jsx)(D,{label:d.path}),(0,s.jsx)("div",{className:"rounded-lg border border-border/50 bg-muted/[0.03] p-3",children:(0,s.jsx)("code",{className:"text-2xs text-foreground/60 font-mono break-all leading-relaxed",children:eu})})]}),G&&(0,s.jsx)("div",{role:"status","aria-live":"polite",className:"rounded-md border border-border bg-muted/50 px-3 py-2 text-xs text-muted-foreground animate-in fade-in duration-200",children:G})]}),!l&&r&&(0,s.jsxs)("div",{className:"shrink-0 border-t border-border px-5 py-3 flex items-center gap-2",children:[S&&(0,s.jsxs)("div",{className:"flex items-center gap-2 mr-auto",children:[(0,s.jsx)(f.A,{size:14,className:"text-muted-foreground","aria-hidden":"true"}),(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:r.enabled?d.enabled:d.disabled}),(0,s.jsx)(y.lM,{size:"sm",checked:r.enabled,onChange:e=>void en(e),disabled:V})]}),eo&&T&&(0,s.jsxs)("button",{type:"button",onClick:()=>B(!0),disabled:I,className:"inline-flex items-center gap-1.5 px-2.5 min-h-[32px] text-xs rounded-md border border-destructive/30 text-destructive hover:bg-destructive/10 cursor-pointer disabled:opacity-50 transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[I?(0,s.jsx)(x.A,{size:12,className:"animate-spin"}):(0,s.jsx)(b.A,{size:12}),d.deleteSkill]})]})]}),(0,s.jsx)(k.TM,{open:_,title:d.confirmDeleteTitle,message:t?d.confirmDeleteMessage(t):"",confirmLabel:d.confirmDeleteAction,cancelLabel:d.cancelAction,onConfirm:()=>void ei(),onCancel:()=>B(!1),variant:"destructive"})]})}function D({label:e,noMargin:t}){return(0,s.jsx)("h3",{className:`text-xs font-semibold text-muted-foreground uppercase tracking-wider ${t?"":"mb-2"}`,children:e})}function $({label:e,value:t,tone:r="default"}){return(0,s.jsxs)("div",{className:"rounded-xl border border-border/50 bg-muted/[0.03] px-3.5 py-3 hover:bg-muted/[0.06] transition-colors duration-100",children:[(0,s.jsx)("span",{className:"text-2xs text-muted-foreground/60 block mb-1 uppercase tracking-wider",children:e}),(0,s.jsx)("span",{className:`text-sm font-semibold capitalize ${"ok"===r?"text-[var(--success)]":"muted"===r?"text-muted-foreground":"text-foreground"}`,children:t})]})}},51117:(e,t,r)=>{r.d(t,{V:()=>n});var s=r(44223);function n(){let[e,t]=(0,s.useState)([]),[r,n]=(0,s.useState)(!1),[i,a]=(0,s.useState)(null),l=(0,s.useCallback)(async e=>{n(!0),a(null);try{let r=await fetch("/api/a2a/discover",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:e})}),s=await r.json();if(s.agent)return t(e=>e.some(e=>e.id===s.agent.id)?e.map(e=>e.id===s.agent.id?s.agent:e):[...e,s.agent]),s.agent;return a(s.error||"Discovery failed"),null}catch(e){return a(e.message),null}finally{n(!1)}},[]);return{agents:e,discovering:r,error:i,discover:l,remove:(0,s.useCallback)(e=>{t(t=>t.filter(t=>t.id!==e))},[]),refresh:(0,s.useCallback)(()=>{t([]),a(null)},[])}}},82829:(e,t,r)=>{r.d(t,{A:()=>h});var s=r(66839),n=r(44223),i=r(72799),a=r(21082),l=r(38688),o=r(53097),d=r(30626),c=r(29696),u=r(72615),m=r(98327),p=r(44361),x=r(2073),g=r(84747),f=r(79455),b=r(69527);function h({open:e,onClose:t,onSuccess:r,existingAgents:h,editAgent:j}){let{t:y}=(0,x.Y)(),N=y.agentsContent.overview,k=(0,n.useRef)(null),C=(0,n.useRef)(null),A=!!j,[w,S]=(0,n.useState)("input"),[D,$]=(0,n.useState)(!1),[T,z]=(0,n.useState)(!1),[L,E]=(0,n.useState)(null),[K,P]=(0,n.useState)(null),[F,M]=(0,n.useState)(!1),[O,W]=(0,n.useState)(!1),[R,q]=(0,n.useState)({name:"",baseDir:"",global:"",configKey:"mcpServers",format:"json",preferredTransport:"stdio",project:"",presenceCli:"",skillDir:""});(0,n.useEffect)(()=>{e&&(j?(q({name:j.name,baseDir:j.customBaseDir||"",global:j.globalPath||"",configKey:j.configKey||"mcpServers",format:"toml"===j.format?"toml":"json",preferredTransport:j.preferredTransport||"stdio",project:j.projectPath||"",presenceCli:"",skillDir:j.skillWorkspacePath||""}),S("result"),W(!0),P(null),E(null)):(q({name:"",baseDir:"",global:"",configKey:"mcpServers",format:"json",preferredTransport:"stdio",project:"",presenceCli:"",skillDir:""}),S("input"),W(!1),P(null),E(null),M(!1)))},[e,j]),(0,n.useEffect)(()=>{e&&"input"===w&&setTimeout(()=>C.current?.focus(),100)},[e,w]),(0,g.r)(k,e),(0,n.useEffect)(()=>{if(!e)return;let r=e=>{"Escape"===e.key&&t()};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e,t]);let J=(0,n.useMemo)(()=>{let e=new Set(h.map(e=>e.key));return A&&j&&e.delete(j.key),e},[h,A,j]),H=(0,n.useMemo)(()=>R.name.toLowerCase().replace(/[^\x20-\x7E]/g,"").replace(/[_\s]+/g,"-").replace(/[^a-z0-9-]/g,"").replace(/-{2,}/g,"-").replace(/^-|-$/g,""),[R.name]),_=(0,n.useMemo)(()=>{if(A||!R.name.trim())return null;let e=H||"";if(!e)return null;if(J.has(e)){let t=h.find(t=>t.key===e);return t?.isCustom?N.customAgentKeyConflict?.(e)??`An agent with key "${e}" already exists`:N.customAgentBuiltinConflict?.(t?.name||e)??`Conflicts with built-in agent "${t?.name||e}"`}return null},[A,H,J,h,R.name,N]),B=R.name.trim()&&R.baseDir.trim()&&!_,I=(0,n.useCallback)((e,t)=>{q(r=>({...r,[e]:t}))},[]),U=(0,n.useCallback)(async()=>{if(!B)return;E(null),$(!0);let e=R.baseDir.trim();if(!e.startsWith("~/")){let t=e.endsWith("/")?e:e+"/";I("global",t+"mcp.json"),I("skillDir",t+"skills/"),P({exists:!1,hasSkillsDir:!1}),S("result"),$(!1);return}let t=new AbortController,r=setTimeout(()=>t.abort(),3e3);try{let s=await fetch("/api/agents/custom/detect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseDir:e}),signal:t.signal});clearTimeout(r);let n=await s.json();if(!s.ok)return void E(n.error||N.customAgentFailedSave);P(n),n.detectedConfig?I("global",n.detectedConfig):I("global",(e.endsWith("/")?e:e+"/")+"mcp.json"),n.detectedFormat&&I("format",n.detectedFormat),n.detectedConfigKey&&I("configKey",n.detectedConfigKey),I("skillDir",n.detectedSkillDir||(e.endsWith("/")?e:e+"/")+"skills/"),S("result")}catch{clearTimeout(r);let t=e.endsWith("/")?e:e+"/";I("global",t+"mcp.json"),I("skillDir",t+"skills/"),P({exists:!1,hasSkillsDir:!1}),M(!0),S("result")}finally{$(!1)}},[B,R.baseDir,I,N]),G=(0,n.useCallback)(async()=>{z(!0),E(null);let e=A?{key:j.key,name:R.name.trim(),baseDir:R.baseDir.trim(),global:R.global.trim()||void 0,configKey:R.configKey.trim()||void 0,format:R.format,preferredTransport:R.preferredTransport,project:R.project.trim()||null,presenceCli:R.presenceCli.trim()||void 0,skillDir:R.skillDir.trim()||void 0}:{name:R.name.trim(),baseDir:R.baseDir.trim(),global:R.global.trim()||void 0,configKey:R.configKey.trim()||void 0,format:R.format,preferredTransport:R.preferredTransport,project:R.project.trim()||null,presenceCli:R.presenceCli.trim()||void 0,skillDir:R.skillDir.trim()||void 0};try{let s=await fetch("/api/agents/custom",{method:A?"PUT":"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),n=await s.json();if(!s.ok){E(n.error||N.customAgentFailedSave),z(!1);return}let i=A?N.customAgentUpdated(R.name.trim()):N.customAgentAdded(R.name.trim());f.oR.success(i),r(),t()}catch{E(N.customAgentNetworkError)}finally{z(!1)}},[A,j,R,r,t,N]),Q=(0,n.useCallback)(e=>{"Enter"===e.key&&(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement)&&(e.preventDefault(),"input"===w&&B&&!D?U():"result"!==w||T||G())},[w,B,D,T,U,G]);if(!e)return null;let V=A?N.editCustomAgentTitle(j.name):N.addCustomAgentTitle;return(0,s.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center",role:"dialog","aria-modal":"true","aria-labelledby":"custom-agent-modal-title",children:[(0,s.jsx)("div",{className:"absolute inset-0 modal-backdrop",onClick:t,"aria-hidden":"true"}),(0,s.jsxs)("div",{ref:k,className:"relative bg-card border border-border rounded-xl shadow-2xl max-w-md w-full mx-4 animate-in fade-in zoom-in-95 duration-200 max-h-[85vh] overflow-y-auto",onKeyDown:Q,children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-5 pt-5 pb-1",children:[(0,s.jsx)("h2",{id:"custom-agent-modal-title",className:"text-base font-semibold text-foreground",children:V}),(0,s.jsx)("button",{type:"button",onClick:t,className:"w-7 h-7 rounded-md flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-muted transition-colors duration-150 cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":"Close",children:(0,s.jsx)(i.A,{size:16})})]}),(0,s.jsxs)("div",{className:"px-5 py-4 space-y-4",children:[(0,s.jsxs)(b.D0,{label:N.customAgentName,children:[(0,s.jsx)("input",{ref:C,value:R.name,onChange:e=>I("name",e.target.value),placeholder:N.customAgentNamePlaceholder,"aria-invalid":!!_,className:`w-full px-3 py-2 text-sm bg-background border rounded-lg text-foreground placeholder:text-muted-foreground outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:opacity-50 ${_?"border-[var(--error)] focus-visible:ring-[var(--error)]":"border-border"}`,autoComplete:"off"}),_?(0,s.jsxs)("p",{className:"text-xs text-[var(--error)] mt-1 flex items-center gap-1",children:[(0,s.jsx)(a.A,{size:12}),_]}):R.name.trim()&&H?(0,s.jsx)("p",{className:"text-[11px] text-muted-foreground mt-0.5",children:N.customAgentKeyPreview(H)}):null]}),(0,s.jsxs)(b.D0,{label:N.customAgentDir,hint:"input"===w?N.customAgentDirHint:void 0,children:[(0,s.jsx)(b.pd,{value:R.baseDir,onChange:e=>{I("baseDir",e.target.value),"result"===w&&(S("input"),P(null))},placeholder:N.customAgentDirPlaceholder,autoComplete:"off"}),"result"===w&&K?.exists&&(0,s.jsxs)("p",{className:"text-xs text-[var(--success)] mt-1 flex items-center gap-1",children:[(0,s.jsx)(l.A,{size:12}),N.customAgentDirFound]}),"result"===w&&K&&!K.exists&&!F&&(0,s.jsxs)("p",{className:"text-xs text-[var(--info,var(--muted-foreground))] mt-1 flex items-center gap-1",children:[(0,s.jsx)(o.A,{size:12}),N.customAgentDirNotFound]}),"result"===w&&F&&(0,s.jsxs)("p",{className:"text-xs text-[var(--amber)] mt-1 flex items-center gap-1",children:[(0,s.jsx)(a.A,{size:12}),N.customAgentDetectTimeout]})]}),"result"===w&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:`rounded-lg p-4 space-y-3 ${K?.exists?"border border-[var(--success)]/20 bg-[var(--success)]/5":"border border-border bg-muted/30"}`,children:[(0,s.jsx)("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:K?.exists?N.customAgentDetectedTitle:N.customAgentDefaultTitle}),(0,s.jsxs)("div",{className:"space-y-2.5",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs text-muted-foreground mb-1",children:N.customAgentConfigLabel}),(0,s.jsx)("span",{className:"text-sm text-foreground font-mono truncate block",children:R.global}),K?.mcpParseError&&(0,s.jsxs)("p",{className:"text-xs text-[var(--error)] mt-1 flex items-center gap-1",children:[(0,s.jsx)(a.A,{size:12,className:"shrink-0"}),K.mcpParseError]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs text-muted-foreground mb-1",children:N.customAgentFormatLabel}),(0,s.jsx)("span",{className:"text-sm text-foreground",children:R.format.toUpperCase()})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs text-muted-foreground mb-1",children:"Config Key"}),(0,s.jsx)("span",{className:"text-sm text-foreground font-mono",children:R.configKey})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs text-muted-foreground mb-1",children:N.customAgentTransportLabel}),(0,s.jsx)("span",{className:"text-sm text-foreground",children:R.preferredTransport})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("p",{className:"text-xs text-muted-foreground mb-1 flex items-center gap-1",children:[(0,s.jsx)(d.A,{size:11,className:"shrink-0","aria-hidden":"true"}),"MCP Servers"]}),K?.mcpServers&&K.mcpServers.length>0?(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:K.mcpServers.map(e=>(0,s.jsx)("span",{className:"text-xs bg-muted/60 text-foreground px-2 py-0.5 rounded font-mono",children:e},e))}):(0,s.jsx)("span",{className:"text-sm text-muted-foreground",children:"—"})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("p",{className:"text-xs text-muted-foreground mb-1 flex items-center gap-1",children:[(0,s.jsx)(c.A,{size:11,className:"shrink-0","aria-hidden":"true"}),N.customAgentSkillsLabel]}),K?.skillNames&&K.skillNames.length>0?(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:K.skillNames.map(e=>(0,s.jsx)("span",{className:"text-xs bg-[var(--amber-dim)] text-[var(--amber-text,var(--foreground))] px-2 py-0.5 rounded font-mono",children:e},e))}):(0,s.jsx)("span",{className:"text-sm text-muted-foreground",children:"—"})]})]})]}),(0,s.jsxs)("button",{type:"button",onClick:()=>W(e=>!e),className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors duration-150 cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded",children:[O?(0,s.jsx)(u.A,{size:14}):(0,s.jsx)(m.A,{size:14}),N.customAgentCustomize]}),(0,s.jsx)("div",{className:"grid transition-[grid-template-rows] duration-200 ease-out",style:{gridTemplateRows:O?"1fr":"0fr"},children:(0,s.jsx)("div",{className:"overflow-hidden",children:(0,s.jsxs)("div",{className:"rounded-xl border border-border/50 bg-card/50 p-5 space-y-4",children:[(0,s.jsx)(b.D0,{label:N.customAgentConfigPath,children:(0,s.jsx)(b.pd,{value:R.global,onChange:e=>I("global",e.target.value),autoComplete:"off"})}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,s.jsx)(b.D0,{label:N.customAgentConfigKey,children:(0,s.jsx)(b.pd,{value:R.configKey,onChange:e=>I("configKey",e.target.value),autoComplete:"off"})}),(0,s.jsx)(b.D0,{label:N.customAgentFormat,children:(0,s.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,s.jsx)(v,{label:"JSON",checked:"json"===R.format,onChange:()=>I("format","json"),name:"format"}),(0,s.jsx)(v,{label:"TOML",checked:"toml"===R.format,onChange:()=>I("format","toml"),name:"format"})]})})]}),(0,s.jsx)(b.D0,{label:N.customAgentTransport,children:(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(v,{label:"stdio",checked:"stdio"===R.preferredTransport,onChange:()=>I("preferredTransport","stdio"),name:"transport"}),(0,s.jsx)(v,{label:"http",checked:"http"===R.preferredTransport,onChange:()=>I("preferredTransport","http"),name:"transport"})]})}),(0,s.jsx)(b.D0,{label:N.customAgentSkillDir,hint:N.customAgentSkillDirHint,children:(0,s.jsx)(b.pd,{value:R.skillDir,onChange:e=>I("skillDir",e.target.value),placeholder:N.customAgentSkillDirPlaceholder,autoComplete:"off"})}),(0,s.jsx)(b.D0,{label:N.customAgentProjectConfig,children:(0,s.jsx)(b.pd,{value:R.project,onChange:e=>I("project",e.target.value),autoComplete:"off"})}),(0,s.jsx)(b.D0,{label:N.customAgentCliBinary,children:(0,s.jsx)(b.pd,{value:R.presenceCli,onChange:e=>I("presenceCli",e.target.value),placeholder:N.customAgentCliBinaryPlaceholder,autoComplete:"off"})})]})})})]}),L&&(0,s.jsxs)("div",{className:"rounded-lg border border-[var(--error)]/30 bg-[var(--error)]/5 p-3 flex items-start gap-2",children:[(0,s.jsx)(a.A,{size:14,className:"text-[var(--error)] mt-0.5 shrink-0"}),(0,s.jsx)("p",{className:"text-sm text-[var(--error)]",children:L})]})]}),(0,s.jsxs)("div",{className:"flex justify-end gap-2 px-5 pb-5 pt-1",children:[(0,s.jsx)("button",{type:"button",onClick:t,className:"px-4 min-h-[36px] text-sm rounded-lg border border-border hover:bg-muted cursor-pointer transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:N.customAgentCancel}),"input"===w?(0,s.jsx)("button",{type:"button",onClick:U,disabled:!B||D,className:"px-4 min-h-[36px] text-sm rounded-lg bg-[var(--amber)] text-[var(--amber-foreground)] hover:bg-[var(--amber)]/90 disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring flex items-center gap-2",children:D?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(p.A,{size:14,className:"animate-spin"}),N.customAgentDetecting]}):(0,s.jsxs)(s.Fragment,{children:[N.customAgentContinue,(0,s.jsx)(m.A,{size:14})]})}):(0,s.jsx)("button",{type:"button",onClick:G,disabled:T,className:"px-4 min-h-[36px] text-sm rounded-lg bg-[var(--amber)] text-[var(--amber-foreground)] hover:bg-[var(--amber)]/90 disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring flex items-center gap-2",children:T?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(p.A,{size:14,className:"animate-spin"}),A?N.customAgentSaving:N.customAgentAdding]}):L?N.customAgentRetry:A?N.customAgentSave:N.customAgentAdd})]})]})]})}function v({label:e,checked:t,onChange:r,name:n}){return(0,s.jsxs)("label",{className:`px-3 py-1.5 text-sm rounded-md border cursor-pointer transition-all duration-150 select-none ${t?"border-[var(--amber)]/40 bg-[var(--amber-dim)] text-foreground font-medium":"border-border bg-background text-muted-foreground hover:bg-muted"}`,children:[(0,s.jsx)("input",{type:"radio",name:n,checked:t,onChange:r,className:"sr-only"}),e]})}},82977:(e,t,r)=>{r.d(t,{Gj:()=>i,ZD:()=>n,v7:()=>a});let s={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function n(e){return e.replace(/[&<>"']/g,e=>s[e])}function i(e){return n(e).replace(/`/g,"&#96;")}function a(e){let t=e.replace(/&amp;/g,"&").replace(/&quot;/g,'"').replace(/&#39;/g,"'").trim(),r=t.replace(/[\u0000-\u001f\u007f\s]+/g,"").toLowerCase();return r.startsWith("http://")||r.startsWith("https://")||r.startsWith("mailto:")||t.startsWith("/")&&!t.startsWith("//")||t.startsWith("#")?i(t):"#"}}}]);
11
+ ${t}`,dangerouslySetInnerHTML:{__html:r}})}function S({open:e,skillName:t,skill:r,agentNames:i=[],allAgentNames:o=[],isNative:a=!1,nativeSourcePath:l,copy:d,onClose:N,onToggle:S,onDelete:T,onRefresh:z,onAddAgent:K,onRemoveAgent:P}){let L,E,[O,M]=(0,n.useState)(null),[F,R]=(0,n.useState)(""),[J,W]=(0,n.useState)(!1),[_,q]=(0,n.useState)(!1),[B,H]=(0,n.useState)(!1),[I,U]=(0,n.useState)(!1),[G,Q]=(0,n.useState)(null),[Z,V]=(0,n.useState)(!1),[Y,X]=(0,n.useState)(!1),[ee,et]=(0,n.useState)(!1),er=(0,n.useCallback)(async()=>{if(t){W(!0),q(!1);try{if(a&&l){let e=await (0,h.n)("/api/skills",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"read-native",name:t,sourcePath:l})});M(e.content),R(e.description||"")}else if(!a){let e=await (0,h.n)("/api/skills",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"read",name:t})});M(e.content)}}catch{q(!0)}finally{W(!1)}}},[t,a,l]);(0,n.useEffect)(()=>{e&&t&&(M(null),R(""),q(!1),Q(null),U(!1),V(!1),X(!1),et(!1),er())},[e,t,er]),(0,n.useEffect)(()=>{if(e)return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t);function t(e){"Escape"===e.key&&N()}},[e,N]);let es=(0,n.useCallback)(async()=>{!O||await (0,v.l)(O)&&j.oR.copy()},[O]),en=(0,n.useCallback)(async e=>{if(t&&S){V(!0);try{await S(t,e)}finally{V(!1)}}},[t,S]),ei=(0,n.useCallback)(async()=>{if(t&&T){H(!1),U(!0);try{await T(t),Q(d.deleted),await z?.(),setTimeout(()=>N(),800)}catch{Q(d.deleteFailed),U(!1)}}},[t,T,z,N,d.deleted,d.deleteFailed]);if(!e||!t)return null;let eo=r?(0,C.yQ)(`${r.name} ${r.description}`):(0,C.yQ)(t),ea=A[eo]??c.A,el=r?.source==="user",ed=a?d.sourceNative:r?.source==="builtin"?d.sourceBuiltin:d.sourceUser,ec=r?.description||F||"",eu=r?.path||(a&&l?`${l}/${t}/SKILL.md`:""),em=O?(L=O,(E=O.match(/^---\n[\s\S]*?\n---\n?/))&&(L=O.slice(E[0].length).trim()),{triggerConditions:ec||"",instructions:L}):null,ep=o.filter(e=>!i.includes(e));return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"fixed inset-0 z-40 overlay-backdrop",onClick:N,"aria-hidden":"true"}),(0,s.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":t,className:"fixed right-0 top-0 z-50 h-full w-full max-w-md border-l border-border bg-card shadow-2xl flex flex-col animate-in slide-in-from-right duration-200",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 px-5 py-4 border-b border-border/60 bg-gradient-to-r from-card to-card/80 shrink-0",children:[(0,s.jsx)("div",{className:"w-9 h-9 rounded-xl bg-[var(--amber)]/[0.08] flex items-center justify-center text-[var(--amber)] shrink-0",children:(0,s.jsx)(ea,{size:18})}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-foreground truncate",children:t}),(0,s.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,s.jsx)("span",{className:`text-2xs px-2 py-0.5 rounded-full font-medium select-none ${a||r?.source==="builtin"?"bg-muted text-muted-foreground":"bg-[var(--amber-dim)] text-[var(--amber-text)]"}`,children:ed}),(0,s.jsx)("span",{className:"text-2xs text-muted-foreground/60 capitalize",children:eo})]})]}),(0,s.jsx)("button",{type:"button",onClick:N,className:"shrink-0 p-1.5 rounded-md text-muted-foreground hover:text-foreground hover:bg-muted cursor-pointer transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":d.close,children:(0,s.jsx)(u.A,{size:16})})]}),(0,s.jsxs)("div",{className:"flex-1 overflow-y-auto px-5 py-4 space-y-5",children:[ec&&(0,s.jsxs)("section",{children:[(0,s.jsx)($,{label:"Trigger Conditions"}),(0,s.jsx)("div",{className:"rounded-lg border border-border/40 bg-muted/[0.03] p-3.5",children:(0,s.jsx)("p",{className:"text-xs text-foreground/80 leading-relaxed whitespace-pre-wrap",children:ec})})]}),!ec&&!a&&(0,s.jsx)("p",{className:"text-sm text-muted-foreground italic",children:d.noDescription}),(0,s.jsx)("section",{children:(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[!a&&r&&(0,s.jsx)(D,{label:d.enabled,value:r.enabled?"✓":"—",tone:r.enabled?"ok":"muted"}),(0,s.jsx)(D,{label:d.capability,value:eo}),(0,s.jsx)(D,{label:d.source,value:ed}),(0,s.jsx)(D,{label:d.agents,value:String(i.length)})]})}),(0,s.jsxs)("section",{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,s.jsx)($,{label:d.agents,noMargin:!0}),K&&ep.length>0&&(0,s.jsxs)("button",{type:"button",onClick:()=>X(!Y),className:"inline-flex items-center gap-1 text-2xs font-medium text-[var(--amber)] hover:opacity-80 transition-opacity cursor-pointer",children:[(0,s.jsx)(m.A,{size:12}),(0,s.jsx)("span",{children:"Add"})]})]}),Y&&ep.length>0&&(0,s.jsx)("div",{className:"flex flex-wrap gap-1.5 mb-2 p-2 rounded-lg border border-dashed border-[var(--amber)]/30 bg-[var(--amber)]/[0.03]",children:ep.map(e=>(0,s.jsxs)("button",{type:"button",onClick:()=>{K?.(t,e),X(!1)},className:"inline-flex items-center gap-1 px-2 py-1 text-2xs rounded-md border border-border bg-card hover:bg-muted cursor-pointer transition-colors",children:[(0,s.jsx)(m.A,{size:10,className:"text-[var(--amber)]"}),(0,s.jsx)("span",{className:"text-foreground/80",children:e})]},e))}),i.length>0?(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:i.map(e=>(0,s.jsx)(k.lx,{name:e,size:"sm",onRemove:P?()=>P(t,e):void 0},e))}):(0,s.jsx)("div",{className:"rounded-lg border border-border/40 bg-card/30 p-3 text-center",children:(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:d.noAgents})})]}),(null!==O||J||_)&&(0,s.jsxs)("section",{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,s.jsx)($,{label:"Instructions",noMargin:!0}),(0,s.jsx)("div",{className:"flex items-center gap-2",children:O&&(0,s.jsxs)("button",{type:"button",onClick:es,className:"inline-flex items-center gap-1 text-2xs text-muted-foreground hover:text-foreground cursor-pointer transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded px-1.5 py-0.5","aria-label":d.copyContent,children:[(0,s.jsx)(p.A,{size:11}),d.copyContent]})})]}),J&&(0,s.jsxs)("div",{className:"rounded-lg border border-border bg-background p-6 flex items-center justify-center gap-2 text-sm text-muted-foreground",children:[(0,s.jsx)(g.A,{size:14,className:"animate-spin"}),d.loading]}),_&&(0,s.jsxs)("div",{className:"rounded-lg border border-destructive/20 bg-destructive/[0.03] p-4 text-center space-y-2",children:[(0,s.jsx)("p",{className:"text-sm text-destructive",children:d.loadFailed}),(0,s.jsx)("button",{type:"button",onClick:er,className:"text-xs text-foreground underline hover:no-underline cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded",children:d.retry})]}),em&&!J&&!_&&(0,s.jsx)("div",{className:`rounded-lg border border-border/50 bg-muted/[0.02] p-4 overflow-hidden transition-all duration-200 ${!ee?"max-h-60":""}`,children:(0,s.jsx)(w,{text:em.instructions})}),em&&!J&&!_&&em.instructions.split("\n").length>15&&(0,s.jsxs)("button",{type:"button",onClick:()=>et(!ee),className:"inline-flex items-center gap-1 mt-2 text-2xs font-medium text-[var(--amber)] hover:opacity-80 transition-opacity cursor-pointer",children:[(0,s.jsx)(x.A,{size:12,className:`transition-transform duration-200 ${ee?"rotate-180":""}`}),(0,s.jsx)("span",{children:ee?"Collapse":"View All"})]})]}),eu&&(0,s.jsxs)("section",{children:[(0,s.jsx)($,{label:d.path}),(0,s.jsx)("div",{className:"rounded-lg border border-border/50 bg-muted/[0.03] p-3",children:(0,s.jsx)("code",{className:"text-2xs text-foreground/60 font-mono break-all leading-relaxed",children:eu})})]}),G&&(0,s.jsx)("div",{role:"status","aria-live":"polite",className:"rounded-md border border-border bg-muted/50 px-3 py-2 text-xs text-muted-foreground animate-in fade-in duration-200",children:G})]}),!a&&r&&(0,s.jsxs)("div",{className:"shrink-0 border-t border-border px-5 py-3 flex items-center gap-2",children:[S&&(0,s.jsxs)("div",{className:"flex items-center gap-2 mr-auto",children:[(0,s.jsx)(f.A,{size:14,className:"text-muted-foreground","aria-hidden":"true"}),(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:r.enabled?d.enabled:d.disabled}),(0,s.jsx)(y.lM,{size:"sm",checked:r.enabled,onChange:e=>void en(e),disabled:Z})]}),el&&T&&(0,s.jsxs)("button",{type:"button",onClick:()=>H(!0),disabled:I,className:"inline-flex items-center gap-1.5 px-2.5 min-h-[32px] text-xs rounded-md border border-destructive/30 text-destructive hover:bg-destructive/10 cursor-pointer disabled:opacity-50 transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[I?(0,s.jsx)(g.A,{size:12,className:"animate-spin"}):(0,s.jsx)(b.A,{size:12}),d.deleteSkill]})]})]}),(0,s.jsx)(k.TM,{open:B,title:d.confirmDeleteTitle,message:t?d.confirmDeleteMessage(t):"",confirmLabel:d.confirmDeleteAction,cancelLabel:d.cancelAction,onConfirm:()=>void ei(),onCancel:()=>H(!1),variant:"destructive"})]})}function $({label:e,noMargin:t}){return(0,s.jsx)("h3",{className:`text-xs font-semibold text-muted-foreground uppercase tracking-wider ${t?"":"mb-2"}`,children:e})}function D({label:e,value:t,tone:r="default"}){return(0,s.jsxs)("div",{className:"rounded-xl border border-border/50 bg-muted/[0.03] px-3.5 py-3 hover:bg-muted/[0.06] transition-colors duration-100",children:[(0,s.jsx)("span",{className:"text-2xs text-muted-foreground/60 block mb-1 uppercase tracking-wider",children:e}),(0,s.jsx)("span",{className:`text-sm font-semibold capitalize ${"ok"===r?"text-[var(--success)]":"muted"===r?"text-muted-foreground":"text-foreground"}`,children:t})]})}},51117:(e,t,r)=>{r.d(t,{V:()=>n});var s=r(44223);function n(){let[e,t]=(0,s.useState)([]),[r,n]=(0,s.useState)(!1),[i,o]=(0,s.useState)(null),a=(0,s.useCallback)(async e=>{n(!0),o(null);try{let r=await fetch("/api/a2a/discover",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:e})}),s=await r.json();if(s.agent)return t(e=>e.some(e=>e.id===s.agent.id)?e.map(e=>e.id===s.agent.id?s.agent:e):[...e,s.agent]),s.agent;return o(s.error||"Discovery failed"),null}catch(e){return o(e.message),null}finally{n(!1)}},[]);return{agents:e,discovering:r,error:i,discover:a,remove:(0,s.useCallback)(e=>{t(t=>t.filter(t=>t.id!==e))},[]),refresh:(0,s.useCallback)(()=>{t([]),o(null)},[])}}},82829:(e,t,r)=>{r.d(t,{A:()=>h});var s=r(66839),n=r(44223),i=r(72799),o=r(21082),a=r(38688),l=r(53097),d=r(30626),c=r(29696),u=r(72615),m=r(98327),p=r(44361),g=r(2073),x=r(84747),f=r(79455),b=r(69527);function h({open:e,onClose:t,onSuccess:r,existingAgents:h,editAgent:j}){let{t:y}=(0,g.Y)(),N=y.agentsContent.overview,k=(0,n.useRef)(null),C=(0,n.useRef)(null),A=!!j,[w,S]=(0,n.useState)("input"),[$,D]=(0,n.useState)(!1),[T,z]=(0,n.useState)(!1),[K,P]=(0,n.useState)(null),[L,E]=(0,n.useState)(null),[O,M]=(0,n.useState)(!1),[F,R]=(0,n.useState)(!1),[J,W]=(0,n.useState)({name:"",baseDir:"",global:"",configKey:"mcpServers",format:"json",preferredTransport:"stdio",project:"",presenceCli:"",skillDir:""});(0,n.useEffect)(()=>{e&&(j?(W({name:j.name,baseDir:j.customBaseDir||"",global:j.globalPath||"",configKey:j.configKey||"mcpServers",format:"toml"===j.format?"toml":"json",preferredTransport:j.preferredTransport||"stdio",project:j.projectPath||"",presenceCli:"",skillDir:j.skillWorkspacePath||""}),S("result"),R(!0),E(null),P(null)):(W({name:"",baseDir:"",global:"",configKey:"mcpServers",format:"json",preferredTransport:"stdio",project:"",presenceCli:"",skillDir:""}),S("input"),R(!1),E(null),P(null),M(!1)))},[e,j]),(0,n.useEffect)(()=>{e&&"input"===w&&setTimeout(()=>C.current?.focus(),100)},[e,w]),(0,x.r)(k,e),(0,n.useEffect)(()=>{if(!e)return;let r=e=>{"Escape"===e.key&&t()};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e,t]);let _=(0,n.useMemo)(()=>{let e=new Set(h.map(e=>e.key));return A&&j&&e.delete(j.key),e},[h,A,j]),q=(0,n.useMemo)(()=>J.name.toLowerCase().replace(/[^\x20-\x7E]/g,"").replace(/[_\s]+/g,"-").replace(/[^a-z0-9-]/g,"").replace(/-{2,}/g,"-").replace(/^-|-$/g,""),[J.name]),B=(0,n.useMemo)(()=>{if(A||!J.name.trim())return null;let e=q||"";if(!e)return null;if(_.has(e)){let t=h.find(t=>t.key===e);return t?.isCustom?N.customAgentKeyConflict?.(e)??`An agent with key "${e}" already exists`:N.customAgentBuiltinConflict?.(t?.name||e)??`Conflicts with built-in agent "${t?.name||e}"`}return null},[A,q,_,h,J.name,N]),H=J.name.trim()&&J.baseDir.trim()&&!B,I=(0,n.useCallback)((e,t)=>{W(r=>({...r,[e]:t}))},[]),U=(0,n.useCallback)(async()=>{if(!H)return;P(null),D(!0);let e=J.baseDir.trim();if(!e.startsWith("~/")){let t=e.endsWith("/")?e:e+"/";I("global",t+"mcp.json"),I("skillDir",t+"skills/"),E({exists:!1,hasSkillsDir:!1}),S("result"),D(!1);return}let t=new AbortController,r=setTimeout(()=>t.abort(),3e3);try{let s=await fetch("/api/agents/custom/detect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseDir:e}),signal:t.signal});clearTimeout(r);let n=await s.json();if(!s.ok)return void P(n.error||N.customAgentFailedSave);E(n),n.detectedConfig?I("global",n.detectedConfig):I("global",(e.endsWith("/")?e:e+"/")+"mcp.json"),n.detectedFormat&&I("format",n.detectedFormat),n.detectedConfigKey&&I("configKey",n.detectedConfigKey),I("skillDir",n.detectedSkillDir||(e.endsWith("/")?e:e+"/")+"skills/"),S("result")}catch{clearTimeout(r);let t=e.endsWith("/")?e:e+"/";I("global",t+"mcp.json"),I("skillDir",t+"skills/"),E({exists:!1,hasSkillsDir:!1}),M(!0),S("result")}finally{D(!1)}},[H,J.baseDir,I,N]),G=(0,n.useCallback)(async()=>{z(!0),P(null);let e=A?{key:j.key,name:J.name.trim(),baseDir:J.baseDir.trim(),global:J.global.trim()||void 0,configKey:J.configKey.trim()||void 0,format:J.format,preferredTransport:J.preferredTransport,project:J.project.trim()||null,presenceCli:J.presenceCli.trim()||void 0,skillDir:J.skillDir.trim()||void 0}:{name:J.name.trim(),baseDir:J.baseDir.trim(),global:J.global.trim()||void 0,configKey:J.configKey.trim()||void 0,format:J.format,preferredTransport:J.preferredTransport,project:J.project.trim()||null,presenceCli:J.presenceCli.trim()||void 0,skillDir:J.skillDir.trim()||void 0};try{let s=await fetch("/api/agents/custom",{method:A?"PUT":"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),n=await s.json();if(!s.ok){P(n.error||N.customAgentFailedSave),z(!1);return}let i=A?N.customAgentUpdated(J.name.trim()):N.customAgentAdded(J.name.trim());f.oR.success(i),r(),t()}catch{P(N.customAgentNetworkError)}finally{z(!1)}},[A,j,J,r,t,N]),Q=(0,n.useCallback)(e=>{"Enter"===e.key&&(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement)&&(e.preventDefault(),"input"===w&&H&&!$?U():"result"!==w||T||G())},[w,H,$,T,U,G]);if(!e)return null;let Z=A?N.editCustomAgentTitle(j.name):N.addCustomAgentTitle;return(0,s.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center",role:"dialog","aria-modal":"true","aria-labelledby":"custom-agent-modal-title",children:[(0,s.jsx)("div",{className:"absolute inset-0 modal-backdrop",onClick:t,"aria-hidden":"true"}),(0,s.jsxs)("div",{ref:k,className:"relative bg-card border border-border rounded-xl shadow-2xl max-w-md w-full mx-4 animate-in fade-in zoom-in-95 duration-200 max-h-[85vh] overflow-y-auto",onKeyDown:Q,children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-5 pt-5 pb-1",children:[(0,s.jsx)("h2",{id:"custom-agent-modal-title",className:"text-base font-semibold text-foreground",children:Z}),(0,s.jsx)("button",{type:"button",onClick:t,className:"w-7 h-7 rounded-md flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-muted transition-colors duration-150 cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":"Close",children:(0,s.jsx)(i.A,{size:16})})]}),(0,s.jsxs)("div",{className:"px-5 py-4 space-y-4",children:[(0,s.jsxs)(b.D0,{label:N.customAgentName,children:[(0,s.jsx)("input",{ref:C,value:J.name,onChange:e=>I("name",e.target.value),placeholder:N.customAgentNamePlaceholder,"aria-invalid":!!B,className:`w-full px-3 py-2 text-sm bg-background border rounded-lg text-foreground placeholder:text-muted-foreground outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:opacity-50 ${B?"border-[var(--error)] focus-visible:ring-[var(--error)]":"border-border"}`,autoComplete:"off"}),B?(0,s.jsxs)("p",{className:"text-xs text-[var(--error)] mt-1 flex items-center gap-1",children:[(0,s.jsx)(o.A,{size:12}),B]}):J.name.trim()&&q?(0,s.jsx)("p",{className:"text-[11px] text-muted-foreground mt-0.5",children:N.customAgentKeyPreview(q)}):null]}),(0,s.jsxs)(b.D0,{label:N.customAgentDir,hint:"input"===w?N.customAgentDirHint:void 0,children:[(0,s.jsx)(b.pd,{value:J.baseDir,onChange:e=>{I("baseDir",e.target.value),"result"===w&&(S("input"),E(null))},placeholder:N.customAgentDirPlaceholder,autoComplete:"off"}),"result"===w&&L?.exists&&(0,s.jsxs)("p",{className:"text-xs text-[var(--success)] mt-1 flex items-center gap-1",children:[(0,s.jsx)(a.A,{size:12}),N.customAgentDirFound]}),"result"===w&&L&&!L.exists&&!O&&(0,s.jsxs)("p",{className:"text-xs text-[var(--info,var(--muted-foreground))] mt-1 flex items-center gap-1",children:[(0,s.jsx)(l.A,{size:12}),N.customAgentDirNotFound]}),"result"===w&&O&&(0,s.jsxs)("p",{className:"text-xs text-[var(--amber)] mt-1 flex items-center gap-1",children:[(0,s.jsx)(o.A,{size:12}),N.customAgentDetectTimeout]})]}),"result"===w&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:`rounded-lg p-4 space-y-3 ${L?.exists?"border border-[var(--success)]/20 bg-[var(--success)]/5":"border border-border bg-muted/30"}`,children:[(0,s.jsx)("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:L?.exists?N.customAgentDetectedTitle:N.customAgentDefaultTitle}),(0,s.jsxs)("div",{className:"space-y-2.5",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs text-muted-foreground mb-1",children:N.customAgentConfigLabel}),(0,s.jsx)("span",{className:"text-sm text-foreground font-mono truncate block",children:J.global}),L?.mcpParseError&&(0,s.jsxs)("p",{className:"text-xs text-[var(--error)] mt-1 flex items-center gap-1",children:[(0,s.jsx)(o.A,{size:12,className:"shrink-0"}),L.mcpParseError]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs text-muted-foreground mb-1",children:N.customAgentFormatLabel}),(0,s.jsx)("span",{className:"text-sm text-foreground",children:J.format.toUpperCase()})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs text-muted-foreground mb-1",children:"Config Key"}),(0,s.jsx)("span",{className:"text-sm text-foreground font-mono",children:J.configKey})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs text-muted-foreground mb-1",children:N.customAgentTransportLabel}),(0,s.jsx)("span",{className:"text-sm text-foreground",children:J.preferredTransport})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("p",{className:"text-xs text-muted-foreground mb-1 flex items-center gap-1",children:[(0,s.jsx)(d.A,{size:11,className:"shrink-0","aria-hidden":"true"}),"MCP Servers"]}),L?.mcpServers&&L.mcpServers.length>0?(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:L.mcpServers.map(e=>(0,s.jsx)("span",{className:"text-xs bg-muted/60 text-foreground px-2 py-0.5 rounded font-mono",children:e},e))}):(0,s.jsx)("span",{className:"text-sm text-muted-foreground",children:"—"})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("p",{className:"text-xs text-muted-foreground mb-1 flex items-center gap-1",children:[(0,s.jsx)(c.A,{size:11,className:"shrink-0","aria-hidden":"true"}),N.customAgentSkillsLabel]}),L?.skillNames&&L.skillNames.length>0?(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:L.skillNames.map(e=>(0,s.jsx)("span",{className:"text-xs bg-[var(--amber-dim)] text-[var(--amber-text,var(--foreground))] px-2 py-0.5 rounded font-mono",children:e},e))}):(0,s.jsx)("span",{className:"text-sm text-muted-foreground",children:"—"})]})]})]}),(0,s.jsxs)("button",{type:"button",onClick:()=>R(e=>!e),className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors duration-150 cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded",children:[F?(0,s.jsx)(u.A,{size:14}):(0,s.jsx)(m.A,{size:14}),N.customAgentCustomize]}),(0,s.jsx)("div",{className:"grid transition-[grid-template-rows] duration-200 ease-out",style:{gridTemplateRows:F?"1fr":"0fr"},children:(0,s.jsx)("div",{className:"overflow-hidden",children:(0,s.jsxs)("div",{className:"rounded-xl border border-border/50 bg-card/50 p-5 space-y-4",children:[(0,s.jsx)(b.D0,{label:N.customAgentConfigPath,children:(0,s.jsx)(b.pd,{value:J.global,onChange:e=>I("global",e.target.value),autoComplete:"off"})}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,s.jsx)(b.D0,{label:N.customAgentConfigKey,children:(0,s.jsx)(b.pd,{value:J.configKey,onChange:e=>I("configKey",e.target.value),autoComplete:"off"})}),(0,s.jsx)(b.D0,{label:N.customAgentFormat,children:(0,s.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,s.jsx)(v,{label:"JSON",checked:"json"===J.format,onChange:()=>I("format","json"),name:"format"}),(0,s.jsx)(v,{label:"TOML",checked:"toml"===J.format,onChange:()=>I("format","toml"),name:"format"})]})})]}),(0,s.jsx)(b.D0,{label:N.customAgentTransport,children:(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(v,{label:"stdio",checked:"stdio"===J.preferredTransport,onChange:()=>I("preferredTransport","stdio"),name:"transport"}),(0,s.jsx)(v,{label:"http",checked:"http"===J.preferredTransport,onChange:()=>I("preferredTransport","http"),name:"transport"})]})}),(0,s.jsx)(b.D0,{label:N.customAgentSkillDir,hint:N.customAgentSkillDirHint,children:(0,s.jsx)(b.pd,{value:J.skillDir,onChange:e=>I("skillDir",e.target.value),placeholder:N.customAgentSkillDirPlaceholder,autoComplete:"off"})}),(0,s.jsx)(b.D0,{label:N.customAgentProjectConfig,children:(0,s.jsx)(b.pd,{value:J.project,onChange:e=>I("project",e.target.value),autoComplete:"off"})}),(0,s.jsx)(b.D0,{label:N.customAgentCliBinary,children:(0,s.jsx)(b.pd,{value:J.presenceCli,onChange:e=>I("presenceCli",e.target.value),placeholder:N.customAgentCliBinaryPlaceholder,autoComplete:"off"})})]})})})]}),K&&(0,s.jsxs)("div",{className:"rounded-lg border border-[var(--error)]/30 bg-[var(--error)]/5 p-3 flex items-start gap-2",children:[(0,s.jsx)(o.A,{size:14,className:"text-[var(--error)] mt-0.5 shrink-0"}),(0,s.jsx)("p",{className:"text-sm text-[var(--error)]",children:K})]})]}),(0,s.jsxs)("div",{className:"flex justify-end gap-2 px-5 pb-5 pt-1",children:[(0,s.jsx)("button",{type:"button",onClick:t,className:"px-4 min-h-[36px] text-sm rounded-lg border border-border hover:bg-muted cursor-pointer transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:N.customAgentCancel}),"input"===w?(0,s.jsx)("button",{type:"button",onClick:U,disabled:!H||$,className:"px-4 min-h-[36px] text-sm rounded-lg bg-[var(--amber)] text-[var(--amber-foreground)] hover:bg-[var(--amber)]/90 disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring flex items-center gap-2",children:$?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(p.A,{size:14,className:"animate-spin"}),N.customAgentDetecting]}):(0,s.jsxs)(s.Fragment,{children:[N.customAgentContinue,(0,s.jsx)(m.A,{size:14})]})}):(0,s.jsx)("button",{type:"button",onClick:G,disabled:T,className:"px-4 min-h-[36px] text-sm rounded-lg bg-[var(--amber)] text-[var(--amber-foreground)] hover:bg-[var(--amber)]/90 disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring flex items-center gap-2",children:T?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(p.A,{size:14,className:"animate-spin"}),A?N.customAgentSaving:N.customAgentAdding]}):K?N.customAgentRetry:A?N.customAgentSave:N.customAgentAdd})]})]})]})}function v({label:e,checked:t,onChange:r,name:n}){return(0,s.jsxs)("label",{className:`px-3 py-1.5 text-sm rounded-md border cursor-pointer transition-all duration-150 select-none ${t?"border-[var(--amber)]/40 bg-[var(--amber-dim)] text-foreground font-medium":"border-border bg-background text-muted-foreground hover:bg-muted"}`,children:[(0,s.jsx)("input",{type:"radio",name:n,checked:t,onChange:r,className:"sr-only"}),e]})}},82977:(e,t,r)=>{r.d(t,{Gj:()=>i,ZD:()=>n,v7:()=>o});let s={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function n(e){return e.replace(/[&<>"']/g,e=>s[e])}function i(e){return n(e).replace(/`/g,"&#96;")}function o(e){let t=e.replace(/&amp;/g,"&").replace(/&quot;/g,'"').replace(/&#39;/g,"'").trim(),r=t.replace(/[\u0000-\u001f\u007f\s]+/g,"").toLowerCase();return r.startsWith("http://")||r.startsWith("https://")||r.startsWith("mailto:")||t.startsWith("/")&&!t.startsWith("//")||t.startsWith("#")?i(t):"#"}},98641:(e,t,r)=>{function s(e){return JSON.stringify(String(e))}function n(e){return/^[A-Za-z0-9_-]+$/.test(e)?e:s(e)}function i(e,t){let r=e.split(".").map(e=>e.trim()).filter(Boolean),s={},n=s;for(let e of r)n[e]={},n=n[e];return Object.assign(n,t),s}function o(e,t){let r=[`${n(e)}:`," mindos:"];if(t.type&&r.push(` type: ${s(t.type)}`),t.command&&r.push(` command: ${s(t.command)}`),t.url&&r.push(` url: ${s(t.url)}`),Array.isArray(t.args)&&r.push(` args: [${t.args.map(s).join(", ")}]`),t.env&&"object"==typeof t.env)for(let[e,i]of(r.push(" env:"),Object.entries(t.env)))r.push(` ${n(e)}: ${s(i)}`);if(t.headers&&"object"==typeof t.headers)for(let[e,i]of(r.push(" headers:"),Object.entries(t.headers)))r.push(` ${n(e)}: ${s(i)}`);return r.join("\n")}function a(e,t,r){var s,n;let a,l,d;if("stdio"===r)return function(e){let t={type:"stdio",command:"mindos",args:["mcp"],env:{MCP_TRANSPORT:"stdio"}};if("toml"===e.format){let t=`[${e.configKey}.mindos]
12
+ command = "mindos"
13
+ args = ["mcp"]
14
+
15
+ [${e.configKey}.mindos.env]
16
+ MCP_TRANSPORT = "stdio"`;return{snippet:t,displaySnippet:t,path:e.globalPath}}if("yaml"===e.format){let r=o(e.configKey,t);return{snippet:r,displaySnippet:r,path:e.globalPath}}if(e.globalNestedKey){let r=JSON.stringify(i(e.globalNestedKey,{mindos:t}),null,2);return{snippet:r,displaySnippet:r,path:e.globalPath}}let r=JSON.stringify({[e.configKey]:{mindos:t}},null,2);return{snippet:r,displaySnippet:r,path:e.globalPath}}(e);let c=t?.localIP?`http://${t.localIP}:${t.port}/mcp`:t?.endpoint??"http://127.0.0.1:8781/mcp";return s=t?.authToken,n=t?.maskedToken,a={url:c},s&&(a.headers={Authorization:`Bearer ${s}`}),l={url:c},n&&(l.headers={Authorization:`Bearer ${n}`}),{snippet:(d=t=>{if("toml"===e.format){let r=[`[${e.configKey}.mindos]`,'type = "http"',`url = "${c}"`],s=t.headers?.Authorization;return s&&(r.push(""),r.push(`[${e.configKey}.mindos.headers]`),r.push(`Authorization = "${s}"`)),r.join("\n")}return"yaml"===e.format?o(e.configKey,t):e.globalNestedKey?JSON.stringify(i(e.globalNestedKey,{mindos:t}),null,2):JSON.stringify({[e.configKey]:{mindos:t}},null,2)})(a),displaySnippet:d(s?l:a),path:(e.format,e.globalPath)}}r.d(t,{$k:()=>a})}}]);