fr-cli 2.2.1__tar.gz → 2.2.3__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.
- {fr_cli-2.2.1/fr_cli.egg-info → fr_cli-2.2.3}/PKG-INFO +3 -3
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/__init__.py +1 -1
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/conf/config.py +4 -1
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/repl/commands.py +40 -6
- {fr_cli-2.2.1 → fr_cli-2.2.3/fr_cli.egg-info}/PKG-INFO +3 -3
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli.egg-info/requires.txt +2 -2
- {fr_cli-2.2.1 → fr_cli-2.2.3}/pyproject.toml +3 -3
- {fr_cli-2.2.1 → fr_cli-2.2.3}/LICENSE +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/MANIFEST.in +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/README.md +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/README.md +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/WEAPON.MD +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/addon/plugin.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/agent/__init__.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/agent/builtins/__init__.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/agent/builtins/_utils.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/agent/builtins/db.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/agent/builtins/local.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/agent/builtins/rag.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/agent/builtins/rag_watcher_daemon.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/agent/builtins/remote.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/agent/builtins/spider.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/agent/client.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/agent/executor.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/agent/generator.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/agent/manager.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/agent/master.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/agent/master_prompt.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/agent/remote.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/agent/server.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/agent/workflow.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/breakthrough/update.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/command/__init__.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/command/executor.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/command/registry.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/command/security.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/conf/wizard.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/core/chat.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/core/core.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/core/intent.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/core/llm.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/core/recommender.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/core/stream.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/core/sysmon.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/core/thinking.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/gatekeeper/__init__.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/gatekeeper/daemon.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/gatekeeper/manager.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/lang/i18n.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/main.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/memory/context.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/memory/history.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/memory/session.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/repl/__init__.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/security/security.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/ui/ui.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/weapon/cron.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/weapon/dataframe.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/weapon/disk.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/weapon/fs.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/weapon/launcher.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/weapon/loader.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/weapon/mail.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/weapon/mcp.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/weapon/vision.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli/weapon/web.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli.egg-info/SOURCES.txt +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli.egg-info/dependency_links.txt +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli.egg-info/entry_points.txt +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/fr_cli.egg-info/top_level.txt +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/setup.cfg +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/tests/test_agent_client.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/tests/test_agent_server.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/tests/test_ai_save_file_with_verify.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/tests/test_all.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/tests/test_auto_session.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/tests/test_builtins.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/tests/test_dataframe.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/tests/test_gatekeeper.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/tests/test_integration.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/tests/test_intent_classification.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/tests/test_launcher.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/tests/test_master_agent.py +0 -0
- {fr_cli-2.2.1 → fr_cli-2.2.3}/tests/test_structured_tools.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fr-cli
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.3
|
|
4
4
|
Summary: 凡人打字机 - 支持多模型(Zhipu/DeepSeek/Kimi/Qwen/StepFun/MiniMax/Spark)的终极全能终端工具
|
|
5
5
|
Author: FANREN CLI Author
|
|
6
6
|
License-Expression: MIT
|
|
@@ -37,7 +37,7 @@ Requires-Dist: pyodbc>=4.0.0; extra == "db"
|
|
|
37
37
|
Requires-Dist: oracledb>=1.3.0; extra == "db"
|
|
38
38
|
Provides-Extra: rag
|
|
39
39
|
Requires-Dist: chromadb>=0.4.0; extra == "rag"
|
|
40
|
-
Requires-Dist: sentence-transformers>=2.2.
|
|
40
|
+
Requires-Dist: sentence-transformers>=2.2.3; extra == "rag"
|
|
41
41
|
Provides-Extra: remote
|
|
42
42
|
Requires-Dist: paramiko>=3.0.0; extra == "remote"
|
|
43
43
|
Provides-Extra: spider
|
|
@@ -56,7 +56,7 @@ Requires-Dist: psycopg2-binary>=2.9.0; extra == "all"
|
|
|
56
56
|
Requires-Dist: pyodbc>=4.0.0; extra == "all"
|
|
57
57
|
Requires-Dist: oracledb>=1.3.0; extra == "all"
|
|
58
58
|
Requires-Dist: chromadb>=0.4.0; extra == "all"
|
|
59
|
-
Requires-Dist: sentence-transformers>=2.2.
|
|
59
|
+
Requires-Dist: sentence-transformers>=2.2.3; extra == "all"
|
|
60
60
|
Requires-Dist: paramiko>=3.0.0; extra == "all"
|
|
61
61
|
Requires-Dist: selenium>=4.10.0; extra == "all"
|
|
62
62
|
Requires-Dist: bypy; extra == "all"
|
|
@@ -123,7 +123,10 @@ def init_config():
|
|
|
123
123
|
pcfg = providers_cfg.get(provider, {})
|
|
124
124
|
|
|
125
125
|
# 检查当前提供商是否已配置 key
|
|
126
|
-
|
|
126
|
+
# 各道统独立管理 key;zhipu 向后兼容:未单独配置时回退顶层 key
|
|
127
|
+
has_key = bool(pcfg.get("key"))
|
|
128
|
+
if not has_key and provider == "zhipu":
|
|
129
|
+
has_key = bool(c.get("key", ""))
|
|
127
130
|
|
|
128
131
|
if not has_key:
|
|
129
132
|
print(f"\n{YELLOW}⚠️ API Key Required{RESET}")
|
|
@@ -106,7 +106,10 @@ def _cmd_model(state, parts):
|
|
|
106
106
|
# 检查新道统是否已配置 API Key,若未配置则引导输入
|
|
107
107
|
providers_cfg = state.cfg.get("providers", {})
|
|
108
108
|
pcfg = providers_cfg.get(state.provider, {})
|
|
109
|
-
|
|
109
|
+
# 只检查该道统自己专属的 key;zhipu 向后兼容:未单独配置时回退顶层 key
|
|
110
|
+
has_key = bool(pcfg.get("key"))
|
|
111
|
+
if not has_key and state.provider == "zhipu":
|
|
112
|
+
has_key = bool(state.cfg.get("key", ""))
|
|
110
113
|
if not has_key:
|
|
111
114
|
print(f"{YELLOW}⚠️ [{state.provider}] 尚未配置 API Key{RESET}")
|
|
112
115
|
k = input(f"👉 请输入 [{state.provider}] 的 API Key: ").strip()
|
|
@@ -118,13 +121,19 @@ def _cmd_model(state, parts):
|
|
|
118
121
|
else:
|
|
119
122
|
print(f"{RED}❌ 无效的提供商或模型: {arg1}{RESET}")
|
|
120
123
|
else:
|
|
121
|
-
#
|
|
122
|
-
from fr_cli.core.llm import list_providers
|
|
124
|
+
# 显示当前道统与可用模型及 key 配置状态
|
|
125
|
+
from fr_cli.core.llm import list_providers
|
|
123
126
|
print(f"{CYAN}🧠 当前道统: [{state.provider}] {state.model_name}{RESET}")
|
|
124
127
|
print(f"\n{DIM}可用道统与默认模型:{RESET}")
|
|
128
|
+
providers_cfg = state.cfg.get("providers", {})
|
|
125
129
|
for p in list_providers():
|
|
126
130
|
marker = " 👈 当前" if p["id"] == state.provider else ""
|
|
127
|
-
|
|
131
|
+
pcfg = providers_cfg.get(p["id"], {})
|
|
132
|
+
has_key = bool(pcfg.get("key"))
|
|
133
|
+
if not has_key and p["id"] == "zhipu":
|
|
134
|
+
has_key = bool(state.cfg.get("key", ""))
|
|
135
|
+
key_status = f"{GREEN}✅ 已配置{RESET}" if has_key else f"{RED}❌ 未配置{RESET}"
|
|
136
|
+
print(f" {CYAN}{p['id']}{RESET} — {p['name']}{DIM} (默认: {p['default_model']}){RESET} {key_status}{marker}")
|
|
128
137
|
print(f"\n{DIM}用法:{RESET}")
|
|
129
138
|
print(f" /model <模型名> — 切换当前道统下的模型")
|
|
130
139
|
print(f" /model <道统>:<模型名> — 同时切换道统和模型")
|
|
@@ -133,12 +142,37 @@ def _cmd_model(state, parts):
|
|
|
133
142
|
|
|
134
143
|
|
|
135
144
|
def _cmd_key(state, parts):
|
|
145
|
+
"""
|
|
146
|
+
设置 API Key
|
|
147
|
+
用法:
|
|
148
|
+
/key <key> — 为当前道统设置 key
|
|
149
|
+
/key <道统> <key> — 为指定道统设置 key
|
|
150
|
+
"""
|
|
136
151
|
arg1 = parts[1] if len(parts) > 1 else ""
|
|
137
|
-
if
|
|
152
|
+
arg2 = parts[2] if len(parts) > 2 else ""
|
|
153
|
+
if arg1 and arg2:
|
|
154
|
+
# /key <provider> <key>
|
|
155
|
+
target_provider = arg1
|
|
156
|
+
from fr_cli.core.llm import get_provider_info
|
|
157
|
+
if not get_provider_info(target_provider):
|
|
158
|
+
print(f"{RED}❌ 无效道统: {target_provider}{RESET}")
|
|
159
|
+
return False
|
|
160
|
+
# 临时切到目标道统设置 key,再切回来
|
|
161
|
+
original_provider = state.provider
|
|
162
|
+
state.update_provider(target_provider)
|
|
163
|
+
state.update_key(arg2)
|
|
164
|
+
# 如果原来不是目标道统,切回去
|
|
165
|
+
if original_provider != target_provider:
|
|
166
|
+
state.update_provider(original_provider)
|
|
167
|
+
print(f"{GREEN}✅ [{target_provider}] API Key 已更新{RESET}")
|
|
168
|
+
elif arg1:
|
|
169
|
+
# /key <key>
|
|
138
170
|
state.update_key(arg1)
|
|
139
171
|
print(f"{GREEN}✅ [{state.provider}] API Key 已更新{RESET}")
|
|
140
172
|
else:
|
|
141
|
-
print(f"{YELLOW}⚠️ 用法:
|
|
173
|
+
print(f"{YELLOW}⚠️ 用法:{RESET}")
|
|
174
|
+
print(f" /key <API密钥> — 为当前道统 [{state.provider}] 设置密钥")
|
|
175
|
+
print(f" /key <道统> <API密钥> — 为指定道统设置密钥")
|
|
142
176
|
return False
|
|
143
177
|
|
|
144
178
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fr-cli
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.3
|
|
4
4
|
Summary: 凡人打字机 - 支持多模型(Zhipu/DeepSeek/Kimi/Qwen/StepFun/MiniMax/Spark)的终极全能终端工具
|
|
5
5
|
Author: FANREN CLI Author
|
|
6
6
|
License-Expression: MIT
|
|
@@ -37,7 +37,7 @@ Requires-Dist: pyodbc>=4.0.0; extra == "db"
|
|
|
37
37
|
Requires-Dist: oracledb>=1.3.0; extra == "db"
|
|
38
38
|
Provides-Extra: rag
|
|
39
39
|
Requires-Dist: chromadb>=0.4.0; extra == "rag"
|
|
40
|
-
Requires-Dist: sentence-transformers>=2.2.
|
|
40
|
+
Requires-Dist: sentence-transformers>=2.2.3; extra == "rag"
|
|
41
41
|
Provides-Extra: remote
|
|
42
42
|
Requires-Dist: paramiko>=3.0.0; extra == "remote"
|
|
43
43
|
Provides-Extra: spider
|
|
@@ -56,7 +56,7 @@ Requires-Dist: psycopg2-binary>=2.9.0; extra == "all"
|
|
|
56
56
|
Requires-Dist: pyodbc>=4.0.0; extra == "all"
|
|
57
57
|
Requires-Dist: oracledb>=1.3.0; extra == "all"
|
|
58
58
|
Requires-Dist: chromadb>=0.4.0; extra == "all"
|
|
59
|
-
Requires-Dist: sentence-transformers>=2.2.
|
|
59
|
+
Requires-Dist: sentence-transformers>=2.2.3; extra == "all"
|
|
60
60
|
Requires-Dist: paramiko>=3.0.0; extra == "all"
|
|
61
61
|
Requires-Dist: selenium>=4.10.0; extra == "all"
|
|
62
62
|
Requires-Dist: bypy; extra == "all"
|
|
@@ -11,7 +11,7 @@ psycopg2-binary>=2.9.0
|
|
|
11
11
|
pyodbc>=4.0.0
|
|
12
12
|
oracledb>=1.3.0
|
|
13
13
|
chromadb>=0.4.0
|
|
14
|
-
sentence-transformers>=2.2.
|
|
14
|
+
sentence-transformers>=2.2.3
|
|
15
15
|
paramiko>=3.0.0
|
|
16
16
|
selenium>=4.10.0
|
|
17
17
|
bypy
|
|
@@ -44,7 +44,7 @@ watchdog>=3.0.0
|
|
|
44
44
|
|
|
45
45
|
[rag]
|
|
46
46
|
chromadb>=0.4.0
|
|
47
|
-
sentence-transformers>=2.2.
|
|
47
|
+
sentence-transformers>=2.2.3
|
|
48
48
|
|
|
49
49
|
[remote]
|
|
50
50
|
paramiko>=3.0.0
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "fr-cli"
|
|
7
|
-
version = "2.2.
|
|
7
|
+
version = "2.2.3"
|
|
8
8
|
description = "凡人打字机 - 支持多模型(Zhipu/DeepSeek/Kimi/Qwen/StepFun/MiniMax/Spark)的终极全能终端工具"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.8"
|
|
@@ -38,7 +38,7 @@ dependencies = [
|
|
|
38
38
|
[project.optional-dependencies]
|
|
39
39
|
data = ["pandas>=1.5.0", "openpyxl>=3.0.0"]
|
|
40
40
|
db = ["pymysql>=1.0.0", "psycopg2-binary>=2.9.0", "pyodbc>=4.0.0", "oracledb>=1.3.0"]
|
|
41
|
-
rag = ["chromadb>=0.4.0", "sentence-transformers>=2.2.
|
|
41
|
+
rag = ["chromadb>=0.4.0", "sentence-transformers>=2.2.3"]
|
|
42
42
|
remote = ["paramiko>=3.0.0"]
|
|
43
43
|
spider = ["selenium>=4.10.0"]
|
|
44
44
|
cloud = ["bypy", "aligo", "msal"]
|
|
@@ -46,7 +46,7 @@ monitor = ["watchdog>=3.0.0"]
|
|
|
46
46
|
all = [
|
|
47
47
|
"pandas>=1.5.0", "openpyxl>=3.0.0",
|
|
48
48
|
"pymysql>=1.0.0", "psycopg2-binary>=2.9.0", "pyodbc>=4.0.0", "oracledb>=1.3.0",
|
|
49
|
-
"chromadb>=0.4.0", "sentence-transformers>=2.2.
|
|
49
|
+
"chromadb>=0.4.0", "sentence-transformers>=2.2.3",
|
|
50
50
|
"paramiko>=3.0.0",
|
|
51
51
|
"selenium>=4.10.0",
|
|
52
52
|
"bypy", "aligo", "msal",
|
|
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
|
|
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
|
|
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
|