feat: extend disk gc candidates

This commit is contained in:
Codex
2026-06-11 14:23:41 +00:00
parent 204a7570b7
commit f8dcdf4139
2 changed files with 436 additions and 12 deletions
+12
View File
@@ -77,6 +77,18 @@ bun scripts/cli.ts gc remote <providerId> [--target-use-percent N] [--dry-run|--
主 server 和 provider 磁盘高水位缓解。`plan` 只读输出候选、风险、估算收益和保护对象。`run` 必须 `--confirm``remote` 通过 SSH 透传执行远端 GC。
常用显式候选和目标口径:
```bash
bun scripts/cli.ts gc plan --target-use-percent 69 \
--include-tool-caches \
--include-vscode-stale-servers \
--include-vscode-stale-extensions \
--include-baidu-staging
```
`--target-use-percent``df` 显示口径估算 shortfall。工具缓存、VS Code 历史 server/extension 版本、Baidu staging 旧 PGDATA tarball 均默认不启用;必须显式 include 后才进入候选,且执行时仍受 allowlist 路径断言保护。默认 GC 不触碰 PGDATA、Docker volumes/images、Codex sessions/auth state 或 Baidu staging 根目录。
---
## 服务重建