iconsulting/packages/services/conversation-service/src/infrastructure/claude
hailin 9e9865acb0 fix(tools): 修复 coordinator-tools 与 immigration-tools 之间的 input_schema 不一致
## 问题

全链路检查发现 coordinator-tools.ts(Claude 实际使用的工具定义)与
immigration-tools.service.ts(实际执行器)之间有 4 处 input_schema 不一致,
会导致 Claude 发送的参数无法被正确解析。

## 修复

### check_off_topic
- coordinator 发 `query`,handler 读 `question`
- Fix: handler 同时支持 `query` 和 `question` 两个字段名

### collect_assessment_info
- coordinator 发 `{ userId, field, value }`(单字段模式)
- handler 读 `{ category, age, education, ... }`(批量模式)
- Fix: handler 同时支持两种输入格式

### generate_payment
- coordinator 旧 schema: `{ userId, serviceType, amount, description }`
- handler 需要: `{ serviceType, category, paymentMethod }`
- Fix: 更新 coordinator schema 为 `{ serviceType, category, paymentMethod }`
  - serviceType enum 改为 ASSESSMENT/CONSULTATION/DOCUMENT_REVIEW(匹配 payment-service)
  - 添加 category enum 和 paymentMethod enum
  - 移除 userId(从 context 获取)和 amount(由 payment-service 定价)

### save_user_memory
- coordinator 旧 schema 多余 `userId`(handler 用 context.userId)
- coordinator 发 `importance` 但 handler 不读
- handler 支持 `category` 但 coordinator 未定义
- Fix: coordinator schema 移除 userId,移除 importance,添加 category

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 01:31:38 -08:00
..
prompts feat(agent): implement 3-layer architecture for better response quality 2026-01-23 07:51:19 -08:00
strategy feat(agents): implement multi-agent collaboration architecture 2026-02-06 04:26:39 -08:00
tools fix(tools): 修复 coordinator-tools 与 immigration-tools 之间的 input_schema 不一致 2026-02-07 01:31:38 -08:00
claude-agent-v2.service.ts feat(agents): implement multi-agent collaboration architecture 2026-02-06 04:26:39 -08:00
claude-agent.service.ts feat(agents): implement multi-agent collaboration architecture 2026-02-06 04:26:39 -08:00
claude.module.ts feat(agents): implement multi-agent collaboration architecture 2026-02-06 04:26:39 -08:00
intent-classifier.ts feat(agents): implement multi-agent collaboration architecture 2026-02-06 04:26:39 -08:00
response-gate.ts feat(agents): implement multi-agent collaboration architecture 2026-02-06 04:26:39 -08:00
token-usage.service.ts refactor(services): implement 4-layer Clean Architecture for all backend services 2026-01-24 22:18:22 -08:00