Skip to content

feat(content-ops): add durable cloud image and footage intents - #6876

Open
loopx-agent wants to merge 3 commits into
mainfrom
codex/content-media-generation-20261019
Open

loopx-agent wants to merge 3 commits into
mainfrom
codex/content-media-generation-20261019

Conversation

@loopx-agent

@loopx-agent loopx-agent commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Cloud generation needs a durable request identity and verified local bytes before its output can become a composition source. This adds explicit video and single-image intents to the existing content-ops capability and optional loopx-media extension; local composition retains precise text, captions and source boundaries.

TypeScript owns immutable prompts, source hashes, parameters, dated nominal quotes and transitions. The provider performs external transport and local computation. Video keeps the original task ID across caller loss. Synchronous images have no invented cloud task ID: received HTTP bytes are persisted before interpretation, and collection can recover that response without another paid POST. Missing credentials preserve the draft; ambiguous effects stay unknown. Separate image/video process credentials and the existing generation permission are required. Loading drafts or rendering ordinary 2D/Blender compositions does not generate cloud media.

The packaged Content production workbench exposes the brief, upload/usage consequence, explicit operation, unavailable/unknown states, saved outputs and verified downloads. It reuses the same backend and extension lifecycle. Image errors are cleared when changing the selected item or Goal. The nearby refactor shares source snapshots and permission-bound extension resolution across composition, footage and images; it adds no settings owner or general-purpose memory/job framework.

Video cancellation remains unavailable because Ark DELETE can erase a task that completes between observation and deletion. Stopping browser checks does not stop remote usage. Image requests have no polling or cancellation API in this route. Neither mechanical readiness nor a nominal rate estimate certifies creative quality, source truth, a billing cap or publication approval.

Validation at ee380c58657121dca25792d1b38c1141ef274620:

  • 18 TypeScript media/video/image tests; 22 Python image/video cases, including malformed responses, lost stdout, interruption after raw-response persistence, no second paid POST, independent credentials, strict Goal/revision/file routing and PNG-byte readback.
  • Eight real optional-renderer integration tests passed; the Blender-only opt-in case was skipped. Seven dependency/module invariants, required repository lint, control-plane typecheck, packaged Dashboard build, CSS-token checks and the staged bilingual-RFC check passed. The semantic advisory found no supported new carriers; its scanner limits remain. The image lifecycle is local to this capability, not Goal/Todo/publication state.
  • Real source extension in an isolated author runtime: missing-image-key submission retained prepared with no submission journal. A synthetic HTTP-response fixture was collected by the actual optional extension, fully decoded and served through the owning backend. Desktop and 390px journeys, keyboard disclosure, Chinese/English copy and downloaded PNG SHA equality were checked. These image fixtures are not live model output.
  • Earlier live video qualification at da162ea44df3e9cb3fcd6ed8ff9c7a1ecd1140a3: two new five-second 720p Seedance clips, continuation from the returned last frame, full decode and a 386-frame local composition. Those bytes remain readable through the current owner; the current change does not repeat the cloud jobs.

Live-image qualification remains open. One actual image request, made before raw-response hardening, returned no confirmed response or local output; it remains submission_unknown and was not resubmitted. A separate read-only connectivity probe also timed out. Generation success, billed cost and a composition using actual generated-image bytes are unverified. The proposed image path is not a claim of completed end-to-end image delivery. Full CI, review, merge readiness and maintainer merge authority remain separate; no merge, installed-App upgrade or release is claimed.

Visual evidence

Tested source: ee380c58657121dca25792d1b38c1141ef274620. Packaged Dashboard with its real backend in a disposable, public-safe fixture; no hosted preview. The video view below was captured at the earlier video head. The new image view uses a synthetic response containing a locally rendered poster. It demonstrates collection/UI behavior, not Seedream quality or an execution trace. Desktop image viewport: 1440×900; narrow viewport: 390×844.

Existing footage view New image view
Existing footage workbench Image workbench with synthetic response fixture
Unknown effect and missing-credential recovery

Unconfirmed request without paid resubmit

Missing credential retains the draft

Narrow viewport and native-byte download

390px entry viewport

The settings detail scrolls; verified downloads and keyboard disclosure remain reachable:

390px download controls

中文:复用 content-ops 与现有媒体扩展,增加可持久化的云端视频和单图请求、响应恢复、工作台与下载读回。图像原始响应先落盘,再解释;请求结果未知时不会重发付费请求。本机扩展、前后端和合成响应恢复已验证;此前两段真实视频及组合的证据保留。首次真实生图请求尚未确认,实际图像及其组合、创意比较、实际账单仍待验证;此 PR 不宣称图像完整交付或取得合并资格。

…tputs

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
…onses

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
@loopx-agent loopx-agent changed the title feat(content-ops): add durable cloud footage generation and composition feat(content-ops): add durable cloud image and footage intents Oct 19, 2026

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent; model=gpt-6.1-sol; provider=OpenAI; declaration_source=runtime_reported; reasoning_effort=max

Request changes conclusion (author-owned PR; GitHub blocks formal self-review)

REQUEST_CHANGES — #6876,审阅提交 ee380c58657121dca25792d1b38c1141ef274620。

[P2] 用经过时间约束“自动查询最多 5 分钟”,不要只数成功发起的查询。 在 ContentGeneratedFootage 的定时分支 中,pending.current 为真时先返回,只有空闲 tick 才增加 checks.current。因此一次 GET 若耗时 16 秒,十秒定时器会跳过繁忙 tick,30 次查询会延长到约十分钟。我使用当前提交重新构建页面、真实 HTTP 路由和真实扩展进程,仅把云端传输接到本地合成服务:每次 GET 延迟 16 秒且返回 running。开始约 371 秒时仍显示“停止自动查询”;18 次自动 GET 的首尾间隔约 346 秒,证明五分钟之后仍有新请求发出。手动停止有效,没有重复生成 POST。请在开启观察时保存截止时间,在忙碌分支之前检查经过时间,到期停止发起新 GET,并补充延迟请求跨越截止时间的组件或打包页面回归;不要用取消云端任务来实现停止本机观察。

动机

需要用生成图像或短镜头制作讲解视频的内容作者,以及替其准备素材的 Agent。

原来只能导入既有素材并在本机合成;生成请求若在调用方中断后丢失结果,作者必须另行核对任务与文件,贸然重发还可能产生重复付费。

本次把生成意图、已有云任务或已收到的图像响应保存在本机,并让作者通过现有内容制作页面继续保存和下载;这条机械恢复链路已有独立验证,但自动查询的五分钟时限仍未兑现。

本 PR 不授予发布、借用其他账户凭据或重新提交未知付费请求的权限,也不以解码成功证明画面创意、教学效果或实际账单。

真实 Seedream 图像产出及其后续成片、创意与账单验收仍待原素材任务完成;当前合成响应验证只证明产品链路与恢复,不替代这些验收。

改动思路

复用现有 content-ops 与扩展生命周期、把准入和状态留在 TypeScript、把云端传输和媒体解码留在可选 provider,责任划分成立;浏览器自动查询只是可停止的观察策略,不能把次数预算冒充经过时间。

当前 PR 的可交付边界是私有生成意图、不可重复提交的恢复与现有页面的文件读回;先在本 PR 修正查询截止时间,真实生图及创意和账单验收保留在已有素材任务。

入口仍是 content-ops image/generation 与 Goal 的内容制作面板。Agent 先准备提示词、来源摘要和估价,作者在已有作用域内执行一次生成并读回文件,不必再在浏览器填写 JSON、来源目录、hash 或凭据。新增的有成本操作保留明确上传与费用说明;已有完整意图之后没有额外的实现细节确认轮次。设置导航是发现入口,不是一次新的模型调用授权。

两种请求不能硬合并成一个远程作业:视频保存真实 task ID,再 GET 原任务和下载;同步图像没有云端 task ID,恢复只读已保存的 HTTP 响应。下表是本提交的源码流程说明,实际执行证据见后文。

触发 持久化与效果 后续恢复
准备意图 校验摘要、来源、尺寸与报价,无网络效果 读取同一私有意图
提交视频 先记录 submitting,再保存 provider 返回的 task ID 查询同一任务,成功后下载并解码
提交图像 先记录 submitting,再保存原始响应、摘要与解释后的缓存 collect 只读本机响应,不重发 POST
结果未知或文件损坏 保留原状态和来源;损坏文件禁止下载 已知响应可修复;无响应先核对外部结果

具体改动

已完整检查 36 个文件、+3127/-58,包括 CLI/目录、两个 TypeScript 准入与转换 owner、Python 私有 I/O、可选 provider、真实 HTTP 路由、两个页面和共享样式、文档及九张提交内截图。截图中的图像 fixture 已标注为本机合成示例;较早视频页面截图属于前一视频提交,未据此推断当前全部路径通过。

关键代码讲解

  • validateGenerationPlan / transitionGeneration 绑定模型、首尾帧、定价时间与不可变摘要;acknowledge 只代表已提交,observe 校验同一 task,collect 另行验证实际媒体。远端成功与本机 ready 没有混为一谈。
  • GenerationWorkspace.operate 在独占锁中先保存提交状态,通过已有扩展 owner 执行一次效果,随后检查文件 bytes/hash。重复 submit 不产生第二个任务,取消分支保留 Ark 记录,避免 GET/DELETE 竞态误删已完成结果。
  • validateImagePlan / transitionImage 是图像局部状态:单张图、精确尺寸、独立图像凭据和原始文件摘要。它不捏造远程 job,也不从 watermark 请求或机械解码推断创意通过。
  • 图像 provider 的 api 与 collect 在解释之前保存原始 HTTP 字节;collect 校验响应绑定、完整 PNG 解码和实际尺寸。独立 CLI 测试验证损坏文件可在移除图像凭据后从缓存恢复,原始 SHA 不变,网络 POST 数没有增加。
  • ContentGeneratedFootage 与图像页面复用原工作台、Goal 及文件路由,显示不可用、未知、保存与下载。其有缺陷的观察定时分支是本次阻塞项;不需要重写后端状态机才能修好。

规范映射先读取了改动前的 docs/reference/protocols/content-ops-media-v0.md,不可变规范版本为 907ede6e1faff1fab0f2f765dde4358c69c7b7ff,没有用本 PR 新增的文案倒推旧验收:

  • Plan and source scope:implemented。 原本机计划的摘要与源文件约束保留;抽出的 snapshot_sources 沿用原校验。五组相同生产 CLI 输入在基线和 head 的准备、列表、读取、缺 provider 和错误 revision 分支一致,只归一化时间与临时 fixture 路径。
  • Execution and readback:implemented。 真实扩展渲染、重复效果拦截、解码、损坏字节恢复和下载均执行。当前核心还通过已安装的基线 0.2 provider 渲染了 36 帧本机视频;新云端路径需要新增 permission,旧 provider 不自动获得它。
  • HTTP boundary and failure behavior:implemented。 真实 loopback 请求拒绝其他 Goal、旧或布尔 revision、私有 path、混合媒体 ID、外部 Origin 和原始响应文件;Range 下载返回 PNG 字节且为 no-store,页面下载的图像和视频均与核心记录 hash 相等。
  • Blender shot and project readback:out_of_scope。 Blender 准入、builder、重开项目和既有协议未改变;原有普通本机渲染已实际回归。没有运行 Blender 可选专项,也没有把这一跳过写成通过。

对主干的风险

新状态属于内容生成局部意图,不能扩张为 Goal、Todo、活跃 Agent 或内容发布状态。provider 明示的价格只是名义估算,不能声称硬账单上限;图像凭据与视频凭据分离,读取、页面加载和普通合成都没有获得自动生成功能。CLI 和页面中的新增能力描述是已披露的可用性说明,真正外部效果仍由扩展、permission、凭据和显式动作共同约束。

独立验证结果:30 项 Python 通过、1 项 Blender opt-in 跳过;18 项 TypeScript 通过;16 项实际 CLI/HTTP/provider 观察通过;五组基线/head 生产 CLI 对比一致;types、CSS 检查和打包通过;标准 premerge 的 6 个直接检查、10 个目录检查、8 个风险 smoke 与 1 个公开边界检查通过。首轮真实渲染因临时环境缺少可选 FFmpeg 包失败,按现有文档加载 source provider 后重新通过;另一次旧 provider 验证使用了已退出的临时环境,改用持久的隔离环境后通过,均未归因成 PR 缺陷。

1440px 桌面与 390px 页面已使用实际打包代码和真实 backend 查看;完整检查了图像未知请求没有重提按钮、已保存文件下载、扩展禁用后保留草稿并禁用生成。图像与视频下载都做了 hash 对照,视频为实际 FFmpeg 完整解码的 120 帧、5 秒合成媒体。云端传输使用合成服务,所以这些证据不证明 Ark 账户、真实模型产出、文字和水印质量、原作者那次未知请求的用量或账单;评审没有重试任何真实付费请求。

语义与 CI 对齐

当前新增协议、provider 指南及按钮约定观察“最多五分钟”,但定时器实际约束的是空闲时发起请求的次数。慢响应反例在全部现有检查通过时仍成立,属于新增调用方契约未兑现。最小修复是独立的经过时间截止条件,并保留显式手动查询和停止行为。请对实际组件运行延迟响应跨过 300 秒的回归,断言截止后没有新 GET,并验证 terminal、切换 Goal/镜头、手动停止仍清理定时器。本次遵守 wait_for_ci=false,没有读取、轮询或等待 CI;本地检查通过也不能替代这个反例。

我的整体评价

交付判断为 justified_increment:意图、私有结果与后续恢复已贯穿真实 CLI、扩展、HTTP 和页面,是可用的增量;真实图片及创意验收仍按前述边界留待完成。long_horizon=improved:中断后可接着读回已保存响应和原任务,重复提交受阻;user_experience=regression:承诺五分钟结束的自动观察会继续,需要作者额外手动停止。先修复本 PR 的截止时间再复审,不能以绿色检查或已保存字节代替这一用户行为。

规模判断是 proportionate,已有 content-ops、文件路由和扩展生命周期得到复用;提取 snapshot_sources 是有实际调用方和默认路径对照的同域简化。图像同步响应与视频 task 语义有实质差别,不宜为了少几个类再造通用 job 框架。保留旧本机 renderer 协议和持久记录有独立升级边界;当前没有必须迁移旧数据的新版本分支。新增 schema 与状态词汇保持内容能力局部,未新增通用控制面义务;语义目录检查通过,时间属性仍需上述专门回归。

该精确提交的结论是 REQUEST_CHANGES,阻塞项只有上述 P2 时间上限。没有执行合并、安装本机生产版本、清退他人 review 或真实云端生成。

English verdict: REQUEST_CHANGES — ee380c58657121dca25792d1b38c1141ef274620. The packaged footage watcher exceeds its advertised five-minute limit because busy ticks do not count; a 16-second synthetic GET reproduced new queries after 300 seconds and an active watcher at 371 seconds. Persist an elapsed-time deadline and add delayed-response regression coverage. Core/provider/HTTP recovery, base/head local-render parity, types/build and premerge checks passed; live image quality and billing remain unverified.

Comment on lines +63 to +65
if (pending.current) return;
if (++checks.current > 30) {setWatch(false); return;}
void operate("check");

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Bound automatic checks by elapsed time. The pending guard skips counter increments while a GET is in flight, so 30 requests are not a five-minute window. With real packaged UI/backend/provider processes and a synthetic 16-second GET, automatic requests continued beyond 300 seconds and the watcher remained enabled at 371 seconds. Record a watch-start deadline and check expiry before the pending guard/new GET; add delayed-response coverage crossing the deadline. Manual local stop must remain distinct from cancelling or deleting the cloud task.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant