gunni 0.3.6 → 0.3.7

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 +47 -25
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -69400,7 +69400,8 @@ async function downloadImage(url2, outputPath, onProgress) {
69400
69400
  const correctExt = await detectImageFormat(outputPath);
69401
69401
  const currentExt = extname(outputPath).toLowerCase();
69402
69402
  if (correctExt && correctExt !== currentExt) {
69403
- const fixedPath = outputPath.slice(0, -currentExt.length) + correctExt;
69403
+ const basePath = currentExt ? outputPath.slice(0, -currentExt.length) : outputPath;
69404
+ const fixedPath = basePath + correctExt;
69404
69405
  await rename(outputPath, fixedPath);
69405
69406
  return fixedPath;
69406
69407
  }
@@ -69431,7 +69432,8 @@ async function saveImageData(data, outputPath, onProgress) {
69431
69432
  const correctExt = await detectImageFormat(outputPath);
69432
69433
  const currentExt = extname(outputPath).toLowerCase();
69433
69434
  if (correctExt && correctExt !== currentExt) {
69434
- const fixedPath = outputPath.slice(0, -currentExt.length) + correctExt;
69435
+ const basePath = currentExt ? outputPath.slice(0, -currentExt.length) : outputPath;
69436
+ const fixedPath = basePath + correctExt;
69435
69437
  await rename(outputPath, fixedPath);
69436
69438
  return fixedPath;
69437
69439
  }
@@ -86261,7 +86263,7 @@ var RemoteClient = class {
86261
86263
  }
86262
86264
  }
86263
86265
  );
86264
- this.client = new Client({ name: "gunni-cli", version: "0.3.6" });
86266
+ this.client = new Client({ name: "gunni-cli", version: "0.3.7" });
86265
86267
  await this.client.connect(transport);
86266
86268
  }
86267
86269
  async callTool(name, args) {
@@ -87891,7 +87893,7 @@ KEY PRINCIPLES
87891
87893
  }
87892
87894
  },
87893
87895
  latest: {
87894
- version: "0.3.4",
87896
+ version: "0.3.7",
87895
87897
  date: "2026-03-29",
87896
87898
  updates: [
87897
87899
  "Production system: templates (proven prompts with variables), styles (visual direction), presets (platform rules), pipelines (multi-step workflows).",
@@ -87969,9 +87971,27 @@ ${import_picocolors8.default.dim("Run: gunni learn <topic>")}
87969
87971
  `);
87970
87972
  } else {
87971
87973
  console.log(`
87972
- ${import_picocolors8.default.bold(result.title)}
87974
+ ${import_picocolors8.default.bold(import_picocolors8.default.cyan(result.title))}
87973
87975
  `);
87974
- console.log(result.content);
87976
+ const lines = result.content.split("\n");
87977
+ for (const line of lines) {
87978
+ if (/^[A-Z][A-Z _/()]+:/.test(line)) {
87979
+ const colonIdx = line.indexOf(":");
87980
+ console.log(`${import_picocolors8.default.bold(line.slice(0, colonIdx + 1))}${import_picocolors8.default.dim(line.slice(colonIdx + 1))}`);
87981
+ } else if (line.startsWith("- ")) {
87982
+ const dashEnd = line.indexOf(" ", 2);
87983
+ const toolMatch = line.match(/^- (\w+\(\)[^ ]*)(.*)/);
87984
+ if (toolMatch) {
87985
+ console.log(` ${import_picocolors8.default.green("\u2022")} ${import_picocolors8.default.cyan(toolMatch[1])}${import_picocolors8.default.dim(toolMatch[2])}`);
87986
+ } else {
87987
+ console.log(` ${import_picocolors8.default.green("\u2022")} ${line.slice(2)}`);
87988
+ }
87989
+ } else if (/^\d+\./.test(line)) {
87990
+ console.log(` ${import_picocolors8.default.dim(line)}`);
87991
+ } else {
87992
+ console.log(line);
87993
+ }
87994
+ }
87975
87995
  console.log();
87976
87996
  }
87977
87997
  } catch (err) {
@@ -89391,7 +89411,8 @@ Examples:
89391
89411
  console.log(`
89392
89412
  ${import_picocolors14.default.bold(import_picocolors14.default.cyan(category.toUpperCase()))}`);
89393
89413
  for (const m2 of catModels) {
89394
- console.log(` ${import_picocolors14.default.bold(m2.id)} ${import_picocolors14.default.dim(m2.description)}`);
89414
+ const tag = m2.isDefault ? import_picocolors14.default.green(" \u2605") : "";
89415
+ console.log(` ${import_picocolors14.default.bold(m2.id)}${tag} ${import_picocolors14.default.dim(m2.description)}`);
89395
89416
  }
89396
89417
  }
89397
89418
  console.log();
@@ -90896,7 +90917,7 @@ async function runOnboarding() {
90896
90917
 
90897
90918
  // src/index.ts
90898
90919
  var program2 = new Command();
90899
- program2.name("gunni").description("AI media toolkit \u2014 give any agent the ability to create professional media").version("0.3.6").option("--json", "Output results as JSON").addHelpText(
90920
+ program2.name("gunni").description("AI media toolkit \u2014 give any agent the ability to create professional media").version("0.3.7").option("--json", "Output results as JSON").addHelpText(
90900
90921
  "after",
90901
90922
  `
90902
90923
  Examples:
@@ -90906,18 +90927,18 @@ Examples:
90906
90927
  $ gunni init --template brand # Start a brand project
90907
90928
 
90908
90929
  Image (generate, edit, describe, upscale, remove-bg):
90909
- $ gunni image "a coffee bag on white background" -o bag.png
90910
- $ gunni image bag.png --remove-bg -o bag-clean.png
90911
- $ gunni image bag-clean.png "place on marble counter" -o hero.png
90912
- $ gunni image hero.png --upscale -o hero-final.png
90913
- $ gunni image hero-final.png # describe
90930
+ $ gunni image "a coffee bag on white background" -o bag
90931
+ $ gunni image bag.jpg --remove-bg -o bag-clean
90932
+ $ gunni image bag-clean.png "place on marble counter" -o hero
90933
+ $ gunni image hero.jpg --upscale -o hero-final
90934
+ $ gunni image hero-final.jpg # describe
90914
90935
 
90915
90936
  Video & audio:
90916
- $ gunni video hero.png -p "slow cinematic zoom in" -o hero.mp4
90937
+ $ gunni video hero.jpg -p "slow cinematic zoom in" -o hero.mp4
90917
90938
  $ gunni audio "Welcome to our roastery" -o intro.mp3
90918
90939
 
90919
90940
  Explore with variants:
90920
- $ gunni image "logo concepts" --variants 4 -o logo-{n}.png
90941
+ $ gunni image "logo concepts" --variants 4 -o logo-{n}
90921
90942
 
90922
90943
  Creative expertise:
90923
90944
  $ gunni learn exploration # How to explore creatively
@@ -90926,8 +90947,8 @@ Examples:
90926
90947
  Agent workflow (structured JSON):
90927
90948
  $ gunni --json learn overview # Load capabilities
90928
90949
  $ gunni --json image "product photo" --variants 3 # Explore
90929
- $ gunni --json image best.png "refine the lighting" # Iterate
90930
- $ gunni --json image final.png --upscale # Polish
90950
+ $ gunni --json image best.jpg "refine the lighting" # Iterate
90951
+ $ gunni --json image final.jpg --upscale # Polish
90931
90952
  `
90932
90953
  );
90933
90954
  registerImageCommand(program2);
@@ -90948,7 +90969,7 @@ program2.command("models").description("List available models (alias for: gunni
90948
90969
  return;
90949
90970
  }
90950
90971
  if (models.length === 0) {
90951
- console.log(`No models found${opts.type ? ` for category "${opts.type}"` : ""}.`);
90972
+ console.log(import_picocolors23.default.dim(`No models found${opts.type ? ` for category "${opts.type}"` : ""}.`));
90952
90973
  return;
90953
90974
  }
90954
90975
  const grouped = /* @__PURE__ */ new Map();
@@ -90959,9 +90980,10 @@ program2.command("models").description("List available models (alias for: gunni
90959
90980
  }
90960
90981
  for (const [category, catModels] of grouped) {
90961
90982
  console.log(`
90962
- ${category.toUpperCase()}`);
90983
+ ${import_picocolors23.default.bold(import_picocolors23.default.cyan(category.toUpperCase()))}`);
90963
90984
  for (const m2 of catModels) {
90964
- console.log(` ${m2.id} ${m2.description}`);
90985
+ const tag = m2.isDefault ? import_picocolors23.default.green(" \u2605") : "";
90986
+ console.log(` ${import_picocolors23.default.bold(m2.id)}${tag} ${import_picocolors23.default.dim(m2.description)}`);
90965
90987
  }
90966
90988
  }
90967
90989
  console.log();
@@ -90995,7 +91017,7 @@ program2.action(async () => {
90995
91017
  { name: "models", usage: "gunni models [--type <category>]", description: "List available models" },
90996
91018
  { name: "config", usage: "gunni config", description: "Manage API keys" }
90997
91019
  ];
90998
- console.log(JSON.stringify({ version: "0.3.6", commands, categories, models }, null, 2));
91020
+ console.log(JSON.stringify({ version: "0.3.7", commands, categories, models }, null, 2));
90999
91021
  return;
91000
91022
  }
91001
91023
  const configured = await hasGunniKey();
@@ -91051,10 +91073,10 @@ ${import_picocolors23.default.bold("Models:")} ${import_picocolors23.default.dim
91051
91073
  }
91052
91074
  console.log(`
91053
91075
  ${import_picocolors23.default.bold("Quick start:")}
91054
- ${import_picocolors23.default.dim("$")} gunni image "coffee bag product shot" -o bag.png
91055
- ${import_picocolors23.default.dim("$")} gunni image bag.png --remove-bg -o bag-clean.png
91056
- ${import_picocolors23.default.dim("$")} gunni image bag-clean.png "on marble counter" -o hero.png
91057
- ${import_picocolors23.default.dim("$")} gunni image hero.png --upscale -o hero-final.png
91076
+ ${import_picocolors23.default.dim("$")} gunni image "coffee bag product shot" -o bag
91077
+ ${import_picocolors23.default.dim("$")} gunni image bag.jpg --remove-bg -o bag-clean
91078
+ ${import_picocolors23.default.dim("$")} gunni image bag-clean.png "on marble counter" -o hero
91079
+ ${import_picocolors23.default.dim("$")} gunni image hero.jpg --upscale -o hero-final
91058
91080
 
91059
91081
  ${import_picocolors23.default.dim("Add --json to any command for structured output.")}
91060
91082
  ${import_picocolors23.default.dim("Run gunni learn to load creative expertise.")}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gunni",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
4
4
  "description": "AI media toolkit — give any agent the ability to create professional media",
5
5
  "type": "module",
6
6
  "bin": {