@geminilight/mindos 0.5.27 → 0.5.28

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.
@@ -223,14 +223,20 @@ export default function ServerStatus({ status, agents, t }: McpServerStatusProps
223
223
 
224
224
  {/* Hint for remote mode */}
225
225
  {mode === 'http' && (
226
- <p className="text-[11px] text-muted-foreground leading-relaxed">
227
- {isRemote
228
- ? (m?.remoteDetectedHint ?? 'Uses your current remote IP. Ensure the MCP port is accessible from the target device.')
229
- : (m?.remoteManualHint ?? 'Tip: access MindOS from a remote device to auto-detect the correct IP, or replace 127.0.0.1 with your server\'s LAN IP.')}
226
+ <div className="text-[11px] text-muted-foreground leading-relaxed space-y-1">
227
+ <p>
228
+ {isRemote
229
+ ? (m?.remoteDetectedHint ?? 'Using your current remote IP.')
230
+ : (m?.remoteManualHint ?? 'Replace 127.0.0.1 with your server\'s public or LAN IP.')}
231
+ </p>
232
+ <p>
233
+ {(m?.remoteSteps ?? 'To connect from another device: ① Open port {port} in firewall/security group ② Use the config below in your Agent ③ For public networks, consider SSH tunnel for encryption.')
234
+ .replace('{port}', String(status.port))}
235
+ </p>
230
236
  {!status.authConfigured && (
231
- <span className="text-amber-500 ml-1">{m?.noAuthWarning ?? '⚠ No auth token set configure one in Settings → General for secure remote access.'}</span>
237
+ <p className="text-amber-500">{m?.noAuthWarning ?? '⚠ No auth token — set one in Settings → General before enabling remote access.'}</p>
232
238
  )}
233
- </p>
239
+ </div>
234
240
  )}
235
241
 
236
242
  {/* Copy config + show JSON toggle */}
@@ -265,9 +265,10 @@ export const en = {
265
265
  transportRemote: 'Remote',
266
266
  transportLocalHint: 'Local — same machine as MindOS server',
267
267
  transportRemoteHint: 'Remote — connect from another device via HTTP',
268
- remoteDetectedHint: 'Uses your current remote IP. Ensure the MCP port is accessible from the target device.',
269
- remoteManualHint: 'Tip: access MindOS from a remote device to auto-detect the correct IP, or replace 127.0.0.1 with your server\'s LAN IP.',
270
- noAuthWarning: ' No auth token set configure one in Settings General for secure remote access.',
268
+ remoteDetectedHint: 'Using your current remote IP.',
269
+ remoteManualHint: 'Replace 127.0.0.1 with your server\'s public or LAN IP.',
270
+ remoteSteps: 'To connect from another device: Open port {port} in firewall/security group Use the config below in your Agent ③ For public networks, consider SSH tunnel for encryption.',
271
+ noAuthWarning: '⚠ No auth token — set one in Settings → General before enabling remote access.',
271
272
  showJson: 'Show JSON',
272
273
  hideJson: 'Hide JSON',
273
274
  },
@@ -290,9 +290,10 @@ export const zh = {
290
290
  transportRemote: '远程',
291
291
  transportLocalHint: '本地 — 与 MindOS 服务在同一台机器上',
292
292
  transportRemoteHint: '远程 — 从其他设备通过 HTTP 连接',
293
- remoteDetectedHint: '使用当前远程 IP。请确保目标设备可以访问 MCP 端口。',
294
- remoteManualHint: '提示:从远程设备访问 MindOS 可自动检测正确 IP,或手动将 127.0.0.1 替换为服务器的局域网 IP。',
295
- noAuthWarning: ' 未设置认证令牌 请在 设置 通用 中配置,以确保远程访问安全。',
293
+ remoteDetectedHint: '使用当前远程 IP',
294
+ remoteManualHint: ' 127.0.0.1 替换为服务器的公网或局域网 IP。',
295
+ remoteSteps: '从其他设备连接:① 在防火墙/安全组中开放端口 {port} 将下方配置粘贴到 Agent ③ 公网环境建议使用 SSH 隧道加密传输。',
296
+ noAuthWarning: '⚠ 未设置认证令牌 — 请先在 设置 → 通用 中配置,再启用远程访问。',
296
297
  showJson: '显示 JSON',
297
298
  hideJson: '隐藏 JSON',
298
299
  },
package/app/next-env.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /// <reference types="next" />
2
2
  /// <reference types="next/image-types/global" />
3
- import "./.next/dev/types/routes.d.ts";
3
+ import "./.next/types/routes.d.ts";
4
4
 
5
5
  // NOTE: This file should not be edited
6
6
  // see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
@@ -3,7 +3,7 @@ import path from "path";
3
3
 
4
4
  const nextConfig: NextConfig = {
5
5
  transpilePackages: ['github-slugger'],
6
- serverExternalPackages: ['pdfjs-dist', 'pdf-parse', 'chokidar', 'openai', '@mariozechner/pi-ai', '@mariozechner/pi-agent-core'],
6
+ serverExternalPackages: ['chokidar', 'openai', '@mariozechner/pi-ai', '@mariozechner/pi-agent-core'],
7
7
  outputFileTracingRoot: path.join(__dirname),
8
8
  turbopack: {
9
9
  root: path.join(__dirname),
@@ -1,7 +1,7 @@
1
1
  import { execSync, spawn } from 'node:child_process';
2
- import { existsSync } from 'node:fs';
2
+ import { existsSync, readFileSync } from 'node:fs';
3
3
  import { resolve } from 'node:path';
4
- import { ROOT } from './constants.js';
4
+ import { ROOT, CONFIG_PATH } from './constants.js';
5
5
  import { bold, red, yellow } from './colors.js';
6
6
  import { npmInstall } from './utils.js';
7
7
 
@@ -14,10 +14,21 @@ export function spawnMcp(verbose = false) {
14
14
  console.log(yellow('Installing MCP dependencies (first run)...\n'));
15
15
  npmInstall(resolve(ROOT, 'mcp'), '--no-workspaces');
16
16
  }
17
+
18
+ // Read AUTH_TOKEN directly from config to avoid stale system env overriding
19
+ // the user's configured token. Config is the source of truth for auth.
20
+ let configAuthToken;
21
+ try {
22
+ const cfg = JSON.parse(readFileSync(CONFIG_PATH, 'utf-8'));
23
+ configAuthToken = cfg.authToken;
24
+ } catch { /* config may not exist yet */ }
25
+
17
26
  const env = {
18
27
  ...process.env,
19
28
  MCP_PORT: mcpPort,
29
+ MCP_HOST: process.env.MCP_HOST || '0.0.0.0',
20
30
  MINDOS_URL: process.env.MINDOS_URL || `http://127.0.0.1:${webPort}`,
31
+ ...(configAuthToken ? { AUTH_TOKEN: configAuthToken } : {}),
21
32
  ...(verbose ? { MCP_VERBOSE: '1' } : {}),
22
33
  };
23
34
  const child = spawn('npx', ['tsx', 'src/index.ts'], {
package/mcp/src/index.ts CHANGED
@@ -25,7 +25,7 @@ import { z } from "zod";
25
25
  const BASE_URL = process.env.MINDOS_URL ?? "http://localhost:3456";
26
26
  const AUTH_TOKEN = process.env.AUTH_TOKEN;
27
27
  const MCP_TRANSPORT = process.env.MCP_TRANSPORT ?? "http"; // "http" | "stdio"
28
- const MCP_HOST = process.env.MCP_HOST ?? "127.0.0.1";
28
+ const MCP_HOST = process.env.MCP_HOST ?? "0.0.0.0";
29
29
  const MCP_PORT = parseInt(process.env.MCP_PORT ?? "8781", 10);
30
30
  const MCP_ENDPOINT = process.env.MCP_ENDPOINT ?? "/mcp";
31
31
  const CHARACTER_LIMIT = 25_000;
@@ -510,7 +510,8 @@ async function main() {
510
510
 
511
511
  const httpServer = createServer(expressApp as Parameters<typeof createServer>[1]);
512
512
  httpServer.listen(MCP_PORT, MCP_HOST, () => {
513
- console.error(`MindOS MCP server (HTTP) listening on http://${MCP_HOST}:${MCP_PORT}${MCP_ENDPOINT}`);
513
+ const displayHost = MCP_HOST === '0.0.0.0' ? '127.0.0.1' : MCP_HOST;
514
+ console.error(`MindOS MCP server (HTTP) listening on http://${displayHost}:${MCP_PORT}${MCP_ENDPOINT}`);
514
515
  console.error(`API backend: ${BASE_URL}`);
515
516
  });
516
517
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geminilight/mindos",
3
- "version": "0.5.27",
3
+ "version": "0.5.28",
4
4
  "description": "MindOS — Human-Agent Collaborative Mind System. Local-first knowledge base that syncs your mind to all AI Agents via MCP.",
5
5
  "keywords": [
6
6
  "mindos",