@vibeframe/cli 0.115.3 → 0.115.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTEXT.md +1 -1
- package/dist/commands/_shared/execute-fill-gaps.d.ts +0 -2
- package/dist/commands/_shared/image-cost.d.ts +15 -0
- package/dist/commands/_shared/image-cost.test.d.ts +1 -0
- package/dist/commands/_shared/init-templates.d.ts +1 -1
- package/dist/commands/_shared/openai-image.d.ts +4 -3
- package/dist/commands/_shared/scene-build.network.test.d.ts +1 -0
- package/dist/commands/_shared/video-utils.d.ts +3 -1
- package/dist/commands/agent.d.ts +6 -0
- package/dist/commands/generate/video.d.ts +9 -0
- package/dist/commands/generate.d.ts +1 -1
- package/dist/commands/output.d.ts +9 -1
- package/dist/index.js +455 -235
- package/dist/testing/fake-provider-network.d.ts +45 -0
- package/dist/tools/define-tool.js +3 -2
- package/dist/tools/manifest/edit.d.ts +2 -2
- package/dist/tools/manifest/generate.d.ts +4 -4
- package/dist/tools/manifest/index.js +421 -221
- package/dist/tools/manifest/storyboard.d.ts +2 -2
- package/dist/utils/model-lifecycle.d.ts +25 -0
- package/dist/utils/model-lifecycle.test.d.ts +1 -0
- package/dist/utils/remotion-precheck.test.d.ts +1 -0
- package/dist/utils/remotion.d.ts +7 -1
- package/package.json +4 -3
package/CONTEXT.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
## Overview
|
|
4
4
|
|
|
5
5
|
VibeFrame CLI (`vibe`) generates AI video on the user's own provider keys
|
|
6
|
-
(Seedance, Runway,
|
|
6
|
+
(Seedance, Runway, Kling, Gemini Omni), behind dry runs and a hard `--max-cost`
|
|
7
7
|
ceiling, and edits the results. Every operation is
|
|
8
8
|
a shell command. The same surface is exposed as MCP tools through
|
|
9
9
|
[`@vibeframe/mcp-server`](https://www.npmjs.com/package/@vibeframe/mcp-server).
|
|
@@ -26,8 +26,6 @@ export interface ExecuteFillGapsOptions {
|
|
|
26
26
|
ratio?: "16:9" | "9:16" | "1:1";
|
|
27
27
|
/** Override Kling API key. */
|
|
28
28
|
apiKey?: string;
|
|
29
|
-
/** Override ImgBB API key (used to host frames for Kling input). */
|
|
30
|
-
imgbbApiKey?: string;
|
|
31
29
|
/** Optional progress callback for streaming status updates. */
|
|
32
30
|
onProgress?: (message: string) => void;
|
|
33
31
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-image cost estimates for `vibe generate image`, from model catalog prices.
|
|
3
|
+
*
|
|
4
|
+
* Without these, real runs reported `costUsd: 0`, which reads as "free" to
|
|
5
|
+
* agents that gate spend on the JSON envelope. Values are upper bounds from
|
|
6
|
+
* provider list prices (checked 2026-10-04, see
|
|
7
|
+
* `.agents/references/providers/`), not metered billing:
|
|
8
|
+
* - OpenAI: high quality at 1024x1024 (we default to medium).
|
|
9
|
+
* - Gemini: 1K output, Nano Banana Pro at 1K-2K.
|
|
10
|
+
* - Grok: grok-imagine-image-2.0 at its 2K medium price.
|
|
11
|
+
*/
|
|
12
|
+
export declare function estimateImageCostUsd(provider: string, model: string | undefined, count: number): {
|
|
13
|
+
costUsd: number;
|
|
14
|
+
warnings: string[];
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* file. Keep this as the canonical source of truth for agent guidance -
|
|
19
19
|
* \`CLAUDE.md\` and \`GEMINI.md\` just import it.
|
|
20
20
|
*/
|
|
21
|
-
export declare const AGENTS_MD = "# AGENTS.md\n\nThis project uses [VibeFrame](https://github.com/vericontext/vibeframe) -\na CLI for AI video generation on the user's own provider keys (Seedance,\nRunway, Veo, Kling), behind dry runs and a hard `--max-cost` ceiling.\nThe `vibe` command provides 80+ subcommands for video generation,\nediting, and analysis. Cost tiers below - **always confirm with the user\nbefore running High / Very High tier commands**.\n\n## Agent host coverage\n\nVibeFrame's CLI works with any bash-capable AI coding agent. Six host\nfamilies have first-class auto-detection and scaffolds today:\n\n- **Claude Code** - `CLAUDE.md` (this file's import wrapper) +\n `AGENTS.md` + `/vibe-*` slash commands.\n- **OpenAI Codex** - reads `AGENTS.md` natively (agents.md spec).\n- **Cursor** - reads `AGENTS.md` plus `.cursor/rules/` for project\n rules; supports MCP via `.cursor/mcp.json`.\n- **Aider** - reads `AGENTS.md` (binary-only detection by VibeFrame).\n- **Gemini CLI** - primary context file is `GEMINI.md`; also reads\n `AGENTS.md` if present.\n- **OpenCode** - reads `AGENTS.md` (officially supported per\n `opencode.ai/docs/rules`); supports MCP via `.opencode/mcp.json`.\n\nRun `vibe doctor` to see which host(s) the CLI detects in your\nenvironment. Anyone running another bash-capable agent (Continue,\nSourcegraph Cody, etc.) still gets this `AGENTS.md` as the universal\nfallback.\n\n## Self-discovery\n\nDon't memorise the command surface - read it from the CLI:\n\n```bash\nvibe --help # command groups overview\nvibe schema --list # full machine-readable catalog (80+)\nvibe schema --list --surface public # small first-run/product command surface\nvibe schema generate.video # JSON Schema for any single command\nvibe doctor # available providers + system health\nvibe host setup all # print Codex/Claude/Cursor app integration snippets\nvibe host doctor all --json # verify project guidance + MCP config\nvibe guide motion # choose text-overlay vs motion-overlay vs generate motion\nvibe guide scene # step-by-step authoring guide (scene)\nvibe guide pipeline # step-by-step authoring guide (pipeline)\n```\n\n## Route by the user's actual request\n\nRouting the user's request correctly is the most important judgement call\nyou'll make. Do not force everything into a scene project.\n\n**ASSET - default for any single-asset request OR ambiguous prompt.**\nIf the user asks for a single image, single video clip, sound effect, music\nbed, or narration file - **OR pastes a visual/audio brief without explicit\nstoryboard / scene / multi-scene language** - treat it as ASSET. Use\n`vibe generate ...` directly. Do **not** edit `DESIGN.md`,\n`STORYBOARD.md`, run `vibe scene ...`, or auto-load the hyperframes\nskill until BUILD intent is explicit. The visual-identity hard-gate\napplies to BUILD only.\n\nExamples:\n- \"make this image\" \u2192 `vibe generate image \"...\" -o assets/name.png`\n- \"use this image to make a video\" \u2192 `vibe generate video \"...\" -i image.png -o renders/name.mp4`\n- \"add a lower-third/title/animated overlay/grain/vignette to this clip\" \u2192 prefer `vibe edit motion-overlay clip.mp4 \"...\" --understand auto -o out.mp4` when the request asks for designed or animated motion graphics.\n- \"please add visuals using OpenAI image gen\" \u2192 `vibe generate image \"...\" -p openai ...`\n- *(verb-less paste)* \"aerial view of a misty mountain peak at sunrise...\" \u2192 `vibe generate image \"<paste>\" -o assets/mountain-peak.png`. **Don't** read it as a brief for DESIGN.md.\n\nIf genuinely uncertain, ask one short question: *\"single asset or\nmulti-scene project?\"* before authoring DESIGN.md or loading the\nhyperframes skill.\n\n**BUILD - create new video from text intent.**\nUse `vibe build` with a STORYBOARD.md + DESIGN.md. The\nskills-driven pipeline (v0.60+) dispatches narration TTS + backdrop\nimage-gen per beat, composes scene HTML via the bundled composition rules\nbundle, then renders to MP4. Idempotent re-runs reuse cached assets.\n\n**REMIX - transform existing video / audio.**\nUse `vibe remix`, `vibe edit`, or `vibe audio`. One-shot,\nbatch-oriented operations on a file the user already has on disk.\n`vibe edit text-overlay` is the free deterministic path for simple static\ntext burn-in. If the user asks for motion design, animated lower-thirds,\ndesigned titles, grain/vignette as part of a graphic treatment, or says\n\"motion graphics\", use `vibe edit motion-overlay ... --understand auto` instead.\n\nDecision rule: if the user asks for one asset, it's ASSET. If the user asks\nfor a multi-scene/storyboard/composed video, it's BUILD. If the user is\nstarting from a media file and wants it transformed, it's REMIX.\n\n## Common workflows\n\n### BUILD (new video from text)\n\n| Task | Command |\n|---|---|\n| One-shot storyboard \u2192 video | `vibe build [project-dir]` |\n| Render an existing scene project | `vibe render [project-dir] -o out.mp4` |\n| Lint scene HTML | `vibe scene lint --json` |\n| Generate a single image | `vibe generate image \"prompt\" -o img.png --quality hd` |\n| Generate a single video | `vibe generate video \"prompt\" -i image.png -o clip.mp4` |\n| Generate narration | `vibe generate narration \"text\" -o voice.mp3` |\n\n### REMIX (transform existing media)\n\n| Task | Command |\n|---|---|\n| Extract highlights from a long video | `vibe remix highlights file.mp4 -d 60` |\n| Long video \u2192 vertical shorts | `vibe remix auto-shorts file.mp4 -n 3 --add-captions` |\n| Add animated word-by-word captions | `vibe remix animated-caption file.mp4 -s karaoke-sweep` |\n| Add designed motion graphics overlay | `vibe edit motion-overlay file.mp4 \"lower-third...\" --understand auto -o out.mp4` |\n| Remove silence | `vibe edit silence-cut in.mp4 -o out.mp4` |\n| Add static captions | `vibe edit caption in.mp4 -o out.mp4` |\n| Translate audio (transcribe \u2192 TTS) | `vibe audio dub file.mp4 -t ko` |\n| Transcribe (Whisper, word-level) | `vibe audio transcribe file.mp4 --granularity word` |\n| Inspect media with Gemini | `vibe inspect media file.mp4 \"summarise\" --json` |\n\n### Compose pipelines (Video as Code)\n\n| Task | Command |\n|---|---|\n| Run a YAML pipeline | `vibe run pipeline.yaml --dry-run` |\n| Resume from last checkpoint | `vibe run pipeline.yaml --resume` |\n\n## Cost tiers\n\n| Tier | Examples | Approx. per call |\n|---|---|---|\n| **Free** | `schema/context/doctor`, `detect *`, `status *`, `plan`, `storyboard validate`, `inspect project/render --cheap`, deterministic edits | $0 |\n| **Low** | `generate narration/sound-effect/music`, `audio transcribe`, `inspect media`, optional AI review | $0.01\u2013$0.10 |\n| **High** | `generate image/motion`, `edit image/reframe/grade/speed-ramp` | $1\u2013$5 |\n| **Very High** | `generate video`, `edit fill-gaps`, `remix highlights/auto-shorts`, `build` with generated assets | $5\u2013$50+ |\n\n## Agent invariants\n\nWhen you run vibe commands programmatically:\n\n1. **Always `--json`** for structured output you can parse without regex\n2. **Always `--dry-run` first** for any High/Very-High tier command - it returns\n the cost estimate without spending API budget\n3. **Use `vibe schema <command>`** to discover parameters; do not guess flags\n4. **Pass complex options via `--stdin`**:\n ```bash\n echo '{\"video\":\"long.mp4\",\"count\":3,\"aspect\":\"9:16\"}' | vibe remix auto-shorts --stdin --json\n ```\n\n## Provider keys and project scope\n\nPrefer `vibe setup --scope project` for project-local keys. It writes\n`.vibeframe/config.yaml` in the setup directory; when you work from a\nnested scene directory, the `vibe` CLI automatically searches parent\ndirectories and uses the nearest project config. Do not assume the config\nfile must exist in the current subdirectory.\n\nRun `vibe doctor --json` from the directory where you will run commands\nand check `data.scope.project.configPath` / `data.scope.activeScope` before\ndeciding keys are missing. Never print or copy config file contents.\n\nFor generated project assets, use VibeFrame commands such as\n`vibe generate image|video|speech ...` so these project-scope keys are\nused. Do not switch to a host agent's built-in image/audio generation tool\nunless the user explicitly asks for a non-VibeFrame asset.\n\n`.env` is still supported as a gitignored fallback. Copy `.env.example`\nto start if you prefer environment variables.\n\n## App host setup\n\nVibeFrame is CLI-first, not terminal-only. Codex, Claude Code, and Cursor can\ndrive the same project through shell commands, and app hosts can also use\nVibeFrame's MCP server as a typed tool surface.\n\n```bash\nvibe host setup all # print snippets only\nvibe host setup all --write # write project/app config\nvibe host doctor all --json # verify readiness\n```\n\nDefault setup is snippet-only; use `--write` when you want VibeFrame to merge\nthe generated config. Keep provider keys in `.vibeframe/config.yaml`, user\nconfig, or env files - not in app host config.\n\n## Host agent loop\n\nFor long-running work, use your host's agent loop (Claude Code, Codex, Cursor,\nor another coding-agent host) as the outer loop. VibeFrame should not own a\ncompeting project-level agent loop. It provides `--json` commands, dry runs,\nbudget caps, `build-report.json`, `review-report.json`, `nextActions`,\n`safeToAutoRun`, `requiresConfirmation`, `fixOwner`, deterministic repair,\nand render inspection for the host agent to decide what to do next.\n\nCopy-paste agent prompt (Codex) - a plain prompt, not a built-in command:\n\n```text\nBuild this VibeFrame project into renders/final.mp4. Use --json for every\nvibe command, run --dry-run before paid operations, use --max-cost 5 for builds\nunless the user gives another budget, read build-report.json and\nreview-report.json before deciding the next action, prefer nextActions before\nguessing, run only safeToAutoRun:true actions automatically, and ask before\nrequiresConfirmation:true actions. Treat retryWith as the compatibility\nfallback, fixOwner:\"vibe\" as CLI repair work, and fixOwner:\"host-agent\" as\nSTORYBOARD.md, DESIGN.md, or composition edits.\nStop only when renders/final.mp4 exists, target duration and aspect ratio are\nmet, inspect render --cheap has no errors, any AI review score is >= 90 when AI review is requested, and every\nremaining host-agent issue is fixed, accepted with rationale, or reported as\nblocked.\n```\n\nCopy-paste agent prompt (Claude Code) - a plain prompt, not a built-in command:\n\n```text\nFinish this VibeFrame render using your host's agent loop as the outer\nloop. Use vibe context/schema when unsure, --json everywhere, dry-run before\npaid operations, budget cap via --max-cost 5, nextActions before guessing,\nbuild-report.json/review-report.json as loop state, and safeToAutoRun,\nrequiresConfirmation, and fixOwner to decide between vibe scene repair and\nhost-agent edits. Stop only after final MP4,\ntarget duration/aspect ratio, clean render inspection, any AI review score >= 90 when AI review is requested, and\nno unresolved unacknowledged host-agent issues.\n```\n\n### Composition rules (scene HTML)\n\nComposition rules live in the **Hyperframes skill** - framework rules, motion\nprinciples, type system, and visual-identity hard-gate. **Load that skill\nbefore authoring any scene composition HTML under `compositions/`.** The same\nrules govern `vibe scene lint`, so your authored HTML and the linter stay in\nagreement.\n\nWhere the skill comes from depends on your setup:\n\n- If the `hyperframes` skill is installed globally (e.g. Claude Code), your\n agent already has it and nothing else is needed.\n- Otherwise install it into this project with `vibe scene install-skill`,\n which runs upstream's own installer and writes\n `.agents/skills/hyperframes/`.\n\n`vibe init` never copies the rules in. They come from upstream so they stay\ncurrent, and fetching them is a network call the scaffold does not make on\nyour behalf. `vibe doctor` reports whether your agent can read them.\n\nFor render-stable text, do not apply continuous `scale`, `x`, `y`,\n`filter`, or other transform tweens to `.scene-content` or any ancestor\ncontaining live text/cards. Put ambient zoom/parallax on background or media\nlayers only; text should enter briefly and then hold still at its final CSS\nposition.\n\n### Scene composer (non-agent fallback)\n\nScene HTML is authored by you, the host agent - the CLI makes no LLM call\nduring `vibe build`. When no agent is available to author scenes, pass\n`--composer template` for the deterministic no-model composer\n(concat background + lower-thirds).\n\n## Project conventions\n\n<!-- Edit this section with YOUR project's specifics. Examples below. -->\n\n- Default aspect ratio: `16:9`\n- Default scene duration: `3 seconds` (per beat)\n- Brand voice: <describe>\n- Output naming: `renders/<name>-<timestamp>.mp4`\n";
|
|
21
|
+
export declare const AGENTS_MD = "# AGENTS.md\n\nThis project uses [VibeFrame](https://github.com/vericontext/vibeframe) -\na CLI for AI video generation on the user's own provider keys (Seedance,\nRunway, Kling, Gemini Omni), behind dry runs and a hard `--max-cost` ceiling.\nThe `vibe` command provides 80+ subcommands for video generation,\nediting, and analysis. Cost tiers below - **always confirm with the user\nbefore running High / Very High tier commands**.\n\n## Agent host coverage\n\nVibeFrame's CLI works with any bash-capable AI coding agent. Six host\nfamilies have first-class auto-detection and scaffolds today:\n\n- **Claude Code** - `CLAUDE.md` (this file's import wrapper) +\n `AGENTS.md` + `/vibe-*` slash commands.\n- **OpenAI Codex** - reads `AGENTS.md` natively (agents.md spec).\n- **Cursor** - reads `AGENTS.md` plus `.cursor/rules/` for project\n rules; supports MCP via `.cursor/mcp.json`.\n- **Aider** - reads `AGENTS.md` (binary-only detection by VibeFrame).\n- **Gemini CLI** - primary context file is `GEMINI.md`; also reads\n `AGENTS.md` if present.\n- **OpenCode** - reads `AGENTS.md` (officially supported per\n `opencode.ai/docs/rules`); supports MCP via `.opencode/mcp.json`.\n\nRun `vibe doctor` to see which host(s) the CLI detects in your\nenvironment. Anyone running another bash-capable agent (Continue,\nSourcegraph Cody, etc.) still gets this `AGENTS.md` as the universal\nfallback.\n\n## Self-discovery\n\nDon't memorise the command surface - read it from the CLI:\n\n```bash\nvibe --help # command groups overview\nvibe schema --list # full machine-readable catalog (80+)\nvibe schema --list --surface public # small first-run/product command surface\nvibe schema generate.video # JSON Schema for any single command\nvibe doctor # available providers + system health\nvibe host setup all # print Codex/Claude/Cursor app integration snippets\nvibe host doctor all --json # verify project guidance + MCP config\nvibe guide motion # choose text-overlay vs motion-overlay vs generate motion\nvibe guide scene # step-by-step authoring guide (scene)\nvibe guide pipeline # step-by-step authoring guide (pipeline)\n```\n\n## Route by the user's actual request\n\nRouting the user's request correctly is the most important judgement call\nyou'll make. Do not force everything into a scene project.\n\n**ASSET - default for any single-asset request OR ambiguous prompt.**\nIf the user asks for a single image, single video clip, sound effect, music\nbed, or narration file - **OR pastes a visual/audio brief without explicit\nstoryboard / scene / multi-scene language** - treat it as ASSET. Use\n`vibe generate ...` directly. Do **not** edit `DESIGN.md`,\n`STORYBOARD.md`, run `vibe scene ...`, or auto-load the hyperframes\nskill until BUILD intent is explicit. The visual-identity hard-gate\napplies to BUILD only.\n\nExamples:\n- \"make this image\" \u2192 `vibe generate image \"...\" -o assets/name.png`\n- \"use this image to make a video\" \u2192 `vibe generate video \"...\" -i image.png -o renders/name.mp4`\n- \"add a lower-third/title/animated overlay/grain/vignette to this clip\" \u2192 prefer `vibe edit motion-overlay clip.mp4 \"...\" --understand auto -o out.mp4` when the request asks for designed or animated motion graphics.\n- \"please add visuals using OpenAI image gen\" \u2192 `vibe generate image \"...\" -p openai ...`\n- *(verb-less paste)* \"aerial view of a misty mountain peak at sunrise...\" \u2192 `vibe generate image \"<paste>\" -o assets/mountain-peak.png`. **Don't** read it as a brief for DESIGN.md.\n\nIf genuinely uncertain, ask one short question: *\"single asset or\nmulti-scene project?\"* before authoring DESIGN.md or loading the\nhyperframes skill.\n\n**BUILD - create new video from text intent.**\nUse `vibe build` with a STORYBOARD.md + DESIGN.md. The\nskills-driven pipeline (v0.60+) dispatches narration TTS + backdrop\nimage-gen per beat, composes scene HTML via the bundled composition rules\nbundle, then renders to MP4. Idempotent re-runs reuse cached assets.\n\n**REMIX - transform existing video / audio.**\nUse `vibe remix`, `vibe edit`, or `vibe audio`. One-shot,\nbatch-oriented operations on a file the user already has on disk.\n`vibe edit text-overlay` is the free deterministic path for simple static\ntext burn-in. If the user asks for motion design, animated lower-thirds,\ndesigned titles, grain/vignette as part of a graphic treatment, or says\n\"motion graphics\", use `vibe edit motion-overlay ... --understand auto` instead.\n\nDecision rule: if the user asks for one asset, it's ASSET. If the user asks\nfor a multi-scene/storyboard/composed video, it's BUILD. If the user is\nstarting from a media file and wants it transformed, it's REMIX.\n\n## Common workflows\n\n### BUILD (new video from text)\n\n| Task | Command |\n|---|---|\n| One-shot storyboard \u2192 video | `vibe build [project-dir]` |\n| Render an existing scene project | `vibe render [project-dir] -o out.mp4` |\n| Lint scene HTML | `vibe scene lint --json` |\n| Generate a single image | `vibe generate image \"prompt\" -o img.png --quality hd` |\n| Generate a single video | `vibe generate video \"prompt\" -i image.png -o clip.mp4` |\n| Generate narration | `vibe generate narration \"text\" -o voice.mp3` |\n\n### REMIX (transform existing media)\n\n| Task | Command |\n|---|---|\n| Extract highlights from a long video | `vibe remix highlights file.mp4 -d 60` |\n| Long video \u2192 vertical shorts | `vibe remix auto-shorts file.mp4 -n 3 --add-captions` |\n| Add animated word-by-word captions | `vibe remix animated-caption file.mp4 -s karaoke-sweep` |\n| Add designed motion graphics overlay | `vibe edit motion-overlay file.mp4 \"lower-third...\" --understand auto -o out.mp4` |\n| Remove silence | `vibe edit silence-cut in.mp4 -o out.mp4` |\n| Add static captions | `vibe edit caption in.mp4 -o out.mp4` |\n| Translate audio (transcribe \u2192 TTS) | `vibe audio dub file.mp4 -t ko` |\n| Transcribe (Whisper, word-level) | `vibe audio transcribe file.mp4 --granularity word` |\n| Inspect media with Gemini | `vibe inspect media file.mp4 \"summarise\" --json` |\n\n### Compose pipelines (Video as Code)\n\n| Task | Command |\n|---|---|\n| Run a YAML pipeline | `vibe run pipeline.yaml --dry-run` |\n| Resume from last checkpoint | `vibe run pipeline.yaml --resume` |\n\n## Cost tiers\n\n| Tier | Examples | Approx. per call |\n|---|---|---|\n| **Free** | `schema/context/doctor`, `detect *`, `status *`, `plan`, `storyboard validate`, `inspect project/render --cheap`, deterministic edits | $0 |\n| **Low** | `generate narration/sound-effect/music`, `audio transcribe`, `inspect media`, optional AI review | $0.01\u2013$0.10 |\n| **High** | `generate image/motion`, `edit image/reframe/grade/speed-ramp` | $1\u2013$5 |\n| **Very High** | `generate video`, `edit fill-gaps`, `remix highlights/auto-shorts`, `build` with generated assets | $5\u2013$50+ |\n\n## Agent invariants\n\nWhen you run vibe commands programmatically:\n\n1. **Always `--json`** for structured output you can parse without regex\n2. **Always `--dry-run` first** for any High/Very-High tier command - it returns\n the cost estimate without spending API budget\n3. **Use `vibe schema <command>`** to discover parameters; do not guess flags\n4. **Pass complex options via `--stdin`**:\n ```bash\n echo '{\"video\":\"long.mp4\",\"count\":3,\"aspect\":\"9:16\"}' | vibe remix auto-shorts --stdin --json\n ```\n\n## Provider keys and project scope\n\nPrefer `vibe setup --scope project` for project-local keys. It writes\n`.vibeframe/config.yaml` in the setup directory; when you work from a\nnested scene directory, the `vibe` CLI automatically searches parent\ndirectories and uses the nearest project config. Do not assume the config\nfile must exist in the current subdirectory.\n\nRun `vibe doctor --json` from the directory where you will run commands\nand check `data.scope.project.configPath` / `data.scope.activeScope` before\ndeciding keys are missing. Never print or copy config file contents.\n\nFor generated project assets, use VibeFrame commands such as\n`vibe generate image|video|speech ...` so these project-scope keys are\nused. Do not switch to a host agent's built-in image/audio generation tool\nunless the user explicitly asks for a non-VibeFrame asset.\n\n`.env` is still supported as a gitignored fallback. Copy `.env.example`\nto start if you prefer environment variables.\n\n## App host setup\n\nVibeFrame is CLI-first, not terminal-only. Codex, Claude Code, and Cursor can\ndrive the same project through shell commands, and app hosts can also use\nVibeFrame's MCP server as a typed tool surface.\n\n```bash\nvibe host setup all # print snippets only\nvibe host setup all --write # write project/app config\nvibe host doctor all --json # verify readiness\n```\n\nDefault setup is snippet-only; use `--write` when you want VibeFrame to merge\nthe generated config. Keep provider keys in `.vibeframe/config.yaml`, user\nconfig, or env files - not in app host config.\n\n## Host agent loop\n\nFor long-running work, use your host's agent loop (Claude Code, Codex, Cursor,\nor another coding-agent host) as the outer loop. VibeFrame should not own a\ncompeting project-level agent loop. It provides `--json` commands, dry runs,\nbudget caps, `build-report.json`, `review-report.json`, `nextActions`,\n`safeToAutoRun`, `requiresConfirmation`, `fixOwner`, deterministic repair,\nand render inspection for the host agent to decide what to do next.\n\nCopy-paste agent prompt (Codex) - a plain prompt, not a built-in command:\n\n```text\nBuild this VibeFrame project into renders/final.mp4. Use --json for every\nvibe command, run --dry-run before paid operations, use --max-cost 5 for builds\nunless the user gives another budget, read build-report.json and\nreview-report.json before deciding the next action, prefer nextActions before\nguessing, run only safeToAutoRun:true actions automatically, and ask before\nrequiresConfirmation:true actions. Treat retryWith as the compatibility\nfallback, fixOwner:\"vibe\" as CLI repair work, and fixOwner:\"host-agent\" as\nSTORYBOARD.md, DESIGN.md, or composition edits.\nStop only when renders/final.mp4 exists, target duration and aspect ratio are\nmet, inspect render --cheap has no errors, any AI review score is >= 90 when AI review is requested, and every\nremaining host-agent issue is fixed, accepted with rationale, or reported as\nblocked.\n```\n\nCopy-paste agent prompt (Claude Code) - a plain prompt, not a built-in command:\n\n```text\nFinish this VibeFrame render using your host's agent loop as the outer\nloop. Use vibe context/schema when unsure, --json everywhere, dry-run before\npaid operations, budget cap via --max-cost 5, nextActions before guessing,\nbuild-report.json/review-report.json as loop state, and safeToAutoRun,\nrequiresConfirmation, and fixOwner to decide between vibe scene repair and\nhost-agent edits. Stop only after final MP4,\ntarget duration/aspect ratio, clean render inspection, any AI review score >= 90 when AI review is requested, and\nno unresolved unacknowledged host-agent issues.\n```\n\n### Composition rules (scene HTML)\n\nComposition rules live in the **Hyperframes skill** - framework rules, motion\nprinciples, type system, and visual-identity hard-gate. **Load that skill\nbefore authoring any scene composition HTML under `compositions/`.** The same\nrules govern `vibe scene lint`, so your authored HTML and the linter stay in\nagreement.\n\nWhere the skill comes from depends on your setup:\n\n- If the `hyperframes` skill is installed globally (e.g. Claude Code), your\n agent already has it and nothing else is needed.\n- Otherwise install it into this project with `vibe scene install-skill`,\n which runs upstream's own installer and writes\n `.agents/skills/hyperframes/`.\n\n`vibe init` never copies the rules in. They come from upstream so they stay\ncurrent, and fetching them is a network call the scaffold does not make on\nyour behalf. `vibe doctor` reports whether your agent can read them.\n\nFor render-stable text, do not apply continuous `scale`, `x`, `y`,\n`filter`, or other transform tweens to `.scene-content` or any ancestor\ncontaining live text/cards. Put ambient zoom/parallax on background or media\nlayers only; text should enter briefly and then hold still at its final CSS\nposition.\n\n### Scene composer (non-agent fallback)\n\nScene HTML is authored by you, the host agent - the CLI makes no LLM call\nduring `vibe build`. When no agent is available to author scenes, pass\n`--composer template` for the deterministic no-model composer\n(concat background + lower-thirds).\n\n## Project conventions\n\n<!-- Edit this section with YOUR project's specifics. Examples below. -->\n\n- Default aspect ratio: `16:9`\n- Default scene duration: `3 seconds` (per beat)\n- Brand voice: <describe>\n- Output naming: `renders/<name>-<timestamp>.mp4`\n";
|
|
22
22
|
/**
|
|
23
23
|
* Claude Code project file. Imports AGENTS.md so guidance stays
|
|
24
24
|
* single-sourced; adds Claude-specific overrides (slash commands, etc.).
|
|
@@ -32,9 +32,10 @@ export interface OpenAIImageHelperResult {
|
|
|
32
32
|
modelLabel: string;
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
|
-
* Resolve the user-supplied model alias to the API id + display label
|
|
36
|
-
* Unknown or empty aliases resolve to the default model.
|
|
37
|
-
* tests can assert label↔model parity (regression cover for
|
|
35
|
+
* Resolve the user-supplied model alias to the API id + display label, from
|
|
36
|
+
* the model catalog. Unknown or empty aliases resolve to the default model.
|
|
37
|
+
* Exported so unit tests can assert label↔model parity (regression cover for
|
|
38
|
+
* v0.52.0 bug).
|
|
38
39
|
*/
|
|
39
40
|
export declare function resolveOpenAIImageModel(modelAlias?: string): {
|
|
40
41
|
openaiModel: GPTImageModel;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -41,7 +41,9 @@ export declare function sleep(ms: number): Promise<void>;
|
|
|
41
41
|
* Upload image to ImgBB and return the URL.
|
|
42
42
|
* Used for Kling v2.5/v2.6 image-to-video which requires URL (not base64).
|
|
43
43
|
*/
|
|
44
|
-
export declare function uploadToImgbb(imageBuffer: Buffer, apiKey: string
|
|
44
|
+
export declare function uploadToImgbb(imageBuffer: Buffer, apiKey: string,
|
|
45
|
+
/** Seconds until ImgBB deletes the image (60 to 15,552,000). Omit for a permanent upload. */
|
|
46
|
+
expirationSeconds?: number): Promise<{
|
|
45
47
|
success: boolean;
|
|
46
48
|
url?: string;
|
|
47
49
|
error?: string;
|
package/dist/commands/agent.d.ts
CHANGED
|
@@ -16,6 +16,12 @@ export interface StartAgentOptions {
|
|
|
16
16
|
/** Cumulative USD ceiling — agent rejects further tool calls past this. */
|
|
17
17
|
budgetUsd?: number | string;
|
|
18
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* `vibe agent` is deprecated: the host's agent loop (Claude Code, Codex,
|
|
21
|
+
* Cursor, or an MCP app host) is the outer loop, and a second built-in loop
|
|
22
|
+
* competes with it. Printed to stderr so `--input` stdout stays clean.
|
|
23
|
+
*/
|
|
24
|
+
export declare const AGENT_DEPRECATION_NOTICE: string;
|
|
19
25
|
/**
|
|
20
26
|
* Start the AI agent
|
|
21
27
|
* @param options - Agent options
|
|
@@ -7,6 +7,15 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import type { Command } from "commander";
|
|
9
9
|
export declare function registerVideoCommand(parent: Command): void;
|
|
10
|
+
/**
|
|
11
|
+
* Cost figure for a REAL (non-dry-run) generation envelope.
|
|
12
|
+
*
|
|
13
|
+
* Seedance has a token-accurate estimator; every other provider reports the
|
|
14
|
+
* command's tier upper bound with a warning naming it an estimate. Without
|
|
15
|
+
* this the success envelope defaulted to costUsd 0, which an agent budget
|
|
16
|
+
* loop reads as "free" - the hybrid-brew dogfood run billed Runway twice
|
|
17
|
+
* while reporting $0.
|
|
18
|
+
*/
|
|
10
19
|
export declare function realRunCost(provider: string, options: {
|
|
11
20
|
duration?: string;
|
|
12
21
|
resolution?: string;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Commands:
|
|
7
7
|
* generate image - Generate image (Gemini, OpenAI, Grok, Runway)
|
|
8
|
-
* generate video - Generate video (Seedance, Grok, Kling, Runway, Veo)
|
|
8
|
+
* generate video - Generate video (Seedance, Grok, Kling, Runway, Omni, Veo)
|
|
9
9
|
* generate sound-effect - Sound effects (ElevenLabs)
|
|
10
10
|
* generate music - Music generation (ElevenLabs default, Replicate MusicGen)
|
|
11
11
|
* generate motion - Standalone motion assets (Claude/Gemini + Remotion)
|
|
@@ -75,6 +75,11 @@ export interface SuccessEnvelopeOptions {
|
|
|
75
75
|
warnings?: string[];
|
|
76
76
|
/** Pass-through of `--dry-run` flag — surfaces as a top-level `dryRun: true` in the envelope. */
|
|
77
77
|
dryRun?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* The caller already printed its own human-readable output (a build plan,
|
|
80
|
+
* a render summary), so human mode adds nothing for this dry run.
|
|
81
|
+
*/
|
|
82
|
+
humanRendered?: boolean;
|
|
78
83
|
}
|
|
79
84
|
/** Look up the upper-bound cost estimate for a command (used by dry-run). */
|
|
80
85
|
/**
|
|
@@ -87,12 +92,15 @@ export declare function lookupCostEstimateUpperBound(command: string): number;
|
|
|
87
92
|
* Emit a canonical success envelope (#33 — 2c). JSON mode prints the
|
|
88
93
|
* envelope; quiet mode prints a single primary value extracted from
|
|
89
94
|
* `data.outputPath ?? data.output ?? data.path ?? data.url ?? data.id`;
|
|
90
|
-
* human mode prints
|
|
95
|
+
* human mode prints a summary for dry runs (unless the caller rendered its
|
|
96
|
+
* own) and otherwise nothing — the caller renders human output itself.
|
|
91
97
|
*
|
|
92
98
|
* Canary scope: `generate image` only in 2c-canary. 2c-sweep migrates
|
|
93
99
|
* the rest. Old `outputResult()` remains for the sweep transition.
|
|
94
100
|
*/
|
|
95
101
|
export declare function outputSuccess(opts: SuccessEnvelopeOptions): void;
|
|
102
|
+
/** Print warnings to stderr in human mode; JSON envelopes carry them instead. */
|
|
103
|
+
export declare function printWarnings(warnings: readonly string[]): void;
|
|
96
104
|
/** Output result - JSON mode outputs JSON, quiet mode outputs primary value only */
|
|
97
105
|
export declare function outputResult(result: Record<string, unknown>): void;
|
|
98
106
|
/** Wrap console output - suppressed in JSON/quiet mode */
|