@vibeframe/cli 0.105.1 → 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 +234 -258
- 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;
|
|
@@ -17295,7 +17325,7 @@ var init_FalProvider = __esm({
|
|
|
17295
17325
|
return {
|
|
17296
17326
|
id: "",
|
|
17297
17327
|
status: "failed",
|
|
17298
|
-
error:
|
|
17328
|
+
error: formatFalError(err)
|
|
17299
17329
|
};
|
|
17300
17330
|
}
|
|
17301
17331
|
}
|
|
@@ -17394,17 +17424,17 @@ var init_ReplicateProvider = __esm({
|
|
|
17394
17424
|
});
|
|
17395
17425
|
if (!response.ok) {
|
|
17396
17426
|
const errorText = await response.text();
|
|
17397
|
-
let
|
|
17427
|
+
let errorMessage2;
|
|
17398
17428
|
try {
|
|
17399
17429
|
const errorData = JSON.parse(errorText);
|
|
17400
|
-
|
|
17430
|
+
errorMessage2 = errorData.detail || errorData.error || errorText;
|
|
17401
17431
|
} catch {
|
|
17402
|
-
|
|
17432
|
+
errorMessage2 = errorText;
|
|
17403
17433
|
}
|
|
17404
17434
|
return {
|
|
17405
17435
|
id: "",
|
|
17406
17436
|
status: "failed",
|
|
17407
|
-
error: `API error (${response.status}): ${
|
|
17437
|
+
error: `API error (${response.status}): ${errorMessage2}`
|
|
17408
17438
|
};
|
|
17409
17439
|
}
|
|
17410
17440
|
const prediction = await response.json();
|
|
@@ -17467,17 +17497,17 @@ var init_ReplicateProvider = __esm({
|
|
|
17467
17497
|
});
|
|
17468
17498
|
if (!response.ok) {
|
|
17469
17499
|
const errorText = await response.text();
|
|
17470
|
-
let
|
|
17500
|
+
let errorMessage2;
|
|
17471
17501
|
try {
|
|
17472
17502
|
const errorData = JSON.parse(errorText);
|
|
17473
|
-
|
|
17503
|
+
errorMessage2 = errorData.detail || errorData.error || errorText;
|
|
17474
17504
|
} catch {
|
|
17475
|
-
|
|
17505
|
+
errorMessage2 = errorText;
|
|
17476
17506
|
}
|
|
17477
17507
|
return {
|
|
17478
17508
|
id: "",
|
|
17479
17509
|
status: "failed",
|
|
17480
|
-
error: `API error (${response.status}): ${
|
|
17510
|
+
error: `API error (${response.status}): ${errorMessage2}`
|
|
17481
17511
|
};
|
|
17482
17512
|
}
|
|
17483
17513
|
const prediction = await response.json();
|
|
@@ -17635,16 +17665,16 @@ var init_ReplicateProvider = __esm({
|
|
|
17635
17665
|
});
|
|
17636
17666
|
if (!response.ok) {
|
|
17637
17667
|
const errorText = await response.text();
|
|
17638
|
-
let
|
|
17668
|
+
let errorMessage2;
|
|
17639
17669
|
try {
|
|
17640
17670
|
const errorData = JSON.parse(errorText);
|
|
17641
|
-
|
|
17671
|
+
errorMessage2 = errorData.detail || errorData.error || errorText;
|
|
17642
17672
|
} catch {
|
|
17643
|
-
|
|
17673
|
+
errorMessage2 = errorText;
|
|
17644
17674
|
}
|
|
17645
17675
|
return {
|
|
17646
17676
|
success: false,
|
|
17647
|
-
error: `API error (${response.status}): ${
|
|
17677
|
+
error: `API error (${response.status}): ${errorMessage2}`
|
|
17648
17678
|
};
|
|
17649
17679
|
}
|
|
17650
17680
|
const prediction = await response.json();
|
|
@@ -17738,16 +17768,16 @@ var init_ReplicateProvider = __esm({
|
|
|
17738
17768
|
});
|
|
17739
17769
|
if (!response.ok) {
|
|
17740
17770
|
const errorText = await response.text();
|
|
17741
|
-
let
|
|
17771
|
+
let errorMessage2;
|
|
17742
17772
|
try {
|
|
17743
17773
|
const errorData = JSON.parse(errorText);
|
|
17744
|
-
|
|
17774
|
+
errorMessage2 = errorData.detail || errorData.error || errorText;
|
|
17745
17775
|
} catch {
|
|
17746
|
-
|
|
17776
|
+
errorMessage2 = errorText;
|
|
17747
17777
|
}
|
|
17748
17778
|
return {
|
|
17749
17779
|
success: false,
|
|
17750
|
-
error: `API error (${response.status}): ${
|
|
17780
|
+
error: `API error (${response.status}): ${errorMessage2}`
|
|
17751
17781
|
};
|
|
17752
17782
|
}
|
|
17753
17783
|
const prediction = await response.json();
|
|
@@ -17849,17 +17879,17 @@ var init_ReplicateProvider = __esm({
|
|
|
17849
17879
|
});
|
|
17850
17880
|
if (!response.ok) {
|
|
17851
17881
|
const errorText = await response.text();
|
|
17852
|
-
let
|
|
17882
|
+
let errorMessage2;
|
|
17853
17883
|
try {
|
|
17854
17884
|
const errorData = JSON.parse(errorText);
|
|
17855
|
-
|
|
17885
|
+
errorMessage2 = errorData.detail || errorData.error || errorText;
|
|
17856
17886
|
} catch {
|
|
17857
|
-
|
|
17887
|
+
errorMessage2 = errorText;
|
|
17858
17888
|
}
|
|
17859
17889
|
return {
|
|
17860
17890
|
id: "",
|
|
17861
17891
|
status: "failed",
|
|
17862
|
-
error: `API error (${response.status}): ${
|
|
17892
|
+
error: `API error (${response.status}): ${errorMessage2}`
|
|
17863
17893
|
};
|
|
17864
17894
|
}
|
|
17865
17895
|
const prediction = await response.json();
|
|
@@ -17922,17 +17952,17 @@ var init_ReplicateProvider = __esm({
|
|
|
17922
17952
|
});
|
|
17923
17953
|
if (!response.ok) {
|
|
17924
17954
|
const errorText = await response.text();
|
|
17925
|
-
let
|
|
17955
|
+
let errorMessage2;
|
|
17926
17956
|
try {
|
|
17927
17957
|
const errorData = JSON.parse(errorText);
|
|
17928
|
-
|
|
17958
|
+
errorMessage2 = errorData.detail || errorData.error || errorText;
|
|
17929
17959
|
} catch {
|
|
17930
|
-
|
|
17960
|
+
errorMessage2 = errorText;
|
|
17931
17961
|
}
|
|
17932
17962
|
return {
|
|
17933
17963
|
id: "",
|
|
17934
17964
|
status: "failed",
|
|
17935
|
-
error: `API error (${response.status}): ${
|
|
17965
|
+
error: `API error (${response.status}): ${errorMessage2}`
|
|
17936
17966
|
};
|
|
17937
17967
|
}
|
|
17938
17968
|
const prediction = await response.json();
|
|
@@ -25793,6 +25823,7 @@ var config_exports = {};
|
|
|
25793
25823
|
__export(config_exports, {
|
|
25794
25824
|
CONFIG_DIR: () => CONFIG_DIR,
|
|
25795
25825
|
CONFIG_PATH: () => CONFIG_PATH,
|
|
25826
|
+
ConfigFileError: () => ConfigFileError,
|
|
25796
25827
|
LEGACY_USER_CONFIG_DIR: () => LEGACY_USER_CONFIG_DIR,
|
|
25797
25828
|
LEGACY_USER_CONFIG_PATH: () => LEGACY_USER_CONFIG_PATH,
|
|
25798
25829
|
PROVIDER_ENV_ALIASES: () => PROVIDER_ENV_ALIASES,
|
|
@@ -25903,8 +25934,8 @@ async function readConfigFile(path2) {
|
|
|
25903
25934
|
const content = await readFile2(path2, "utf-8");
|
|
25904
25935
|
const parsed = (0, import_yaml.parse)(content);
|
|
25905
25936
|
return applyDefaults(parsed);
|
|
25906
|
-
} catch {
|
|
25907
|
-
|
|
25937
|
+
} catch (error) {
|
|
25938
|
+
throw new ConfigFileError(path2, error);
|
|
25908
25939
|
}
|
|
25909
25940
|
}
|
|
25910
25941
|
async function readUserConfigFile() {
|
|
@@ -25984,7 +26015,7 @@ async function updateProviderKey(providerKey, apiKey, options = {}) {
|
|
|
25984
26015
|
config2.providers[providerKey] = apiKey;
|
|
25985
26016
|
await saveConfig(config2, { scope, cwd: options.cwd });
|
|
25986
26017
|
}
|
|
25987
|
-
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;
|
|
25988
26019
|
var init_config = __esm({
|
|
25989
26020
|
"src/config/index.ts"() {
|
|
25990
26021
|
"use strict";
|
|
@@ -26003,6 +26034,16 @@ var init_config = __esm({
|
|
|
26003
26034
|
LEGACY_USER_CONFIG_PATH = resolve4(LEGACY_USER_CONFIG_DIR, "config.yaml");
|
|
26004
26035
|
CONFIG_DIR = USER_CONFIG_DIR;
|
|
26005
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
|
+
};
|
|
26006
26047
|
}
|
|
26007
26048
|
});
|
|
26008
26049
|
|
|
@@ -33590,7 +33631,7 @@ var init_speech = __esm({
|
|
|
33590
33631
|
// src/commands/_shared/video-utils.ts
|
|
33591
33632
|
import { writeFile as writeFile19, unlink, rename } from "node:fs/promises";
|
|
33592
33633
|
import { resolve as resolve22, basename as basename4 } from "node:path";
|
|
33593
|
-
function
|
|
33634
|
+
function sleep2(ms) {
|
|
33594
33635
|
return new Promise((resolve81) => setTimeout(resolve81, ms));
|
|
33595
33636
|
}
|
|
33596
33637
|
async function uploadToImgbb(imageBuffer, apiKey) {
|
|
@@ -34811,7 +34852,7 @@ async function refreshMusicStatus(taskId, wait) {
|
|
|
34811
34852
|
let result = await executeMusicStatus({ taskId });
|
|
34812
34853
|
if (!wait) return result;
|
|
34813
34854
|
for (let i = 0; i < 120 && result.success && result.status === "processing"; i++) {
|
|
34814
|
-
await
|
|
34855
|
+
await sleep3(5e3);
|
|
34815
34856
|
result = await executeMusicStatus({ taskId });
|
|
34816
34857
|
}
|
|
34817
34858
|
return result;
|
|
@@ -35229,7 +35270,7 @@ function unique(items) {
|
|
|
35229
35270
|
...new Set(items.filter((item) => typeof item === "string" && item.length > 0))
|
|
35230
35271
|
];
|
|
35231
35272
|
}
|
|
35232
|
-
function
|
|
35273
|
+
function sleep3(ms) {
|
|
35233
35274
|
return new Promise((resolve81) => setTimeout(resolve81, ms));
|
|
35234
35275
|
}
|
|
35235
35276
|
var init_status_jobs = __esm({
|
|
@@ -44846,7 +44887,7 @@ async function generateVideoWithRetryGrok(grok, segment, options, maxRetries, on
|
|
|
44846
44887
|
onProgress?.(
|
|
44847
44888
|
`\u26A0 ${providerErr.slice(0, 50)}... retry ${attempt + 1}/${maxRetries}`
|
|
44848
44889
|
);
|
|
44849
|
-
await
|
|
44890
|
+
await sleep2(RETRY_DELAY_MS);
|
|
44850
44891
|
} else {
|
|
44851
44892
|
console.error(source_default.dim(`
|
|
44852
44893
|
[Grok error: ${providerErr}]`));
|
|
@@ -44855,7 +44896,7 @@ async function generateVideoWithRetryGrok(grok, segment, options, maxRetries, on
|
|
|
44855
44896
|
const errMsg = err instanceof Error ? err.message : String(err);
|
|
44856
44897
|
if (attempt < maxRetries) {
|
|
44857
44898
|
onProgress?.(`\u26A0 Error: ${errMsg.slice(0, 50)}... retry ${attempt + 1}/${maxRetries}`);
|
|
44858
|
-
await
|
|
44899
|
+
await sleep2(RETRY_DELAY_MS);
|
|
44859
44900
|
} else {
|
|
44860
44901
|
console.error(source_default.dim(`
|
|
44861
44902
|
[Grok error: ${errMsg}]`));
|
|
@@ -44886,7 +44927,7 @@ async function generateVideoWithRetryKling(kling, segment, options, maxRetries,
|
|
|
44886
44927
|
const providerErr = result.error || "Kling returned failed status";
|
|
44887
44928
|
if (attempt < maxRetries) {
|
|
44888
44929
|
onProgress?.(`\u26A0 ${providerErr.slice(0, 50)}... retry ${attempt + 1}/${maxRetries}`);
|
|
44889
|
-
await
|
|
44930
|
+
await sleep2(RETRY_DELAY_MS);
|
|
44890
44931
|
} else {
|
|
44891
44932
|
console.error(source_default.dim(`
|
|
44892
44933
|
[Kling error: ${providerErr}]`));
|
|
@@ -44895,7 +44936,7 @@ async function generateVideoWithRetryKling(kling, segment, options, maxRetries,
|
|
|
44895
44936
|
const errMsg = err instanceof Error ? err.message : String(err);
|
|
44896
44937
|
if (attempt < maxRetries) {
|
|
44897
44938
|
onProgress?.(`\u26A0 Error: ${errMsg.slice(0, 50)}... retry ${attempt + 1}/${maxRetries}`);
|
|
44898
|
-
await
|
|
44939
|
+
await sleep2(RETRY_DELAY_MS);
|
|
44899
44940
|
} else {
|
|
44900
44941
|
console.error(source_default.dim(`
|
|
44901
44942
|
[Kling error: ${errMsg}]`));
|
|
@@ -44919,7 +44960,7 @@ async function generateVideoWithRetryRunway(runway, segment, referenceImage, opt
|
|
|
44919
44960
|
const providerErr = result.error || "Runway returned failed status";
|
|
44920
44961
|
if (attempt < maxRetries) {
|
|
44921
44962
|
onProgress?.(`\u26A0 ${providerErr.slice(0, 50)}... retry ${attempt + 1}/${maxRetries}`);
|
|
44922
|
-
await
|
|
44963
|
+
await sleep2(RETRY_DELAY_MS);
|
|
44923
44964
|
} else {
|
|
44924
44965
|
console.error(source_default.dim(`
|
|
44925
44966
|
[Runway error: ${providerErr}]`));
|
|
@@ -44928,7 +44969,7 @@ async function generateVideoWithRetryRunway(runway, segment, referenceImage, opt
|
|
|
44928
44969
|
const errMsg = err instanceof Error ? err.message : String(err);
|
|
44929
44970
|
if (attempt < maxRetries) {
|
|
44930
44971
|
onProgress?.(`\u26A0 Error: ${errMsg.slice(0, 50)}... retry ${attempt + 1}/${maxRetries}`);
|
|
44931
|
-
await
|
|
44972
|
+
await sleep2(RETRY_DELAY_MS);
|
|
44932
44973
|
} else {
|
|
44933
44974
|
console.error(source_default.dim(`
|
|
44934
44975
|
[Runway error: ${errMsg}]`));
|
|
@@ -44954,7 +44995,7 @@ async function generateVideoWithRetryVeo(gemini, segment, options, maxRetries, o
|
|
|
44954
44995
|
const providerErr = result.error || "Veo returned failed status";
|
|
44955
44996
|
if (attempt < maxRetries) {
|
|
44956
44997
|
onProgress?.(`\u26A0 ${providerErr.slice(0, 50)}... retry ${attempt + 1}/${maxRetries}`);
|
|
44957
|
-
await
|
|
44998
|
+
await sleep2(RETRY_DELAY_MS);
|
|
44958
44999
|
} else {
|
|
44959
45000
|
console.error(source_default.dim(`
|
|
44960
45001
|
[Veo error: ${providerErr}]`));
|
|
@@ -44963,7 +45004,7 @@ async function generateVideoWithRetryVeo(gemini, segment, options, maxRetries, o
|
|
|
44963
45004
|
const errMsg = err instanceof Error ? err.message : String(err);
|
|
44964
45005
|
if (attempt < maxRetries) {
|
|
44965
45006
|
onProgress?.(`\u26A0 Error: ${errMsg.slice(0, 50)}... retry ${attempt + 1}/${maxRetries}`);
|
|
44966
|
-
await
|
|
45007
|
+
await sleep2(RETRY_DELAY_MS);
|
|
44967
45008
|
} else {
|
|
44968
45009
|
console.error(source_default.dim(`
|
|
44969
45010
|
[Veo error: ${errMsg}]`));
|
|
@@ -59912,6 +59953,20 @@ var init_scene_render = __esm({
|
|
|
59912
59953
|
}
|
|
59913
59954
|
});
|
|
59914
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
|
+
|
|
59915
59970
|
// src/commands/_shared/scene-build.ts
|
|
59916
59971
|
var scene_build_exports = {};
|
|
59917
59972
|
__export(scene_build_exports, {
|
|
@@ -61622,14 +61677,6 @@ function rootSyncBeatsFromOutcomes(beats, outcomes) {
|
|
|
61622
61677
|
};
|
|
61623
61678
|
});
|
|
61624
61679
|
}
|
|
61625
|
-
function resolveSceneBuildMode(opts) {
|
|
61626
|
-
const envOverride = process.env.VIBE_BUILD_MODE?.toLowerCase();
|
|
61627
|
-
if (envOverride === "agent" || envOverride === "batch") return envOverride;
|
|
61628
|
-
const requested = opts.mode ?? "auto";
|
|
61629
|
-
if (requested === "agent") return "agent";
|
|
61630
|
-
if (requested === "batch") return "batch";
|
|
61631
|
-
return detectedAgentHosts().length > 0 ? "agent" : "batch";
|
|
61632
|
-
}
|
|
61633
61680
|
async function resolveBeatDuration(opts) {
|
|
61634
61681
|
const storyboardMin = opts.beatDuration ?? 3;
|
|
61635
61682
|
if (!opts.narrationPath) return Number(storyboardMin.toFixed(2));
|
|
@@ -61649,7 +61696,6 @@ var init_scene_build = __esm({
|
|
|
61649
61696
|
init_audio();
|
|
61650
61697
|
init_compose_scenes_skills();
|
|
61651
61698
|
init_compose_prompts();
|
|
61652
|
-
init_agent_host_detect();
|
|
61653
61699
|
init_config();
|
|
61654
61700
|
init_scene_render();
|
|
61655
61701
|
init_storyboard_parse();
|
|
@@ -61665,6 +61711,8 @@ var init_scene_build = __esm({
|
|
|
61665
61711
|
init_status_jobs();
|
|
61666
61712
|
init_scene_repair();
|
|
61667
61713
|
init_tts_resolve();
|
|
61714
|
+
init_scene_build_mode();
|
|
61715
|
+
init_scene_build_mode();
|
|
61668
61716
|
}
|
|
61669
61717
|
});
|
|
61670
61718
|
|
|
@@ -62979,15 +63027,15 @@ var init_parseUtil = __esm({
|
|
|
62979
63027
|
message: issueData.message
|
|
62980
63028
|
};
|
|
62981
63029
|
}
|
|
62982
|
-
let
|
|
63030
|
+
let errorMessage2 = "";
|
|
62983
63031
|
const maps = errorMaps.filter((m) => !!m).slice().reverse();
|
|
62984
63032
|
for (const map of maps) {
|
|
62985
|
-
|
|
63033
|
+
errorMessage2 = map(fullIssue, { data, defaultError: errorMessage2 }).message;
|
|
62986
63034
|
}
|
|
62987
63035
|
return {
|
|
62988
63036
|
...issueData,
|
|
62989
63037
|
path: fullPath,
|
|
62990
|
-
message:
|
|
63038
|
+
message: errorMessage2
|
|
62991
63039
|
};
|
|
62992
63040
|
};
|
|
62993
63041
|
EMPTY_PATH = [];
|
|
@@ -69631,10 +69679,10 @@ async function runExport(projectPath, outputPath, options = {}) {
|
|
|
69631
69679
|
outputPath: finalOutputPath
|
|
69632
69680
|
};
|
|
69633
69681
|
} catch (error) {
|
|
69634
|
-
const
|
|
69682
|
+
const errorMessage2 = error instanceof Error ? error.message : String(error);
|
|
69635
69683
|
return {
|
|
69636
69684
|
success: false,
|
|
69637
|
-
message: `Export failed: ${
|
|
69685
|
+
message: `Export failed: ${errorMessage2}`
|
|
69638
69686
|
};
|
|
69639
69687
|
}
|
|
69640
69688
|
}
|
|
@@ -71654,7 +71702,7 @@ init_source();
|
|
|
71654
71702
|
// package.json
|
|
71655
71703
|
var package_default = {
|
|
71656
71704
|
name: "@vibeframe/cli",
|
|
71657
|
-
version: "0.105.
|
|
71705
|
+
version: "0.105.2",
|
|
71658
71706
|
description: "VibeFrame CLI - natural language video editing from the terminal",
|
|
71659
71707
|
private: false,
|
|
71660
71708
|
license: "MIT",
|
|
@@ -71687,128 +71735,28 @@ var package_default = {
|
|
|
71687
71735
|
],
|
|
71688
71736
|
exports: {
|
|
71689
71737
|
".": {
|
|
71690
|
-
|
|
71691
|
-
|
|
71738
|
+
types: "./dist/index.d.ts",
|
|
71739
|
+
import: "./dist/index.js"
|
|
71692
71740
|
},
|
|
71693
71741
|
"./engine": {
|
|
71694
|
-
|
|
71695
|
-
|
|
71696
|
-
},
|
|
71697
|
-
"./agent": {
|
|
71698
|
-
import: "./src/agent/index.ts",
|
|
71699
|
-
types: "./src/agent/index.ts"
|
|
71742
|
+
types: "./dist/engine/index.d.ts",
|
|
71743
|
+
import: "./dist/engine/index.js"
|
|
71700
71744
|
},
|
|
71701
71745
|
"./tools/manifest": {
|
|
71702
|
-
|
|
71703
|
-
|
|
71746
|
+
types: "./dist/tools/manifest/index.d.ts",
|
|
71747
|
+
import: "./dist/tools/manifest/index.js"
|
|
71704
71748
|
},
|
|
71705
71749
|
"./tools/define-tool": {
|
|
71706
|
-
|
|
71707
|
-
|
|
71750
|
+
types: "./dist/tools/define-tool.d.ts",
|
|
71751
|
+
import: "./dist/tools/define-tool.js"
|
|
71708
71752
|
},
|
|
71709
71753
|
"./tools/adapters/mcp": {
|
|
71710
|
-
|
|
71711
|
-
|
|
71754
|
+
types: "./dist/tools/adapters/mcp.d.ts",
|
|
71755
|
+
import: "./dist/tools/adapters/mcp.js"
|
|
71712
71756
|
},
|
|
71713
71757
|
"./tools/adapters/agent": {
|
|
71714
|
-
|
|
71715
|
-
|
|
71716
|
-
},
|
|
71717
|
-
"./commands/export": {
|
|
71718
|
-
import: "./src/commands/export.ts",
|
|
71719
|
-
types: "./src/commands/export.ts"
|
|
71720
|
-
},
|
|
71721
|
-
"./commands/ai-edit": {
|
|
71722
|
-
import: "./src/commands/ai-edit.ts",
|
|
71723
|
-
types: "./src/commands/ai-edit.ts"
|
|
71724
|
-
},
|
|
71725
|
-
"./commands/ai-analyze": {
|
|
71726
|
-
import: "./src/commands/ai-analyze.ts",
|
|
71727
|
-
types: "./src/commands/ai-analyze.ts"
|
|
71728
|
-
},
|
|
71729
|
-
"./commands/ai-review": {
|
|
71730
|
-
import: "./src/commands/ai-review.ts",
|
|
71731
|
-
types: "./src/commands/ai-review.ts"
|
|
71732
|
-
},
|
|
71733
|
-
"./commands/ai-image": {
|
|
71734
|
-
import: "./src/commands/ai-image.ts",
|
|
71735
|
-
types: "./src/commands/ai-image.ts"
|
|
71736
|
-
},
|
|
71737
|
-
"./commands/ai-script-pipeline": {
|
|
71738
|
-
import: "./src/commands/ai-script-pipeline.ts",
|
|
71739
|
-
types: "./src/commands/ai-script-pipeline.ts"
|
|
71740
|
-
},
|
|
71741
|
-
"./commands/ai-highlights": {
|
|
71742
|
-
import: "./src/commands/ai-highlights.ts",
|
|
71743
|
-
types: "./src/commands/ai-highlights.ts"
|
|
71744
|
-
},
|
|
71745
|
-
"./commands/ai-narrate": {
|
|
71746
|
-
import: "./src/commands/ai-narrate.ts",
|
|
71747
|
-
types: "./src/commands/ai-narrate.ts"
|
|
71748
|
-
},
|
|
71749
|
-
"./commands/ai-motion": {
|
|
71750
|
-
import: "./src/commands/ai-motion.ts",
|
|
71751
|
-
types: "./src/commands/ai-motion.ts"
|
|
71752
|
-
},
|
|
71753
|
-
"./commands/ai-animated-caption": {
|
|
71754
|
-
import: "./src/commands/ai-animated-caption.ts",
|
|
71755
|
-
types: "./src/commands/ai-animated-caption.ts"
|
|
71756
|
-
},
|
|
71757
|
-
"./commands/detect": {
|
|
71758
|
-
import: "./src/commands/detect.ts",
|
|
71759
|
-
types: "./src/commands/detect.ts"
|
|
71760
|
-
},
|
|
71761
|
-
"./commands/generate": {
|
|
71762
|
-
import: "./src/commands/generate.ts",
|
|
71763
|
-
types: "./src/commands/generate.ts"
|
|
71764
|
-
},
|
|
71765
|
-
"./commands/ai-video": {
|
|
71766
|
-
import: "./src/commands/ai-video.ts",
|
|
71767
|
-
types: "./src/commands/ai-video.ts"
|
|
71768
|
-
},
|
|
71769
|
-
"./commands/ai-audio": {
|
|
71770
|
-
import: "./src/commands/ai-audio.ts",
|
|
71771
|
-
types: "./src/commands/ai-audio.ts"
|
|
71772
|
-
},
|
|
71773
|
-
"./commands/edit-cmd": {
|
|
71774
|
-
import: "./src/commands/edit-cmd.ts",
|
|
71775
|
-
types: "./src/commands/edit-cmd.ts"
|
|
71776
|
-
},
|
|
71777
|
-
"./commands/scene": {
|
|
71778
|
-
import: "./src/commands/scene.ts",
|
|
71779
|
-
types: "./src/commands/scene.ts"
|
|
71780
|
-
},
|
|
71781
|
-
"./commands/_shared/scene-project": {
|
|
71782
|
-
import: "./src/commands/_shared/scene-project.ts",
|
|
71783
|
-
types: "./src/commands/_shared/scene-project.ts"
|
|
71784
|
-
},
|
|
71785
|
-
"./commands/_shared/scene-lint": {
|
|
71786
|
-
import: "./src/commands/_shared/scene-lint.ts",
|
|
71787
|
-
types: "./src/commands/_shared/scene-lint.ts"
|
|
71788
|
-
},
|
|
71789
|
-
"./commands/_shared/scene-render": {
|
|
71790
|
-
import: "./src/commands/_shared/scene-render.ts",
|
|
71791
|
-
types: "./src/commands/_shared/scene-render.ts"
|
|
71792
|
-
},
|
|
71793
|
-
"./commands/_shared/scene-html-emit": {
|
|
71794
|
-
import: "./src/commands/_shared/scene-html-emit.ts",
|
|
71795
|
-
types: "./src/commands/_shared/scene-html-emit.ts"
|
|
71796
|
-
},
|
|
71797
|
-
"./commands/_shared/scene-build": {
|
|
71798
|
-
import: "./src/commands/_shared/scene-build.ts",
|
|
71799
|
-
types: "./src/commands/_shared/scene-build.ts"
|
|
71800
|
-
},
|
|
71801
|
-
"./commands/_shared/visual-styles": {
|
|
71802
|
-
import: "./src/commands/_shared/visual-styles.ts",
|
|
71803
|
-
types: "./src/commands/_shared/visual-styles.ts"
|
|
71804
|
-
},
|
|
71805
|
-
"./commands/ai-suggest-edit": {
|
|
71806
|
-
import: "./src/commands/ai-suggest-edit.ts",
|
|
71807
|
-
types: "./src/commands/ai-suggest-edit.ts"
|
|
71808
|
-
},
|
|
71809
|
-
"./pipeline": {
|
|
71810
|
-
import: "./src/pipeline/index.ts",
|
|
71811
|
-
types: "./src/pipeline/index.ts"
|
|
71758
|
+
types: "./dist/tools/adapters/agent.d.ts",
|
|
71759
|
+
import: "./dist/tools/adapters/agent.js"
|
|
71812
71760
|
}
|
|
71813
71761
|
},
|
|
71814
71762
|
scripts: {
|
|
@@ -79502,7 +79450,7 @@ async function runSetupWizard(fullSetup = false, scope = "user") {
|
|
|
79502
79450
|
const userStatus = scope === "user" ? await getUserConfigStatus() : null;
|
|
79503
79451
|
const displayPath2 = scope === "user" ? userStatus?.source === "legacy" ? userStatus.configPath : USER_CONFIG_PATH : getConfigPath(scope);
|
|
79504
79452
|
const cfgPath = displayPath2.replace(homedir5(), "~");
|
|
79505
|
-
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";
|
|
79506
79454
|
console.log(source_default.bold.magenta("VibeFrame Setup") + source_default.bold(` \u2014 ${scope} scope`));
|
|
79507
79455
|
console.log(source_default.dim(`${cfgPath} \xB7 ${scopeNote}`));
|
|
79508
79456
|
if (userStatus?.source === "legacy") {
|
|
@@ -82315,7 +82263,7 @@ init_api_key();
|
|
|
82315
82263
|
init_agent_host_detect();
|
|
82316
82264
|
init_composer_resolve();
|
|
82317
82265
|
init_cost_tier();
|
|
82318
|
-
|
|
82266
|
+
init_scene_build_mode();
|
|
82319
82267
|
init_output();
|
|
82320
82268
|
import { existsSync as existsSync48 } from "node:fs";
|
|
82321
82269
|
import { resolve as resolve66 } from "node:path";
|
|
@@ -82479,7 +82427,14 @@ async function runDiagnostics() {
|
|
|
82479
82427
|
const userConfig = await getUserConfigStatus();
|
|
82480
82428
|
const configExists = userConfig.configured;
|
|
82481
82429
|
const cwd = process.cwd();
|
|
82482
|
-
|
|
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
|
+
}
|
|
82483
82438
|
const providers = {};
|
|
82484
82439
|
let readyCount = FREE_COMMANDS.length;
|
|
82485
82440
|
let totalCount = FREE_COMMANDS.length;
|
|
@@ -82528,7 +82483,11 @@ async function runDiagnostics() {
|
|
|
82528
82483
|
ok: ffmpegExists,
|
|
82529
82484
|
...ffmpegFilters ? { filters: ffmpegFilters } : {}
|
|
82530
82485
|
},
|
|
82531
|
-
config: {
|
|
82486
|
+
config: {
|
|
82487
|
+
path: userConfig.configPath,
|
|
82488
|
+
ok: (configExists || projectConfigExists) && !configError,
|
|
82489
|
+
...configError ? { error: configError } : {}
|
|
82490
|
+
},
|
|
82532
82491
|
...Object.keys(optionalTools).length > 0 ? { optionalTools } : {}
|
|
82533
82492
|
},
|
|
82534
82493
|
scope: {
|
|
@@ -82554,7 +82513,8 @@ async function runDiagnostics() {
|
|
|
82554
82513
|
composerEnvVar: composerEnv,
|
|
82555
82514
|
sceneProjectInCwd,
|
|
82556
82515
|
skillInstalled
|
|
82557
|
-
}
|
|
82516
|
+
},
|
|
82517
|
+
...configError ? { configError } : {}
|
|
82558
82518
|
},
|
|
82559
82519
|
providers,
|
|
82560
82520
|
readyCount,
|
|
@@ -82626,10 +82586,12 @@ function printReport(results, opts = { verbose: false }) {
|
|
|
82626
82586
|
const userActive = results.scope.activeScope === "user" && results.scope.user.configured;
|
|
82627
82587
|
const projectActive = results.scope.activeScope === "project";
|
|
82628
82588
|
const activeMark = source_default.cyan(" \u2190 active");
|
|
82589
|
+
const configErrorPath = results.scope.configError?.path;
|
|
82629
82590
|
if (results.scope.user.configured) {
|
|
82630
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;
|
|
82631
82593
|
console.log(
|
|
82632
|
-
` Cfg(user) ${source_default.green("OK")}
|
|
82594
|
+
` Cfg(user) ${invalid ? source_default.red("INVALID") : source_default.green("OK")} ${source_default.dim(userPath)}${userActive ? activeMark : ""}`
|
|
82633
82595
|
);
|
|
82634
82596
|
} else {
|
|
82635
82597
|
console.log(
|
|
@@ -82637,14 +82599,23 @@ function printReport(results, opts = { verbose: false }) {
|
|
|
82637
82599
|
);
|
|
82638
82600
|
}
|
|
82639
82601
|
if (results.scope.project.configFileExists) {
|
|
82602
|
+
const invalid = configErrorPath === results.scope.project.configPath;
|
|
82640
82603
|
console.log(
|
|
82641
|
-
` 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 : ""}`
|
|
82642
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
|
+
}
|
|
82643
82611
|
} else {
|
|
82644
82612
|
console.log(
|
|
82645
82613
|
` Cfg(proj) ${source_default.dim("none")} ${source_default.dim(`Run: vibe setup --scope project (cwd: ${results.scope.project.cwd})`)}`
|
|
82646
82614
|
);
|
|
82647
82615
|
}
|
|
82616
|
+
if (results.scope.configError) {
|
|
82617
|
+
console.log(` Cfg error ${source_default.red(results.scope.configError.message)}`);
|
|
82618
|
+
}
|
|
82648
82619
|
if (results.scope.project.initialized) {
|
|
82649
82620
|
const present = results.scope.project.files.filter((f) => f.exists).map((f) => f.path);
|
|
82650
82621
|
console.log(` Init ${source_default.green("OK")} ${source_default.dim(present.join(", "))}`);
|
|
@@ -82810,7 +82781,12 @@ async function runLiveKeyTests(results) {
|
|
|
82810
82781
|
return;
|
|
82811
82782
|
}
|
|
82812
82783
|
const { testKey: testKey2 } = await Promise.resolve().then(() => (init_key_live_test(), key_live_test_exports));
|
|
82813
|
-
|
|
82784
|
+
let activeConfig = null;
|
|
82785
|
+
try {
|
|
82786
|
+
activeConfig = await loadConfig({ cwd: process.cwd() });
|
|
82787
|
+
} catch (err) {
|
|
82788
|
+
if (!(err instanceof ConfigFileError)) throw err;
|
|
82789
|
+
}
|
|
82814
82790
|
for (const [name, info] of configured) {
|
|
82815
82791
|
const value = process.env[info.envVar] || PROVIDER_ENV_ALIASES[info.envVar]?.map((alias) => process.env[alias]).find(Boolean) || activeConfig?.providers[name];
|
|
82816
82792
|
if (!value) continue;
|
|
@@ -83506,12 +83482,12 @@ var ToolRegistry = class {
|
|
|
83506
83482
|
try {
|
|
83507
83483
|
return await tool.handler(args, context);
|
|
83508
83484
|
} catch (error) {
|
|
83509
|
-
const
|
|
83485
|
+
const errorMessage2 = error instanceof Error ? error.message : String(error);
|
|
83510
83486
|
return {
|
|
83511
83487
|
toolCallId: "",
|
|
83512
83488
|
success: false,
|
|
83513
83489
|
output: "",
|
|
83514
|
-
error:
|
|
83490
|
+
error: errorMessage2
|
|
83515
83491
|
};
|
|
83516
83492
|
}
|
|
83517
83493
|
}
|