@nodaro/cli 1.38.0 → 1.40.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/README.md CHANGED
@@ -124,7 +124,7 @@ nodaro nodes run <type> --params-file body.json [--watch] [--poll-interval 1000]
124
124
 
125
125
  # Models — browse the model catalog (makers, capability sheets, credit pricing, prompt tips)
126
126
  nodaro models list [--kind video] [--mode i2v] [--family Google] [--featured]
127
- nodaro models cost <id…> # credits charged per id; a metered LLM key (llm-chat:<model>) prints ~N, an estimate
127
+ nodaro models cost <id…> # credits charged per id; a metered LLM key (llm-chat:<model>) prints ≈N, an estimate
128
128
 
129
129
  # Pickers — valid values for parameter-picker nodes (setting, mood, person, …)
130
130
  nodaro pickers list # all picker node types + option counts + pictures
package/dist/index.js CHANGED
@@ -41,7 +41,7 @@ var require_package = __commonJS({
41
41
  "package.json"(exports$1, module) {
42
42
  module.exports = {
43
43
  name: "@nodaro/cli",
44
- version: "1.38.0",
44
+ version: "1.40.0",
45
45
  description: "Command-line interface for Nodaro \u2014 list and run workflows, inspect jobs and executions, manage projects from the terminal.",
46
46
  type: "module",
47
47
  license: "Apache-2.0",
@@ -82,11 +82,11 @@ var require_package = __commonJS({
82
82
  "@inquirer/confirm": "^6.0.12",
83
83
  "@inquirer/input": "^5.0.12",
84
84
  "@inquirer/select": "^5.1.4",
85
- "@nodaro/sdk": "^2.43.0",
86
- "@nodaro/shared": "^3.38.0",
85
+ "@nodaro/sdk": "^2.45.0",
86
+ "@nodaro/shared": "^3.42.0",
87
87
  commander: "^12.1.0",
88
88
  picocolors: "^1.1.1",
89
- "@nodaro/prompts": "^1.40.0"
89
+ "@nodaro/prompts": "^1.42.1"
90
90
  },
91
91
  devDependencies: {
92
92
  tsup: "^8.5.0",
@@ -413,7 +413,7 @@ function saveWorkspace(profileName, workspaceId) {
413
413
  }
414
414
 
415
415
  // src/client.ts
416
- var CLI_VERSION = "1.38.0" ;
416
+ var CLI_VERSION = "1.40.0" ;
417
417
  function buildPublicClient(opts = {}) {
418
418
  const { profile } = getProfile(opts.profile);
419
419
  return createClient({
@@ -1133,8 +1133,9 @@ function workflowsCommand() {
1133
1133
  success(`Render final of ${renderNodeId} runs ${quote.nodeIds.join(", ")}`);
1134
1134
  if (quote.estimatedCredits !== null) {
1135
1135
  dim(
1136
- // `~`: an LLM node in the run is charged its actual usage, so the figure is an estimate.
1137
- `estimated ${quote.estimatedCreditsIsEstimate ? "~" : ""}${quote.estimatedCredits} credits` + (quote.sufficient === false ? ` \u2014 not covered${quote.available !== null ? ` (${quote.available} available)` : ""}` : "")
1136
+ // `≈`: an LLM node in the run is charged its actual usage, so the figure is an estimate.
1137
+ `estimated ${quote.estimatedCreditsIsEstimate ? "\u2248" : ""}${quote.estimatedCredits} credits` + (quote.sufficient === false ? ` \u2014 not covered` + // The balance is checked against what the run holds while it renders: named when it is more than the price.
1138
+ (typeof quote.holdCredits === "number" && quote.holdCredits > quote.estimatedCredits ? `: holds up to about ${quote.holdCredits} credits while it renders` : "") + (quote.available !== null ? ` (${quote.available} available)` : "") : "")
1138
1139
  );
1139
1140
  }
1140
1141
  return;
@@ -1201,6 +1202,30 @@ function workflowsCommand() {
1201
1202
  handleError(err);
1202
1203
  }
1203
1204
  });
1205
+ cmd.command("mcp-conversations").description("list your MCP conversations of one month \u2014 each a flow an assistant built").option("--month <YYYY-MM>", "the month to list (default: the latest month that has conversations)").option("--source <list>", "only these sources, comma-separated (claude, claude-code, chatgpt, ...)").option("--profile <name>").option("--json").action(async (opts) => {
1206
+ try {
1207
+ const client = buildClient(opts.profile);
1208
+ const sources = opts.source?.split(",").map((s) => s.trim()).filter(Boolean);
1209
+ const result = await client.workflows.listMcpConversations({ month: opts.month, sources });
1210
+ if (opts.json) {
1211
+ emit(result, opts);
1212
+ return;
1213
+ }
1214
+ table(
1215
+ result.data.map((c) => ({
1216
+ id: c.id,
1217
+ name: c.name,
1218
+ source: c.clientLabel,
1219
+ nodes: c.nodeCount,
1220
+ credits: c.credits ?? "",
1221
+ startedAt: c.startedAt
1222
+ })),
1223
+ ["id", "name", "source", "nodes", "credits", "startedAt"]
1224
+ );
1225
+ } catch (err) {
1226
+ handleError(err);
1227
+ }
1228
+ });
1204
1229
  cmd.addCommand(collaboratorsCommand());
1205
1230
  return cmd;
1206
1231
  }
@@ -1843,7 +1868,7 @@ async function pickNodeInteractively(client) {
1843
1868
  }
1844
1869
  function nodeCreditsLabel(n) {
1845
1870
  if (n.creditCost === "unpriced") return "unpriced";
1846
- return `${n.estimate ? "~" : ""}${n.creditCost} cr`;
1871
+ return `${n.estimate ? "\u2248" : ""}${n.creditCost} cr`;
1847
1872
  }
1848
1873
  function rejectPositionalParams(extras, example) {
1849
1874
  if (!extras || extras.length === 0) return;
@@ -1876,7 +1901,7 @@ function nodesCommand() {
1876
1901
  label: n.label,
1877
1902
  category: n.category,
1878
1903
  outputType: n.outputType,
1879
- credits: n.creditCost === void 0 ? "" : n.estimate ? `~${n.creditCost}` : n.creditCost,
1904
+ credits: n.creditCost === void 0 ? "" : n.estimate ? `\u2248${n.creditCost}` : n.creditCost,
1880
1905
  providers: n.providers ? n.providers.length : ""
1881
1906
  })),
1882
1907
  ["type", "label", "category", "outputType", "credits", "providers"]
@@ -3668,12 +3693,13 @@ image, passed through unchanged): \`nodaro jobs get <jobId>\`. Use the mask for
3668
3693
  handleError(err);
3669
3694
  }
3670
3695
  });
3671
- cmd.command("video-mask <videoUrl> <prompt>").description("track a subject described in text through a video (SAM 3.1, or --model sam-3 at half the price) and get a black-and-white mask video back (white = the subject)").option("--model <model>", `${VIDEO_MASK_PROVIDERS.join(" | ")} (default ${DEFAULT_VIDEO_MASK_PROVIDER})`).option("--threshold <n>", `detection confidence ${VIDEO_MASK_LIMITS.THRESHOLD_MIN}\u2013${VIDEO_MASK_LIMITS.THRESHOLD_MAX} (default ${VIDEO_MASK_LIMITS.THRESHOLD_DEFAULT}; lower finds more)`, parseFloat).option("--hold-last-mask", "keep the last mask on frames where the subject is lost (e.g. hidden behind a hand)").option("--min-subject-height <pct>", `ignore subjects smaller than this % of the frame height, ${VIDEO_MASK_LIMITS.MIN_SUBJECT_HEIGHT_PCT_MIN}\u2013${VIDEO_MASK_LIMITS.MIN_SUBJECT_HEIGHT_PCT_MAX} (default 0 = off)`, (v) => Number(v)).option("--max-subject-height <pct>", `ignore subjects larger than this % of the frame height, ${VIDEO_MASK_LIMITS.MAX_SUBJECT_HEIGHT_PCT_MIN}\u2013${VIDEO_MASK_LIMITS.MAX_SUBJECT_HEIGHT_PCT_MAX} (default 0 = off)`, (v) => Number(v)).option("--zone <L,R,T,B>", `keep only subjects whose centre is inside these left,right,top,bottom margins, each ${VIDEO_MASK_LIMITS.ZONE_MARGIN_PCT_MIN}\u2013${VIDEO_MASK_LIMITS.ZONE_MARGIN_PCT_MAX} % of the frame (default off)`).option("--per-shot", "detect the subject again in every shot after a scene cut").option("--watch", "poll until the job completes").option("--poll-interval <ms>", "watch poll interval in ms", (v) => parseInt(v, 10), 2e3).option("--profile <name>").option("--json").addHelpText("after", `
3696
+ cmd.command("video-mask <videoUrl> <prompt>").description("track a subject described in text through a video (SAM 3.1, or --model sam-3 at half the price) and get a black-and-white mask video back (white = the subject)").option("--model <model>", `${VIDEO_MASK_PROVIDERS.join(" | ")} (default ${DEFAULT_VIDEO_MASK_PROVIDER})`).option("--threshold <n>", `detection confidence ${VIDEO_MASK_LIMITS.THRESHOLD_MIN}\u2013${VIDEO_MASK_LIMITS.THRESHOLD_MAX} (default ${VIDEO_MASK_LIMITS.THRESHOLD_DEFAULT}; lower finds more)`, parseFloat).option("--hold-last-mask", "keep the last mask on frames where the subject is lost (e.g. hidden behind a hand), for up to 1 s").option("--min-subject-height <pct>", `ignore subjects smaller than this % of the frame height, ${VIDEO_MASK_LIMITS.MIN_SUBJECT_HEIGHT_PCT_MIN}\u2013${VIDEO_MASK_LIMITS.MIN_SUBJECT_HEIGHT_PCT_MAX} (default 0 = off)`, (v) => Number(v)).option("--max-subject-height <pct>", `ignore subjects larger than this % of the frame height, ${VIDEO_MASK_LIMITS.MAX_SUBJECT_HEIGHT_PCT_MIN}\u2013${VIDEO_MASK_LIMITS.MAX_SUBJECT_HEIGHT_PCT_MAX} (default 0 = off)`, (v) => Number(v)).option("--zone <L,R,T,B>", `keep only subjects whose centre is inside these left,right,top,bottom margins, each ${VIDEO_MASK_LIMITS.ZONE_MARGIN_PCT_MIN}\u2013${VIDEO_MASK_LIMITS.ZONE_MARGIN_PCT_MAX} % of the frame (default off)`).option("--per-shot", "detect the subject again in every shot after a scene cut").option("--redetect-every <sec>", `also detect the subject again every <sec> seconds, ${VIDEO_MASK_LIMITS.REDETECT_EVERY_SEC_MIN}\u2013${VIDEO_MASK_LIMITS.REDETECT_EVERY_SEC_MAX} (default 0 = off) \u2014 catches someone who enters or turns to camera mid-shot; slower, same price`, (v) => Number(v)).option("--watch", "poll until the job completes").option("--poll-interval <ms>", "watch poll interval in ms", (v) => parseInt(v, 10), 2e3).option("--profile <name>").option("--json").addHelpText("after", `
3672
3697
  Examples:
3673
3698
  $ nodaro media video-mask https://x/dance.mp4 "the dancer" --watch
3674
3699
  $ nodaro media video-mask https://x/street.mp4 "person, dog" --threshold 0.3 --watch
3675
3700
  $ nodaro media video-mask https://x/long-take.mp4 "the skater" --model sam-3 --watch
3676
3701
  $ nodaro media video-mask https://x/edit.mp4 "face" --per-shot --zone 10,10,5,5 --watch
3702
+ $ nodaro media video-mask https://x/edit.mp4 "face" --per-shot --redetect-every 1 --watch
3677
3703
 
3678
3704
  Clips up to ${VIDEO_MASK_LIMITS.MAX_BILLED_SEC} s at ${VIDEO_MASK_LIMITS.FPS_BASIS} fps (a faster clip counts proportionally longer); priced by the
3679
3705
  clip's length. Feed the mask to \`nodaro media mask-composite\`.`).action(async (videoUrl, prompt, opts) => {
@@ -3698,6 +3724,10 @@ clip's length. Feed the mask to \`nodaro media mask-composite\`.`).action(async
3698
3724
  warn("--min-subject-height is above --max-subject-height: no subject could be kept");
3699
3725
  process.exit(1);
3700
3726
  }
3727
+ if (opts.redetectEvery !== void 0 && !(Number.isFinite(opts.redetectEvery) && (opts.redetectEvery === 0 || opts.redetectEvery >= VIDEO_MASK_LIMITS.REDETECT_EVERY_SEC_MIN && opts.redetectEvery <= VIDEO_MASK_LIMITS.REDETECT_EVERY_SEC_MAX))) {
3728
+ warn(`--redetect-every must be 0 (off) or a number of seconds from ${VIDEO_MASK_LIMITS.REDETECT_EVERY_SEC_MIN} to ${VIDEO_MASK_LIMITS.REDETECT_EVERY_SEC_MAX}`);
3729
+ process.exit(1);
3730
+ }
3701
3731
  const zone = opts.zone !== void 0 ? parseVideoMaskZone(opts.zone) : void 0;
3702
3732
  const client = buildClient(opts.profile);
3703
3733
  const result = await client.media.videoMask({
@@ -3709,7 +3739,8 @@ clip's length. Feed the mask to \`nodaro media mask-composite\`.`).action(async
3709
3739
  ...opts.minSubjectHeight !== void 0 ? { minSubjectHeightPct: opts.minSubjectHeight } : {},
3710
3740
  ...opts.maxSubjectHeight !== void 0 ? { maxSubjectHeightPct: opts.maxSubjectHeight } : {},
3711
3741
  ...zone ? { zone } : {},
3712
- ...opts.perShot ? { perShot: true } : {}
3742
+ ...opts.perShot ? { perShot: true } : {},
3743
+ ...opts.redetectEvery !== void 0 ? { redetectEverySec: opts.redetectEvery } : {}
3713
3744
  });
3714
3745
  await reportQueuedJob(result, () => client.jobs.get(result.jobId), { ...opts, note: "video mask" });
3715
3746
  } catch (err) {
@@ -5676,13 +5707,13 @@ Examples:
5676
5707
  }
5677
5708
  );
5678
5709
  cmd.command("cost <ids...>").description(
5679
- "credits each identifier is charged \u2014 a model id, a credit id, or a metered LLM price key (<feature>:<model>[:direct]); an estimate prints as ~N"
5710
+ "credits each identifier is charged \u2014 a model id, a credit id, or a metered LLM price key (<feature>:<model>[:direct]); an estimate prints as \u2248N"
5680
5711
  ).option("--profile <name>").option("--json").addHelpText(
5681
5712
  "after",
5682
5713
  `
5683
5714
  A metered LLM price key (llmPriceKey from @nodaro/shared/llm-models) is
5684
5715
  charged for the tokens the call actually uses, so its figure is an estimate of
5685
- a typical call and prints as ~N. Every model's per-token rate:
5716
+ a typical call and prints as \u2248N. Every model's per-token rate:
5686
5717
  docs/pricing/llm-models.md.
5687
5718
 
5688
5719
  Examples:
@@ -5712,7 +5743,7 @@ function costRows(ids, result) {
5712
5743
  const credits = result.data[id];
5713
5744
  if (typeof credits === "number") {
5714
5745
  const estimate = estimates.has(id);
5715
- return { id, credits: estimate ? `~${credits}` : String(credits), note: estimate ? "estimate: charged per token used" : "" };
5746
+ return { id, credits: estimate ? `\u2248${credits}` : String(credits), note: estimate ? "estimate: charged per token used" : "" };
5716
5747
  }
5717
5748
  if (errors.has(id)) return { id, credits: "-", note: terminalSafe(result.errorCodes?.[id]?.message ?? "could not be priced") };
5718
5749
  if (missing.has(id)) return { id, credits: "-", note: "no price on this server" };
@@ -5936,7 +5967,12 @@ function addRunFlags(cmd) {
5936
5967
  "--choice <key.chip=new|original>",
5937
5968
  "a slot's chip: make it anew from your pictures or keep the clip's, e.g. person.outfit=original (repeatable; only the chips `trends get` lists for the slot)",
5938
5969
  collectVariadic
5939
- ).option("--example <n>", "1-based example whose pictures fill the optional slots you leave empty (default 1)").option("--details <text>", "your own words (at most 1,000 characters); mention a slot as {slot:<key>}").option("--preview", "a 4-second preview run (only when the trend offers one)").addOption(new Option("--resolution <r>", "default 480p").choices([...RESOLUTIONS])).option("--no-draft", "a full run instead of a draft (a draft is 480p only, and the default there)");
5970
+ ).option(
5971
+ "--example <n>",
5972
+ "1-based example whose pictures fill the optional slots you leave empty (default 1); leave it out on a trend with no example, whose empty optional slots stay as in the original"
5973
+ ).option("--details <text>", "your own words (at most 1,000 characters); mention a slot as {slot:<key>}").option("--preview", "a 4-second preview run (only when the trend offers one)").addOption(
5974
+ new Option("--resolution <r>", "one the trend offers (`trends get`); default its first: 480p, or 720p on a Kling 4 trend").choices([...RESOLUTIONS])
5975
+ ).option("--no-draft", "a full run instead of a draft (a draft is 480p only, and the default there; a Kling 4 trend has none)");
5940
5976
  }
5941
5977
  function checkSlotKey(flag, spec, key2) {
5942
5978
  if (!SLOT_KEY_RE.test(key2) || key2 === "__proto__") {
@@ -6039,7 +6075,7 @@ function trendsCommand() {
6039
6075
  handleError(err);
6040
6076
  }
6041
6077
  });
6042
- cmd.command("get <slug>").description("a trend's page: its slots, examples, preview and resolutions").option("--locale <locale>", "language of names and descriptions").option("--profile <name>").option("--json").action(async (slug, opts) => {
6078
+ cmd.command("get <slug>").description("a trend's page: its original, slots, examples, preview, engine and resolutions").option("--locale <locale>", "language of names and descriptions").option("--profile <name>").option("--json").action(async (slug, opts) => {
6043
6079
  try {
6044
6080
  const trend = await buildClient(opts.profile).trends.get(slug, { locale: opts.locale });
6045
6081
  if (opts.json) emit(trend, opts);
@@ -6145,9 +6181,9 @@ function trendsCommand() {
6145
6181
  }
6146
6182
  function fullQualityCommand() {
6147
6183
  const cmd = new Command("full-quality").description(
6148
- "finish a draft run (Cast Swap or trend) at Full Quality: the same take at 1080p, as a new job \u2014 `estimate` quotes it (free), `run` SPENDS CREDITS"
6184
+ "finish a run (Cast Swap or trend) at Full Quality at 1080p, as a new job: a draft's same take, or a new take of a Kling 4 720p run \u2014 `estimate` quotes it (free), `run` SPENDS CREDITS"
6149
6185
  );
6150
- cmd.command("estimate <jobId>").description("quote finishing the draft at Full Quality (free): the credits, and until when the draft can be finished").option("--profile <name>").option("--json").action(async (jobId, opts) => {
6186
+ cmd.command("estimate <jobId>").description("quote finishing the run at Full Quality (free): same or new take, the credits, and until when it can be finished").option("--profile <name>").option("--json").action(async (jobId, opts) => {
6151
6187
  try {
6152
6188
  const quote = await buildClient(opts.profile).castSwap.fullQualityEstimate(jobId);
6153
6189
  if (opts.json) {
@@ -6155,9 +6191,12 @@ function fullQualityCommand() {
6155
6191
  return;
6156
6192
  }
6157
6193
  info(`about ${quote.totalCredits} credits`);
6158
- dim(` castSwap: ${quote.breakdown.castSwap}`);
6159
- dim(` seedanceHd: ${quote.breakdown.seedanceHd}`);
6160
- if (quote.breakdown.seedanceHd === 0) dim(" an earlier try's 1080p render is reused");
6194
+ if (quote.kind === "new-take") dim("a NEW take at 1080p from the same inputs (the 720p run stays)");
6195
+ else dim("the same take at 1080p");
6196
+ for (const [part, credits] of Object.entries(quote.breakdown)) {
6197
+ if (typeof credits === "number") dim(` ${terminalSafe(part)}: ${credits}`);
6198
+ }
6199
+ if (quote.kind !== "new-take" && quote.breakdown.seedanceHd === 0) dim(" an earlier try's 1080p render is reused");
6161
6200
  dim(`available until ${terminalSafe(quote.availableUntil)}`);
6162
6201
  } catch (err) {
6163
6202
  handleError(err);
@@ -6174,7 +6213,7 @@ function fullQualityCommand() {
6174
6213
  return;
6175
6214
  }
6176
6215
  const id = terminalSafe(result.jobId);
6177
- if (result.existing) info(`this draft's Full Quality already exists \u2014 job ${id} (nothing new was charged)`);
6216
+ if (result.existing) info(`this run's Full Quality already exists \u2014 job ${id} (nothing new was charged)`);
6178
6217
  else success(`started Full Quality \u2014 job ${id}`);
6179
6218
  dim(`follow it: nodaro jobs get ${id}`);
6180
6219
  } catch (err) {
@@ -6524,7 +6563,7 @@ var MOTION_PROVIDERS = [
6524
6563
  "minimax",
6525
6564
  "hailuo-2.3",
6526
6565
  "wan-i2v",
6527
- "seedance",
6566
+ "seedance-2-mini",
6528
6567
  "bytedance-lite"
6529
6568
  ];
6530
6569
  var ASSET_TYPE_TO_COLUMN2 = {