@doufunao123/asset-gateway 0.8.0 → 0.9.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
@@ -40,7 +40,7 @@ Config file format:
40
40
  ```json
41
41
  {
42
42
  "token": "agk_...",
43
- "gateway_url": "https://assets.xiaomao.chat"
43
+ "gateway_url": "https://upload.xiaomao.chat"
44
44
  }
45
45
  ```
46
46
 
package/dist/index.js CHANGED
@@ -70,9 +70,9 @@ function normalizeError(error2) {
70
70
 
71
71
  // src/meta.ts
72
72
  var CLI_NAME = "asset-gateway";
73
- var CLI_VERSION = "0.8.0";
73
+ var CLI_VERSION = "0.8.1";
74
74
  var CLI_DESCRIPTION = "Universal asset generation gateway CLI";
75
- var DEFAULT_GATEWAY_URL = "https://assets.xiaomao.chat";
75
+ var DEFAULT_GATEWAY_URL = "https://upload.xiaomao.chat";
76
76
 
77
77
  // src/config.ts
78
78
  function configDir() {
@@ -527,7 +527,7 @@ async function saveOutput(result, assetType, outputDir) {
527
527
  function createGenerateCommand() {
528
528
  const command = new Command3("generate").description("Generate assets via the gateway");
529
529
  command.addCommand(
530
- new Command3("image").description("Generate an image from a text prompt").requiredOption("--prompt <text>", "Image description prompt").option("--provider <id>", "Provider to use").option("--transparent", "Request transparent background").option("--model <model>", "Model to use").option("--size <size>", "Image size (e.g. 1024x1024)").option("--input <url>", "Input image URL for editing (Gemini/Grok)").option("--output-dir <dir>", "Directory to save output", ".").action(async function(options) {
530
+ new Command3("image").description("Generate an image from a text prompt").requiredOption("--prompt <text>", "Image description prompt").option("--provider <id>", "Provider to use").option("--transparent", "Request transparent background").option("--model <model>", "Model to use").option("--size <size>", "Image size (e.g. 1024x1024)").option("--input <url>", "Input image URL for editing (Gemini/Grok)").option("--ref <urls...>", "Reference image URLs for multi-image editing (repeatable)").option("--edit-mode <mode>", "Edit mode: edit, inpaint, restyle, expand").option("--session <id>", "Session ID for multi-turn editing").option("--output-dir <dir>", "Directory to save output", ".").action(async function(options) {
531
531
  try {
532
532
  const ctx = createContext(this);
533
533
  const body = {
@@ -539,6 +539,9 @@ function createGenerateCommand() {
539
539
  if (options.model) body.model = options.model;
540
540
  if (options.size) body.size = options.size;
541
541
  if (options.input) body.input_file = options.input;
542
+ if (options.ref && options.ref.length > 0) body.reference_images = options.ref;
543
+ if (options.editMode) body.edit_mode = options.editMode;
544
+ if (options.session) body.session_id = options.session;
542
545
  const data = await ctx.client.post("/api/generate", body);
543
546
  const localPath = await saveOutput(data, "image", options.outputDir);
544
547
  if (localPath) data.local_path = localPath;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doufunao123/asset-gateway",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "description": "Universal asset generation gateway CLI",
5
5
  "type": "module",
6
6
  "bin": {