@vibeframe/cli 0.113.29 → 0.114.0

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 CHANGED
@@ -125,13 +125,17 @@ vibe guide <topic> --json # Step-by-step guides (motion | scene | p
125
125
  }
126
126
  ```
127
127
 
128
- | Code | Exit | Meaning | Recovery |
129
- | --------------- | ---- | ------------------- | -------------------------- |
130
- | `USAGE_ERROR` | 2 | bad arg | check `vibe schema <cmd>` |
131
- | `NOT_FOUND` | 3 | file missing | verify path |
132
- | `AUTH_ERROR` | 4 | key missing/invalid | `vibe doctor` |
133
- | `API_ERROR` | 5 | provider failed | retry if `retryable: true` |
134
- | `NETWORK_ERROR` | 6 | connection | retry with backoff |
128
+ | Code | Exit | Meaning | Recovery |
129
+ | -------------------- | ---- | --------------------------- | --------------------------------- |
130
+ | `COST_CAP_EXCEEDED` | 1 | estimate over `--max-cost` | follow `retryWith`; do not re-run as-is |
131
+ | `USAGE_ERROR` | 2 | bad arg | check `vibe schema <cmd>` |
132
+ | `NOT_FOUND` | 3 | file missing | verify path |
133
+ | `AUTH_ERROR` | 4 | key missing/invalid | `vibe doctor` |
134
+ | `API_ERROR` | 5 | provider failed | retry if `retryable: true` |
135
+ | `NETWORK_ERROR` | 6 | connection | retry with backoff |
136
+
137
+ `COST_CAP_EXCEEDED` also carries `data.plan` - the priced plan the refusal was
138
+ based on - so a refused call still tells you what the build would have cost.
135
139
 
136
140
  ## Authentication
137
141
 
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @module _shared/compose-prompts
3
3
  *
4
- * Phase H2 — agentic compose primitive. Reads `STORYBOARD.md` + `DESIGN.md`
4
+ * Agentic compose primitive. Reads `STORYBOARD.md` + `DESIGN.md`
5
5
  * from a scene project and emits a structured plan for the host agent
6
6
  * (Claude Code, Cursor, Codex, Aider) to author per-beat HTML files
7
7
  * itself. **No LLM call from inside the CLI** — that's the point. The
@@ -0,0 +1,49 @@
1
+ /**
2
+ * @module commands/_shared/help-groups
3
+ *
4
+ * Groups the root `vibe --help` command listing by use case instead of
5
+ * alphabetically.
6
+ *
7
+ * Before this, the root help printed the same commands twice: once as
8
+ * Commander's flat alphabetical `Commands:` block, then again under a
9
+ * "Common workflows" footer that re-listed most of them by use case. The
10
+ * footer's own preamble admitted it ("the alphabetical list above is the
11
+ * full command set; this section shows the typical entry points by use
12
+ * case"), which left the reader to map the two lists onto each other.
13
+ *
14
+ * Descriptions are read from the live command tree rather than restated
15
+ * here, so this file can only ever drift in *grouping*, never in wording.
16
+ * A command missing from {@link COMMAND_GROUPS} lands in a trailing
17
+ * "Other" group rather than disappearing; `help-groups.test.ts` asserts
18
+ * that group stays empty so adding a top-level command fails the test
19
+ * instead of silently degrading the help.
20
+ */
21
+ import type { Command } from "commander";
22
+ /**
23
+ * Use-case groups for the root help listing, in display order.
24
+ *
25
+ * Ordered by the sequence a first-time reader needs them: build a project
26
+ * video, reach for a one-off asset, then wire up hosts and automation.
27
+ */
28
+ export declare const COMMAND_GROUPS: ReadonlyArray<{
29
+ readonly title: string;
30
+ readonly commands: readonly string[];
31
+ }>;
32
+ /**
33
+ * Top-level commands that appear in help, excluding hidden ones and
34
+ * Commander's auto-generated `help` command.
35
+ */
36
+ export declare function visibleTopLevelCommands(prog: Command): Command[];
37
+ /**
38
+ * Visible top-level command names that no group in {@link COMMAND_GROUPS}
39
+ * claims. Empty in a healthy tree; the test asserts that.
40
+ */
41
+ export declare function ungroupedCommandNames(prog: Command): string[];
42
+ /**
43
+ * Render the grouped command listing for the root `vibe --help`.
44
+ *
45
+ * Returns the block that replaces Commander's flat `Commands:` section,
46
+ * already prefixed and suffixed with a blank line so it slots between the
47
+ * options block and the remaining help footers.
48
+ */
49
+ export declare function renderCommandGroups(prog: Command): string;
@@ -0,0 +1 @@
1
+ export {};
@@ -98,7 +98,7 @@ export declare function buildHyperframesConfig(): HyperframesConfig;
98
98
  export declare function buildHyperframesMeta(name: string, now?: Date): HyperframesMeta;
99
99
  /**
100
100
  * Merge an existing Hyperframes config with our defaults, preserving any
101
- * user-authored keys and nested values. `vibe scene init` is idempotent:
101
+ * user-authored keys and nested values. `vibe init` is idempotent:
102
102
  * running it on a directory that already has `hyperframes.json` must never
103
103
  * lose user config.
104
104
  */
@@ -21,7 +21,7 @@ export interface MotionCommandOptions {
21
21
  render?: boolean;
22
22
  /** Base video to composite the motion graphic onto */
23
23
  video?: string;
24
- /** Image to analyze with Gemini — color/mood/composition fed into Claude prompt */
24
+ /** Image to analyze with Gemini - color/mood/composition fed into Claude prompt */
25
25
  image?: string;
26
26
  /** Analyze base video before generating motion: auto | off | required */
27
27
  understand?: "auto" | "off" | "required";
@@ -10,7 +10,6 @@
10
10
  *
11
11
  * @dependencies Gemini (Google), FFmpeg (auto-fix filters)
12
12
  */
13
- import { Command } from "commander";
14
13
  import type { VideoReviewFeedback } from "./ai-edit.js";
15
14
  /** Options for {@link executeReview}. */
16
15
  export interface ReviewOptions {
@@ -55,4 +54,3 @@ export interface ReviewResult {
55
54
  * @returns Result with structured feedback and optional fix details
56
55
  */
57
56
  export declare function executeReview(options: ReviewOptions): Promise<ReviewResult>;
58
- export declare function registerReviewCommand(aiCommand: Command): void;
@@ -4,7 +4,6 @@
4
4
  * generation status check. Split out of `generate.ts` in v0.69 (Plan G
5
5
  * Phase 2).
6
6
  */
7
- import type { Command } from "commander";
8
7
  export interface ExecuteMusicStatusOptions {
9
8
  taskId: string;
10
9
  apiKey?: string;
@@ -17,4 +16,3 @@ export interface ExecuteMusicStatusResult {
17
16
  error?: string;
18
17
  }
19
18
  export declare function executeMusicStatus(options: ExecuteMusicStatusOptions): Promise<ExecuteMusicStatusResult>;
20
- export declare function registerMusicStatusCommand(parent: Command): void;
@@ -17,5 +17,4 @@ export interface ExecuteSpeechResult {
17
17
  error?: string;
18
18
  }
19
19
  export declare function executeSpeech(options: ExecuteSpeechOptions): Promise<ExecuteSpeechResult>;
20
- export declare function registerSpeechCommand(parent: Command): void;
21
20
  export declare function registerNarrationCommand(parent: Command): void;
@@ -3,7 +3,6 @@
3
3
  * @description `vibe generate storyboard` — Claude-powered script-to-
4
4
  * storyboard analysis. Split out of `generate.ts` in v0.69 (Plan G Phase 2).
5
5
  */
6
- import type { Command } from "commander";
7
6
  export interface ExecuteStoryboardOptions {
8
7
  content: string;
9
8
  duration?: number;
@@ -24,4 +23,3 @@ export interface ExecuteStoryboardResult {
24
23
  error?: string;
25
24
  }
26
25
  export declare function executeStoryboard(options: ExecuteStoryboardOptions): Promise<ExecuteStoryboardResult>;
27
- export declare function registerStoryboardCommand(parent: Command): void;
@@ -6,15 +6,10 @@
6
6
  * Commands:
7
7
  * generate image - Generate image (Gemini, OpenAI, Grok, Runway)
8
8
  * generate video - Generate video (Seedance, Grok, Kling, Runway, Veo)
9
- * generate speech - Text-to-speech (ElevenLabs)
10
9
  * generate sound-effect - Sound effects (ElevenLabs)
11
10
  * generate music - Music generation (ElevenLabs default, Replicate MusicGen)
12
- * generate music-status - Check music generation status
13
- * generate storyboard - Script-to-storyboard (Claude)
14
11
  * generate motion - Standalone motion assets (Claude/Gemini + Remotion)
15
12
  * generate thumbnail - Thumbnail generation/extraction
16
- * generate background - AI background generation (OpenAI)
17
- * generate video-status - Check video generation status (Grok/Runway/Kling/Veo)
18
13
  * generate video-cancel - Cancel video generation (Grok/Runway)
19
14
  * generate video-extend - Extend video (Kling/Veo)
20
15
  *
@@ -25,8 +20,6 @@ export { executeSoundEffect } from "./generate/sound-effect.js";
25
20
  export type { ExecuteSoundEffectOptions, ExecuteSoundEffectResult, } from "./generate/sound-effect.js";
26
21
  export { executeMusicStatus } from "./generate/music-status.js";
27
22
  export type { ExecuteMusicStatusOptions, ExecuteMusicStatusResult, } from "./generate/music-status.js";
28
- export { executeBackground } from "./generate/background.js";
29
- export type { ExecuteBackgroundOptions, ExecuteBackgroundResult } from "./generate/background.js";
30
23
  export { executeStoryboard } from "./generate/storyboard.js";
31
24
  export type { ExecuteStoryboardOptions, ExecuteStoryboardResult } from "./generate/storyboard.js";
32
25
  export { executeSpeech } from "./generate/speech.js";
@@ -10,8 +10,6 @@
10
10
  * inspect project - Local project completeness and composition checks
11
11
  * inspect render - Local rendered video checks plus optional Gemini review
12
12
  * inspect media - Unified analysis for images, videos, and YouTube URLs (Gemini)
13
- * inspect video - Analyze video files or YouTube URLs with Gemini
14
- * inspect review - AI video quality review and auto-fix (Gemini)
15
13
  * inspect suggest - Get AI edit suggestions using Gemini
16
14
  *
17
15
  * @dependencies Gemini (Google), FFmpeg (auto-fix filters)
@@ -22,6 +22,12 @@ export interface StructuredError {
22
22
  retryWith?: string[];
23
23
  recoverable?: boolean;
24
24
  retryable: boolean;
25
+ /**
26
+ * Structured context carried alongside the failure, so a refusal can hand
27
+ * back the evidence it refused on instead of forcing a second call. Used by
28
+ * the `--max-cost` gate to return the priced build plan with the refusal.
29
+ */
30
+ data?: Record<string, unknown>;
25
31
  }
26
32
  export declare function usageError(msg: string, suggestion?: string): StructuredError;
27
33
  export declare function authError(envVar: string, provider: string): StructuredError;
@@ -29,6 +35,21 @@ export declare function apiError(msg: string, retryable?: boolean): StructuredEr
29
35
  export declare function notFoundError(path: string): StructuredError;
30
36
  export declare function networkError(msg: string): StructuredError;
31
37
  export declare function generalError(msg: string, suggestion?: string): StructuredError;
38
+ /**
39
+ * The `--max-cost` refusal. A command that declines to spend is a failure, so
40
+ * it takes the structured error path like every other refusal: `success:false`
41
+ * on stderr, exit 1. `data` carries the priced plan the refusal was based on,
42
+ * so an agent gets the estimate and the reason from one call.
43
+ *
44
+ * `recoverable: true` because the caller has two real ways forward (raise the
45
+ * ceiling, or narrow the scope), both spelled out in `retryWith`.
46
+ */
47
+ export declare function costCapError(opts: {
48
+ estimatedCostUsd: number;
49
+ maxCostUsd: number;
50
+ retryWith: string[];
51
+ data?: Record<string, unknown>;
52
+ }): StructuredError;
32
53
  /** Output structured error then exit */
33
54
  export declare function exitWithError(err: StructuredError): never;
34
55
  /** Check if --json flag is active */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * `vibe run` command — Execute declarative YAML video pipelines.
2
+ * `vibe run` command - Execute declarative YAML video pipelines.
3
3
  *
4
4
  * Video as Code: define reproducible, shareable video workflows in YAML.
5
5
  * Each step maps to an existing CLI command's execute function.