@geminilight/mindos 0.6.41 → 0.6.43

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 (282) 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 +20 -19
  4. package/_standalone/.next/build-manifest.json +2 -2
  5. package/_standalone/.next/cache/.previewinfo +1 -1
  6. package/_standalone/.next/cache/.rscinfo +1 -1
  7. package/_standalone/.next/cache/config.json +3 -3
  8. package/_standalone/.next/prerender-manifest.json +3 -3
  9. package/_standalone/.next/routes-manifest.json +6 -0
  10. package/_standalone/.next/server/app/.well-known/agent-card.json/route_client-reference-manifest.js +1 -1
  11. package/_standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  12. package/_standalone/.next/server/app/_global-error.html +2 -2
  13. package/_standalone/.next/server/app/_global-error.rsc +1 -1
  14. package/_standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  15. package/_standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  16. package/_standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  17. package/_standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  18. package/_standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  19. package/_standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  20. package/_standalone/.next/server/app/_not-found/page.js +1 -1
  21. package/_standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  22. package/_standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  23. package/_standalone/.next/server/app/agents/[agentKey]/page.js +1 -1
  24. package/_standalone/.next/server/app/agents/[agentKey]/page.js.nft.json +1 -1
  25. package/_standalone/.next/server/app/agents/[agentKey]/page_client-reference-manifest.js +1 -1
  26. package/_standalone/.next/server/app/agents/page.js +2 -2
  27. package/_standalone/.next/server/app/agents/page.js.nft.json +1 -1
  28. package/_standalone/.next/server/app/agents/page_client-reference-manifest.js +1 -1
  29. package/_standalone/.next/server/app/api/a2a/agents/route_client-reference-manifest.js +1 -1
  30. package/_standalone/.next/server/app/api/a2a/delegations/route_client-reference-manifest.js +1 -1
  31. package/_standalone/.next/server/app/api/a2a/discover/route_client-reference-manifest.js +1 -1
  32. package/_standalone/.next/server/app/api/a2a/route_client-reference-manifest.js +1 -1
  33. package/_standalone/.next/server/app/api/acp/config/route_client-reference-manifest.js +1 -1
  34. package/_standalone/.next/server/app/api/acp/detect/route_client-reference-manifest.js +1 -1
  35. package/_standalone/.next/server/app/api/acp/install/route_client-reference-manifest.js +1 -1
  36. package/_standalone/.next/server/app/api/acp/registry/route_client-reference-manifest.js +1 -1
  37. package/_standalone/.next/server/app/api/acp/session/route_client-reference-manifest.js +1 -1
  38. package/_standalone/.next/server/app/api/agent-activity/route_client-reference-manifest.js +1 -1
  39. package/_standalone/.next/server/app/api/ask/route_client-reference-manifest.js +1 -1
  40. package/_standalone/.next/server/app/api/ask-sessions/route_client-reference-manifest.js +1 -1
  41. package/_standalone/.next/server/app/api/auth/route_client-reference-manifest.js +1 -1
  42. package/_standalone/.next/server/app/api/backlinks/route_client-reference-manifest.js +1 -1
  43. package/_standalone/.next/server/app/api/bootstrap/route_client-reference-manifest.js +1 -1
  44. package/_standalone/.next/server/app/api/changes/route_client-reference-manifest.js +1 -1
  45. package/_standalone/.next/server/app/api/export/route.js +1 -1
  46. package/_standalone/.next/server/app/api/export/route_client-reference-manifest.js +1 -1
  47. package/_standalone/.next/server/app/api/extract-pdf/route_client-reference-manifest.js +1 -1
  48. package/_standalone/.next/server/app/api/file/import/route_client-reference-manifest.js +1 -1
  49. package/_standalone/.next/server/app/api/file/route_client-reference-manifest.js +1 -1
  50. package/_standalone/.next/server/app/api/files/route_client-reference-manifest.js +1 -1
  51. package/_standalone/.next/server/app/api/git/route_client-reference-manifest.js +1 -1
  52. package/_standalone/.next/server/app/api/graph/route_client-reference-manifest.js +1 -1
  53. package/_standalone/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
  54. package/_standalone/.next/server/app/api/inbox/route_client-reference-manifest.js +1 -1
  55. package/_standalone/.next/server/app/api/init/route_client-reference-manifest.js +1 -1
  56. package/_standalone/.next/server/app/api/mcp/agents/route_client-reference-manifest.js +1 -1
  57. package/_standalone/.next/server/app/api/mcp/install/route.js +1 -1
  58. package/_standalone/.next/server/app/api/mcp/install/route_client-reference-manifest.js +1 -1
  59. package/_standalone/.next/server/app/api/mcp/install-skill/route_client-reference-manifest.js +1 -1
  60. package/_standalone/.next/server/app/api/mcp/restart/route_client-reference-manifest.js +1 -1
  61. package/_standalone/.next/server/app/api/mcp/status/route_client-reference-manifest.js +1 -1
  62. package/_standalone/.next/server/app/api/mcp/uninstall/route.js +1 -0
  63. package/_standalone/.next/server/app/api/mcp/uninstall/route.js.nft.json +1 -0
  64. package/_standalone/.next/server/app/api/mcp/uninstall/route_client-reference-manifest.js +1 -0
  65. package/_standalone/.next/server/app/api/monitoring/route_client-reference-manifest.js +1 -1
  66. package/_standalone/.next/server/app/api/recent-files/route_client-reference-manifest.js +1 -1
  67. package/_standalone/.next/server/app/api/restart/route_client-reference-manifest.js +1 -1
  68. package/_standalone/.next/server/app/api/search/route_client-reference-manifest.js +1 -1
  69. package/_standalone/.next/server/app/api/settings/list-models/route_client-reference-manifest.js +1 -1
  70. package/_standalone/.next/server/app/api/settings/reset-token/route_client-reference-manifest.js +1 -1
  71. package/_standalone/.next/server/app/api/settings/route_client-reference-manifest.js +1 -1
  72. package/_standalone/.next/server/app/api/settings/test-key/route_client-reference-manifest.js +1 -1
  73. package/_standalone/.next/server/app/api/setup/check-path/route_client-reference-manifest.js +1 -1
  74. package/_standalone/.next/server/app/api/setup/check-port/route_client-reference-manifest.js +1 -1
  75. package/_standalone/.next/server/app/api/setup/generate-token/route_client-reference-manifest.js +1 -1
  76. package/_standalone/.next/server/app/api/setup/ls/route_client-reference-manifest.js +1 -1
  77. package/_standalone/.next/server/app/api/setup/route_client-reference-manifest.js +1 -1
  78. package/_standalone/.next/server/app/api/skills/route.js +4 -4
  79. package/_standalone/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  80. package/_standalone/.next/server/app/api/sync/route_client-reference-manifest.js +1 -1
  81. package/_standalone/.next/server/app/api/tree-version/route_client-reference-manifest.js +1 -1
  82. package/_standalone/.next/server/app/api/uninstall/route_client-reference-manifest.js +1 -1
  83. package/_standalone/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
  84. package/_standalone/.next/server/app/api/update-check/route_client-reference-manifest.js +1 -1
  85. package/_standalone/.next/server/app/api/update-status/route_client-reference-manifest.js +1 -1
  86. package/_standalone/.next/server/app/api/workflows/route_client-reference-manifest.js +1 -1
  87. package/_standalone/.next/server/app/changes/page.js +1 -1
  88. package/_standalone/.next/server/app/changes/page.js.nft.json +1 -1
  89. package/_standalone/.next/server/app/changes/page_client-reference-manifest.js +1 -1
  90. package/_standalone/.next/server/app/echo/[segment]/page.js +1 -1
  91. package/_standalone/.next/server/app/echo/[segment]/page.js.nft.json +1 -1
  92. package/_standalone/.next/server/app/echo/[segment]/page_client-reference-manifest.js +1 -1
  93. package/_standalone/.next/server/app/echo/page.js +1 -1
  94. package/_standalone/.next/server/app/echo/page.js.nft.json +1 -1
  95. package/_standalone/.next/server/app/echo/page_client-reference-manifest.js +1 -1
  96. package/_standalone/.next/server/app/explore/page.js +1 -1
  97. package/_standalone/.next/server/app/explore/page.js.nft.json +1 -1
  98. package/_standalone/.next/server/app/explore/page_client-reference-manifest.js +1 -1
  99. package/_standalone/.next/server/app/help/page.js +1 -1
  100. package/_standalone/.next/server/app/help/page.js.nft.json +1 -1
  101. package/_standalone/.next/server/app/help/page_client-reference-manifest.js +1 -1
  102. package/_standalone/.next/server/app/login/page.js +1 -1
  103. package/_standalone/.next/server/app/login/page.js.nft.json +1 -1
  104. package/_standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
  105. package/_standalone/.next/server/app/page.js +1 -1
  106. package/_standalone/.next/server/app/page.js.nft.json +1 -1
  107. package/_standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  108. package/_standalone/.next/server/app/setup/page.js +1 -1
  109. package/_standalone/.next/server/app/setup/page.js.nft.json +1 -1
  110. package/_standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
  111. package/_standalone/.next/server/app/trash/page.js +2 -2
  112. package/_standalone/.next/server/app/trash/page_client-reference-manifest.js +1 -1
  113. package/_standalone/.next/server/app/view/[...path]/page.js +2 -2
  114. package/_standalone/.next/server/app/view/[...path]/page.js.nft.json +1 -1
  115. package/_standalone/.next/server/app/view/[...path]/page_client-reference-manifest.js +1 -1
  116. package/_standalone/.next/server/app-paths-manifest.json +20 -19
  117. package/_standalone/.next/server/chunks/6539.js +1 -1
  118. package/_standalone/.next/server/chunks/{2536.js → 66.js} +2 -2
  119. package/_standalone/.next/server/chunks/9539.js +30 -30
  120. package/_standalone/.next/server/instrumentation.js +1 -1
  121. package/_standalone/.next/server/next-font-manifest.js +1 -1
  122. package/_standalone/.next/server/next-font-manifest.json +1 -1
  123. package/_standalone/.next/server/pages/500.html +2 -2
  124. package/_standalone/.next/server/server-reference-manifest.js +1 -1
  125. package/_standalone/.next/server/server-reference-manifest.json +1 -1
  126. package/_standalone/.next/static/chunks/{1053-b70535785cc5aaee.js → 1053-67f0ce444d1227e2.js} +2 -2
  127. package/_standalone/.next/static/chunks/app/.well-known/agent-card.json/route-84943536516b00b2.js +1 -0
  128. package/_standalone/.next/static/chunks/app/_global-error/page-84943536516b00b2.js +1 -0
  129. package/_standalone/.next/static/chunks/app/agents/page-eac6c5f6650dbf62.js +5 -0
  130. package/_standalone/.next/static/chunks/app/api/a2a/agents/route-84943536516b00b2.js +1 -0
  131. package/_standalone/.next/static/chunks/app/api/a2a/delegations/route-84943536516b00b2.js +1 -0
  132. package/_standalone/.next/static/chunks/app/api/a2a/discover/route-84943536516b00b2.js +1 -0
  133. package/_standalone/.next/static/chunks/app/api/a2a/route-84943536516b00b2.js +1 -0
  134. package/_standalone/.next/static/chunks/app/api/acp/config/route-84943536516b00b2.js +1 -0
  135. package/_standalone/.next/static/chunks/app/api/acp/detect/route-84943536516b00b2.js +1 -0
  136. package/_standalone/.next/static/chunks/app/api/acp/install/route-84943536516b00b2.js +1 -0
  137. package/_standalone/.next/static/chunks/app/api/acp/registry/route-84943536516b00b2.js +1 -0
  138. package/_standalone/.next/static/chunks/app/api/acp/session/route-84943536516b00b2.js +1 -0
  139. package/_standalone/.next/static/chunks/app/api/agent-activity/route-84943536516b00b2.js +1 -0
  140. package/_standalone/.next/static/chunks/app/api/ask/route-84943536516b00b2.js +1 -0
  141. package/_standalone/.next/static/chunks/app/api/ask-sessions/route-84943536516b00b2.js +1 -0
  142. package/_standalone/.next/static/chunks/app/api/auth/route-84943536516b00b2.js +1 -0
  143. package/_standalone/.next/static/chunks/app/api/backlinks/route-84943536516b00b2.js +1 -0
  144. package/_standalone/.next/static/chunks/app/api/bootstrap/route-84943536516b00b2.js +1 -0
  145. package/_standalone/.next/static/chunks/app/api/changes/route-84943536516b00b2.js +1 -0
  146. package/_standalone/.next/static/chunks/app/api/export/route-84943536516b00b2.js +1 -0
  147. package/_standalone/.next/static/chunks/app/api/extract-pdf/route-84943536516b00b2.js +1 -0
  148. package/_standalone/.next/static/chunks/app/api/file/import/route-84943536516b00b2.js +1 -0
  149. package/_standalone/.next/static/chunks/app/api/file/route-84943536516b00b2.js +1 -0
  150. package/_standalone/.next/static/chunks/app/api/files/route-84943536516b00b2.js +1 -0
  151. package/_standalone/.next/static/chunks/app/api/git/route-84943536516b00b2.js +1 -0
  152. package/_standalone/.next/static/chunks/app/api/graph/route-84943536516b00b2.js +1 -0
  153. package/_standalone/.next/static/chunks/app/api/health/route-84943536516b00b2.js +1 -0
  154. package/_standalone/.next/static/chunks/app/api/inbox/route-84943536516b00b2.js +1 -0
  155. package/_standalone/.next/static/chunks/app/api/init/route-84943536516b00b2.js +1 -0
  156. package/_standalone/.next/static/chunks/app/api/mcp/agents/route-84943536516b00b2.js +1 -0
  157. package/_standalone/.next/static/chunks/app/api/mcp/install/route-84943536516b00b2.js +1 -0
  158. package/_standalone/.next/static/chunks/app/api/mcp/install-skill/route-84943536516b00b2.js +1 -0
  159. package/_standalone/.next/static/chunks/app/api/mcp/restart/route-84943536516b00b2.js +1 -0
  160. package/_standalone/.next/static/chunks/app/api/mcp/status/route-84943536516b00b2.js +1 -0
  161. package/_standalone/.next/static/chunks/app/api/mcp/uninstall/route-84943536516b00b2.js +1 -0
  162. package/_standalone/.next/static/chunks/app/api/monitoring/route-84943536516b00b2.js +1 -0
  163. package/_standalone/.next/static/chunks/app/api/recent-files/route-84943536516b00b2.js +1 -0
  164. package/_standalone/.next/static/chunks/app/api/restart/route-84943536516b00b2.js +1 -0
  165. package/_standalone/.next/static/chunks/app/api/search/route-84943536516b00b2.js +1 -0
  166. package/_standalone/.next/static/chunks/app/api/settings/list-models/route-84943536516b00b2.js +1 -0
  167. package/_standalone/.next/static/chunks/app/api/settings/reset-token/route-84943536516b00b2.js +1 -0
  168. package/_standalone/.next/static/chunks/app/api/settings/route-84943536516b00b2.js +1 -0
  169. package/_standalone/.next/static/chunks/app/api/settings/test-key/route-84943536516b00b2.js +1 -0
  170. package/_standalone/.next/static/chunks/app/api/setup/check-path/route-84943536516b00b2.js +1 -0
  171. package/_standalone/.next/static/chunks/app/api/setup/check-port/route-84943536516b00b2.js +1 -0
  172. package/_standalone/.next/static/chunks/app/api/setup/generate-token/route-84943536516b00b2.js +1 -0
  173. package/_standalone/.next/static/chunks/app/api/setup/ls/route-84943536516b00b2.js +1 -0
  174. package/_standalone/.next/static/chunks/app/api/setup/route-84943536516b00b2.js +1 -0
  175. package/_standalone/.next/static/chunks/app/api/skills/route-84943536516b00b2.js +1 -0
  176. package/_standalone/.next/static/chunks/app/api/sync/route-84943536516b00b2.js +1 -0
  177. package/_standalone/.next/static/chunks/app/api/tree-version/route-84943536516b00b2.js +1 -0
  178. package/_standalone/.next/static/chunks/app/api/uninstall/route-84943536516b00b2.js +1 -0
  179. package/_standalone/.next/static/chunks/app/api/update/route-84943536516b00b2.js +1 -0
  180. package/_standalone/.next/static/chunks/app/api/update-check/route-84943536516b00b2.js +1 -0
  181. package/_standalone/.next/static/chunks/app/api/update-status/route-84943536516b00b2.js +1 -0
  182. package/_standalone/.next/static/chunks/app/api/workflows/route-84943536516b00b2.js +1 -0
  183. package/_standalone/.next/static/chunks/app/echo/page-84943536516b00b2.js +1 -0
  184. package/_standalone/.next/static/chunks/app/{layout-42cdbce19f404567.js → layout-67c50f39fffd6c36.js} +45 -45
  185. package/_standalone/.next/static/chunks/app/{page-8c9643b649e01735.js → page-ea1bff5e0ba77c16.js} +2 -2
  186. package/_standalone/.next/static/chunks/app/setup/{page-d158b8cb533feb1e.js → page-6132ea7632e08a9b.js} +1 -1
  187. package/_standalone/.next/static/chunks/app/trash/page-6ee0637660fb00e9.js +1 -0
  188. package/_standalone/.next/static/chunks/app/view/[...path]/loading-84943536516b00b2.js +1 -0
  189. package/_standalone/.next/static/chunks/app/view/[...path]/page-182494955ef70870.js +12 -0
  190. package/_standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-84943536516b00b2.js +1 -0
  191. package/_standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-84943536516b00b2.js +1 -0
  192. package/_standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-84943536516b00b2.js +1 -0
  193. package/_standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-84943536516b00b2.js +1 -0
  194. package/_standalone/.next/static/lpSyd-exxbKPK2GO1oNDZ/_buildManifest.js +1 -0
  195. package/_standalone/.next/trace +63 -63
  196. package/_standalone/.next/types/routes.d.ts +2 -1
  197. package/_standalone/.next/types/validator.ts +9 -0
  198. package/_standalone/components/agents/AgentsMcpSection.tsx +24 -5
  199. package/_standalone/components/setup/types.ts +1 -0
  200. package/_standalone/instrumentation.ts +21 -0
  201. package/_standalone/lib/i18n/modules/panels.ts +6 -2
  202. package/_standalone/tsconfig.tsbuildinfo +1 -1
  203. package/app/app/api/mcp/install/route.ts +13 -2
  204. package/app/app/api/mcp/uninstall/route.ts +130 -0
  205. package/app/app/api/skills/route.ts +14 -1
  206. package/app/components/agents/AgentsMcpSection.tsx +24 -5
  207. package/app/components/setup/index.tsx +4 -3
  208. package/app/components/setup/types.ts +1 -0
  209. package/app/instrumentation.ts +21 -0
  210. package/app/lib/i18n/modules/panels.ts +6 -2
  211. package/app/lib/settings.ts +32 -0
  212. package/bin/commands/start.js +10 -0
  213. package/bin/lib/skill-check.js +116 -20
  214. package/package.json +1 -1
  215. package/scripts/setup.js +28 -0
  216. package/skills/mindos/SKILL.md +5 -6
  217. package/skills/mindos-zh/SKILL.md +5 -4
  218. package/_standalone/.next/static/Ij3PFh-a0zi5K_ANoSAW0/_buildManifest.js +0 -1
  219. package/_standalone/.next/static/chunks/app/.well-known/agent-card.json/route-400c3c09b1540c14.js +0 -1
  220. package/_standalone/.next/static/chunks/app/_global-error/page-400c3c09b1540c14.js +0 -1
  221. package/_standalone/.next/static/chunks/app/agents/page-6102a884b2cb3cfe.js +0 -5
  222. package/_standalone/.next/static/chunks/app/api/a2a/agents/route-400c3c09b1540c14.js +0 -1
  223. package/_standalone/.next/static/chunks/app/api/a2a/delegations/route-400c3c09b1540c14.js +0 -1
  224. package/_standalone/.next/static/chunks/app/api/a2a/discover/route-400c3c09b1540c14.js +0 -1
  225. package/_standalone/.next/static/chunks/app/api/a2a/route-400c3c09b1540c14.js +0 -1
  226. package/_standalone/.next/static/chunks/app/api/acp/config/route-400c3c09b1540c14.js +0 -1
  227. package/_standalone/.next/static/chunks/app/api/acp/detect/route-400c3c09b1540c14.js +0 -1
  228. package/_standalone/.next/static/chunks/app/api/acp/install/route-400c3c09b1540c14.js +0 -1
  229. package/_standalone/.next/static/chunks/app/api/acp/registry/route-400c3c09b1540c14.js +0 -1
  230. package/_standalone/.next/static/chunks/app/api/acp/session/route-400c3c09b1540c14.js +0 -1
  231. package/_standalone/.next/static/chunks/app/api/agent-activity/route-400c3c09b1540c14.js +0 -1
  232. package/_standalone/.next/static/chunks/app/api/ask/route-400c3c09b1540c14.js +0 -1
  233. package/_standalone/.next/static/chunks/app/api/ask-sessions/route-400c3c09b1540c14.js +0 -1
  234. package/_standalone/.next/static/chunks/app/api/auth/route-400c3c09b1540c14.js +0 -1
  235. package/_standalone/.next/static/chunks/app/api/backlinks/route-400c3c09b1540c14.js +0 -1
  236. package/_standalone/.next/static/chunks/app/api/bootstrap/route-400c3c09b1540c14.js +0 -1
  237. package/_standalone/.next/static/chunks/app/api/changes/route-400c3c09b1540c14.js +0 -1
  238. package/_standalone/.next/static/chunks/app/api/export/route-400c3c09b1540c14.js +0 -1
  239. package/_standalone/.next/static/chunks/app/api/extract-pdf/route-400c3c09b1540c14.js +0 -1
  240. package/_standalone/.next/static/chunks/app/api/file/import/route-400c3c09b1540c14.js +0 -1
  241. package/_standalone/.next/static/chunks/app/api/file/route-400c3c09b1540c14.js +0 -1
  242. package/_standalone/.next/static/chunks/app/api/files/route-400c3c09b1540c14.js +0 -1
  243. package/_standalone/.next/static/chunks/app/api/git/route-400c3c09b1540c14.js +0 -1
  244. package/_standalone/.next/static/chunks/app/api/graph/route-400c3c09b1540c14.js +0 -1
  245. package/_standalone/.next/static/chunks/app/api/health/route-400c3c09b1540c14.js +0 -1
  246. package/_standalone/.next/static/chunks/app/api/inbox/route-400c3c09b1540c14.js +0 -1
  247. package/_standalone/.next/static/chunks/app/api/init/route-400c3c09b1540c14.js +0 -1
  248. package/_standalone/.next/static/chunks/app/api/mcp/agents/route-400c3c09b1540c14.js +0 -1
  249. package/_standalone/.next/static/chunks/app/api/mcp/install/route-400c3c09b1540c14.js +0 -1
  250. package/_standalone/.next/static/chunks/app/api/mcp/install-skill/route-400c3c09b1540c14.js +0 -1
  251. package/_standalone/.next/static/chunks/app/api/mcp/restart/route-400c3c09b1540c14.js +0 -1
  252. package/_standalone/.next/static/chunks/app/api/mcp/status/route-400c3c09b1540c14.js +0 -1
  253. package/_standalone/.next/static/chunks/app/api/monitoring/route-400c3c09b1540c14.js +0 -1
  254. package/_standalone/.next/static/chunks/app/api/recent-files/route-400c3c09b1540c14.js +0 -1
  255. package/_standalone/.next/static/chunks/app/api/restart/route-400c3c09b1540c14.js +0 -1
  256. package/_standalone/.next/static/chunks/app/api/search/route-400c3c09b1540c14.js +0 -1
  257. package/_standalone/.next/static/chunks/app/api/settings/list-models/route-400c3c09b1540c14.js +0 -1
  258. package/_standalone/.next/static/chunks/app/api/settings/reset-token/route-400c3c09b1540c14.js +0 -1
  259. package/_standalone/.next/static/chunks/app/api/settings/route-400c3c09b1540c14.js +0 -1
  260. package/_standalone/.next/static/chunks/app/api/settings/test-key/route-400c3c09b1540c14.js +0 -1
  261. package/_standalone/.next/static/chunks/app/api/setup/check-path/route-400c3c09b1540c14.js +0 -1
  262. package/_standalone/.next/static/chunks/app/api/setup/check-port/route-400c3c09b1540c14.js +0 -1
  263. package/_standalone/.next/static/chunks/app/api/setup/generate-token/route-400c3c09b1540c14.js +0 -1
  264. package/_standalone/.next/static/chunks/app/api/setup/ls/route-400c3c09b1540c14.js +0 -1
  265. package/_standalone/.next/static/chunks/app/api/setup/route-400c3c09b1540c14.js +0 -1
  266. package/_standalone/.next/static/chunks/app/api/skills/route-400c3c09b1540c14.js +0 -1
  267. package/_standalone/.next/static/chunks/app/api/sync/route-400c3c09b1540c14.js +0 -1
  268. package/_standalone/.next/static/chunks/app/api/tree-version/route-400c3c09b1540c14.js +0 -1
  269. package/_standalone/.next/static/chunks/app/api/uninstall/route-400c3c09b1540c14.js +0 -1
  270. package/_standalone/.next/static/chunks/app/api/update/route-400c3c09b1540c14.js +0 -1
  271. package/_standalone/.next/static/chunks/app/api/update-check/route-400c3c09b1540c14.js +0 -1
  272. package/_standalone/.next/static/chunks/app/api/update-status/route-400c3c09b1540c14.js +0 -1
  273. package/_standalone/.next/static/chunks/app/api/workflows/route-400c3c09b1540c14.js +0 -1
  274. package/_standalone/.next/static/chunks/app/echo/page-400c3c09b1540c14.js +0 -1
  275. package/_standalone/.next/static/chunks/app/trash/page-e9ab74ffeb96af41.js +0 -1
  276. package/_standalone/.next/static/chunks/app/view/[...path]/loading-400c3c09b1540c14.js +0 -1
  277. package/_standalone/.next/static/chunks/app/view/[...path]/page-764a69a1c8bd4eef.js +0 -12
  278. package/_standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-400c3c09b1540c14.js +0 -1
  279. package/_standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-400c3c09b1540c14.js +0 -1
  280. package/_standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-400c3c09b1540c14.js +0 -1
  281. package/_standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-400c3c09b1540c14.js +0 -1
  282. /package/_standalone/.next/static/{Ij3PFh-a0zi5K_ANoSAW0 → lpSyd-exxbKPK2GO1oNDZ}/_ssgManifest.js +0 -0
@@ -2,8 +2,8 @@ export const dynamic = 'force-dynamic';
2
2
  import { NextRequest, NextResponse } from 'next/server';
3
3
  import fs from 'fs';
4
4
  import path from 'path';
5
- import { MCP_AGENTS, expandHome } from '@/lib/mcp-agents';
6
- import { readSettings } from '@/lib/settings';
5
+ import { MCP_AGENTS, expandHome, resolveSkillWorkspaceProfile } from '@/lib/mcp-agents';
6
+ import { readSettings, recordSkillInstall } from '@/lib/settings';
7
7
 
8
8
  /** Parse JSONC — strips comments before JSON.parse. Returns {} for empty/whitespace-only input. */
9
9
  function parseJsonc(text: string): Record<string, unknown> {
@@ -204,6 +204,17 @@ export async function POST(req: NextRequest) {
204
204
 
205
205
  const result: typeof results[number] = { agent: key, status: 'ok', path: configPath, transport: effectiveTransport };
206
206
 
207
+ // Record skill install path for auto-update on future version bumps.
208
+ // Always record — even if skill file doesn't exist yet (user may install
209
+ // it later via `npx skills add`). skill-check gracefully skips missing paths.
210
+ try {
211
+ const skillProfile = resolveSkillWorkspaceProfile(key);
212
+ const settings = readSettings();
213
+ const activeSkill = settings.disabledSkills?.includes('mindos') ? 'mindos-zh' : 'mindos';
214
+ const skillPath = path.join(skillProfile.workspacePath, activeSkill, 'SKILL.md');
215
+ recordSkillInstall(key, activeSkill, skillPath);
216
+ } catch { /* best-effort, don't fail the install */ }
217
+
207
218
  // Verify http connections
208
219
  if (effectiveTransport === 'http') {
209
220
  const mcpUrl = (entry as Record<string, unknown>).url as string;
@@ -0,0 +1,130 @@
1
+ export const dynamic = 'force-dynamic';
2
+ import { NextRequest, NextResponse } from 'next/server';
3
+ import fs from 'fs';
4
+ import path from 'path';
5
+ import { MCP_AGENTS, expandHome } from '@/lib/mcp-agents';
6
+
7
+ /** Parse JSONC — strips comments before JSON.parse. Returns {} for empty/whitespace-only input. */
8
+ function parseJsonc(text: string): Record<string, unknown> {
9
+ let stripped = text.replace(/\\"|"(?:\\"|[^"])*"|(\/\/.*$)/gm, (m, g) => g ? '' : m);
10
+ stripped = stripped.replace(/\/\*[\s\S]*?\*\//g, '');
11
+ if (!stripped.trim()) return {};
12
+ return JSON.parse(stripped);
13
+ }
14
+
15
+ /** Navigate a dot-path (e.g. "mcp.servers") and return the leaf container, or null. */
16
+ function getNestedPath(obj: Record<string, unknown>, dotPath: string): Record<string, unknown> | null {
17
+ const parts = dotPath.split('.').filter(Boolean);
18
+ let current: unknown = obj;
19
+ for (const part of parts) {
20
+ if (!current || typeof current !== 'object') return null;
21
+ current = (current as Record<string, unknown>)[part];
22
+ }
23
+ return (current && typeof current === 'object') ? current as Record<string, unknown> : null;
24
+ }
25
+
26
+ /** Remove a [section.server] block from a TOML file */
27
+ function removeTomlEntry(existing: string, sectionKey: string, serverName: string): string {
28
+ const sectionHeader = `[${sectionKey}.${serverName}]`;
29
+ const envHeader = `[${sectionKey}.${serverName}.env]`;
30
+ const headersHeader = `[${sectionKey}.${serverName}.headers]`;
31
+
32
+ const lines = existing.split('\n');
33
+ const result: string[] = [];
34
+ let skipping = false;
35
+
36
+ for (const line of lines) {
37
+ const trimmed = line.trim();
38
+ if (trimmed === sectionHeader || trimmed === envHeader || trimmed === headersHeader) {
39
+ skipping = true;
40
+ continue;
41
+ }
42
+ if (skipping && trimmed.startsWith('[')) {
43
+ skipping = false;
44
+ }
45
+ if (!skipping) {
46
+ result.push(line);
47
+ }
48
+ }
49
+
50
+ // Clean up consecutive blank lines
51
+ const cleaned: string[] = [];
52
+ for (const line of result) {
53
+ if (line.trim() === '' && cleaned.length > 0 && cleaned[cleaned.length - 1].trim() === '') continue;
54
+ cleaned.push(line);
55
+ }
56
+
57
+ return cleaned.join('\n');
58
+ }
59
+
60
+ interface UninstallRequest {
61
+ agents: Array<{
62
+ key: string;
63
+ scope: 'project' | 'global';
64
+ }>;
65
+ }
66
+
67
+ export async function POST(req: NextRequest) {
68
+ try {
69
+ const body = (await req.json()) as UninstallRequest;
70
+ const { agents } = body;
71
+ const results: Array<{
72
+ agent: string;
73
+ status: string;
74
+ path?: string;
75
+ message?: string;
76
+ }> = [];
77
+
78
+ for (const item of agents) {
79
+ const { key, scope } = item;
80
+ const agent = MCP_AGENTS[key];
81
+ if (!agent) {
82
+ results.push({ agent: key, status: 'error', message: `Unknown agent: ${key}` });
83
+ continue;
84
+ }
85
+
86
+ const isGlobal = scope === 'global';
87
+ const configPath = isGlobal ? agent.global : agent.project;
88
+ if (!configPath) {
89
+ results.push({ agent: key, status: 'error', message: `${agent.name} does not support ${scope} scope` });
90
+ continue;
91
+ }
92
+
93
+ const absPath = expandHome(configPath);
94
+
95
+ if (!fs.existsSync(absPath)) {
96
+ results.push({ agent: key, status: 'ok', message: 'Config file does not exist' });
97
+ continue;
98
+ }
99
+
100
+ try {
101
+ if (agent.format === 'toml') {
102
+ const existing = fs.readFileSync(absPath, 'utf-8');
103
+ const updated = removeTomlEntry(existing, agent.key, 'mindos');
104
+ fs.writeFileSync(absPath, updated, 'utf-8');
105
+ } else {
106
+ const config = parseJsonc(fs.readFileSync(absPath, 'utf-8'));
107
+
108
+ // Handle nested keys (e.g. VS Code: mcp.servers)
109
+ const useNestedKey = isGlobal && agent.globalNestedKey;
110
+ const container = useNestedKey
111
+ ? getNestedPath(config, agent.globalNestedKey!)
112
+ : (config[agent.key] as Record<string, unknown> | undefined);
113
+
114
+ if (container && 'mindos' in container) {
115
+ delete container.mindos;
116
+ fs.writeFileSync(absPath, JSON.stringify(config, null, 2) + '\n', 'utf-8');
117
+ }
118
+ }
119
+
120
+ results.push({ agent: key, status: 'ok', path: configPath });
121
+ } catch (err) {
122
+ results.push({ agent: key, status: 'error', message: String(err) });
123
+ }
124
+ }
125
+
126
+ return NextResponse.json({ results });
127
+ } catch (err) {
128
+ return NextResponse.json({ error: String(err) }, { status: 500 });
129
+ }
130
+ }
@@ -32,7 +32,7 @@ export async function POST(req: NextRequest) {
32
32
  try {
33
33
  const body = await req.json();
34
34
  const { action, name, description, content, enabled, sourcePath } = body as {
35
- action: 'create' | 'update' | 'delete' | 'toggle' | 'read' | 'read-native';
35
+ action: 'create' | 'update' | 'delete' | 'toggle' | 'read' | 'read-native' | 'record-install';
36
36
  name?: string;
37
37
  description?: string;
38
38
  content?: string;
@@ -130,6 +130,19 @@ export async function POST(req: NextRequest) {
130
130
  return NextResponse.json({ content: nativeContent, description: nativeDesc });
131
131
  }
132
132
 
133
+ case 'record-install': {
134
+ // Record that a skill was installed to a specific agent (for auto-update tracking)
135
+ const agentKey = (body as { agentKey?: string }).agentKey;
136
+ const skillName = name;
137
+ const installPath = (body as { installPath?: string }).installPath;
138
+ if (!agentKey || !skillName || !installPath) {
139
+ return NextResponse.json({ error: 'agentKey, name, and installPath are required' }, { status: 400 });
140
+ }
141
+ const { recordSkillInstall } = await import('@/lib/settings');
142
+ recordSkillInstall(agentKey, skillName, installPath);
143
+ return NextResponse.json({ ok: true });
144
+ }
145
+
133
146
  default:
134
147
  return NextResponse.json({ error: `Unknown action: ${action}` }, { status: 400 });
135
148
  }
@@ -3,6 +3,7 @@
3
3
  import { useCallback, useMemo, useState } from 'react';
4
4
  import Link from 'next/link';
5
5
  import { RefreshCw, Search, Server } from 'lucide-react';
6
+ import { apiFetch } from '@/lib/api';
6
7
  import type { McpContextValue } from '@/lib/stores/mcp-store';
7
8
  import type { AgentBuckets, AgentStatusFilter, AgentTransportFilter } from './agents-content-model';
8
9
  import {
@@ -58,6 +59,8 @@ export default function AgentsMcpSection({
58
59
  cancel: string;
59
60
  noAvailableAgents: string;
60
61
  manualRemoveHint: string;
62
+ removeSuccess: string;
63
+ removeFailed: string;
61
64
  reconnectAllInServer: string;
62
65
  reconnectAllRunning: string;
63
66
  reconnectAllDone: (ok: number, failed: number) => string;
@@ -383,7 +386,7 @@ function ByServerView({
383
386
  onReconnect: (agent: ReturnType<typeof sortAgentsByStatus>[number]) => Promise<void>;
384
387
  }) {
385
388
  const [pickerServer, setPickerServer] = useState<string | null>(null);
386
- const [confirmState, setConfirmState] = useState<{ agentName: string; serverName: string } | null>(null);
389
+ const [confirmState, setConfirmState] = useState<{ agentKey: string; agentName: string; serverName: string } | null>(null);
387
390
  const [hintMessage, setHintMessage] = useState<string | null>(null);
388
391
  const [reconnectingServer, setReconnectingServer] = useState<string | null>(null);
389
392
  const [reconnectMsg, setReconnectMsg] = useState<Record<string, string>>({});
@@ -396,11 +399,27 @@ function ByServerView({
396
399
  [onInstallMindos],
397
400
  );
398
401
 
399
- const handleConfirmRemove = useCallback(() => {
402
+ const handleConfirmRemove = useCallback(async () => {
403
+ if (!confirmState) return;
404
+ const { agentKey } = confirmState;
400
405
  setConfirmState(null);
401
- setHintMessage(copy.manualRemoveHint);
406
+
407
+ // Find agent info to determine scope
408
+ const agent = allAgents.find(a => a.key === agentKey);
409
+ const scope = agent?.scope === 'project' ? 'project' : 'global';
410
+
411
+ try {
412
+ await apiFetch('/api/mcp/uninstall', {
413
+ method: 'POST',
414
+ headers: { 'Content-Type': 'application/json' },
415
+ body: JSON.stringify({ agents: [{ key: agentKey, scope }] }),
416
+ });
417
+ setHintMessage(copy.removeSuccess ?? 'Removed. Restart your agent to apply.');
418
+ } catch {
419
+ setHintMessage(copy.removeFailed ?? 'Failed to remove. Try editing the config file manually.');
420
+ }
402
421
  setTimeout(() => setHintMessage(null), 4000);
403
- }, [copy.manualRemoveHint]);
422
+ }, [confirmState, allAgents, copy]);
404
423
 
405
424
  const handleReconnectAllInServer = useCallback(
406
425
  async (serverName: string, agents: typeof allAgents) => {
@@ -520,7 +539,7 @@ function ByServerView({
520
539
  <AgentAvatar
521
540
  name={agent.name}
522
541
  status={agentStatus}
523
- onRemove={() => setConfirmState({ agentName: agent.name, serverName: srv.serverName })}
542
+ onRemove={() => setConfirmState({ agentKey: agent.key, agentName: agent.name, serverName: srv.serverName })}
524
543
  />
525
544
  </Link>
526
545
  );
@@ -216,7 +216,7 @@ export default function SetupWizard() {
216
216
  // eslint-disable-next-line react-hooks/exhaustive-deps
217
217
  }, [step]);
218
218
 
219
- // Load agents when entering Agents step
219
+ // Load agents when entering Agents step (exclude builtin — MindOS itself)
220
220
  useEffect(() => {
221
221
  if (step === STEP_AGENTS && !agentsLoaded && !agentsLoading) {
222
222
  setAgentsLoading(true);
@@ -224,9 +224,10 @@ export default function SetupWizard() {
224
224
  .then(r => r.json())
225
225
  .then(data => {
226
226
  if (data.agents) {
227
- setAgents(data.agents);
227
+ const externalAgents = (data.agents as AgentEntry[]).filter(a => a.scope !== 'builtin');
228
+ setAgents(externalAgents);
228
229
  setSelectedAgents(new Set(
229
- (data.agents as AgentEntry[]).filter(a => a.installed || a.present).map(a => a.key)
230
+ externalAgents.filter(a => a.installed || a.present).map(a => a.key)
230
231
  ));
231
232
  }
232
233
  setAgentsLoaded(true);
@@ -48,6 +48,7 @@ export interface AgentEntry {
48
48
  name: string;
49
49
  present: boolean;
50
50
  installed: boolean;
51
+ scope?: string;
51
52
  hasProjectScope: boolean;
52
53
  hasGlobalScope: boolean;
53
54
  preferredTransport: 'stdio' | 'http';
@@ -33,5 +33,26 @@ export async function register() {
33
33
  // mindRoot not configured yet — skip prewarming
34
34
  }
35
35
  });
36
+
37
+ // Skill auto-update: check if bundled skills are newer than installed
38
+ // ones (covers both CLI startup and Desktop hot-update restarts).
39
+ process.nextTick(async () => {
40
+ try {
41
+ const projRoot = process.env.MINDOS_PROJECT_ROOT || resolve(process.cwd(), '..');
42
+ const skillCheckModule = resolve(projRoot, 'bin', 'lib', 'skill-check.js');
43
+ const { checkSkillVersions, updateSkill } = await import(skillCheckModule);
44
+ const mismatches = checkSkillVersions(projRoot);
45
+ for (const m of mismatches) {
46
+ try {
47
+ updateSkill(m.bundledPath, m.installPath);
48
+ console.log(`[SkillSync] Updated ${m.name}${m.agent ? ` (${m.agent})` : ''}: v${m.installed} → v${m.bundled}`);
49
+ } catch (err) {
50
+ console.warn(`[SkillSync] Failed to update ${m.name}: ${err instanceof Error ? err.message : err}`);
51
+ }
52
+ }
53
+ } catch {
54
+ // skill-check not available or failed — silently skip
55
+ }
56
+ });
36
57
  }
37
58
  }
@@ -370,10 +370,12 @@ export const panelsEn = {
370
370
  addAgent: 'Add',
371
371
  removeFromServer: 'Remove',
372
372
  confirmRemoveTitle: 'Remove from server?',
373
- confirmRemoveMessage: (agent: string, server: string) => `Remove "${agent}" from "${server}"? This requires editing the agent config file.`,
373
+ confirmRemoveMessage: (agent: string, server: string) => `Remove "${agent}" from "${server}"? The agent config will be updated automatically.`,
374
374
  cancel: 'Cancel',
375
375
  noAvailableAgents: 'All agents already connected.',
376
376
  manualRemoveHint: 'Flagged for removal — edit the agent config to finalize.',
377
+ removeSuccess: 'Removed. Restart your agent to apply.',
378
+ removeFailed: 'Failed to remove. Try editing the config file manually.',
377
379
  reconnectAllInServer: 'Reconnect all',
378
380
  reconnectAllRunning: 'Reconnecting...',
379
381
  reconnectAllDone: (ok: number, failed: number) => `Done: ${ok} reconnected${failed > 0 ? `, ${failed} failed` : ''}.`,
@@ -995,10 +997,12 @@ export const panelsZh = {
995
997
  addAgent: '添加',
996
998
  removeFromServer: '移除',
997
999
  confirmRemoveTitle: '从服务器移除?',
998
- confirmRemoveMessage: (agent: string, server: string) => `将"${agent}"从"${server}"移除?需编辑 Agent 配置文件完成操作。`,
1000
+ confirmRemoveMessage: (agent: string, server: string) => `将"${agent}"从"${server}"移除?配置文件将自动更新。`,
999
1001
  cancel: '取消',
1000
1002
  noAvailableAgents: '所有 Agent 均已添加。',
1001
1003
  manualRemoveHint: '已标记移除,请编辑 Agent 配置文件完成操作。',
1004
+ removeSuccess: '已移除,重启 Agent 后生效。',
1005
+ removeFailed: '移除失败,请手动编辑配置文件。',
1002
1006
  reconnectAllInServer: '全部重连',
1003
1007
  reconnectAllRunning: '正在重连...',
1004
1008
  reconnectAllDone: (ok: number, failed: number) => `完成:${ok} 已重连${failed > 0 ? `,${failed} 失败` : ''}。`,
@@ -214,6 +214,38 @@ export function writeSettings(settings: ServerSettings): void {
214
214
  fs.writeFileSync(SETTINGS_PATH, JSON.stringify(merged, null, 2) + '\n', 'utf-8');
215
215
  }
216
216
 
217
+ /* ── Skill install tracking ────────────────────────────────────── */
218
+
219
+ export interface SkillInstallRecord {
220
+ agent: string;
221
+ skill: string;
222
+ path: string;
223
+ }
224
+
225
+ /**
226
+ * Record that a skill was installed to a specific agent path.
227
+ * Stored in config.json → installedSkillAgents[].
228
+ * Idempotent — updates existing entry if agent+skill match.
229
+ */
230
+ export function recordSkillInstall(agentKey: string, skillName: string, installPath: string): void {
231
+ let config: Record<string, unknown> = {};
232
+ try { config = JSON.parse(fs.readFileSync(SETTINGS_PATH, 'utf-8')); } catch { /* fresh */ }
233
+
234
+ const list: SkillInstallRecord[] = Array.isArray(config.installedSkillAgents)
235
+ ? (config.installedSkillAgents as SkillInstallRecord[])
236
+ : [];
237
+
238
+ const entry: SkillInstallRecord = { agent: agentKey, skill: skillName, path: installPath };
239
+ const idx = list.findIndex(e => e.agent === agentKey && e.skill === skillName);
240
+ if (idx >= 0) list[idx] = entry;
241
+ else list.push(entry);
242
+
243
+ config.installedSkillAgents = list;
244
+ const dir = path.dirname(SETTINGS_PATH);
245
+ if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
246
+ fs.writeFileSync(SETTINGS_PATH, JSON.stringify(config, null, 2) + '\n', 'utf-8');
247
+ }
248
+
217
249
  /** Effective AI config — unified interface for all providers.
218
250
  * Resolves: saved config → env var → preset default, in that priority order.
219
251
  * When `providerOverride` is given, resolves that provider's config instead. */
@@ -63,6 +63,16 @@ export const run = async (args, flags) => {
63
63
  const isVerbose = Boolean(flags.verbose);
64
64
  const extra = args.join(' ');
65
65
 
66
+ // Ensure `mindos` CLI is in PATH (silent, best-effort, dev installs only)
67
+ try {
68
+ execSync('command -v mindos', { stdio: 'ignore' });
69
+ } catch {
70
+ const isDesktop = !!(process.env.ELECTRON_RUN_AS_NODE || process.env.MINDOS_DESKTOP);
71
+ if (!isDesktop && existsSync(resolve(ROOT, '.git'))) {
72
+ try { execSync('npm link', { cwd: ROOT, stdio: 'ignore' }); } catch { /* best effort */ }
73
+ }
74
+ }
75
+
66
76
  // Check for incomplete setup
67
77
  if (existsSync(CONFIG_PATH)) {
68
78
  try {
@@ -1,5 +1,5 @@
1
- import { existsSync, readFileSync, copyFileSync } from 'node:fs';
2
- import { resolve } from 'node:path';
1
+ import { existsSync, readFileSync, writeFileSync, copyFileSync, mkdirSync } from 'node:fs';
2
+ import { resolve, dirname } from 'node:path';
3
3
  import { homedir } from 'node:os';
4
4
  import { createInterface } from 'node:readline';
5
5
  import { ROOT } from './constants.js';
@@ -7,11 +7,10 @@ import { bold, dim, cyan, green, yellow, isTTY } from './colors.js';
7
7
 
8
8
  const SKILLS = ['mindos', 'mindos-zh'];
9
9
  const INSTALLED_BASE = resolve(homedir(), '.agents', 'skills');
10
+ const CONFIG_PATH = resolve(homedir(), '.mindos', 'config.json');
10
11
 
11
12
  /**
12
13
  * Simple semver "a > b" comparison (major.minor.patch only).
13
- * Intentionally inlined (same as update-check.js) to keep this module
14
- * self-contained — no cross-module dependency for a 10-line function.
15
14
  */
16
15
  function semverGt(a, b) {
17
16
  const pa = a.split('.').map(Number);
@@ -37,53 +36,150 @@ export function extractSkillVersion(filePath) {
37
36
  }
38
37
  }
39
38
 
39
+ /* ── Config helpers (read/write installedSkillAgents) ─────────── */
40
+
41
+ /**
42
+ * Read config.json, best-effort.
43
+ */
44
+ function readConfig() {
45
+ try {
46
+ return JSON.parse(readFileSync(CONFIG_PATH, 'utf-8'));
47
+ } catch {
48
+ return {};
49
+ }
50
+ }
51
+
52
+ /**
53
+ * Merge fields into config.json (preserves all existing fields).
54
+ */
55
+ function mergeConfig(patch) {
56
+ const config = readConfig();
57
+ Object.assign(config, patch);
58
+ const dir = dirname(CONFIG_PATH);
59
+ if (!existsSync(dir)) mkdirSync(dir, { recursive: true });
60
+ writeFileSync(CONFIG_PATH, JSON.stringify(config, null, 2) + '\n', 'utf-8');
61
+ }
62
+
63
+ /**
64
+ * Read the installed-skill-agents list from config.
65
+ * @returns {Array<{ agent: string, skill: string, path: string }>}
66
+ */
67
+ export function getInstalledSkillAgents() {
68
+ const config = readConfig();
69
+ return Array.isArray(config.installedSkillAgents) ? config.installedSkillAgents : [];
70
+ }
71
+
72
+ /**
73
+ * Record that a skill was installed to a specific agent.
74
+ * Idempotent — updates existing entry if agent+skill already recorded.
75
+ */
76
+ export function recordSkillInstall(agentKey, skillName, installPath) {
77
+ const list = getInstalledSkillAgents();
78
+ const idx = list.findIndex(e => e.agent === agentKey && e.skill === skillName);
79
+ const entry = { agent: agentKey, skill: skillName, path: installPath };
80
+ if (idx >= 0) {
81
+ list[idx] = entry;
82
+ } else {
83
+ list.push(entry);
84
+ }
85
+ mergeConfig({ installedSkillAgents: list });
86
+ }
87
+
88
+ /**
89
+ * Remove a skill record for an agent.
90
+ */
91
+ export function removeSkillRecord(agentKey, skillName) {
92
+ const list = getInstalledSkillAgents();
93
+ const filtered = list.filter(e => !(e.agent === agentKey && e.skill === skillName));
94
+ if (filtered.length !== list.length) {
95
+ mergeConfig({ installedSkillAgents: filtered });
96
+ }
97
+ }
98
+
99
+ /* ── Version checking ─────────────────────────────────────────── */
100
+
40
101
  /**
41
102
  * Compare installed vs bundled skill versions.
42
- * @param {string} [root] package root to read bundled skills from.
43
- * Defaults to the static ROOT (fine for startup). Pass the post-update
44
- * root when called from `mindos update` so we read the NEW package's skills.
45
- * Returns array of mismatches where bundled > installed.
103
+ * Checks both the default ~/.agents/skills/ path AND all agent-specific
104
+ * paths recorded in config.installedSkillAgents.
105
+ *
106
+ * @param {string} [root] package root (defaults to ROOT)
107
+ * @returns {Array<{ name, installed, bundled, installPath, bundledPath, agent? }>}
46
108
  */
47
109
  export function checkSkillVersions(root) {
48
110
  const base = root || ROOT;
49
111
  const mismatches = [];
112
+ const seen = new Set(); // dedup by installPath
113
+
114
+ // 1. Check default ~/.agents/skills/ (legacy path)
50
115
  for (const name of SKILLS) {
51
116
  const installPath = resolve(INSTALLED_BASE, name, 'SKILL.md');
52
117
  const bundledPath = resolve(base, 'skills', name, 'SKILL.md');
118
+ if (!existsSync(installPath) || !existsSync(bundledPath)) continue;
119
+ const installed = extractSkillVersion(installPath);
120
+ const bundled = extractSkillVersion(bundledPath);
121
+ if (!installed || !bundled) continue;
122
+ if (semverGt(bundled, installed)) {
123
+ mismatches.push({ name, installed, bundled, installPath, bundledPath });
124
+ }
125
+ seen.add(installPath);
126
+ }
53
127
 
54
- if (!existsSync(installPath)) continue;
128
+ // 2. Check agent-specific paths from config
129
+ const agentRecords = getInstalledSkillAgents();
130
+ for (const record of agentRecords) {
131
+ const installPath = record.path;
132
+ if (!installPath || seen.has(installPath)) continue;
133
+ seen.add(installPath);
134
+
135
+ const skillName = record.skill || 'mindos';
136
+ const bundledPath = resolve(base, 'skills', skillName, 'SKILL.md');
55
137
  if (!existsSync(bundledPath)) continue;
56
138
 
139
+ if (!existsSync(installPath)) {
140
+ // Path doesn't exist — skill not installed yet or was removed.
141
+ // Don't clean up the record: user may install the skill later,
142
+ // and we want to auto-update it when they do.
143
+ continue;
144
+ }
145
+
57
146
  const installed = extractSkillVersion(installPath);
58
147
  const bundled = extractSkillVersion(bundledPath);
59
-
60
148
  if (!installed || !bundled) continue;
61
149
  if (semverGt(bundled, installed)) {
62
- mismatches.push({ name, installed, bundled, installPath, bundledPath });
150
+ mismatches.push({
151
+ name: skillName,
152
+ installed,
153
+ bundled,
154
+ installPath,
155
+ bundledPath,
156
+ agent: record.agent,
157
+ });
63
158
  }
64
159
  }
160
+
65
161
  return mismatches;
66
162
  }
67
163
 
68
164
  /**
69
165
  * Copy bundled SKILL.md over the installed version.
166
+ * Creates parent directory if needed.
70
167
  */
71
168
  export function updateSkill(bundledPath, installPath) {
169
+ const dir = dirname(installPath);
170
+ if (!existsSync(dir)) mkdirSync(dir, { recursive: true });
72
171
  copyFileSync(bundledPath, installPath);
73
172
  }
74
173
 
75
174
  /**
76
175
  * Print skill update hints and optionally prompt user to update.
77
- *
78
- * - TTY + not daemon: interactive readline prompt (default Y)
79
- * - Non-TTY / daemon / MINDOS_NO_SKILL_CHECK=1: one-line hint, no block
80
176
  */
81
177
  export async function promptSkillUpdate(mismatches) {
82
178
  if (!mismatches || mismatches.length === 0) return;
83
179
 
84
- // Print mismatch info
85
180
  for (const m of mismatches) {
86
- console.log(`\n ${yellow('⬆')} Skill ${bold(m.name)}: ${dim(`v${m.installed}`)} → ${cyan(`v${m.bundled}`)}`);
181
+ const agentLabel = m.agent ? ` (${m.agent})` : '';
182
+ console.log(`\n ${yellow('⬆')} Skill ${bold(m.name)}${agentLabel}: ${dim(`v${m.installed}`)} → ${cyan(`v${m.bundled}`)}`);
87
183
  }
88
184
 
89
185
  // Non-interactive mode: just print hint
@@ -92,15 +188,14 @@ export async function promptSkillUpdate(mismatches) {
92
188
  return;
93
189
  }
94
190
 
95
- // Interactive prompt (10s timeout to avoid blocking startup indefinitely)
191
+ // Interactive prompt (10s timeout)
96
192
  return new Promise((res) => {
97
193
  let done = false;
98
194
  const finish = () => { if (!done) { done = true; res(); } };
99
195
 
100
196
  const rl = createInterface({ input: process.stdin, output: process.stdout });
101
197
  const timer = setTimeout(() => { rl.close(); finish(); }, 10_000);
102
-
103
- rl.on('close', finish); // handles broken pipe / EOF
198
+ rl.on('close', finish);
104
199
 
105
200
  rl.question(` Update skill${mismatches.length > 1 ? 's' : ''}? ${dim('(Y/n)')} `, (answer) => {
106
201
  clearTimeout(timer);
@@ -110,7 +205,8 @@ export async function promptSkillUpdate(mismatches) {
110
205
  for (const m of mismatches) {
111
206
  try {
112
207
  updateSkill(m.bundledPath, m.installPath);
113
- console.log(` ${green('✓')} ${dim(`Updated ${m.name} v${m.bundled}`)}`);
208
+ const agentLabel = m.agent ? ` (${m.agent})` : '';
209
+ console.log(` ${green('✓')} ${dim(`Updated ${m.name}${agentLabel} → v${m.bundled}`)}`);
114
210
  } catch (err) {
115
211
  console.log(` ${yellow('!')} ${dim(`Failed to update ${m.name}: ${err.message}`)}`);
116
212
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geminilight/mindos",
3
- "version": "0.6.41",
3
+ "version": "0.6.43",
4
4
  "description": "MindOS — Human-Agent Collaborative Mind System. Local-first knowledge base that syncs your mind to all AI Agents via MCP.",
5
5
  "keywords": [
6
6
  "mindos",
package/scripts/setup.js CHANGED
@@ -1314,10 +1314,38 @@ async function main() {
1314
1314
  console.log(c.dim(t('syncLater')));
1315
1315
  }
1316
1316
 
1317
+ // ── Register CLI globally if not already in PATH ────────────────────────────
1318
+ ensureCliInPath();
1319
+
1317
1320
  const installDaemon = startMode === 'daemon' || process.argv.includes('--install-daemon');
1318
1321
  finish(mindDir, config.startMode, config.mcpPort, config.authToken, installDaemon, needsRestart, resumeCfg.port ?? 3456);
1319
1322
  }
1320
1323
 
1324
+ function ensureCliInPath() {
1325
+ try {
1326
+ execSync('command -v mindos', { stdio: 'ignore' });
1327
+ return; // already in PATH (npm -g install or previous link)
1328
+ } catch { /* not found */ }
1329
+
1330
+ // Only auto-register for source/dev installations.
1331
+ // Desktop (Electron) manages its own process; npx is ephemeral.
1332
+ const isDesktop = !!(process.env.ELECTRON_RUN_AS_NODE || process.env.MINDOS_DESKTOP);
1333
+ const isDevInstall = existsSync(resolve(ROOT, '.git'));
1334
+ if (isDesktop || !isDevInstall) return;
1335
+
1336
+ write('\n');
1337
+ try {
1338
+ execSync('npm link', { cwd: ROOT, stdio: 'ignore' });
1339
+ write(c.green(uiLang === 'zh'
1340
+ ? ' ✔ mindos CLI 已注册到全局路径\n'
1341
+ : ' ✔ mindos CLI registered globally\n'));
1342
+ } catch {
1343
+ write(c.yellow(uiLang === 'zh'
1344
+ ? ' ⚠ 无法自动注册 CLI,请手动运行:npm link\n'
1345
+ : ' ⚠ Could not register CLI automatically. Run manually: npm link\n'));
1346
+ }
1347
+ }
1348
+
1321
1349
  function getLocalIP() {
1322
1350
  for (const ifaces of Object.values(networkInterfaces())) {
1323
1351
  for (const iface of ifaces) {