Feat/comfy cloud adapter #6

Closed
boos wants to merge 0 commits from feat/comfy-cloud-adapter into refactor/rust-backend
Owner
No description provided.
boos added 52 commits 2026-06-22 01:43:42 +00:00
将 Codex 在工作区累积的改动整体落到 refactor/rust-backend:
支付管理与用户余额页、各创作 surface、website 等。排除 boosapi.db/config.toml 等敏感文件。

Co-Authored-By: Claude <noreply@anthropic.com>
在 BoosAPI 内做 ComfyUI 原生协议↔Comfy Cloud API 翻译适配器:对外暴露
/comfy-cloud/{prompt,history,view},内部翻译成 cloud.comfy.org/api/* + X-API-Key。
Comfy Cloud base_url+key 经站点管理(新增 comfy_cloud 平台类型)录入。
Pixelle/comfykit 零改动,只改 comfyui_url 指向适配端点。

Co-Authored-By: Claude <noreply@anthropic.com>
站点配置读取 → job→history 翻译 → 三个适配端点(prompt/history/view)
→ 挂载+前端平台选项 → 真实联调。全程 TDD,wiremock 集成测,逐任务提交。

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
siteInitializationPresets 共享契约(ts/js/d.ts)加 comfy-cloud 预设:
platform=comfy_cloud, defaultUrl=https://cloud.comfy.org, 自动填充官方地址。
platform 联合类型扩 'comfy_cloud';urlMatcher + Rust detect_site_platform 同步识别。

Co-Authored-By: Claude <noreply@anthropic.com>
预设数组把 comfy-cloud 排第一;站点管理 openAdd 默认选 Comfy Cloud 预设
(预填 url+platform,只需贴 X-API-Key)。detect-race 测试补平台重置以保留竞态覆盖。

Co-Authored-By: Claude <noreply@anthropic.com>
用官方模板 video_ltx2_3_id_lora(LTX2.3 身份保持+音频驱动)做 Pixelle comfy/ 数字人工作流,
经 comfy-cloud 适配器执行。模型/节点已验证在 Comfy Cloud 托管齐全。
comfykit _meta.title 标记注入(image/audio/prompt)。硬依赖:用户导出 API 格式 JSON。

Co-Authored-By: Claude <noreply@anthropic.com>
writing-plans 阶段发现:media.py 只给 api/ 通道转发 image_path,comfy/ 通道收不到肖像图。
增加 media.py 一行级改动(非 api 分支把 image_path 加入 workflow_params),
标记名对齐为 $~image_path! / $~audio_path! / $prompt!。

Co-Authored-By: Claude <noreply@anthropic.com>
获取API导出 → 改造工作流(标记+删RecordAudio) → 补 media.py image_path 转发
→ 校验探测 → 真实联调。硬依赖用户导出 API 格式 JSON。

Co-Authored-By: Claude <noreply@anthropic.com>
调查确认 BoosAPI 数字人 UI 无视频工作流入口、后端不转发 api_video_workflow、
Pixelle 仅给 api/ 通道注入 audio_path。设计贯穿三层补齐:
前端加视频工作流选择器 + 后端转发 api_video_workflow + Pixelle 给 comfy 工作流注入 audio_path。

Co-Authored-By: Claude <noreply@anthropic.com>
前端视频工作流选择器 → 后端转发 api_video_workflow → Pixelle comfy 注入 audio_path
→ 部署联调。视频入口可选、默认不启用、向后兼容。

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
数字人页加脚本模型下拉(只列文本模型,默认 gpt-5.5),三层:
前端选择器(getModelsMarketplace过滤)+ 后端转发 llm_model + Pixelle 脚本步传 model。
生图模型已由图片工作流下拉覆盖,不在范围。

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
连接管理页加 Pixelle 连接卡片(runninghub key/comfy url/comfy key),
写 settings 表 + 同步 config.yaml + 重启容器生效。只管3凭证,写文件+重启机制。

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
serde_yaml+config路径 → service(settings读写+yaml同步+restart) → admin端点(掩码)
→ 前端连接管理卡片 → 部署联调。写文件+重启容器同步机制。

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Accounts 页加 Pixelle 连接卡片(URL+2key+保存),api.ts adminApi 加 get/savePixelleConnection。
api.ts 一并带入此前累积的 files URL 改写改动。

Co-Authored-By: Claude <noreply@anthropic.com>
admin/user 两区导航去掉 money-printer 入口,digital-human 菜单标签改为
「短视频工厂/数字人」。路由与页面保留(直链 /money-printer 仍可达,只是不在导航)。

Co-Authored-By: Claude <noreply@anthropic.com>
脚本生成属文案环节,把脚本模型(可选)下拉从「语音与画面」移到「文案与 BGM」区。

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
把 6181 行单文件按职责拆成 workflow_ui/ 目录 8 子模块(assets/auth/node_defs/
models/comfy_proxy/validate/queue/mod)。纯机械移动零逻辑改动,编译器+5测试验证。

Co-Authored-By: Claude <noreply@anthropic.com>
每任务抽1组函数(纯搬运)+cargo编译+测试验证+独立提交。通用6步流程统一。

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
把 mod.rs 残留 4095 行按职责再拆 6 组(model_inject/repair/native_proxy/
run_convert/ws/bootstrap),mod.rs 瘦到 ~1000-1200。纯机械移动,编译器+5测试验证。

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Add GET /api/cli-profiles/templates returning copy-ready config snippets
for pointing common AI clients at this gateway: Cursor, VS Code Continue,
Claude Code, and a generic OpenAI-compatible blob.

Ported from AQBot's list_gateway_templates (a desktop app that hardcodes
localhost:8080). Adapted for server-side use: the gateway origin is resolved
per request — ?base_url= override, then X-Forwarded-Proto + Host (correct
behind a TLS-terminating proxy), then config server.host:port fallback
(0.0.0.0/:: rewritten to 127.0.0.1, matching the comfyui-agent local-base
convention). OpenAI-compatible clients get the /v1 base; Claude Code gets
the bare origin since it appends /v1/messages itself.

Scope guard: this only returns config strings + copy hints. It deliberately
does not rewrite local CLI config files (AQBot's desktop cli_config behavior),
which has no meaning on a server.

New module proxy::cli_profiles::templates holds the snippet content; the admin
handler resolves the origin. Covered by 9 unit tests.
digital_human.rs uses url::Url::parse but the crate was only a transitive
dependency, not declared in Cargo.toml, so the lib failed to compile with
E0433. Add the explicit dependency (url 2.x was already in Cargo.lock).
boos closed this pull request 2026-07-13 19:40:30 +00:00
boos deleted branch feat/comfy-cloud-adapter 2026-07-13 19:40:30 +00:00

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: boos/BoosAPI#6