@geminilight/mindos 0.6.27 → 0.6.29

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 (67) hide show
  1. package/app/app/api/a2a/agents/route.ts +9 -0
  2. package/app/app/api/a2a/delegations/route.ts +9 -0
  3. package/app/app/api/a2a/discover/route.ts +2 -0
  4. package/app/app/api/a2a/route.ts +6 -6
  5. package/app/app/api/acp/detect/route.ts +91 -0
  6. package/app/app/api/acp/registry/route.ts +31 -0
  7. package/app/app/api/acp/session/route.ts +55 -0
  8. package/app/app/layout.tsx +2 -0
  9. package/app/components/DirView.tsx +64 -2
  10. package/app/components/FileTree.tsx +19 -0
  11. package/app/components/GuideCard.tsx +7 -17
  12. package/app/components/MarkdownView.tsx +2 -0
  13. package/app/components/SearchModal.tsx +234 -80
  14. package/app/components/agents/AgentDetailContent.tsx +51 -6
  15. package/app/components/agents/AgentsContentPage.tsx +24 -6
  16. package/app/components/agents/AgentsOverviewSection.tsx +11 -0
  17. package/app/components/agents/AgentsPanelA2aTab.tsx +445 -0
  18. package/app/components/agents/SkillDetailPopover.tsx +4 -9
  19. package/app/components/agents/agents-content-model.ts +2 -2
  20. package/app/components/ask/AskContent.tsx +8 -0
  21. package/app/components/help/HelpContent.tsx +74 -18
  22. package/app/components/panels/AgentsPanel.tsx +1 -0
  23. package/app/components/panels/AgentsPanelAgentDetail.tsx +5 -8
  24. package/app/components/panels/AgentsPanelAgentListRow.tsx +10 -1
  25. package/app/components/panels/AgentsPanelHubNav.tsx +8 -1
  26. package/app/components/panels/EchoPanel.tsx +5 -1
  27. package/app/components/panels/EchoSidebarStats.tsx +136 -0
  28. package/app/components/settings/KnowledgeTab.tsx +3 -6
  29. package/app/components/settings/McpSkillsSection.tsx +4 -5
  30. package/app/components/settings/McpTab.tsx +6 -8
  31. package/app/components/setup/StepSecurity.tsx +4 -5
  32. package/app/components/setup/index.tsx +5 -11
  33. package/app/components/ui/Toaster.tsx +39 -0
  34. package/app/hooks/useA2aRegistry.ts +6 -1
  35. package/app/hooks/useAcpDetection.ts +65 -0
  36. package/app/hooks/useAcpRegistry.ts +51 -0
  37. package/app/hooks/useDelegationHistory.ts +49 -0
  38. package/app/lib/a2a/client.ts +49 -5
  39. package/app/lib/a2a/orchestrator.ts +0 -1
  40. package/app/lib/a2a/task-handler.ts +4 -4
  41. package/app/lib/a2a/types.ts +15 -0
  42. package/app/lib/acp/acp-tools.ts +93 -0
  43. package/app/lib/acp/bridge.ts +138 -0
  44. package/app/lib/acp/index.ts +24 -0
  45. package/app/lib/acp/registry.ts +135 -0
  46. package/app/lib/acp/session.ts +264 -0
  47. package/app/lib/acp/subprocess.ts +209 -0
  48. package/app/lib/acp/types.ts +136 -0
  49. package/app/lib/agent/tools.ts +2 -1
  50. package/app/lib/i18n/_core.ts +22 -0
  51. package/app/lib/i18n/index.ts +35 -0
  52. package/app/lib/i18n/modules/ai-chat.ts +215 -0
  53. package/app/lib/i18n/modules/common.ts +71 -0
  54. package/app/lib/i18n/modules/features.ts +153 -0
  55. package/app/lib/i18n/modules/knowledge.ts +425 -0
  56. package/app/lib/i18n/modules/navigation.ts +151 -0
  57. package/app/lib/i18n/modules/onboarding.ts +523 -0
  58. package/app/lib/i18n/modules/panels.ts +1052 -0
  59. package/app/lib/i18n/modules/settings.ts +585 -0
  60. package/app/lib/i18n-en.ts +2 -1518
  61. package/app/lib/i18n-zh.ts +2 -1542
  62. package/app/lib/i18n.ts +3 -6
  63. package/app/lib/toast.ts +79 -0
  64. package/bin/cli.js +25 -25
  65. package/bin/commands/file.js +29 -2
  66. package/bin/commands/space.js +249 -91
  67. package/package.json +1 -1
@@ -0,0 +1,136 @@
1
+ /**
2
+ * ACP (Agent Client Protocol) — Core Types for MindOS ACP integration.
3
+ * ACP uses JSON-RPC 2.0 over stdio (subprocess model), not HTTP.
4
+ * Sessions are stateful with prompt turns, tool calls, and streaming updates.
5
+ * Reference: https://agentclientprotocol.com
6
+ */
7
+
8
+ /* ── Transport ────────────────────────────────────────────────────────── */
9
+
10
+ /** How an ACP agent is spawned */
11
+ export type AcpTransportType = 'stdio' | 'npx' | 'uvx' | 'binary';
12
+
13
+ /* ── Capabilities ─────────────────────────────────────────────────────── */
14
+
15
+ /** What MindOS exposes as an ACP agent */
16
+ export interface AcpCapabilities {
17
+ streaming: boolean;
18
+ toolCalls: boolean;
19
+ multiTurn: boolean;
20
+ cancellation: boolean;
21
+ }
22
+
23
+ /* ── Session ──────────────────────────────────────────────────────────── */
24
+
25
+ export type AcpSessionState = 'idle' | 'active' | 'error';
26
+
27
+ export interface AcpSession {
28
+ id: string;
29
+ agentId: string;
30
+ state: AcpSessionState;
31
+ createdAt: string;
32
+ lastActivityAt: string;
33
+ }
34
+
35
+ /* ── JSON-RPC (ACP uses JSON-RPC 2.0 over stdio) ─────────────────────── */
36
+
37
+ export interface AcpJsonRpcRequest {
38
+ jsonrpc: '2.0';
39
+ id: string | number;
40
+ method: string;
41
+ params?: Record<string, unknown>;
42
+ }
43
+
44
+ export interface AcpJsonRpcResponse {
45
+ jsonrpc: '2.0';
46
+ id: string | number | null;
47
+ result?: unknown;
48
+ error?: AcpJsonRpcError;
49
+ }
50
+
51
+ export interface AcpJsonRpcError {
52
+ code: number;
53
+ message: string;
54
+ data?: unknown;
55
+ }
56
+
57
+ /* ── Prompt ────────────────────────────────────────────────────────────── */
58
+
59
+ export interface AcpPromptRequest {
60
+ sessionId: string;
61
+ text: string;
62
+ metadata?: Record<string, unknown>;
63
+ }
64
+
65
+ export interface AcpPromptResponse {
66
+ sessionId: string;
67
+ text: string;
68
+ done: boolean;
69
+ toolCalls?: AcpToolCall[];
70
+ metadata?: Record<string, unknown>;
71
+ }
72
+
73
+ /* ── Session Updates (streaming) ──────────────────────────────────────── */
74
+
75
+ export type AcpUpdateType = 'text' | 'tool_call' | 'tool_result' | 'done' | 'error';
76
+
77
+ export interface AcpSessionUpdate {
78
+ sessionId: string;
79
+ type: AcpUpdateType;
80
+ text?: string;
81
+ toolCall?: AcpToolCall;
82
+ toolResult?: AcpToolResult;
83
+ error?: string;
84
+ }
85
+
86
+ /* ── Tool Calls ───────────────────────────────────────────────────────── */
87
+
88
+ export interface AcpToolCall {
89
+ id: string;
90
+ name: string;
91
+ arguments: Record<string, unknown>;
92
+ }
93
+
94
+ export interface AcpToolResult {
95
+ callId: string;
96
+ result: string;
97
+ isError?: boolean;
98
+ }
99
+
100
+ /* ── Registry ─────────────────────────────────────────────────────────── */
101
+
102
+ /** An entry from the ACP registry (registry.json) */
103
+ export interface AcpRegistryEntry {
104
+ id: string;
105
+ name: string;
106
+ description: string;
107
+ version?: string;
108
+ transport: AcpTransportType;
109
+ command: string;
110
+ args?: string[];
111
+ env?: Record<string, string>;
112
+ tags?: string[];
113
+ homepage?: string;
114
+ }
115
+
116
+ /** Parsed registry response */
117
+ export interface AcpRegistry {
118
+ version: string;
119
+ agents: AcpRegistryEntry[];
120
+ fetchedAt: string;
121
+ }
122
+
123
+ /* ── Error Codes ──────────────────────────────────────────────────────── */
124
+
125
+ export const ACP_ERRORS = {
126
+ SESSION_NOT_FOUND: { code: -32001, message: 'Session not found' },
127
+ SESSION_BUSY: { code: -32002, message: 'Session is busy' },
128
+ AGENT_NOT_FOUND: { code: -32003, message: 'Agent not found in registry' },
129
+ SPAWN_FAILED: { code: -32004, message: 'Failed to spawn agent process' },
130
+ TRANSPORT_ERROR: { code: -32005, message: 'Transport error' },
131
+ PARSE_ERROR: { code: -32700, message: 'Parse error' },
132
+ INVALID_REQUEST: { code: -32600, message: 'Invalid request' },
133
+ METHOD_NOT_FOUND: { code: -32601, message: 'Method not found' },
134
+ INVALID_PARAMS: { code: -32602, message: 'Invalid params' },
135
+ INTERNAL_ERROR: { code: -32603, message: 'Internal error' },
136
+ } as const;
@@ -10,6 +10,7 @@ import {
10
10
  import { readSkillContentByName, scanSkillDirs } from '@/lib/pi-integration/skills';
11
11
  import { callMcporterTool, createMcporterAgentTools, listMcporterServers, listMcporterTools } from '@/lib/pi-integration/mcporter';
12
12
  import { a2aTools } from '@/lib/a2a/a2a-tools';
13
+ import { acpTools } from '@/lib/acp/acp-tools';
13
14
 
14
15
  // Max chars per file to avoid token overflow (~100k chars ≈ ~25k tokens)
15
16
  const MAX_FILE_CHARS = 20_000;
@@ -187,7 +188,7 @@ export function getOrganizeTools(): AgentTool<any>[] {
187
188
  }
188
189
 
189
190
  export async function getRequestScopedTools(): Promise<AgentTool<any>[]> {
190
- const baseTools = [...knowledgeBaseTools, ...a2aTools];
191
+ const baseTools = [...knowledgeBaseTools, ...a2aTools, ...acpTools];
191
192
  try {
192
193
  const result = await listMcporterServers();
193
194
  const okServers = (result.servers ?? []).filter((server) => server.status === 'ok');
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Recursively widen literal string types to `string` so zh values can differ from en.
3
+ *
4
+ * Without Widen<T>, TypeScript would require zh strings to be the *exact* literal values from en.
5
+ * E.g., if en has `common: { hello: "hello" as const }`, zh would be required to also have "hello".
6
+ *
7
+ * This type converts all string literals to generic `string`, allowing Chinese translations to use
8
+ * completely different values while maintaining structure compatibility.
9
+ *
10
+ * Example:
11
+ * ```
12
+ * en = { msg: "Hello" as const } // string literal "Hello"
13
+ * zh_without = { msg: "你好" } satisfies typeof en // ❌ ERROR: "你好" not assignable to "Hello"
14
+ * zh_with = { msg: "你好" } satisfies Widen<typeof en> // ✅ OK: string satisfies string
15
+ * ```
16
+ */
17
+ export type Widen<T> =
18
+ T extends string ? string :
19
+ T extends readonly (infer U)[] ? readonly Widen<U>[] :
20
+ T extends (...args: infer A) => infer R ? (...args: A) => Widen<R> :
21
+ T extends object ? { [K in keyof T]: Widen<T[K]> } :
22
+ T;
@@ -0,0 +1,35 @@
1
+ import type { Widen } from './_core';
2
+ import { commonEn, commonZh } from './modules/common';
3
+ import { navigationEn, navigationZh } from './modules/navigation';
4
+ import { aiChatEn, aiChatZh } from './modules/ai-chat';
5
+ import { knowledgeEn, knowledgeZh } from './modules/knowledge';
6
+ import { panelsEn, panelsZh } from './modules/panels';
7
+ import { settingsEn, settingsZh } from './modules/settings';
8
+ import { onboardingEn, onboardingZh } from './modules/onboarding';
9
+ import { featuresEn, featuresZh } from './modules/features';
10
+
11
+ export const en = {
12
+ ...commonEn,
13
+ ...navigationEn,
14
+ ...aiChatEn,
15
+ ...knowledgeEn,
16
+ ...panelsEn,
17
+ ...settingsEn,
18
+ ...onboardingEn,
19
+ ...featuresEn,
20
+ } as const;
21
+
22
+ export const zh: Widen<typeof en> = {
23
+ ...commonZh,
24
+ ...navigationZh,
25
+ ...aiChatZh,
26
+ ...knowledgeZh,
27
+ ...panelsZh,
28
+ ...settingsZh,
29
+ ...onboardingZh,
30
+ ...featuresZh,
31
+ };
32
+
33
+ export type Locale = 'en' | 'zh';
34
+ export const messages = { en, zh } as const;
35
+ export type Messages = typeof en;
@@ -0,0 +1,215 @@
1
+ // ask + changes + hints
2
+
3
+ export const aiChatEn = {
4
+ ask: {
5
+ title: 'MindOS Agent',
6
+ fabLabel: 'Ask AI',
7
+ placeholder: 'Ask a question... @ files, / skills',
8
+ emptyPrompt: 'Ask anything about your knowledge base',
9
+ send: 'send',
10
+ newlineHint: 'new line',
11
+ panelComposerResize: 'Drag up to enlarge the input area',
12
+ panelComposerFooter: 'Resize height',
13
+ panelComposerResetHint: 'Double-click to reset height',
14
+ panelComposerKeyboard: 'Arrow keys adjust height; Home/End min/max',
15
+ attachFile: 'Context',
16
+ uploadedFiles: 'Uploaded',
17
+ skillsHint: 'skills',
18
+ attachCurrent: 'attach current file',
19
+ stopTitle: 'Stop',
20
+ cancelReconnect: 'Cancel reconnect',
21
+ connecting: 'Thinking with you...',
22
+ thinking: 'Thinking...',
23
+ thinkingLabel: 'Thinking',
24
+ searching: 'Searching knowledge base...',
25
+ generating: 'Generating response...',
26
+ stopped: 'Generation stopped.',
27
+ errorNoResponse: 'AI returned no content. Possible causes: model does not support streaming, proxy compatibility issue, or request exceeds context limit.',
28
+ reconnecting: (attempt: number, max: number) => `Connection lost. Reconnecting (${attempt}/${max})...`,
29
+ reconnectFailed: 'Connection failed after multiple attempts.',
30
+ retry: 'Retry',
31
+ suggestions: [
32
+ 'Summarize this document',
33
+ 'List all action items and TODOs',
34
+ 'What are the key points?',
35
+ 'Find related notes on this topic',
36
+ ],
37
+ sessionHistory: 'Session History',
38
+ clearAll: 'Clear all',
39
+ confirmClear: 'Confirm clear?',
40
+ noSessions: 'No saved sessions.',
41
+ draftingHint: 'AI is still running — you can draft the next step now.',
42
+ },
43
+ changes: {
44
+ unreadBanner: (n: number) => `${n} content change${n === 1 ? '' : 's'} unread`,
45
+ reviewNow: 'Review now',
46
+ dismiss: 'Dismiss notification',
47
+ title: 'Content changes',
48
+ subtitle: 'Review recent edits across user and agent operations.',
49
+ eventsCount: (n: number) => `${n} event${n === 1 ? '' : 's'}`,
50
+ unreadCount: (n: number) => `${n} unread`,
51
+ refresh: 'Refresh',
52
+ markSeen: 'Mark seen',
53
+ markAllRead: 'Mark all read',
54
+ filters: {
55
+ filePath: 'File path',
56
+ filePathPlaceholder: 'e.g. Projects/plan.md',
57
+ source: 'Agents (source)',
58
+ operation: 'Tools (operation)',
59
+ operationAll: 'All operations',
60
+ keyword: 'Keyword',
61
+ keywordPlaceholder: 'summary / op / path',
62
+ all: 'All',
63
+ agent: 'Agent',
64
+ user: 'User',
65
+ system: 'System',
66
+ },
67
+ loading: 'Loading changes...',
68
+ empty: 'No content changes yet.',
69
+ open: 'Open',
70
+ unchangedLines: (n: number) => `... ${n} unchanged lines ...`,
71
+ relativeTime: {
72
+ justNow: 'just now',
73
+ minutesAgo: (n: number) => `${n}m ago`,
74
+ hoursAgo: (n: number) => `${n}h ago`,
75
+ daysAgo: (n: number) => `${n}d ago`,
76
+ },
77
+ },
78
+ /** Disabled-state and contextual tooltip hints */
79
+ hints: {
80
+ noValidFiles: 'No valid files selected',
81
+ aiOrganizing: 'AI is organizing',
82
+ importInProgress: 'Import in progress',
83
+ templateInitializing: 'Another template is being initialized',
84
+ configureAiKey: 'Configure API key in Settings → AI',
85
+ syncInProgress: 'Sync already in progress',
86
+ toggleInProgress: 'Toggle operation in progress',
87
+ typeMessage: 'Type a message',
88
+ mentionInProgress: 'Mention or command in progress',
89
+ cleanupInProgress: 'Cleanup already in progress',
90
+ tokenResetInProgress: 'Token reset in progress',
91
+ aiNotConfigured: 'AI not configured or generation in progress',
92
+ generationInProgress: 'Generation in progress or AI not configured',
93
+ cannotJumpForward: 'Cannot jump forward in setup',
94
+ testInProgressOrNoKey: 'Test in progress or no API key',
95
+ workflowStepRunning: 'Workflow step already running',
96
+ workflowRunning: 'Workflow step is running',
97
+ sessionHistory: 'Session history',
98
+ newSession: 'New session',
99
+ attachFile: 'Attach local file',
100
+ maximizePanel: 'Maximize panel',
101
+ restorePanel: 'Restore panel',
102
+ dockToSide: 'Dock to side panel',
103
+ openAsPopup: 'Open as popup',
104
+ closePanel: 'Close',
105
+ newChat: 'New chat',
106
+ closeSession: 'Close session',
107
+ },
108
+ } as const;
109
+
110
+ export const aiChatZh = {
111
+ ask: {
112
+ title: 'MindOS Agent',
113
+ fabLabel: 'AI 助手',
114
+ placeholder: '输入问题… @ 附加文件,/ 技能',
115
+ emptyPrompt: '可以问任何关于知识库的问题',
116
+ send: '发送',
117
+ newlineHint: '换行',
118
+ panelComposerResize: '向上拖拽以拉高输入区',
119
+ panelComposerFooter: '拉高输入区',
120
+ panelComposerResetHint: '双击恢复默认高度',
121
+ panelComposerKeyboard: '方向键调节高度;Home/End 最小或最大',
122
+ attachFile: '上下文',
123
+ uploadedFiles: '已上传',
124
+ skillsHint: '技能',
125
+ attachCurrent: '附加当前文件',
126
+ stopTitle: '停止',
127
+ cancelReconnect: '取消重连',
128
+ connecting: '正在和你一起思考...',
129
+ thinking: '思考中...',
130
+ thinkingLabel: '思考中',
131
+ searching: '正在搜索知识库...',
132
+ generating: '正在生成回复...',
133
+ stopped: '已停止生成。',
134
+ errorNoResponse: 'AI 未返回有效内容。可能原因:模型不支持流式输出、中转站兼容性问题、或请求超出上下文限制。',
135
+ reconnecting: (attempt: number, max: number) => `连接中断,正在重连 (${attempt}/${max})...`,
136
+ reconnectFailed: '多次重连失败,请检查网络后重试。',
137
+ retry: '重试',
138
+ suggestions: [
139
+ '总结这篇文档',
140
+ '列出所有待办事项',
141
+ '这篇文档的核心要点是什么?',
142
+ '查找与这个主题相关的笔记',
143
+ ],
144
+ sessionHistory: '对话历史',
145
+ clearAll: '清除全部',
146
+ confirmClear: '确认清除?',
147
+ noSessions: '暂无历史对话。',
148
+ draftingHint: 'AI 仍在执行,你可以先输入下一步。',
149
+ },
150
+ changes: {
151
+ unreadBanner: (n: number) => `${n} 条内容变更未读`,
152
+ reviewNow: '立即查看',
153
+ dismiss: '关闭提醒',
154
+ title: '内容变更',
155
+ subtitle: '集中查看用户与 Agent 的最近编辑记录。',
156
+ eventsCount: (n: number) => `${n} 条事件`,
157
+ unreadCount: (n: number) => `${n} 条未读`,
158
+ refresh: '刷新',
159
+ markSeen: '标记已读',
160
+ markAllRead: '全部已读',
161
+ filters: {
162
+ filePath: '文件路径',
163
+ filePathPlaceholder: '例如:Projects/plan.md',
164
+ source: 'Agents(来源)',
165
+ operation: 'Tools(操作)',
166
+ operationAll: '全部操作',
167
+ keyword: '关键词',
168
+ keywordPlaceholder: '摘要 / 操作 / 路径',
169
+ all: '全部',
170
+ agent: 'Agent',
171
+ user: '用户',
172
+ system: '系统',
173
+ },
174
+ loading: '正在加载变更...',
175
+ empty: '暂无内容变更。',
176
+ open: '打开',
177
+ unchangedLines: (n: number) => `... ${n} 行未变更 ...`,
178
+ relativeTime: {
179
+ justNow: '刚刚',
180
+ minutesAgo: (n: number) => `${n} 分钟前`,
181
+ hoursAgo: (n: number) => `${n} 小时前`,
182
+ daysAgo: (n: number) => `${n} 天前`,
183
+ },
184
+ },
185
+ /** 禁用态和上下文提示文案 */
186
+ hints: {
187
+ noValidFiles: '未选择有效文件',
188
+ aiOrganizing: 'AI 正在整理中',
189
+ importInProgress: '正在导入',
190
+ templateInitializing: '正在初始化另一个模板',
191
+ configureAiKey: '请在 设置 → AI 中配置 API 密钥',
192
+ syncInProgress: '正在同步中',
193
+ toggleInProgress: '正在切换中',
194
+ typeMessage: '请输入消息',
195
+ mentionInProgress: '正在输入提及或命令',
196
+ cleanupInProgress: '正在清理中',
197
+ tokenResetInProgress: '正在重置令牌',
198
+ aiNotConfigured: 'AI 未配置或正在生成',
199
+ generationInProgress: '正在生成或 AI 未配置',
200
+ cannotJumpForward: '无法跳过前序步骤',
201
+ testInProgressOrNoKey: '正在测试或未配置 API 密钥',
202
+ workflowStepRunning: '工作流步骤正在运行',
203
+ workflowRunning: '工作流步骤正在运行',
204
+ sessionHistory: '会话历史',
205
+ newSession: '新会话',
206
+ attachFile: '附加本地文件',
207
+ maximizePanel: '最大化面板',
208
+ restorePanel: '还原面板',
209
+ dockToSide: '停靠到侧边栏',
210
+ openAsPopup: '弹窗模式',
211
+ closePanel: '关闭',
212
+ newChat: '新对话',
213
+ closeSession: '关闭会话',
214
+ },
215
+ };
@@ -0,0 +1,71 @@
1
+ // common + app + login + notFound + updateBanner
2
+
3
+ export const commonEn = {
4
+ common: {
5
+ relatedFiles: 'Related Files',
6
+ },
7
+ app: {
8
+ tagline: 'You think here, Agents act there.',
9
+ footer: 'MindOS · human-agent collaborative mind system',
10
+ },
11
+ login: {
12
+ tagline: 'You think here, Agents act there.',
13
+ subtitle: 'Enter your password to continue',
14
+ passwordLabel: 'Password',
15
+ passwordPlaceholder: 'Enter password',
16
+ signIn: 'Sign in',
17
+ signingIn: 'Signing in…',
18
+ incorrectPassword: 'Incorrect password. Please try again.',
19
+ connectionError: 'Connection error. Please try again.',
20
+ },
21
+ notFound: {
22
+ title: 'File not found',
23
+ description: 'This file does not exist in your knowledge base.',
24
+ createButton: 'Create this file',
25
+ creating: 'Creating...',
26
+ goToParent: 'Go to parent folder',
27
+ goHome: 'Home',
28
+ },
29
+ updateBanner: {
30
+ newVersion: (latest: string, current: string) => `MindOS v${latest} available (current: v${current})`,
31
+ updateNow: 'Update',
32
+ runUpdate: 'Run',
33
+ orSee: 'or',
34
+ releaseNotes: 'release notes',
35
+ },
36
+ } as const;
37
+
38
+ export const commonZh = {
39
+ common: {
40
+ relatedFiles: '关联视图',
41
+ },
42
+ app: {
43
+ tagline: '你在此思考,Agent 依此行动。',
44
+ footer: 'MindOS · 人机共生知识系统',
45
+ },
46
+ login: {
47
+ tagline: '人类在此思考,Agent 依此行动。',
48
+ subtitle: '请输入密码以继续',
49
+ passwordLabel: '密码',
50
+ passwordPlaceholder: '输入密码',
51
+ signIn: '登录',
52
+ signingIn: '登录中…',
53
+ incorrectPassword: '密码错误,请重试。',
54
+ connectionError: '连接错误,请重试。',
55
+ },
56
+ notFound: {
57
+ title: '文件未找到',
58
+ description: '该文件不存在于你的知识库中。',
59
+ createButton: '创建此文件',
60
+ creating: '创建中...',
61
+ goToParent: '返回上级目录',
62
+ goHome: '首页',
63
+ },
64
+ updateBanner: {
65
+ newVersion: (latest: string, current: string) => `MindOS v${latest} 可用(当前 v${current})`,
66
+ updateNow: '更新',
67
+ runUpdate: '终端运行',
68
+ orSee: '或',
69
+ releaseNotes: '查看更新说明',
70
+ },
71
+ };
@@ -0,0 +1,153 @@
1
+ // shortcuts + help
2
+
3
+ export const featuresEn = {
4
+ shortcuts: [
5
+ { keys: ['⌘', 'K'], description: 'Search' },
6
+ { keys: ['⌘', '/'], description: 'MindOS Agent' },
7
+ { keys: ['⌘', ','], description: 'Settings' },
8
+ { keys: ['E'], description: 'Edit current file' },
9
+ { keys: ['⌘', 'S'], description: 'Save' },
10
+ { keys: ['Esc'], description: 'Cancel edit / close modal' },
11
+ { keys: ['@'], description: 'Attach file in MindOS Agent' },
12
+ ],
13
+ help: {
14
+ title: 'Help & Guide',
15
+ subtitle: 'Everything you need to get started with MindOS',
16
+ whatIs: {
17
+ title: 'What is MindOS?',
18
+ body: 'MindOS is where you think, and where your AI agents act. You and AI share the same brain — when you correct AI, that correction is captured automatically; next time AI understands you better, and your own thinking gets sharper along the way. You and AI grow together. In an age of AI anxiety, MindOS focuses on human growth — think clearly, make better decisions, ship faster, and build up knowledge that\'s truly yours.',
19
+ },
20
+ quickStart: {
21
+ title: 'Quick Start',
22
+ step1Title: 'Browse your knowledge base',
23
+ step1Desc: 'Click the Spaces icon in the left sidebar to explore your files. Each top-level folder is a "Space" — a themed area like Profile, Notes, or Projects.',
24
+ step2Title: 'Chat with AI',
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
+ step3Title: 'Connect your AI agents',
27
+ step3Desc: 'Go to Settings → MCP to connect external agents like Claude Code, Cursor, or Windsurf. Once connected, they can read and write your knowledge base directly.',
28
+ },
29
+ concepts: {
30
+ title: 'Core Concepts',
31
+ spaceTitle: 'Space',
32
+ spaceDesc: 'Spaces are knowledge partitions organized the way you think. You decide the structure, and AI agents follow it to read, write, and manage automatically.',
33
+ instructionTitle: 'Instruction',
34
+ instructionDesc: 'A rules file that all AI agents obey. You write the boundaries once, and every agent connected to your knowledge base follows them.',
35
+ skillTitle: 'Skill',
36
+ skillDesc: 'Teaches agents how to operate your knowledge base — reading, writing, organizing. Agents don\'t guess; they follow the skills you\'ve installed.',
37
+ },
38
+ shortcutsTitle: 'Keyboard Shortcuts',
39
+ agentUsage: {
40
+ title: 'Using MindOS with AI Agents',
41
+ intro: 'Once you connect an agent (Claude Code, Cursor, Windsurf, etc.) via MCP, just talk to it naturally. The agent can read and write your knowledge base directly — no special commands needed. Here are the most common scenarios:',
42
+ scenarios: [
43
+ { emoji: '🪪', title: 'Inject Your Identity', desc: 'Tell all AI agents who you are — preferences, tech stack, communication style — in one shot.', prompt: "\"Here's my resume, read it and organize my info into MindOS.\"" },
44
+ { emoji: '🔄', title: 'Cross-Agent Handoff', desc: 'Brainstorm ideas in GPT, then execute in Claude Code — zero context loss.', prompt: '"Save this conversation to MindOS."\n"Read the plan in MindOS and help me start coding."' },
45
+ { emoji: '📋', title: 'Experience → SOP', desc: 'Turn hard-won debugging sessions into reusable workflows that prevent future mistakes.', prompt: '"Help me distill this conversation into a reusable workflow in MindOS."' },
46
+ { emoji: '🚀', title: 'Project Cold Start', desc: 'Spin up a new project in minutes — your profile and SOPs guide the scaffolding automatically.', prompt: '"Help me start a new project following the Startup SOP in MindOS."' },
47
+ { emoji: '🔍', title: 'Research & Archive', desc: 'Let agents research competitors or topics for you, then file structured results in your knowledge base.', prompt: '"Help me research X, Y, Z products and save results to the MindOS product library."' },
48
+ ],
49
+ copy: 'Copy prompt',
50
+ hint: 'Tip: The agent auto-discovers your knowledge base structure. Just mention "MindOS" in your prompt and it will know where to look. Click "Explore" in the left sidebar for more scenarios.',
51
+ },
52
+ shortcuts: {
53
+ search: 'Search files',
54
+ askAI: 'Toggle AI panel',
55
+ settings: 'Open Settings',
56
+ shortcutPanel: 'Keyboard shortcuts panel',
57
+ editFile: 'Edit current file',
58
+ save: 'Save file',
59
+ closePanel: 'Close panel / Exit modal',
60
+ attachFile: 'Attach file in AI chat',
61
+ },
62
+ faq: {
63
+ title: 'FAQ',
64
+ items: [
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 → MCP & Skills. MindOS auto-detects installed agents (Claude Code, Cursor, etc.) and lets you connect them with one click.' },
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
+ { 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
+ { 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.' },
70
+ { q: 'What file formats are supported?', a: 'MindOS works best with Markdown (.md) files, but also supports JSON, CSV, and plain text. Plugins extend rendering for special formats like Kanban boards or timelines.' },
71
+ { q: 'How do I create a new note?', a: 'Click the + icon next to any folder in the file tree, or ask AI to create one for you. Notes are just Markdown files — you can also create them from your file system.' },
72
+ ],
73
+ },
74
+ },
75
+
76
+ /** Disabled-state and contextual tooltip hints */
77
+ } as const;
78
+
79
+ export const featuresZh = {
80
+ shortcuts: [
81
+ { keys: ['⌘', 'K'], description: '搜索' },
82
+ { keys: ['⌘', '/'], description: 'MindOS Agent' },
83
+ { keys: ['⌘', ','], description: '设置' },
84
+ { keys: ['E'], description: '编辑当前文件' },
85
+ { keys: ['⌘', 'S'], description: '保存' },
86
+ { keys: ['Esc'], description: '取消编辑 / 关闭弹窗' },
87
+ { keys: ['@'], description: '在 AI 对话中添加附件' },
88
+ ],
89
+ help: {
90
+ title: '帮助与指南',
91
+ subtitle: '开始使用 MindOS 所需的一切',
92
+ whatIs: {
93
+ title: '什么是 MindOS?',
94
+ body: 'MindOS 是你思考的地方,也是 AI Agent 行动的起点。你和 AI 共享同一个大脑——你纠正了 AI,这个纠正自动沉淀;AI 下次更懂你,你自己的思路也跟着变清晰。人和 AI 一起成长。在 AI 焦虑蔓延的时代,MindOS 更关注人的成长——想清楚问题、做好判断、快速实践、攒下属于自己的认知。',
95
+ },
96
+ quickStart: {
97
+ title: '快速开始',
98
+ step1Title: '浏览你的知识库',
99
+ step1Desc: '点击左侧边栏的"空间"图标来浏览你的文件。每个顶级文件夹是一个"空间"——比如 Profile、Notes 或 Projects。',
100
+ step2Title: '和 AI 对话',
101
+ step2Desc: '按 ⌘/(或 Ctrl/)打开 AI 面板。询问任何关于知识库的问题,或使用 @ 附加特定文件作为上下文。',
102
+ step3Title: '连接你的 AI Agent',
103
+ step3Desc: '前往 设置 → MCP 连接外部 Agent,如 Claude Code、Cursor 或 Windsurf。连接后,它们可以直接读写你的知识库。',
104
+ },
105
+ concepts: {
106
+ title: '核心概念',
107
+ spaceTitle: '空间(Space)',
108
+ spaceDesc: '空间是按你的思维方式组织的知识分区。你怎么想,就怎么分,AI Agent 遵循同样的结构来自动读写和管理。',
109
+ instructionTitle: '指令(Instruction)',
110
+ instructionDesc: '一份所有 AI Agent 都遵守的规则文件。你写一次边界,每个连接到知识库的 Agent 都会照做。',
111
+ skillTitle: '技能(Skill)',
112
+ skillDesc: '教 Agent 如何操作你的知识库——读取、写入、整理。Agent 不是瞎猜,而是按你安装的 Skill 来执行。',
113
+ },
114
+ shortcutsTitle: '快捷键',
115
+ agentUsage: {
116
+ title: '在 AI Agent 中使用 MindOS',
117
+ intro: '通过 MCP 连接 Agent(Claude Code、Cursor、Windsurf 等)后,直接用自然语言对话即可。Agent 能自动读写你的知识库,不需要特殊指令。以下是最常见的使用场景:',
118
+ scenarios: [
119
+ { emoji: '🪪', title: '注入身份', desc: '让所有 AI Agent 一次认识你——偏好、技术栈、沟通风格。', prompt: '"这是我的简历,读一下,把我的信息整理到 MindOS 里。"' },
120
+ { emoji: '🔄', title: '跨 Agent 切换', desc: '在 GPT 里聊想法,到 Claude Code 去执行——上下文零丢失。', prompt: '"帮我把刚才的对话整理到 MindOS。"\n"读一下 MindOS 里的方案,帮我开始写代码。"' },
121
+ { emoji: '📋', title: '经验→SOP', desc: '把踩坑经验沉淀为可复用的工作流,下次 3 分钟搞定。', prompt: '"帮我把这次对话的经验沉淀到 MindOS,形成可复用的工作流。"' },
122
+ { emoji: '🚀', title: '项目冷启动', desc: '几分钟搭建新项目——Profile 和 SOP 自动引导脚手架。', prompt: '"帮我按 MindOS 里的 Startup SOP 启动一个新项目。"' },
123
+ { emoji: '🔍', title: '调研入库', desc: '让 Agent 替你调研竞品或话题,结果结构化存入知识库。', prompt: '"帮我调研 X、Y、Z 这几个产品,结果写入 MindOS 产品库。"' },
124
+ ],
125
+ copy: '复制 Prompt',
126
+ hint: '提示:Agent 会自动发现你的知识库结构。在 prompt 中提到"MindOS",它就知道去哪里找。点击左侧"探索"查看更多场景。',
127
+ },
128
+ shortcuts: {
129
+ search: '搜索文件',
130
+ askAI: '切换 AI 面板',
131
+ settings: '打开设置',
132
+ shortcutPanel: '快捷键面板',
133
+ editFile: '编辑当前文件',
134
+ save: '保存文件',
135
+ closePanel: '关闭面板 / 退出弹窗',
136
+ attachFile: '在 AI 对话中附加文件',
137
+ },
138
+ faq: {
139
+ title: '常见问题',
140
+ items: [
141
+ { q: '如何切换语言?', a: '前往 设置 → 外观 → 语言。支持中文和英文切换。' },
142
+ { q: '如何连接 AI Agent?', a: '前往 设置 → MCP & Skills。MindOS 会自动检测已安装的 Agent(Claude Code、Cursor 等),一键即可连接。' },
143
+ { q: '我的数据存储在哪里?', a: '所有数据以纯 Markdown 文件的形式存储在你的本地机器上。MindOS 不会将你的数据上传到任何云服务。数据完全由你掌控。' },
144
+ { q: '如何跨设备同步?', a: '前往 设置 → 同步。MindOS 使用 Git 进行跨设备同步。输入 Git 远程仓库 URL 和访问令牌即可开始同步。' },
145
+ { q: '可以使用自己的 AI 服务商吗?', a: '可以!前往 设置 → AI。支持 OpenAI、Anthropic、Google,或任何 OpenAI 兼容的 API(自定义 Base URL)。' },
146
+ { q: '支持哪些文件格式?', a: 'MindOS 最适合 Markdown(.md)文件,但也支持 JSON、CSV 和纯文本。插件可以扩展特殊格式的渲染,如看板或时间线。' },
147
+ { q: '如何创建新笔记?', a: '点击文件树中任意文件夹旁的 + 图标,或让 AI 帮你创建。笔记就是 Markdown 文件,你也可以直接在文件系统中创建。' },
148
+ ],
149
+ },
150
+ },
151
+
152
+ /** 禁用态和上下文提示文案 */
153
+ };