rathflow-cli 0.1.0__tar.gz → 0.1.2__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.
- {rathflow_cli-0.1.0/rathflow_cli.egg-info → rathflow_cli-0.1.2}/PKG-INFO +1 -1
- {rathflow_cli-0.1.0 → rathflow_cli-0.1.2}/pyproject.toml +1 -1
- {rathflow_cli-0.1.0 → rathflow_cli-0.1.2}/rathflow_cli/__init__.py +1 -1
- {rathflow_cli-0.1.0 → rathflow_cli-0.1.2}/rathflow_cli/commands/config_cmd.py +22 -13
- {rathflow_cli-0.1.0 → rathflow_cli-0.1.2}/rathflow_cli/state.py +6 -2
- {rathflow_cli-0.1.0 → rathflow_cli-0.1.2/rathflow_cli.egg-info}/PKG-INFO +1 -1
- {rathflow_cli-0.1.0 → rathflow_cli-0.1.2}/LICENSE +0 -0
- {rathflow_cli-0.1.0 → rathflow_cli-0.1.2}/README.md +0 -0
- {rathflow_cli-0.1.0 → rathflow_cli-0.1.2}/rathflow_cli/__main__.py +0 -0
- {rathflow_cli-0.1.0 → rathflow_cli-0.1.2}/rathflow_cli/cli.py +0 -0
- {rathflow_cli-0.1.0 → rathflow_cli-0.1.2}/rathflow_cli/commands/__init__.py +0 -0
- {rathflow_cli-0.1.0 → rathflow_cli-0.1.2}/rathflow_cli/commands/_common.py +0 -0
- {rathflow_cli-0.1.0 → rathflow_cli-0.1.2}/rathflow_cli/commands/admin.py +0 -0
- {rathflow_cli-0.1.0 → rathflow_cli-0.1.2}/rathflow_cli/commands/agent.py +0 -0
- {rathflow_cli-0.1.0 → rathflow_cli-0.1.2}/rathflow_cli/commands/api_cmd.py +0 -0
- {rathflow_cli-0.1.0 → rathflow_cli-0.1.2}/rathflow_cli/commands/asset.py +0 -0
- {rathflow_cli-0.1.0 → rathflow_cli-0.1.2}/rathflow_cli/commands/auth_cmd.py +0 -0
- {rathflow_cli-0.1.0 → rathflow_cli-0.1.2}/rathflow_cli/commands/billing.py +0 -0
- {rathflow_cli-0.1.0 → rathflow_cli-0.1.2}/rathflow_cli/commands/memory.py +0 -0
- {rathflow_cli-0.1.0 → rathflow_cli-0.1.2}/rathflow_cli/commands/org.py +0 -0
- {rathflow_cli-0.1.0 → rathflow_cli-0.1.2}/rathflow_cli/commands/project.py +0 -0
- {rathflow_cli-0.1.0 → rathflow_cli-0.1.2}/rathflow_cli/commands/sandbox.py +0 -0
- {rathflow_cli-0.1.0 → rathflow_cli-0.1.2}/rathflow_cli/commands/session.py +0 -0
- {rathflow_cli-0.1.0 → rathflow_cli-0.1.2}/rathflow_cli/commands/workflow.py +0 -0
- {rathflow_cli-0.1.0 → rathflow_cli-0.1.2}/rathflow_cli/config.py +0 -0
- {rathflow_cli-0.1.0 → rathflow_cli-0.1.2}/rathflow_cli/endpoints.py +0 -0
- {rathflow_cli-0.1.0 → rathflow_cli-0.1.2}/rathflow_cli/errors.py +0 -0
- {rathflow_cli-0.1.0 → rathflow_cli-0.1.2}/rathflow_cli/http.py +0 -0
- {rathflow_cli-0.1.0 → rathflow_cli-0.1.2}/rathflow_cli/output.py +0 -0
- {rathflow_cli-0.1.0 → rathflow_cli-0.1.2}/rathflow_cli/selftest.py +0 -0
- {rathflow_cli-0.1.0 → rathflow_cli-0.1.2}/rathflow_cli.egg-info/SOURCES.txt +0 -0
- {rathflow_cli-0.1.0 → rathflow_cli-0.1.2}/rathflow_cli.egg-info/dependency_links.txt +0 -0
- {rathflow_cli-0.1.0 → rathflow_cli-0.1.2}/rathflow_cli.egg-info/entry_points.txt +0 -0
- {rathflow_cli-0.1.0 → rathflow_cli-0.1.2}/rathflow_cli.egg-info/requires.txt +0 -0
- {rathflow_cli-0.1.0 → rathflow_cli-0.1.2}/rathflow_cli.egg-info/top_level.txt +0 -0
- {rathflow_cli-0.1.0 → rathflow_cli-0.1.2}/setup.cfg +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "rathflow-cli"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.2"
|
|
8
8
|
description = "RathFlow command line client: sessions, memory, sandboxes, assets and billing over the RathFlow REST API."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -48,20 +48,29 @@ def list_() -> None:
|
|
|
48
48
|
def show() -> None:
|
|
49
49
|
"""显示当前生效配置(flag/env 覆盖后的结果)。"""
|
|
50
50
|
st = current()
|
|
51
|
+
# 只回显真实存在的环境变量;未设时明确写「(未设置)」,
|
|
52
|
+
# 否则会把 profile/默认值伪装成 env 覆盖,误导用户与模型。
|
|
53
|
+
env_view = {
|
|
54
|
+
config.ENV_BASE_URL: st.env_base_url or "(未设置)",
|
|
55
|
+
config.ENV_PROJECT: st.env_project or "(未设置)",
|
|
56
|
+
config.ENV_TOKEN: config.mask(st.token_override),
|
|
57
|
+
}
|
|
58
|
+
payload = {
|
|
59
|
+
"profile": st.profile_name,
|
|
60
|
+
"base_url": st.base_url,
|
|
61
|
+
"project": st.project or "(未设置)",
|
|
62
|
+
"token": config.mask(st.profile.get("access_token")),
|
|
63
|
+
"config_file": str(config.config_path()),
|
|
64
|
+
"env": env_view,
|
|
65
|
+
}
|
|
66
|
+
if st.json_out:
|
|
67
|
+
output.emit_json(payload)
|
|
68
|
+
return
|
|
69
|
+
# 人类可读模式把 env 摊平到顶层:嵌套 dict 会被截断到 48 列,
|
|
70
|
+
# 只看得到第一个变量,等于看不出来到底有没有 env 覆盖。
|
|
51
71
|
output.emit_object(
|
|
52
|
-
{
|
|
53
|
-
|
|
54
|
-
"base_url": st.base_url,
|
|
55
|
-
"project": st.project or "(未设置)",
|
|
56
|
-
"token": config.mask(st.profile.get("access_token")),
|
|
57
|
-
"config_file": str(config.config_path()),
|
|
58
|
-
"env": {
|
|
59
|
-
config.ENV_BASE_URL: st.base_url,
|
|
60
|
-
config.ENV_PROJECT: st.project,
|
|
61
|
-
config.ENV_TOKEN: config.mask(st.token_override),
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
json_out=st.json_out,
|
|
72
|
+
{k: v for k, v in payload.items() if k != "env"} | env_view,
|
|
73
|
+
json_out=False,
|
|
65
74
|
)
|
|
66
75
|
|
|
67
76
|
|
|
@@ -47,13 +47,17 @@ class State:
|
|
|
47
47
|
self.quiet = self.quiet or quiet
|
|
48
48
|
|
|
49
49
|
prof = self.profile
|
|
50
|
+
# 原始环境变量值:只用于如实展示「环境变量到底设没设」,不参与合并,
|
|
51
|
+
# 否则 config show 会把生效值当成环境变量回显,让人误以为有 env 覆盖。
|
|
52
|
+
self.env_base_url = _env(config.ENV_BASE_URL)
|
|
53
|
+
self.env_project = _env(config.ENV_PROJECT)
|
|
50
54
|
self.base_url = (
|
|
51
55
|
self._flags.get("base_url")
|
|
52
|
-
or
|
|
56
|
+
or self.env_base_url
|
|
53
57
|
or prof.get("base_url")
|
|
54
58
|
or config.DEFAULT_BASE_URL
|
|
55
59
|
)
|
|
56
|
-
self.project = self._flags.get("project") or
|
|
60
|
+
self.project = self._flags.get("project") or self.env_project or prof.get("project")
|
|
57
61
|
|
|
58
62
|
@property
|
|
59
63
|
def profile_name(self) -> str:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|