Files
scaffold/template/.claude/rules/communication-catalog.md
T
baozaotumao 39fe248f9f feat: 重组为标准 skill 包结构 + 修复 verify.sh bash 3.2 兼容
- 新增 .claude/skills/new-project/SKILL.md(标准 skill 格式)
- install-skill.sh 安装时组装 SKILL.md + verify.sh,单一源无重复
- verify.sh 改用索引数组替代 declare -A,兼容 macOS bash 3.2
- log_pass/log_skip 显式 return 0,避免 set -e 下非 verbose 误退出
- README 改为 skill 优先;补全 copier.yml/scripts/template 入库
2026-06-01 21:19:45 -07:00

28 lines
967 B
Markdown

---
paths: ["backend/**", "agent/**", "frontend/**"]
---
# 消息目录(payload 形状)
> 查阅型:各消息 type 的 payload 形状,外层由信封包裹(见 `communication-protocol.md`)。字段一律 snake_case。
命令(Browser → Backend → Agent):
```json
{"type": "start_session", "language": "中文", "image_source": "unsplash", "image_api_key": "xxx"}
{"type": "user_input", "text": "深圳科技政策解读"}
{"type": "style_pick", "index": 2}
```
事件(Agent → Backend → Browser):
```json
{"type": "gemini_message", "text": "请问你的 PPT 主旨是什么?"}
{"type": "style_preview", "index": 1, "preview_url": "/api/v1/preview/{sid}/preview_1.html"}
{"type": "log", "message": "📸 截图第 3/10 页"}
{"type": "html_ready", "session_id": "..."}
{"type": "pptx_ready", "session_id": "..."}
{"type": "done"}
{"type": "error", "code": "GEMINI_TIMEOUT", "message": "..."}
```