@qqq123456789/codex-doctor 0.4.0 → 0.5.0
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 +15 -1
- package/tool/checks.mjs +24 -3
- package/tool/cli.mjs +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qqq123456789/codex-doctor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Codex CLI 维护与排障工具:环境自检、会话/日志归档、配置与凭据备份恢复、版本追踪(零依赖)",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"codex",
|
|
7
|
+
"codex-cli",
|
|
8
|
+
"openai",
|
|
9
|
+
"doctor",
|
|
10
|
+
"troubleshooting",
|
|
11
|
+
"diagnostics",
|
|
12
|
+
"cli",
|
|
13
|
+
"maintenance",
|
|
14
|
+
"agent",
|
|
15
|
+
"排障",
|
|
16
|
+
"维护"
|
|
17
|
+
],
|
|
18
|
+
"homepage": "https://qlw088697-ui.github.io/codex-troubleshooting/",
|
|
5
19
|
"type": "module",
|
|
6
20
|
"bin": {
|
|
7
21
|
"codex-doctor": "tool/cli.mjs"
|
package/tool/checks.mjs
CHANGED
|
@@ -347,11 +347,32 @@ export function summarize(results) {
|
|
|
347
347
|
|
|
348
348
|
export function renderHuman(results, summary) {
|
|
349
349
|
const sym = { ok: '[OK] ', warn: '[WARN]', fail: '[FAIL]', info: '[--] ' };
|
|
350
|
-
|
|
350
|
+
// 检查项所属分组(按 id),输出时分节展示
|
|
351
|
+
const SECTION_OF = {
|
|
352
|
+
codex: '基础环境', node: '基础环境', 'codex-newer': '基础环境',
|
|
353
|
+
codexdir: '配置与凭据', config: '配置与凭据', 'config-roots': '配置与凭据',
|
|
354
|
+
providers: '配置与凭据', relay: '配置与凭据', auth: '配置与凭据', 'auth-expiry': '配置与凭据',
|
|
355
|
+
'env-key': '环境变量', 'env-url': '环境变量', proxy: '环境变量', sysproxy: '环境变量',
|
|
356
|
+
net: '网络',
|
|
357
|
+
disk: '系统', onedrive: '系统坑位', 'wsl-state': '系统坑位', 'ps-policy': '系统坑位', sessions: '维护',
|
|
358
|
+
};
|
|
359
|
+
const ORDER = ['基础环境', '配置与凭据', '环境变量', '网络', '系统', '系统坑位', '维护', '其他'];
|
|
360
|
+
const groups = new Map();
|
|
351
361
|
for (const r of results) {
|
|
352
|
-
|
|
362
|
+
const s = SECTION_OF[r.id] || '其他';
|
|
363
|
+
if (!groups.has(s)) groups.set(s, []);
|
|
364
|
+
groups.get(s).push(r);
|
|
365
|
+
}
|
|
366
|
+
const lines = ['codex-doctor - Codex 环境自检', ''];
|
|
367
|
+
for (const section of ORDER) {
|
|
368
|
+
const items = groups.get(section);
|
|
369
|
+
if (!items) continue;
|
|
370
|
+
lines.push(`—— ${section} ——`);
|
|
371
|
+
for (const r of items) {
|
|
372
|
+
lines.push(`${sym[r.status]} ${r.detail}${r.doc ? ` → ${r.doc}` : ''}`);
|
|
373
|
+
}
|
|
374
|
+
lines.push('');
|
|
353
375
|
}
|
|
354
|
-
lines.push('');
|
|
355
376
|
lines.push(`======== 汇总:通过 ${summary.pass} 警告 ${summary.warn} 失败 ${summary.fail} ========`);
|
|
356
377
|
lines.push('WARN/FAIL 项请对照 docs/ 下对应文档处理;提 Issue 时请附完整输出(脱敏后)。');
|
|
357
378
|
return lines.join('\n');
|
package/tool/cli.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { collectChecks, summarize, renderHuman } from './checks.mjs';
|
|
|
4
4
|
import { cleanTarget } from './clean.mjs';
|
|
5
5
|
import { backupConfig, restoreBackup, resetAuth, listVersions, listArchives, deleteArchive, checkUpdate } from './ops.mjs';
|
|
6
6
|
|
|
7
|
-
const VERSION = '0.
|
|
7
|
+
const VERSION = '0.5.0';
|
|
8
8
|
|
|
9
9
|
const HELP = `codex-doctor v${VERSION} — Codex CLI 维护与排障工具(零依赖)
|
|
10
10
|
|