tars-cli 0.1.3__tar.gz → 0.1.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.
Files changed (33) hide show
  1. {tars_cli-0.1.3 → tars_cli-0.1.4}/PKG-INFO +10 -2
  2. {tars_cli-0.1.3 → tars_cli-0.1.4}/README.md +9 -1
  3. {tars_cli-0.1.3 → tars_cli-0.1.4}/pyproject.toml +1 -1
  4. tars_cli-0.1.4/tars_cli/__init__.py +1 -0
  5. {tars_cli-0.1.3 → tars_cli-0.1.4}/tars_cli/commands/plugin_cmd.py +3 -2
  6. {tars_cli-0.1.3 → tars_cli-0.1.4}/tars_cli/hints.py +2 -2
  7. {tars_cli-0.1.3 → tars_cli-0.1.4}/tars_cli.egg-info/PKG-INFO +10 -2
  8. tars_cli-0.1.3/tars_cli/__init__.py +0 -1
  9. {tars_cli-0.1.3 → tars_cli-0.1.4}/setup.cfg +0 -0
  10. {tars_cli-0.1.3 → tars_cli-0.1.4}/tars_cli/__main__.py +0 -0
  11. {tars_cli-0.1.3 → tars_cli-0.1.4}/tars_cli/app.py +0 -0
  12. {tars_cli-0.1.3 → tars_cli-0.1.4}/tars_cli/auth.py +0 -0
  13. {tars_cli-0.1.3 → tars_cli-0.1.4}/tars_cli/client.py +0 -0
  14. {tars_cli-0.1.3 → tars_cli-0.1.4}/tars_cli/commands/__init__.py +0 -0
  15. {tars_cli-0.1.3 → tars_cli-0.1.4}/tars_cli/commands/auth_cmd.py +0 -0
  16. {tars_cli-0.1.3 → tars_cli-0.1.4}/tars_cli/commands/dataset_cmd.py +0 -0
  17. {tars_cli-0.1.3 → tars_cli-0.1.4}/tars_cli/commands/eval_cmd.py +0 -0
  18. {tars_cli-0.1.3 → tars_cli-0.1.4}/tars_cli/commands/template_cmd.py +0 -0
  19. {tars_cli-0.1.3 → tars_cli-0.1.4}/tars_cli/config.py +0 -0
  20. {tars_cli-0.1.3 → tars_cli-0.1.4}/tars_cli/output.py +0 -0
  21. {tars_cli-0.1.3 → tars_cli-0.1.4}/tars_cli/utils/__init__.py +0 -0
  22. {tars_cli-0.1.3 → tars_cli-0.1.4}/tars_cli/utils/polling.py +0 -0
  23. {tars_cli-0.1.3 → tars_cli-0.1.4}/tars_cli/utils/progress.py +0 -0
  24. {tars_cli-0.1.3 → tars_cli-0.1.4}/tars_cli.egg-info/SOURCES.txt +0 -0
  25. {tars_cli-0.1.3 → tars_cli-0.1.4}/tars_cli.egg-info/dependency_links.txt +0 -0
  26. {tars_cli-0.1.3 → tars_cli-0.1.4}/tars_cli.egg-info/entry_points.txt +0 -0
  27. {tars_cli-0.1.3 → tars_cli-0.1.4}/tars_cli.egg-info/requires.txt +0 -0
  28. {tars_cli-0.1.3 → tars_cli-0.1.4}/tars_cli.egg-info/top_level.txt +0 -0
  29. {tars_cli-0.1.3 → tars_cli-0.1.4}/tests/test_auth.py +0 -0
  30. {tars_cli-0.1.3 → tars_cli-0.1.4}/tests/test_client.py +0 -0
  31. {tars_cli-0.1.3 → tars_cli-0.1.4}/tests/test_config.py +0 -0
  32. {tars_cli-0.1.3 → tars_cli-0.1.4}/tests/test_hints.py +0 -0
  33. {tars_cli-0.1.3 → tars_cli-0.1.4}/tests/test_output.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tars-cli
3
- Version: 0.1.3
3
+ Version: 0.1.4
4
4
  Summary: tars 平台命令行工具
5
5
  Requires-Python: >=3.11
6
6
  Description-Content-Type: text/markdown
@@ -32,7 +32,7 @@ pip install tars-cli
32
32
 
33
33
  ```bash
34
34
  $ tars --version
35
- tars-cli 0.1.1
35
+ tars-cli 0.1.4
36
36
  ```
37
37
 
38
38
  ### 升级
@@ -91,6 +91,14 @@ $ tars plugin import https://github.com/example/agent-eval.git
91
91
  插件ID: 46a387de-f10b-4e6a-be0e-04f634f53915
92
92
  查看详情: https://your-tars-server.com/plugins/46a387de-f10b-4e6a-be0e-04f634f53915
93
93
 
94
+ $ tars plugin import /Users/easyops/Downloads/ticket-mate-1.0.0.zip --overwrite
95
+ 正在验证插件...
96
+ ✓ 插件验证通过
97
+ 正在导入插件...
98
+ ✓ 插件导入成功(已覆盖)
99
+ 插件ID: 46a387de-f10b-4e6a-be0e-04f634f53915
100
+ 查看详情: https://your-tars-server.com/plugins/46a387de-f10b-4e6a-be0e-04f634f53915
101
+
94
102
  $ tars plugin export-report 46a387de-f10b-4e6a-be0e-04f634f53915
95
103
  ✓ 报告已导出
96
104
  文件: report_46a387de_20260518120000.html
@@ -12,7 +12,7 @@ pip install tars-cli
12
12
 
13
13
  ```bash
14
14
  $ tars --version
15
- tars-cli 0.1.1
15
+ tars-cli 0.1.4
16
16
  ```
17
17
 
18
18
  ### 升级
@@ -71,6 +71,14 @@ $ tars plugin import https://github.com/example/agent-eval.git
71
71
  插件ID: 46a387de-f10b-4e6a-be0e-04f634f53915
72
72
  查看详情: https://your-tars-server.com/plugins/46a387de-f10b-4e6a-be0e-04f634f53915
73
73
 
74
+ $ tars plugin import /Users/easyops/Downloads/ticket-mate-1.0.0.zip --overwrite
75
+ 正在验证插件...
76
+ ✓ 插件验证通过
77
+ 正在导入插件...
78
+ ✓ 插件导入成功(已覆盖)
79
+ 插件ID: 46a387de-f10b-4e6a-be0e-04f634f53915
80
+ 查看详情: https://your-tars-server.com/plugins/46a387de-f10b-4e6a-be0e-04f634f53915
81
+
74
82
  $ tars plugin export-report 46a387de-f10b-4e6a-be0e-04f634f53915
75
83
  ✓ 报告已导出
76
84
  文件: report_46a387de_20260518120000.html
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "tars-cli"
7
- version = "0.1.3"
7
+ version = "0.1.4"
8
8
  description = "tars 平台命令行工具"
9
9
  requires-python = ">=3.11"
10
10
  dependencies = [
@@ -0,0 +1 @@
1
+ __version__ = "0.1.4"
@@ -19,6 +19,7 @@ def _is_git_url(source: str) -> bool:
19
19
  @plugin_app.command("import")
20
20
  def import_plugin(
21
21
  source: str = typer.Argument(help="Git URL 或本地文件路径"),
22
+ overwrite: bool = typer.Option(False, "--overwrite", help="覆盖同名 Plugin"),
22
23
  ) -> None:
23
24
  """导入 Plugin(自动识别 Git URL 或文件)"""
24
25
  output_fmt, quiet, verbose, server = get_global_options()
@@ -35,7 +36,7 @@ def import_plugin(
35
36
  typer.echo(f"Git URL 验证失败: {resp.text}", err=True)
36
37
  raise typer.Exit(code=2)
37
38
 
38
- resp = client.post("/plugins/import-git", json={"url": source})
39
+ resp = client.post("/plugins/import-git", json={"url": source, "overwrite": overwrite})
39
40
  else:
40
41
  file_path = Path(source)
41
42
  if not file_path.exists():
@@ -49,7 +50,7 @@ def import_plugin(
49
50
  raise typer.Exit(code=2)
50
51
 
51
52
  with open(file_path, "rb") as f:
52
- resp = client.post("/plugins/upload", files={"file": (file_path.name, f)})
53
+ resp = client.post("/plugins/upload", files={"file": (file_path.name, f)}, data={"overwrite": str(overwrite).lower()})
53
54
 
54
55
  if not resp.is_success:
55
56
  typer.echo(f"导入失败: {resp.text}", err=True)
@@ -16,8 +16,8 @@ ROUTE_MAP: dict[str, str] = {
16
16
  NEXT_STEP_MAP: dict[str, str] = {
17
17
  "auth_login": "tars plugin import <git_url_or_file_path>",
18
18
  "plugin_import": "tars dataset generate {plugin_id} --agent-name <name> --conversation-type single_turn",
19
- "dataset_generate": "tars eval run {plugin_id} --agent-name <name> --dataset-version {version_id}",
20
- "dataset_upload": "tars eval run {plugin_id} --agent-name <name> --dataset-version {version_id}",
19
+ "dataset_generate": "tars dataset publish {version_id}",
20
+ "dataset_upload": "tars dataset publish {version_id}",
21
21
  "dataset_publish": "tars eval run {plugin_id} --agent-name <name> --dataset-version {version_id}",
22
22
  "eval_run": "tars plugin export-report {plugin_id}",
23
23
  "template_download": "tars dataset upload {plugin_id} --agent-name <name> --plan plan.yaml --cases cases.yaml",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tars-cli
3
- Version: 0.1.3
3
+ Version: 0.1.4
4
4
  Summary: tars 平台命令行工具
5
5
  Requires-Python: >=3.11
6
6
  Description-Content-Type: text/markdown
@@ -32,7 +32,7 @@ pip install tars-cli
32
32
 
33
33
  ```bash
34
34
  $ tars --version
35
- tars-cli 0.1.1
35
+ tars-cli 0.1.4
36
36
  ```
37
37
 
38
38
  ### 升级
@@ -91,6 +91,14 @@ $ tars plugin import https://github.com/example/agent-eval.git
91
91
  插件ID: 46a387de-f10b-4e6a-be0e-04f634f53915
92
92
  查看详情: https://your-tars-server.com/plugins/46a387de-f10b-4e6a-be0e-04f634f53915
93
93
 
94
+ $ tars plugin import /Users/easyops/Downloads/ticket-mate-1.0.0.zip --overwrite
95
+ 正在验证插件...
96
+ ✓ 插件验证通过
97
+ 正在导入插件...
98
+ ✓ 插件导入成功(已覆盖)
99
+ 插件ID: 46a387de-f10b-4e6a-be0e-04f634f53915
100
+ 查看详情: https://your-tars-server.com/plugins/46a387de-f10b-4e6a-be0e-04f634f53915
101
+
94
102
  $ tars plugin export-report 46a387de-f10b-4e6a-be0e-04f634f53915
95
103
  ✓ 报告已导出
96
104
  文件: report_46a387de_20260518120000.html
@@ -1 +0,0 @@
1
- __version__ = "0.1.3"
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