@mobius-os/mobius 0.3.24 → 0.3.25

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mobius-os/mobius",
3
- "version": "0.3.24",
3
+ "version": "0.3.25",
4
4
  "type": "module",
5
5
  "description": "Mobius terminal client. Reuses Mobius frontend TypeScript types and jsonl entry shapes.",
6
6
  "bin": {
@@ -10,6 +10,7 @@
10
10
  * Preferences are stored INSIDE the selected Issue (switching issues restores
11
11
  * that issue's saved model/language/skill/memory choices).
12
12
  */
13
+ import { randomBytes } from 'crypto'
13
14
  import React, { useEffect, useState } from 'react'
14
15
  import { Box, Text } from 'ink'
15
16
  import { Select, TextInput, type SelectItem } from './primitives.js'
@@ -121,7 +122,7 @@ export function PrepScreen({ client, onReady, onQuit }: {
121
122
  // 客户端 cwd 对服务器无意义(Windows 路径如 C:\Users\... 在 Linux 上会被误解析为相对路径)。
122
123
  // 用项目名+随机后缀生成唯一服务器端子目录,由服务器 resolveBindPath 拼到用户 work_dir 下。
123
124
  const slug = (name || '未命名项目').replace(/[^a-zA-Z0-9一-鿿_-]/g, '-').replace(/-+/g, '-').replace(/^-|-$/g, '').slice(0, 56) || 'project'
124
- const suffix = require('crypto').randomBytes(3).toString('hex')
125
+ const suffix = randomBytes(3).toString('hex')
125
126
  const safeDir = `/${slug}-${suffix}`
126
127
  const p = await client.createProject({ name: name || '未命名项目', description, bindPath: safeDir, defaultUseWorktree: false })
127
128
  const list = await client.listProjects(); await saveProjectsCache(list); setProjects(list)