@vibeframe/cli 0.86.0 → 0.87.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 +38 -30
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -62837,7 +62837,7 @@ init_source();
62837
62837
  // package.json
62838
62838
  var package_default = {
62839
62839
  name: "@vibeframe/cli",
62840
- version: "0.86.0",
62840
+ version: "0.87.0",
62841
62841
  description: "VibeFrame CLI - natural language video editing from the terminal",
62842
62842
  private: false,
62843
62843
  license: "MIT",
@@ -65122,13 +65122,20 @@ applyTiers(remixCommand, {
65122
65122
  init_esm();
65123
65123
  init_output();
65124
65124
  init_cost_tier();
65125
- var schemaCommand = new Command("schema").description("Show JSON schema for a CLI command").argument("[command]", "Command path (e.g., generate.image, edit.silence-cut)").option("--list", "List all available command paths").action((commandPath, options) => {
65125
+ var schemaCommand = new Command("schema").description("Show JSON schema for a CLI command").argument("[command]", "Command path (e.g., generate.image, edit.silence-cut)").option("--list", "List all available command paths").option("--filter <tier>", "With --list, only show commands at the given cost tier (free | low | high | very-high)").action((commandPath, options) => {
65126
65126
  const program3 = schemaCommand.parent;
65127
65127
  if (!program3) {
65128
65128
  exitWithError(generalError("Schema command must be registered on a program"));
65129
65129
  }
65130
65130
  if (options.list || !commandPath) {
65131
- listCommands(program3);
65131
+ const validTiers = /* @__PURE__ */ new Set(["free", "low", "high", "very-high"]);
65132
+ if (options.filter && !validTiers.has(options.filter)) {
65133
+ exitWithError(usageError(
65134
+ `Invalid --filter: ${options.filter}`,
65135
+ `Must be one of: free, low, high, very-high (matches the cost field on each subcommand).`
65136
+ ));
65137
+ }
65138
+ listCommands(program3, options.filter);
65132
65139
  return;
65133
65140
  }
65134
65141
  const parts = commandPath.split(".");
@@ -65168,7 +65175,7 @@ var schemaCommand = new Command("schema").description("Show JSON schema for a CL
65168
65175
  const schema = buildSchema(actionCmd, toolName);
65169
65176
  console.log(JSON.stringify(schema, null, 2));
65170
65177
  });
65171
- function listCommands(program3) {
65178
+ function listCommands(program3, filter) {
65172
65179
  const commands = [];
65173
65180
  const skipTopLevel = /* @__PURE__ */ new Set(["help", "schema"]);
65174
65181
  for (const group of program3.commands) {
@@ -65179,6 +65186,7 @@ function listCommands(program3) {
65179
65186
  const desc = group.description() || "";
65180
65187
  if (desc.toLowerCase().includes("deprecated")) continue;
65181
65188
  const cost = getCostTier(group);
65189
+ if (filter && cost !== filter) continue;
65182
65190
  commands.push({ path: name, description: desc, ...cost ? { cost } : {} });
65183
65191
  continue;
65184
65192
  }
@@ -65186,6 +65194,7 @@ function listCommands(program3) {
65186
65194
  const desc = sub.description() || "";
65187
65195
  if (desc.toLowerCase().includes("deprecated")) continue;
65188
65196
  const cost = getCostTier(sub);
65197
+ if (filter && cost !== filter) continue;
65189
65198
  commands.push({
65190
65199
  path: `${name}.${sub.name()}`,
65191
65200
  description: desc,
@@ -72084,18 +72093,27 @@ Run 'vibe schema run' for structured parameter info.
72084
72093
  } else {
72085
72094
  console.log(source_default.bold(" Execution Plan:"));
72086
72095
  console.log();
72096
+ let totalMax = 0;
72087
72097
  for (let i = 0; i < result2.steps.length; i++) {
72088
72098
  const step = result2.steps[i];
72089
72099
  const est = step.data?.estimatedCost;
72100
+ if (typeof est === "string") {
72101
+ const m = est.match(/\$([\d.]+)/);
72102
+ if (m) totalMax += parseFloat(m[1]);
72103
+ }
72090
72104
  const costTag = est ? source_default.dim(` ~${est}`) : "";
72091
72105
  console.log(` ${source_default.dim(`${i + 1}.`)} ${source_default.bold(step.id)} ${source_default.dim(`\u2192 ${step.action}`)}${costTag}`);
72092
72106
  }
72093
- if (result2.budget) {
72107
+ if (totalMax > 0) {
72094
72108
  console.log();
72095
- console.log(source_default.dim(` Total upper-bound: $${result2.budget.estimatedCostUsd.toFixed(2)}`));
72109
+ console.log(source_default.dim(` Total upper-bound: $${totalMax.toFixed(2)}`) + source_default.dim(` (sum of per-step ceilings)`));
72110
+ }
72111
+ if (result2.budget) {
72096
72112
  if (result2.budget.abortedBy) {
72097
72113
  console.log(source_default.yellow(` \u26A0 Budget ceiling exceeded (${result2.budget.abortedBy}) \u2014 execution will abort.`));
72098
72114
  }
72115
+ } else if (totalMax > 0) {
72116
+ console.log(source_default.dim(` Tip: cap with --budget-usd ${Math.ceil(totalMax)} to abort if cost exceeds the estimate.`));
72099
72117
  }
72100
72118
  console.log();
72101
72119
  console.log(source_default.dim(" Run without --dry-run to execute."));
@@ -72745,30 +72763,20 @@ init_tty();
72745
72763
  init_api_key();
72746
72764
  init_output();
72747
72765
  async function promptConfirm2(toolName, args, cost) {
72748
- const { createInterface: createInterface4 } = await import("node:readline");
72749
- const rl = createInterface4({
72750
- input: process.stdin,
72751
- output: process.stdout,
72752
- terminal: process.stdin.isTTY ?? false
72753
- });
72754
- return new Promise((resolve64) => {
72755
- const argsStr = JSON.stringify(args, null, 2);
72756
- console.log();
72757
- const tierColor = {
72758
- "free": source_default.green,
72759
- "low": source_default.cyan,
72760
- "medium": source_default.yellow,
72761
- "high": source_default.yellow,
72762
- "very-high": source_default.red
72763
- };
72764
- const costBadge = cost ? ` ${tierColor[cost](`[${cost.toUpperCase()}]`)}` : "";
72765
- console.log(source_default.yellow(`Execute ${source_default.bold(toolName)}?${costBadge}`));
72766
- console.log(source_default.dim(argsStr));
72767
- rl.question(source_default.cyan("(y/n): "), (answer) => {
72768
- rl.close();
72769
- resolve64(answer.toLowerCase() === "y" || answer.toLowerCase() === "yes");
72770
- });
72771
- });
72766
+ const argsStr = JSON.stringify(args, null, 2);
72767
+ const tierColor = {
72768
+ "free": source_default.green,
72769
+ "low": source_default.cyan,
72770
+ "medium": source_default.yellow,
72771
+ "high": source_default.yellow,
72772
+ "very-high": source_default.red
72773
+ };
72774
+ const costBadge = cost ? ` ${tierColor[cost](`[${cost.toUpperCase()}]`)}` : "";
72775
+ console.log();
72776
+ console.log(source_default.yellow(`Execute ${source_default.bold(toolName)}?${costBadge}`));
72777
+ console.log(source_default.dim(argsStr));
72778
+ const defaultYes = cost !== "very-high";
72779
+ return promptConfirm("", defaultYes);
72772
72780
  }
72773
72781
  async function startAgent(options = {}) {
72774
72782
  const isNonInteractive = !!options.input;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibeframe/cli",
3
- "version": "0.86.0",
3
+ "version": "0.87.0",
4
4
  "description": "VibeFrame CLI - natural language video editing from the terminal",
5
5
  "private": false,
6
6
  "license": "MIT",
@@ -183,8 +183,8 @@
183
183
  "tsx": "^4.21.0",
184
184
  "typescript": "^5.3.3",
185
185
  "vitest": "^1.2.2",
186
- "@vibeframe/ai-providers": "0.86.0",
187
- "@vibeframe/core": "0.86.0"
186
+ "@vibeframe/ai-providers": "0.87.0",
187
+ "@vibeframe/core": "0.87.0"
188
188
  },
189
189
  "engines": {
190
190
  "node": ">=20"