@vibeframe/cli 0.113.6 → 0.113.8

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.
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Evolink LLM Adapter (OpenAI-compatible)
3
+ * Routes to GPT-5, Claude, Gemini, DeepSeek & more via https://direct.evolink.ai/v1
4
+ */
5
+ import type { LLMAdapter } from "./index.js";
6
+ import type { ToolDefinition, LLMResponse, AgentMessage, LLMProvider } from "../types.js";
7
+ export declare class EvolinkAdapter implements LLMAdapter {
8
+ readonly provider: LLMProvider;
9
+ private client;
10
+ private model;
11
+ initialize(apiKey: string): Promise<void>;
12
+ isInitialized(): boolean;
13
+ setModel(model: string): void;
14
+ chat(messages: AgentMessage[], tools: ToolDefinition[]): Promise<LLMResponse>;
15
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Evolink adapter unit tests (mock-based, no API calls)
3
+ */
4
+ export {};
@@ -12,6 +12,8 @@ export interface LLMAdapter {
12
12
  initialize(apiKey: string): Promise<void>;
13
13
  /** Check if adapter is initialized */
14
14
  isInitialized(): boolean;
15
+ /** Override the provider model for this session. */
16
+ setModel?(model: string): void;
15
17
  /** Send messages with tools and get response */
16
18
  chat(messages: AgentMessage[], tools: ToolDefinition[]): Promise<LLMResponse>;
17
19
  }
@@ -25,3 +27,4 @@ export { GeminiAdapter } from "./gemini.js";
25
27
  export { OllamaAdapter } from "./ollama.js";
26
28
  export { XAIAdapter } from "./xai.js";
27
29
  export { OpenRouterAdapter } from "./openrouter.js";
30
+ export { EvolinkAdapter } from "./evolink.js";
@@ -0,0 +1 @@
1
+ export {};
@@ -55,7 +55,7 @@ export interface AgentConfig {
55
55
  maxTurns?: number;
56
56
  verbose?: boolean;
57
57
  }
58
- export type LLMProvider = "openai" | "claude" | "gemini" | "ollama" | "xai" | "openrouter";
58
+ export type LLMProvider = "openai" | "claude" | "gemini" | "ollama" | "xai" | "openrouter" | "evolink";
59
59
  export interface LLMResponse {
60
60
  content: string;
61
61
  toolCalls?: ToolCall[];
@@ -2,7 +2,7 @@
2
2
  * Configuration schema for VibeFrame CLI
3
3
  * Stored at ~/.vibeframe/config.yaml by default.
4
4
  */
5
- export type LLMProvider = "claude" | "openai" | "gemini" | "ollama" | "xai" | "openrouter";
5
+ export type LLMProvider = "claude" | "openai" | "gemini" | "ollama" | "xai" | "openrouter" | "evolink";
6
6
  export interface VibeConfig {
7
7
  /** Config file version */
8
8
  version: string;
@@ -24,6 +24,7 @@ export interface VibeConfig {
24
24
  replicate?: string;
25
25
  xai?: string;
26
26
  openrouter?: string;
27
+ evolink?: string;
27
28
  };
28
29
  /** Default settings for new projects */
29
30
  defaults: {
package/dist/index.js CHANGED
@@ -7165,6 +7165,16 @@ var init_api_keys = __esm({
7165
7165
  envExampleUrl: "https://openrouter.ai/keys",
7166
7166
  keyFormat: { prefix: /^sk-or-/, example: "sk-or-..." }
7167
7167
  });
7168
+ defineApiKey({
7169
+ configKey: "evolink",
7170
+ envVar: "EVOLINK_API_KEY",
7171
+ label: "Evolink",
7172
+ showInSetup: true,
7173
+ setupDescription: "GPT-5, Claude, Gemini, DeepSeek & more via one key \u2014 Agent only (pay per model)",
7174
+ envExampleComment: "Evolink API Key (GPT-5, Claude, Gemini, DeepSeek & more via unified API, used by `vibe agent`)",
7175
+ envExampleUrl: "https://evolink.ai/dashboard/keys",
7176
+ keyFormat: { prefix: /^el-/, example: "el-..." }
7177
+ });
7168
7178
  defineApiKey({
7169
7179
  configKey: "imgbb",
7170
7180
  envVar: "IMGBB_API_KEY",
@@ -7187,6 +7197,12 @@ var init_api_keys = __esm({
7187
7197
  apiKey: "openrouter",
7188
7198
  kinds: ["llm"]
7189
7199
  });
7200
+ defineProvider({
7201
+ id: "evolink",
7202
+ label: "Evolink",
7203
+ apiKey: "evolink",
7204
+ kinds: ["llm"]
7205
+ });
7190
7206
  }
7191
7207
  });
7192
7208
 
@@ -26079,7 +26095,8 @@ var init_schema = __esm({
26079
26095
  gemini: "Gemini (Google)",
26080
26096
  ollama: "Ollama (Local)",
26081
26097
  xai: "Grok (xAI)",
26082
- openrouter: "OpenRouter"
26098
+ openrouter: "OpenRouter",
26099
+ evolink: "Evolink"
26083
26100
  };
26084
26101
  PROVIDER_ENV_VARS = getProviderEnvVars();
26085
26102
  PROVIDER_ENV_ALIASES = getProviderEnvAliases();
@@ -26475,6 +26492,7 @@ var init_api_key = __esm({
26475
26492
  RUNWAY_API_SECRET: "runway",
26476
26493
  KLING_API_KEY: "kling",
26477
26494
  OPENROUTER_API_KEY: "openrouter",
26495
+ EVOLINK_API_KEY: "evolink",
26478
26496
  IMGBB_API_KEY: "imgbb",
26479
26497
  REPLICATE_API_TOKEN: "replicate"
26480
26498
  };
@@ -26489,7 +26507,8 @@ var init_api_key = __esm({
26489
26507
  RUNWAY_API_SECRET: "https://app.runwayml.com/settings/api-keys",
26490
26508
  KLING_API_KEY: "https://klingai.com/dev",
26491
26509
  REPLICATE_API_TOKEN: "https://replicate.com/account/api-tokens",
26492
- IMGBB_API_KEY: "https://api.imgbb.com/"
26510
+ IMGBB_API_KEY: "https://api.imgbb.com/",
26511
+ EVOLINK_API_KEY: "https://evolink.ai/dashboard/keys"
26493
26512
  };
26494
26513
  ApiKeyError = class extends Error {
26495
26514
  envVar;
@@ -59230,6 +59249,14 @@ var init_key_live_test = __esm({
59230
59249
  signal
59231
59250
  )
59232
59251
  },
59252
+ evolink: {
59253
+ name: "Evolink",
59254
+ test: (key, signal) => getOk(
59255
+ "https://direct.evolink.ai/v1/models",
59256
+ { Authorization: `Bearer ${key}` },
59257
+ signal
59258
+ )
59259
+ },
59233
59260
  // Runway: /v1/organization is a read-only GET that returns tier info
59234
59261
  // (free, doesn't consume credits). Requires the X-Runway-Version
59235
59262
  // header alongside the Bearer token — without it the request 401s.
@@ -59998,6 +60025,109 @@ var init_openrouter = __esm({
59998
60025
  }
59999
60026
  });
60000
60027
 
60028
+ // src/agent/adapters/evolink.ts
60029
+ var evolink_exports = {};
60030
+ __export(evolink_exports, {
60031
+ EvolinkAdapter: () => EvolinkAdapter
60032
+ });
60033
+ import OpenAI5 from "openai";
60034
+ var EvolinkAdapter;
60035
+ var init_evolink = __esm({
60036
+ "src/agent/adapters/evolink.ts"() {
60037
+ "use strict";
60038
+ EvolinkAdapter = class {
60039
+ provider = "evolink";
60040
+ client = null;
60041
+ model = "gpt-5.2";
60042
+ async initialize(apiKey) {
60043
+ this.client = new OpenAI5({
60044
+ apiKey,
60045
+ baseURL: "https://direct.evolink.ai/v1",
60046
+ defaultHeaders: {
60047
+ "HTTP-Referer": "https://vibeframe.dev",
60048
+ "X-Title": "VibeFrame"
60049
+ }
60050
+ });
60051
+ }
60052
+ isInitialized() {
60053
+ return this.client !== null;
60054
+ }
60055
+ setModel(model) {
60056
+ this.model = model;
60057
+ }
60058
+ async chat(messages, tools) {
60059
+ if (!this.client) {
60060
+ throw new Error("Evolink adapter not initialized");
60061
+ }
60062
+ const openaiMessages = messages.map(
60063
+ (msg) => {
60064
+ if (msg.role === "tool") {
60065
+ return {
60066
+ role: "tool",
60067
+ tool_call_id: msg.toolCallId,
60068
+ content: msg.content
60069
+ };
60070
+ }
60071
+ if (msg.role === "assistant" && msg.toolCalls) {
60072
+ return {
60073
+ role: "assistant",
60074
+ content: msg.content || null,
60075
+ tool_calls: msg.toolCalls.map((tc) => ({
60076
+ id: tc.id,
60077
+ type: "function",
60078
+ function: {
60079
+ name: tc.name,
60080
+ arguments: JSON.stringify(tc.arguments)
60081
+ }
60082
+ }))
60083
+ };
60084
+ }
60085
+ return {
60086
+ role: msg.role,
60087
+ content: msg.content
60088
+ };
60089
+ }
60090
+ );
60091
+ const openaiTools = tools.map((tool) => ({
60092
+ type: "function",
60093
+ function: {
60094
+ name: tool.name,
60095
+ description: tool.description,
60096
+ parameters: tool.parameters
60097
+ }
60098
+ }));
60099
+ const response = await this.client.chat.completions.create({
60100
+ model: this.model,
60101
+ messages: openaiMessages,
60102
+ tools: openaiTools.length > 0 ? openaiTools : void 0,
60103
+ tool_choice: openaiTools.length > 0 ? "auto" : void 0
60104
+ });
60105
+ const choice = response.choices[0];
60106
+ const message = choice.message;
60107
+ let toolCalls;
60108
+ if (message.tool_calls && message.tool_calls.length > 0) {
60109
+ toolCalls = message.tool_calls.map((tc) => ({
60110
+ id: tc.id,
60111
+ name: tc.function.name,
60112
+ arguments: JSON.parse(tc.function.arguments)
60113
+ }));
60114
+ }
60115
+ let finishReason = "stop";
60116
+ if (choice.finish_reason === "tool_calls") {
60117
+ finishReason = "tool_calls";
60118
+ } else if (choice.finish_reason === "length") {
60119
+ finishReason = "length";
60120
+ }
60121
+ return {
60122
+ content: message.content || "",
60123
+ toolCalls,
60124
+ finishReason
60125
+ };
60126
+ }
60127
+ };
60128
+ }
60129
+ });
60130
+
60001
60131
  // src/agent/adapters/index.ts
60002
60132
  async function createAdapter(provider) {
60003
60133
  switch (provider) {
@@ -60025,6 +60155,10 @@ async function createAdapter(provider) {
60025
60155
  const { OpenRouterAdapter: OpenRouterAdapter2 } = await Promise.resolve().then(() => (init_openrouter(), openrouter_exports));
60026
60156
  return new OpenRouterAdapter2();
60027
60157
  }
60158
+ case "evolink": {
60159
+ const { EvolinkAdapter: EvolinkAdapter2 } = await Promise.resolve().then(() => (init_evolink(), evolink_exports));
60160
+ return new EvolinkAdapter2();
60161
+ }
60028
60162
  default:
60029
60163
  throw new Error(`Unknown provider: ${provider}`);
60030
60164
  }
@@ -60038,6 +60172,7 @@ var init_adapters = __esm({
60038
60172
  init_ollama2();
60039
60173
  init_xai();
60040
60174
  init_openrouter();
60175
+ init_evolink();
60041
60176
  }
60042
60177
  });
60043
60178
 
@@ -63403,6 +63538,10 @@ async function dispatchVideo(beat, ctx, keyframe) {
63403
63538
  // reference-to-video.
63404
63539
  image: keyframeImageAbs,
63405
63540
  refImages: keyframeImageAbs ? void 0 : characterRefsAbs.length > 0 ? characterRefsAbs : void 0,
63541
+ // Build clips are always muted in the composition (a separate narration/music
63542
+ // track carries audio), so the model's generated audio is never used. Disable
63543
+ // it: it's wasted, and Seedance's audio moderation can spuriously fail a beat.
63544
+ generateAudio: false,
63406
63545
  apiKey: await apiKeyForVideoProvider(ctx.videoProvider, ctx.projectDir)
63407
63546
  });
63408
63547
  if (!result.success || !result.taskId) {
@@ -74857,7 +74996,7 @@ init_source();
74857
74996
  // package.json
74858
74997
  var package_default = {
74859
74998
  name: "@vibeframe/cli",
74860
- version: "0.113.6",
74999
+ version: "0.113.8",
74861
75000
  description: "VibeFrame CLI - agentic video workflow runtime",
74862
75001
  private: false,
74863
75002
  license: "MIT",
@@ -82064,7 +82203,8 @@ var VALID_LLM_PROVIDERS = [
82064
82203
  "gemini",
82065
82204
  "ollama",
82066
82205
  "xai",
82067
- "openrouter"
82206
+ "openrouter",
82207
+ "evolink"
82068
82208
  ];
82069
82209
  var VALID_SCOPES = ["user", "project"];
82070
82210
  function envValueFor(meta) {
@@ -82087,7 +82227,7 @@ var setupCommand = new Command("setup").description("Configure VibeFrame (LLM pr
82087
82227
  "With --show: include unset providers + Resolution order + Defaults block"
82088
82228
  ).option("--claude-code", "Show Claude Code integration guide").option("-y, --yes", "Non-interactive: write config without prompting (CI / devcontainer)").option(
82089
82229
  "--provider <id>",
82090
- "Set the Agent LLM provider (claude | openai | gemini | xai | openrouter | ollama)"
82230
+ "Set the Agent LLM provider (claude | openai | gemini | xai | openrouter | evolink | ollama)"
82091
82231
  ).option("--import-env", "Promote API keys from .env / shell env into config.yaml").option("--test", "After save, live-test each configured key (exits 7 if any FAIL)").option(
82092
82232
  "--scope <scope>",
82093
82233
  "Where to save: 'user' (~/.vibeframe/config.yaml, shared) or 'project' (./.vibeframe/config.yaml, gitignored, this project only)",
@@ -82991,13 +83131,14 @@ async function runCustomSetup(config2, scope = "user", opts = {}) {
82991
83131
  )
82992
83132
  );
82993
83133
  console.log();
82994
- const providers = ["claude", "openai", "gemini", "xai", "openrouter", "ollama"];
83134
+ const providers = ["claude", "openai", "gemini", "xai", "openrouter", "evolink", "ollama"];
82995
83135
  const providerDescriptions = {
82996
83136
  claude: "Best reasoning, most capable for complex tasks",
82997
83137
  openai: "GPT-5-mini, reliable and fast, good default",
82998
83138
  gemini: "Google AI, strong multimodal understanding",
82999
83139
  xai: "Grok 4.1 Fast, 2M context, great for tool calling",
83000
83140
  openrouter: "300+ models via one API key (Claude, GPT, Gemini, Llama, etc.)",
83141
+ evolink: "GPT-5, Claude, Gemini, DeepSeek & more via one key",
83001
83142
  ollama: "Free, local, no API key \u2014 offline capable (default: llama3.2)"
83002
83143
  };
83003
83144
  const providerLabels = providers.map((p) => {
@@ -83006,7 +83147,7 @@ async function runCustomSetup(config2, scope = "user", opts = {}) {
83006
83147
  });
83007
83148
  const currentIndex = providers.indexOf(config2.llm.provider);
83008
83149
  const providerIndex = await promptSelect(
83009
- source_default.cyan(" Select [1-6]: "),
83150
+ source_default.cyan(" Select [1-7]: "),
83010
83151
  providerLabels,
83011
83152
  currentIndex >= 0 ? currentIndex : 0
83012
83153
  );
@@ -83222,7 +83363,8 @@ async function showConfig(opts = { verbose: false }) {
83222
83363
  { key: "kling", name: "Kling", env: "KLING_API_KEY" },
83223
83364
  { key: "imgbb", name: "ImgBB", env: "IMGBB_API_KEY" },
83224
83365
  { key: "replicate", name: "Replicate", env: "REPLICATE_API_TOKEN" },
83225
- { key: "openrouter", name: "OpenRouter", env: "OPENROUTER_API_KEY" }
83366
+ { key: "openrouter", name: "OpenRouter", env: "OPENROUTER_API_KEY" },
83367
+ { key: "evolink", name: "Evolink", env: "EVOLINK_API_KEY" }
83226
83368
  ];
83227
83369
  let unsetCount = 0;
83228
83370
  for (const p of providerKeys) {
@@ -87687,6 +87829,9 @@ var AgentExecutor = class {
87687
87829
  async initialize() {
87688
87830
  if (this.initialized) return;
87689
87831
  this.adapter = await createAdapter(this.config.provider);
87832
+ if (this.config.model) {
87833
+ this.adapter.setModel?.(this.config.model);
87834
+ }
87690
87835
  await this.adapter.initialize(this.config.apiKey);
87691
87836
  await registerAllTools(this.registry);
87692
87837
  const systemPrompt = getSystemPrompt(this.context);
@@ -87898,7 +88043,8 @@ async function startAgent(options = {}) {
87898
88043
  ollama: "ollama",
87899
88044
  // Ollama doesn't need API key
87900
88045
  xai: "xai",
87901
- openrouter: "openrouter"
88046
+ openrouter: "openrouter",
88047
+ evolink: "evolink"
87902
88048
  };
87903
88049
  if (provider !== "ollama") {
87904
88050
  apiKey = await getApiKeyFromConfig(providerKeyMap[provider]);
@@ -88084,7 +88230,7 @@ async function startAgent(options = {}) {
88084
88230
  rl.prompt();
88085
88231
  });
88086
88232
  }
88087
- var agentCommand = new Command("agent").description("Optional built-in natural-language agent (fallback when no external coding agent is driving vibe)").option("-p, --provider <provider>", "LLM provider (openai, claude, gemini, ollama, xai, openrouter)", "openai").option("-m, --model <model>", "Model to use (provider-specific)").option("--project <path>", "Timeline file or directory to load").option("-v, --verbose", "Show verbose output including tool calls").option("--max-turns <n>", "Maximum turns per request", "10").option("-i, --input <query>", "Run a single query and exit (non-interactive)").option("-c, --confirm", "Confirm before every tool \u2014 broadens the default cost gate (paid only) to all calls").option("--no-confirm", "Disable all confirm prompts including the high/very-high cost gate (CI / automation)").option("--budget-usd <usd>", "Reject tool calls past this cumulative USD ceiling using conservative tier estimates", parseFloat).action(async (options) => {
88233
+ var agentCommand = new Command("agent").description("Optional built-in natural-language agent (fallback when no external coding agent is driving vibe)").option("-p, --provider <provider>", "LLM provider (openai, claude, gemini, ollama, xai, openrouter, evolink)", "openai").option("-m, --model <model>", "Model to use (provider-specific)").option("--project <path>", "Timeline file or directory to load").option("-v, --verbose", "Show verbose output including tool calls").option("--max-turns <n>", "Maximum turns per request", "10").option("-i, --input <query>", "Run a single query and exit (non-interactive)").option("-c, --confirm", "Confirm before every tool \u2014 broadens the default cost gate (paid only) to all calls").option("--no-confirm", "Disable all confirm prompts including the high/very-high cost gate (CI / automation)").option("--budget-usd <usd>", "Reject tool calls past this cumulative USD ceiling using conservative tier estimates", parseFloat).action(async (options) => {
88088
88234
  await startAgent(options);
88089
88235
  });
88090
88236
  function getEnvVar(provider) {
@@ -88094,7 +88240,8 @@ function getEnvVar(provider) {
88094
88240
  gemini: "GOOGLE_API_KEY",
88095
88241
  ollama: "(no API key needed)",
88096
88242
  xai: "XAI_API_KEY",
88097
- openrouter: "OPENROUTER_API_KEY"
88243
+ openrouter: "OPENROUTER_API_KEY",
88244
+ evolink: "EVOLINK_API_KEY"
88098
88245
  };
88099
88246
  return envVars[provider] || "API_KEY";
88100
88247
  }
@@ -290,6 +290,16 @@ var init_api_keys = __esm({
290
290
  envExampleUrl: "https://openrouter.ai/keys",
291
291
  keyFormat: { prefix: /^sk-or-/, example: "sk-or-..." }
292
292
  });
293
+ defineApiKey({
294
+ configKey: "evolink",
295
+ envVar: "EVOLINK_API_KEY",
296
+ label: "Evolink",
297
+ showInSetup: true,
298
+ setupDescription: "GPT-5, Claude, Gemini, DeepSeek & more via one key \u2014 Agent only (pay per model)",
299
+ envExampleComment: "Evolink API Key (GPT-5, Claude, Gemini, DeepSeek & more via unified API, used by `vibe agent`)",
300
+ envExampleUrl: "https://evolink.ai/dashboard/keys",
301
+ keyFormat: { prefix: /^el-/, example: "el-..." }
302
+ });
293
303
  defineApiKey({
294
304
  configKey: "imgbb",
295
305
  envVar: "IMGBB_API_KEY",
@@ -312,6 +322,12 @@ var init_api_keys = __esm({
312
322
  apiKey: "openrouter",
313
323
  kinds: ["llm"]
314
324
  });
325
+ defineProvider({
326
+ id: "evolink",
327
+ label: "Evolink",
328
+ apiKey: "evolink",
329
+ kinds: ["llm"]
330
+ });
315
331
  }
316
332
  });
317
333
 
@@ -18807,7 +18823,8 @@ var init_schema = __esm({
18807
18823
  gemini: "Gemini (Google)",
18808
18824
  ollama: "Ollama (Local)",
18809
18825
  xai: "Grok (xAI)",
18810
- openrouter: "OpenRouter"
18826
+ openrouter: "OpenRouter",
18827
+ evolink: "Evolink"
18811
18828
  };
18812
18829
  PROVIDER_ENV_VARS = getProviderEnvVars();
18813
18830
  PROVIDER_ENV_ALIASES = getProviderEnvAliases();
@@ -20631,6 +20648,7 @@ var init_api_key = __esm({
20631
20648
  RUNWAY_API_SECRET: "runway",
20632
20649
  KLING_API_KEY: "kling",
20633
20650
  OPENROUTER_API_KEY: "openrouter",
20651
+ EVOLINK_API_KEY: "evolink",
20634
20652
  IMGBB_API_KEY: "imgbb",
20635
20653
  REPLICATE_API_TOKEN: "replicate"
20636
20654
  };
@@ -20645,7 +20663,8 @@ var init_api_key = __esm({
20645
20663
  RUNWAY_API_SECRET: "https://app.runwayml.com/settings/api-keys",
20646
20664
  KLING_API_KEY: "https://klingai.com/dev",
20647
20665
  REPLICATE_API_TOKEN: "https://replicate.com/account/api-tokens",
20648
- IMGBB_API_KEY: "https://api.imgbb.com/"
20666
+ IMGBB_API_KEY: "https://api.imgbb.com/",
20667
+ EVOLINK_API_KEY: "https://evolink.ai/dashboard/keys"
20649
20668
  };
20650
20669
  ApiKeyError = class extends Error {
20651
20670
  envVar;
@@ -35897,6 +35916,10 @@ async function dispatchVideo(beat, ctx, keyframe) {
35897
35916
  // reference-to-video.
35898
35917
  image: keyframeImageAbs,
35899
35918
  refImages: keyframeImageAbs ? void 0 : characterRefsAbs.length > 0 ? characterRefsAbs : void 0,
35919
+ // Build clips are always muted in the composition (a separate narration/music
35920
+ // track carries audio), so the model's generated audio is never used. Disable
35921
+ // it: it's wasted, and Seedance's audio moderation can spuriously fail a beat.
35922
+ generateAudio: false,
35900
35923
  apiKey: await apiKeyForVideoProvider(ctx.videoProvider, ctx.projectDir)
35901
35924
  });
35902
35925
  if (!result.success || !result.taskId) {
@@ -47750,6 +47773,109 @@ var init_openrouter = __esm({
47750
47773
  }
47751
47774
  });
47752
47775
 
47776
+ // src/agent/adapters/evolink.ts
47777
+ var evolink_exports = {};
47778
+ __export(evolink_exports, {
47779
+ EvolinkAdapter: () => EvolinkAdapter
47780
+ });
47781
+ import OpenAI5 from "openai";
47782
+ var EvolinkAdapter;
47783
+ var init_evolink = __esm({
47784
+ "src/agent/adapters/evolink.ts"() {
47785
+ "use strict";
47786
+ EvolinkAdapter = class {
47787
+ provider = "evolink";
47788
+ client = null;
47789
+ model = "gpt-5.2";
47790
+ async initialize(apiKey) {
47791
+ this.client = new OpenAI5({
47792
+ apiKey,
47793
+ baseURL: "https://direct.evolink.ai/v1",
47794
+ defaultHeaders: {
47795
+ "HTTP-Referer": "https://vibeframe.dev",
47796
+ "X-Title": "VibeFrame"
47797
+ }
47798
+ });
47799
+ }
47800
+ isInitialized() {
47801
+ return this.client !== null;
47802
+ }
47803
+ setModel(model) {
47804
+ this.model = model;
47805
+ }
47806
+ async chat(messages, tools) {
47807
+ if (!this.client) {
47808
+ throw new Error("Evolink adapter not initialized");
47809
+ }
47810
+ const openaiMessages = messages.map(
47811
+ (msg) => {
47812
+ if (msg.role === "tool") {
47813
+ return {
47814
+ role: "tool",
47815
+ tool_call_id: msg.toolCallId,
47816
+ content: msg.content
47817
+ };
47818
+ }
47819
+ if (msg.role === "assistant" && msg.toolCalls) {
47820
+ return {
47821
+ role: "assistant",
47822
+ content: msg.content || null,
47823
+ tool_calls: msg.toolCalls.map((tc) => ({
47824
+ id: tc.id,
47825
+ type: "function",
47826
+ function: {
47827
+ name: tc.name,
47828
+ arguments: JSON.stringify(tc.arguments)
47829
+ }
47830
+ }))
47831
+ };
47832
+ }
47833
+ return {
47834
+ role: msg.role,
47835
+ content: msg.content
47836
+ };
47837
+ }
47838
+ );
47839
+ const openaiTools = tools.map((tool) => ({
47840
+ type: "function",
47841
+ function: {
47842
+ name: tool.name,
47843
+ description: tool.description,
47844
+ parameters: tool.parameters
47845
+ }
47846
+ }));
47847
+ const response = await this.client.chat.completions.create({
47848
+ model: this.model,
47849
+ messages: openaiMessages,
47850
+ tools: openaiTools.length > 0 ? openaiTools : void 0,
47851
+ tool_choice: openaiTools.length > 0 ? "auto" : void 0
47852
+ });
47853
+ const choice = response.choices[0];
47854
+ const message = choice.message;
47855
+ let toolCalls;
47856
+ if (message.tool_calls && message.tool_calls.length > 0) {
47857
+ toolCalls = message.tool_calls.map((tc) => ({
47858
+ id: tc.id,
47859
+ name: tc.function.name,
47860
+ arguments: JSON.parse(tc.function.arguments)
47861
+ }));
47862
+ }
47863
+ let finishReason = "stop";
47864
+ if (choice.finish_reason === "tool_calls") {
47865
+ finishReason = "tool_calls";
47866
+ } else if (choice.finish_reason === "length") {
47867
+ finishReason = "length";
47868
+ }
47869
+ return {
47870
+ content: message.content || "",
47871
+ toolCalls,
47872
+ finishReason
47873
+ };
47874
+ }
47875
+ };
47876
+ }
47877
+ });
47878
+
47753
47879
  // src/commands/detect.ts
47754
47880
  var detect_exports = {};
47755
47881
  __export(detect_exports, {
@@ -58347,6 +58473,7 @@ init_gemini2();
58347
58473
  init_ollama2();
58348
58474
  init_xai();
58349
58475
  init_openrouter();
58476
+ init_evolink();
58350
58477
  async function createAdapter(provider) {
58351
58478
  switch (provider) {
58352
58479
  case "openai": {
@@ -58373,6 +58500,10 @@ async function createAdapter(provider) {
58373
58500
  const { OpenRouterAdapter: OpenRouterAdapter2 } = await Promise.resolve().then(() => (init_openrouter(), openrouter_exports));
58374
58501
  return new OpenRouterAdapter2();
58375
58502
  }
58503
+ case "evolink": {
58504
+ const { EvolinkAdapter: EvolinkAdapter2 } = await Promise.resolve().then(() => (init_evolink(), evolink_exports));
58505
+ return new EvolinkAdapter2();
58506
+ }
58376
58507
  default:
58377
58508
  throw new Error(`Unknown provider: ${provider}`);
58378
58509
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibeframe/cli",
3
- "version": "0.113.6",
3
+ "version": "0.113.8",
4
4
  "description": "VibeFrame CLI - agentic video workflow runtime",
5
5
  "private": false,
6
6
  "license": "MIT",
@@ -83,8 +83,8 @@
83
83
  "tsx": "^4.21.0",
84
84
  "typescript": "^5.3.3",
85
85
  "vitest": "^1.2.2",
86
- "@vibeframe/ai-providers": "0.113.6",
87
- "@vibeframe/core": "0.113.6"
86
+ "@vibeframe/ai-providers": "0.113.8",
87
+ "@vibeframe/core": "0.113.8"
88
88
  },
89
89
  "engines": {
90
90
  "node": ">=20"