## 自检 3(pi 提议)
自检 1/2 管"文件没接线",管不到"检查写在 `process.exit()` 之后"—— 而那正是实际发生的
第 4 例(4 条玻璃判据被并发写入落到文件末尾)。成因是**结构性**的(并发写入总是往文件末尾
追加),所以它一定会再发生,而它下一次仍然不报错。静态扫一遍即可:`process.exit(` 之后
若再出现 `check(`,直接判红并指出文件。变异验证:往 `theme.test.mjs` 尾部追加一条 check → 判红。
## TMPDIR 固化(pi 建议,采纳)
"记得加 TMPDIR"这种约定活不过两次踩坑(hvigor、fpm 各一次)。所以不再靠口径:
- `npm run build:linux` 自带 `mkdir -p .tmp && TMPDIR=${TMPDIR:-$PWD/.tmp}`;
- `BUILD.md` 的 deb 一节写明这条前置与原因(`/tmp` 是 tmpfs、占内存、常年近满)。
## `docs/API.md`:`total` 不是总封数 + 同名不同义表
`GET /me/mail/inbox` 的 `total` 是**未读总数**(`repo.CountUnread`),不是本页/全部邮件数 ——
鸿蒙端曾因此写出「共 7 封」和「未读 7」两行自相矛盾的字。在人类接口开头加了醒目提示,
并新增一张表:`total`(未读数)/ `status`(邮件=unread|read,会话=active|archived)/
`status` 与 `is_read` 同义不同名。
## 验证
`npm test` 退出码 0:9 个判据文件全绿 + vitest 258/258(安装包已按判据要求重打,
AppImage 与 deb 均为最新)。
103 lines
2.7 KiB
JSON
103 lines
2.7 KiB
JSON
{
|
|
"name": "agentmail-web",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"description": "AgentMail —— 以邮件交互为统一范式的多智能体协作平台桌面客户端",
|
|
"author": {
|
|
"name": "JianFeeeee",
|
|
"email": "jianf@noreply.localhost"
|
|
},
|
|
"homepage": "http://192.168.2.106:3000/jianf/MailUI4Agents",
|
|
"desktopName": "AgentMail",
|
|
"type": "module",
|
|
"main": "electron/main.cjs",
|
|
"scripts": {
|
|
"dev": "npm run gen:bg && vite",
|
|
"dev:electron": "ELECTRON_START_URL=http://localhost:5173 electron electron/main.cjs",
|
|
"build": "npm run gen:bg && vite build",
|
|
"build:win": "vite build && electron-builder --win",
|
|
"build:linux": "mkdir -p .tmp && vite build && TMPDIR=${TMPDIR:-$PWD/.tmp} electron-builder --linux",
|
|
"preview": "vite preview",
|
|
"typecheck": "tsc --noEmit",
|
|
"test": "node test/run-all.mjs && vitest run",
|
|
"test:narrow": "node test/manual/narrow-verify.mjs",
|
|
"test:wide": "node test/manual/wide-regression.mjs",
|
|
"test:components": "vitest run",
|
|
"test:watch": "vitest",
|
|
"gen:bg": "node scripts/gen-background-takeover.mjs"
|
|
},
|
|
"dependencies": {
|
|
"lunar-javascript": "1.7.7",
|
|
"react": "^18.3.1",
|
|
"react-dom": "^18.3.1",
|
|
"react-markdown": "^9.0.1",
|
|
"remark-gfm": "^4.0.0",
|
|
"zustand": "^4.5.4"
|
|
},
|
|
"devDependencies": {
|
|
"@testing-library/dom": "10.4.1",
|
|
"@testing-library/jest-dom": "6.9.1",
|
|
"@testing-library/react": "16.3.0",
|
|
"@testing-library/user-event": "14.6.1",
|
|
"@types/react": "^18.3.3",
|
|
"@types/react-dom": "^18.3.0",
|
|
"@vitejs/plugin-react": "^4.3.1",
|
|
"autoprefixer": "^10.4.19",
|
|
"electron": "^44.2.0",
|
|
"electron-builder": "^26.15.3",
|
|
"jsdom": "26.1.0",
|
|
"postcss": "^8.4.39",
|
|
"tailwindcss": "^3.4.6",
|
|
"typescript": "^5.5.3",
|
|
"vite": "^5.3.4",
|
|
"vitest": "3.2.4"
|
|
},
|
|
"build": {
|
|
"appId": "xyz.jianfgit.agentmail",
|
|
"productName": "AgentMail",
|
|
"files": [
|
|
"dist/**/*",
|
|
"electron/**/*"
|
|
],
|
|
"directories": {
|
|
"buildResources": "src/icons",
|
|
"output": "release"
|
|
},
|
|
"win": {
|
|
"icon": "src/icons/icon.ico",
|
|
"target": [
|
|
{
|
|
"target": "nsis",
|
|
"arch": [
|
|
"x64"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"linux": {
|
|
"icon": "src/icons",
|
|
"target": [
|
|
{
|
|
"target": "AppImage",
|
|
"arch": [
|
|
"x64"
|
|
]
|
|
},
|
|
{
|
|
"target": "deb",
|
|
"arch": [
|
|
"x64"
|
|
]
|
|
}
|
|
],
|
|
"category": "Network",
|
|
"synopsis": "以邮件交互为统一范式的多智能体协作平台",
|
|
"syncDesktopName": true
|
|
},
|
|
"nsis": {
|
|
"oneClick": false,
|
|
"allowToChangeInstallationDirectory": true
|
|
}
|
|
}
|
|
}
|