@geminilight/mindos 0.6.40 → 0.6.41
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 +18 -18
- package/_standalone/.next/build-manifest.json +3 -3
- 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/react-loadable-manifest.json +5 -1
- 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.js +1 -1
- package/_standalone/.next/server/app/api/ask/route.js.nft.json +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.js.nft.json +1 -1
- package/_standalone/.next/server/app/api/backlinks/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/bootstrap/route.js.nft.json +1 -1
- package/_standalone/.next/server/app/api/bootstrap/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/changes/route.js.nft.json +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.nft.json +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.js.nft.json +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.js.nft.json +1 -1
- package/_standalone/.next/server/app/api/file/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/files/route.js.nft.json +1 -1
- package/_standalone/.next/server/app/api/files/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/git/route.js.nft.json +1 -1
- package/_standalone/.next/server/app/api/git/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/graph/route.js.nft.json +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.js.nft.json +1 -1
- package/_standalone/.next/server/app/api/inbox/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/init/route.js.nft.json +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.js.nft.json +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.js.nft.json +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.js +1 -1
- package/_standalone/.next/server/app/api/mcp/status/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/monitoring/route.js.nft.json +1 -1
- package/_standalone/.next/server/app/api/monitoring/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/recent-files/route.js.nft.json +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.js.nft.json +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.js.nft.json +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_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.js.nft.json +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.js.nft.json +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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +3 -3
- package/_standalone/.next/server/app/trash/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/trash/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/view/[...path]/page.js +3 -3
- 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 +18 -18
- package/_standalone/.next/server/chunks/1550.js +1 -1
- package/_standalone/.next/server/chunks/2190.js +11 -0
- package/_standalone/.next/server/chunks/{6365.js → 2536.js} +2 -2
- package/_standalone/.next/server/chunks/5648.js +2 -0
- package/_standalone/.next/server/chunks/8388.js +1 -1
- package/_standalone/.next/server/chunks/953.js +1 -1
- package/_standalone/.next/server/chunks/9539.js +219 -0
- package/_standalone/.next/server/middleware-build-manifest.js +1 -1
- package/_standalone/.next/server/middleware-react-loadable-manifest.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 +29 -0
- package/_standalone/.next/static/chunks/{8663-de911d2d395622be.js → 1880-c2a9e76201841c86.js} +1 -1
- package/_standalone/.next/static/chunks/3637.0541ac2d0ea7de1f.js +1 -0
- package/_standalone/.next/static/chunks/4563-b2a2ce80aff845af.js +6 -0
- package/_standalone/.next/static/chunks/6981-3d7dcac2d12a5670.js +1 -0
- package/_standalone/.next/static/chunks/7144-5febf62f1a79fe64.js +1 -0
- package/_standalone/.next/static/chunks/app/agents/[agentKey]/page-773071a99c4daac2.js +1 -0
- package/_standalone/.next/static/chunks/app/agents/page-6102a884b2cb3cfe.js +5 -0
- package/_standalone/.next/static/chunks/app/help/page-2325d25b6846ca07.js +1 -0
- package/_standalone/.next/static/chunks/app/{layout-9378c1c8d3e5761b.js → layout-42cdbce19f404567.js} +34 -34
- package/_standalone/.next/static/chunks/app/{page-9bae420fbbdc5fff.js → page-8c9643b649e01735.js} +1 -1
- package/_standalone/.next/static/chunks/app/setup/page-d158b8cb533feb1e.js +1 -0
- package/_standalone/.next/static/chunks/app/trash/{page-b61ef2d5cd4f8d73.js → page-e9ab74ffeb96af41.js} +1 -1
- package/_standalone/.next/static/chunks/app/view/[...path]/page-764a69a1c8bd4eef.js +12 -0
- package/_standalone/.next/static/chunks/{webpack-c28c55d0a6021a6b.js → webpack-7b276daaa930d480.js} +1 -1
- package/_standalone/.next/static/css/bc9179074eaf65ae.css +1 -0
- package/_standalone/.next/trace +63 -63
- package/_standalone/__tests__/api/mcp-install.test.ts +23 -0
- package/_standalone/__tests__/cli/agent-routing.test.ts +232 -0
- package/_standalone/__tests__/cli/file-subcommands.test.ts +379 -0
- package/_standalone/__tests__/core/tools.test.ts +3 -6
- package/_standalone/components/FileTree.tsx +3 -2
- package/_standalone/components/MarkdownView.tsx +30 -15
- package/_standalone/components/RightAskPanel.tsx +36 -6
- package/_standalone/components/Sidebar.tsx +3 -3
- package/_standalone/components/agents/AgentsMcpSection.tsx +3 -0
- package/_standalone/components/settings/McpAgentInstall.tsx +94 -27
- package/_standalone/components/settings/McpSkillsSection.tsx +1 -1
- package/_standalone/components/settings/McpTab.tsx +484 -340
- package/_standalone/components/settings/SettingsContent.tsx +12 -6
- package/_standalone/components/settings/types.ts +3 -0
- package/_standalone/components/setup/StepAgents.tsx +113 -47
- package/_standalone/components/setup/StepReview.tsx +14 -27
- package/_standalone/components/setup/types.ts +6 -0
- package/_standalone/data/skills/mindos/SKILL.md +92 -92
- package/_standalone/data/skills/mindos/references/write-supplement.md +119 -0
- package/_standalone/data/skills/mindos-zh/SKILL.md +100 -104
- package/_standalone/data/skills/mindos-zh/references/write-supplement.md +119 -0
- package/_standalone/lib/i18n/modules/features.ts +4 -4
- package/_standalone/lib/i18n/modules/knowledge.ts +4 -0
- package/_standalone/lib/i18n/modules/onboarding.ts +40 -30
- package/_standalone/lib/i18n/modules/settings.ts +78 -6
- package/_standalone/lib/mcp-snippets.ts +5 -1
- package/_standalone/tsconfig.tsbuildinfo +1 -1
- package/app/app/api/ask/route.ts +3 -2
- package/app/app/api/mcp/install/route.ts +2 -1
- package/app/app/api/mcp/status/route.ts +14 -6
- package/app/app/view/[...path]/ViewPageClient.tsx +12 -27
- package/app/components/FileTree.tsx +3 -2
- package/app/components/MarkdownView.tsx +30 -15
- package/app/components/RightAskPanel.tsx +36 -6
- package/app/components/Sidebar.tsx +3 -3
- package/app/components/agents/AgentsMcpSection.tsx +3 -0
- package/app/components/help/HelpContent.tsx +1 -0
- package/app/components/settings/McpAgentInstall.tsx +94 -27
- package/app/components/settings/McpSkillsSection.tsx +1 -1
- package/app/components/settings/McpTab.tsx +484 -340
- package/app/components/settings/SettingsContent.tsx +12 -6
- package/app/components/settings/types.ts +3 -0
- package/app/components/setup/StepAgents.tsx +113 -47
- package/app/components/setup/StepReview.tsx +14 -27
- package/app/components/setup/index.tsx +12 -11
- package/app/components/setup/types.ts +6 -0
- package/app/data/skills/mindos/SKILL.md +92 -92
- package/app/data/skills/mindos/references/write-supplement.md +119 -0
- package/app/data/skills/mindos-zh/SKILL.md +100 -104
- package/app/data/skills/mindos-zh/references/write-supplement.md +119 -0
- package/app/lib/fs.ts +0 -6
- package/app/lib/i18n/modules/features.ts +4 -4
- package/app/lib/i18n/modules/knowledge.ts +4 -0
- package/app/lib/i18n/modules/onboarding.ts +40 -30
- package/app/lib/i18n/modules/settings.ts +78 -6
- package/app/lib/mcp-agents.ts +1 -2
- package/app/lib/mcp-snippets.ts +5 -1
- package/app/lib/renderers/index.ts +2 -1
- package/bin/cli.js +168 -1404
- package/bin/commands/agent.js +156 -20
- package/bin/commands/api.js +14 -11
- package/bin/commands/ask.js +79 -68
- package/bin/commands/build.js +26 -0
- package/bin/commands/config.js +170 -0
- package/bin/commands/dev.js +58 -0
- package/bin/commands/doctor.js +205 -0
- package/bin/commands/file.js +551 -36
- package/bin/commands/gateway.js +42 -0
- package/bin/commands/init-skills.js +56 -0
- package/bin/commands/logs.js +32 -0
- package/bin/commands/mcp-cmd.js +57 -0
- package/bin/commands/onboard.js +25 -0
- package/bin/commands/open.js +41 -0
- package/bin/commands/restart.js +48 -0
- package/bin/commands/search.js +16 -14
- package/bin/commands/space.js +96 -25
- package/bin/commands/start.js +262 -0
- package/bin/commands/status.js +2 -2
- package/bin/commands/stop.js +14 -0
- package/bin/commands/sync-cmd.js +134 -0
- package/bin/commands/token.js +98 -0
- package/bin/commands/uninstall.js +154 -0
- package/bin/commands/update.js +286 -0
- package/bin/lib/build.js +1 -1
- package/bin/lib/colors.js +8 -7
- package/bin/lib/command.js +37 -96
- package/bin/lib/config.js +5 -0
- package/bin/lib/csv.js +19 -0
- package/bin/lib/jsonc.js +12 -0
- package/bin/lib/markdown.js +69 -0
- package/bin/lib/mcp-agents.js +1 -6
- package/bin/lib/mcp-build.js +1 -1
- package/bin/lib/mcp-install.js +2 -1
- package/bin/lib/one-shot.js +88 -0
- package/bin/lib/path-expand.js +9 -0
- package/bin/lib/remote.js +65 -0
- package/bin/lib/repl.js +167 -0
- package/bin/lib/{utils.js → shell.js} +10 -26
- package/bin/lib/skill-check.js +1 -1
- package/bin/lib/sse-stream.js +167 -0
- package/package.json +2 -2
- package/scripts/setup.js +182 -120
- package/skills/mindos/SKILL.md +92 -92
- package/skills/mindos-zh/SKILL.md +100 -104
- package/_standalone/.next/server/chunks/1955.js +0 -11
- package/_standalone/.next/server/chunks/3680.js +0 -1
- package/_standalone/.next/server/chunks/4497.js +0 -219
- package/_standalone/.next/server/chunks/5560.js +0 -2
- package/_standalone/.next/static/chunks/1053-0adaccc98a752a58.js +0 -29
- package/_standalone/.next/static/chunks/3637.f9a42cca59fd5bb5.js +0 -1
- package/_standalone/.next/static/chunks/4563-c2afaeacb241d1d0.js +0 -6
- package/_standalone/.next/static/chunks/6090-c98268ca726a68d3.js +0 -1
- package/_standalone/.next/static/chunks/9371-575600301da5d6bb.js +0 -1
- package/_standalone/.next/static/chunks/app/agents/[agentKey]/page-3e08abb495ecd5fd.js +0 -1
- package/_standalone/.next/static/chunks/app/agents/page-e7e0f87ad3d765ac.js +0 -5
- package/_standalone/.next/static/chunks/app/help/page-3d0e1ceaa4abc243.js +0 -1
- package/_standalone/.next/static/chunks/app/setup/page-99ed3d1bb6b8f4ef.js +0 -1
- package/_standalone/.next/static/chunks/app/view/[...path]/page-44fa78cbea613a78.js +0 -12
- package/_standalone/.next/static/css/d300701f384db50d.css +0 -1
- package/_standalone/components/renderers/agent-inspector/manifest.ts +0 -16
- /package/_standalone/.next/static/{rZLs1krFuduixvcVNe6q3 → Ij3PFh-a0zi5K_ANoSAW0}/_buildManifest.js +0 -0
- /package/_standalone/.next/static/{rZLs1krFuduixvcVNe6q3 → Ij3PFh-a0zi5K_ANoSAW0}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# MindOS 写入与工作流补充
|
|
2
|
+
|
|
3
|
+
<!-- 随 SKILL.md 一起由 route.ts 注入到每次请求的上下文中。 -->
|
|
4
|
+
<!-- 只读查阅、问答、总结时此上下文同样可用。 -->
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 绝对不要(写路径专属)
|
|
9
|
+
|
|
10
|
+
- **绝不把 `mindos_write_file` 当第一步。** 没读过当前内容就覆写 = 在黑暗中操作。哪怕你"应该知道"文件里有什么,也先读——你的假设可能已过时。
|
|
11
|
+
- **绝不用 `mindos_create_file` 创建心智空间。** 这只会建一个普通目录,缺少 README + INSTRUCTION 脚手架。缺少治理文件的空间从诞生起就是残缺的。必须用 `mindos_create_space`。
|
|
12
|
+
- **绝不 bootstrap 后直接写入。** Bootstrap 告诉你顶层结构,不代表目标路径附近的局部 `INSTRUCTION.md` 没有覆盖全局规则。写入前必须读目标路径附近的治理文件。
|
|
13
|
+
- **绝不在没有展示路由表的情况下执行多文件写入。** 即使目标看起来显而易见——用户的心智模型和你的判断不一致的概率远高于你的直觉。展示路由表,等确认。
|
|
14
|
+
- **绝不把 `mindos_append_to_file` 用于有结构要求的文件。** 盲目追加会忽略章节顺序。如果文件有标题层级、必填字段或 schema 约束,用 `insert_after_heading` 或 `update_section` 把内容落在正确位置。
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 写入工具选型
|
|
19
|
+
|
|
20
|
+
| 意图 | 推荐工具 | 避免 |
|
|
21
|
+
|------|----------|------|
|
|
22
|
+
| 小范围文字修改 | `mindos_update_section` / `mindos_update_lines` / `mindos_insert_after_heading` | 小修改用 `mindos_write_file` |
|
|
23
|
+
| 追加到末尾 | `mindos_append_to_file` | 为了加一行重写整文件 |
|
|
24
|
+
| 整文件替换 | `mindos_write_file` | 用它做章节级编辑 |
|
|
25
|
+
| 新建文件 | `mindos_create_file` | 自动创建父目录,但不会生成空间脚手架文件 |
|
|
26
|
+
| 新建心智空间(目录 + README + INSTRUCTION)| `mindos_create_space` | 创建空间的唯一方式。`create_file` 只创建普通目录 |
|
|
27
|
+
| 重命名空间目录 | `mindos_rename_space` | `rename_file`(仅文件,不能重命名文件夹)|
|
|
28
|
+
| 追加 CSV | `mindos_append_csv`(校验表头)| 手动拼字符串不校验 |
|
|
29
|
+
| 重命名前查影响 | `mindos_get_backlinks` | 不查引用就重命名 |
|
|
30
|
+
| 查看近期变动 | `mindos_get_recent` | 猜最近改了什么 |
|
|
31
|
+
| 恢复历史版本 | `mindos_get_file_at_version` | 让用户回忆之前内容 |
|
|
32
|
+
|
|
33
|
+
**回退:** 行级/章节级工具不可用 → 读 + 受限 `mindos_write_file`(模拟最小修改)。
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## 启动协议
|
|
38
|
+
|
|
39
|
+
所有写入任务执行前运行:
|
|
40
|
+
|
|
41
|
+
1. **Bootstrap** — `mindos_bootstrap`(首选),或手动读根 `INSTRUCTION.md` + `README.md`。
|
|
42
|
+
2. **发现结构**
|
|
43
|
+
- 只需确认顶层分区 → `mindos_list_spaces`(更轻量,含 README 摘要)
|
|
44
|
+
- 需要找具体文件路径 → 先用 `mindos_list_spaces` 确认目标分区,再在该分区下 `mindos_list_files`
|
|
45
|
+
- 已知关键词 → 并行 2-4 条 `mindos_search_notes`,覆盖中英文和缩写变体
|
|
46
|
+
- **绝不假设顶层目录名**——用户可能用中文、拼音或自定义层级
|
|
47
|
+
3. **加载局部治理** — 读取目标路径附近的 `README.md` / `INSTRUCTION.md`。局部约定覆盖全局假设。
|
|
48
|
+
4. **匹配已有 SOP** — 任务偏流程时:从树中识别存放流程的目录(`Workflows/`、`SOPs/`、`流程/` 等仅为常见名,不假设一定存在)。用关键词 + `<!-- keywords: -->` 元数据搜索。找到则读取并执行;偏差则任务后提议更新。
|
|
49
|
+
5. **写前检查** — 确认:路径存在或应创建;位置在子目录下(非根);现有内容已读;修改范围最小;路径变更的反链影响已评估。
|
|
50
|
+
6. **执行编辑。**
|
|
51
|
+
|
|
52
|
+
上下文缺失时,按最佳努力继续并明确写出假设。
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## 执行模式
|
|
57
|
+
|
|
58
|
+
| 模式 | 适用场景 | 关键步骤 |
|
|
59
|
+
|------|----------|----------|
|
|
60
|
+
| **单文件编辑** | 目标文件明确 | 启动协议 → 读目标 + 局部约定 → 最小修改 → 验证 → 总结 |
|
|
61
|
+
| **多文件路由** | 非结构化输入,多个目的地 | 解析为语义单元 → 路由表 → 确认 → 编辑 → 汇总 |
|
|
62
|
+
| **对话复盘** | 提炼 / 沉淀会话 | 确认范围 → 抽取决策/踩坑/下一步 → 路由 → 记录变更 |
|
|
63
|
+
| **SOP 执行** | 可重复流程 | 完整读 SOP → 分步执行 → 更新过时段落 → 偏差则提议更新 |
|
|
64
|
+
| **结构变更** | 重命名 / 移动 / 删除 | `get_backlinks` → 影响报告 → 确认 → 执行 → 更新引用 → 同步 README |
|
|
65
|
+
| **CSV 追加** | 追加表格行 | 读表头 → 校验字段 → `mindos_append_csv` |
|
|
66
|
+
| **跨 Agent 接力** | 继续其他 Agent 的工作 | 读任务状态+决策 → 无需重新探索直接接续 → 回写进度 |
|
|
67
|
+
| **周期性回顾** | 汇总近期变动 | `get_recent`/`get_history` → 读变动文件 → 结构化总结 |
|
|
68
|
+
| **交接文档** | 创建简报 | 读来源 → 合成(背景、决策、状态、待办)→ 放项目目录 |
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## 详细执行步骤
|
|
73
|
+
|
|
74
|
+
### 单文件编辑
|
|
75
|
+
搜索 → 读目标文件 + 读 1-2 个同目录文件了解本地约定 → 应用最小修改(优先 `update_section` / `update_lines` / `insert_after_heading`,避免整文件覆写)→ 验证标题/风格匹配 → 总结改了什么。
|
|
76
|
+
|
|
77
|
+
### 多文件路由
|
|
78
|
+
将非结构化输入拆解为离散语义单元 → 每个单元并行搜索 2-4 个关键词变体找最合适文件 → **展示路由表**(内容片段 → 目标文件 → 插入位置)→ 等用户确认 → 逐文件执行编辑 → 用文件路径汇总全部变更。
|
|
79
|
+
|
|
80
|
+
### 对话复盘
|
|
81
|
+
确认范围(哪次会话?哪些主题?)→ 抽取:已做决策、决策理由、遇到的坑、下一步行动 → 为每个产物通过搜索找最合适的现有文件 → 各归其位 → 每个改动文件追加一行变更说明。
|
|
82
|
+
|
|
83
|
+
### SOP 执行
|
|
84
|
+
开始前完整读 SOP(不要略读)→ 逐步执行,完成一步确认一步 → 遇到过时或与当前 KB 状态不符的步骤,记录下来 → 完成后,针对偏差步骤提议定向 SOP 更新。
|
|
85
|
+
**创建新 SOP** → 先读 [references/sop-template.md](./references/sop-template.md) 了解必需结构。
|
|
86
|
+
|
|
87
|
+
### 结构变更
|
|
88
|
+
对要变更的路径执行 `get_backlinks` → 展示影响报告(N 个文件需要更新)→ 等确认 → 执行重命名/移动/删除 → 更新每一条反链 → 同步受影响的 `README.md`。
|
|
89
|
+
|
|
90
|
+
### 交接 / 跨 Agent 接力
|
|
91
|
+
读交接文档或上一个 Agent 的进度记录 → 识别:当前状态、已做决策、待处理事项 → 从该状态直接接续,不重复已完成的探索 → 完成后将进度回写到同一份交接文档。
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## 任务后 Hooks
|
|
96
|
+
|
|
97
|
+
**写入任务**完成后(简单单文件修改或只读查阅跳过),扫描下表。命中则发起一句话提议,最多 1 条,选优先级最高项。先查 `.mindos/user-preferences.md` 的抑制区;用户要求安静模式时全部跳过。
|
|
98
|
+
|
|
99
|
+
| Hook | 优先级 | 触发条件 |
|
|
100
|
+
|------|--------|---------|
|
|
101
|
+
| 经验沉淀 | 高 | 调试、排错、踩坑,或多轮才解决 |
|
|
102
|
+
| 一致性同步 | 高 | 编辑了有反链的文件(查 `get_backlinks`) |
|
|
103
|
+
| SOP 偏差 | 中 | 按 SOP 执行但实际步骤与文档不符 |
|
|
104
|
+
| 联动更新 | 中 | 改了 CSV/TODO 状态且存在关联文档 |
|
|
105
|
+
| 结构归类 | 中 | 在临时目录或收件箱新建了文件 |
|
|
106
|
+
| 模式提炼 | 低 | 本会话 3+ 次结构相似操作 |
|
|
107
|
+
| 对话复盘 | 低 | 会话 >10 轮且涉及决策或权衡 |
|
|
108
|
+
|
|
109
|
+
有 hook 命中 → 读 [references/post-task-hooks.md](./references/post-task-hooks.md) 获取提议措辞和用户自定义 hooks。都不命中则安静结束,不读此文件。
|
|
110
|
+
|
|
111
|
+
## 偏好捕获
|
|
112
|
+
|
|
113
|
+
用户表达要长期记住的偏好(「以后不要…」「这个该放在…」)时,读 [references/preference-capture.md](./references/preference-capture.md) 并按确认后写入流程存入 `.mindos/user-preferences.md`。
|
|
114
|
+
**不要读** preference-capture 除非用户真的表达了要持久化的偏好。
|
|
115
|
+
|
|
116
|
+
## SOP 编写
|
|
117
|
+
|
|
118
|
+
创建或改写工作流 SOP 时,**必须 — 读 [references/sop-template.md](./references/sop-template.md)**(前置条件、分支步骤、退出条件、踩坑记录)。
|
|
119
|
+
**不要读** sop-template 用于 SOP 执行(仅用于 SOP 创建/编辑)。
|
package/app/lib/fs.ts
CHANGED
|
@@ -284,9 +284,6 @@ function buildFileTree(dirPath: string, rootOverride?: string): FileNode[] {
|
|
|
284
284
|
nodes.push(node);
|
|
285
285
|
}
|
|
286
286
|
} else if (entry.isFile()) {
|
|
287
|
-
// Filter out system files at root level
|
|
288
|
-
if (dirPath === root && SYSTEM_FILES.has(entry.name)) continue;
|
|
289
|
-
|
|
290
287
|
const ext = path.extname(entry.name).toLowerCase();
|
|
291
288
|
if (ALLOWED_EXTENSIONS.has(ext)) {
|
|
292
289
|
nodes.push({ name: entry.name, path: relativePath, type: 'file', extension: ext });
|
|
@@ -323,9 +320,6 @@ function buildAllFiles(dirPath: string): string[] {
|
|
|
323
320
|
if (IGNORED_DIRS.has(entry.name)) continue;
|
|
324
321
|
files.push(...buildAllFiles(fullPath));
|
|
325
322
|
} else if (entry.isFile()) {
|
|
326
|
-
// Filter out system files at root level
|
|
327
|
-
if (dirPath === root && SYSTEM_FILES.has(entry.name)) continue;
|
|
328
|
-
|
|
329
323
|
const ext = path.extname(entry.name).toLowerCase();
|
|
330
324
|
if (ALLOWED_EXTENSIONS.has(ext)) {
|
|
331
325
|
files.push(path.relative(root, fullPath));
|
|
@@ -24,7 +24,7 @@ export const featuresEn = {
|
|
|
24
24
|
step2Title: 'Chat with AI',
|
|
25
25
|
step2Desc: 'Press ⌘/ (or Ctrl/) to open the AI panel. Ask anything about your knowledge base, or use @ to attach a specific file for context.',
|
|
26
26
|
step3Title: 'Connect your AI agents',
|
|
27
|
-
step3Desc: 'Go to Settings →
|
|
27
|
+
step3Desc: 'Go to Settings → Connections to connect external agents like Claude Code, Cursor, or Windsurf. Once connected, they can read and write your knowledge base directly.',
|
|
28
28
|
},
|
|
29
29
|
concepts: {
|
|
30
30
|
title: 'Core Concepts',
|
|
@@ -63,7 +63,7 @@ export const featuresEn = {
|
|
|
63
63
|
title: 'FAQ',
|
|
64
64
|
items: [
|
|
65
65
|
{ q: 'How do I change the language?', a: 'Go to Settings → Appearance → Language. You can switch between English and Chinese.' },
|
|
66
|
-
{ q: 'How do I connect an AI agent?', a: 'Go to Settings →
|
|
66
|
+
{ q: 'How do I connect an AI agent?', a: 'Go to Settings → Connections. MindOS auto-detects installed agents (Claude Code, Cursor, etc.) and lets you connect them with one click.' },
|
|
67
67
|
{ q: 'Where is my data stored?', a: 'All your data stays on your local machine as plain Markdown files. MindOS never uploads your data to any cloud service. You own everything.' },
|
|
68
68
|
{ q: 'How do I sync across devices?', a: 'Go to Settings → Sync. MindOS uses Git for cross-device sync. Enter your Git remote URL and access token to start syncing.' },
|
|
69
69
|
{ q: 'Can I use my own AI provider?', a: 'Yes! Go to Settings → AI. You can use OpenAI, Anthropic, Google, or any OpenAI-compatible API with a custom base URL.' },
|
|
@@ -100,7 +100,7 @@ export const featuresZh = {
|
|
|
100
100
|
step2Title: '和 AI 对话',
|
|
101
101
|
step2Desc: '按 ⌘/(或 Ctrl/)打开 AI 面板。询问任何关于知识库的问题,或使用 @ 附加特定文件作为上下文。',
|
|
102
102
|
step3Title: '连接你的 AI Agent',
|
|
103
|
-
step3Desc: '前往 设置 →
|
|
103
|
+
step3Desc: '前往 设置 → 连接 以连接外部 Agent,如 Claude Code、Cursor 或 Windsurf。连接后,它们可以直接读写你的知识库。',
|
|
104
104
|
},
|
|
105
105
|
concepts: {
|
|
106
106
|
title: '核心概念',
|
|
@@ -139,7 +139,7 @@ export const featuresZh = {
|
|
|
139
139
|
title: '常见问题',
|
|
140
140
|
items: [
|
|
141
141
|
{ q: '如何切换语言?', a: '前往 设置 → 外观 → 语言。支持中文和英文切换。' },
|
|
142
|
-
{ q: '如何连接 AI Agent?', a: '前往 设置 →
|
|
142
|
+
{ q: '如何连接 AI Agent?', a: '前往 设置 → 连接。MindOS 会自动检测已安装的 Agent(Claude Code、Cursor 等),一键即可连接。' },
|
|
143
143
|
{ q: '我的数据存储在哪里?', a: '所有数据以纯 Markdown 文件的形式存储在你的本地机器上。MindOS 不会将你的数据上传到任何云服务。数据完全由你掌控。' },
|
|
144
144
|
{ q: '如何跨设备同步?', a: '前往 设置 → 同步。MindOS 使用 Git 进行跨设备同步。输入 Git 远程仓库 URL 和访问令牌即可开始同步。' },
|
|
145
145
|
{ q: '可以使用自己的 AI 服务商吗?', a: '可以!前往 设置 → AI。支持 OpenAI、Anthropic、Google,或任何 OpenAI 兼容的 API(自定义 Base URL)。' },
|
|
@@ -349,6 +349,8 @@ export const knowledgeEn = {
|
|
|
349
349
|
tocCollapse: 'Collapse',
|
|
350
350
|
tocExpand: 'Expand',
|
|
351
351
|
emptyNote: 'This note is empty. Press E to start writing.',
|
|
352
|
+
switchToDoc: 'Document view',
|
|
353
|
+
switchToGraph: 'Wiki Graph',
|
|
352
354
|
},
|
|
353
355
|
findInPage: {
|
|
354
356
|
placeholder: 'Find in document…',
|
|
@@ -706,6 +708,8 @@ export const knowledgeZh = {
|
|
|
706
708
|
tocCollapse: '收起',
|
|
707
709
|
tocExpand: '展开',
|
|
708
710
|
emptyNote: '此笔记为空。按 E 开始编辑。',
|
|
711
|
+
switchToDoc: '文档视图',
|
|
712
|
+
switchToGraph: '知识图谱',
|
|
709
713
|
},
|
|
710
714
|
findInPage: {
|
|
711
715
|
placeholder: '在文档中查找…',
|
|
@@ -15,7 +15,7 @@ export const onboardingEn = {
|
|
|
15
15
|
dismiss: 'Dismiss',
|
|
16
16
|
},
|
|
17
17
|
setup: {
|
|
18
|
-
stepTitles: ['Knowledge Base', 'AI Configuration', 'Agent
|
|
18
|
+
stepTitles: ['Knowledge Base', 'AI Configuration', 'Agent Connection', 'Confirm'],
|
|
19
19
|
// Step 1
|
|
20
20
|
kbPath: 'Knowledge base path',
|
|
21
21
|
kbPathHint: 'Absolute path to your notes directory.',
|
|
@@ -60,17 +60,22 @@ export const onboardingEn = {
|
|
|
60
60
|
webPasswordHint: 'Protect your knowledge base from unauthorized browser access.',
|
|
61
61
|
webPasswordRequired: 'Password is required to protect your data.',
|
|
62
62
|
advancedPorts: 'Advanced Settings',
|
|
63
|
-
tokenSectionTitle: '
|
|
63
|
+
tokenSectionTitle: 'Auth Token (auto-generated)',
|
|
64
64
|
tokenSectionHint: 'Used by AI agents to connect to your MindOS server.',
|
|
65
|
-
// Step 5 — Agent
|
|
66
|
-
agentToolsTitle: 'Agent
|
|
67
|
-
|
|
65
|
+
// Step 5 — Agent Connection
|
|
66
|
+
agentToolsTitle: 'Agent Connection',
|
|
67
|
+
connectionModeTitle: 'Connection Mode',
|
|
68
|
+
connectionModeCliHint: 'Recommended · Lower token usage',
|
|
69
|
+
connectionModeMcpHint: 'Optional · Higher token usage',
|
|
70
|
+
agentToolsHint: 'Select which AI agents to configure. This step is optional.',
|
|
71
|
+
agentToolsHintCliOnly: 'Agent selection applies when MCP mode is enabled. CLI works with all agents that have bash access.',
|
|
72
|
+
agentToolsHintNone: 'No connection mode selected. Select at least one mode to connect agents.',
|
|
68
73
|
agentTransport: 'Transport',
|
|
69
74
|
agentScope: 'Scope',
|
|
70
75
|
agentToolsLoading: 'Loading agents…',
|
|
71
76
|
agentToolsEmpty: 'No supported agents detected.',
|
|
72
|
-
agentNoneSelected: 'No agents selected
|
|
73
|
-
agentSkipLater: '
|
|
77
|
+
agentNoneSelected: 'No agents selected. You can configure agents later in Settings.',
|
|
78
|
+
agentSkipLater: 'Clear all',
|
|
74
79
|
agentSelectDetected: 'Select detected agents',
|
|
75
80
|
agentNoneDetected: 'No agents detected on your system.',
|
|
76
81
|
agentShowMore: (n: number) => `Show ${n} more agents`,
|
|
@@ -91,9 +96,9 @@ export const onboardingEn = {
|
|
|
91
96
|
agentVerified: 'verified',
|
|
92
97
|
agentUnverified: 'unverified',
|
|
93
98
|
agentVerifyNote: 'stdio agents are verified after restart',
|
|
94
|
-
// Skill
|
|
95
|
-
skillWhat: '
|
|
96
|
-
skillAutoHint: (
|
|
99
|
+
// Skill (kept for type compat — UI section removed in v0.7)
|
|
100
|
+
skillWhat: '',
|
|
101
|
+
skillAutoHint: () => '',
|
|
97
102
|
skillLabel: 'Skill',
|
|
98
103
|
skillInstalling: 'Installing skill…',
|
|
99
104
|
skillInstalled: 'Skill installed',
|
|
@@ -111,7 +116,7 @@ export const onboardingEn = {
|
|
|
111
116
|
retryAgent: 'Retry',
|
|
112
117
|
agentFailedCount: (n: number) => `${n} agent${n > 1 ? 's' : ''} failed`,
|
|
113
118
|
agentCountSummary: (n: number) => `${n} agent${n > 1 ? 's' : ''}`,
|
|
114
|
-
agentFailureNote: 'Agent failures are non-blocking — you can enter MindOS and retry from Settings →
|
|
119
|
+
agentFailureNote: 'Agent failures are non-blocking — you can enter MindOS and retry from Settings → Connections.',
|
|
115
120
|
portAvailable: 'Available',
|
|
116
121
|
portChanged: 'Port changed — please restart the server for it to take effect.',
|
|
117
122
|
restartRequired: 'Server restart required for these changes to take effect.',
|
|
@@ -134,14 +139,14 @@ export const onboardingEn = {
|
|
|
134
139
|
healthAi: 'AI Provider',
|
|
135
140
|
healthAiNone: 'Not configured — AI features disabled',
|
|
136
141
|
healthAiAction: 'Add an API key in Settings → AI.',
|
|
137
|
-
healthAgents: 'Agent
|
|
142
|
+
healthAgents: 'Agent Connection',
|
|
138
143
|
healthAgentsOk: (n: number) => `${n} agent${n > 1 ? 's' : ''} configured`,
|
|
139
144
|
healthAgentsPartial: 'Configuration in progress...',
|
|
140
145
|
healthAgentsNone: 'No agents configured',
|
|
141
|
-
healthAgentsAction: 'You can add agents later in Settings →
|
|
142
|
-
healthTokenTitle: '
|
|
146
|
+
healthAgentsAction: 'You can add agents later in Settings → Connections.',
|
|
147
|
+
healthTokenTitle: 'Auth Token',
|
|
143
148
|
healthTokenCopy: 'Copy token',
|
|
144
|
-
healthTokenHint: '
|
|
149
|
+
healthTokenHint: 'Used by CLI remote mode and MCP connections. Also available in Settings → Connections.',
|
|
145
150
|
healthGoHome: 'Go to MindOS',
|
|
146
151
|
// Welcome banner (shown after first onboard)
|
|
147
152
|
welcomeTitle: 'Welcome to MindOS!',
|
|
@@ -229,7 +234,7 @@ export const onboardingZh = {
|
|
|
229
234
|
dismiss: '关闭',
|
|
230
235
|
},
|
|
231
236
|
setup: {
|
|
232
|
-
stepTitles: ['知识库', 'AI 配置', 'Agent
|
|
237
|
+
stepTitles: ['知识库', 'AI 配置', 'Agent 连接', '确认'],
|
|
233
238
|
// Step 1
|
|
234
239
|
kbPath: '知识库路径',
|
|
235
240
|
kbPathHint: '笔记目录的绝对路径。',
|
|
@@ -274,17 +279,22 @@ export const onboardingZh = {
|
|
|
274
279
|
webPasswordHint: '保护你的知识库,防止未授权的浏览器访问。',
|
|
275
280
|
webPasswordRequired: '密码是必填项,用于保护你的数据。',
|
|
276
281
|
advancedPorts: '高级设置',
|
|
277
|
-
tokenSectionTitle: '
|
|
282
|
+
tokenSectionTitle: '认证令牌(已自动生成)',
|
|
278
283
|
tokenSectionHint: 'AI Agent 连接你的 MindOS 服务器时使用。',
|
|
279
|
-
// Step 5 — Agent
|
|
280
|
-
agentToolsTitle: 'Agent
|
|
281
|
-
|
|
284
|
+
// Step 5 — Agent Connection
|
|
285
|
+
agentToolsTitle: 'Agent 连接',
|
|
286
|
+
connectionModeTitle: '连接模式',
|
|
287
|
+
connectionModeCliHint: '推荐 · 更省 token',
|
|
288
|
+
connectionModeMcpHint: '可选 · 消耗更多 token',
|
|
289
|
+
agentToolsHint: '选择要配置的 AI Agent。此步骤可选。',
|
|
290
|
+
agentToolsHintCliOnly: 'Agent 选择在 MCP 模式启用时生效。CLI 可直接用于所有支持 bash 的 Agent。',
|
|
291
|
+
agentToolsHintNone: '未选择连接模式。请至少选择一种模式以连接 Agent。',
|
|
282
292
|
agentTransport: '传输方式',
|
|
283
293
|
agentScope: '范围',
|
|
284
294
|
agentToolsLoading: '正在加载 Agent…',
|
|
285
295
|
agentToolsEmpty: '未检测到受支持的 Agent。',
|
|
286
|
-
agentNoneSelected: '未选择
|
|
287
|
-
agentSkipLater: '
|
|
296
|
+
agentNoneSelected: '未选择 Agent。可稍后在设置中配置。',
|
|
297
|
+
agentSkipLater: '清除选择',
|
|
288
298
|
agentSelectDetected: '选择已检测到的 Agent',
|
|
289
299
|
agentNoneDetected: '未在系统中检测到已安装的 Agent。',
|
|
290
300
|
agentShowMore: (n: number) => `显示另外 ${n} 个 Agent`,
|
|
@@ -305,9 +315,9 @@ export const onboardingZh = {
|
|
|
305
315
|
agentVerified: '已验证',
|
|
306
316
|
agentUnverified: '未验证',
|
|
307
317
|
agentVerifyNote: 'stdio agent 需重启后验证',
|
|
308
|
-
// Skill
|
|
309
|
-
skillWhat: '
|
|
310
|
-
skillAutoHint: (
|
|
318
|
+
// Skill (kept for type compat — UI section removed in v0.7)
|
|
319
|
+
skillWhat: '',
|
|
320
|
+
skillAutoHint: () => '',
|
|
311
321
|
skillLabel: '技能',
|
|
312
322
|
skillInstalling: '正在安装技能…',
|
|
313
323
|
skillInstalled: '技能已安装',
|
|
@@ -325,7 +335,7 @@ export const onboardingZh = {
|
|
|
325
335
|
retryAgent: '重试',
|
|
326
336
|
agentFailedCount: (n: number) => `${n} 个 Agent 配置失败`,
|
|
327
337
|
agentCountSummary: (n: number) => `${n} 个 Agent`,
|
|
328
|
-
agentFailureNote: 'Agent 安装失败不影响进入 MindOS — 可稍后在 设置 →
|
|
338
|
+
agentFailureNote: 'Agent 安装失败不影响进入 MindOS — 可稍后在 设置 → 连接 中重试。',
|
|
329
339
|
portAvailable: '可用',
|
|
330
340
|
portChanged: '端口已变更 — 请重启服务以使其生效。',
|
|
331
341
|
restartRequired: '以下变更需要重启服务后生效。',
|
|
@@ -348,14 +358,14 @@ export const onboardingZh = {
|
|
|
348
358
|
healthAi: 'AI 服务',
|
|
349
359
|
healthAiNone: '未配置 — AI 功能不可用',
|
|
350
360
|
healthAiAction: '可在 设置 → AI 中添加 API 密钥。',
|
|
351
|
-
healthAgents: 'Agent
|
|
361
|
+
healthAgents: 'Agent 连接',
|
|
352
362
|
healthAgentsOk: (n: number) => `已配置 ${n} 个 Agent`,
|
|
353
363
|
healthAgentsPartial: '正在配置中...',
|
|
354
364
|
healthAgentsNone: '未配置 Agent',
|
|
355
|
-
healthAgentsAction: '可稍后在 设置 →
|
|
356
|
-
healthTokenTitle: '
|
|
365
|
+
healthAgentsAction: '可稍后在 设置 → 连接 中添加。',
|
|
366
|
+
healthTokenTitle: '认证令牌',
|
|
357
367
|
healthTokenCopy: '复制令牌',
|
|
358
|
-
healthTokenHint: '
|
|
368
|
+
healthTokenHint: 'CLI 远程模式和 MCP 连接时使用。也可在 设置 → 连接 中找到。',
|
|
359
369
|
healthGoHome: '进入 MindOS',
|
|
360
370
|
// Welcome banner
|
|
361
371
|
welcomeTitle: '欢迎使用 MindOS!',
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
export const settingsEn = {
|
|
4
4
|
settings: {
|
|
5
5
|
title: 'Settings',
|
|
6
|
-
tabs: { ai: 'AI', appearance: 'Appearance', knowledge: 'General', sync: 'Sync', mcp: '
|
|
6
|
+
tabs: { ai: 'AI', appearance: 'Appearance', knowledge: 'General', sync: 'Sync', mcp: 'Connections', plugins: 'Plugins', shortcuts: 'Shortcuts', monitoring: 'Monitoring', agents: 'Agents', update: 'Update', uninstall: 'Uninstall' },
|
|
7
7
|
ai: {
|
|
8
8
|
provider: 'Provider',
|
|
9
9
|
model: 'Model',
|
|
@@ -226,6 +226,7 @@ export const settingsEn = {
|
|
|
226
226
|
portLabel: 'MCP Port',
|
|
227
227
|
portHint: 'Changes require server restart',
|
|
228
228
|
skillsTitle: 'Skills',
|
|
229
|
+
skillsDesc: 'Teach agents how to operate your knowledge base.',
|
|
229
230
|
skillAutoLoaded: 'Auto-loaded on every request',
|
|
230
231
|
skillSource: 'Source',
|
|
231
232
|
skillBuiltin: 'Built-in',
|
|
@@ -268,8 +269,11 @@ export const settingsEn = {
|
|
|
268
269
|
noAuthWarning: '⚠ No auth token — set one in Settings → General before enabling remote access.',
|
|
269
270
|
showJson: 'Show JSON',
|
|
270
271
|
hideJson: 'Hide JSON',
|
|
271
|
-
connectionTitle: '
|
|
272
|
-
connectionHint: '
|
|
272
|
+
connectionTitle: 'Connect Agents',
|
|
273
|
+
connectionHint: 'Choose how your AI agents connect to MindOS.',
|
|
274
|
+
tokenCardTitle: 'Auth Token',
|
|
275
|
+
tokenCardDesc: 'Used by CLI remote mode and MCP connections.',
|
|
276
|
+
mcpHint: 'For Claude Desktop, Cursor, and agents that use MCP tool protocol.',
|
|
273
277
|
tokenLabel: 'Auth Token',
|
|
274
278
|
tokenMasked: 'Click Show to reveal the full token',
|
|
275
279
|
tokenShow: 'Show',
|
|
@@ -285,6 +289,38 @@ export const settingsEn = {
|
|
|
285
289
|
howToStep2: 'Add a new MCP server with the URL above',
|
|
286
290
|
howToStep3: 'Set the Auth Token as the bearer token',
|
|
287
291
|
howToStep4: 'Save and verify the connection',
|
|
292
|
+
// CLI Skill
|
|
293
|
+
cliSkillTitle: 'CLI Skill',
|
|
294
|
+
cliSkillHint: 'For agents with bash (Claude Code, Gemini CLI, Codex) — lower token cost, no MCP needed.',
|
|
295
|
+
cliSkillDesc: 'Lower token cost, Skill included — just install and go.',
|
|
296
|
+
cliLocalDesc: 'MindOS Skill is built-in. Install the CLI and you\'re good to go.',
|
|
297
|
+
cliRemoteDesc: 'Install the CLI on another machine and connect to this MindOS server.',
|
|
298
|
+
cliSkillInstall: 'Install',
|
|
299
|
+
cliSkillInstallCmd: 'npm install -g @geminilight/mindos',
|
|
300
|
+
cliSkillRemote: 'Remote',
|
|
301
|
+
cliSkillVerify: 'Verify',
|
|
302
|
+
cliSkillVerifyCmd: 'mindos file list',
|
|
303
|
+
cliRemoteConfigure: 'Configure',
|
|
304
|
+
cliInstallSkill: 'Install Skill',
|
|
305
|
+
cliAgents: 'Claude Code · Gemini CLI · Codex',
|
|
306
|
+
mcpAgents: 'Claude Desktop · Cursor',
|
|
307
|
+
mcpDesc: 'Requires per-agent MCP config. Install Skill separately via',
|
|
308
|
+
mcpLocalDesc: 'Copy the config snippet and paste into your agent\'s MCP settings.',
|
|
309
|
+
mcpRunningLabel: 'MCP Running',
|
|
310
|
+
mcpServerStatus: 'MCP Server',
|
|
311
|
+
autoInstallAgents: 'Auto-install to detected agents',
|
|
312
|
+
detectedAgentsTitle: 'Detected Agents',
|
|
313
|
+
cliInstallDesc: 'Install the MindOS Skill to your agent so it can operate your knowledge base.',
|
|
314
|
+
mcpInstallDesc: 'Install MCP config + Skill to detected agents on this machine.',
|
|
315
|
+
tokenCopyFullHint: 'Copies full token',
|
|
316
|
+
skillsInstalled: 'skills installed',
|
|
317
|
+
recommended: 'Recommended',
|
|
318
|
+
localTitle: 'Local',
|
|
319
|
+
localReady: 'Ready to use',
|
|
320
|
+
remoteTitle: 'Remote Access',
|
|
321
|
+
remoteSubtitle: 'Connect from another device',
|
|
322
|
+
restarting: 'Restarting...',
|
|
323
|
+
restart: 'Restart',
|
|
288
324
|
},
|
|
289
325
|
monitoring: {
|
|
290
326
|
system: 'System',
|
|
@@ -409,7 +445,7 @@ export const settingsEn = {
|
|
|
409
445
|
export const settingsZh = {
|
|
410
446
|
settings: {
|
|
411
447
|
title: '设置',
|
|
412
|
-
tabs: { ai: 'AI', appearance: '外观', knowledge: '通用', sync: '同步', mcp: '
|
|
448
|
+
tabs: { ai: 'AI', appearance: '外观', knowledge: '通用', sync: '同步', mcp: '连接', plugins: '插件', shortcuts: '快捷键', monitoring: '监控', agents: '智能体', update: '更新', uninstall: '卸载' },
|
|
413
449
|
ai: {
|
|
414
450
|
provider: '服务商',
|
|
415
451
|
model: '模型',
|
|
@@ -632,6 +668,7 @@ export const settingsZh = {
|
|
|
632
668
|
portLabel: 'MCP 端口',
|
|
633
669
|
portHint: '修改后需重启服务',
|
|
634
670
|
skillsTitle: '技能',
|
|
671
|
+
skillsDesc: '教 Agent 如何操作你的知识库。',
|
|
635
672
|
skillAutoLoaded: '每次请求自动加载',
|
|
636
673
|
skillSource: '来源',
|
|
637
674
|
skillBuiltin: '内置',
|
|
@@ -674,8 +711,11 @@ export const settingsZh = {
|
|
|
674
711
|
noAuthWarning: '⚠ 未设置认证令牌 — 请先在 设置 → 通用 中配置,再启用远程访问。',
|
|
675
712
|
showJson: '显示 JSON',
|
|
676
713
|
hideJson: '隐藏 JSON',
|
|
677
|
-
connectionTitle: '
|
|
678
|
-
connectionHint: '
|
|
714
|
+
connectionTitle: '连接 Agent',
|
|
715
|
+
connectionHint: '选择 AI Agent 连接 MindOS 的方式。',
|
|
716
|
+
tokenCardTitle: '认证令牌',
|
|
717
|
+
tokenCardDesc: '用于 CLI 远程模式和 MCP 连接。',
|
|
718
|
+
mcpHint: '适用于 Claude Desktop、Cursor 等使用 MCP 工具协议的 Agent。',
|
|
679
719
|
tokenLabel: '认证令牌',
|
|
680
720
|
tokenMasked: '点击「显示」查看完整令牌',
|
|
681
721
|
tokenShow: '显示',
|
|
@@ -691,6 +731,38 @@ export const settingsZh = {
|
|
|
691
731
|
howToStep2: '添加一个新的 MCP 服务,填入上方地址',
|
|
692
732
|
howToStep3: '将认证令牌设为 Bearer Token',
|
|
693
733
|
howToStep4: '保存并验证连接',
|
|
734
|
+
// CLI Skill
|
|
735
|
+
cliSkillTitle: 'CLI 技能',
|
|
736
|
+
cliSkillHint: '适用于支持 bash 的 Agent(Claude Code、Gemini CLI、Codex)——更省 token,无需 MCP。',
|
|
737
|
+
cliSkillDesc: '更省 token,技能内置——安装即可使用。',
|
|
738
|
+
cliLocalDesc: 'MindOS Skill 已内置,安装 CLI 即可直接使用。',
|
|
739
|
+
cliRemoteDesc: '在其他设备上安装 CLI,远程连接到此 MindOS 服务器。',
|
|
740
|
+
cliSkillInstall: '安装',
|
|
741
|
+
cliSkillInstallCmd: 'npm install -g @geminilight/mindos',
|
|
742
|
+
cliSkillRemote: '远程',
|
|
743
|
+
cliSkillVerify: '验证',
|
|
744
|
+
cliSkillVerifyCmd: 'mindos file list',
|
|
745
|
+
cliRemoteConfigure: '配置',
|
|
746
|
+
cliInstallSkill: '安装技能',
|
|
747
|
+
cliAgents: 'Claude Code · Gemini CLI · Codex',
|
|
748
|
+
mcpAgents: 'Claude Desktop · Cursor',
|
|
749
|
+
mcpDesc: '需要逐个 Agent 配置 MCP,通过以下命令单独安装技能:',
|
|
750
|
+
mcpLocalDesc: '复制下方配置代码,粘贴到你的 Agent 的 MCP 设置中。',
|
|
751
|
+
mcpRunningLabel: 'MCP 运行中',
|
|
752
|
+
mcpServerStatus: 'MCP 服务',
|
|
753
|
+
autoInstallAgents: '自动安装到已检测的 Agent',
|
|
754
|
+
detectedAgentsTitle: '检测到的 Agent',
|
|
755
|
+
cliInstallDesc: '为你的 Agent 安装 MindOS Skill,让它能操作你的知识库。',
|
|
756
|
+
mcpInstallDesc: '为本机检测到的 Agent 安装 MCP 配置和 Skill。',
|
|
757
|
+
tokenCopyFullHint: '复制完整令牌',
|
|
758
|
+
skillsInstalled: '个技能已安装',
|
|
759
|
+
recommended: '推荐',
|
|
760
|
+
localTitle: '本机',
|
|
761
|
+
localReady: '可直接使用',
|
|
762
|
+
remoteTitle: '远程访问',
|
|
763
|
+
remoteSubtitle: '从其他设备连接',
|
|
764
|
+
restarting: '重启中...',
|
|
765
|
+
restart: '重启',
|
|
694
766
|
},
|
|
695
767
|
monitoring: {
|
|
696
768
|
system: '系统',
|
package/app/lib/mcp-agents.ts
CHANGED
|
@@ -6,10 +6,9 @@ import { execSync } from 'child_process';
|
|
|
6
6
|
/** Parse JSONC — strips single-line (//) and block comments before JSON.parse */
|
|
7
7
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8
8
|
function parseJsonc(text: string): any {
|
|
9
|
-
// Strip single-line comments (not inside strings)
|
|
10
9
|
let stripped = text.replace(/\\"|"(?:\\"|[^"])*"|(\/\/.*$)/gm, (m, g) => g ? '' : m);
|
|
11
|
-
// Strip block comments
|
|
12
10
|
stripped = stripped.replace(/\/\*[\s\S]*?\*\//g, '');
|
|
11
|
+
if (!stripped.trim()) return {};
|
|
13
12
|
return JSON.parse(stripped);
|
|
14
13
|
}
|
|
15
14
|
|
package/app/lib/mcp-snippets.ts
CHANGED
|
@@ -94,9 +94,13 @@ export function generateSnippet(
|
|
|
94
94
|
if (transport === 'stdio') {
|
|
95
95
|
return generateStdioSnippet(agent);
|
|
96
96
|
}
|
|
97
|
+
// For remote/http mode, prefer localIP over endpoint (which is always localhost)
|
|
98
|
+
const endpoint = status?.localIP
|
|
99
|
+
? `http://${status.localIP}:${status.port}/mcp`
|
|
100
|
+
: (status?.endpoint ?? 'http://127.0.0.1:8781/mcp');
|
|
97
101
|
return generateHttpSnippet(
|
|
98
102
|
agent,
|
|
99
|
-
|
|
103
|
+
endpoint,
|
|
100
104
|
status?.authToken,
|
|
101
105
|
status?.maskedToken,
|
|
102
106
|
);
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* To regenerate: node scripts/gen-renderer-index.js
|
|
4
4
|
*/
|
|
5
5
|
import { registerRenderer } from './registry';
|
|
6
|
+
import { manifest as agentInspector } from '@/components/renderers/agent-inspector/manifest';
|
|
6
7
|
import { manifest as backlinks } from '@/components/renderers/backlinks/manifest';
|
|
7
8
|
import { manifest as config } from '@/components/renderers/config/manifest';
|
|
8
9
|
import { manifest as csv } from '@/components/renderers/csv/manifest';
|
|
@@ -13,7 +14,7 @@ import { manifest as workflowYaml } from '@/components/renderers/workflow-yaml/m
|
|
|
13
14
|
import { manifest as graph } from '@/components/renderers/graph/manifest';
|
|
14
15
|
|
|
15
16
|
const manifests = [
|
|
16
|
-
backlinks, config, csv, summary, timeline, todo, workflowYaml, graph,
|
|
17
|
+
agentInspector, backlinks, config, csv, summary, timeline, todo, workflowYaml, graph,
|
|
17
18
|
];
|
|
18
19
|
|
|
19
20
|
for (const m of manifests) {
|