@vibeframe/cli 0.104.3 → 0.105.2
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 +139 -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 +92 -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 +483 -291
- 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 +307 -0
- package/dist/tools/manifest/index.d.ts +22 -0
- package/dist/tools/manifest/index.js +60628 -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
package/dist/index.js
CHANGED
|
@@ -7789,6 +7789,35 @@ var init_gemini_storyboard = __esm({
|
|
|
7789
7789
|
}
|
|
7790
7790
|
});
|
|
7791
7791
|
|
|
7792
|
+
// ../ai-providers/dist/shared/http.js
|
|
7793
|
+
async function fetchJson(label, url, init) {
|
|
7794
|
+
const response = await fetch(url, init);
|
|
7795
|
+
if (!response.ok) {
|
|
7796
|
+
throw new ProviderHttpError(label, response.status, await response.text());
|
|
7797
|
+
}
|
|
7798
|
+
return await response.json();
|
|
7799
|
+
}
|
|
7800
|
+
function errorMessage(error) {
|
|
7801
|
+
return error instanceof Error ? error.message : "Unknown error";
|
|
7802
|
+
}
|
|
7803
|
+
function sleep(ms) {
|
|
7804
|
+
return new Promise((resolve81) => setTimeout(resolve81, ms));
|
|
7805
|
+
}
|
|
7806
|
+
var ProviderHttpError;
|
|
7807
|
+
var init_http = __esm({
|
|
7808
|
+
"../ai-providers/dist/shared/http.js"() {
|
|
7809
|
+
"use strict";
|
|
7810
|
+
ProviderHttpError = class extends Error {
|
|
7811
|
+
constructor(label, status, body) {
|
|
7812
|
+
super(`${label} (${status}): ${body}`);
|
|
7813
|
+
this.name = "ProviderHttpError";
|
|
7814
|
+
this.status = status;
|
|
7815
|
+
this.body = body;
|
|
7816
|
+
}
|
|
7817
|
+
};
|
|
7818
|
+
}
|
|
7819
|
+
});
|
|
7820
|
+
|
|
7792
7821
|
// ../ai-providers/dist/gemini/GeminiProvider.js
|
|
7793
7822
|
var MODEL_MAP, GeminiProvider, geminiProvider;
|
|
7794
7823
|
var init_GeminiProvider = __esm({
|
|
@@ -7796,6 +7825,7 @@ var init_GeminiProvider = __esm({
|
|
|
7796
7825
|
"use strict";
|
|
7797
7826
|
init_gemini_motion();
|
|
7798
7827
|
init_gemini_storyboard();
|
|
7828
|
+
init_http();
|
|
7799
7829
|
MODEL_MAP = {
|
|
7800
7830
|
"flash": "gemini-2.5-flash-image",
|
|
7801
7831
|
"3.1-flash": "gemini-3.1-flash-image-preview",
|
|
@@ -7890,7 +7920,7 @@ var init_GeminiProvider = __esm({
|
|
|
7890
7920
|
instances: [instance],
|
|
7891
7921
|
parameters
|
|
7892
7922
|
};
|
|
7893
|
-
const
|
|
7923
|
+
const data = await fetchJson("Veo API error", `${this.baseUrl}/models/${model}:predictLongRunning`, {
|
|
7894
7924
|
method: "POST",
|
|
7895
7925
|
headers: {
|
|
7896
7926
|
"Content-Type": "application/json",
|
|
@@ -7898,15 +7928,6 @@ var init_GeminiProvider = __esm({
|
|
|
7898
7928
|
},
|
|
7899
7929
|
body: JSON.stringify(requestBody)
|
|
7900
7930
|
});
|
|
7901
|
-
if (!response.ok) {
|
|
7902
|
-
const errorText = await response.text();
|
|
7903
|
-
return {
|
|
7904
|
-
id: "",
|
|
7905
|
-
status: "failed",
|
|
7906
|
-
error: `Veo API error (${response.status}): ${errorText}`
|
|
7907
|
-
};
|
|
7908
|
-
}
|
|
7909
|
-
const data = await response.json();
|
|
7910
7931
|
if (data.name) {
|
|
7911
7932
|
return {
|
|
7912
7933
|
id: data.name,
|
|
@@ -7931,7 +7952,7 @@ var init_GeminiProvider = __esm({
|
|
|
7931
7952
|
return {
|
|
7932
7953
|
id: "",
|
|
7933
7954
|
status: "failed",
|
|
7934
|
-
error: error
|
|
7955
|
+
error: errorMessage(error)
|
|
7935
7956
|
};
|
|
7936
7957
|
}
|
|
7937
7958
|
}
|
|
@@ -7947,21 +7968,12 @@ var init_GeminiProvider = __esm({
|
|
|
7947
7968
|
};
|
|
7948
7969
|
}
|
|
7949
7970
|
try {
|
|
7950
|
-
const
|
|
7971
|
+
const data = await fetchJson("Status check failed", `https://generativelanguage.googleapis.com/v1beta/${operationName}?key=${this.apiKey}`, {
|
|
7951
7972
|
method: "GET",
|
|
7952
7973
|
headers: {
|
|
7953
7974
|
"Content-Type": "application/json"
|
|
7954
7975
|
}
|
|
7955
7976
|
});
|
|
7956
|
-
if (!response.ok) {
|
|
7957
|
-
const errorText = await response.text();
|
|
7958
|
-
return {
|
|
7959
|
-
id: operationName,
|
|
7960
|
-
status: "failed",
|
|
7961
|
-
error: `Status check failed (${response.status}): ${errorText}`
|
|
7962
|
-
};
|
|
7963
|
-
}
|
|
7964
|
-
const data = await response.json();
|
|
7965
7977
|
if (data.error) {
|
|
7966
7978
|
return {
|
|
7967
7979
|
id: operationName,
|
|
@@ -7994,7 +8006,7 @@ var init_GeminiProvider = __esm({
|
|
|
7994
8006
|
return {
|
|
7995
8007
|
id: operationName,
|
|
7996
8008
|
status: "failed",
|
|
7997
|
-
error: error
|
|
8009
|
+
error: errorMessage(error)
|
|
7998
8010
|
};
|
|
7999
8011
|
}
|
|
8000
8012
|
}
|
|
@@ -8012,7 +8024,7 @@ var init_GeminiProvider = __esm({
|
|
|
8012
8024
|
if (result.status === "completed" || result.status === "failed" || result.status === "cancelled") {
|
|
8013
8025
|
return result;
|
|
8014
8026
|
}
|
|
8015
|
-
await
|
|
8027
|
+
await sleep(pollingInterval);
|
|
8016
8028
|
}
|
|
8017
8029
|
return {
|
|
8018
8030
|
id: operationName,
|
|
@@ -8020,12 +8032,6 @@ var init_GeminiProvider = __esm({
|
|
|
8020
8032
|
error: "Generation timed out"
|
|
8021
8033
|
};
|
|
8022
8034
|
}
|
|
8023
|
-
/**
|
|
8024
|
-
* Sleep helper
|
|
8025
|
-
*/
|
|
8026
|
-
sleep(ms) {
|
|
8027
|
-
return new Promise((resolve81) => setTimeout(resolve81, ms));
|
|
8028
|
-
}
|
|
8029
8035
|
/**
|
|
8030
8036
|
* Extend a previously generated Veo video
|
|
8031
8037
|
* Uses the operation name from a completed generation to create a continuation
|
|
@@ -8052,7 +8058,7 @@ var init_GeminiProvider = __esm({
|
|
|
8052
8058
|
durationSeconds: Math.max(4, Math.min(8, options?.duration || 6))
|
|
8053
8059
|
}
|
|
8054
8060
|
};
|
|
8055
|
-
const
|
|
8061
|
+
const data = await fetchJson("Veo extend API error", `${this.baseUrl}/models/${model}:predictLongRunning`, {
|
|
8056
8062
|
method: "POST",
|
|
8057
8063
|
headers: {
|
|
8058
8064
|
"Content-Type": "application/json",
|
|
@@ -8060,15 +8066,6 @@ var init_GeminiProvider = __esm({
|
|
|
8060
8066
|
},
|
|
8061
8067
|
body: JSON.stringify(requestBody)
|
|
8062
8068
|
});
|
|
8063
|
-
if (!response.ok) {
|
|
8064
|
-
const errorText = await response.text();
|
|
8065
|
-
return {
|
|
8066
|
-
id: "",
|
|
8067
|
-
status: "failed",
|
|
8068
|
-
error: `Veo extend API error (${response.status}): ${errorText}`
|
|
8069
|
-
};
|
|
8070
|
-
}
|
|
8071
|
-
const data = await response.json();
|
|
8072
8069
|
if (data.name) {
|
|
8073
8070
|
return {
|
|
8074
8071
|
id: data.name,
|
|
@@ -8085,7 +8082,7 @@ var init_GeminiProvider = __esm({
|
|
|
8085
8082
|
return {
|
|
8086
8083
|
id: "",
|
|
8087
8084
|
status: "failed",
|
|
8088
|
-
error: error
|
|
8085
|
+
error: errorMessage(error)
|
|
8089
8086
|
};
|
|
8090
8087
|
}
|
|
8091
8088
|
}
|
|
@@ -8157,16 +8154,16 @@ var init_GeminiProvider = __esm({
|
|
|
8157
8154
|
});
|
|
8158
8155
|
if (!response.ok) {
|
|
8159
8156
|
const errorText = await response.text();
|
|
8160
|
-
let
|
|
8157
|
+
let errorMessage2;
|
|
8161
8158
|
try {
|
|
8162
8159
|
const errorData = JSON.parse(errorText);
|
|
8163
|
-
|
|
8160
|
+
errorMessage2 = errorData.error?.message || errorText;
|
|
8164
8161
|
} catch {
|
|
8165
|
-
|
|
8162
|
+
errorMessage2 = errorText;
|
|
8166
8163
|
}
|
|
8167
8164
|
return {
|
|
8168
8165
|
success: false,
|
|
8169
|
-
error: `API error (${response.status}): ${
|
|
8166
|
+
error: `API error (${response.status}): ${errorMessage2}`
|
|
8170
8167
|
};
|
|
8171
8168
|
}
|
|
8172
8169
|
const data = await response.json();
|
|
@@ -8269,16 +8266,16 @@ var init_GeminiProvider = __esm({
|
|
|
8269
8266
|
});
|
|
8270
8267
|
if (!response.ok) {
|
|
8271
8268
|
const errorText = await response.text();
|
|
8272
|
-
let
|
|
8269
|
+
let errorMessage2;
|
|
8273
8270
|
try {
|
|
8274
8271
|
const errorData = JSON.parse(errorText);
|
|
8275
|
-
|
|
8272
|
+
errorMessage2 = errorData.error?.message || errorText;
|
|
8276
8273
|
} catch {
|
|
8277
|
-
|
|
8274
|
+
errorMessage2 = errorText;
|
|
8278
8275
|
}
|
|
8279
8276
|
return {
|
|
8280
8277
|
success: false,
|
|
8281
|
-
error: `API error (${response.status}): ${
|
|
8278
|
+
error: `API error (${response.status}): ${errorMessage2}`
|
|
8282
8279
|
};
|
|
8283
8280
|
}
|
|
8284
8281
|
const data = await response.json();
|
|
@@ -8394,16 +8391,16 @@ var init_GeminiProvider = __esm({
|
|
|
8394
8391
|
});
|
|
8395
8392
|
if (!response.ok) {
|
|
8396
8393
|
const errorText = await response.text();
|
|
8397
|
-
let
|
|
8394
|
+
let errorMessage2;
|
|
8398
8395
|
try {
|
|
8399
8396
|
const errorData = JSON.parse(errorText);
|
|
8400
|
-
|
|
8397
|
+
errorMessage2 = errorData.error?.message || errorText;
|
|
8401
8398
|
} catch {
|
|
8402
|
-
|
|
8399
|
+
errorMessage2 = errorText;
|
|
8403
8400
|
}
|
|
8404
8401
|
return {
|
|
8405
8402
|
success: false,
|
|
8406
|
-
error: `API error (${response.status}): ${
|
|
8403
|
+
error: `API error (${response.status}): ${errorMessage2}`
|
|
8407
8404
|
};
|
|
8408
8405
|
}
|
|
8409
8406
|
const data = await response.json();
|
|
@@ -8476,16 +8473,16 @@ var init_GeminiProvider = __esm({
|
|
|
8476
8473
|
});
|
|
8477
8474
|
if (!response.ok) {
|
|
8478
8475
|
const errorText = await response.text();
|
|
8479
|
-
let
|
|
8476
|
+
let errorMessage2;
|
|
8480
8477
|
try {
|
|
8481
8478
|
const errorData = JSON.parse(errorText);
|
|
8482
|
-
|
|
8479
|
+
errorMessage2 = errorData.error?.message || errorText;
|
|
8483
8480
|
} catch {
|
|
8484
|
-
|
|
8481
|
+
errorMessage2 = errorText;
|
|
8485
8482
|
}
|
|
8486
8483
|
return {
|
|
8487
8484
|
success: false,
|
|
8488
|
-
error: `API error (${response.status}): ${
|
|
8485
|
+
error: `API error (${response.status}): ${errorMessage2}`
|
|
8489
8486
|
};
|
|
8490
8487
|
}
|
|
8491
8488
|
const data = await response.json();
|
|
@@ -11718,20 +11715,20 @@ var init_OpenAIImageProvider = __esm({
|
|
|
11718
11715
|
if (!response.ok) {
|
|
11719
11716
|
const errorText = await response.text();
|
|
11720
11717
|
console.error("OpenAI Image API error:", errorText);
|
|
11721
|
-
let
|
|
11718
|
+
let errorMessage2 = `API error: ${response.status}`;
|
|
11722
11719
|
try {
|
|
11723
11720
|
const errorJson = JSON.parse(errorText);
|
|
11724
11721
|
if (errorJson.error?.message) {
|
|
11725
|
-
|
|
11722
|
+
errorMessage2 = errorJson.error.message;
|
|
11726
11723
|
}
|
|
11727
11724
|
} catch {
|
|
11728
11725
|
if (errorText) {
|
|
11729
|
-
|
|
11726
|
+
errorMessage2 = errorText.substring(0, 200);
|
|
11730
11727
|
}
|
|
11731
11728
|
}
|
|
11732
11729
|
return {
|
|
11733
11730
|
success: false,
|
|
11734
|
-
error:
|
|
11731
|
+
error: errorMessage2
|
|
11735
11732
|
};
|
|
11736
11733
|
}
|
|
11737
11734
|
const data = await response.json();
|
|
@@ -11826,20 +11823,20 @@ var init_OpenAIImageProvider = __esm({
|
|
|
11826
11823
|
});
|
|
11827
11824
|
if (!response.ok) {
|
|
11828
11825
|
const errorText = await response.text();
|
|
11829
|
-
let
|
|
11826
|
+
let errorMessage2 = `API error: ${response.status}`;
|
|
11830
11827
|
try {
|
|
11831
11828
|
const errorJson = JSON.parse(errorText);
|
|
11832
11829
|
if (errorJson.error?.message) {
|
|
11833
|
-
|
|
11830
|
+
errorMessage2 = errorJson.error.message;
|
|
11834
11831
|
}
|
|
11835
11832
|
} catch {
|
|
11836
11833
|
if (errorText) {
|
|
11837
|
-
|
|
11834
|
+
errorMessage2 = errorText.substring(0, 200);
|
|
11838
11835
|
}
|
|
11839
11836
|
}
|
|
11840
11837
|
return {
|
|
11841
11838
|
success: false,
|
|
11842
|
-
error:
|
|
11839
|
+
error: errorMessage2
|
|
11843
11840
|
};
|
|
11844
11841
|
}
|
|
11845
11842
|
const data = await response.json();
|
|
@@ -11996,12 +11993,12 @@ var init_RunwayProvider = __esm({
|
|
|
11996
11993
|
});
|
|
11997
11994
|
if (!response.ok) {
|
|
11998
11995
|
const errorText = await response.text();
|
|
11999
|
-
let
|
|
11996
|
+
let errorMessage2;
|
|
12000
11997
|
try {
|
|
12001
11998
|
const errorData = JSON.parse(errorText);
|
|
12002
|
-
|
|
11999
|
+
errorMessage2 = errorData.error || errorData.message || errorText;
|
|
12003
12000
|
} catch {
|
|
12004
|
-
|
|
12001
|
+
errorMessage2 = errorText;
|
|
12005
12002
|
}
|
|
12006
12003
|
console.error(`[Runway] POST /${endpoint} -> ${response.status} ${response.statusText}
|
|
12007
12004
|
Model: ${model}, Ratio: ${apiRatio}, Duration: ${body.duration}
|
|
@@ -12009,7 +12006,7 @@ var init_RunwayProvider = __esm({
|
|
|
12009
12006
|
return {
|
|
12010
12007
|
id: "",
|
|
12011
12008
|
status: "failed",
|
|
12012
|
-
error: `API error (${response.status}): ${
|
|
12009
|
+
error: `API error (${response.status}): ${errorMessage2}`
|
|
12013
12010
|
};
|
|
12014
12011
|
}
|
|
12015
12012
|
const data = await response.json();
|
|
@@ -12381,17 +12378,17 @@ var init_KlingProvider = __esm({
|
|
|
12381
12378
|
async handleResponse(response) {
|
|
12382
12379
|
if (!response.ok) {
|
|
12383
12380
|
const errorText = await response.text();
|
|
12384
|
-
let
|
|
12381
|
+
let errorMessage2;
|
|
12385
12382
|
try {
|
|
12386
12383
|
const errorData = JSON.parse(errorText);
|
|
12387
|
-
|
|
12384
|
+
errorMessage2 = errorData.message || errorData.error || errorText;
|
|
12388
12385
|
} catch {
|
|
12389
|
-
|
|
12386
|
+
errorMessage2 = errorText;
|
|
12390
12387
|
}
|
|
12391
12388
|
return {
|
|
12392
12389
|
id: "",
|
|
12393
12390
|
status: "failed",
|
|
12394
|
-
error: `API error (${response.status}): ${
|
|
12391
|
+
error: `API error (${response.status}): ${errorMessage2}`
|
|
12395
12392
|
};
|
|
12396
12393
|
}
|
|
12397
12394
|
const data = await response.json();
|
|
@@ -12720,20 +12717,20 @@ var init_GrokProvider = __esm({
|
|
|
12720
12717
|
});
|
|
12721
12718
|
if (!response.ok) {
|
|
12722
12719
|
const errorText = await response.text();
|
|
12723
|
-
let
|
|
12720
|
+
let errorMessage2 = `API error: ${response.status}`;
|
|
12724
12721
|
try {
|
|
12725
12722
|
const errorJson = JSON.parse(errorText);
|
|
12726
12723
|
if (errorJson.error?.message) {
|
|
12727
|
-
|
|
12724
|
+
errorMessage2 = errorJson.error.message;
|
|
12728
12725
|
}
|
|
12729
12726
|
} catch {
|
|
12730
12727
|
if (errorText) {
|
|
12731
|
-
|
|
12728
|
+
errorMessage2 = errorText.substring(0, 200);
|
|
12732
12729
|
}
|
|
12733
12730
|
}
|
|
12734
12731
|
return {
|
|
12735
12732
|
success: false,
|
|
12736
|
-
error:
|
|
12733
|
+
error: errorMessage2
|
|
12737
12734
|
};
|
|
12738
12735
|
}
|
|
12739
12736
|
const data = await response.json();
|
|
@@ -12788,20 +12785,20 @@ var init_GrokProvider = __esm({
|
|
|
12788
12785
|
});
|
|
12789
12786
|
if (!response.ok) {
|
|
12790
12787
|
const errorText = await response.text();
|
|
12791
|
-
let
|
|
12788
|
+
let errorMessage2 = `API error: ${response.status}`;
|
|
12792
12789
|
try {
|
|
12793
12790
|
const errorJson = JSON.parse(errorText);
|
|
12794
12791
|
if (errorJson.error?.message) {
|
|
12795
|
-
|
|
12792
|
+
errorMessage2 = errorJson.error.message;
|
|
12796
12793
|
}
|
|
12797
12794
|
} catch {
|
|
12798
12795
|
if (errorText) {
|
|
12799
|
-
|
|
12796
|
+
errorMessage2 = errorText.substring(0, 200);
|
|
12800
12797
|
}
|
|
12801
12798
|
}
|
|
12802
12799
|
return {
|
|
12803
12800
|
success: false,
|
|
12804
|
-
error:
|
|
12801
|
+
error: errorMessage2
|
|
12805
12802
|
};
|
|
12806
12803
|
}
|
|
12807
12804
|
const data = await response.json();
|
|
@@ -13255,7 +13252,7 @@ var require_utils = __commonJS({
|
|
|
13255
13252
|
exports.throttle = throttle;
|
|
13256
13253
|
exports.isReact = isReact;
|
|
13257
13254
|
exports.isPlainObject = isPlainObject;
|
|
13258
|
-
exports.sleep =
|
|
13255
|
+
exports.sleep = sleep4;
|
|
13259
13256
|
function ensureEndpointIdFormat(id) {
|
|
13260
13257
|
const parts = id.split("/");
|
|
13261
13258
|
if (parts.length > 1) {
|
|
@@ -13333,7 +13330,7 @@ var require_utils = __commonJS({
|
|
|
13333
13330
|
function isPlainObject(value) {
|
|
13334
13331
|
return !!value && Object.getPrototypeOf(value) === Object.prototype;
|
|
13335
13332
|
}
|
|
13336
|
-
function
|
|
13333
|
+
function sleep4(ms) {
|
|
13337
13334
|
return __awaiter(this, void 0, void 0, function* () {
|
|
13338
13335
|
return new Promise((resolve81) => setTimeout(resolve81, ms));
|
|
13339
13336
|
});
|
|
@@ -17099,6 +17096,39 @@ var require_src = __commonJS({
|
|
|
17099
17096
|
});
|
|
17100
17097
|
|
|
17101
17098
|
// ../ai-providers/dist/fal/FalProvider.js
|
|
17099
|
+
function formatFalError(error) {
|
|
17100
|
+
if (!(error instanceof Error))
|
|
17101
|
+
return String(error);
|
|
17102
|
+
const parts = [error.message];
|
|
17103
|
+
const details = falErrorDetails(error);
|
|
17104
|
+
if (details)
|
|
17105
|
+
parts.push(details);
|
|
17106
|
+
return parts.join(" - ");
|
|
17107
|
+
}
|
|
17108
|
+
function falErrorDetails(error) {
|
|
17109
|
+
const withBody = error;
|
|
17110
|
+
const items = [];
|
|
17111
|
+
if (typeof withBody.status === "number")
|
|
17112
|
+
items.push(`HTTP ${withBody.status}`);
|
|
17113
|
+
if (withBody.requestId)
|
|
17114
|
+
items.push(`request ${withBody.requestId}`);
|
|
17115
|
+
if (Array.isArray(withBody.fieldErrors) && withBody.fieldErrors.length > 0) {
|
|
17116
|
+
items.push(withBody.fieldErrors.map((fieldError) => {
|
|
17117
|
+
const path2 = Array.isArray(fieldError.loc) ? fieldError.loc.join(".") : "body";
|
|
17118
|
+
return `${path2}: ${fieldError.msg ?? fieldError.type ?? "invalid"}`;
|
|
17119
|
+
}).join("; "));
|
|
17120
|
+
} else if (withBody.body !== void 0) {
|
|
17121
|
+
items.push(safeJson(withBody.body));
|
|
17122
|
+
}
|
|
17123
|
+
return items.filter(Boolean).join(" - ") || void 0;
|
|
17124
|
+
}
|
|
17125
|
+
function safeJson(value) {
|
|
17126
|
+
try {
|
|
17127
|
+
return JSON.stringify(value);
|
|
17128
|
+
} catch {
|
|
17129
|
+
return String(value);
|
|
17130
|
+
}
|
|
17131
|
+
}
|
|
17102
17132
|
function pickReferenceImageUrl(input) {
|
|
17103
17133
|
if (typeof input !== "string")
|
|
17104
17134
|
return void 0;
|
|
@@ -17106,6 +17136,53 @@ function pickReferenceImageUrl(input) {
|
|
|
17106
17136
|
return input;
|
|
17107
17137
|
return void 0;
|
|
17108
17138
|
}
|
|
17139
|
+
function isFalFileInput(value) {
|
|
17140
|
+
return value.startsWith("http://") || value.startsWith("https://") || value.startsWith("data:");
|
|
17141
|
+
}
|
|
17142
|
+
async function normaliseReferences(input, client) {
|
|
17143
|
+
if (!input)
|
|
17144
|
+
return [];
|
|
17145
|
+
const references = [];
|
|
17146
|
+
for (const ref of input) {
|
|
17147
|
+
if (!isFalFileInput(ref.url))
|
|
17148
|
+
continue;
|
|
17149
|
+
references.push({
|
|
17150
|
+
...ref,
|
|
17151
|
+
url: ref.url.startsWith("data:") ? await uploadDataUri(client, ref.url) : ref.url
|
|
17152
|
+
});
|
|
17153
|
+
}
|
|
17154
|
+
return references;
|
|
17155
|
+
}
|
|
17156
|
+
async function uploadDataUri(client, dataUri) {
|
|
17157
|
+
const blob = dataUriToBlob(dataUri);
|
|
17158
|
+
return client.storage.upload(blob, {
|
|
17159
|
+
lifecycle: { expiresIn: "1h" }
|
|
17160
|
+
});
|
|
17161
|
+
}
|
|
17162
|
+
function dataUriToBlob(dataUri) {
|
|
17163
|
+
const match = /^data:([^;,]+)?(;base64)?,(.*)$/s.exec(dataUri);
|
|
17164
|
+
if (!match)
|
|
17165
|
+
throw new Error("Invalid data URI reference.");
|
|
17166
|
+
const mimeType = match[1] || "application/octet-stream";
|
|
17167
|
+
const isBase64 = Boolean(match[2]);
|
|
17168
|
+
const payload = match[3] ?? "";
|
|
17169
|
+
const buffer = isBase64 ? Buffer.from(payload, "base64") : Buffer.from(decodeURIComponent(payload), "utf-8");
|
|
17170
|
+
return new Blob([new Uint8Array(buffer)], { type: mimeType });
|
|
17171
|
+
}
|
|
17172
|
+
function groupReferences(references) {
|
|
17173
|
+
const image_urls = [];
|
|
17174
|
+
const video_urls = [];
|
|
17175
|
+
const audio_urls = [];
|
|
17176
|
+
for (const ref of references) {
|
|
17177
|
+
if (ref.kind === "image")
|
|
17178
|
+
image_urls.push(ref.url);
|
|
17179
|
+
if (ref.kind === "video")
|
|
17180
|
+
video_urls.push(ref.url);
|
|
17181
|
+
if (ref.kind === "audio")
|
|
17182
|
+
audio_urls.push(ref.url);
|
|
17183
|
+
}
|
|
17184
|
+
return { image_urls, video_urls, audio_urls };
|
|
17185
|
+
}
|
|
17109
17186
|
function normaliseAspect(value) {
|
|
17110
17187
|
if (!value)
|
|
17111
17188
|
return "auto";
|
|
@@ -17128,7 +17205,7 @@ function normaliseDuration(value) {
|
|
|
17128
17205
|
return "auto";
|
|
17129
17206
|
return Math.max(4, Math.min(15, Math.round(value)));
|
|
17130
17207
|
}
|
|
17131
|
-
var import_client, ENDPOINT_TEXT_TO_VIDEO, ENDPOINT_IMAGE_TO_VIDEO, DEFAULT_VARIANT, VALID_RESOLUTIONS, VALID_ASPECTS, FalProvider, falProvider;
|
|
17208
|
+
var import_client, ENDPOINT_TEXT_TO_VIDEO, ENDPOINT_IMAGE_TO_VIDEO, ENDPOINT_REFERENCE_TO_VIDEO, DEFAULT_VARIANT, VALID_RESOLUTIONS, VALID_ASPECTS, FalProvider, falProvider;
|
|
17132
17209
|
var init_FalProvider = __esm({
|
|
17133
17210
|
"../ai-providers/dist/fal/FalProvider.js"() {
|
|
17134
17211
|
"use strict";
|
|
@@ -17141,6 +17218,10 @@ var init_FalProvider = __esm({
|
|
|
17141
17218
|
"seedance-2.0": "bytedance/seedance-2.0/image-to-video",
|
|
17142
17219
|
"seedance-2.0-fast": "bytedance/seedance-2.0/fast/image-to-video"
|
|
17143
17220
|
};
|
|
17221
|
+
ENDPOINT_REFERENCE_TO_VIDEO = {
|
|
17222
|
+
"seedance-2.0": "bytedance/seedance-2.0/reference-to-video",
|
|
17223
|
+
"seedance-2.0-fast": "bytedance/seedance-2.0/fast/reference-to-video"
|
|
17224
|
+
};
|
|
17144
17225
|
DEFAULT_VARIANT = "seedance-2.0";
|
|
17145
17226
|
VALID_RESOLUTIONS = ["480p", "720p", "1080p"];
|
|
17146
17227
|
VALID_ASPECTS = ["21:9", "16:9", "4:3", "1:1", "3:4", "9:16", "auto"];
|
|
@@ -17149,7 +17230,7 @@ var init_FalProvider = __esm({
|
|
|
17149
17230
|
this.id = "seedance";
|
|
17150
17231
|
this.name = "fal.ai (Seedance 2.0)";
|
|
17151
17232
|
this.description = "fal.ai hosting ByteDance Seedance 2.0 \u2014 Artificial Analysis #2 on both text-to-video and image-to-video leaderboards";
|
|
17152
|
-
this.capabilities = ["text-to-video", "image-to-video"];
|
|
17233
|
+
this.capabilities = ["text-to-video", "image-to-video", "reference-to-video"];
|
|
17153
17234
|
this.iconUrl = "/icons/fal.svg";
|
|
17154
17235
|
this.isAvailable = true;
|
|
17155
17236
|
}
|
|
@@ -17188,9 +17269,11 @@ var init_FalProvider = __esm({
|
|
|
17188
17269
|
error: `Unknown Seedance variant: ${variant}. Valid: ${Object.keys(ENDPOINT_TEXT_TO_VIDEO).join(", ")}.`
|
|
17189
17270
|
};
|
|
17190
17271
|
}
|
|
17191
|
-
const
|
|
17272
|
+
const references = await normaliseReferences(options?.references, this.client);
|
|
17273
|
+
const hasReferences = references.length > 0;
|
|
17274
|
+
const referenceImage = hasReferences ? void 0 : pickReferenceImageUrl(options?.referenceImage);
|
|
17192
17275
|
const isImageToVideo = !!referenceImage;
|
|
17193
|
-
const endpointId = isImageToVideo ? ENDPOINT_IMAGE_TO_VIDEO[variant] : ENDPOINT_TEXT_TO_VIDEO[variant];
|
|
17276
|
+
const endpointId = hasReferences ? ENDPOINT_REFERENCE_TO_VIDEO[variant] : isImageToVideo ? ENDPOINT_IMAGE_TO_VIDEO[variant] : ENDPOINT_TEXT_TO_VIDEO[variant];
|
|
17194
17277
|
const aspect = normaliseAspect(options?.aspectRatio);
|
|
17195
17278
|
const resolution = normaliseResolution(options?.resolution);
|
|
17196
17279
|
const duration = normaliseDuration(options?.duration);
|
|
@@ -17200,13 +17283,26 @@ var init_FalProvider = __esm({
|
|
|
17200
17283
|
resolution,
|
|
17201
17284
|
duration
|
|
17202
17285
|
};
|
|
17203
|
-
if (
|
|
17286
|
+
if (hasReferences) {
|
|
17287
|
+
const grouped = groupReferences(references);
|
|
17288
|
+
if (grouped.image_urls.length > 0)
|
|
17289
|
+
input.image_urls = grouped.image_urls;
|
|
17290
|
+
if (grouped.video_urls.length > 0)
|
|
17291
|
+
input.video_urls = grouped.video_urls;
|
|
17292
|
+
if (grouped.audio_urls.length > 0)
|
|
17293
|
+
input.audio_urls = grouped.audio_urls;
|
|
17294
|
+
} else if (referenceImage) {
|
|
17204
17295
|
input.image_url = referenceImage;
|
|
17296
|
+
}
|
|
17205
17297
|
if (options?.negativePrompt)
|
|
17206
17298
|
input.negative_prompt = options.negativePrompt;
|
|
17207
17299
|
if (typeof options?.seed === "number")
|
|
17208
17300
|
input.seed = options.seed;
|
|
17209
|
-
if (options?.
|
|
17301
|
+
if (typeof options?.generateAudio === "boolean")
|
|
17302
|
+
input.generate_audio = options.generateAudio;
|
|
17303
|
+
if (options?.endUserId)
|
|
17304
|
+
input.end_user_id = options.endUserId;
|
|
17305
|
+
if (!hasReferences && options?.lastFrame)
|
|
17210
17306
|
input.end_image_url = options.lastFrame;
|
|
17211
17307
|
try {
|
|
17212
17308
|
const out = await this.client.subscribe(endpointId, { input, logs: false });
|
|
@@ -17229,7 +17325,7 @@ var init_FalProvider = __esm({
|
|
|
17229
17325
|
return {
|
|
17230
17326
|
id: "",
|
|
17231
17327
|
status: "failed",
|
|
17232
|
-
error:
|
|
17328
|
+
error: formatFalError(err)
|
|
17233
17329
|
};
|
|
17234
17330
|
}
|
|
17235
17331
|
}
|
|
@@ -17253,14 +17349,15 @@ var init_fal = __esm({
|
|
|
17253
17349
|
// Review this alias at the 1.0 cut.
|
|
17254
17350
|
aliases: ["fal"],
|
|
17255
17351
|
models: ["seedance-2.0", "seedance-2.0-fast"],
|
|
17256
|
-
capabilities: ["text-to-video", "image-to-video", "native-audio"],
|
|
17352
|
+
capabilities: ["text-to-video", "image-to-video", "reference-to-video", "native-audio"],
|
|
17257
17353
|
apiKey: "fal",
|
|
17258
17354
|
kinds: ["video"],
|
|
17259
17355
|
resolverPriority: { video: 1 },
|
|
17260
17356
|
commandsUnlocked: [
|
|
17261
17357
|
"generate video -p seedance (Seedance 2.0 via fal.ai \u2014 default since v0.57)",
|
|
17262
17358
|
"generate video -p seedance --seedance-model fast (lower-latency variant)",
|
|
17263
|
-
"generate video -p seedance -i <image> (image-to-video)"
|
|
17359
|
+
"generate video -p seedance -i <image> (image-to-video)",
|
|
17360
|
+
"generate video -p seedance --ref-images <images...> (reference-to-video)"
|
|
17264
17361
|
]
|
|
17265
17362
|
});
|
|
17266
17363
|
}
|
|
@@ -17327,17 +17424,17 @@ var init_ReplicateProvider = __esm({
|
|
|
17327
17424
|
});
|
|
17328
17425
|
if (!response.ok) {
|
|
17329
17426
|
const errorText = await response.text();
|
|
17330
|
-
let
|
|
17427
|
+
let errorMessage2;
|
|
17331
17428
|
try {
|
|
17332
17429
|
const errorData = JSON.parse(errorText);
|
|
17333
|
-
|
|
17430
|
+
errorMessage2 = errorData.detail || errorData.error || errorText;
|
|
17334
17431
|
} catch {
|
|
17335
|
-
|
|
17432
|
+
errorMessage2 = errorText;
|
|
17336
17433
|
}
|
|
17337
17434
|
return {
|
|
17338
17435
|
id: "",
|
|
17339
17436
|
status: "failed",
|
|
17340
|
-
error: `API error (${response.status}): ${
|
|
17437
|
+
error: `API error (${response.status}): ${errorMessage2}`
|
|
17341
17438
|
};
|
|
17342
17439
|
}
|
|
17343
17440
|
const prediction = await response.json();
|
|
@@ -17400,17 +17497,17 @@ var init_ReplicateProvider = __esm({
|
|
|
17400
17497
|
});
|
|
17401
17498
|
if (!response.ok) {
|
|
17402
17499
|
const errorText = await response.text();
|
|
17403
|
-
let
|
|
17500
|
+
let errorMessage2;
|
|
17404
17501
|
try {
|
|
17405
17502
|
const errorData = JSON.parse(errorText);
|
|
17406
|
-
|
|
17503
|
+
errorMessage2 = errorData.detail || errorData.error || errorText;
|
|
17407
17504
|
} catch {
|
|
17408
|
-
|
|
17505
|
+
errorMessage2 = errorText;
|
|
17409
17506
|
}
|
|
17410
17507
|
return {
|
|
17411
17508
|
id: "",
|
|
17412
17509
|
status: "failed",
|
|
17413
|
-
error: `API error (${response.status}): ${
|
|
17510
|
+
error: `API error (${response.status}): ${errorMessage2}`
|
|
17414
17511
|
};
|
|
17415
17512
|
}
|
|
17416
17513
|
const prediction = await response.json();
|
|
@@ -17568,16 +17665,16 @@ var init_ReplicateProvider = __esm({
|
|
|
17568
17665
|
});
|
|
17569
17666
|
if (!response.ok) {
|
|
17570
17667
|
const errorText = await response.text();
|
|
17571
|
-
let
|
|
17668
|
+
let errorMessage2;
|
|
17572
17669
|
try {
|
|
17573
17670
|
const errorData = JSON.parse(errorText);
|
|
17574
|
-
|
|
17671
|
+
errorMessage2 = errorData.detail || errorData.error || errorText;
|
|
17575
17672
|
} catch {
|
|
17576
|
-
|
|
17673
|
+
errorMessage2 = errorText;
|
|
17577
17674
|
}
|
|
17578
17675
|
return {
|
|
17579
17676
|
success: false,
|
|
17580
|
-
error: `API error (${response.status}): ${
|
|
17677
|
+
error: `API error (${response.status}): ${errorMessage2}`
|
|
17581
17678
|
};
|
|
17582
17679
|
}
|
|
17583
17680
|
const prediction = await response.json();
|
|
@@ -17671,16 +17768,16 @@ var init_ReplicateProvider = __esm({
|
|
|
17671
17768
|
});
|
|
17672
17769
|
if (!response.ok) {
|
|
17673
17770
|
const errorText = await response.text();
|
|
17674
|
-
let
|
|
17771
|
+
let errorMessage2;
|
|
17675
17772
|
try {
|
|
17676
17773
|
const errorData = JSON.parse(errorText);
|
|
17677
|
-
|
|
17774
|
+
errorMessage2 = errorData.detail || errorData.error || errorText;
|
|
17678
17775
|
} catch {
|
|
17679
|
-
|
|
17776
|
+
errorMessage2 = errorText;
|
|
17680
17777
|
}
|
|
17681
17778
|
return {
|
|
17682
17779
|
success: false,
|
|
17683
|
-
error: `API error (${response.status}): ${
|
|
17780
|
+
error: `API error (${response.status}): ${errorMessage2}`
|
|
17684
17781
|
};
|
|
17685
17782
|
}
|
|
17686
17783
|
const prediction = await response.json();
|
|
@@ -17782,17 +17879,17 @@ var init_ReplicateProvider = __esm({
|
|
|
17782
17879
|
});
|
|
17783
17880
|
if (!response.ok) {
|
|
17784
17881
|
const errorText = await response.text();
|
|
17785
|
-
let
|
|
17882
|
+
let errorMessage2;
|
|
17786
17883
|
try {
|
|
17787
17884
|
const errorData = JSON.parse(errorText);
|
|
17788
|
-
|
|
17885
|
+
errorMessage2 = errorData.detail || errorData.error || errorText;
|
|
17789
17886
|
} catch {
|
|
17790
|
-
|
|
17887
|
+
errorMessage2 = errorText;
|
|
17791
17888
|
}
|
|
17792
17889
|
return {
|
|
17793
17890
|
id: "",
|
|
17794
17891
|
status: "failed",
|
|
17795
|
-
error: `API error (${response.status}): ${
|
|
17892
|
+
error: `API error (${response.status}): ${errorMessage2}`
|
|
17796
17893
|
};
|
|
17797
17894
|
}
|
|
17798
17895
|
const prediction = await response.json();
|
|
@@ -17855,17 +17952,17 @@ var init_ReplicateProvider = __esm({
|
|
|
17855
17952
|
});
|
|
17856
17953
|
if (!response.ok) {
|
|
17857
17954
|
const errorText = await response.text();
|
|
17858
|
-
let
|
|
17955
|
+
let errorMessage2;
|
|
17859
17956
|
try {
|
|
17860
17957
|
const errorData = JSON.parse(errorText);
|
|
17861
|
-
|
|
17958
|
+
errorMessage2 = errorData.detail || errorData.error || errorText;
|
|
17862
17959
|
} catch {
|
|
17863
|
-
|
|
17960
|
+
errorMessage2 = errorText;
|
|
17864
17961
|
}
|
|
17865
17962
|
return {
|
|
17866
17963
|
id: "",
|
|
17867
17964
|
status: "failed",
|
|
17868
|
-
error: `API error (${response.status}): ${
|
|
17965
|
+
error: `API error (${response.status}): ${errorMessage2}`
|
|
17869
17966
|
};
|
|
17870
17967
|
}
|
|
17871
17968
|
const prediction = await response.json();
|
|
@@ -25726,6 +25823,7 @@ var config_exports = {};
|
|
|
25726
25823
|
__export(config_exports, {
|
|
25727
25824
|
CONFIG_DIR: () => CONFIG_DIR,
|
|
25728
25825
|
CONFIG_PATH: () => CONFIG_PATH,
|
|
25826
|
+
ConfigFileError: () => ConfigFileError,
|
|
25729
25827
|
LEGACY_USER_CONFIG_DIR: () => LEGACY_USER_CONFIG_DIR,
|
|
25730
25828
|
LEGACY_USER_CONFIG_PATH: () => LEGACY_USER_CONFIG_PATH,
|
|
25731
25829
|
PROVIDER_ENV_ALIASES: () => PROVIDER_ENV_ALIASES,
|
|
@@ -25836,8 +25934,8 @@ async function readConfigFile(path2) {
|
|
|
25836
25934
|
const content = await readFile2(path2, "utf-8");
|
|
25837
25935
|
const parsed = (0, import_yaml.parse)(content);
|
|
25838
25936
|
return applyDefaults(parsed);
|
|
25839
|
-
} catch {
|
|
25840
|
-
|
|
25937
|
+
} catch (error) {
|
|
25938
|
+
throw new ConfigFileError(path2, error);
|
|
25841
25939
|
}
|
|
25842
25940
|
}
|
|
25843
25941
|
async function readUserConfigFile() {
|
|
@@ -25917,7 +26015,7 @@ async function updateProviderKey(providerKey, apiKey, options = {}) {
|
|
|
25917
26015
|
config2.providers[providerKey] = apiKey;
|
|
25918
26016
|
await saveConfig(config2, { scope, cwd: options.cwd });
|
|
25919
26017
|
}
|
|
25920
|
-
var import_yaml, USER_CONFIG_DIR, USER_CONFIG_PATH, USER_DATA_DIR, USER_CACHE_DIR, LEGACY_USER_CONFIG_DIR, LEGACY_USER_CONFIG_PATH, CONFIG_DIR, CONFIG_PATH;
|
|
26018
|
+
var import_yaml, USER_CONFIG_DIR, USER_CONFIG_PATH, USER_DATA_DIR, USER_CACHE_DIR, LEGACY_USER_CONFIG_DIR, LEGACY_USER_CONFIG_PATH, CONFIG_DIR, CONFIG_PATH, ConfigFileError;
|
|
25921
26019
|
var init_config = __esm({
|
|
25922
26020
|
"src/config/index.ts"() {
|
|
25923
26021
|
"use strict";
|
|
@@ -25936,6 +26034,16 @@ var init_config = __esm({
|
|
|
25936
26034
|
LEGACY_USER_CONFIG_PATH = resolve4(LEGACY_USER_CONFIG_DIR, "config.yaml");
|
|
25937
26035
|
CONFIG_DIR = USER_CONFIG_DIR;
|
|
25938
26036
|
CONFIG_PATH = USER_CONFIG_PATH;
|
|
26037
|
+
ConfigFileError = class extends Error {
|
|
26038
|
+
path;
|
|
26039
|
+
constructor(path2, cause) {
|
|
26040
|
+
const detail = cause instanceof Error ? cause.message : String(cause);
|
|
26041
|
+
super(`Failed to read VibeFrame config at ${path2}: ${detail}`);
|
|
26042
|
+
this.name = "ConfigFileError";
|
|
26043
|
+
this.path = path2;
|
|
26044
|
+
this.cause = cause;
|
|
26045
|
+
}
|
|
26046
|
+
};
|
|
25939
26047
|
}
|
|
25940
26048
|
});
|
|
25941
26049
|
|
|
@@ -26553,6 +26661,33 @@ consult this file \u2014 run the generate command directly.
|
|
|
26553
26661
|
Browse named styles: \`vibe scene list-styles\`. Re-seed from one with
|
|
26554
26662
|
\`vibe scene init . --visual-style "Swiss Pulse"\` (idempotent).
|
|
26555
26663
|
|
|
26664
|
+
## Brief and local media
|
|
26665
|
+
|
|
26666
|
+
\`brief.md\` is raw intent, not a strict schema. It may contain messy notes,
|
|
26667
|
+
pasted research, links, product requirements, or a one-line idea. \`vibe init
|
|
26668
|
+
--from brief.md\` uses it only to seed \`STORYBOARD.md\` and \`DESIGN.md\`;
|
|
26669
|
+
after init, those two files are the working source of truth.
|
|
26670
|
+
|
|
26671
|
+
Use \`media/\` for user-provided source files: product photos, screenshots,
|
|
26672
|
+
logos, B-roll, recorded narration, or reference clips. Keep those inputs
|
|
26673
|
+
inside this project so build references stay project-relative. Do not put user
|
|
26674
|
+
media in \`references/\`; that directory is reserved for local composition
|
|
26675
|
+
rules installed by VibeFrame.
|
|
26676
|
+
|
|
26677
|
+
When a beat should reuse a local file, reference it from \`STORYBOARD.md\`
|
|
26678
|
+
with a project-relative path:
|
|
26679
|
+
|
|
26680
|
+
\`\`\`yaml
|
|
26681
|
+
backdrop: "media/product-shot.png" # existing still image
|
|
26682
|
+
video: "media/broll.mp4" # existing video/B-roll
|
|
26683
|
+
narration: "media/voice.wav" # existing recorded narration
|
|
26684
|
+
asset: "media/logo.png" # generic local asset reference
|
|
26685
|
+
\`\`\`
|
|
26686
|
+
|
|
26687
|
+
Use text cues when you want VibeFrame to generate an asset. Use path cues
|
|
26688
|
+
when you want VibeFrame to reuse a local file. Avoid absolute paths or parent
|
|
26689
|
+
directory references; copy files into \`media/\` first.
|
|
26690
|
+
|
|
26556
26691
|
## Provider keys and project scope
|
|
26557
26692
|
|
|
26558
26693
|
Use VibeFrame CLI generation for project assets:
|
|
@@ -26600,9 +26735,11 @@ the framework-level minimum, not the cinematic craft layer.
|
|
|
26600
26735
|
|
|
26601
26736
|
- \`DESIGN.md\` \u2014 visual identity contract (palette, type, motion, transitions)
|
|
26602
26737
|
- \`STORYBOARD.md\` \u2014 per-beat narration/backdrop/duration cues for \`vibe build\`
|
|
26738
|
+
- \`media/\` \u2014 user-provided source files (photos, logos, clips, voice recordings)
|
|
26603
26739
|
- \`index.html\` \u2014 root composition (timeline)
|
|
26604
26740
|
- \`compositions/scene-*.html\` \u2014 per-scene HTML authored by you or the agent
|
|
26605
|
-
- \`assets/\` \u2014
|
|
26741
|
+
- \`assets/\` \u2014 generated/canonical build media (narration audio, images, video)
|
|
26742
|
+
- \`references/\` \u2014 composition rule docs installed by VibeFrame, not user media
|
|
26606
26743
|
- \`transcript.json\` \u2014 Whisper word-level transcript (if narration exists)
|
|
26607
26744
|
- \`hyperframes.json\` \u2014 HF registry config (speak to both toolchains)
|
|
26608
26745
|
- \`vibe.config.json\` \u2014 canonical VibeFrame config (providers, budget)
|
|
@@ -26750,7 +26887,11 @@ async function scaffoldSceneProject(opts) {
|
|
|
26750
26887
|
if (await pathExists(metaPath)) {
|
|
26751
26888
|
skipped2.push(metaPath);
|
|
26752
26889
|
} else {
|
|
26753
|
-
await writeFile4(
|
|
26890
|
+
await writeFile4(
|
|
26891
|
+
metaPath,
|
|
26892
|
+
JSON.stringify(buildHyperframesMeta(name, now), null, 2) + "\n",
|
|
26893
|
+
"utf-8"
|
|
26894
|
+
);
|
|
26754
26895
|
created.push(metaPath);
|
|
26755
26896
|
}
|
|
26756
26897
|
const rootPath = resolve7(dir, "index.html");
|
|
@@ -26765,11 +26906,7 @@ async function scaffoldSceneProject(opts) {
|
|
|
26765
26906
|
if (await pathExists(vibeConfigJsonPath)) {
|
|
26766
26907
|
skipped2.push(vibeConfigJsonPath);
|
|
26767
26908
|
} else {
|
|
26768
|
-
await writeFile4(
|
|
26769
|
-
vibeConfigJsonPath,
|
|
26770
|
-
projectConfigJson({ name, aspect }),
|
|
26771
|
-
"utf-8"
|
|
26772
|
-
);
|
|
26909
|
+
await writeFile4(vibeConfigJsonPath, projectConfigJson({ name, aspect }), "utf-8");
|
|
26773
26910
|
created.push(vibeConfigJsonPath);
|
|
26774
26911
|
}
|
|
26775
26912
|
const vibePath = resolve7(dir, "vibe.project.yaml");
|
|
@@ -26808,11 +26945,7 @@ ${existing}`, "utf-8");
|
|
|
26808
26945
|
if (await pathExists(designPath)) {
|
|
26809
26946
|
skipped2.push(designPath);
|
|
26810
26947
|
} else {
|
|
26811
|
-
await writeFile4(
|
|
26812
|
-
designPath,
|
|
26813
|
-
buildDesignMd({ name, style: opts.visualStyle }),
|
|
26814
|
-
"utf-8"
|
|
26815
|
-
);
|
|
26948
|
+
await writeFile4(designPath, buildDesignMd({ name, style: opts.visualStyle }), "utf-8");
|
|
26816
26949
|
created.push(designPath);
|
|
26817
26950
|
}
|
|
26818
26951
|
const storyboardPath2 = resolve7(dir, "STORYBOARD.md");
|
|
@@ -33498,7 +33631,7 @@ var init_speech = __esm({
|
|
|
33498
33631
|
// src/commands/_shared/video-utils.ts
|
|
33499
33632
|
import { writeFile as writeFile19, unlink, rename } from "node:fs/promises";
|
|
33500
33633
|
import { resolve as resolve22, basename as basename4 } from "node:path";
|
|
33501
|
-
function
|
|
33634
|
+
function sleep2(ms) {
|
|
33502
33635
|
return new Promise((resolve81) => setTimeout(resolve81, ms));
|
|
33503
33636
|
}
|
|
33504
33637
|
async function uploadToImgbb(imageBuffer, apiKey) {
|
|
@@ -33820,6 +33953,9 @@ async function executeVideoGenerate(options) {
|
|
|
33820
33953
|
prompt: prompt3,
|
|
33821
33954
|
provider = "kling",
|
|
33822
33955
|
image,
|
|
33956
|
+
refImages,
|
|
33957
|
+
refVideos,
|
|
33958
|
+
refAudio,
|
|
33823
33959
|
duration = 5,
|
|
33824
33960
|
ratio = "16:9",
|
|
33825
33961
|
seed,
|
|
@@ -33828,6 +33964,7 @@ async function executeVideoGenerate(options) {
|
|
|
33828
33964
|
resolution,
|
|
33829
33965
|
veoModel = "3.1-fast",
|
|
33830
33966
|
seedanceModel = "quality",
|
|
33967
|
+
generateAudio,
|
|
33831
33968
|
output,
|
|
33832
33969
|
wait = true,
|
|
33833
33970
|
apiKey
|
|
@@ -33866,8 +34003,13 @@ async function executeVideoGenerate(options) {
|
|
|
33866
34003
|
if (provider === "seedance" || provider === "fal") {
|
|
33867
34004
|
const fal = new FalProvider();
|
|
33868
34005
|
await fal.initialize({ apiKey: key });
|
|
34006
|
+
const references = await prepareSeedanceReferences({
|
|
34007
|
+
refImages,
|
|
34008
|
+
refVideos,
|
|
34009
|
+
refAudio
|
|
34010
|
+
});
|
|
33869
34011
|
let falImage = referenceImage;
|
|
33870
|
-
if (falImage && falImage.startsWith("data:")) {
|
|
34012
|
+
if (falImage && falImage.startsWith("data:") && references.length === 0) {
|
|
33871
34013
|
const uploadHost = await resolveUploadHost();
|
|
33872
34014
|
const upload = await uploadHost.uploadImage(referenceImageBuffer, {
|
|
33873
34015
|
filename: image,
|
|
@@ -33878,11 +34020,14 @@ async function executeVideoGenerate(options) {
|
|
|
33878
34020
|
const model = seedanceModel === "fast" || seedanceModel === "seedance-2.0-fast" ? "seedance-2.0-fast" : "seedance-2.0";
|
|
33879
34021
|
const result = await fal.generateVideo(prompt3, {
|
|
33880
34022
|
prompt: prompt3,
|
|
33881
|
-
referenceImage: falImage,
|
|
34023
|
+
referenceImage: references.length > 0 ? void 0 : falImage,
|
|
34024
|
+
references: references.length > 0 ? references : void 0,
|
|
33882
34025
|
duration,
|
|
33883
34026
|
aspectRatio: ratio,
|
|
33884
34027
|
negativePrompt: negative,
|
|
33885
|
-
model
|
|
34028
|
+
model,
|
|
34029
|
+
resolution,
|
|
34030
|
+
generateAudio
|
|
33886
34031
|
});
|
|
33887
34032
|
if (result.status === "failed")
|
|
33888
34033
|
return { success: false, error: result.error || "Seedance generation failed" };
|
|
@@ -34059,6 +34204,54 @@ async function executeVideoGenerate(options) {
|
|
|
34059
34204
|
};
|
|
34060
34205
|
}
|
|
34061
34206
|
}
|
|
34207
|
+
async function prepareSeedanceReferences(opts) {
|
|
34208
|
+
const references = [];
|
|
34209
|
+
for (const sourcePath of opts.refImages ?? []) {
|
|
34210
|
+
references.push({
|
|
34211
|
+
kind: "image",
|
|
34212
|
+
url: await fileInputToUrlOrDataUri(sourcePath, "image/png"),
|
|
34213
|
+
sourcePath
|
|
34214
|
+
});
|
|
34215
|
+
}
|
|
34216
|
+
for (const sourcePath of opts.refVideos ?? []) {
|
|
34217
|
+
references.push({
|
|
34218
|
+
kind: "video",
|
|
34219
|
+
url: await fileInputToUrlOrDataUri(sourcePath, "video/mp4"),
|
|
34220
|
+
sourcePath
|
|
34221
|
+
});
|
|
34222
|
+
}
|
|
34223
|
+
for (const sourcePath of opts.refAudio ?? []) {
|
|
34224
|
+
references.push({
|
|
34225
|
+
kind: "audio",
|
|
34226
|
+
url: await fileInputToUrlOrDataUri(sourcePath, "audio/mpeg"),
|
|
34227
|
+
sourcePath
|
|
34228
|
+
});
|
|
34229
|
+
}
|
|
34230
|
+
return references;
|
|
34231
|
+
}
|
|
34232
|
+
async function fileInputToUrlOrDataUri(input, fallbackMimeType) {
|
|
34233
|
+
if (input.startsWith("http://") || input.startsWith("https://") || input.startsWith("data:")) {
|
|
34234
|
+
return input;
|
|
34235
|
+
}
|
|
34236
|
+
const absPath = resolve23(process.cwd(), input);
|
|
34237
|
+
const buffer = await readFile15(absPath);
|
|
34238
|
+
return `data:${mimeTypeForPath(input, fallbackMimeType)};base64,${buffer.toString("base64")}`;
|
|
34239
|
+
}
|
|
34240
|
+
function mimeTypeForPath(path2, fallback2) {
|
|
34241
|
+
const ext = path2.toLowerCase().split(".").pop();
|
|
34242
|
+
const mimeTypes2 = {
|
|
34243
|
+
jpg: "image/jpeg",
|
|
34244
|
+
jpeg: "image/jpeg",
|
|
34245
|
+
png: "image/png",
|
|
34246
|
+
gif: "image/gif",
|
|
34247
|
+
webp: "image/webp",
|
|
34248
|
+
mp4: "video/mp4",
|
|
34249
|
+
mov: "video/quicktime",
|
|
34250
|
+
mp3: "audio/mpeg",
|
|
34251
|
+
wav: "audio/wav"
|
|
34252
|
+
};
|
|
34253
|
+
return mimeTypes2[ext || ""] || fallback2;
|
|
34254
|
+
}
|
|
34062
34255
|
async function executeVideoStatus(options) {
|
|
34063
34256
|
const {
|
|
34064
34257
|
taskId,
|
|
@@ -34659,7 +34852,7 @@ async function refreshMusicStatus(taskId, wait) {
|
|
|
34659
34852
|
let result = await executeMusicStatus({ taskId });
|
|
34660
34853
|
if (!wait) return result;
|
|
34661
34854
|
for (let i = 0; i < 120 && result.success && result.status === "processing"; i++) {
|
|
34662
|
-
await
|
|
34855
|
+
await sleep3(5e3);
|
|
34663
34856
|
result = await executeMusicStatus({ taskId });
|
|
34664
34857
|
}
|
|
34665
34858
|
return result;
|
|
@@ -35077,7 +35270,7 @@ function unique(items) {
|
|
|
35077
35270
|
...new Set(items.filter((item) => typeof item === "string" && item.length > 0))
|
|
35078
35271
|
];
|
|
35079
35272
|
}
|
|
35080
|
-
function
|
|
35273
|
+
function sleep3(ms) {
|
|
35081
35274
|
return new Promise((resolve81) => setTimeout(resolve81, ms));
|
|
35082
35275
|
}
|
|
35083
35276
|
var init_status_jobs = __esm({
|
|
@@ -36312,10 +36505,10 @@ var init_provider_resolver = __esm({
|
|
|
36312
36505
|
|
|
36313
36506
|
// src/commands/_shared/openai-image.ts
|
|
36314
36507
|
function resolveOpenAIImageModel(modelAlias) {
|
|
36315
|
-
const
|
|
36508
|
+
const isGptImage15 = modelAlias === "1.5" || modelAlias === "gpt-image-1.5";
|
|
36316
36509
|
return {
|
|
36317
|
-
openaiModel:
|
|
36318
|
-
modelLabel:
|
|
36510
|
+
openaiModel: isGptImage15 ? "gpt-image-1.5" : "gpt-image-2",
|
|
36511
|
+
modelLabel: isGptImage15 ? "GPT Image 1.5" : "GPT Image 2"
|
|
36319
36512
|
};
|
|
36320
36513
|
}
|
|
36321
36514
|
async function executeOpenAIImageGenerate(prompt3, options, ctx) {
|
|
@@ -36352,7 +36545,7 @@ function registerImageCommand(parent) {
|
|
|
36352
36545
|
"1:1"
|
|
36353
36546
|
).option("--quality <quality>", "Quality: standard, hd (openai only)", "standard").option("--style <style>", "Style: vivid, natural (openai only)", "vivid").option("--count <n>", "Number of images to generate", "1").option(
|
|
36354
36547
|
"-m, --model <model>",
|
|
36355
|
-
"Model. Gemini: flash, 3.1-flash, latest, pro. OpenAI:
|
|
36548
|
+
"Model. Gemini: flash, 3.1-flash, latest, pro. OpenAI: 2 (default), 1.5"
|
|
36356
36549
|
).option("--dry-run", "Preview parameters without executing").addHelpText(
|
|
36357
36550
|
"after",
|
|
36358
36551
|
`
|
|
@@ -37786,8 +37979,8 @@ function registerVideoCommand(parent) {
|
|
|
37786
37979
|
"quality"
|
|
37787
37980
|
).option("--negative <prompt>", "Negative prompt - what to avoid (Kling/Veo)").option("--resolution <res>", "Video resolution: 720p, 1080p, 4k (Veo only)").option("--last-frame <path>", "Last frame image for frame interpolation (Veo only)").option(
|
|
37788
37981
|
"--ref-images <paths...>",
|
|
37789
|
-
"Reference images for
|
|
37790
|
-
).option("--person <mode>", "Person generation: allow_all, allow_adult (Veo only)").option("--veo-model <model>", "Veo model: 3.0, 3.1, 3.1-fast (default: 3.1-fast)", "3.1-fast").option(
|
|
37982
|
+
"Reference images for Seedance reference-to-video or Veo character consistency"
|
|
37983
|
+
).option("--ref-videos <paths...>", "Reference videos for Seedance reference-to-video").option("--ref-audio <paths...>", "Reference audio for Seedance reference-to-video").option("--no-generate-audio", "Disable native audio when the provider supports it").option("--person <mode>", "Person generation: allow_all, allow_adult (Veo only)").option("--veo-model <model>", "Veo model: 3.0, 3.1, 3.1-fast (default: 3.1-fast)", "3.1-fast").option(
|
|
37791
37984
|
"--runway-model <model>",
|
|
37792
37985
|
"Runway model: gen4.5 (default, text+image-to-video), gen4_turbo (image-to-video only)",
|
|
37793
37986
|
"gen4.5"
|
|
@@ -37930,7 +38123,11 @@ Examples:
|
|
|
37930
38123
|
negative: options.negative,
|
|
37931
38124
|
resolution: options.resolution,
|
|
37932
38125
|
veoModel: options.veoModel,
|
|
37933
|
-
seedanceModel: options.seedanceModel
|
|
38126
|
+
seedanceModel: options.seedanceModel,
|
|
38127
|
+
refImages: options.refImages,
|
|
38128
|
+
refVideos: options.refVideos,
|
|
38129
|
+
refAudio: options.refAudio,
|
|
38130
|
+
generateAudio: options.generateAudio
|
|
37934
38131
|
}
|
|
37935
38132
|
}
|
|
37936
38133
|
});
|
|
@@ -38217,8 +38414,13 @@ Examples:
|
|
|
38217
38414
|
} else if (provider === "seedance") {
|
|
38218
38415
|
const fal = new FalProvider();
|
|
38219
38416
|
await fal.initialize({ apiKey });
|
|
38417
|
+
const seedanceReferences = await prepareSeedanceReferences2({
|
|
38418
|
+
refImages: options.refImages,
|
|
38419
|
+
refVideos: options.refVideos,
|
|
38420
|
+
refAudio: options.refAudio
|
|
38421
|
+
});
|
|
38220
38422
|
let falImage = referenceImage;
|
|
38221
|
-
if (falImage && falImage.startsWith("data:")) {
|
|
38423
|
+
if (falImage && falImage.startsWith("data:") && seedanceReferences.length === 0) {
|
|
38222
38424
|
try {
|
|
38223
38425
|
const uploadHost = await resolveUploadHost();
|
|
38224
38426
|
spinner2.text = `Uploading image via ${uploadHost.provider} for Seedance...`;
|
|
@@ -38241,11 +38443,14 @@ Examples:
|
|
|
38241
38443
|
const falModel = seedanceModel === "fast" || seedanceModel === "seedance-2.0-fast" ? "seedance-2.0-fast" : "seedance-2.0";
|
|
38242
38444
|
result = await fal.generateVideo(prompt3, {
|
|
38243
38445
|
prompt: prompt3,
|
|
38244
|
-
referenceImage: falImage,
|
|
38446
|
+
referenceImage: seedanceReferences.length > 0 ? void 0 : falImage,
|
|
38447
|
+
references: seedanceReferences.length > 0 ? seedanceReferences : void 0,
|
|
38245
38448
|
duration: options.duration ? parseInt(options.duration) : void 0,
|
|
38246
38449
|
aspectRatio: options.ratio,
|
|
38247
38450
|
negativePrompt: options.negative,
|
|
38248
|
-
model: falModel
|
|
38451
|
+
model: falModel,
|
|
38452
|
+
resolution: options.resolution,
|
|
38453
|
+
generateAudio: options.generateAudio
|
|
38249
38454
|
});
|
|
38250
38455
|
finalResult = result;
|
|
38251
38456
|
}
|
|
@@ -38300,6 +38505,54 @@ Examples:
|
|
|
38300
38505
|
}
|
|
38301
38506
|
});
|
|
38302
38507
|
}
|
|
38508
|
+
async function prepareSeedanceReferences2(opts) {
|
|
38509
|
+
const references = [];
|
|
38510
|
+
for (const sourcePath of opts.refImages ?? []) {
|
|
38511
|
+
references.push({
|
|
38512
|
+
kind: "image",
|
|
38513
|
+
url: await fileInputToUrlOrDataUri2(sourcePath, "image/png"),
|
|
38514
|
+
sourcePath
|
|
38515
|
+
});
|
|
38516
|
+
}
|
|
38517
|
+
for (const sourcePath of opts.refVideos ?? []) {
|
|
38518
|
+
references.push({
|
|
38519
|
+
kind: "video",
|
|
38520
|
+
url: await fileInputToUrlOrDataUri2(sourcePath, "video/mp4"),
|
|
38521
|
+
sourcePath
|
|
38522
|
+
});
|
|
38523
|
+
}
|
|
38524
|
+
for (const sourcePath of opts.refAudio ?? []) {
|
|
38525
|
+
references.push({
|
|
38526
|
+
kind: "audio",
|
|
38527
|
+
url: await fileInputToUrlOrDataUri2(sourcePath, "audio/mpeg"),
|
|
38528
|
+
sourcePath
|
|
38529
|
+
});
|
|
38530
|
+
}
|
|
38531
|
+
return references;
|
|
38532
|
+
}
|
|
38533
|
+
async function fileInputToUrlOrDataUri2(input, fallbackMimeType) {
|
|
38534
|
+
if (input.startsWith("http://") || input.startsWith("https://") || input.startsWith("data:")) {
|
|
38535
|
+
return input;
|
|
38536
|
+
}
|
|
38537
|
+
const absPath = resolve31(process.cwd(), input);
|
|
38538
|
+
const buffer = await readFile18(absPath);
|
|
38539
|
+
return `data:${mimeTypeForPath2(input, fallbackMimeType)};base64,${buffer.toString("base64")}`;
|
|
38540
|
+
}
|
|
38541
|
+
function mimeTypeForPath2(path2, fallback2) {
|
|
38542
|
+
const ext = path2.toLowerCase().split(".").pop();
|
|
38543
|
+
const mimeTypes2 = {
|
|
38544
|
+
jpg: "image/jpeg",
|
|
38545
|
+
jpeg: "image/jpeg",
|
|
38546
|
+
png: "image/png",
|
|
38547
|
+
gif: "image/gif",
|
|
38548
|
+
webp: "image/webp",
|
|
38549
|
+
mp4: "video/mp4",
|
|
38550
|
+
mov: "video/quicktime",
|
|
38551
|
+
mp3: "audio/mpeg",
|
|
38552
|
+
wav: "audio/wav"
|
|
38553
|
+
};
|
|
38554
|
+
return mimeTypes2[ext || ""] || fallback2;
|
|
38555
|
+
}
|
|
38303
38556
|
async function recordVideoNoWaitJob(opts) {
|
|
38304
38557
|
return createAndWriteJobRecord({
|
|
38305
38558
|
jobType: "generate-video",
|
|
@@ -44634,7 +44887,7 @@ async function generateVideoWithRetryGrok(grok, segment, options, maxRetries, on
|
|
|
44634
44887
|
onProgress?.(
|
|
44635
44888
|
`\u26A0 ${providerErr.slice(0, 50)}... retry ${attempt + 1}/${maxRetries}`
|
|
44636
44889
|
);
|
|
44637
|
-
await
|
|
44890
|
+
await sleep2(RETRY_DELAY_MS);
|
|
44638
44891
|
} else {
|
|
44639
44892
|
console.error(source_default.dim(`
|
|
44640
44893
|
[Grok error: ${providerErr}]`));
|
|
@@ -44643,7 +44896,7 @@ async function generateVideoWithRetryGrok(grok, segment, options, maxRetries, on
|
|
|
44643
44896
|
const errMsg = err instanceof Error ? err.message : String(err);
|
|
44644
44897
|
if (attempt < maxRetries) {
|
|
44645
44898
|
onProgress?.(`\u26A0 Error: ${errMsg.slice(0, 50)}... retry ${attempt + 1}/${maxRetries}`);
|
|
44646
|
-
await
|
|
44899
|
+
await sleep2(RETRY_DELAY_MS);
|
|
44647
44900
|
} else {
|
|
44648
44901
|
console.error(source_default.dim(`
|
|
44649
44902
|
[Grok error: ${errMsg}]`));
|
|
@@ -44674,7 +44927,7 @@ async function generateVideoWithRetryKling(kling, segment, options, maxRetries,
|
|
|
44674
44927
|
const providerErr = result.error || "Kling returned failed status";
|
|
44675
44928
|
if (attempt < maxRetries) {
|
|
44676
44929
|
onProgress?.(`\u26A0 ${providerErr.slice(0, 50)}... retry ${attempt + 1}/${maxRetries}`);
|
|
44677
|
-
await
|
|
44930
|
+
await sleep2(RETRY_DELAY_MS);
|
|
44678
44931
|
} else {
|
|
44679
44932
|
console.error(source_default.dim(`
|
|
44680
44933
|
[Kling error: ${providerErr}]`));
|
|
@@ -44683,7 +44936,7 @@ async function generateVideoWithRetryKling(kling, segment, options, maxRetries,
|
|
|
44683
44936
|
const errMsg = err instanceof Error ? err.message : String(err);
|
|
44684
44937
|
if (attempt < maxRetries) {
|
|
44685
44938
|
onProgress?.(`\u26A0 Error: ${errMsg.slice(0, 50)}... retry ${attempt + 1}/${maxRetries}`);
|
|
44686
|
-
await
|
|
44939
|
+
await sleep2(RETRY_DELAY_MS);
|
|
44687
44940
|
} else {
|
|
44688
44941
|
console.error(source_default.dim(`
|
|
44689
44942
|
[Kling error: ${errMsg}]`));
|
|
@@ -44707,7 +44960,7 @@ async function generateVideoWithRetryRunway(runway, segment, referenceImage, opt
|
|
|
44707
44960
|
const providerErr = result.error || "Runway returned failed status";
|
|
44708
44961
|
if (attempt < maxRetries) {
|
|
44709
44962
|
onProgress?.(`\u26A0 ${providerErr.slice(0, 50)}... retry ${attempt + 1}/${maxRetries}`);
|
|
44710
|
-
await
|
|
44963
|
+
await sleep2(RETRY_DELAY_MS);
|
|
44711
44964
|
} else {
|
|
44712
44965
|
console.error(source_default.dim(`
|
|
44713
44966
|
[Runway error: ${providerErr}]`));
|
|
@@ -44716,7 +44969,7 @@ async function generateVideoWithRetryRunway(runway, segment, referenceImage, opt
|
|
|
44716
44969
|
const errMsg = err instanceof Error ? err.message : String(err);
|
|
44717
44970
|
if (attempt < maxRetries) {
|
|
44718
44971
|
onProgress?.(`\u26A0 Error: ${errMsg.slice(0, 50)}... retry ${attempt + 1}/${maxRetries}`);
|
|
44719
|
-
await
|
|
44972
|
+
await sleep2(RETRY_DELAY_MS);
|
|
44720
44973
|
} else {
|
|
44721
44974
|
console.error(source_default.dim(`
|
|
44722
44975
|
[Runway error: ${errMsg}]`));
|
|
@@ -44742,7 +44995,7 @@ async function generateVideoWithRetryVeo(gemini, segment, options, maxRetries, o
|
|
|
44742
44995
|
const providerErr = result.error || "Veo returned failed status";
|
|
44743
44996
|
if (attempt < maxRetries) {
|
|
44744
44997
|
onProgress?.(`\u26A0 ${providerErr.slice(0, 50)}... retry ${attempt + 1}/${maxRetries}`);
|
|
44745
|
-
await
|
|
44998
|
+
await sleep2(RETRY_DELAY_MS);
|
|
44746
44999
|
} else {
|
|
44747
45000
|
console.error(source_default.dim(`
|
|
44748
45001
|
[Veo error: ${providerErr}]`));
|
|
@@ -44751,7 +45004,7 @@ async function generateVideoWithRetryVeo(gemini, segment, options, maxRetries, o
|
|
|
44751
45004
|
const errMsg = err instanceof Error ? err.message : String(err);
|
|
44752
45005
|
if (attempt < maxRetries) {
|
|
44753
45006
|
onProgress?.(`\u26A0 Error: ${errMsg.slice(0, 50)}... retry ${attempt + 1}/${maxRetries}`);
|
|
44754
|
-
await
|
|
45007
|
+
await sleep2(RETRY_DELAY_MS);
|
|
44755
45008
|
} else {
|
|
44756
45009
|
console.error(source_default.dim(`
|
|
44757
45010
|
[Veo error: ${errMsg}]`));
|
|
@@ -59700,6 +59953,20 @@ var init_scene_render = __esm({
|
|
|
59700
59953
|
}
|
|
59701
59954
|
});
|
|
59702
59955
|
|
|
59956
|
+
// src/commands/_shared/scene-build-mode.ts
|
|
59957
|
+
function resolveSceneBuildMode(opts) {
|
|
59958
|
+
const env2 = process.env.VIBE_BUILD_MODE?.trim().toLowerCase();
|
|
59959
|
+
if (env2 === "agent" || env2 === "batch") return env2;
|
|
59960
|
+
if (opts.mode === "agent" || opts.mode === "batch") return opts.mode;
|
|
59961
|
+
return detectedAgentHosts().length > 0 ? "agent" : "batch";
|
|
59962
|
+
}
|
|
59963
|
+
var init_scene_build_mode = __esm({
|
|
59964
|
+
"src/commands/_shared/scene-build-mode.ts"() {
|
|
59965
|
+
"use strict";
|
|
59966
|
+
init_agent_host_detect();
|
|
59967
|
+
}
|
|
59968
|
+
});
|
|
59969
|
+
|
|
59703
59970
|
// src/commands/_shared/scene-build.ts
|
|
59704
59971
|
var scene_build_exports = {};
|
|
59705
59972
|
__export(scene_build_exports, {
|
|
@@ -61410,14 +61677,6 @@ function rootSyncBeatsFromOutcomes(beats, outcomes) {
|
|
|
61410
61677
|
};
|
|
61411
61678
|
});
|
|
61412
61679
|
}
|
|
61413
|
-
function resolveSceneBuildMode(opts) {
|
|
61414
|
-
const envOverride = process.env.VIBE_BUILD_MODE?.toLowerCase();
|
|
61415
|
-
if (envOverride === "agent" || envOverride === "batch") return envOverride;
|
|
61416
|
-
const requested = opts.mode ?? "auto";
|
|
61417
|
-
if (requested === "agent") return "agent";
|
|
61418
|
-
if (requested === "batch") return "batch";
|
|
61419
|
-
return detectedAgentHosts().length > 0 ? "agent" : "batch";
|
|
61420
|
-
}
|
|
61421
61680
|
async function resolveBeatDuration(opts) {
|
|
61422
61681
|
const storyboardMin = opts.beatDuration ?? 3;
|
|
61423
61682
|
if (!opts.narrationPath) return Number(storyboardMin.toFixed(2));
|
|
@@ -61437,7 +61696,6 @@ var init_scene_build = __esm({
|
|
|
61437
61696
|
init_audio();
|
|
61438
61697
|
init_compose_scenes_skills();
|
|
61439
61698
|
init_compose_prompts();
|
|
61440
|
-
init_agent_host_detect();
|
|
61441
61699
|
init_config();
|
|
61442
61700
|
init_scene_render();
|
|
61443
61701
|
init_storyboard_parse();
|
|
@@ -61453,6 +61711,8 @@ var init_scene_build = __esm({
|
|
|
61453
61711
|
init_status_jobs();
|
|
61454
61712
|
init_scene_repair();
|
|
61455
61713
|
init_tts_resolve();
|
|
61714
|
+
init_scene_build_mode();
|
|
61715
|
+
init_scene_build_mode();
|
|
61456
61716
|
}
|
|
61457
61717
|
});
|
|
61458
61718
|
|
|
@@ -62767,15 +63027,15 @@ var init_parseUtil = __esm({
|
|
|
62767
63027
|
message: issueData.message
|
|
62768
63028
|
};
|
|
62769
63029
|
}
|
|
62770
|
-
let
|
|
63030
|
+
let errorMessage2 = "";
|
|
62771
63031
|
const maps = errorMaps.filter((m) => !!m).slice().reverse();
|
|
62772
63032
|
for (const map of maps) {
|
|
62773
|
-
|
|
63033
|
+
errorMessage2 = map(fullIssue, { data, defaultError: errorMessage2 }).message;
|
|
62774
63034
|
}
|
|
62775
63035
|
return {
|
|
62776
63036
|
...issueData,
|
|
62777
63037
|
path: fullPath,
|
|
62778
|
-
message:
|
|
63038
|
+
message: errorMessage2
|
|
62779
63039
|
};
|
|
62780
63040
|
};
|
|
62781
63041
|
EMPTY_PATH = [];
|
|
@@ -68197,6 +68457,9 @@ var init_generate2 = __esm({
|
|
|
68197
68457
|
"Video provider (default: seedance when FAL_API_KEY is configured, otherwise first configured provider)"
|
|
68198
68458
|
),
|
|
68199
68459
|
image: external_exports.string().optional().describe("Reference image path for image-to-video"),
|
|
68460
|
+
refImages: external_exports.array(external_exports.string()).optional().describe("Reference images for Seedance reference-to-video"),
|
|
68461
|
+
refVideos: external_exports.array(external_exports.string()).optional().describe("Reference videos for Seedance reference-to-video"),
|
|
68462
|
+
refAudio: external_exports.array(external_exports.string()).optional().describe("Reference audio files for Seedance reference-to-video"),
|
|
68200
68463
|
duration: external_exports.number().optional().describe("Duration in seconds (default: 5; Seedance accepts 4-15)"),
|
|
68201
68464
|
ratio: external_exports.string().optional().describe("Aspect ratio: 16:9, 9:16, 1:1 (default: 16:9)"),
|
|
68202
68465
|
mode: external_exports.string().optional().describe("Kling mode: std or pro"),
|
|
@@ -68205,6 +68468,7 @@ var init_generate2 = __esm({
|
|
|
68205
68468
|
veoModel: external_exports.string().optional().describe("Veo model: 3.0, 3.1, 3.1-fast"),
|
|
68206
68469
|
runwayModel: external_exports.string().optional().describe("Runway model: gen4.5, gen4_turbo"),
|
|
68207
68470
|
seedanceModel: external_exports.string().optional().describe("Seedance variant: quality or fast (fal.ai only)"),
|
|
68471
|
+
generateAudio: external_exports.boolean().optional().describe("Generate native synchronized audio when supported"),
|
|
68208
68472
|
output: external_exports.string().optional().describe("Output file path (downloads video)"),
|
|
68209
68473
|
wait: external_exports.boolean().optional().describe("Wait for completion (default: true)")
|
|
68210
68474
|
}),
|
|
@@ -69415,10 +69679,10 @@ async function runExport(projectPath, outputPath, options = {}) {
|
|
|
69415
69679
|
outputPath: finalOutputPath
|
|
69416
69680
|
};
|
|
69417
69681
|
} catch (error) {
|
|
69418
|
-
const
|
|
69682
|
+
const errorMessage2 = error instanceof Error ? error.message : String(error);
|
|
69419
69683
|
return {
|
|
69420
69684
|
success: false,
|
|
69421
|
-
message: `Export failed: ${
|
|
69685
|
+
message: `Export failed: ${errorMessage2}`
|
|
69422
69686
|
};
|
|
69423
69687
|
}
|
|
69424
69688
|
}
|
|
@@ -71438,7 +71702,7 @@ init_source();
|
|
|
71438
71702
|
// package.json
|
|
71439
71703
|
var package_default = {
|
|
71440
71704
|
name: "@vibeframe/cli",
|
|
71441
|
-
version: "0.
|
|
71705
|
+
version: "0.105.2",
|
|
71442
71706
|
description: "VibeFrame CLI - natural language video editing from the terminal",
|
|
71443
71707
|
private: false,
|
|
71444
71708
|
license: "MIT",
|
|
@@ -71471,128 +71735,28 @@ var package_default = {
|
|
|
71471
71735
|
],
|
|
71472
71736
|
exports: {
|
|
71473
71737
|
".": {
|
|
71474
|
-
|
|
71475
|
-
|
|
71738
|
+
types: "./dist/index.d.ts",
|
|
71739
|
+
import: "./dist/index.js"
|
|
71476
71740
|
},
|
|
71477
71741
|
"./engine": {
|
|
71478
|
-
|
|
71479
|
-
|
|
71480
|
-
},
|
|
71481
|
-
"./agent": {
|
|
71482
|
-
import: "./src/agent/index.ts",
|
|
71483
|
-
types: "./src/agent/index.ts"
|
|
71742
|
+
types: "./dist/engine/index.d.ts",
|
|
71743
|
+
import: "./dist/engine/index.js"
|
|
71484
71744
|
},
|
|
71485
71745
|
"./tools/manifest": {
|
|
71486
|
-
|
|
71487
|
-
|
|
71746
|
+
types: "./dist/tools/manifest/index.d.ts",
|
|
71747
|
+
import: "./dist/tools/manifest/index.js"
|
|
71488
71748
|
},
|
|
71489
71749
|
"./tools/define-tool": {
|
|
71490
|
-
|
|
71491
|
-
|
|
71750
|
+
types: "./dist/tools/define-tool.d.ts",
|
|
71751
|
+
import: "./dist/tools/define-tool.js"
|
|
71492
71752
|
},
|
|
71493
71753
|
"./tools/adapters/mcp": {
|
|
71494
|
-
|
|
71495
|
-
|
|
71754
|
+
types: "./dist/tools/adapters/mcp.d.ts",
|
|
71755
|
+
import: "./dist/tools/adapters/mcp.js"
|
|
71496
71756
|
},
|
|
71497
71757
|
"./tools/adapters/agent": {
|
|
71498
|
-
|
|
71499
|
-
|
|
71500
|
-
},
|
|
71501
|
-
"./commands/export": {
|
|
71502
|
-
import: "./src/commands/export.ts",
|
|
71503
|
-
types: "./src/commands/export.ts"
|
|
71504
|
-
},
|
|
71505
|
-
"./commands/ai-edit": {
|
|
71506
|
-
import: "./src/commands/ai-edit.ts",
|
|
71507
|
-
types: "./src/commands/ai-edit.ts"
|
|
71508
|
-
},
|
|
71509
|
-
"./commands/ai-analyze": {
|
|
71510
|
-
import: "./src/commands/ai-analyze.ts",
|
|
71511
|
-
types: "./src/commands/ai-analyze.ts"
|
|
71512
|
-
},
|
|
71513
|
-
"./commands/ai-review": {
|
|
71514
|
-
import: "./src/commands/ai-review.ts",
|
|
71515
|
-
types: "./src/commands/ai-review.ts"
|
|
71516
|
-
},
|
|
71517
|
-
"./commands/ai-image": {
|
|
71518
|
-
import: "./src/commands/ai-image.ts",
|
|
71519
|
-
types: "./src/commands/ai-image.ts"
|
|
71520
|
-
},
|
|
71521
|
-
"./commands/ai-script-pipeline": {
|
|
71522
|
-
import: "./src/commands/ai-script-pipeline.ts",
|
|
71523
|
-
types: "./src/commands/ai-script-pipeline.ts"
|
|
71524
|
-
},
|
|
71525
|
-
"./commands/ai-highlights": {
|
|
71526
|
-
import: "./src/commands/ai-highlights.ts",
|
|
71527
|
-
types: "./src/commands/ai-highlights.ts"
|
|
71528
|
-
},
|
|
71529
|
-
"./commands/ai-narrate": {
|
|
71530
|
-
import: "./src/commands/ai-narrate.ts",
|
|
71531
|
-
types: "./src/commands/ai-narrate.ts"
|
|
71532
|
-
},
|
|
71533
|
-
"./commands/ai-motion": {
|
|
71534
|
-
import: "./src/commands/ai-motion.ts",
|
|
71535
|
-
types: "./src/commands/ai-motion.ts"
|
|
71536
|
-
},
|
|
71537
|
-
"./commands/ai-animated-caption": {
|
|
71538
|
-
import: "./src/commands/ai-animated-caption.ts",
|
|
71539
|
-
types: "./src/commands/ai-animated-caption.ts"
|
|
71540
|
-
},
|
|
71541
|
-
"./commands/detect": {
|
|
71542
|
-
import: "./src/commands/detect.ts",
|
|
71543
|
-
types: "./src/commands/detect.ts"
|
|
71544
|
-
},
|
|
71545
|
-
"./commands/generate": {
|
|
71546
|
-
import: "./src/commands/generate.ts",
|
|
71547
|
-
types: "./src/commands/generate.ts"
|
|
71548
|
-
},
|
|
71549
|
-
"./commands/ai-video": {
|
|
71550
|
-
import: "./src/commands/ai-video.ts",
|
|
71551
|
-
types: "./src/commands/ai-video.ts"
|
|
71552
|
-
},
|
|
71553
|
-
"./commands/ai-audio": {
|
|
71554
|
-
import: "./src/commands/ai-audio.ts",
|
|
71555
|
-
types: "./src/commands/ai-audio.ts"
|
|
71556
|
-
},
|
|
71557
|
-
"./commands/edit-cmd": {
|
|
71558
|
-
import: "./src/commands/edit-cmd.ts",
|
|
71559
|
-
types: "./src/commands/edit-cmd.ts"
|
|
71560
|
-
},
|
|
71561
|
-
"./commands/scene": {
|
|
71562
|
-
import: "./src/commands/scene.ts",
|
|
71563
|
-
types: "./src/commands/scene.ts"
|
|
71564
|
-
},
|
|
71565
|
-
"./commands/_shared/scene-project": {
|
|
71566
|
-
import: "./src/commands/_shared/scene-project.ts",
|
|
71567
|
-
types: "./src/commands/_shared/scene-project.ts"
|
|
71568
|
-
},
|
|
71569
|
-
"./commands/_shared/scene-lint": {
|
|
71570
|
-
import: "./src/commands/_shared/scene-lint.ts",
|
|
71571
|
-
types: "./src/commands/_shared/scene-lint.ts"
|
|
71572
|
-
},
|
|
71573
|
-
"./commands/_shared/scene-render": {
|
|
71574
|
-
import: "./src/commands/_shared/scene-render.ts",
|
|
71575
|
-
types: "./src/commands/_shared/scene-render.ts"
|
|
71576
|
-
},
|
|
71577
|
-
"./commands/_shared/scene-html-emit": {
|
|
71578
|
-
import: "./src/commands/_shared/scene-html-emit.ts",
|
|
71579
|
-
types: "./src/commands/_shared/scene-html-emit.ts"
|
|
71580
|
-
},
|
|
71581
|
-
"./commands/_shared/scene-build": {
|
|
71582
|
-
import: "./src/commands/_shared/scene-build.ts",
|
|
71583
|
-
types: "./src/commands/_shared/scene-build.ts"
|
|
71584
|
-
},
|
|
71585
|
-
"./commands/_shared/visual-styles": {
|
|
71586
|
-
import: "./src/commands/_shared/visual-styles.ts",
|
|
71587
|
-
types: "./src/commands/_shared/visual-styles.ts"
|
|
71588
|
-
},
|
|
71589
|
-
"./commands/ai-suggest-edit": {
|
|
71590
|
-
import: "./src/commands/ai-suggest-edit.ts",
|
|
71591
|
-
types: "./src/commands/ai-suggest-edit.ts"
|
|
71592
|
-
},
|
|
71593
|
-
"./pipeline": {
|
|
71594
|
-
import: "./src/pipeline/index.ts",
|
|
71595
|
-
types: "./src/pipeline/index.ts"
|
|
71758
|
+
types: "./dist/tools/adapters/agent.d.ts",
|
|
71759
|
+
import: "./dist/tools/adapters/agent.js"
|
|
71596
71760
|
}
|
|
71597
71761
|
},
|
|
71598
71762
|
scripts: {
|
|
@@ -79286,7 +79450,7 @@ async function runSetupWizard(fullSetup = false, scope = "user") {
|
|
|
79286
79450
|
const userStatus = scope === "user" ? await getUserConfigStatus() : null;
|
|
79287
79451
|
const displayPath2 = scope === "user" ? userStatus?.source === "legacy" ? userStatus.configPath : USER_CONFIG_PATH : getConfigPath(scope);
|
|
79288
79452
|
const cfgPath = displayPath2.replace(homedir5(), "~");
|
|
79289
|
-
const scopeNote = scope === "project" ? "applies to this project only \xB7 add .vibeframe/ to .gitignore" : "applies to every project for this user";
|
|
79453
|
+
const scopeNote = scope === "project" ? "applies to this project only \xB7 user config is ignored while this file exists \xB7 add .vibeframe/ to .gitignore" : "applies to every project for this user";
|
|
79290
79454
|
console.log(source_default.bold.magenta("VibeFrame Setup") + source_default.bold(` \u2014 ${scope} scope`));
|
|
79291
79455
|
console.log(source_default.dim(`${cfgPath} \xB7 ${scopeNote}`));
|
|
79292
79456
|
if (userStatus?.source === "legacy") {
|
|
@@ -82099,7 +82263,7 @@ init_api_key();
|
|
|
82099
82263
|
init_agent_host_detect();
|
|
82100
82264
|
init_composer_resolve();
|
|
82101
82265
|
init_cost_tier();
|
|
82102
|
-
|
|
82266
|
+
init_scene_build_mode();
|
|
82103
82267
|
init_output();
|
|
82104
82268
|
import { existsSync as existsSync48 } from "node:fs";
|
|
82105
82269
|
import { resolve as resolve66 } from "node:path";
|
|
@@ -82263,7 +82427,14 @@ async function runDiagnostics() {
|
|
|
82263
82427
|
const userConfig = await getUserConfigStatus();
|
|
82264
82428
|
const configExists = userConfig.configured;
|
|
82265
82429
|
const cwd = process.cwd();
|
|
82266
|
-
|
|
82430
|
+
let activeConfig = null;
|
|
82431
|
+
let configError;
|
|
82432
|
+
try {
|
|
82433
|
+
activeConfig = await loadConfig({ cwd });
|
|
82434
|
+
} catch (err) {
|
|
82435
|
+
if (!(err instanceof ConfigFileError)) throw err;
|
|
82436
|
+
configError = { path: err.path, message: err.message };
|
|
82437
|
+
}
|
|
82267
82438
|
const providers = {};
|
|
82268
82439
|
let readyCount = FREE_COMMANDS.length;
|
|
82269
82440
|
let totalCount = FREE_COMMANDS.length;
|
|
@@ -82312,7 +82483,11 @@ async function runDiagnostics() {
|
|
|
82312
82483
|
ok: ffmpegExists,
|
|
82313
82484
|
...ffmpegFilters ? { filters: ffmpegFilters } : {}
|
|
82314
82485
|
},
|
|
82315
|
-
config: {
|
|
82486
|
+
config: {
|
|
82487
|
+
path: userConfig.configPath,
|
|
82488
|
+
ok: (configExists || projectConfigExists) && !configError,
|
|
82489
|
+
...configError ? { error: configError } : {}
|
|
82490
|
+
},
|
|
82316
82491
|
...Object.keys(optionalTools).length > 0 ? { optionalTools } : {}
|
|
82317
82492
|
},
|
|
82318
82493
|
scope: {
|
|
@@ -82338,7 +82513,8 @@ async function runDiagnostics() {
|
|
|
82338
82513
|
composerEnvVar: composerEnv,
|
|
82339
82514
|
sceneProjectInCwd,
|
|
82340
82515
|
skillInstalled
|
|
82341
|
-
}
|
|
82516
|
+
},
|
|
82517
|
+
...configError ? { configError } : {}
|
|
82342
82518
|
},
|
|
82343
82519
|
providers,
|
|
82344
82520
|
readyCount,
|
|
@@ -82410,10 +82586,12 @@ function printReport(results, opts = { verbose: false }) {
|
|
|
82410
82586
|
const userActive = results.scope.activeScope === "user" && results.scope.user.configured;
|
|
82411
82587
|
const projectActive = results.scope.activeScope === "project";
|
|
82412
82588
|
const activeMark = source_default.cyan(" \u2190 active");
|
|
82589
|
+
const configErrorPath = results.scope.configError?.path;
|
|
82413
82590
|
if (results.scope.user.configured) {
|
|
82414
82591
|
const userPath = results.scope.user.source === "legacy" ? `${results.scope.user.configPath} ${source_default.dim(`(legacy; writes ${results.scope.user.writePath})`)}` : results.scope.user.configPath;
|
|
82592
|
+
const invalid = configErrorPath === results.scope.user.configPath;
|
|
82415
82593
|
console.log(
|
|
82416
|
-
` Cfg(user) ${source_default.green("OK")}
|
|
82594
|
+
` Cfg(user) ${invalid ? source_default.red("INVALID") : source_default.green("OK")} ${source_default.dim(userPath)}${userActive ? activeMark : ""}`
|
|
82417
82595
|
);
|
|
82418
82596
|
} else {
|
|
82419
82597
|
console.log(
|
|
@@ -82421,14 +82599,23 @@ function printReport(results, opts = { verbose: false }) {
|
|
|
82421
82599
|
);
|
|
82422
82600
|
}
|
|
82423
82601
|
if (results.scope.project.configFileExists) {
|
|
82602
|
+
const invalid = configErrorPath === results.scope.project.configPath;
|
|
82424
82603
|
console.log(
|
|
82425
|
-
` Cfg(proj) ${source_default.green("OK")}
|
|
82604
|
+
` Cfg(proj) ${invalid ? source_default.red("INVALID") : source_default.green("OK")} ${source_default.dim(results.scope.project.configPath)}${projectActive ? activeMark : ""}`
|
|
82426
82605
|
);
|
|
82606
|
+
if (projectActive) {
|
|
82607
|
+
console.log(
|
|
82608
|
+
` ${source_default.dim("project scope is isolated; user config is ignored while this file exists")}`
|
|
82609
|
+
);
|
|
82610
|
+
}
|
|
82427
82611
|
} else {
|
|
82428
82612
|
console.log(
|
|
82429
82613
|
` Cfg(proj) ${source_default.dim("none")} ${source_default.dim(`Run: vibe setup --scope project (cwd: ${results.scope.project.cwd})`)}`
|
|
82430
82614
|
);
|
|
82431
82615
|
}
|
|
82616
|
+
if (results.scope.configError) {
|
|
82617
|
+
console.log(` Cfg error ${source_default.red(results.scope.configError.message)}`);
|
|
82618
|
+
}
|
|
82432
82619
|
if (results.scope.project.initialized) {
|
|
82433
82620
|
const present = results.scope.project.files.filter((f) => f.exists).map((f) => f.path);
|
|
82434
82621
|
console.log(` Init ${source_default.green("OK")} ${source_default.dim(present.join(", "))}`);
|
|
@@ -82594,7 +82781,12 @@ async function runLiveKeyTests(results) {
|
|
|
82594
82781
|
return;
|
|
82595
82782
|
}
|
|
82596
82783
|
const { testKey: testKey2 } = await Promise.resolve().then(() => (init_key_live_test(), key_live_test_exports));
|
|
82597
|
-
|
|
82784
|
+
let activeConfig = null;
|
|
82785
|
+
try {
|
|
82786
|
+
activeConfig = await loadConfig({ cwd: process.cwd() });
|
|
82787
|
+
} catch (err) {
|
|
82788
|
+
if (!(err instanceof ConfigFileError)) throw err;
|
|
82789
|
+
}
|
|
82598
82790
|
for (const [name, info] of configured) {
|
|
82599
82791
|
const value = process.env[info.envVar] || PROVIDER_ENV_ALIASES[info.envVar]?.map((alias) => process.env[alias]).find(Boolean) || activeConfig?.providers[name];
|
|
82600
82792
|
if (!value) continue;
|
|
@@ -83290,12 +83482,12 @@ var ToolRegistry = class {
|
|
|
83290
83482
|
try {
|
|
83291
83483
|
return await tool.handler(args, context);
|
|
83292
83484
|
} catch (error) {
|
|
83293
|
-
const
|
|
83485
|
+
const errorMessage2 = error instanceof Error ? error.message : String(error);
|
|
83294
83486
|
return {
|
|
83295
83487
|
toolCallId: "",
|
|
83296
83488
|
success: false,
|
|
83297
83489
|
output: "",
|
|
83298
|
-
error:
|
|
83490
|
+
error: errorMessage2
|
|
83299
83491
|
};
|
|
83300
83492
|
}
|
|
83301
83493
|
}
|