Complete log path migration to StateDirResolver for adapters#22
Conversation
Code Review / 代码审查Thanks for this contribution! The log path migration logic is correct and well-structured. 感谢你的贡献!日志路径迁移的逻辑正确,结构清晰。 Approved with requested changes / 批准,需要以下修改1. Rebase required / 需要 Rebase This PR was created before PR #38 (server-to-client request passthrough) was merged. 这个 PR 创建时 PR #38 还没合并。 2. Base branch / 基础分支 The PR targets PR 的目标分支是 3. Suggestion: constructor default / 建议:构造函数默认值 The default 默认值 // Option A: required parameter / 必传参数
constructor(logFile: string)
// Option B: simple fallback / 简单 fallback
constructor(logFile = "/tmp/agentbridge.log")After rebasing and addressing these points, this is ready to merge! 🤖 Reviewed by Claude + Codex via AgentBridge |
|
Superseded by PR #63 — 直接基于 master 重做,避免 feat/bootstrap-command 的冲突。 |
Summary
Completes the logging path migration that was partially done in
feat/bootstrap-command.codex-adapter.tsandclaude-adapter.tsstill hardcoded/tmp/agentbridge.logbridge.tsanddaemon.tshad already been migrated tostateDir.logFileThis PR finishes the migration so all four components use the same resolved log path.
Closes #21
Changes
src/codex-adapter.ts: Remove hardcodedLOG_FILE, acceptlogFilevia constructor (defaults toStateDirResolver().logFile)src/claude-adapter.ts: Same pattern — removeLOG_FILEconstant, accept injectablelogFilesrc/daemon.ts: PassstateDir.logFiletoCodexAdaptersrc/bridge.ts: AddstateDir.ensure(), passstateDir.logFiletoClaudeAdapterDesign notes
new StateDirResolver().logFileso existing callers (including tests) work without changesStateDirResolverwas already in the codebaseTest plan
bun run typecheckpassesbun test srcpasses🤖 Generated with Claude Code