refactor: restructure MCP server by replacing client-specific tool logic with a centralized campaign service and standardized models.

This commit is contained in:
2026-07-20 18:34:11 +07:00
parent 2de63d0bad
commit 00e26cedcf
155 changed files with 1039 additions and 2273 deletions

View File

@@ -55,7 +55,7 @@ MCP Server cần giữ local draft theo conversation/session để user có th
Required fields quan trọng theo spec:
- `CampaignDto`: `campaignId`, `name`.
- `Campaign`: `campaignId`, `name`.
- `CampaignRuleDto`: `campaignId`, `ruleId`, `ruleName`.
- `PoolDefinitionDto`: `poolId`, `poolName`.
- `TransactionCodeDto`: `code`, `description`.
@@ -132,7 +132,7 @@ Không làm cả 11 resource ngang nhau ngay. Ưu tiên theo giá trị end-to-e
**Milestone 3: Campaign Setup**
- Tool tạo draft `CampaignDto`.
- Tool tạo draft `Campaign`.
- Agent tự generate/check `campaignId` nếu user chưa có mã.
- Giữ template tối thiểu: `campaignId`, `name`, `ownerName`, `description`, `campaignType`, `effectiveFrom`, `effectiveTo`.
- Không yêu cầu user nhập `numOfRule`; field này nên derive/hiển thị từ Core nếu có.
@@ -220,7 +220,7 @@ _Mục tiêu: từ intent tự nhiên tạo được campaign/rule/pool hoàn ch
- [ ] Parse `reward.json` thành metadata nội bộ: resources, schemas, required fields, enums, readOnly fields, endpoints.
- [ ] Implement generic Reward API client cho CSR pattern.
- [ ] Implement MCP tools read-only cho Campaign/Rule/Pool/Transaction Code.
- [ ] Implement local draft store cho `CampaignDto`, `PoolDefinitionDto`, `CampaignRuleDto`.
- [ ] Implement local draft store cho `Campaign`, `PoolDefinitionDto`, `CampaignRuleDto`.
- [ ] Implement validator dùng OpenAPI schema.
- [ ] Implement create-draft flow cho Pool Definition.
- [ ] Implement create-draft flow cho Campaign.