@vibeframe/cli 0.105.1 → 0.106.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/dist/agent/adapters/claude.d.ts +14 -0
- package/dist/agent/adapters/gemini.d.ts +14 -0
- package/dist/agent/adapters/index.d.ts +27 -0
- package/dist/agent/adapters/ollama.d.ts +19 -0
- package/dist/agent/adapters/openai.d.ts +14 -0
- package/dist/agent/adapters/openrouter.d.ts +15 -0
- package/dist/agent/adapters/openrouter.test.d.ts +4 -0
- package/dist/agent/adapters/xai.d.ts +14 -0
- package/dist/agent/index.d.ts +109 -0
- package/dist/agent/memory/index.d.ts +69 -0
- package/dist/agent/prompts/system.d.ts +5 -0
- package/dist/agent/tools/e2e.test.d.ts +25 -0
- package/dist/agent/tools/index.d.ts +59 -0
- package/dist/agent/tools/integration.test.d.ts +10 -0
- package/dist/agent/tools/scene.test.d.ts +1 -0
- package/dist/agent/types.d.ts +72 -0
- package/dist/commands/_shared/build-asset-metadata.d.ts +43 -0
- package/dist/commands/_shared/build-asset-reference.d.ts +18 -0
- package/dist/commands/_shared/build-backdrop-prompt.d.ts +8 -0
- package/dist/commands/_shared/build-backdrop-prompt.test.d.ts +1 -0
- package/dist/commands/_shared/build-cache.d.ts +37 -0
- package/dist/commands/_shared/build-plan.d.ts +107 -0
- package/dist/commands/_shared/build-plan.test.d.ts +1 -0
- package/dist/commands/_shared/compose-prompts.d.ts +97 -0
- package/dist/commands/_shared/compose-prompts.test.d.ts +1 -0
- package/dist/commands/_shared/compose-scenes-skills.d.ts +282 -0
- package/dist/commands/_shared/compose-scenes-skills.test.d.ts +1 -0
- package/dist/commands/_shared/composer-resolve.d.ts +47 -0
- package/dist/commands/_shared/composer-resolve.test.d.ts +1 -0
- package/dist/commands/_shared/cost-tier.d.ts +58 -0
- package/dist/commands/_shared/edit/_helpers.d.ts +12 -0
- package/dist/commands/_shared/edit/caption.d.ts +47 -0
- package/dist/commands/_shared/edit/fade.d.ts +38 -0
- package/dist/commands/_shared/edit/jump-cut.d.ts +80 -0
- package/dist/commands/_shared/edit/noise-reduce.d.ts +33 -0
- package/dist/commands/_shared/edit/silence-cut.d.ts +63 -0
- package/dist/commands/_shared/edit/text-overlay.d.ts +50 -0
- package/dist/commands/_shared/edit/translate-srt.d.ts +40 -0
- package/dist/commands/_shared/edit/video-review.d.ts +62 -0
- package/dist/commands/_shared/execute-fill-gaps.d.ts +97 -0
- package/dist/commands/_shared/hf-skill-bundle/bundle-content.d.ts +16 -0
- package/dist/commands/_shared/hf-skill-bundle/bundle.d.ts +57 -0
- package/dist/commands/_shared/hf-skill-bundle/bundle.test.d.ts +1 -0
- package/dist/commands/_shared/init-templates.d.ts +58 -0
- package/dist/commands/_shared/init-templates.test.d.ts +1 -0
- package/dist/commands/_shared/install-skill.d.ts +76 -0
- package/dist/commands/_shared/install-skill.test.d.ts +1 -0
- package/dist/commands/_shared/openai-image.d.ts +49 -0
- package/dist/commands/_shared/openai-image.test.d.ts +1 -0
- package/dist/commands/_shared/product-surface.d.ts +11 -0
- package/dist/commands/_shared/product-surface.test.d.ts +1 -0
- package/dist/commands/_shared/project-config.d.ts +60 -0
- package/dist/commands/_shared/render-inspect.d.ts +104 -0
- package/dist/commands/_shared/render-inspect.test.d.ts +1 -0
- package/dist/commands/_shared/review-report.d.ts +65 -0
- package/dist/commands/_shared/root-sync.d.ts +39 -0
- package/dist/commands/_shared/scene-audio-mux.d.ts +74 -0
- package/dist/commands/_shared/scene-audio-mux.test.d.ts +6 -0
- package/dist/commands/_shared/scene-audio-scan.d.ts +93 -0
- package/dist/commands/_shared/scene-audio-scan.test.d.ts +5 -0
- package/dist/commands/_shared/scene-build-mode.d.ts +4 -0
- package/dist/commands/_shared/scene-build-mode.test.d.ts +1 -0
- package/dist/commands/_shared/scene-build.d.ts +452 -0
- package/dist/commands/_shared/scene-build.test.d.ts +1 -0
- package/dist/commands/_shared/scene-html-emit.d.ts +163 -0
- package/dist/commands/_shared/scene-html-emit.test.d.ts +1 -0
- package/dist/commands/_shared/scene-inspect.d.ts +56 -0
- package/dist/commands/_shared/scene-inspect.test.d.ts +1 -0
- package/dist/commands/_shared/scene-lint.d.ts +109 -0
- package/dist/commands/_shared/scene-lint.test.d.ts +1 -0
- package/dist/commands/_shared/scene-project.d.ts +147 -0
- package/dist/commands/_shared/scene-project.test.d.ts +1 -0
- package/dist/commands/_shared/scene-render.d.ts +109 -0
- package/dist/commands/_shared/scene-render.test.d.ts +1 -0
- package/dist/commands/_shared/scene-repair.d.ts +22 -0
- package/dist/commands/_shared/scene-repair.test.d.ts +1 -0
- package/dist/commands/_shared/status-jobs.d.ts +197 -0
- package/dist/commands/_shared/status-jobs.test.d.ts +1 -0
- package/dist/commands/_shared/storyboard-draft.d.ts +13 -0
- package/dist/commands/_shared/storyboard-draft.test.d.ts +1 -0
- package/dist/commands/_shared/storyboard-edit.d.ts +26 -0
- package/dist/commands/_shared/storyboard-edit.test.d.ts +1 -0
- package/dist/commands/_shared/storyboard-parse.d.ts +159 -0
- package/dist/commands/_shared/storyboard-parse.test.d.ts +1 -0
- package/dist/commands/_shared/storyboard-revise.d.ts +32 -0
- package/dist/commands/_shared/storyboard-revise.test.d.ts +1 -0
- package/dist/commands/_shared/timeline-project.d.ts +32 -0
- package/dist/commands/_shared/tts-resolve.d.ts +75 -0
- package/dist/commands/_shared/tts-resolve.test.d.ts +5 -0
- package/dist/commands/_shared/video-providers.d.ts +44 -0
- package/dist/commands/_shared/video-utils.d.ts +71 -0
- package/dist/commands/_shared/visual-styles.d.ts +55 -0
- package/dist/commands/_shared/visual-styles.test.d.ts +1 -0
- package/dist/commands/_shared/walkthroughs/walkthroughs.d.ts +47 -0
- package/dist/commands/_shared/walkthroughs/walkthroughs.test.d.ts +1 -0
- package/dist/commands/agent.d.ts +24 -0
- package/dist/commands/ai-analyze.d.ts +105 -0
- package/dist/commands/ai-animated-caption.d.ts +63 -0
- package/dist/commands/ai-audio.d.ts +92 -0
- package/dist/commands/ai-edit-cli.d.ts +13 -0
- package/dist/commands/ai-edit.d.ts +29 -0
- package/dist/commands/ai-fill-gaps.d.ts +15 -0
- package/dist/commands/ai-helpers.d.ts +26 -0
- package/dist/commands/ai-highlights.d.ts +126 -0
- package/dist/commands/ai-image.d.ts +71 -0
- package/dist/commands/ai-motion.d.ts +53 -0
- package/dist/commands/ai-review.d.ts +58 -0
- package/dist/commands/ai-script-pipeline-cli.d.ts +10 -0
- package/dist/commands/ai-script-pipeline.d.ts +74 -0
- package/dist/commands/ai-suggest-edit.d.ts +32 -0
- package/dist/commands/ai-video.d.ts +95 -0
- package/dist/commands/ai.test.d.ts +1 -0
- package/dist/commands/audio.d.ts +17 -0
- package/dist/commands/batch.d.ts +2 -0
- package/dist/commands/batch.test.d.ts +1 -0
- package/dist/commands/build.d.ts +2 -0
- package/dist/commands/completion.d.ts +20 -0
- package/dist/commands/completion.test.d.ts +1 -0
- package/dist/commands/context.d.ts +7 -0
- package/dist/commands/context.test.d.ts +1 -0
- package/dist/commands/demo.d.ts +6 -0
- package/dist/commands/detect.d.ts +55 -0
- package/dist/commands/doctor.d.ts +5 -0
- package/dist/commands/doctor.test.d.ts +1 -0
- package/dist/commands/edit/motion-overlay.d.ts +30 -0
- package/dist/commands/edit-cmd.d.ts +112 -0
- package/dist/commands/envelope-snapshots.test.d.ts +32 -0
- package/dist/commands/export.d.ts +60 -0
- package/dist/commands/export.test.d.ts +1 -0
- package/dist/commands/generate/background.d.ts +22 -0
- package/dist/commands/generate/image.d.ts +8 -0
- package/dist/commands/generate/music-status.d.ts +20 -0
- package/dist/commands/generate/music.d.ts +27 -0
- package/dist/commands/generate/sound-effect.d.ts +19 -0
- package/dist/commands/generate/speech.d.ts +21 -0
- package/dist/commands/generate/storyboard.d.ts +27 -0
- package/dist/commands/generate/thumbnail.d.ts +8 -0
- package/dist/commands/generate/video-cancel.d.ts +8 -0
- package/dist/commands/generate/video-extend.d.ts +8 -0
- package/dist/commands/generate/video-status.d.ts +8 -0
- package/dist/commands/generate/video.d.ts +8 -0
- package/dist/commands/generate.d.ts +36 -0
- package/dist/commands/init.d.ts +24 -0
- package/dist/commands/init.test.d.ts +1 -0
- package/dist/commands/inspect.d.ts +20 -0
- package/dist/commands/media.d.ts +2 -0
- package/dist/commands/output.d.ts +80 -0
- package/dist/commands/output.test.d.ts +1 -0
- package/dist/commands/plan.d.ts +2 -0
- package/dist/commands/project.d.ts +2 -0
- package/dist/commands/project.test.d.ts +1 -0
- package/dist/commands/provider-config-cli.test.d.ts +1 -0
- package/dist/commands/q-flag-collision.test.d.ts +1 -0
- package/dist/commands/remix.d.ts +20 -0
- package/dist/commands/render.d.ts +2 -0
- package/dist/commands/run.d.ts +14 -0
- package/dist/commands/sanitize.d.ts +20 -0
- package/dist/commands/scene.d.ts +95 -0
- package/dist/commands/scene.test.d.ts +1 -0
- package/dist/commands/schema.d.ts +12 -0
- package/dist/commands/setup.d.ts +5 -0
- package/dist/commands/setup.test.d.ts +1 -0
- package/dist/commands/status.d.ts +2 -0
- package/dist/commands/storyboard.d.ts +2 -0
- package/dist/commands/timeline.d.ts +2 -0
- package/dist/commands/timeline.test.d.ts +1 -0
- package/dist/commands/validate.d.ts +33 -0
- package/dist/commands/walkthrough.d.ts +21 -0
- package/dist/config/config.test.d.ts +1 -0
- package/dist/config/index.d.ts +110 -0
- package/dist/config/schema.d.ts +64 -0
- package/dist/config/scope.test.d.ts +1 -0
- package/dist/engine/index.d.ts +2 -0
- package/dist/engine/index.js +345 -0
- package/dist/engine/project.d.ts +93 -0
- package/dist/engine/project.test.d.ts +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +500 -330
- package/dist/pipeline/executor.d.ts +27 -0
- package/dist/pipeline/generate-actions.test.d.ts +1 -0
- package/dist/pipeline/index.d.ts +3 -0
- package/dist/pipeline/renderers/__tests__/html-template.test.d.ts +1 -0
- package/dist/pipeline/renderers/__tests__/integration.test.d.ts +1 -0
- package/dist/pipeline/renderers/chrome.d.ts +25 -0
- package/dist/pipeline/renderers/html-clips.d.ts +19 -0
- package/dist/pipeline/renderers/html-runtime.d.ts +6 -0
- package/dist/pipeline/renderers/html-template.d.ts +2 -0
- package/dist/pipeline/renderers/hyperframes.d.ts +7 -0
- package/dist/pipeline/renderers/project-builder.d.ts +7 -0
- package/dist/pipeline/renderers/types.d.ts +39 -0
- package/dist/pipeline/resolver.d.ts +19 -0
- package/dist/pipeline/scene-actions.test.d.ts +1 -0
- package/dist/pipeline/types.d.ts +81 -0
- package/dist/tools/adapters/agent.d.ts +9 -0
- package/dist/tools/adapters/agent.js +188 -0
- package/dist/tools/adapters/mcp.d.ts +34 -0
- package/dist/tools/adapters/mcp.js +173 -0
- package/dist/tools/define-tool.d.ts +82 -0
- package/dist/tools/define-tool.js +214 -0
- package/dist/tools/manifest/_project-io.d.ts +13 -0
- package/dist/tools/manifest/agent-only.d.ts +236 -0
- package/dist/tools/manifest/audio.d.ts +93 -0
- package/dist/tools/manifest/detect.d.ts +47 -0
- package/dist/tools/manifest/edit.d.ts +398 -0
- package/dist/tools/manifest/export.d.ts +27 -0
- package/dist/tools/manifest/generate.d.ts +310 -0
- package/dist/tools/manifest/index.d.ts +22 -0
- package/dist/tools/manifest/index.js +60812 -0
- package/dist/tools/manifest/inspect.d.ts +139 -0
- package/dist/tools/manifest/project.d.ts +33 -0
- package/dist/tools/manifest/remix.d.ts +154 -0
- package/dist/tools/manifest/scene.d.ts +221 -0
- package/dist/tools/manifest/status.d.ts +36 -0
- package/dist/tools/manifest/storyboard.d.ts +136 -0
- package/dist/tools/manifest/timeline.d.ts +173 -0
- package/dist/tools/manifest/walkthrough.d.ts +22 -0
- package/dist/tools/manifest.test.d.ts +13 -0
- package/dist/tools/zod-to-json-schema.d.ts +47 -0
- package/dist/utils/agent-host-detect.d.ts +61 -0
- package/dist/utils/agent-host-detect.test.d.ts +1 -0
- package/dist/utils/api-key.d.ts +58 -0
- package/dist/utils/api-key.test.d.ts +1 -0
- package/dist/utils/audio.d.ts +22 -0
- package/dist/utils/clipboard.d.ts +27 -0
- package/dist/utils/clipboard.test.d.ts +1 -0
- package/dist/utils/exec-safe.d.ts +21 -0
- package/dist/utils/first-run.d.ts +16 -0
- package/dist/utils/input-validation.d.ts +26 -0
- package/dist/utils/key-format.d.ts +15 -0
- package/dist/utils/key-live-test.d.ts +29 -0
- package/dist/utils/key-live-test.test.d.ts +1 -0
- package/dist/utils/open-url.d.ts +26 -0
- package/dist/utils/open-url.test.d.ts +1 -0
- package/dist/utils/project-resolver.d.ts +30 -0
- package/dist/utils/project-resolver.test.d.ts +8 -0
- package/dist/utils/provider-resolver.d.ts +32 -0
- package/dist/utils/provider-resolver.test.d.ts +13 -0
- package/dist/utils/remotion.d.ts +201 -0
- package/dist/utils/subtitle.d.ts +64 -0
- package/dist/utils/subtitle.test.d.ts +1 -0
- package/dist/utils/tty.d.ts +86 -0
- package/dist/utils/tty.test.d.ts +1 -0
- package/dist/utils/upload-host.d.ts +15 -0
- package/dist/utils/upload-host.test.d.ts +1 -0
- package/package.json +15 -115
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lightweight live-test for API keys. Each tester hits the provider's
|
|
3
|
+
* cheapest authenticated endpoint (typically a list-models route) and
|
|
4
|
+
* reports ok / not-ok. Tests run with a short timeout so a hung
|
|
5
|
+
* provider doesn't stall `vibe doctor`.
|
|
6
|
+
*
|
|
7
|
+
* Coverage is intentionally partial: providers without a free
|
|
8
|
+
* authenticated GET (fal, Kling, Runway, ImgBB) report `skipped: true`
|
|
9
|
+
* with a short reason. Adding a new provider tester is a one-row patch
|
|
10
|
+
* to the `TESTERS` table at the bottom.
|
|
11
|
+
*/
|
|
12
|
+
export interface KeyLiveTestResult {
|
|
13
|
+
/** Did the call succeed (2xx)? */
|
|
14
|
+
ok: boolean;
|
|
15
|
+
/** True when the provider has no cheap test endpoint. */
|
|
16
|
+
skipped?: boolean;
|
|
17
|
+
/** HTTP status when applicable. */
|
|
18
|
+
status?: number;
|
|
19
|
+
/** Short human-readable reason — set on skip or failure. */
|
|
20
|
+
message?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Run a live test for one provider key. Returns `{ ok: false, skipped:
|
|
24
|
+
* true }` for providers without a cheap test, so the caller can render
|
|
25
|
+
* a different glyph.
|
|
26
|
+
*/
|
|
27
|
+
export declare function testKey(configKey: string, key: string, timeoutMs?: number): Promise<KeyLiveTestResult>;
|
|
28
|
+
/** Lookup table introspection — used by tests + doctor's print loop. */
|
|
29
|
+
export declare function isTestableProvider(configKey: string): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cross-platform URL opener. Spawns the OS browser handler in a detached
|
|
3
|
+
* process so the CLI's input flow continues uninterrupted.
|
|
4
|
+
*
|
|
5
|
+
* Silent on failure: launching a browser is convenience, never the user's
|
|
6
|
+
* critical path. If the OS hook is missing (CI containers, headless Linux
|
|
7
|
+
* without xdg-utils), the caller's prompt still works.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Open `url` in the user's default browser.
|
|
11
|
+
*
|
|
12
|
+
* Resolves immediately; the spawned process is detached and unref'd, so the
|
|
13
|
+
* CLI doesn't wait for the browser. Errors are swallowed.
|
|
14
|
+
*/
|
|
15
|
+
export declare function openUrl(url: string): Promise<void>;
|
|
16
|
+
interface Opener {
|
|
17
|
+
command: string | null;
|
|
18
|
+
args: string[];
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Pick the OS-appropriate opener command. Exported for unit testing — the
|
|
22
|
+
* implementation has no side effects so we can verify the args without
|
|
23
|
+
* actually spawning anything.
|
|
24
|
+
*/
|
|
25
|
+
export declare function resolveOpener(url: string): Opener;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module utils/project-resolver
|
|
3
|
+
*
|
|
4
|
+
* Single resolver for "where is the timeline file?" The CLI accepts three
|
|
5
|
+
* input shapes:
|
|
6
|
+
*
|
|
7
|
+
* 1. Direct file path: passed through as-is.
|
|
8
|
+
* 2. Directory: looks for `timeline.json` first (canonical),
|
|
9
|
+
* falls back to an existing `project.vibe.json` (legacy).
|
|
10
|
+
* 3. Non-existent path: passed through so the caller surfaces the error.
|
|
11
|
+
*
|
|
12
|
+
* `detectSceneProject(dir)` answers "is this a scene project directory?"
|
|
13
|
+
* (i.e. has `vibe.config.json` or legacy `vibe.project.yaml`). Used to give a useful error when the
|
|
14
|
+
* user runs `vibe timeline info` on a scene directory.
|
|
15
|
+
*/
|
|
16
|
+
export declare const TIMELINE_FILENAME = "timeline.json";
|
|
17
|
+
export declare const LEGACY_TIMELINE_FILENAME = "project.vibe.json";
|
|
18
|
+
export declare const SCENE_CONFIG_FILENAME = "vibe.config.json";
|
|
19
|
+
export declare const LEGACY_SCENE_CONFIG_FILENAME = "vibe.project.yaml";
|
|
20
|
+
/**
|
|
21
|
+
* Resolve `inputPath` to a concrete timeline file path.
|
|
22
|
+
*
|
|
23
|
+
* Directory inputs prefer `timeline.json`; if absent, fall back to an existing
|
|
24
|
+
* legacy `project.vibe.json`. Empty directories resolve to `timeline.json` so
|
|
25
|
+
* the caller surfaces a canonical missing-file error. File inputs and unknown
|
|
26
|
+
* paths pass through unchanged.
|
|
27
|
+
*/
|
|
28
|
+
export declare function resolveTimelineFile(inputPath: string, cwd?: string): Promise<string>;
|
|
29
|
+
/** True when the directory contains `vibe.config.json` or legacy `vibe.project.yaml`. */
|
|
30
|
+
export declare function detectSceneProject(dir: string): Promise<boolean>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file project-resolver.test.ts
|
|
3
|
+
*
|
|
4
|
+
* Coverage for the timeline file resolver. The CLI accepts file paths,
|
|
5
|
+
* directory paths, and unknown paths; the resolver normalizes all three
|
|
6
|
+
* to a concrete file path that the caller can `readFile()`.
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Smart provider auto-resolution
|
|
3
|
+
* 1. Check user/project config.yaml defaults (if set)
|
|
4
|
+
* 2. Fall back to first provider with a configured API key
|
|
5
|
+
*
|
|
6
|
+
* Provider candidate lists (image / video / speech) are derived from the
|
|
7
|
+
* `defineProvider` registry in `@vibeframe/ai-providers/api-keys.ts` +
|
|
8
|
+
* each provider's `index.ts`. Priority order, label, and envvar mapping
|
|
9
|
+
* all live there now — adding a new provider is a single declaration.
|
|
10
|
+
*
|
|
11
|
+
* Pre-v0.68 the IMAGE_PROVIDERS / VIDEO_PROVIDERS / SPEECH_PROVIDERS
|
|
12
|
+
* arrays were hardcoded here and cross-validated against four other
|
|
13
|
+
* files via `scripts/sync-counts.sh` category B. v0.68 collapsed all
|
|
14
|
+
* five into a single registry; the cross-validation became structural.
|
|
15
|
+
*/
|
|
16
|
+
import { type ProviderCandidate } from "@vibeframe/ai-providers";
|
|
17
|
+
import type { VibeConfig } from "../config/schema.js";
|
|
18
|
+
export type { ProviderCandidate };
|
|
19
|
+
export declare function loadProviderDefaultsFromConfig(config: VibeConfig | null | undefined): void;
|
|
20
|
+
/**
|
|
21
|
+
* Load provider defaults from config (async, cached).
|
|
22
|
+
* Call once at startup if you want config-aware resolution.
|
|
23
|
+
*/
|
|
24
|
+
export declare function loadProviderDefaults(): Promise<void>;
|
|
25
|
+
/**
|
|
26
|
+
* Resolve the best available provider for a given category.
|
|
27
|
+
* Priority: 1) config defaults 2) first provider with API key
|
|
28
|
+
*/
|
|
29
|
+
export declare function resolveProvider(category: "image" | "video" | "speech"): {
|
|
30
|
+
name: string;
|
|
31
|
+
label: string;
|
|
32
|
+
} | null;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Snapshot tests pinning the derived provider arrays + commandsKeyMap to
|
|
3
|
+
* the values that the previously-hardcoded source files expressed.
|
|
4
|
+
*
|
|
5
|
+
* These tests exist to catch silent regressions when `defineProvider` /
|
|
6
|
+
* `defineApiKey` declarations drift away from CLI surface expectations.
|
|
7
|
+
*
|
|
8
|
+
* If a test here fails after a deliberate change, update the snapshot in
|
|
9
|
+
* lockstep — but read the diff carefully: the resolver / doctor / setup
|
|
10
|
+
* outputs are user-facing and changing their order or names is a UX
|
|
11
|
+
* change, not just a refactor.
|
|
12
|
+
*/
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Remotion rendering and compositing utilities.
|
|
3
|
+
*
|
|
4
|
+
* Uses `npx remotion` on-demand — Remotion is NOT a package dependency.
|
|
5
|
+
* Scaffolds a temporary project, renders H264 MP4, and muxes audio separately.
|
|
6
|
+
*
|
|
7
|
+
* Strategy:
|
|
8
|
+
* - Images/Videos are embedded NATIVELY inside the Remotion component using
|
|
9
|
+
* <Img> / <Video> from Remotion (copied to public/).
|
|
10
|
+
* - No transparent WebM rendering. No FFmpeg overlay compositing.
|
|
11
|
+
* - Final output is always a standard H264 MP4.
|
|
12
|
+
*/
|
|
13
|
+
export interface RenderMotionOptions {
|
|
14
|
+
/** Generated TSX component code */
|
|
15
|
+
componentCode: string;
|
|
16
|
+
/** Export name of the component */
|
|
17
|
+
componentName: string;
|
|
18
|
+
width: number;
|
|
19
|
+
height: number;
|
|
20
|
+
fps: number;
|
|
21
|
+
durationInFrames: number;
|
|
22
|
+
/** Output path for rendered video (.webm or .mp4) */
|
|
23
|
+
outputPath: string;
|
|
24
|
+
/** Render with transparent background (default: true) */
|
|
25
|
+
transparent?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface RenderResult {
|
|
28
|
+
success: boolean;
|
|
29
|
+
outputPath?: string;
|
|
30
|
+
error?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Check that `npx remotion` is available. Returns an error message if not.
|
|
34
|
+
*/
|
|
35
|
+
export declare function ensureRemotionInstalled(): Promise<string | null>;
|
|
36
|
+
/**
|
|
37
|
+
* Create a minimal Remotion project in a temp directory.
|
|
38
|
+
* Returns the directory path.
|
|
39
|
+
*
|
|
40
|
+
* @param useMediaPackage - Include @remotion/media for <Video> support (default: false)
|
|
41
|
+
*/
|
|
42
|
+
export declare function scaffoldRemotionProject(componentCode: string, componentName: string, opts: {
|
|
43
|
+
width: number;
|
|
44
|
+
height: number;
|
|
45
|
+
fps: number;
|
|
46
|
+
durationInFrames: number;
|
|
47
|
+
useMediaPackage?: boolean;
|
|
48
|
+
}): Promise<string>;
|
|
49
|
+
/**
|
|
50
|
+
* Render a standalone Remotion composition to video (no base media).
|
|
51
|
+
* When transparent: tries VP8 then VP9.
|
|
52
|
+
* When opaque: renders H264 MP4.
|
|
53
|
+
*/
|
|
54
|
+
export declare function renderMotion(options: RenderMotionOptions): Promise<RenderResult>;
|
|
55
|
+
/**
|
|
56
|
+
* Validates and auto-fixes common LLM-generated Remotion code bugs before
|
|
57
|
+
* attempting to render. Returns fixed code and a list of applied fixes.
|
|
58
|
+
*
|
|
59
|
+
* Known patterns fixed:
|
|
60
|
+
* 1. interpolate(x, [a,b], scalar, num) → interpolate(x, [a,b], [scalar, num])
|
|
61
|
+
* Cause: outputRange must be an array, not a bare scalar.
|
|
62
|
+
* 2. interpolate(x, [a,b], scalar) where scalar is a variable name
|
|
63
|
+
* Cause: same — LLM passes a single number variable instead of [from, to].
|
|
64
|
+
*/
|
|
65
|
+
export declare function validateAndFixMotionCode(code: string): {
|
|
66
|
+
code: string;
|
|
67
|
+
fixes: string[];
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Wrap an overlay component to embed a static image as background.
|
|
71
|
+
* Uses Remotion's <Img> component (required per Remotion docs — ensures
|
|
72
|
+
* image is fully loaded before each frame renders).
|
|
73
|
+
*
|
|
74
|
+
* Injects Img and staticFile into the component's existing remotion import
|
|
75
|
+
* to avoid duplicate identifier errors.
|
|
76
|
+
*/
|
|
77
|
+
export declare function wrapComponentWithImage(componentCode: string, componentName: string, imageFileName: string): {
|
|
78
|
+
code: string;
|
|
79
|
+
name: string;
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* Render a Remotion component that embeds a static image as background.
|
|
83
|
+
* Copies image to public/, renders H264 MP4 directly — no transparency needed.
|
|
84
|
+
*/
|
|
85
|
+
export declare function renderWithEmbeddedImage(options: {
|
|
86
|
+
componentCode: string;
|
|
87
|
+
componentName: string;
|
|
88
|
+
width: number;
|
|
89
|
+
height: number;
|
|
90
|
+
fps: number;
|
|
91
|
+
durationInFrames: number;
|
|
92
|
+
imagePath: string;
|
|
93
|
+
imageFileName: string;
|
|
94
|
+
outputPath: string;
|
|
95
|
+
}): Promise<RenderResult>;
|
|
96
|
+
/**
|
|
97
|
+
* Wrap an overlay component to embed a video as background.
|
|
98
|
+
* Uses <Video> from @remotion/media (required per Remotion docs).
|
|
99
|
+
* Video is muted — audio is muxed back via FFmpeg after rendering.
|
|
100
|
+
*
|
|
101
|
+
* Injects staticFile into the component's existing remotion import to avoid
|
|
102
|
+
* duplicate identifier errors. Video is imported from @remotion/media
|
|
103
|
+
* (different module — no conflict).
|
|
104
|
+
*/
|
|
105
|
+
export declare function wrapComponentWithVideo(componentCode: string, componentName: string, videoFileName: string): {
|
|
106
|
+
code: string;
|
|
107
|
+
name: string;
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* Render a Remotion component that embeds the video directly.
|
|
111
|
+
* Uses @remotion/media's <Video> component (official Remotion approach).
|
|
112
|
+
* After rendering, muxes audio from the original video back into the output.
|
|
113
|
+
*/
|
|
114
|
+
export declare function renderWithEmbeddedVideo(options: {
|
|
115
|
+
componentCode: string;
|
|
116
|
+
componentName: string;
|
|
117
|
+
width: number;
|
|
118
|
+
height: number;
|
|
119
|
+
fps: number;
|
|
120
|
+
durationInFrames: number;
|
|
121
|
+
videoPath: string;
|
|
122
|
+
videoFileName: string;
|
|
123
|
+
outputPath: string;
|
|
124
|
+
}): Promise<RenderResult>;
|
|
125
|
+
export interface CaptionSegment {
|
|
126
|
+
start: number;
|
|
127
|
+
end: number;
|
|
128
|
+
text: string;
|
|
129
|
+
}
|
|
130
|
+
export type CaptionStylePreset = "bold" | "minimal" | "outline" | "karaoke";
|
|
131
|
+
export interface GenerateCaptionComponentOptions {
|
|
132
|
+
segments: CaptionSegment[];
|
|
133
|
+
style: CaptionStylePreset;
|
|
134
|
+
fontSize: number;
|
|
135
|
+
fontColor: string;
|
|
136
|
+
position: "top" | "center" | "bottom";
|
|
137
|
+
width: number;
|
|
138
|
+
height: number;
|
|
139
|
+
/** When set, embed the video inside the component (no transparency needed) */
|
|
140
|
+
videoFileName?: string;
|
|
141
|
+
}
|
|
142
|
+
export type TextOverlayStyle = "lower-third" | "center-bold" | "subtitle" | "minimal";
|
|
143
|
+
export interface GenerateTextOverlayComponentOptions {
|
|
144
|
+
texts: string[];
|
|
145
|
+
style: TextOverlayStyle;
|
|
146
|
+
fontSize: number;
|
|
147
|
+
fontColor: string;
|
|
148
|
+
startTime: number;
|
|
149
|
+
endTime: number;
|
|
150
|
+
fadeDuration: number;
|
|
151
|
+
width: number;
|
|
152
|
+
height: number;
|
|
153
|
+
videoFileName: string;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Generate a Remotion TSX component for text overlays.
|
|
157
|
+
* Fallback for when FFmpeg drawtext filter (libfreetype) is unavailable.
|
|
158
|
+
*/
|
|
159
|
+
export declare function generateTextOverlayComponent(options: GenerateTextOverlayComponentOptions): {
|
|
160
|
+
code: string;
|
|
161
|
+
name: string;
|
|
162
|
+
};
|
|
163
|
+
/**
|
|
164
|
+
* Generate a Remotion TSX component that renders styled captions.
|
|
165
|
+
* No LLM call — purely programmatic from SRT segments + style config.
|
|
166
|
+
*/
|
|
167
|
+
export declare function generateCaptionComponent(options: GenerateCaptionComponentOptions): {
|
|
168
|
+
code: string;
|
|
169
|
+
name: string;
|
|
170
|
+
};
|
|
171
|
+
export interface AnimatedCaptionWord {
|
|
172
|
+
word: string;
|
|
173
|
+
start: number;
|
|
174
|
+
end: number;
|
|
175
|
+
}
|
|
176
|
+
export interface AnimatedCaptionGroup {
|
|
177
|
+
words: AnimatedCaptionWord[];
|
|
178
|
+
startTime: number;
|
|
179
|
+
endTime: number;
|
|
180
|
+
text: string;
|
|
181
|
+
}
|
|
182
|
+
export type AnimatedCaptionStylePreset = "highlight" | "bounce" | "pop-in" | "neon";
|
|
183
|
+
export interface GenerateAnimatedCaptionComponentOptions {
|
|
184
|
+
groups: AnimatedCaptionGroup[];
|
|
185
|
+
style: AnimatedCaptionStylePreset;
|
|
186
|
+
highlightColor: string;
|
|
187
|
+
fontSize: number;
|
|
188
|
+
position: "top" | "center" | "bottom";
|
|
189
|
+
width: number;
|
|
190
|
+
height: number;
|
|
191
|
+
fps: number;
|
|
192
|
+
videoFileName?: string;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Generate a Remotion TSX component for word-level animated captions.
|
|
196
|
+
* Each style creates different visual effects per word.
|
|
197
|
+
*/
|
|
198
|
+
export declare function generateAnimatedCaptionComponent(options: GenerateAnimatedCaptionComponentOptions): {
|
|
199
|
+
code: string;
|
|
200
|
+
name: string;
|
|
201
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Subtitle format utilities for SRT/VTT generation
|
|
3
|
+
*/
|
|
4
|
+
export type SubtitleFormat = "json" | "srt" | "vtt";
|
|
5
|
+
export interface SubtitleSegment {
|
|
6
|
+
startTime: number;
|
|
7
|
+
endTime: number;
|
|
8
|
+
text: string;
|
|
9
|
+
}
|
|
10
|
+
export interface TranscriptResult {
|
|
11
|
+
id: string;
|
|
12
|
+
status: string;
|
|
13
|
+
fullText?: string;
|
|
14
|
+
segments?: SubtitleSegment[];
|
|
15
|
+
detectedLanguage?: string;
|
|
16
|
+
error?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Detect subtitle format from file extension or explicit format option
|
|
20
|
+
*/
|
|
21
|
+
export declare function detectFormat(outputPath: string, explicitFormat?: string): SubtitleFormat;
|
|
22
|
+
/**
|
|
23
|
+
* Format transcript result to the specified format
|
|
24
|
+
*/
|
|
25
|
+
export declare function formatTranscript(result: TranscriptResult, format: SubtitleFormat): string;
|
|
26
|
+
/**
|
|
27
|
+
* Format segments as SRT (SubRip Subtitle)
|
|
28
|
+
*
|
|
29
|
+
* SRT Format:
|
|
30
|
+
* 1
|
|
31
|
+
* 00:00:00,000 --> 00:00:02,500
|
|
32
|
+
* Hello world
|
|
33
|
+
*/
|
|
34
|
+
export declare function formatSRT(segments: SubtitleSegment[]): string;
|
|
35
|
+
/**
|
|
36
|
+
* Format segments as WebVTT (Web Video Text Tracks)
|
|
37
|
+
*
|
|
38
|
+
* VTT Format:
|
|
39
|
+
* WEBVTT
|
|
40
|
+
*
|
|
41
|
+
* 1
|
|
42
|
+
* 00:00:00.000 --> 00:00:02.500
|
|
43
|
+
* Hello world
|
|
44
|
+
*/
|
|
45
|
+
export declare function formatVTT(segments: SubtitleSegment[]): string;
|
|
46
|
+
/**
|
|
47
|
+
* Format time for SRT (uses comma for milliseconds)
|
|
48
|
+
* Format: HH:MM:SS,mmm
|
|
49
|
+
*/
|
|
50
|
+
export declare function formatSRTTime(seconds: number): string;
|
|
51
|
+
/**
|
|
52
|
+
* Format time for VTT (uses period for milliseconds)
|
|
53
|
+
* Format: HH:MM:SS.mmm
|
|
54
|
+
*/
|
|
55
|
+
export declare function formatVTTTime(seconds: number): string;
|
|
56
|
+
/**
|
|
57
|
+
* Parse SRT content into SubtitleSegment array
|
|
58
|
+
*
|
|
59
|
+
* Handles standard SRT format:
|
|
60
|
+
* 1
|
|
61
|
+
* 00:00:00,000 --> 00:00:02,500
|
|
62
|
+
* Hello world
|
|
63
|
+
*/
|
|
64
|
+
export declare function parseSRT(content: string): SubtitleSegment[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TTY Input Utilities
|
|
3
|
+
* Handles stdin fallback to /dev/tty for piped environments
|
|
4
|
+
*/
|
|
5
|
+
import { Interface } from "node:readline";
|
|
6
|
+
import { ReadStream } from "node:tty";
|
|
7
|
+
export declare function fitOptionToLine(value: string, prefixColumns: number): string;
|
|
8
|
+
/**
|
|
9
|
+
* Get a TTY-capable input stream
|
|
10
|
+
* Falls back to /dev/tty when stdin is piped (e.g., from curl)
|
|
11
|
+
*/
|
|
12
|
+
export declare function getTTYInputStream(): typeof process.stdin | ReadStream;
|
|
13
|
+
/**
|
|
14
|
+
* Check if we have TTY input available
|
|
15
|
+
*/
|
|
16
|
+
export declare function hasTTY(): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Close the TTY stream if we opened one
|
|
19
|
+
*/
|
|
20
|
+
export declare function closeTTYStream(): void;
|
|
21
|
+
/**
|
|
22
|
+
* Create a readline interface with TTY support
|
|
23
|
+
*/
|
|
24
|
+
export declare function createTTYInterface(options?: {
|
|
25
|
+
prompt?: string;
|
|
26
|
+
historySize?: number;
|
|
27
|
+
}): Interface;
|
|
28
|
+
/**
|
|
29
|
+
* Prompt for input (single line)
|
|
30
|
+
* Throws in non-TTY environments to prevent hanging.
|
|
31
|
+
*/
|
|
32
|
+
export declare function prompt(question: string): Promise<string>;
|
|
33
|
+
/**
|
|
34
|
+
* Prompt for hidden input (password/API key).
|
|
35
|
+
* Characters are not echoed to the terminal.
|
|
36
|
+
*
|
|
37
|
+
* `opts.openHotkeyUrl`: when set, the user can press lowercase `o` as the
|
|
38
|
+
* very first key (no input typed yet) to launch the URL in their default
|
|
39
|
+
* browser. Subsequent keys behave normally. Safe for our setup wizard
|
|
40
|
+
* because every registered API-key prefix (`sk-`, `AIza`, `xai-`, `key_`,
|
|
41
|
+
* `r8_`, `sk_`, etc.) starts with something other than `o`. Pressing `o`
|
|
42
|
+
* after typing any character is treated as part of the value, not a hotkey.
|
|
43
|
+
*/
|
|
44
|
+
export interface PromptHiddenOptions {
|
|
45
|
+
/** URL to launch in the default browser when the user presses `o` first. */
|
|
46
|
+
openHotkeyUrl?: string;
|
|
47
|
+
}
|
|
48
|
+
export declare function promptHidden(question: string, opts?: PromptHiddenOptions): Promise<string>;
|
|
49
|
+
/**
|
|
50
|
+
* Prompt for selection from a list (1-based index)
|
|
51
|
+
*/
|
|
52
|
+
export declare function promptSelect(_question: string, options: string[], defaultIndex?: number, opts?: {
|
|
53
|
+
backIndex?: number;
|
|
54
|
+
}): Promise<number>;
|
|
55
|
+
/**
|
|
56
|
+
* Prompt for yes/no confirmation.
|
|
57
|
+
*
|
|
58
|
+
* Renders an arrow-key Yes/No selector when a TTY is available (matching the
|
|
59
|
+
* paradigm of `promptSelect` / `promptMultiSelect`), falling back to the
|
|
60
|
+
* legacy `(Y/n)` text prompt for piped/CI input so scripts continue to work
|
|
61
|
+
* unchanged.
|
|
62
|
+
*/
|
|
63
|
+
export declare function promptConfirm(question: string, defaultYes?: boolean): Promise<boolean>;
|
|
64
|
+
/**
|
|
65
|
+
* Prompt for multi-select (checkbox) from a list.
|
|
66
|
+
*
|
|
67
|
+
* Returns the indexes selected (sorted ascending). ↑↓ navigates, space toggles,
|
|
68
|
+
* enter confirms. `pickFocusedOnEnter` (formerly `enterSelectsFocusedWhenEmpty`)
|
|
69
|
+
* makes Enter behave like a single-choice select **as long as the user has
|
|
70
|
+
* not pressed space yet** — once any explicit toggle happens, Enter confirms
|
|
71
|
+
* the current selection as-is. This lets a pre-checked default be overridden
|
|
72
|
+
* by a single arrow + Enter while still allowing additive multi-pick via
|
|
73
|
+
* space + Enter.
|
|
74
|
+
* `preserveDefaultSelectionOnEnter` changes the no-toggle Enter shortcut from
|
|
75
|
+
* replace to add when there are already checked rows. This is useful for setup
|
|
76
|
+
* screens where previously configured choices should remain visible and sticky.
|
|
77
|
+
* In non-TTY environments accepts comma-separated 1-based indices, the literal
|
|
78
|
+
* "all", or empty/"none" for no selection.
|
|
79
|
+
*/
|
|
80
|
+
export declare function promptMultiSelect(_question: string, options: string[], defaultSelected?: boolean[], opts?: {
|
|
81
|
+
pickFocusedOnEnter?: boolean;
|
|
82
|
+
preserveDefaultSelectionOnEnter?: boolean;
|
|
83
|
+
backIndex?: number;
|
|
84
|
+
/** @deprecated Use pickFocusedOnEnter — same flag, broader semantics. */
|
|
85
|
+
enterSelectsFocusedWhenEmpty?: boolean;
|
|
86
|
+
}): Promise<number[]>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type UploadHostProvider = "imgbb" | "s3";
|
|
2
|
+
export interface UploadImageOptions {
|
|
3
|
+
filename?: string;
|
|
4
|
+
mimeType?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface UploadImageResult {
|
|
7
|
+
url: string;
|
|
8
|
+
provider: UploadHostProvider;
|
|
9
|
+
expiresAt?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface UploadHost {
|
|
12
|
+
provider: UploadHostProvider;
|
|
13
|
+
uploadImage(imageBuffer: Buffer, opts?: UploadImageOptions): Promise<UploadImageResult>;
|
|
14
|
+
}
|
|
15
|
+
export declare function resolveUploadHost(): Promise<UploadHost>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|