@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.
- package/dist/SKILL.md +18 -9
- package/dist/VERSION +1 -1
- package/dist/scripts/extraction_engine.py +283 -0
- package/dist/scripts/i18n.py +44 -4
- package/dist/scripts/miravia_client.py +6 -0
- package/dist/scripts/product_client.py +21 -4
- package/dist/scripts/product_skill.py +38 -0
- package/dist/scripts/publish_module.py +579 -112
- package/package.json +1 -1
|
@@ -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", ""))
|