Skip to content

refactor: 配置契约清理 + 诊断日志 (#40, #64)#65

Merged
raysonmeng merged 5 commits intomasterfrom
fix/config-contract-and-diagnostics
Apr 14, 2026
Merged

refactor: 配置契约清理 + 诊断日志 (#40, #64)#65
raysonmeng merged 5 commits intomasterfrom
fix/config-contract-and-diagnostics

Conversation

@raysonmeng
Copy link
Copy Markdown
Owner

Summary

Config contract cleanup (#40): rename daemon.*codex.*, remove dead fields, drop collaboration.md, add backward-compat normalization.
Diagnostic logging (#64): add instanceId to ClaudeAdapter for tracking get_messages empty response issues.

Test plan

  • bun run typecheck — 通过
  • bun test src/ — 174 pass / 0 fail
  • Legacy config normalization 单测覆盖
  • Plugin bundle 重新构建

Closes #40

🤖 Generated with Claude Code

rayson951005@gmail.com and others added 5 commits April 14, 2026 18:30
…g contract cleanup (#40)

- 配置 schema: `daemon.port/proxyPort` → `codex.appPort/proxyPort`
- 移除未被代码读取的死字段: `agents`, `markers`, `turnCoordination.busyGuard`
- 移除 `collaboration.md` 生成/读写链路 (协作规则已硬编码在 CLAUDE_INSTRUCTIONS)
- 添加向后兼容归一化: 旧 `daemon.*` 配置自动映射到 `codex.*`
- 同步文档: README, phase3-spec, v1-roadmap

Config schema: `daemon.port/proxyPort` → `codex.appPort/proxyPort`
Remove dead fields: `agents`, `markers`, `turnCoordination.busyGuard`
Remove `collaboration.md` generation/loading (rules are hardcoded in CLAUDE_INSTRUCTIONS)
Add backward-compatible normalization: legacy `daemon.*` auto-maps to `codex.*`
Sync docs: README, phase3-spec, v1-roadmap

Co-Authored-By: Codex <codex@openai.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
为 ClaudeAdapter 添加 instanceId 追踪:
- 构造时生成 8 字符 UUID 并记录日志
- get_messages 调用时记录 instance/pending/dropped 状态
- 消息入队时记录 instance 标识

帮助诊断多实例 MCP server 导致 get_messages 返回空的问题。

Add instance-level diagnostic logging to ClaudeAdapter (#64):
- Generate 8-char UUID on construction
- Log instance/pending/dropped on get_messages calls
- Log instance ID on message queue operations

Helps diagnose get_messages returning empty due to potential multi-instance issues.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…n legacy config

Codex review 发现 normalizeInteger() 只接受 number 类型,手写的 `"4600"` 等
字符串数字会静默回退到默认值。现在同时接受 number 和可解析的 string。

normalizeInteger() only accepted `number`, so hand-edited configs with string
numbers like `"4600"` would silently fall back to defaults. Now accepts both
`number` and parseable `string`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@raysonmeng raysonmeng merged commit fc4bb40 into master Apr 14, 2026
1 check passed
@raysonmeng raysonmeng deleted the fix/config-contract-and-diagnostics branch April 14, 2026 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation drift: stale specs, dead config fields, inert collaboration.md

1 participant