位置(均已全仓 grep 确认,含字符串方法名调用面)
apps/sidecar/src/rpc/agent-handlers.ts:2313:agent:get-logs-dir 恒返回 { path: "" },唯一引用是 create-rpc-handlers.test.ts:87-90 的存在性断言(测试在给死代码续命)
apps/sidecar/src/rpc/agent-handlers.ts:934-937:agent:cleanup-expired-trash RPC 无调用方(启动时直接调 cleanupExpiredTrash(),不走 RPC)
agent:copy-folder-to-thread、agent:list-external-dir-entries:无 UI 调用方但仍在 renderer allowlist 暴露(安全问题已单独立案 【安全】save-files-to-workspace(-root) / copy-folder-to-thread 的 sourcePath 无根目录约束,构成任意文件读取原语 #145 /【安全】agent:list-external-dir-entries 不校验目录是否已注册,可枚举本机任意目录(且无 UI 调用方) #153 ,处置时一并清理)
apps/sidecar/src/rpc/schemas.ts:1788-1800:attachedPathInputSchema / renameAttachedFileInputSchema / moveAttachedFileInputSchema 三个导出零引用
apps/sidecar/src/services/agent-runtime/tools/office/scripts/soffice.py:全 src 无任何 .ts/.py 引用(其余 12 个脚本均被使用)
apps/sidecar/src/services/memory-v2/markdown-store.ts:552-555:readMemoryMarkdown 仅接口声明与 store 装配引用,无调用方
apps/sidecar/src/services/memory-v2/command-service.ts:363-370:supersedeDuplicate 是 mergeDuplicate 的纯别名包装,无调用方(mergeDuplicate 本身有调用,保留)
apps/sidecar/src/services/agent-runtime/runtime-core/run.ts:2873-2882:resolveTaskThreadInitialTitle 仅 run.delegate.test.ts 引用(生产路径标题实际取 description/thread_title)
修复建议
按清单逐项删除;get-logs-dir 的测试断言同步移除;两个"死而暴露"的 RPC 方法连 renderer allowlist 一起清。
位置(均已全仓 grep 确认,含字符串方法名调用面)
apps/sidecar/src/rpc/agent-handlers.ts:2313:agent:get-logs-dir恒返回{ path: "" },唯一引用是 create-rpc-handlers.test.ts:87-90 的存在性断言(测试在给死代码续命)apps/sidecar/src/rpc/agent-handlers.ts:934-937:agent:cleanup-expired-trashRPC 无调用方(启动时直接调 cleanupExpiredTrash(),不走 RPC)agent:copy-folder-to-thread、agent:list-external-dir-entries:无 UI 调用方但仍在 renderer allowlist 暴露(安全问题已单独立案 【安全】save-files-to-workspace(-root) / copy-folder-to-thread 的 sourcePath 无根目录约束,构成任意文件读取原语 #145/【安全】agent:list-external-dir-entries 不校验目录是否已注册,可枚举本机任意目录(且无 UI 调用方) #153,处置时一并清理)apps/sidecar/src/rpc/schemas.ts:1788-1800:attachedPathInputSchema / renameAttachedFileInputSchema / moveAttachedFileInputSchema 三个导出零引用apps/sidecar/src/services/agent-runtime/tools/office/scripts/soffice.py:全 src 无任何 .ts/.py 引用(其余 12 个脚本均被使用)apps/sidecar/src/services/memory-v2/markdown-store.ts:552-555:readMemoryMarkdown 仅接口声明与 store 装配引用,无调用方apps/sidecar/src/services/memory-v2/command-service.ts:363-370:supersedeDuplicate 是 mergeDuplicate 的纯别名包装,无调用方(mergeDuplicate 本身有调用,保留)apps/sidecar/src/services/agent-runtime/runtime-core/run.ts:2873-2882:resolveTaskThreadInitialTitle 仅 run.delegate.test.ts 引用(生产路径标题实际取 description/thread_title)修复建议
按清单逐项删除;get-logs-dir 的测试断言同步移除;两个"死而暴露"的 RPC 方法连 renderer allowlist 一起清。