wxz-cli 1.0.2__tar.gz → 1.0.4__tar.gz
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.
- {wxz_cli-1.0.2/src/wxz_cli.egg-info → wxz_cli-1.0.4}/PKG-INFO +1 -1
- {wxz_cli-1.0.2 → wxz_cli-1.0.4}/pyproject.toml +1 -1
- {wxz_cli-1.0.2 → wxz_cli-1.0.4}/setup.py +1 -1
- {wxz_cli-1.0.2 → wxz_cli-1.0.4}/src/wxz_cli/acp/session_manager.py +7 -9
- {wxz_cli-1.0.2 → wxz_cli-1.0.4}/src/wxz_cli/cli.py +6 -0
- {wxz_cli-1.0.2 → wxz_cli-1.0.4}/src/wxz_cli/commands/auth.py +33 -6
- {wxz_cli-1.0.2 → wxz_cli-1.0.4}/src/wxz_cli/commands/conversation.py +1 -1
- wxz_cli-1.0.4/src/wxz_cli/commands/domain.py +533 -0
- {wxz_cli-1.0.2 → wxz_cli-1.0.4}/src/wxz_cli/commands/projects.py +1 -1
- {wxz_cli-1.0.2 → wxz_cli-1.0.4}/src/wxz_cli/core/chat_renderer.py +4 -3
- wxz_cli-1.0.4/src/wxz_cli/core/federation.py +215 -0
- wxz_cli-1.0.4/src/wxz_cli/core/update.py +118 -0
- {wxz_cli-1.0.2 → wxz_cli-1.0.4/src/wxz_cli.egg-info}/PKG-INFO +1 -1
- {wxz_cli-1.0.2 → wxz_cli-1.0.4}/src/wxz_cli.egg-info/SOURCES.txt +3 -1
- wxz_cli-1.0.2/src/wxz_cli/commands/domain.py +0 -418
- {wxz_cli-1.0.2 → wxz_cli-1.0.4}/LICENSE +0 -0
- {wxz_cli-1.0.2 → wxz_cli-1.0.4}/MANIFEST.in +0 -0
- {wxz_cli-1.0.2 → wxz_cli-1.0.4}/README.md +0 -0
- {wxz_cli-1.0.2 → wxz_cli-1.0.4}/setup.cfg +0 -0
- {wxz_cli-1.0.2 → wxz_cli-1.0.4}/src/wxz_cli/__init__.py +0 -0
- {wxz_cli-1.0.2 → wxz_cli-1.0.4}/src/wxz_cli/acp/__init__.py +0 -0
- {wxz_cli-1.0.2 → wxz_cli-1.0.4}/src/wxz_cli/acp/event_bridge.py +0 -0
- {wxz_cli-1.0.2 → wxz_cli-1.0.4}/src/wxz_cli/acp/handlers.py +0 -0
- {wxz_cli-1.0.2 → wxz_cli-1.0.4}/src/wxz_cli/acp/server.py +0 -0
- {wxz_cli-1.0.2 → wxz_cli-1.0.4}/src/wxz_cli/commands/__init__.py +0 -0
- {wxz_cli-1.0.2 → wxz_cli-1.0.4}/src/wxz_cli/commands/account.py +0 -0
- {wxz_cli-1.0.2 → wxz_cli-1.0.4}/src/wxz_cli/commands/acp_cmd.py +0 -0
- {wxz_cli-1.0.2 → wxz_cli-1.0.4}/src/wxz_cli/commands/chat.py +0 -0
- {wxz_cli-1.0.2 → wxz_cli-1.0.4}/src/wxz_cli/commands/code.py +0 -0
- {wxz_cli-1.0.2 → wxz_cli-1.0.4}/src/wxz_cli/commands/deploy.py +0 -0
- {wxz_cli-1.0.2 → wxz_cli-1.0.4}/src/wxz_cli/commands/info.py +0 -0
- {wxz_cli-1.0.2 → wxz_cli-1.0.4}/src/wxz_cli/commands/plugins.py +0 -0
- {wxz_cli-1.0.2 → wxz_cli-1.0.4}/src/wxz_cli/commands/preview.py +0 -0
- {wxz_cli-1.0.2 → wxz_cli-1.0.4}/src/wxz_cli/core/__init__.py +0 -0
- {wxz_cli-1.0.2 → wxz_cli-1.0.4}/src/wxz_cli/core/config.py +0 -0
- {wxz_cli-1.0.2 → wxz_cli-1.0.4}/src/wxz_cli/core/output.py +0 -0
- {wxz_cli-1.0.2 → wxz_cli-1.0.4}/src/wxz_cli/core/pop_client.py +0 -0
- {wxz_cli-1.0.2 → wxz_cli-1.0.4}/src/wxz_cli/core/session.py +0 -0
- {wxz_cli-1.0.2 → wxz_cli-1.0.4}/src/wxz_cli/core/ui.py +0 -0
- {wxz_cli-1.0.2 → wxz_cli-1.0.4}/src/wxz_cli/types.py +0 -0
- {wxz_cli-1.0.2 → wxz_cli-1.0.4}/src/wxz_cli.egg-info/dependency_links.txt +0 -0
- {wxz_cli-1.0.2 → wxz_cli-1.0.4}/src/wxz_cli.egg-info/entry_points.txt +0 -0
- {wxz_cli-1.0.2 → wxz_cli-1.0.4}/src/wxz_cli.egg-info/requires.txt +0 -0
- {wxz_cli-1.0.2 → wxz_cli-1.0.4}/src/wxz_cli.egg-info/top_level.txt +0 -0
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name="wxz-cli",
|
|
5
|
-
version="1.0.
|
|
5
|
+
version="1.0.4",
|
|
6
6
|
description="CLI for 万小智 (wxz) — AI-powered conversational website builder on Alibaba Cloud",
|
|
7
7
|
author="MSEA AI Staff Team",
|
|
8
8
|
author_email="msea-ai-staff@alibaba-inc.com",
|
|
@@ -301,17 +301,15 @@ class ACPSessionManager:
|
|
|
301
301
|
|
|
302
302
|
def domain_describe(self, domain_name: str, biz_id: Optional[str] = None) -> dict:
|
|
303
303
|
"""Query domain detail."""
|
|
304
|
+
from wxz_cli.commands.domain import _find_domain
|
|
304
305
|
target = self.resolve_biz_id(biz_id)
|
|
305
306
|
client = self._get_client()
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
domain_name=domain_name,
|
|
309
|
-
)
|
|
310
|
-
return resp.get("Module", resp)
|
|
307
|
+
item = _find_domain(client, target, domain_name)
|
|
308
|
+
return item or {}
|
|
311
309
|
|
|
312
310
|
def domain_status(self, domain_name: str, biz_id: Optional[str] = None) -> dict:
|
|
313
311
|
"""Query domain binding progress status."""
|
|
314
|
-
from wxz_cli.commands.domain import _query_domain_status, _determine_current_step,
|
|
312
|
+
from wxz_cli.commands.domain import _query_domain_status, _determine_current_step, _DOMAIN_STEP_LABELS
|
|
315
313
|
|
|
316
314
|
target = self.resolve_biz_id(biz_id)
|
|
317
315
|
client = self._get_client()
|
|
@@ -321,7 +319,7 @@ class ACPSessionManager:
|
|
|
321
319
|
return {
|
|
322
320
|
"domainName": domain_name,
|
|
323
321
|
"currentStepIndex": current_step,
|
|
324
|
-
"stepLabels":
|
|
322
|
+
"stepLabels": list(_DOMAIN_STEP_LABELS),
|
|
325
323
|
"status": status,
|
|
326
324
|
"isError": current_step == -1,
|
|
327
325
|
"isComplete": current_step >= 4,
|
|
@@ -387,7 +385,7 @@ class ACPSessionManager:
|
|
|
387
385
|
from wxz_cli.commands.domain import (
|
|
388
386
|
_query_domain_status,
|
|
389
387
|
_determine_current_step,
|
|
390
|
-
|
|
388
|
+
_DOMAIN_STEP_LABELS,
|
|
391
389
|
)
|
|
392
390
|
client = self._get_client()
|
|
393
391
|
poll_count = 0
|
|
@@ -401,7 +399,7 @@ class ACPSessionManager:
|
|
|
401
399
|
info = {
|
|
402
400
|
"domainName": domain_name,
|
|
403
401
|
"currentStepIndex": current_step,
|
|
404
|
-
"stepLabels":
|
|
402
|
+
"stepLabels": list(_DOMAIN_STEP_LABELS),
|
|
405
403
|
"status": status,
|
|
406
404
|
"isError": current_step == -1,
|
|
407
405
|
"isComplete": current_step >= 4,
|
|
@@ -21,6 +21,7 @@ import click
|
|
|
21
21
|
|
|
22
22
|
from wxz_cli import __version__
|
|
23
23
|
from wxz_cli.core.session import Session
|
|
24
|
+
from wxz_cli.core.update import print_update_hint
|
|
24
25
|
|
|
25
26
|
from wxz_cli.commands.auth import login_cmd, logout_cmd, whoami_cmd
|
|
26
27
|
from wxz_cli.commands.chat import chat
|
|
@@ -79,6 +80,11 @@ def cli(ctx: click.Context, base_url: str, biz_id: str | None,
|
|
|
79
80
|
ctx.obj["verbose"] = verbose
|
|
80
81
|
ctx.obj["debug"] = debug
|
|
81
82
|
|
|
83
|
+
# Check for newer PyPI release after command completes
|
|
84
|
+
@ctx.call_on_close
|
|
85
|
+
def _check_update():
|
|
86
|
+
print_update_hint(__version__)
|
|
87
|
+
|
|
82
88
|
|
|
83
89
|
# ---------------------------------------------------------------------------
|
|
84
90
|
# Register commands
|
|
@@ -6,6 +6,7 @@ import click
|
|
|
6
6
|
|
|
7
7
|
from wxz_cli.core.session import Session
|
|
8
8
|
from wxz_cli.core.pop_client import PopClient
|
|
9
|
+
from wxz_cli.core import federation
|
|
9
10
|
from wxz_cli.core.ui import (
|
|
10
11
|
print_success, print_error, print_info, handle_error,
|
|
11
12
|
print_detail, build_client,
|
|
@@ -19,8 +20,11 @@ from wxz_cli.core.output import format_api_response
|
|
|
19
20
|
@click.option("--profile", default="default", help="Credential profile name.")
|
|
20
21
|
@click.option("--region", default="cn-hangzhou", help="Alibaba Cloud region.")
|
|
21
22
|
@click.option("--endpoint", default="websitebuild.aliyuncs.com", help="POP endpoint.")
|
|
23
|
+
@click.option("--role-arn", help="RAM role ARN for Federation console SSO login.")
|
|
24
|
+
@click.option("--destination", default="https://wanxiaozhi.aliyun.com/", help="Console destination URL after SSO login.")
|
|
25
|
+
@click.option("--no-browser", is_flag=True, help="Do not open browser automatically after login.")
|
|
22
26
|
@click.pass_context
|
|
23
|
-
def login_cmd(ctx, access_key_id, access_key_secret, profile, region, endpoint):
|
|
27
|
+
def login_cmd(ctx, access_key_id, access_key_secret, profile, region, endpoint, role_arn, destination, no_browser):
|
|
24
28
|
"""Authenticate with Alibaba Cloud AK/SK."""
|
|
25
29
|
json_mode = ctx.obj.get("json_mode", False)
|
|
26
30
|
|
|
@@ -41,16 +45,39 @@ def login_cmd(ctx, access_key_id, access_key_secret, profile, region, endpoint):
|
|
|
41
45
|
region=region,
|
|
42
46
|
) as client:
|
|
43
47
|
try:
|
|
44
|
-
|
|
45
|
-
if json_mode:
|
|
46
|
-
format_api_response({"success": True, "data": {"profile": profile}}, json_mode)
|
|
47
|
-
else:
|
|
48
|
-
print_success(f"Login successful! Profile: {profile}")
|
|
48
|
+
client.list_app_instances(page_size=1)
|
|
49
49
|
except Exception as e:
|
|
50
50
|
if json_mode:
|
|
51
51
|
format_api_response({"success": False, "error": str(e)}, json_mode)
|
|
52
52
|
return
|
|
53
53
|
handle_error(e)
|
|
54
|
+
return
|
|
55
|
+
|
|
56
|
+
federation_result = None
|
|
57
|
+
if role_arn:
|
|
58
|
+
federation_result = federation.sync_login(
|
|
59
|
+
access_key_id=ak,
|
|
60
|
+
access_key_secret=sk,
|
|
61
|
+
role_arn=role_arn,
|
|
62
|
+
destination=destination,
|
|
63
|
+
open_browser=not no_browser,
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
if json_mode:
|
|
67
|
+
data = {"profile": profile}
|
|
68
|
+
if federation_result:
|
|
69
|
+
data["federation"] = federation_result
|
|
70
|
+
format_api_response({"success": True, "data": data}, json_mode)
|
|
71
|
+
return
|
|
72
|
+
|
|
73
|
+
print_success(f"Login successful! Profile: {profile}")
|
|
74
|
+
if federation_result:
|
|
75
|
+
if federation_result["success"]:
|
|
76
|
+
print_info(f"Console login URL: {federation_result['login_url']}")
|
|
77
|
+
if no_browser:
|
|
78
|
+
print_info("Browser auto-open disabled. Copy the URL above to login.")
|
|
79
|
+
else:
|
|
80
|
+
print_error(f"Console login failed: {federation_result['error']}")
|
|
54
81
|
|
|
55
82
|
|
|
56
83
|
@click.command(name="logout")
|
|
@@ -157,7 +157,7 @@ def _extract_tool_info(meta_raw: str) -> dict:
|
|
|
157
157
|
content = args.get("content", "")
|
|
158
158
|
lines = content.count("\n") + 1 if content else 0
|
|
159
159
|
input_summary = f"{fp} ({lines}L)" if fp else ""
|
|
160
|
-
elif name in ("EditFile", "Edit"):
|
|
160
|
+
elif name in ("EditFile", "Edit", "MultiEdit"):
|
|
161
161
|
fp = args.get("file_path", args.get("path", ""))
|
|
162
162
|
input_summary = fp or ""
|
|
163
163
|
elif name in ("Bash", "Shell", "ExecuteCommand"):
|