You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
video generate --duration 2:Video saved to videos/1.webm (webm, 280.7 KB), 8 frames @ 4 fps,远端任务 job_6ab79842_00000000,209.0 s;ffprobe:vp8、256x256、4 fps、8 帧。
生成中 Ctrl+C(SIGINT):the service refused to cancel remote job job_6ab79953_00000001 (HTTP 409: job is currently generating and cannot be interrupted yet); it may still finish. Nothing was saved.,退出码 130,未落盘。
排队中 kill -9 运行器:/videos 显示 interrupted: codsh stopped following it while it ran;之后 video status 3 → finished on 127.0.0.1:18188; saved videos/2.webm (recovered after the tool call ended),video status 2(取消被拒的任务,由用户显式查询)→ 保存 videos/3.webm。
实际 UI(packed 安装产物 + mock 模型 + 真实 sd-server):卡片 Allow Animate image (1s, default resolution) "a lighthouse at night, waves, rain" via 127.0.0.1:18188? y=allow once n=reject / Starts one video job on 127.0.0.1:18188 with the prompt and 1 image. codsh does not know its price; any charge is set by that service. Each video request asks again. → y → video: job job_6ab79ab8_00000003 generating on 127.0.0.1:18188 · … elapsed → Video saved to videos/1.webm (webm, 148.6 KB), 4 frames @ 4 fps(104.7 s,ffprobe 4 帧 256x256),/videos 显示 completed → videos/1.webm。
Activity
feat(rust): video generation and media job states (ticket 56 / #188)
Blackman99 commentedon Sep 26, 2026
已集成到
rewrite/grok-dsh-20260920:95070ba(视频生成与媒体任务状态,基于 022a417,无需 rebase)。阻塞项 #175、#187 均已关闭。实现(对照验收标准)
[models] video_gen指向带base_url且标记supports_video_generation的[model.<id>];protocol = "xai"(默认,参考实现异步接口:POST /videos/generations→ 轮询GET /videos/{id}→ 下载video.url)或"sdcpp"(本地 stable-diffusion.cppsd-server原生任务接口:/sdcpp/v1/capabilities、/sdcpp/v1/vid_gen、/sdcpp/v1/jobs/{id}、/sdcpp/v1/jobs/{id}/cancel)。能力显式配置:video_durations、video_resolutions、video_tools,sdcpp 另有video_fps、video_output_format(webm/webp/avi)、video_strength;这些限制写进工具 schema 与描述。不支持的时长、分辨率或输入(如 sdcpp 不接受的参考图)在发出任何请求前带原因失败(例:duration 7s is not supported by the video service …)。未配置时工具不注册;官方主机被拒绝;聊天模型不会被当作视频服务。<会话>/video-jobs/<name>.json,状态为 submitting/queued/generating/downloading/completed/failed/expired/refused/cancelled/timed_out/unknown/lost。运行行实时显示video: job <id> queued on <主机> (position N)/generating/downloading与已用时间。超时说明远端可能仍会完成;Ctrl+C 对 sdcpp 发出取消并记录服务的回答(confirmed / refused / already_finished / not_supported),xai 没有取消请求时明确说明;运行器被杀掉的任务显示为 interrupted。/videos status [N](会话外codsh --rust video status)向服务查询没人跟进的任务,完成则保存(标注 recovered);/videos cancel N取消;--resume后提示列出结果未定的任务。<会话>/videos/<n>.<ext>,不覆盖已有文件;失败、过期、拒绝、损坏或外部主机下载(xai 只从base_url主机或video_download_hosts下载)、超时、Ctrl+C 均不落盘。/videos列出任务与文件,/videos open [N]用CODSH_VIDEO_OPENER(否则open/xdg-open)打开。模型的image_to_video/reference_to_video由 dsh 执行(rust-acp-video.mjs),每次都走 dsh 审批,卡片为Allow Animate image (<时长>, <分辨率>) "<提示词>" via <主机>?(或Reference video (...)),注明发送几张图片、codsh 不知道该服务价格;Read deny 规则拒绝参考图路径。/imagine-video <描述>逐字发送参考指令并携带附图,恢复后按输入原样显示。GROK_VIDEO_GEN=0关闭,tools.media_gen.max_parallel_video_gen_calls限并发。rust/upstream/MODIFICATIONS(对照 grok-build video_gen/mod.rs、media_gen/limits.rs、imagine_video.rs 编写,/imagine-video指令与用法逐字,工具描述去品牌化,无 tier upsell / ZDR/S3 / 模型覆盖)。检查(本机 Linux x86_64,keyless mock 模型,隔离临时 HOME,真实 dsh
@deepseek-ai/dsh@0.1.5-rc.2)python3 scripts/rust-video-gen-pty-test.py(新增,已加入test:rust:pty,packed 安装产物 + 回环 xAI 异步形态与 sdcpp 形态两个假服务):通过。覆盖卡片 n 拒绝 / y 允许、实时任务行、保存videos/1.mp4、/imagine-video+ Ctrl+V 图片、不支持的时长不发请求、failed/expired/402/非视频/外部主机五种失败不落盘(外部 URL 不访问)、超时后/videos status恢复为videos/3.mp4、Ctrl+C(xai 无取消请求)、/videos与 open、resume 提示;sdcpp:能力检查、queued→generating→completed 保存videos/1.webm、协议不支持的输入被拒、排队任务 Ctrl+C 取消且服务确认;关闭时RUST_ACP_VIDEO_TOOLS (none);官方主机被inspect拒绝。9 个任务记录状态:completed×3、failed×3、expired、refused、cancelled。rust-image-gen-pty-test.py仍通过。scripts/rust-video-gen.spec.mjs18/18;pnpm test107 文件 / 2638 passed / 15 skipped;pnpm run typecheck通过。cargo test --locked --workspace --no-fail-fast:codsh-rust 758 passed / 4 失败(2 个 filesystem_sandbox、privacy、voice,与基线相同的 Linux 已知失败),其他 crate 1043 passed;新增 17 个单测(video_gen 15、config 1、命令解析 1)。cargo fmt --check干净;严格 Clippy-D warnings仅基线已有的filesystem_sandbox.rs:743(tail_marker)与:1372(needless_return)2 项,-A dead_code -A clippy::needless_return下 0 警告。pnpm run build、pnpm run build:rust成功(native linux-x64 SHA-256162edc79a6729a32fb930a9b824895aa1bb71a518629604513c68fd22a87a8b7);check:rust-package(linux-x64)与rust-install-test.py通过。真实服务链(本机 localhost,无密钥,无费用)
stable-diffusion.cpp
sd-server(commit 2f88688,SD 1.5 q8_0 + AnimateDiffmm_sd15_v3,CPU,--steps 10 --sampling-method euler --scheduler karras),protocol = "sdcpp"、video_resolutions = ["256p"]、video_fps = 4;源图为 #187 真实生成的 256x256 PNG:video generate --duration 2:Video saved to videos/1.webm (webm, 280.7 KB), 8 frames @ 4 fps,远端任务job_6ab79842_00000000,209.0 s;ffprobe:vp8、256x256、4 fps、8 帧。the service refused to cancel remote job job_6ab79953_00000001 (HTTP 409: job is currently generating and cannot be interrupted yet); it may still finish. Nothing was saved.,退出码 130,未落盘。kill -9运行器:/videos显示interrupted: codsh stopped following it while it ran;之后video status 3→finished on 127.0.0.1:18188; saved videos/2.webm (recovered after the tool call ended),video status 2(取消被拒的任务,由用户显式查询)→ 保存videos/3.webm。Allow Animate image (1s, default resolution) "a lighthouse at night, waves, rain" via 127.0.0.1:18188? y=allow once n=reject/Starts one video job on 127.0.0.1:18188 with the prompt and 1 image. codsh does not know its price; any charge is set by that service. Each video request asks again.→ y →video: job job_6ab79ab8_00000003 generating on 127.0.0.1:18188 · … elapsed→Video saved to videos/1.webm (webm, 148.6 KB), 4 frames @ 4 fps(104.7 s,ffprobe 4 帧 256x256),/videos显示completed → videos/1.webm。未验证 / 未覆盖
reference_to_video只在假服务上验证(sdcpp 不支持参考图,按设计拒绝)。open打开器;Windows 未运行。Linux 下真实播放器未打开(测试用记录脚本)。codsh --rust agent stdio)不提供视频工具。未改动
main、npm 发布、默认切换均未改动。