@vibeframe/mcp-server 0.42.0 → 0.44.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.
Files changed (2) hide show
  1. package/dist/index.js +69 -0
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -8048,7 +8048,23 @@ function authError(envVar, provider) {
8048
8048
  retryable: false
8049
8049
  };
8050
8050
  }
8051
+ var PROVIDER_ERROR_HINTS = [
8052
+ { pattern: /429|rate.?limit|too many requests/i, suggestion: "Rate limited. Wait 30-60 seconds and retry, or check your plan's rate limits.", retryable: true },
8053
+ { pattern: /401|unauthorized|invalid.*key|authentication/i, suggestion: "API key is invalid or expired. Run 'vibe setup' to update, or check the key at the provider's dashboard.", retryable: false },
8054
+ { pattern: /403|forbidden|permission/i, suggestion: "Access denied. Your API key may lack required permissions, or the feature requires a paid plan.", retryable: false },
8055
+ { pattern: /402|payment|billing|quota|exceeded|insufficient/i, suggestion: "Account quota exceeded or billing issue. Check your provider dashboard for usage limits.", retryable: false },
8056
+ { pattern: /500|internal.*error|server.*error/i, suggestion: "Provider server error. Retry in a few minutes.", retryable: true },
8057
+ { pattern: /503|service.*unavailable|overloaded/i, suggestion: "Provider is temporarily overloaded. Retry in 1-2 minutes.", retryable: true },
8058
+ { pattern: /timeout|timed?\s*out|ETIMEDOUT/i, suggestion: "Request timed out. The provider may be slow. Retry, or try a different provider with -p flag.", retryable: true },
8059
+ { pattern: /content.*policy|safety|moderation|blocked/i, suggestion: "Content was blocked by the provider's safety filter. Rephrase your prompt.", retryable: false },
8060
+ { pattern: /model.*not.*found|invalid.*model/i, suggestion: "The specified model is unavailable. Check 'vibe schema <command>' for valid model options.", retryable: false }
8061
+ ];
8051
8062
  function apiError(msg, retryable = false) {
8063
+ for (const hint of PROVIDER_ERROR_HINTS) {
8064
+ if (hint.pattern.test(msg)) {
8065
+ return { success: false, error: msg, code: "API_ERROR", exitCode: 5 /* API_ERROR */, suggestion: hint.suggestion, retryable: hint.retryable };
8066
+ }
8067
+ }
8052
8068
  return { success: false, error: msg, code: "API_ERROR", exitCode: 5 /* API_ERROR */, suggestion: retryable ? "Retry the command." : void 0, retryable };
8053
8069
  }
8054
8070
  function notFoundError(path) {
@@ -8076,7 +8092,60 @@ function isJsonMode() {
8076
8092
  function isQuietMode() {
8077
8093
  return process.env.VIBE_QUIET_OUTPUT === "1";
8078
8094
  }
8095
+ var COST_ESTIMATES = {
8096
+ // Free
8097
+ "detect scenes": { min: 0, max: 0, unit: "free" },
8098
+ "detect silence": { min: 0, max: 0, unit: "free" },
8099
+ "detect beats": { min: 0, max: 0, unit: "free" },
8100
+ "edit silence-cut": { min: 0, max: 0, unit: "free" },
8101
+ "edit fade": { min: 0, max: 0, unit: "free" },
8102
+ "edit noise-reduce": { min: 0, max: 0, unit: "free" },
8103
+ "edit reframe": { min: 0, max: 0, unit: "free" },
8104
+ "edit interpolate": { min: 0, max: 0, unit: "free" },
8105
+ "edit upscale-video": { min: 0, max: 0, unit: "free" },
8106
+ // Low
8107
+ "analyze media": { min: 0.01, max: 0.05, unit: "per call" },
8108
+ "analyze video": { min: 0.01, max: 0.1, unit: "per video" },
8109
+ "analyze review": { min: 0.01, max: 0.1, unit: "per video" },
8110
+ "generate image": { min: 0.01, max: 0.07, unit: "per image" },
8111
+ "generate thumbnail": { min: 0.01, max: 0.05, unit: "per image" },
8112
+ "generate storyboard": { min: 0.01, max: 0.05, unit: "per call" },
8113
+ "ai transcribe": { min: 0.01, max: 0.1, unit: "per minute" },
8114
+ "audio transcribe": { min: 0.01, max: 0.1, unit: "per minute" },
8115
+ "edit caption": { min: 0.01, max: 0.1, unit: "per video" },
8116
+ "edit jump-cut": { min: 0.01, max: 0.1, unit: "per video" },
8117
+ "edit translate-srt": { min: 0.01, max: 0.05, unit: "per file" },
8118
+ "edit animated-caption": { min: 0.01, max: 0.1, unit: "per video" },
8119
+ // Medium
8120
+ "generate speech": { min: 0.05, max: 0.3, unit: "per request" },
8121
+ "generate sound-effect": { min: 0.05, max: 0.2, unit: "per request" },
8122
+ "generate music": { min: 0.05, max: 0.5, unit: "per request" },
8123
+ "generate motion": { min: 0.01, max: 0.1, unit: "per generation" },
8124
+ "edit grade": { min: 0.01, max: 0.05, unit: "per video" },
8125
+ "edit speed-ramp": { min: 0.05, max: 0.15, unit: "per video" },
8126
+ "edit text-overlay": { min: 0, max: 0.05, unit: "per video" },
8127
+ // High
8128
+ "generate video": { min: 0.5, max: 5, unit: "per video" },
8129
+ "edit image": { min: 0.05, max: 0.5, unit: "per edit" },
8130
+ // Very High
8131
+ "pipeline script-to-video": { min: 5, max: 50, unit: "per project" },
8132
+ "pipeline highlights": { min: 0.05, max: 1, unit: "per analysis" },
8133
+ "pipeline auto-shorts": { min: 0.1, max: 2, unit: "per batch" },
8134
+ "pipeline animated-caption": { min: 0.01, max: 0.1, unit: "per video" },
8135
+ "pipeline regenerate-scene": { min: 0.5, max: 5, unit: "per scene" }
8136
+ };
8137
+ function formatCost(min, max, unit) {
8138
+ if (min === 0 && max === 0) return "Free";
8139
+ if (min === max) return `~$${min.toFixed(2)} ${unit}`;
8140
+ return `~$${min.toFixed(2)}-$${max.toFixed(2)} ${unit}`;
8141
+ }
8079
8142
  function outputResult(result) {
8143
+ if (result.dryRun && result.command && typeof result.command === "string") {
8144
+ const cost = COST_ESTIMATES[result.command];
8145
+ if (cost) {
8146
+ result.estimatedCost = formatCost(cost.min, cost.max, cost.unit);
8147
+ }
8148
+ }
8080
8149
  if (isJsonMode()) {
8081
8150
  const fields = process.env.VIBE_OUTPUT_FIELDS;
8082
8151
  if (fields) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibeframe/mcp-server",
3
- "version": "0.42.0",
3
+ "version": "0.44.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/core": "0.42.0",
61
- "@vibeframe/cli": "0.42.0"
60
+ "@vibeframe/cli": "0.44.0",
61
+ "@vibeframe/core": "0.44.0"
62
62
  },
63
63
  "engines": {
64
64
  "node": ">=20"