@geminilight/mindos 0.5.69 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/app/app/api/ask/route.ts +122 -92
  2. package/app/app/api/file/import/route.ts +197 -0
  3. package/app/app/api/mcp/agents/route.ts +53 -2
  4. package/app/app/api/mcp/status/route.ts +1 -1
  5. package/app/app/api/skills/route.ts +10 -114
  6. package/app/components/ActivityBar.tsx +5 -7
  7. package/app/components/CreateSpaceModal.tsx +31 -6
  8. package/app/components/FileTree.tsx +68 -11
  9. package/app/components/GuideCard.tsx +197 -131
  10. package/app/components/HomeContent.tsx +85 -18
  11. package/app/components/ImportModal.tsx +415 -0
  12. package/app/components/OnboardingView.tsx +9 -0
  13. package/app/components/Panel.tsx +4 -2
  14. package/app/components/SidebarLayout.tsx +96 -8
  15. package/app/components/SpaceInitToast.tsx +173 -0
  16. package/app/components/TableOfContents.tsx +1 -0
  17. package/app/components/agents/AgentDetailContent.tsx +69 -45
  18. package/app/components/agents/AgentsContentPage.tsx +2 -1
  19. package/app/components/agents/AgentsMcpSection.tsx +16 -12
  20. package/app/components/agents/AgentsOverviewSection.tsx +37 -36
  21. package/app/components/agents/AgentsPrimitives.tsx +41 -20
  22. package/app/components/agents/AgentsSkillsSection.tsx +16 -7
  23. package/app/components/agents/SkillDetailPopover.tsx +11 -11
  24. package/app/components/agents/agents-content-model.ts +16 -8
  25. package/app/components/ask/AskContent.tsx +148 -50
  26. package/app/components/ask/MentionPopover.tsx +16 -8
  27. package/app/components/ask/SlashCommandPopover.tsx +62 -0
  28. package/app/components/panels/AgentsPanelAgentGroups.tsx +8 -6
  29. package/app/components/panels/AgentsPanelHubNav.tsx +3 -3
  30. package/app/components/panels/DiscoverPanel.tsx +88 -2
  31. package/app/components/settings/KnowledgeTab.tsx +61 -0
  32. package/app/components/walkthrough/steps.ts +11 -6
  33. package/app/hooks/useFileImport.ts +191 -0
  34. package/app/hooks/useFileUpload.ts +11 -0
  35. package/app/hooks/useMention.ts +14 -6
  36. package/app/hooks/useSlashCommand.ts +114 -0
  37. package/app/lib/actions.ts +79 -2
  38. package/app/lib/agent/index.ts +1 -1
  39. package/app/lib/agent/prompt.ts +2 -0
  40. package/app/lib/agent/tools.ts +252 -0
  41. package/app/lib/core/create-space.ts +11 -4
  42. package/app/lib/core/file-convert.ts +97 -0
  43. package/app/lib/core/index.ts +1 -1
  44. package/app/lib/core/organize.ts +105 -0
  45. package/app/lib/i18n-en.ts +102 -46
  46. package/app/lib/i18n-zh.ts +101 -45
  47. package/app/lib/mcp-agents.ts +8 -0
  48. package/app/lib/pdf-extract.ts +33 -0
  49. package/app/lib/pi-integration/extensions.ts +45 -0
  50. package/app/lib/pi-integration/mcporter.ts +219 -0
  51. package/app/lib/pi-integration/session-store.ts +62 -0
  52. package/app/lib/pi-integration/skills.ts +116 -0
  53. package/app/lib/settings.ts +1 -1
  54. package/app/next-env.d.ts +1 -1
  55. package/app/next.config.ts +1 -1
  56. package/app/package.json +2 -0
  57. package/mcp/src/index.ts +29 -0
  58. package/package.json +1 -1
@@ -28,6 +28,11 @@ export const en = {
28
28
  aiInit: 'AI initialize content',
29
29
  aiInitHint: 'AI will generate README and INSTRUCTION for this space',
30
30
  aiInitNoKey: 'Configure an API key in Settings → AI to enable',
31
+ aiInitGenerating: (name: string) => `Generating content for ${name}`,
32
+ aiInitReady: (name: string) => `${name} ready`,
33
+ aiInitReview: 'Review',
34
+ aiInitDiscard: 'Discard',
35
+ aiInitReverted: (name: string) => `${name} reverted to template`,
31
36
  createSpace: 'Create',
32
37
  cancelCreate: 'Cancel',
33
38
  continueEditing: 'Continue editing',
@@ -53,6 +58,9 @@ export const en = {
53
58
  hoursAgo: (n: number) => `${n}h ago`,
54
59
  daysAgo: (n: number) => `${n}d ago`,
55
60
  },
61
+ cleanupExamples: (n: number) => `${n} example file${n > 1 ? 's' : ''} from the template can be removed`,
62
+ cleanupExamplesButton: 'Clean up',
63
+ cleanupExamplesDone: 'Example files removed',
56
64
  },
57
65
  sidebar: {
58
66
  files: 'Spaces',
@@ -97,7 +105,7 @@ export const en = {
97
105
  },
98
106
  ask: {
99
107
  title: 'MindOS Agent',
100
- placeholder: 'Ask a question... or type @ to attach a file',
108
+ placeholder: 'Ask a question... @ files, / skills',
101
109
  emptyPrompt: 'Ask anything about your knowledge base',
102
110
  send: 'send',
103
111
  newlineHint: 'new line',
@@ -105,7 +113,9 @@ export const en = {
105
113
  panelComposerFooter: 'Resize height',
106
114
  panelComposerResetHint: 'Double-click to reset height',
107
115
  panelComposerKeyboard: 'Arrow keys adjust height; Home/End min/max',
108
- attachFile: 'attach file',
116
+ attachFile: 'Context',
117
+ uploadedFiles: 'Uploaded',
118
+ skillsHint: 'skills',
109
119
  attachCurrent: 'attach current file',
110
120
  stopTitle: 'Stop',
111
121
  connecting: 'Thinking with your mind...',
@@ -351,6 +361,9 @@ export const en = {
351
361
  enabledUnit: (n: number) => `${n} enabled`,
352
362
  agentCount: (n: number) => `${n} agent${n !== 1 ? 's' : ''}`,
353
363
  runtimeActive: 'Active',
364
+ riskMcpStopped: 'MCP server is not running.',
365
+ riskDetected: (n: number) => `${n} detected agent(s) need configuration.`,
366
+ riskSkillsDisabled: 'All skills are disabled.',
354
367
  },
355
368
  mcp: {
356
369
  title: 'MCP Connections',
@@ -384,6 +397,7 @@ export const en = {
384
397
  riskMcpStopped: 'MCP server is not running.',
385
398
  riskDetected: (n: number) => `${n} detected agent(s) need configuration.`,
386
399
  riskNotFound: (n: number) => `${n} agent(s) not found on this machine.`,
400
+ riskSkillsDisabled: 'All skills are disabled.',
387
401
  bulkReconnectFiltered: 'Reconnect all',
388
402
  bulkRunning: 'Running reconnect...',
389
403
  bulkSummary: (ok: number, failed: number) => `Reconnected ${ok}, failed ${failed}.`,
@@ -657,6 +671,57 @@ export const en = {
657
671
  convertToSpace: 'Convert to Space',
658
672
  deleteFolder: 'Delete Folder',
659
673
  confirmDeleteFolder: (name: string) => `Delete folder "${name}" and all its contents? This cannot be undone.`,
674
+ newFile: 'New File',
675
+ importFile: 'Import File',
676
+ importToSpace: 'Import file to this space',
677
+ },
678
+ fileImport: {
679
+ title: 'Import Files',
680
+ subtitle: 'Save files to your knowledge base or let AI organize them',
681
+ dropzoneText: 'Drag files here, or',
682
+ dropzoneButton: 'click to select',
683
+ dropzoneCompact: 'Drag more files, or',
684
+ dropzoneCompactButton: 'click to add',
685
+ dropzoneMobile: 'Tap to select files',
686
+ fileCount: (n: number) => `${n} file${n !== 1 ? 's' : ''}`,
687
+ clearAll: 'Clear all',
688
+ unsupported: 'Unsupported file type',
689
+ tooLarge: (max: string) => `File too large (max ${max})`,
690
+ archiveTitle: 'Save to Knowledge Base',
691
+ archiveDesc: 'Save as-is to a space',
692
+ digestTitle: 'AI Organize',
693
+ digestDesc: 'Extract key points into notes',
694
+ archiveConfigTitle: 'Save to Knowledge Base',
695
+ back: '← Back',
696
+ targetSpace: 'Target space',
697
+ rootDir: 'Root',
698
+ conflictLabel: 'If file already exists',
699
+ conflictRename: 'Auto-rename (add number suffix)',
700
+ conflictSkip: 'Skip',
701
+ conflictOverwrite: 'Overwrite existing file',
702
+ overwriteWarn: 'This will permanently replace existing file content',
703
+ cancel: 'Cancel',
704
+ importButton: (n: number) => `Save ${n} file${n !== 1 ? 's' : ''}`,
705
+ importing: 'Saving...',
706
+ preparing: 'Preparing...',
707
+ successToast: (n: number, space: string) => `Saved ${n} file${n !== 1 ? 's' : ''} to ${space || 'knowledge base'}`,
708
+ updatedIndex: (n: number) => `Updated ${n} index file${n !== 1 ? 's' : ''}`,
709
+ partialToast: (ok: number, total: number) => `Saved ${ok}/${total} files`,
710
+ skipReason: 'File already exists',
711
+ failToast: 'Import failed',
712
+ retry: 'Retry',
713
+ undo: 'Undo',
714
+ discardTitle: 'Discard import?',
715
+ discardMessage: (n: number) => `Discard ${n} selected file${n !== 1 ? 's' : ''}?`,
716
+ discardConfirm: 'Discard',
717
+ discardCancel: 'Cancel',
718
+ dropOverlay: 'Drop files to import into knowledge base',
719
+ dropOverlayFormats: 'Supports .md .txt .pdf .csv .json .yaml .html',
720
+ onboardingHint: 'Already have notes? Import files →',
721
+ digestPromptSingle: (name: string) => `Please read ${name}, extract key information and organize it into the appropriate place in my knowledge base.`,
722
+ digestPromptMulti: (n: number) => `Please read these ${n} files, extract key information and organize each into the appropriate place in my knowledge base.`,
723
+ arrowTo: '→',
724
+ remove: 'Remove',
660
725
  },
661
726
  dirView: {
662
727
  gridView: 'Grid view',
@@ -741,6 +806,15 @@ export const en = {
741
806
  authTokenResetConfirm: 'Regenerate token? All existing MCP clients will need to update their config.',
742
807
  authTokenMcpPort: 'MCP port',
743
808
  restartWalkthrough: 'Restart walkthrough',
809
+ showHiddenFiles: 'Show hidden files',
810
+ showHiddenFilesHint: 'Display dot-prefixed folders (.agents, .claude, .mindos, etc.) in the file tree.',
811
+ cleanupExamples: 'Clean up example files',
812
+ cleanupExamplesHint: 'Remove all template example files (🧪_example_*) from your knowledge base.',
813
+ cleanupExamplesButton: 'Clean up',
814
+ cleanupExamplesNone: 'No example files found',
815
+ cleanupExamplesConfirm: (n: number) => `Delete ${n} example file${n > 1 ? 's' : ''}? This cannot be undone.`,
816
+ cleanupExamplesDone: (n: number) => `Removed ${n} example file${n > 1 ? 's' : ''}`,
817
+ cleanupExamplesScanning: 'Scanning...',
744
818
  },
745
819
  sync: {
746
820
  emptyTitle: 'Cross-device Sync',
@@ -1092,50 +1166,36 @@ export const en = {
1092
1166
  welcomeLinkMCP: 'MCP Settings',
1093
1167
  },
1094
1168
  guide: {
1095
- title: 'Get Started with MindOS',
1169
+ title: 'Quick Start',
1096
1170
  showGuide: 'Show getting started guide',
1097
1171
  close: 'Close',
1098
1172
  skip: 'Skip',
1099
- kb: {
1100
- title: 'Explore your knowledge base',
1101
- cta: 'Start',
1102
- fullDesc: 'Your knowledge base has 6 areastry clicking one:',
1103
- dirs: {
1104
- profile: 'Who you are, preferences, goals',
1105
- notes: 'Daily capture: ideas, meetings, todos',
1106
- connections: 'Your network of people',
1107
- workflows: 'Reusable process SOPs',
1108
- resources: 'Structured data: product lists, tool lists',
1109
- projects: 'Project plans and progress',
1110
- },
1111
- instructionHint: 'Click INSTRUCTION.md to see how AI agents behave.',
1112
- emptyDesc: 'Your knowledge base has 3 core files:',
1113
- emptyFiles: {
1114
- instruction: 'INSTRUCTION.md — Rules that all AI agents follow',
1115
- readme: 'README.md — Directory index and navigation',
1116
- config: 'CONFIG.json — Machine-readable preferences',
1117
- },
1118
- emptyHint: 'Create your own folder structure anytime.',
1119
- progress: (n: number) => `Browsed ${n}/1 file`,
1120
- done: 'Done',
1173
+ import: {
1174
+ title: 'Import your files',
1175
+ cta: 'Import',
1176
+ desc: 'Upload your resume, project docs, or notes anything you want AI agents to know about you.',
1177
+ button: 'Import Files',
1121
1178
  },
1122
1179
  ai: {
1123
- title: 'Chat with AI',
1124
- cta: 'Start',
1125
- prompt: 'Read my knowledge base and help me write a self-introduction into Profile.',
1180
+ title: 'See AI read your content',
1181
+ cta: 'Try it',
1182
+ desc: 'Your files are in the knowledge base. Ask MindOS Agent what it learned:',
1183
+ prompt: 'Introduce me based on my knowledge base — who am I and what am I working on?',
1126
1184
  promptEmpty: 'Help me design a knowledge base folder structure that fits my needs',
1127
1185
  },
1128
- sync: {
1129
- title: 'Sync Notes',
1130
- optional: 'Optional',
1131
- cta: 'Configure',
1186
+ agent: {
1187
+ title: 'Try in another Agent',
1188
+ cta: 'Copy prompt',
1189
+ desc: 'Open Cursor, Claude Code, or any MCP-connected Agent and paste this:',
1190
+ copyPrompt: 'Read my MindOS knowledge base and summarize my background, then suggest what I should focus on next.',
1191
+ copy: 'Copy',
1192
+ copied: 'Copied!',
1132
1193
  },
1133
1194
  done: {
1134
1195
  title: "You're all set!",
1135
1196
  titleFinal: "You've mastered MindOS essentials!",
1136
1197
  steps: [
1137
- { hint: 'Next: try saving an article →', prompt: 'Help me save the key points from this article into MindOS.' },
1138
- { hint: 'Next: try using your KB in another Agent →', prompt: 'Help me start coding based on the plan in MindOS.' },
1198
+ { hint: 'Next: try saving an article into your KB →', prompt: 'Help me save the key points from this article into MindOS.' },
1139
1199
  { hint: 'Next: try turning experience into a reusable SOP →', prompt: 'Help me distill this conversation into a reusable workflow in MindOS.' },
1140
1200
  ],
1141
1201
  },
@@ -1216,24 +1276,20 @@ prompt: "Here's my resume, read it and organize my info into MindOS.",
1216
1276
  exploreCta: 'Explore what you can do →',
1217
1277
  steps: [
1218
1278
  {
1219
- title: 'Navigation',
1220
- body: 'This is your Activity Bar switch between Files, Search, Plugins, and Agents from here.',
1221
- },
1222
- {
1223
- title: 'Your Knowledge Base',
1224
- body: 'Browse and organize your notes, profiles, and projects in the file panel.',
1279
+ title: 'Your Project Memory',
1280
+ body: 'Organize projects, SOPs, and preferences in Spaces. Everything is local-first and under your control.',
1225
1281
  },
1226
1282
  {
1227
- title: 'Ask AI',
1228
- body: 'Chat with an AI that knows your entire knowledge base. Press ⌘/ anytime.',
1283
+ title: 'AI That Already Knows You',
1284
+ body: 'MindOS Agent reads your entire knowledge base automatically. Ask about your projects — no need to re-explain anything.',
1229
1285
  },
1230
1286
  {
1231
- title: 'Quick Search',
1232
- body: 'Find any file instantly with ⌘Ksearch across all your notes.',
1287
+ title: 'Connect Any Agent',
1288
+ body: 'Link Cursor, Claude Code, or Windsurf via MCP they all share the same project memory.',
1233
1289
  },
1234
1290
  {
1235
- title: 'Settings',
1236
- body: 'Configure AI providers, MCP connections, sync, and appearance here.',
1291
+ title: 'Echo — Growth Compounds',
1292
+ body: 'About you, daily reflections, growth tracking MindOS helps you accumulate cognitive compound interest over time.',
1237
1293
  },
1238
1294
  ],
1239
1295
  },
@@ -53,6 +53,11 @@ export const zh = {
53
53
  aiInit: 'AI 初始化内容',
54
54
  aiInitHint: 'AI 将为此空间生成 README 和 INSTRUCTION',
55
55
  aiInitNoKey: '在 设置 → AI 中配置 API 密钥以启用',
56
+ aiInitGenerating: (name: string) => `正在为「${name}」生成内容`,
57
+ aiInitReady: (name: string) => `「${name}」已就绪`,
58
+ aiInitReview: '查看',
59
+ aiInitDiscard: '撤销',
60
+ aiInitReverted: (name: string) => `「${name}」已恢复为模板`,
56
61
  createSpace: '创建',
57
62
  cancelCreate: '取消',
58
63
  continueEditing: '继续编辑',
@@ -78,6 +83,9 @@ export const zh = {
78
83
  hoursAgo: (n: number) => `${n} 小时前`,
79
84
  daysAgo: (n: number) => `${n} 天前`,
80
85
  },
86
+ cleanupExamples: (n: number) => `有 ${n} 个模板示例文件可以清理`,
87
+ cleanupExamplesButton: '一键清理',
88
+ cleanupExamplesDone: '示例文件已清理',
81
89
  },
82
90
  sidebar: {
83
91
  files: '空间',
@@ -122,7 +130,7 @@ export const zh = {
122
130
  },
123
131
  ask: {
124
132
  title: 'MindOS Agent',
125
- placeholder: '输入问题,或输入 @ 添加附件文件',
133
+ placeholder: '输入问题… @ 附加文件,/ 技能',
126
134
  emptyPrompt: '可以问任何关于知识库的问题',
127
135
  send: '发送',
128
136
  newlineHint: '换行',
@@ -130,7 +138,9 @@ export const zh = {
130
138
  panelComposerFooter: '拉高输入区',
131
139
  panelComposerResetHint: '双击恢复默认高度',
132
140
  panelComposerKeyboard: '方向键调节高度;Home/End 最小或最大',
133
- attachFile: '附加文件',
141
+ attachFile: '上下文',
142
+ uploadedFiles: '已上传',
143
+ skillsHint: '技能',
134
144
  attachCurrent: '附加当前文件',
135
145
  stopTitle: '停止',
136
146
  connecting: '正在与你的心智一起思考...',
@@ -375,6 +385,9 @@ export const zh = {
375
385
  enabledUnit: (n: number) => `${n} 已启用`,
376
386
  agentCount: (n: number) => `${n} 个 Agent`,
377
387
  runtimeActive: '活跃',
388
+ riskMcpStopped: 'MCP 服务未运行。',
389
+ riskDetected: (n: number) => `${n} 个已检测 Agent 待配置。`,
390
+ riskSkillsDisabled: '所有技能已禁用。',
378
391
  },
379
392
  mcp: {
380
393
  title: 'MCP 连接',
@@ -408,6 +421,7 @@ export const zh = {
408
421
  riskMcpStopped: 'MCP 服务未运行。',
409
422
  riskDetected: (n: number) => `${n} 个已检测 Agent 待配置。`,
410
423
  riskNotFound: (n: number) => `${n} 个 Agent 未在本机检测到。`,
424
+ riskSkillsDisabled: '所有技能已禁用。',
411
425
  bulkReconnectFiltered: '全部重连',
412
426
  bulkRunning: '正在批量重连...',
413
427
  bulkSummary: (ok: number, failed: number) => `重连成功 ${ok} 个,失败 ${failed} 个。`,
@@ -681,6 +695,57 @@ export const zh = {
681
695
  convertToSpace: '转为空间',
682
696
  deleteFolder: '删除文件夹',
683
697
  confirmDeleteFolder: (name: string) => `删除文件夹「${name}」及其所有内容?此操作不可撤销。`,
698
+ newFile: '新建文件',
699
+ importFile: '导入文件',
700
+ importToSpace: '导入文件到此空间',
701
+ },
702
+ fileImport: {
703
+ title: '导入文件',
704
+ subtitle: '将外部文件存入知识库或让 AI 帮你整理',
705
+ dropzoneText: '拖拽文件到这里,或',
706
+ dropzoneButton: '点击选择',
707
+ dropzoneCompact: '拖拽更多文件,或',
708
+ dropzoneCompactButton: '点击添加',
709
+ dropzoneMobile: '点击选择文件',
710
+ fileCount: (n: number) => `${n} 个文件`,
711
+ clearAll: '清空全部',
712
+ unsupported: '不支持的文件类型',
713
+ tooLarge: (max: string) => `文件过大(最大 ${max})`,
714
+ archiveTitle: '存入知识库',
715
+ archiveDesc: '原样归档到指定空间',
716
+ digestTitle: 'AI 帮我整理',
717
+ digestDesc: '提取要点,沉淀到笔记',
718
+ archiveConfigTitle: '存入知识库',
719
+ back: '← 返回',
720
+ targetSpace: '目标空间',
721
+ rootDir: '根目录',
722
+ conflictLabel: '同名文件已存在时',
723
+ conflictRename: '自动重命名(添加序号后缀)',
724
+ conflictSkip: '跳过不导入',
725
+ conflictOverwrite: '覆盖已有文件',
726
+ overwriteWarn: '将永久替换已有文件内容',
727
+ cancel: '取消',
728
+ importButton: (n: number) => `存入 ${n} 个文件`,
729
+ importing: '正在存入...',
730
+ preparing: '准备中...',
731
+ successToast: (n: number, space: string) => `已存入 ${n} 个文件到 ${space || '知识库'}`,
732
+ updatedIndex: (n: number) => `更新了 ${n} 个索引文件`,
733
+ partialToast: (ok: number, total: number) => `存入 ${ok}/${total} 个文件`,
734
+ skipReason: '同名文件已存在',
735
+ failToast: '导入失败',
736
+ retry: '重试',
737
+ undo: '撤销',
738
+ discardTitle: '放弃导入?',
739
+ discardMessage: (n: number) => `放弃已选的 ${n} 个文件?`,
740
+ discardConfirm: '放弃',
741
+ discardCancel: '取消',
742
+ dropOverlay: '松开鼠标,导入文件到知识库',
743
+ dropOverlayFormats: '支持 .md .txt .pdf .csv .json .yaml .html',
744
+ onboardingHint: '已有笔记?导入文件到知识库 →',
745
+ digestPromptSingle: (name: string) => `请阅读 ${name},提取关键信息整理到知识库中合适的位置。`,
746
+ digestPromptMulti: (n: number) => `请阅读这 ${n} 个文件,提取关键信息分别整理到知识库中合适的位置。`,
747
+ arrowTo: '→',
748
+ remove: '移除',
684
749
  },
685
750
  dirView: {
686
751
  gridView: '网格视图',
@@ -765,6 +830,15 @@ export const zh = {
765
830
  authTokenResetConfirm: '重新生成令牌?所有 MCP 客户端配置都需要更新。',
766
831
  authTokenMcpPort: 'MCP 端口',
767
832
  restartWalkthrough: '重新开始引导',
833
+ showHiddenFiles: '显示隐藏文件',
834
+ showHiddenFilesHint: '在文件树中显示以 . 开头的文件夹(.agents、.claude、.mindos 等)。',
835
+ cleanupExamples: '清理示例文件',
836
+ cleanupExamplesHint: '移除知识库中所有模板示例文件(🧪_example_*)。',
837
+ cleanupExamplesButton: '清理',
838
+ cleanupExamplesNone: '没有找到示例文件',
839
+ cleanupExamplesConfirm: (n: number) => `删除 ${n} 个示例文件?此操作不可撤销。`,
840
+ cleanupExamplesDone: (n: number) => `已移除 ${n} 个示例文件`,
841
+ cleanupExamplesScanning: '扫描中...',
768
842
  },
769
843
  sync: {
770
844
  emptyTitle: '跨设备同步',
@@ -1116,50 +1190,36 @@ export const zh = {
1116
1190
  welcomeLinkMCP: 'MCP 设置',
1117
1191
  },
1118
1192
  guide: {
1119
- title: '开始使用 MindOS',
1193
+ title: '快速上手',
1120
1194
  showGuide: '显示新手引导',
1121
1195
  close: '关闭',
1122
1196
  skip: '跳过',
1123
- kb: {
1124
- title: '探索你的知识库',
1125
- cta: '开始',
1126
- fullDesc: '你的知识库有 6 个区域,试试点开看看:',
1127
- dirs: {
1128
- profile: '你是谁、偏好、目标',
1129
- notes: '日常捕捉:想法、会议、待办',
1130
- connections: '你的人脉关系网',
1131
- workflows: '可复用的工作流程 SOP',
1132
- resources: '结构化数据:产品库、工具库',
1133
- projects: '项目计划和进展',
1134
- },
1135
- instructionHint: '点击 INSTRUCTION.md 看看 AI 的行为规则。',
1136
- emptyDesc: '你的知识库有 3 个核心文件:',
1137
- emptyFiles: {
1138
- instruction: 'INSTRUCTION.md — 所有 AI Agent 遵循的规则',
1139
- readme: 'README.md — 目录索引和导航',
1140
- config: 'CONFIG.json — 机器可读的配置偏好',
1141
- },
1142
- emptyHint: '你可以随时创建自己的目录结构。',
1143
- progress: (n: number) => `已浏览 ${n}/1 个文件`,
1144
- done: '完成',
1197
+ import: {
1198
+ title: '导入你的文件',
1199
+ cta: '导入',
1200
+ desc: '上传简历、项目文档、笔记——任何你想让 AI Agent 了解的内容。',
1201
+ button: '导入文件',
1145
1202
  },
1146
1203
  ai: {
1147
- title: ' AI 对话',
1148
- cta: '开始',
1149
- prompt: '读一下我的知识库,帮我把自我介绍写进 Profile。',
1204
+ title: '感受 AI 读取内容',
1205
+ cta: '试试',
1206
+ desc: '你的文件已在知识库中。问问 MindOS Agent 它了解了什么:',
1207
+ prompt: '根据我的知识库介绍一下我——我是谁、在做什么?',
1150
1208
  promptEmpty: '帮我设计一个适合我的知识库目录结构',
1151
1209
  },
1152
- sync: {
1153
- title: '同步笔记',
1154
- optional: '可选',
1155
- cta: '设置',
1210
+ agent: {
1211
+ title: '在其他 Agent 验证',
1212
+ cta: '复制提示词',
1213
+ desc: '打开 Cursor、Claude Code 或任意连接了 MCP 的 Agent,粘贴以下提示词:',
1214
+ copyPrompt: '读取我的 MindOS 知识库,概括我的背景,然后建议我接下来该做什么。',
1215
+ copy: '复制',
1216
+ copied: '已复制!',
1156
1217
  },
1157
1218
  done: {
1158
1219
  title: '你已准备好使用 MindOS',
1159
1220
  titleFinal: '你已掌握 MindOS 核心用法',
1160
1221
  steps: [
1161
1222
  { hint: '下一步:试试把一篇文章存进来 →', prompt: '帮我把这篇文章的要点整理到 MindOS 里。' },
1162
- { hint: '下一步:试试在另一个 Agent 里调用知识库 →', prompt: '帮我按 MindOS 里的方案开始写代码。' },
1163
1223
  { hint: '下一步:试试把经验沉淀为 SOP →', prompt: '帮我把这次对话的经验沉淀到 MindOS,形成可复用的工作流。' },
1164
1224
  ],
1165
1225
  },
@@ -1240,24 +1300,20 @@ prompt: '这是我的简历,读一下,把我的信息整理到 MindOS 里。
1240
1300
  exploreCta: '探索更多用法 →',
1241
1301
  steps: [
1242
1302
  {
1243
- title: '导航栏',
1244
- body: '这是你的 Activity Bar — 在这里切换文件、搜索、插件和 Agent。',
1245
- },
1246
- {
1247
- title: '你的知识库',
1248
- body: '在文件面板中浏览和管理你的笔记、画像和项目。',
1303
+ title: '你的项目记忆',
1304
+ body: ' Space 管理项目、SOP 和偏好规则。数据存在本地,完全由你掌控。',
1249
1305
  },
1250
1306
  {
1251
- title: 'AI 对话',
1252
- body: '和了解你整个知识库的 AI 对话。随时按 ⌘/ 启动。',
1307
+ title: '不用重讲背景的 AI',
1308
+ body: 'MindOS Agent 自动读取整个知识库。问它项目相关的事,不需要重复交代背景。',
1253
1309
  },
1254
1310
  {
1255
- title: '快速搜索',
1256
- body: ' ⌘K 即可搜索所有笔记,瞬间找到任何文件。',
1311
+ title: '多 Agent 共享记忆',
1312
+ body: '通过 MCP 连接 Cursor、Claude Code、Windsurf,它们共享同一份项目记忆。',
1257
1313
  },
1258
1314
  {
1259
- title: '设置',
1260
- body: '在这里配置 AI 服务商、MCP 连接、同步和外观。',
1315
+ title: '回响 — 认知在积累',
1316
+ body: '关于你、每日回顾、成长轨迹——MindOS 帮你沉淀判断与偏好,让经验不断复利。',
1261
1317
  },
1262
1318
  ],
1263
1319
  },
@@ -41,6 +41,14 @@ export interface SkillAgentRegistration {
41
41
  }
42
42
 
43
43
  export const MCP_AGENTS: Record<string, AgentDef> = {
44
+ 'mindos': {
45
+ name: 'MindOS',
46
+ project: null,
47
+ global: '~/.mindos/mcp.json',
48
+ key: 'mcpServers',
49
+ preferredTransport: 'stdio',
50
+ presenceDirs: ['~/.mindos/'],
51
+ },
44
52
  'claude-code': {
45
53
  name: 'Claude Code',
46
54
  project: '.mcp.json',
@@ -0,0 +1,33 @@
1
+ function uint8ToBase64(bytes: Uint8Array): string {
2
+ let binary = '';
3
+ const chunkSize = 0x8000;
4
+ for (let i = 0; i < bytes.length; i += chunkSize) {
5
+ const chunk = bytes.subarray(i, i + chunkSize);
6
+ binary += String.fromCharCode(...chunk);
7
+ }
8
+ return btoa(binary);
9
+ }
10
+
11
+ export async function extractPdfText(file: File): Promise<string> {
12
+ const buffer = await file.arrayBuffer();
13
+ const dataBase64 = uint8ToBase64(new Uint8Array(buffer));
14
+
15
+ const res = await fetch('/api/extract-pdf', {
16
+ method: 'POST',
17
+ headers: { 'Content-Type': 'application/json' },
18
+ body: JSON.stringify({ name: file.name, dataBase64 }),
19
+ });
20
+
21
+ let payload: { text?: string; extracted?: boolean; error?: string } = {};
22
+ try {
23
+ payload = await res.json();
24
+ } catch {
25
+ // ignore JSON parse error
26
+ }
27
+
28
+ if (!res.ok) {
29
+ throw new Error(payload.error || `PDF extraction failed (${res.status})`);
30
+ }
31
+
32
+ return payload.extracted ? (payload.text || '') : '';
33
+ }
@@ -0,0 +1,45 @@
1
+ import path from 'path';
2
+ import { DefaultResourceLoader, SettingsManager } from '@mariozechner/pi-coding-agent';
3
+
4
+ export interface ExtensionSummary {
5
+ name: string;
6
+ path: string;
7
+ enabled: boolean;
8
+ tools: string[];
9
+ commands: string[];
10
+ }
11
+
12
+ export async function getExtensionsList(
13
+ projectRoot: string,
14
+ _mindRoot: string,
15
+ disabledExtensions: string[] = [],
16
+ ): Promise<ExtensionSummary[]> {
17
+ const settingsManager = SettingsManager.inMemory();
18
+
19
+ const loader = new DefaultResourceLoader({
20
+ cwd: projectRoot,
21
+ settingsManager,
22
+ systemPromptOverride: () => '',
23
+ appendSystemPromptOverride: () => [],
24
+ additionalSkillPaths: [],
25
+ });
26
+
27
+ try {
28
+ await loader.reload();
29
+ const result = loader.getExtensions();
30
+
31
+ return result.extensions.map((ext) => {
32
+ const name = path.basename(ext.path, path.extname(ext.path));
33
+ return {
34
+ name,
35
+ path: ext.resolvedPath || ext.path,
36
+ enabled: !disabledExtensions.includes(name),
37
+ tools: [...ext.tools.keys()],
38
+ commands: [...ext.commands.keys()],
39
+ };
40
+ });
41
+ } catch (error) {
42
+ console.error('[getExtensionsList] Failed to load extensions:', error);
43
+ return [];
44
+ }
45
+ }