@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.
- package/_standalone/.mindos-build-version +1 -1
- package/_standalone/.next/BUILD_ID +1 -1
- package/_standalone/.next/app-path-routes-manifest.json +20 -19
- package/_standalone/.next/build-manifest.json +2 -2
- package/_standalone/.next/cache/.previewinfo +1 -1
- package/_standalone/.next/cache/.rscinfo +1 -1
- package/_standalone/.next/cache/config.json +3 -3
- package/_standalone/.next/prerender-manifest.json +3 -3
- package/_standalone/.next/routes-manifest.json +6 -0
- package/_standalone/.next/server/app/.well-known/agent-card.json/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/_global-error.html +2 -2
- package/_standalone/.next/server/app/_global-error.rsc +1 -1
- package/_standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/_standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/_standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/_standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/_standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/_standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/_standalone/.next/server/app/_not-found/page.js +1 -1
- package/_standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/agents/[agentKey]/page.js +1 -1
- package/_standalone/.next/server/app/agents/[agentKey]/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/agents/[agentKey]/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/agents/page.js +2 -2
- package/_standalone/.next/server/app/agents/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/agents/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/a2a/agents/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/a2a/delegations/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/a2a/discover/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/a2a/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/acp/config/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/acp/detect/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/acp/install/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/acp/registry/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/acp/session/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/agent-activity/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/ask/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/ask-sessions/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/auth/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/backlinks/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/bootstrap/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/changes/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/export/route.js +1 -1
- package/_standalone/.next/server/app/api/export/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/extract-pdf/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/file/import/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/file/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/files/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/git/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/graph/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/inbox/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/init/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/mcp/agents/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/mcp/install/route.js +1 -1
- package/_standalone/.next/server/app/api/mcp/install/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/mcp/install-skill/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/mcp/restart/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/mcp/status/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/mcp/uninstall/route.js +1 -0
- package/_standalone/.next/server/app/api/mcp/uninstall/route.js.nft.json +1 -0
- package/_standalone/.next/server/app/api/mcp/uninstall/route_client-reference-manifest.js +1 -0
- package/_standalone/.next/server/app/api/monitoring/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/recent-files/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/restart/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/search/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/settings/list-models/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/settings/reset-token/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/settings/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/settings/test-key/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/setup/check-path/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/setup/check-port/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/setup/generate-token/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/setup/ls/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/setup/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/skills/route.js +4 -4
- package/_standalone/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/sync/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/tree-version/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/uninstall/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/update-check/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/update-status/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/workflows/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/changes/page.js +1 -1
- package/_standalone/.next/server/app/changes/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/changes/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/echo/[segment]/page.js +1 -1
- package/_standalone/.next/server/app/echo/[segment]/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/echo/[segment]/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/echo/page.js +1 -1
- package/_standalone/.next/server/app/echo/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/echo/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/explore/page.js +1 -1
- package/_standalone/.next/server/app/explore/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/explore/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/help/page.js +1 -1
- package/_standalone/.next/server/app/help/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/help/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/login/page.js +1 -1
- package/_standalone/.next/server/app/login/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/page.js +1 -1
- package/_standalone/.next/server/app/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/setup/page.js +1 -1
- package/_standalone/.next/server/app/setup/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/trash/page.js +2 -2
- package/_standalone/.next/server/app/trash/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/view/[...path]/page.js +2 -2
- package/_standalone/.next/server/app/view/[...path]/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/view/[...path]/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app-paths-manifest.json +20 -19
- package/_standalone/.next/server/chunks/6539.js +1 -1
- package/_standalone/.next/server/chunks/{2536.js → 66.js} +2 -2
- package/_standalone/.next/server/chunks/9539.js +30 -30
- package/_standalone/.next/server/instrumentation.js +1 -1
- package/_standalone/.next/server/next-font-manifest.js +1 -1
- package/_standalone/.next/server/next-font-manifest.json +1 -1
- package/_standalone/.next/server/pages/500.html +2 -2
- package/_standalone/.next/server/server-reference-manifest.js +1 -1
- package/_standalone/.next/server/server-reference-manifest.json +1 -1
- package/_standalone/.next/static/chunks/{1053-b70535785cc5aaee.js → 1053-67f0ce444d1227e2.js} +2 -2
- package/_standalone/.next/static/chunks/app/.well-known/agent-card.json/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/_global-error/page-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/agents/page-eac6c5f6650dbf62.js +5 -0
- package/_standalone/.next/static/chunks/app/api/a2a/agents/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/a2a/delegations/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/a2a/discover/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/a2a/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/acp/config/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/acp/detect/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/acp/install/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/acp/registry/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/acp/session/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/agent-activity/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/ask/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/ask-sessions/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/auth/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/backlinks/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/bootstrap/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/changes/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/export/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/extract-pdf/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/file/import/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/file/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/files/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/git/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/graph/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/health/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/inbox/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/init/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/mcp/agents/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/mcp/install/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/mcp/install-skill/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/mcp/restart/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/mcp/status/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/mcp/uninstall/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/monitoring/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/recent-files/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/restart/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/search/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/settings/list-models/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/settings/reset-token/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/settings/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/settings/test-key/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/setup/check-path/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/setup/check-port/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/setup/generate-token/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/setup/ls/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/setup/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/skills/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/sync/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/tree-version/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/uninstall/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/update/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/update-check/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/update-status/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/api/workflows/route-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/echo/page-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/{layout-42cdbce19f404567.js → layout-67c50f39fffd6c36.js} +45 -45
- package/_standalone/.next/static/chunks/app/{page-8c9643b649e01735.js → page-ea1bff5e0ba77c16.js} +2 -2
- package/_standalone/.next/static/chunks/app/setup/{page-d158b8cb533feb1e.js → page-6132ea7632e08a9b.js} +1 -1
- package/_standalone/.next/static/chunks/app/trash/page-6ee0637660fb00e9.js +1 -0
- package/_standalone/.next/static/chunks/app/view/[...path]/loading-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/app/view/[...path]/page-182494955ef70870.js +12 -0
- package/_standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-84943536516b00b2.js +1 -0
- package/_standalone/.next/static/lpSyd-exxbKPK2GO1oNDZ/_buildManifest.js +1 -0
- package/_standalone/.next/trace +63 -63
- package/_standalone/.next/types/routes.d.ts +2 -1
- package/_standalone/.next/types/validator.ts +9 -0
- package/_standalone/components/agents/AgentsMcpSection.tsx +24 -5
- package/_standalone/components/setup/types.ts +1 -0
- package/_standalone/instrumentation.ts +21 -0
- package/_standalone/lib/i18n/modules/panels.ts +6 -2
- package/_standalone/tsconfig.tsbuildinfo +1 -1
- package/app/app/api/mcp/install/route.ts +13 -2
- package/app/app/api/mcp/uninstall/route.ts +130 -0
- package/app/app/api/skills/route.ts +14 -1
- package/app/components/agents/AgentsMcpSection.tsx +24 -5
- package/app/components/setup/index.tsx +4 -3
- package/app/components/setup/types.ts +1 -0
- package/app/instrumentation.ts +21 -0
- package/app/lib/i18n/modules/panels.ts +6 -2
- package/app/lib/settings.ts +32 -0
- package/bin/commands/start.js +10 -0
- package/bin/lib/skill-check.js +116 -20
- package/package.json +1 -1
- package/scripts/setup.js +28 -0
- package/skills/mindos/SKILL.md +5 -6
- package/skills/mindos-zh/SKILL.md +5 -4
- package/_standalone/.next/static/Ij3PFh-a0zi5K_ANoSAW0/_buildManifest.js +0 -1
- package/_standalone/.next/static/chunks/app/.well-known/agent-card.json/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/_global-error/page-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/agents/page-6102a884b2cb3cfe.js +0 -5
- package/_standalone/.next/static/chunks/app/api/a2a/agents/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/a2a/delegations/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/a2a/discover/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/a2a/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/acp/config/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/acp/detect/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/acp/install/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/acp/registry/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/acp/session/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/agent-activity/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/ask/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/ask-sessions/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/auth/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/backlinks/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/bootstrap/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/changes/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/export/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/extract-pdf/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/file/import/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/file/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/files/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/git/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/graph/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/health/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/inbox/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/init/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/mcp/agents/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/mcp/install/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/mcp/install-skill/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/mcp/restart/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/mcp/status/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/monitoring/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/recent-files/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/restart/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/search/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/settings/list-models/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/settings/reset-token/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/settings/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/settings/test-key/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/setup/check-path/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/setup/check-port/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/setup/generate-token/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/setup/ls/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/setup/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/skills/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/sync/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/tree-version/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/uninstall/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/update/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/update-check/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/update-status/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/api/workflows/route-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/echo/page-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/trash/page-e9ab74ffeb96af41.js +0 -1
- package/_standalone/.next/static/chunks/app/view/[...path]/loading-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/app/view/[...path]/page-764a69a1c8bd4eef.js +0 -12
- package/_standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-400c3c09b1540c14.js +0 -1
- package/_standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-400c3c09b1540c14.js +0 -1
- /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
|
-
|
|
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
|
|
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
|
-
|
|
227
|
+
const externalAgents = (data.agents as AgentEntry[]).filter(a => a.scope !== 'builtin');
|
|
228
|
+
setAgents(externalAgents);
|
|
228
229
|
setSelectedAgents(new Set(
|
|
229
|
-
|
|
230
|
+
externalAgents.filter(a => a.installed || a.present).map(a => a.key)
|
|
230
231
|
));
|
|
231
232
|
}
|
|
232
233
|
setAgentsLoaded(true);
|
package/app/instrumentation.ts
CHANGED
|
@@ -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}"?
|
|
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}"
|
|
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} 失败` : ''}。`,
|
package/app/lib/settings.ts
CHANGED
|
@@ -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. */
|
package/bin/commands/start.js
CHANGED
|
@@ -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 {
|
package/bin/lib/skill-check.js
CHANGED
|
@@ -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
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
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
|
-
|
|
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({
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
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) {
|