@miravia_test/miravia-publish-skill 0.1.5 → 0.1.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.
@@ -474,6 +474,7 @@ def _print_conversational_result(result: Dict[str, Any]) -> None:
474
474
  print(result.get("title", ""))
475
475
  print(result.get("message", ""))
476
476
  print()
477
+ print(result.get("brand_list_link", ""))
477
478
  print(result.get("create_brand_link", ""))
478
479
  print()
479
480
  for action in result.get("next_actions", []):
@@ -653,6 +654,43 @@ def _print_conversational_result(result: Dict[str, Any]) -> None:
653
654
  print(f"• {action}")
654
655
  return
655
656
 
657
+ # Draft created successfully but with missing fields (item_id present)
658
+ if status == "draft_created_with_issues":
659
+ print(result.get("message", ""))
660
+ item_id = result.get("item_id")
661
+ if item_id:
662
+ print(f"• Product ID: {item_id}")
663
+ pdp_url = result.get("pdp_url")
664
+ if pdp_url:
665
+ print(f"• {pdp_url}")
666
+ api_message = result.get("api_message")
667
+ if api_message:
668
+ print(f"• {api_message}")
669
+ print()
670
+ for action in result.get("next_actions", []):
671
+ print(f"• {action}")
672
+ return
673
+
674
+ # Creation failed (no item_id returned) — surface the root cause
675
+ if status == "create_failed":
676
+ print(result.get("title", "Product creation failed"))
677
+ print(result.get("message", ""))
678
+ hint = result.get("hint")
679
+ if hint:
680
+ print(f"提示:{hint}")
681
+ for key, label in (
682
+ ("error_type", "错误类型"),
683
+ ("request_id", "request_id"),
684
+ ("trace_id", "trace_id"),
685
+ ):
686
+ value = result.get(key)
687
+ if value:
688
+ print(f"• {label}: {value}")
689
+ print()
690
+ for action in result.get("next_actions", []):
691
+ print(f"• {action}")
692
+ return
693
+
656
694
  # Brand permission failed (BRAND_PENDING / BRAND_PERMISSION_DENIED)
657
695
  if status == "brand_permission_failed":
658
696
  print(result.get("message", ""))