【阶段一 · 紧急修复 F1】 - F1-1 file_editor regex 计数 bug:强制 g 标志 + 同一 RegExp 实例做 match+replace - F1-2 code_search 统一 safeResolvePath(含路径遍历 + MEMORY.md 拦截) - F1-3 git_commit amend 模式:message 可选 + --no-edit 防止编辑器 hang - F1-4 write_file append 模式原子化:显式 open(O_APPEND)+write+fsync+close 【阶段二 · 增强现有工具 F2】 - F2-1 read_file 智能编码检测:BOM(UTF-8/UTF-16 LE/BE) + GBK 降级 - F2-2 read_file 支持 tail 模式(读取末尾 N 行,适用日志) - F2-3 search_files 二进制过滤 + 智能编码检测 - F2-4 search_files 多 glob 匹配(逗号分隔,如 *.ts,*.js) - F2-5 file_editor 新增 find_replace 操作(字面量替换,规避正则歧义) - F2-6 file_editor regex 支持跨行匹配(multiline 参数) - F2-7 file_editor 新增 backup 参数(编辑前 .bak 备份) 【阶段三 · 新增工具 F3】 - F3-1 file_move:双路径校验 + overwrite + 自动建父目录 + rename 原子 - F3-2 file_info:大小/时间/类型/编码/二进制/权限位 【阶段四 · 优化 F4】 - F4-1 diff_viewer Uint32Array→Uint16Array(省一半内存)+ safeResolvePath + 智能编码 - F4-2 错误处理统一:diff-viewer/file-editor/code-search catch 块改用 extractErrorMessage 【阶段五 · 验证 F5】 - tsc --noEmit 类型检查通过 - 人工审查通过:路径校验/错误处理/原子性/资源释放/权限策略/导出注册 工具数量:13 → 15(新增 file_move / file_info)
82 lines
2.5 KiB
JSON
82 lines
2.5 KiB
JSON
{
|
|
"name": "metona-ai-desktop",
|
|
"version": "0.3.12",
|
|
"description": "MetonaAI Desktop — 生产级通用 AI Agent 智能体桌面应用",
|
|
"main": "dist-electron/main/main.js",
|
|
"author": "Metona Team",
|
|
"license": "MIT",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "electron-vite dev",
|
|
"build": "npm run prebuild && electron-vite build && electron-builder",
|
|
"prebuild": "npm dedupe && rimraf release",
|
|
"build:renderer": "electron-vite build --rendererOnly",
|
|
"build:electron": "tsc -p tsconfig.node.json",
|
|
"preview": "vite preview",
|
|
"lint": "eslint . --ext .ts,.tsx",
|
|
"lint:fix": "eslint . --ext .ts,.tsx --fix",
|
|
"format": "prettier --write \"src/**/*.{ts,tsx,css}\" \"electron/**/*.ts\"",
|
|
"typecheck": "tsc --noEmit",
|
|
"typecheck:node": "tsc -p tsconfig.node.json --noEmit",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"test:e2e": "playwright test"
|
|
},
|
|
"dependencies": {
|
|
"@emotion/react": "^11.14.0",
|
|
"@emotion/styled": "^11.14.1",
|
|
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
"@mui/icons-material": "^9.1.1",
|
|
"@mui/material": "^9.1.2",
|
|
"@types/shell-quote": "^1.7.5",
|
|
"better-sqlite3": "^11.9.1",
|
|
"date-fns": "^4.1.0",
|
|
"electron-log": "^5.3.3",
|
|
"electron-store": "^10.0.1",
|
|
"fuse.js": "^7.1.0",
|
|
"lru-cache": "^11.1.0",
|
|
"metona-toast": "^2.0.0",
|
|
"nanoid": "^5.1.5",
|
|
"react": "^19.1.0",
|
|
"react-dom": "^19.1.0",
|
|
"react-markdown": "^10.1.0",
|
|
"rehype-highlight": "^7.0.2",
|
|
"rehype-raw": "^7.0.0",
|
|
"remark-gfm": "^4.0.1",
|
|
"shell-quote": "^1.10.0",
|
|
"sql.js": "^1.12.0",
|
|
"zod": "^3.25.67",
|
|
"zustand": "^5.0.5"
|
|
},
|
|
"devDependencies": {
|
|
"@electron-toolkit/preload": "^3.0.1",
|
|
"@electron-toolkit/utils": "^4.0.0",
|
|
"@playwright/test": "^1.52.0",
|
|
"@tailwindcss/typography": "^0.5.16",
|
|
"@tailwindcss/vite": "^4.1.7",
|
|
"@types/better-sqlite3": "^7.6.13",
|
|
"@types/node": "^22.15.29",
|
|
"@types/react": "^19.1.6",
|
|
"@types/react-dom": "^19.1.6",
|
|
"@vitejs/plugin-react": "^4.5.2",
|
|
"autoprefixer": "^10.4.21",
|
|
"electron": "^35.5.1",
|
|
"electron-builder": "^26.0.12",
|
|
"electron-vite": "^3.1.0",
|
|
"eslint": "^9.28.0",
|
|
"lucide-react": "^0.511.0",
|
|
"postcss": "^8.5.4",
|
|
"prettier": "^3.5.3",
|
|
"tailwindcss": "^4.1.7",
|
|
"typescript": "^5.8.3",
|
|
"vite": "^6.3.5",
|
|
"vitest": "^3.2.1"
|
|
},
|
|
"allowScripts": {
|
|
"electron@35.7.5": true,
|
|
"better-sqlite3@11.10.0": true,
|
|
"esbuild@0.25.12": true,
|
|
"electron-winstaller@5.4.0": true
|
|
}
|
|
}
|