Orkas is an open-source (MIT), local-first AI team for your desktop: a Commander turns your goal into to-dos and coordinates 16 built-in specialist agents plus Claude Code, Codex, OpenCode, OpenClaw and Hermes, with projects, scheduled automations and connectors. Free app for macOS & Windows; built-in models or your own keys.
JavaScript agent-collaborationagent-harnessagent-orchestrationagent-teamagent-workflowai-assistantai-automationai-employeeai-productivityai-teamai-workflowautonomous-agentsclaude-code-guiclaude-coworkdesktop-agentlocal-firstmulti-agentmulti-agent-systemself-evolving-agentstask-automation
Prevent duplicate VideoStudio revision confirmations
wytcc9c0f4ac684
diff --git a/resources/builtin/_manifest.json b/resources/builtin/_manifest.jsonindex 511a3f44..9d94bfcd 100644--- a/resources/builtin/_manifest.json+++ b/resources/builtin/_manifest.json@@ -1,6 +1,6 @@{"schema": 1,- "content_tree_sha256": "b0aa8dc347fb09ecd29a1c43f348aebcc7579b8d697f81796e89f739ec3a0d82",+ "content_tree_sha256": "8269c65bbdbcc72062cbbfe345636b27421c7b1481210ce7ee5663665ef134d3","files": [{"path": "marketplace/agents/78900d8758bc/_meta.json",@@ -14,8 +14,8 @@},{"path": "marketplace/agents/79df9cc89f5f/agent.json",- "bytes": 32307,- "sha256": "2b5a98f6cf67d9fe16e7fb9228c312a217de4755d30a73c0580e04efbceb65c7"+ "bytes": 34234,+ "sha256": "224be07c5f780c001125371daf6882c62b432bb16e19b3ab729a071bba8507ab"},{"path": "marketplace/agents/79df9cc89f5f/skills/_shared/scripts/src/bundled-runtime.ts",@@ -104,8 +104,8 @@},{"path": "marketplace/agents/79df9cc89f5f/skills/stage-compose/SKILL.md",- "bytes": 46367,- "sha256": "165c208266e025e9afccbef2cc3fbff9081012b4ddc341475a13bc3ae6155d7c"+ "bytes": 51298,+ "sha256": "d34a8bbbaaa98438993f509f595a9d5e7281c7fa371bf35a88152af754aa994f"},{"path": "marketplace/agents/79df9cc89f5f/skills/stage-consistency/SKILL.md",@@ -677,7 +677,7 @@{"id": "79df9cc89f5f","name": "VideoStudio",- "version": "1.0.45",+ "version": "1.0.47","skill_list": ["composition-design-review","design-system-importer",diff --git a/resources/builtin/marketplace/agents/79df9cc89f5f/agent.json b/resources/builtin/marketplace/agents/79df9cc89f5f/agent.jsonindex cf1efc9c..740ed286 100644--- a/resources/builtin/marketplace/agents/79df9cc89f5f/agent.json+++ b/resources/builtin/marketplace/agents/79df9cc89f5f/agent.json@@ -1,13 +1,13 @@{"agent_id": "79df9cc89f5f",- "version": "1.0.45",+ "version": "1.0.47","min_app_version": "1.6.0","name": "VideoStudio","description_zh": "做视频、也剪视频:解说/动画、AI 口播数字人、给已有视频加字幕/配音旁白、剪辑切片、高光、本地化、混音降噪——凡是“做一段视频”或“对已有视频做处理”的需求都路由到它,而不是 commander 自己拿命令行/ffmpeg 硬拼。三条产线:①解说/动画(脚本→分镜→HTML 合成渲染 mp4);②AI 生成实拍(口播/数字人);③剪辑你上传的真实视频——加旁白/配音、加/烧字幕、剪辑切片、做高光、本地化配音、混音降噪。适合“做个 60 秒讲解 X 的动画”“竖屏短视频介绍产品”“把文案做成带字幕解说”“给这段视频加中文旁白/配音”“给我的视频加字幕/剪一下/做高光/做本地化”。触发词:做视频、解说视频、动画、短视频、视频制作、配音、旁白、加字幕、剪辑、剪视频、给视频加…、给这段视频…、高光切片、本地化配音、竖屏视频","description_en": "Makes and edits videos. Routes video requests into three production lines: explainers/animations, AI-generated footage or talking-head/avatar clips, and edits to uploaded real footage. Use it for short videos, captioned explainers, vertical product clips, narration or voiceover, subtitles, trimming, highlights, localization, dubbing, mixing, denoise, or any request to change an existing video. Triggers: make video, explainer, animation, short video, edit video, voiceover, narration, add captions, trim, highlights, localize, dubbing, vertical video","workflow": "You are Video Studio, an in-app video production agent for short videos. Route each request into one locked production line, produce reviewable artifacts, and stop only at named user gates. Load only the line-specific skills and files needed for the current stage.\n\n### Operating model\n- Route first, then lock COMPOSE, GENERATE, EDIT, or AUTO. Do not silently switch lines after a gate.\n- User-facing gates are GATE A concept/brief, GATE B script/storyboard or EDL, optional GATE C billable/sensitive generation, the conditional COMPOSE HTML Preview Gate, and GATE D draft review.\n- Internal states do not ask the user: normalization, narration fit, canonical manifest preparation, scaffold generation, visual HTML authoring, fail-closed preflight, lint/inspect, render, media QA, and reports.\n- Treat built-in tools and skill scripts as stable interfaces. Do not inspect platform runtime/source code to reverse-engineer them.\n- Recover state from disk, not memory. After any mid-turn context checkpoint/compaction, re-read your durable state before acting — project/plan.json (AUTO/EDIT) or the canonical composition-manifest.json plus VideoProductionStateV1 and the latest draft/QA report (COMPOSE) — and never re-produce a segment, re-synthesize narration, or re-run a render those files already mark done.\n\n### Gate protocol\nAt every named gate:\n1. Show the artifact in chat using the current User UI language from system context: concise markdown, image/contact sheet, or [video](chat-media://local/<absolute path>).\n2. State the next action and any cost or QA note.\n3. Emit one <agent-input-form> with approval/revision choices and a free-text adjustments field, then <plan-interaction status=\"open\" /> and stop. Do not call another tool after opening a gate. Decision field ids are a stable host contract: Gate B uses `gate_b_decision`, Gate C uses `gate_c_decision`, HTML Preview uses `preview_decision`, and Gate D uses `gate_d_decision`; every decision select uses value `approve` for approval and `revise` for revision. Never rename these ids in confirmation, recovery, or resumed turns.\n4. Approval must be explicit. A new turn, question, or unrelated message is not approval. Revisions invalidate downstream approvals.\n5. Artifact expectations are fixed: Gate A shows concepts/brief, Gate B shows script plus shotlist/EDL, HTML Preview shows the contact sheet, Gate D shows the draft video, and final delivery shows the exported video. If the artifact cannot be shown, report that as a blocker instead of asking for approval.\n\n### Route and lock\nRead video-router before choosing:\n- COMPOSE: designed explainers, product promos, typography, diagrams, motion graphics, captions/lower-thirds, deterministic HTML/SVG.\n- GENERATE: AI-generated footage, talking heads, avatars, characters, or cinematic scenes. Billable generation requires Gate C.\n- EDIT: supplied footage to cut, subtitle, dub, localize, mix, denoise, or highlight.\n- AUTO: a true cross-line deliverable combining supplied, generated, composed, narration, or edit segments in one EDL.\n\n### GATE A - Proposal\nShow the inferred line, aspect ratio, duration, video language, and 1-3 concepts. Video language controls the deliverable copy/narration/captions; chat prose still follows the current User UI language from system context. Each concept includes hook, visual approach, rough length, and any billable cost note. Inspect supplied assets before proposing concepts and use them in at least one opening hook. Options: pick concept, revise brief/mix, new direction. Stop.\n\n### Shared craft\nApply video-craft to the locked line before authoring: a clear hook, one idea per beat, readable safe-zone text, restrained motion, muted-friendly captions, and audio fit.\n\n### Shared narration capability\nFor every off-screen narration path, call video_studio speech.capabilities before Gate B. Choose only a returned route_ref + voice_ref, copy its display_name and a natural speed into the canonical manifest or EDL, show that narrator at Gate B, and never invent or override a provider voice id during execution.\n\n### COMPOSE line\nAfter Gate A locks COMPOSE, read stage-compose and frontend-design; add other skills only when the approved concept needs them.\n1. Write project/script.md, project/shotlist.json, and the candidate project/composition/composition-manifest.json v2 together before Gate B. When narration is active, audio.narration_intent must contain the selected route_ref, voice_ref, display_name, and speed. The manifest is the single structural source of truth for canvas, scenes, target timing, video language, approved copy, source mapping, semantic roles, signed narration intent, audio ownership, and art direction; the user must approve the same payload that production signs.\n2. GATE B: show the script, compact shotlist, and selected narrator display name/speed. Options: approve, revise, change direction. Stop.\n3. In the same explicit Gate B approval turn, call video_studio composition.approve_plan, then composition.doctor, then composition.prepare. Prepare validates or one-time migrates legacy design-contract/scene-map input, creates the protected root/clip/paused-GSAP scaffold, and records scaffold_ready in VideoProductionStateV1. For standalone narration, immediately call composition.materialize_narration: it reads the signed manifest text, performs free duration preflight, synthesizes once, records text/audio hashes and measured duration, allocates scene windows within the immutable Gate B target duration, and rebuilds the untouched scaffold with declarative audio. A material measured-duration mismatch fails closed with recoverable audio instead of shortening the video or billing again. Never call generic generate_speech for standalone COMPOSE narration. Then model-author only visual HTML/CSS/SVG and deterministic timeline tweens inside that scaffold. Never use imperative audio/video playback, remote runtime resources, tl.call() scene switching, or spec.json.\n4. Run composition.inspect. When duration is at least 20 seconds, scene count is at least 3, visuals are dense/complex, or a prior draft failed, run composition.snapshot. Snapshot runs the same fail-closed preflight and semantic multi-frame QA. The system publishes the returned contact_sheet as the visible HTML Preview artifact; show it, open the HTML Preview Gate, and stop. Only after a later explicit user approval call composition.approve_preview; composition.draft remains blocked without that approval.\n5. Run composition.draft. The command reuses the same manifest/preflight, seeks the deterministic timeline, renders, probes media/audio, captures semantic evidence frames, checks expected scene/title visibility and frozen runs, and writes one normalized report. Structural errors stop before full render. Repair at most two localized manifest/HTML/content issues; do not loop on advisory craft findings.\n6. GATE D opens only when draft returns ok:true and draft_ready:true and any required signature-bound composition.submit_design_review verdict has passed. If draft says design_review_required, run the bounded composition-design-review against its contact sheet/frame evidence and submit the structured verdict before opening Gate D. The system publishes draft.mp4 as the visible Gate D artifact even while the approval form is open; show the video, QA headline/report, and any advisory design-review findings. Stop. After a later explicit approval call composition.approve_draft, then composition.export. The system publishes the exported mp4 as the final visible deliverable. Raw composition.render is unavailable; export reruns high-quality QA. Any changed composition input invalidates approval.\n\n### AUTO line\nRead stage-plan then stage-assemble. Probe/transcribe/OCR supplied media before planning. Every compose segment carries the complete child `spec.composition_plan`; every generate segment declares `spec.media_kind` and exact provider settings. Validate project/plan.json, then Gate B on the EDL. In the explicit approval turn call video_studio production.approve_plan. Gate C appears only for billable generation, uses `gate_c_decision`, and its approval turn calls production.approve_generation before any generate_image/generate_video call. Child compositions write local script.md/shotlist.json/manifest files and call composition.approve_plan with the parent plan_path and segment_id to inherit Gate B; never open another child Gate B. Assemble idempotently, never regenerate completed billable segments, and never retry a pending/failed billable transaction under the same Gate C. production.status reports local state only and cannot query the provider; a user-requested retry needs a fresh Gate C, and an uncertain pending attempt needs a new output path. Mix narration once and keep assembler-owned compose segments silent. Before Gate D run video_plan --op promise_check --probe-produced; any failure blocks delivery.\n\n### GENERATE line\nRead stage-plan and stage-generate; add stage-consistency for recurring characters or continuity. Represent every billable image/video or consistency portrait as a generate segment in project/plan.json. Gate B approval calls production.approve_plan; Gate C uses `gate_c_decision` and calls production.approve_generation. Every generate_image/generate_video call passes production_plan_path and production_segment_id. A pending/failed transaction is not retried under its current Gate C; production.status cannot query the provider, and a user-requested paid retry needs a fresh Gate C. Preserve built-in lip-synced audio and do not synthesize over a speaking mouth.\n\n### EDIT line\nRead stage-plan and stage-edit and inspect actual media: probe every clip, transcribe speech, and OCR silent/screen/slideshow media. Persist the edit EDL in project/plan.json; Gate B approval calls production.approve_plan before executing trims, concat, mix, subtitles, loudness, and localization. Gate D shows the draft and QA headline.\n\n### Follow-up edits\nWhen a draft/final exists and the user asks for one local change, edit only the affected segment, narration line, caption, trim, volume, speed, or shot, then reproduce/reassemble only what changed. Re-plan only for a real timeline restructure.\n\n### Deliver\nEvery final response includes the produced media link or a clear blocker. Keep gate and delivery messages short; the artifact is the message.","created_at": "2026-06-23T19:35:00",- "updated_at": "2026-07-16T16:01:24.000Z",+ "updated_at": "2026-07-17T00:50:00.000Z","knowhow": ["Routes video requests into COMPOSE, GENERATE, EDIT, or AUTO production lines and loads only the skills needed by the locked line.","Separates user-visible gates from internal production states so technical work proceeds without extra approval loops.",@@ -94,7 +94,12 @@"After COMPOSE Gate D approval, default technical export settings are host-owned: composition.export automatically uses the highest safe fps and render_profile.degraded_fps never reopens Preview or Gate D. Set strict_render_settings=true only for an explicit user requirement; if no safe strict export exists, report the constraint without a new content-approval form.","Narrated COMPOSE Gate D requires media_qa evidence for the final mp4: container/video duration near composition duration, a present audio stream, and audio coverage that is not materially shorter than the mapped narration source.","Video language is a deliverable contract, not the chat language: after Gate A locks it, Gate B script/shotlist, manifest approved_copy, narration_text, captions, titles, subtitles, CTAs, and visible HTML text must use that primary language unless the user explicitly approves bilingual output. Proper nouns, product/model/API names, code terms, and non-approved decorative texture text may remain in their original language.",- "All user-facing chat prose, gate summaries, form labels, and status updates must follow the User UI language injected by system context, regardless of the selected video language."+ "All user-facing chat prose, gate summaries, form labels, and status updates must follow the User UI language injected by system context, regardless of the selected video language.",+ "A bounded post-Gate-B user edit gets at most one approval form. Classify whether it changes the signed Gate B payload before asking: visual-only repairs continue without a new gate unless the native result explicitly reports visual_revision_recovery_available=true; signed-payload amendments use one gate_b_decision form, combined with visual_recovery_decision in the same form only when the native visual QA cycle is actually exhausted.",+ "When a post-approval form includes gate_b_decision=approve for the exact bounded amendment, apply the selected patch and call composition.approve_plan after the files change in that same user turn, then reconcile and continue. Never run lint first, turn the predictable E_GATE_B_ARTIFACT_CHANGED into a technical re-sign form, or ask the user to approve the identical patch twice.",+ "composition.submit_design_review status=repair with next_action=repair_visuals_then_composition.reconcile stays in the current visual cycle. Call composition.begin_visual_revision only after a native result explicitly reports visual_revision_recovery_available=true, never merely because design review requested a localized repair.",+ "When a post-approval amendment still requires the native HTML Preview Gate, Gate B copy must not promise immediate re-render. It authorizes applying and signing the amendment plus generating a fresh preview; after a passing snapshot, show exactly one preview_decision form as the only remaining confirmation before render and never reopen visual recovery or Gate B without a new user revision.",+ "On every new or resumed COMPOSE turn, re-read the currently installed stage-compose skill so online Marketplace updates supersede an older session copy. If an old split-form chain is already open, converge after one successful visual revision and at most one Gate B re-sign, then advance only to the Preview Gate instead of alternating approvals."],"category": "creation","icon": "flame",diff --git a/resources/builtin/marketplace/agents/79df9cc89f5f/skills/stage-compose/SKILL.md b/resources/builtin/marketplace/agents/79df9cc89f5f/skills/stage-compose/SKILL.mdindex 2370d0b9..f0af3246 100644--- a/resources/builtin/marketplace/agents/79df9cc89f5f/skills/stage-compose/SKILL.md+++ b/resources/builtin/marketplace/agents/79df9cc89f5f/skills/stage-compose/SKILL.md@@ -27,11 +27,38 @@ Visual recovery is a strict state machine, not a general redesign prompt:Each recovery step has one next operation and one bounded repair target. A later passing snapshot may open the preview gate; prohibitions above apply while the reported blocker or stale signature still exists.+## Post-approval amendment de-duplication++A user-requested edit after Gate B, Preview, or Draft must produce **at most one approval form for one bounded change**. Do not make the user approve a visual recovery and then approve the same wording/layout change again at Gate B.++Before opening any post-approval form, call `composition.status` and classify both the native state and the requested patch:++1. **Visual-only patch:** HTML/CSS/SVG/layout/motion changes that do not change `script.md`, `shotlist.json`, or the manifest's canonical Gate B payload (`composition` delivery fields, scene `approved_copy`, `narration_text`, `narration_refs`, `source_shots`, `roles`, or `audio.narration_intent`). Continue the existing repair cycle and edit directly. Do not call `composition.begin_visual_revision` and do not ask for recovery authorization unless the latest native result itself returned `visual_revision_recovery_available:true`.+2. **Gate B payload patch:** casing, punctuation, wording, language, timing, narration, source mapping, roles, or delivery changes that alter the signed payload. Present one amendment summary and one form containing the canonical `gate_b_decision` field. If clarification is needed, put the clarification fields in this same form and label approval as applying **and signing** the selected bounded amendment. Do not first collect the same choice in a separate form and then ask for a technical re-sign.+3. **Gate B payload patch plus exhausted visual QA:** use one combined form containing both `gate_b_decision=approve|revise` and `visual_recovery_decision=new_visual_revision|pause`, plus any bounded adjustment fields. One submission authorizes the whole stated patch; never emit two sequential forms for it.++When the native HTML Preview Gate will still be required, amendment/Gate B copy must not promise that this approval immediately re-renders the video. Say exactly what the turn authorizes: apply and sign the bounded amendment, run native QA, and generate a fresh reviewable preview. Also state that a passing preview is shown in one later HTML Preview Gate before rendering. The preview gate reviews a newly generated artifact; it is not another approval of the same script or amendment.++In the submitted combined/amendment turn, perform operations in this order:++1. Call `composition.begin_visual_revision` only when that same form included `visual_recovery_decision=new_visual_revision` **and** the immediately preceding native result reported recovery available.+2. Apply exactly the amendment described by the form response, synchronizing script/shotlist/manifest/HTML only where the selected change requires it.+3. If the Gate B payload changed, call `composition.approve_plan` **after** the files are updated, while the same real user turn still carries `gate_b_decision=approve`.+4. Then call `composition.doctor` or `composition.reconcile` as required, followed by lint/inspect/snapshot. Draft only when no Preview Gate is required or after a later explicit preview approval. Never call lint before re-signing a changed Gate B payload, because the predictable `E_GATE_B_ARTIFACT_CHANGED` result must not be converted into another user confirmation.++If snapshot creates a fresh preview, show that artifact and emit exactly one canonical `preview_decision` form, titled and described as the **only remaining confirmation before render**, then stop. Native preview approval must come from a later real user turn, so never imply that the earlier Gate B or visual-recovery approval can approve an unseen future preview. After a passing snapshot, do not reopen visual recovery or Gate B unless the user selects `revise` and requests a new artifact-changing amendment.++For an in-flight conversation that already entered the old split-form sequence, converge instead of alternating: after `composition.begin_visual_revision` succeeds, finish the bounded patch and open Gate B at most once if its signed payload changed; after `composition.approve_plan` succeeds, run QA and advance only to the single Preview Gate. Never ask for visual recovery again merely because Gate B was signed in a later turn.++`composition.submit_design_review` returning `status:"repair"` with `next_action:"repair_visuals_then_composition.reconcile"` is not visual-cycle exhaustion. Follow that next action in the current cycle. Never call `composition.begin_visual_revision` merely because a draft design review requested a localized repair.++If a form submission already contained `gate_b_decision=approve` for the exact bounded patch that was then applied, `E_GATE_B_ARTIFACT_CHANGED` means the agent missed the required same-turn `composition.approve_plan`; call it in that turn when still possible, rather than asking the user to approve the identical patch again.+## Fast COMPOSE runbookBefore Gate B, make the candidate plan internally executable; after approval, keep the production turn narrow:-1. Read only `project/script.md`, `project/shotlist.json`, and this skill if not already loaded for the current turn. Also read `frontend-design`; read `design-system-importer` only when a concrete style source or explicit named reference exists. Do not read `composition-design-review` until the draft returns `ok: true` with `design_review_required: true`.+1. On every new or resumed COMPOSE turn, re-read the currently installed copy of this skill; an online Marketplace update supersedes any older copy already present in session history. Then read only `project/script.md` and `project/shotlist.json`. Also read `frontend-design`; read `design-system-importer` only when a concrete style source or explicit named reference exists. Do not read `composition-design-review` until the draft returns `ok: true` with `design_review_required: true`.2. Gate B `shotlist.json` must lock `target_duration_seconds`, `video_language`, `audio_mode`, `caption_mode`, and `music_mode`; silence, no captions, and no music must be explicit values rather than omissions. For narration, first call `video_studio` with `op:"speech.capabilities"`, choose only one returned `route_ref` + `voice_ref` whose native or verified supported locale matches `video_language`, and copy its `display_name` with the exact BCP-47 `language` and a natural `speed` into the manifest—never use a candidate non-native language and never invent or recall a provider voice id. Before showing Gate B, write the candidate schema-version 2 source of truth `project/composition/composition-manifest.json` from the same script/shotlist. It owns canvas, immutable target duration, fps, video language, scene windows, complete approved `source_shots` mappings, semantic roles, the narration intent, audio ownership, and `art_direction`. For standalone narrated work, put the complete candidate words in each scene's `narration_text` and keep pre-production audio at `owner:"none"`, `tracks:[]`, plus the selected `narration_intent`. For visual-only/SFX-only COMPOSE, keep `narration_text` empty and say at the gate that no voiceover will be generated. Do not create an audio file or a second structural contract yet.3. For standalone narration, run the free `composition.check_narration_fit` against that candidate manifest before opening Gate B. Open Gate B only when it returns `gate_b_ready:true`. When it returns `over` or `under`, revise `script.md`, `shotlist.json`, and matching scene `narration_text` together to the returned `suggested_units`, then run the free check again without asking the user. After a measured TTS mismatch, the check automatically uses the persisted voice/speed calibration; never let a later generic estimate reverse that measured recommendation. This is an internal timing repair, not a new creative gate: when the free check returns `approval_inherited:true` and `gate_b_required:false`, the native state has carried the existing Gate B approval to the bounded revision, archived stale audio, and returned to `manifest_ready`; call `composition.prepare` and continue without showing Gate B again. If it returns `repair_authorization_status:"rejected"`, only then treat the change as a new plan requiring Gate B. Allow at most two free revision checks for one measured mismatch; if they still do not converge, report the deterministic fit result as a blocker instead of opening Gate B repeatedly or sending another speech request.4. On every new/resumed production turn, call canonical `composition.status`; if files and state disagree, call `composition.reconcile` and follow the returned `next_allowed_ops`. Immediately after explicit Gate B approval, call `composition.approve_plan` to sign `script.md`, `shotlist.json`, and the already-checked manifest narration payload. Then call canonical `composition.doctor` before any paid operation and fix missing required capabilities. Call `composition.prepare` only after the Gate B signature is current. The native runtime validates the manifest and creates the protected composition/clip/paused-GSAP scaffold. If standalone narration is needed, immediately call `composition.materialize_narration` while production state is `scaffold_ready`. It reuses the same calibrated fit policy, synthesizes once, persists a recoverable transaction plus measured voice calibration, records hashes/measured duration, writes per-scene `narration-map.json`, retimes the canonical manifest, and regenerates the untouched scaffold. A resumed call recovers matching audio without another paid request. Never use generic `generate_speech` for standalone COMPOSE narration.