feat(api): add Lovart-style project and agent thread endpoints

Add canva/canda-compatible routes for lightweight project open/save and
agent thread history:
- POST /canva/project/queryProject, saveProject
- POST /canva/agent/queryAgentLastThread, agentThreadList
- GET /canda/chat-history, /canda/thread/status

Canvas save now accepts a compressed SHAKKERDATA:// snapshot payload,
preserves connections, and returns a SaveProject response; blank
successful image nodes are backfilled from generated artifacts. Frontend
designGateway adopts the new save/query flow.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-08 19:10:08 +08:00
parent ada29cee12
commit 263748af4a
27 changed files with 2045 additions and 114 deletions
+4
View File
@@ -134,6 +134,10 @@ curl -X PATCH http://localhost:8888/api/projects/<project-id>/title \
-H "Content-Type: application/json" \
-d '{"title":"夏季活动主视觉"}'
curl -X POST http://localhost:8888/api/canva/project/saveProject \
-H "Content-Type: application/json" \
-d '{"canvas":"SHAKKERDATA://<gzip-base64-canvas-snapshot>","projectCoverList":[],"picCount":0,"projectName":"Untitled","projectId":"<project-id>","version":"1783472149000","sessionId":"browser-session-id","canvasV2Gray":true}'
curl -X POST http://localhost:8888/api/assets/upload-url \
-H "Content-Type: application/json" \
-d '{"fileName":"ref.png","contentType":"image/png"}'