fr-cli 2.2.2__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.
Files changed (84) hide show
  1. {fr_cli-2.2.2/fr_cli.egg-info → fr_cli-2.2.3}/PKG-INFO +3 -3
  2. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/__init__.py +1 -1
  3. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/repl/commands.py +36 -5
  4. {fr_cli-2.2.2 → fr_cli-2.2.3/fr_cli.egg-info}/PKG-INFO +3 -3
  5. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli.egg-info/requires.txt +2 -2
  6. {fr_cli-2.2.2 → fr_cli-2.2.3}/pyproject.toml +3 -3
  7. {fr_cli-2.2.2 → fr_cli-2.2.3}/LICENSE +0 -0
  8. {fr_cli-2.2.2 → fr_cli-2.2.3}/MANIFEST.in +0 -0
  9. {fr_cli-2.2.2 → fr_cli-2.2.3}/README.md +0 -0
  10. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/README.md +0 -0
  11. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/WEAPON.MD +0 -0
  12. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/addon/plugin.py +0 -0
  13. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/agent/__init__.py +0 -0
  14. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/agent/builtins/__init__.py +0 -0
  15. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/agent/builtins/_utils.py +0 -0
  16. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/agent/builtins/db.py +0 -0
  17. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/agent/builtins/local.py +0 -0
  18. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/agent/builtins/rag.py +0 -0
  19. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/agent/builtins/rag_watcher_daemon.py +0 -0
  20. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/agent/builtins/remote.py +0 -0
  21. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/agent/builtins/spider.py +0 -0
  22. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/agent/client.py +0 -0
  23. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/agent/executor.py +0 -0
  24. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/agent/generator.py +0 -0
  25. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/agent/manager.py +0 -0
  26. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/agent/master.py +0 -0
  27. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/agent/master_prompt.py +0 -0
  28. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/agent/remote.py +0 -0
  29. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/agent/server.py +0 -0
  30. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/agent/workflow.py +0 -0
  31. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/breakthrough/update.py +0 -0
  32. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/command/__init__.py +0 -0
  33. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/command/executor.py +0 -0
  34. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/command/registry.py +0 -0
  35. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/command/security.py +0 -0
  36. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/conf/config.py +0 -0
  37. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/conf/wizard.py +0 -0
  38. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/core/chat.py +0 -0
  39. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/core/core.py +0 -0
  40. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/core/intent.py +0 -0
  41. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/core/llm.py +0 -0
  42. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/core/recommender.py +0 -0
  43. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/core/stream.py +0 -0
  44. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/core/sysmon.py +0 -0
  45. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/core/thinking.py +0 -0
  46. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/gatekeeper/__init__.py +0 -0
  47. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/gatekeeper/daemon.py +0 -0
  48. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/gatekeeper/manager.py +0 -0
  49. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/lang/i18n.py +0 -0
  50. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/main.py +0 -0
  51. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/memory/context.py +0 -0
  52. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/memory/history.py +0 -0
  53. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/memory/session.py +0 -0
  54. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/repl/__init__.py +0 -0
  55. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/security/security.py +0 -0
  56. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/ui/ui.py +0 -0
  57. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/weapon/cron.py +0 -0
  58. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/weapon/dataframe.py +0 -0
  59. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/weapon/disk.py +0 -0
  60. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/weapon/fs.py +0 -0
  61. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/weapon/launcher.py +0 -0
  62. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/weapon/loader.py +0 -0
  63. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/weapon/mail.py +0 -0
  64. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/weapon/mcp.py +0 -0
  65. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/weapon/vision.py +0 -0
  66. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli/weapon/web.py +0 -0
  67. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli.egg-info/SOURCES.txt +0 -0
  68. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli.egg-info/dependency_links.txt +0 -0
  69. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli.egg-info/entry_points.txt +0 -0
  70. {fr_cli-2.2.2 → fr_cli-2.2.3}/fr_cli.egg-info/top_level.txt +0 -0
  71. {fr_cli-2.2.2 → fr_cli-2.2.3}/setup.cfg +0 -0
  72. {fr_cli-2.2.2 → fr_cli-2.2.3}/tests/test_agent_client.py +0 -0
  73. {fr_cli-2.2.2 → fr_cli-2.2.3}/tests/test_agent_server.py +0 -0
  74. {fr_cli-2.2.2 → fr_cli-2.2.3}/tests/test_ai_save_file_with_verify.py +0 -0
  75. {fr_cli-2.2.2 → fr_cli-2.2.3}/tests/test_all.py +0 -0
  76. {fr_cli-2.2.2 → fr_cli-2.2.3}/tests/test_auto_session.py +0 -0
  77. {fr_cli-2.2.2 → fr_cli-2.2.3}/tests/test_builtins.py +0 -0
  78. {fr_cli-2.2.2 → fr_cli-2.2.3}/tests/test_dataframe.py +0 -0
  79. {fr_cli-2.2.2 → fr_cli-2.2.3}/tests/test_gatekeeper.py +0 -0
  80. {fr_cli-2.2.2 → fr_cli-2.2.3}/tests/test_integration.py +0 -0
  81. {fr_cli-2.2.2 → fr_cli-2.2.3}/tests/test_intent_classification.py +0 -0
  82. {fr_cli-2.2.2 → fr_cli-2.2.3}/tests/test_launcher.py +0 -0
  83. {fr_cli-2.2.2 → fr_cli-2.2.3}/tests/test_master_agent.py +0 -0
  84. {fr_cli-2.2.2 → 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.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.2; extra == "rag"
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.2; extra == "all"
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"
@@ -1,4 +1,4 @@
1
1
  """
2
2
  凡人打字机 - 基于智谱AI的终极全能终端工具
3
3
  """
4
- __version__ = "2.2.2"
4
+ __version__ = "2.2.3"
@@ -121,13 +121,19 @@ def _cmd_model(state, parts):
121
121
  else:
122
122
  print(f"{RED}❌ 无效的提供商或模型: {arg1}{RESET}")
123
123
  else:
124
- # 显示当前道统与可用模型
125
- from fr_cli.core.llm import list_providers, get_provider_info
124
+ # 显示当前道统与可用模型及 key 配置状态
125
+ from fr_cli.core.llm import list_providers
126
126
  print(f"{CYAN}🧠 当前道统: [{state.provider}] {state.model_name}{RESET}")
127
127
  print(f"\n{DIM}可用道统与默认模型:{RESET}")
128
+ providers_cfg = state.cfg.get("providers", {})
128
129
  for p in list_providers():
129
130
  marker = " 👈 当前" if p["id"] == state.provider else ""
130
- print(f" {CYAN}{p['id']}{RESET} {p['name']}{DIM} (默认: {p['default_model']}){RESET}{marker}")
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}")
131
137
  print(f"\n{DIM}用法:{RESET}")
132
138
  print(f" /model <模型名> — 切换当前道统下的模型")
133
139
  print(f" /model <道统>:<模型名> — 同时切换道统和模型")
@@ -136,12 +142,37 @@ def _cmd_model(state, parts):
136
142
 
137
143
 
138
144
  def _cmd_key(state, parts):
145
+ """
146
+ 设置 API Key
147
+ 用法:
148
+ /key <key> — 为当前道统设置 key
149
+ /key <道统> <key> — 为指定道统设置 key
150
+ """
139
151
  arg1 = parts[1] if len(parts) > 1 else ""
140
- if arg1:
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>
141
170
  state.update_key(arg1)
142
171
  print(f"{GREEN}✅ [{state.provider}] API Key 已更新{RESET}")
143
172
  else:
144
- print(f"{YELLOW}⚠️ 用法: /key <API密钥> (为当前道统 [{state.provider}] 设置密钥){RESET}")
173
+ print(f"{YELLOW}⚠️ 用法:{RESET}")
174
+ print(f" /key <API密钥> — 为当前道统 [{state.provider}] 设置密钥")
175
+ print(f" /key <道统> <API密钥> — 为指定道统设置密钥")
145
176
  return False
146
177
 
147
178
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fr-cli
3
- Version: 2.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.2; extra == "rag"
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.2; extra == "all"
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.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.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.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.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.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