@vibeframe/mcp-server 0.41.0 → 0.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +122 -82
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -6397,6 +6397,87 @@ var init_dist = __esm({
|
|
|
6397
6397
|
}
|
|
6398
6398
|
});
|
|
6399
6399
|
|
|
6400
|
+
// ../cli/src/config/schema.ts
|
|
6401
|
+
function createDefaultConfig() {
|
|
6402
|
+
return {
|
|
6403
|
+
version: "1.0.0",
|
|
6404
|
+
llm: {
|
|
6405
|
+
provider: "claude"
|
|
6406
|
+
},
|
|
6407
|
+
providers: {},
|
|
6408
|
+
defaults: {
|
|
6409
|
+
aspectRatio: "16:9",
|
|
6410
|
+
exportQuality: "standard"
|
|
6411
|
+
},
|
|
6412
|
+
repl: {
|
|
6413
|
+
autoSave: true
|
|
6414
|
+
}
|
|
6415
|
+
};
|
|
6416
|
+
}
|
|
6417
|
+
var PROVIDER_ENV_VARS;
|
|
6418
|
+
var init_schema = __esm({
|
|
6419
|
+
"../cli/src/config/schema.ts"() {
|
|
6420
|
+
"use strict";
|
|
6421
|
+
PROVIDER_ENV_VARS = {
|
|
6422
|
+
anthropic: "ANTHROPIC_API_KEY",
|
|
6423
|
+
openai: "OPENAI_API_KEY",
|
|
6424
|
+
google: "GOOGLE_API_KEY",
|
|
6425
|
+
elevenlabs: "ELEVENLABS_API_KEY",
|
|
6426
|
+
runway: "RUNWAY_API_SECRET",
|
|
6427
|
+
kling: "KLING_API_KEY",
|
|
6428
|
+
imgbb: "IMGBB_API_KEY",
|
|
6429
|
+
replicate: "REPLICATE_API_TOKEN",
|
|
6430
|
+
xai: "XAI_API_KEY",
|
|
6431
|
+
openrouter: "OPENROUTER_API_KEY"
|
|
6432
|
+
};
|
|
6433
|
+
}
|
|
6434
|
+
});
|
|
6435
|
+
|
|
6436
|
+
// ../cli/src/config/index.ts
|
|
6437
|
+
import { resolve as resolve5 } from "node:path";
|
|
6438
|
+
import { homedir } from "node:os";
|
|
6439
|
+
import { readFile as readFile3, writeFile as writeFile2, mkdir, access as access2 } from "node:fs/promises";
|
|
6440
|
+
import { parse, stringify } from "yaml";
|
|
6441
|
+
async function loadConfig() {
|
|
6442
|
+
try {
|
|
6443
|
+
await access2(CONFIG_PATH);
|
|
6444
|
+
const content = await readFile3(CONFIG_PATH, "utf-8");
|
|
6445
|
+
const config2 = parse(content);
|
|
6446
|
+
const defaults = createDefaultConfig();
|
|
6447
|
+
return {
|
|
6448
|
+
...defaults,
|
|
6449
|
+
...config2,
|
|
6450
|
+
llm: { ...defaults.llm, ...config2.llm },
|
|
6451
|
+
providers: { ...defaults.providers, ...config2.providers },
|
|
6452
|
+
defaults: { ...defaults.defaults, ...config2.defaults },
|
|
6453
|
+
repl: { ...defaults.repl, ...config2.repl }
|
|
6454
|
+
};
|
|
6455
|
+
} catch {
|
|
6456
|
+
return null;
|
|
6457
|
+
}
|
|
6458
|
+
}
|
|
6459
|
+
async function getApiKeyFromConfig(providerKey) {
|
|
6460
|
+
const config2 = await loadConfig();
|
|
6461
|
+
if (config2?.providers[providerKey]) {
|
|
6462
|
+
return config2.providers[providerKey];
|
|
6463
|
+
}
|
|
6464
|
+
const envVar = PROVIDER_ENV_VARS[providerKey];
|
|
6465
|
+
if (envVar) {
|
|
6466
|
+
return process.env[envVar];
|
|
6467
|
+
}
|
|
6468
|
+
return void 0;
|
|
6469
|
+
}
|
|
6470
|
+
var CONFIG_DIR, CONFIG_PATH;
|
|
6471
|
+
var init_config = __esm({
|
|
6472
|
+
"../cli/src/config/index.ts"() {
|
|
6473
|
+
"use strict";
|
|
6474
|
+
init_schema();
|
|
6475
|
+
init_schema();
|
|
6476
|
+
CONFIG_DIR = resolve5(homedir(), ".vibeframe");
|
|
6477
|
+
CONFIG_PATH = resolve5(CONFIG_DIR, "config.yaml");
|
|
6478
|
+
}
|
|
6479
|
+
});
|
|
6480
|
+
|
|
6400
6481
|
// ../cli/src/utils/remotion.ts
|
|
6401
6482
|
var remotion_exports = {};
|
|
6402
6483
|
__export(remotion_exports, {
|
|
@@ -8149,7 +8230,7 @@ async function runExport(projectPath, outputPath, options = {}) {
|
|
|
8149
8230
|
};
|
|
8150
8231
|
}
|
|
8151
8232
|
}
|
|
8152
|
-
var exportCommand = new Command("export").description("Export project to video file").argument("<project>", "Project file path").option("-o, --output <path>", "Output file path").option("-f, --format <format>", "Output format (mp4, webm, mov)", "mp4").option(
|
|
8233
|
+
var exportCommand = new Command("export").description("Export project to video file").argument("<project>", "Project file path").option("-o, --output <path>", "Output file path").option("-f, --format <format>", "Output format (mp4, webm, mov, gif)", "mp4").option(
|
|
8153
8234
|
"-p, --preset <preset>",
|
|
8154
8235
|
"Quality preset (draft, standard, high, ultra)",
|
|
8155
8236
|
"standard"
|
|
@@ -8158,8 +8239,10 @@ Examples:
|
|
|
8158
8239
|
$ vibe export project.vibe.json -o output.mp4
|
|
8159
8240
|
$ vibe export project.vibe.json -o output.mp4 -p high -y
|
|
8160
8241
|
$ vibe export project.vibe.json -o output.webm -f webm
|
|
8242
|
+
$ vibe export project.vibe.json -o output.gif -f gif
|
|
8161
8243
|
|
|
8162
8244
|
Cost: Free (no API keys needed). Requires FFmpeg.
|
|
8245
|
+
GIF format: 15fps, no audio, looping. Good for previews and sharing.
|
|
8163
8246
|
Run 'vibe schema export' for structured parameter info.`).action(async (projectPath, options) => {
|
|
8164
8247
|
const spinner = ora2("Checking FFmpeg...").start();
|
|
8165
8248
|
try {
|
|
@@ -8588,7 +8671,17 @@ function buildFFmpegArgs(clips, sources, presetSettings, outputPath, options, so
|
|
|
8588
8671
|
if (trackOutputLabels.length > 0) {
|
|
8589
8672
|
args.push("-map", "[outa]");
|
|
8590
8673
|
}
|
|
8591
|
-
|
|
8674
|
+
if (options.format === "gif") {
|
|
8675
|
+
const audioIdx = args.indexOf("[outa]");
|
|
8676
|
+
if (audioIdx !== -1) {
|
|
8677
|
+
const mapIdx = args.lastIndexOf("-map", audioIdx);
|
|
8678
|
+
if (mapIdx !== -1) args.splice(mapIdx, 2);
|
|
8679
|
+
}
|
|
8680
|
+
args.push("-r", "15");
|
|
8681
|
+
args.push("-loop", "0");
|
|
8682
|
+
} else {
|
|
8683
|
+
args.push(...presetSettings.ffmpegArgs);
|
|
8684
|
+
}
|
|
8592
8685
|
args.push(outputPath);
|
|
8593
8686
|
return args;
|
|
8594
8687
|
}
|
|
@@ -8763,82 +8856,12 @@ import { readFile as readFile5, writeFile as writeFile5, mkdir as mkdir3 } from
|
|
|
8763
8856
|
import { existsSync as existsSync2 } from "node:fs";
|
|
8764
8857
|
|
|
8765
8858
|
// ../cli/src/utils/api-key.ts
|
|
8859
|
+
init_config();
|
|
8766
8860
|
import { createInterface } from "node:readline";
|
|
8767
8861
|
import { readFile as readFile4, writeFile as writeFile3, access as access3 } from "node:fs/promises";
|
|
8768
8862
|
import { resolve as resolve6 } from "node:path";
|
|
8769
8863
|
import { config } from "dotenv";
|
|
8770
8864
|
import chalk3 from "chalk";
|
|
8771
|
-
|
|
8772
|
-
// ../cli/src/config/index.ts
|
|
8773
|
-
import { resolve as resolve5 } from "node:path";
|
|
8774
|
-
import { homedir } from "node:os";
|
|
8775
|
-
import { readFile as readFile3, writeFile as writeFile2, mkdir, access as access2 } from "node:fs/promises";
|
|
8776
|
-
import { parse, stringify } from "yaml";
|
|
8777
|
-
|
|
8778
|
-
// ../cli/src/config/schema.ts
|
|
8779
|
-
var PROVIDER_ENV_VARS = {
|
|
8780
|
-
anthropic: "ANTHROPIC_API_KEY",
|
|
8781
|
-
openai: "OPENAI_API_KEY",
|
|
8782
|
-
google: "GOOGLE_API_KEY",
|
|
8783
|
-
elevenlabs: "ELEVENLABS_API_KEY",
|
|
8784
|
-
runway: "RUNWAY_API_SECRET",
|
|
8785
|
-
kling: "KLING_API_KEY",
|
|
8786
|
-
imgbb: "IMGBB_API_KEY",
|
|
8787
|
-
replicate: "REPLICATE_API_TOKEN",
|
|
8788
|
-
xai: "XAI_API_KEY",
|
|
8789
|
-
openrouter: "OPENROUTER_API_KEY"
|
|
8790
|
-
};
|
|
8791
|
-
function createDefaultConfig() {
|
|
8792
|
-
return {
|
|
8793
|
-
version: "1.0.0",
|
|
8794
|
-
llm: {
|
|
8795
|
-
provider: "claude"
|
|
8796
|
-
},
|
|
8797
|
-
providers: {},
|
|
8798
|
-
defaults: {
|
|
8799
|
-
aspectRatio: "16:9",
|
|
8800
|
-
exportQuality: "standard"
|
|
8801
|
-
},
|
|
8802
|
-
repl: {
|
|
8803
|
-
autoSave: true
|
|
8804
|
-
}
|
|
8805
|
-
};
|
|
8806
|
-
}
|
|
8807
|
-
|
|
8808
|
-
// ../cli/src/config/index.ts
|
|
8809
|
-
var CONFIG_DIR = resolve5(homedir(), ".vibeframe");
|
|
8810
|
-
var CONFIG_PATH = resolve5(CONFIG_DIR, "config.yaml");
|
|
8811
|
-
async function loadConfig() {
|
|
8812
|
-
try {
|
|
8813
|
-
await access2(CONFIG_PATH);
|
|
8814
|
-
const content = await readFile3(CONFIG_PATH, "utf-8");
|
|
8815
|
-
const config2 = parse(content);
|
|
8816
|
-
const defaults = createDefaultConfig();
|
|
8817
|
-
return {
|
|
8818
|
-
...defaults,
|
|
8819
|
-
...config2,
|
|
8820
|
-
llm: { ...defaults.llm, ...config2.llm },
|
|
8821
|
-
providers: { ...defaults.providers, ...config2.providers },
|
|
8822
|
-
defaults: { ...defaults.defaults, ...config2.defaults },
|
|
8823
|
-
repl: { ...defaults.repl, ...config2.repl }
|
|
8824
|
-
};
|
|
8825
|
-
} catch {
|
|
8826
|
-
return null;
|
|
8827
|
-
}
|
|
8828
|
-
}
|
|
8829
|
-
async function getApiKeyFromConfig(providerKey) {
|
|
8830
|
-
const config2 = await loadConfig();
|
|
8831
|
-
if (config2?.providers[providerKey]) {
|
|
8832
|
-
return config2.providers[providerKey];
|
|
8833
|
-
}
|
|
8834
|
-
const envVar = PROVIDER_ENV_VARS[providerKey];
|
|
8835
|
-
if (envVar) {
|
|
8836
|
-
return process.env[envVar];
|
|
8837
|
-
}
|
|
8838
|
-
return void 0;
|
|
8839
|
-
}
|
|
8840
|
-
|
|
8841
|
-
// ../cli/src/utils/api-key.ts
|
|
8842
8865
|
function loadEnv() {
|
|
8843
8866
|
config({ path: resolve6(process.cwd(), ".env"), debug: false, quiet: true });
|
|
8844
8867
|
const monorepoRoot = findMonorepoRoot();
|
|
@@ -11136,7 +11159,9 @@ init_dist();
|
|
|
11136
11159
|
import { readFile as readFile9, writeFile as writeFile7, mkdir as mkdir5, unlink, rename as rename2 } from "node:fs/promises";
|
|
11137
11160
|
import { resolve as resolve11, basename as basename4, extname as extname4 } from "node:path";
|
|
11138
11161
|
import { existsSync as existsSync6 } from "node:fs";
|
|
11162
|
+
import { stringify as yamlStringify, parse as yamlParse } from "yaml";
|
|
11139
11163
|
import chalk7 from "chalk";
|
|
11164
|
+
init_config();
|
|
11140
11165
|
init_exec_safe();
|
|
11141
11166
|
|
|
11142
11167
|
// ../cli/src/commands/ai-helpers.ts
|
|
@@ -11398,8 +11423,8 @@ async function executeScriptToVideo(options) {
|
|
|
11398
11423
|
if (segments.length === 0) {
|
|
11399
11424
|
return { success: false, outputDir, scenes: 0, error: "Failed to generate storyboard" };
|
|
11400
11425
|
}
|
|
11401
|
-
const storyboardPath = resolve11(absOutputDir, "storyboard.
|
|
11402
|
-
await writeFile7(storyboardPath,
|
|
11426
|
+
const storyboardPath = resolve11(absOutputDir, "storyboard.yaml");
|
|
11427
|
+
await writeFile7(storyboardPath, yamlStringify({ scenes: segments }, { indent: 2 }), "utf-8");
|
|
11403
11428
|
const result = {
|
|
11404
11429
|
success: true,
|
|
11405
11430
|
outputDir: absOutputDir,
|
|
@@ -11460,7 +11485,7 @@ async function executeScriptToVideo(options) {
|
|
|
11460
11485
|
segment.startTime = currentTime2;
|
|
11461
11486
|
currentTime2 += segment.duration;
|
|
11462
11487
|
}
|
|
11463
|
-
await writeFile7(storyboardPath,
|
|
11488
|
+
await writeFile7(storyboardPath, yamlStringify({ scenes: segments }, { indent: 2 }), "utf-8");
|
|
11464
11489
|
}
|
|
11465
11490
|
const dalleImageSizes = {
|
|
11466
11491
|
"16:9": "1536x1024",
|
|
@@ -11840,12 +11865,14 @@ async function executeScriptToVideo(options) {
|
|
|
11840
11865
|
result.totalDuration = currentTime;
|
|
11841
11866
|
if (options.review) {
|
|
11842
11867
|
try {
|
|
11843
|
-
const
|
|
11868
|
+
const storyboardYaml = resolve11(absOutputDir, "storyboard.yaml");
|
|
11869
|
+
const storyboardJson = resolve11(absOutputDir, "storyboard.json");
|
|
11870
|
+
const storyboardFile = existsSync6(storyboardYaml) ? storyboardYaml : existsSync6(storyboardJson) ? storyboardJson : void 0;
|
|
11844
11871
|
const reviewTarget = videoPaths.find((p) => p && p !== "") || imagePaths.find((p) => p && p !== "");
|
|
11845
11872
|
if (reviewTarget) {
|
|
11846
11873
|
const reviewResult = await executeReview({
|
|
11847
11874
|
videoPath: reviewTarget,
|
|
11848
|
-
storyboardPath:
|
|
11875
|
+
storyboardPath: storyboardFile,
|
|
11849
11876
|
autoApply: options.reviewAutoApply,
|
|
11850
11877
|
model: "flash"
|
|
11851
11878
|
});
|
|
@@ -11876,15 +11903,17 @@ async function executeRegenerateScene(options) {
|
|
|
11876
11903
|
};
|
|
11877
11904
|
try {
|
|
11878
11905
|
const outputDir = resolve11(process.cwd(), options.projectDir);
|
|
11879
|
-
const storyboardPath = resolve11(outputDir, "storyboard.json");
|
|
11880
11906
|
if (!existsSync6(outputDir)) {
|
|
11881
11907
|
return { ...result, error: `Project directory not found: ${outputDir}` };
|
|
11882
11908
|
}
|
|
11883
|
-
|
|
11884
|
-
|
|
11909
|
+
const yamlPath = resolve11(outputDir, "storyboard.yaml");
|
|
11910
|
+
const jsonPath = resolve11(outputDir, "storyboard.json");
|
|
11911
|
+
const storyboardPath = existsSync6(yamlPath) ? yamlPath : existsSync6(jsonPath) ? jsonPath : null;
|
|
11912
|
+
if (!storyboardPath) {
|
|
11913
|
+
return { ...result, error: `Storyboard not found in: ${outputDir} (expected storyboard.yaml or storyboard.json)` };
|
|
11885
11914
|
}
|
|
11886
11915
|
const storyboardContent = await readFile9(storyboardPath, "utf-8");
|
|
11887
|
-
const segments = JSON.parse(storyboardContent);
|
|
11916
|
+
const segments = storyboardPath.endsWith(".yaml") ? yamlParse(storyboardContent).scenes : JSON.parse(storyboardContent);
|
|
11888
11917
|
for (const sceneNum of options.scenes) {
|
|
11889
11918
|
if (sceneNum < 1 || sceneNum > segments.length) {
|
|
11890
11919
|
return { ...result, error: `Scene ${sceneNum} does not exist. Storyboard has ${segments.length} scenes.` };
|
|
@@ -14170,6 +14199,9 @@ async function prompt2(question) {
|
|
|
14170
14199
|
});
|
|
14171
14200
|
}
|
|
14172
14201
|
|
|
14202
|
+
// ../cli/src/commands/generate.ts
|
|
14203
|
+
init_config();
|
|
14204
|
+
|
|
14173
14205
|
// ../cli/src/commands/sanitize.ts
|
|
14174
14206
|
function sanitizeLLMResponse(text) {
|
|
14175
14207
|
if (!text || typeof text !== "string") return text;
|
|
@@ -14202,9 +14234,16 @@ var PROVIDER_MAP = {
|
|
|
14202
14234
|
video: VIDEO_PROVIDERS,
|
|
14203
14235
|
speech: SPEECH_PROVIDERS
|
|
14204
14236
|
};
|
|
14237
|
+
var configDefaults = null;
|
|
14205
14238
|
function resolveProvider(category) {
|
|
14206
14239
|
const candidates = PROVIDER_MAP[category];
|
|
14207
14240
|
if (!candidates) return null;
|
|
14241
|
+
if (configDefaults?.[category]) {
|
|
14242
|
+
const preferred = candidates.find((c) => c.name === configDefaults[category]);
|
|
14243
|
+
if (preferred && hasApiKey(preferred.envVar)) {
|
|
14244
|
+
return { name: preferred.name, label: preferred.label };
|
|
14245
|
+
}
|
|
14246
|
+
}
|
|
14208
14247
|
for (const candidate of candidates) {
|
|
14209
14248
|
if (hasApiKey(candidate.envVar)) {
|
|
14210
14249
|
return { name: candidate.name, label: candidate.label };
|
|
@@ -16799,6 +16838,7 @@ import { readFile as readFile14, writeFile as writeFile13 } from "node:fs/promis
|
|
|
16799
16838
|
import { resolve as resolve17 } from "node:path";
|
|
16800
16839
|
import chalk12 from "chalk";
|
|
16801
16840
|
import ora10 from "ora";
|
|
16841
|
+
init_config();
|
|
16802
16842
|
async function executeVideoGenerate(options) {
|
|
16803
16843
|
const {
|
|
16804
16844
|
prompt: prompt3,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibeframe/mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.42.0",
|
|
4
4
|
"description": "VibeFrame MCP Server - AI-native video editing via Model Context Protocol",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
"tsx": "^4.21.0",
|
|
58
58
|
"typescript": "^5.3.3",
|
|
59
59
|
"vitest": "^1.2.2",
|
|
60
|
-
"@vibeframe/
|
|
61
|
-
"@vibeframe/
|
|
60
|
+
"@vibeframe/core": "0.42.0",
|
|
61
|
+
"@vibeframe/cli": "0.42.0"
|
|
62
62
|
},
|
|
63
63
|
"engines": {
|
|
64
64
|
"node": ">=20"
|