openboost-cli 0.1.0__py3-none-any.whl

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 (76) hide show
  1. openboost_cli-0.1.0.dist-info/METADATA +153 -0
  2. openboost_cli-0.1.0.dist-info/RECORD +76 -0
  3. openboost_cli-0.1.0.dist-info/WHEEL +5 -0
  4. openboost_cli-0.1.0.dist-info/entry_points.txt +2 -0
  5. openboost_cli-0.1.0.dist-info/licenses/LICENSE +21 -0
  6. openboost_cli-0.1.0.dist-info/top_level.txt +1 -0
  7. proboost_cli/__init__.py +21 -0
  8. proboost_cli/cli/__init__.py +1 -0
  9. proboost_cli/cli/interactive.py +107 -0
  10. proboost_cli/cli/main.py +566 -0
  11. proboost_cli/client.py +58 -0
  12. proboost_cli/coerce_args.py +62 -0
  13. proboost_cli/config.py +109 -0
  14. proboost_cli/mcp_client.py +113 -0
  15. proboost_cli/parse_result.py +53 -0
  16. proboost_cli/registry.py +112 -0
  17. proboost_cli/schemas/__init__.py +1 -0
  18. proboost_cli/schemas/amazon/__init__.py +1 -0
  19. proboost_cli/schemas/amazon/amz_category_query.json +20 -0
  20. proboost_cli/schemas/amazon/amz_hot_amz_hot_cat_tree.json +25 -0
  21. proboost_cli/schemas/amazon/amz_hot_amz_hot_list.json +33 -0
  22. proboost_cli/schemas/amazon/amz_market_price.json +28 -0
  23. proboost_cli/schemas/amazon/amz_product_selection.json +140 -0
  24. proboost_cli/schemas/amazon/amz_review_query.json +28 -0
  25. proboost_cli/schemas/amazon/amz_sales_query.json +20 -0
  26. proboost_cli/schemas/amazon/amz_sku_query.json +20 -0
  27. proboost_cli/schemas/patent/__init__.py +1 -0
  28. proboost_cli/schemas/patent/patent_abstract_image.json +17 -0
  29. proboost_cli/schemas/patent/patent_abstract_translated.json +28 -0
  30. proboost_cli/schemas/patent/patent_bibliography.json +17 -0
  31. proboost_cli/schemas/patent/patent_claim_data.json +21 -0
  32. proboost_cli/schemas/patent/patent_claim_translated.json +28 -0
  33. proboost_cli/schemas/patent/patent_description.json +21 -0
  34. proboost_cli/schemas/patent/patent_description_translated.json +28 -0
  35. proboost_cli/schemas/patent/patent_family.json +17 -0
  36. proboost_cli/schemas/patent/patent_fulltext_image.json +29 -0
  37. proboost_cli/schemas/patent/patent_image_search_multiple.json +117 -0
  38. proboost_cli/schemas/patent/patent_image_search_single.json +114 -0
  39. proboost_cli/schemas/patent/patent_legal_status.json +17 -0
  40. proboost_cli/schemas/patent/patent_pdf.json +21 -0
  41. proboost_cli/schemas/patent/patent_query_count.json +36 -0
  42. proboost_cli/schemas/patent/patent_query_search.json +40 -0
  43. proboost_cli/schemas/patent/patent_query_search_with_agg.json +55 -0
  44. proboost_cli/schemas/patent/patent_semantic_search.json +48 -0
  45. proboost_cli/schemas/tiktok/__init__.py +1 -0
  46. proboost_cli/schemas/tiktok/tk_expert_sale_show.json +20 -0
  47. proboost_cli/schemas/tiktok/tt_commodity_detail.json +21 -0
  48. proboost_cli/schemas/tiktok/tt_commodity_expert_draw_expert_trend.json +20 -0
  49. proboost_cli/schemas/tiktok/tt_commodity_get_commodity_cat_tree.json +8 -0
  50. proboost_cli/schemas/tiktok/tt_commodity_info_list.json +180 -0
  51. proboost_cli/schemas/tiktok/tt_commodity_sales_trend.json +33 -0
  52. proboost_cli/schemas/tiktok/tt_commodity_statistics_get_category_statistics.json +28 -0
  53. proboost_cli/schemas/tiktok/tt_commodity_statistics_get_expert_statistics.json +28 -0
  54. proboost_cli/schemas/tiktok/tt_commodity_statistics_get_price_statistics.json +28 -0
  55. proboost_cli/schemas/tiktok/tt_commodity_statistics_get_total_statistics.json +28 -0
  56. proboost_cli/schemas/tiktok/tt_commodity_voice_analyze.json +36 -0
  57. proboost_cli/schemas/tiktok/tt_expert_basic_analyze.json +24 -0
  58. proboost_cli/schemas/tiktok/tt_expert_category_analyze.json +29 -0
  59. proboost_cli/schemas/tiktok/tt_expert_detail.json +20 -0
  60. proboost_cli/schemas/tiktok/tt_expert_fans_analyze.json +20 -0
  61. proboost_cli/schemas/tiktok/tt_expert_fans_portrait.json +20 -0
  62. proboost_cli/schemas/tiktok/tt_expert_info_list.json +180 -0
  63. proboost_cli/schemas/tiktok/tt_sale_channel_sale_channel.json +26 -0
  64. proboost_cli/schemas/tiktok/tt_shop_commodity_account_list.json +28 -0
  65. proboost_cli/schemas/tiktok/tt_shop_detail.json +28 -0
  66. proboost_cli/schemas/tiktok/tt_shop_info_list.json +108 -0
  67. proboost_cli/schemas/tiktok/tt_shop_market_info.json +28 -0
  68. proboost_cli/schemas/tiktok/tt_shop_sales_trend.json +33 -0
  69. proboost_cli/schemas/tiktok/tt_video_content.json +20 -0
  70. proboost_cli/schemas/tiktok/tt_video_detail.json +20 -0
  71. proboost_cli/schemas/tiktok/tt_video_info_list.json +152 -0
  72. proboost_cli/schemas/tiktok/tt_video_new_video_summary.json +20 -0
  73. proboost_cli/schemas/tiktok/tt_video_script_diy_query.json +20 -0
  74. proboost_cli/schemas/tiktok/tt_video_voice_read.json +28 -0
  75. proboost_cli/schemas/tiktok/tt_video_voice_summary.json +28 -0
  76. proboost_cli/schemas_loader.py +49 -0
@@ -0,0 +1,152 @@
1
+ {
2
+ "name": "tt_video_info_list",
3
+ "description": "分页查询 TT 视频选品列表,支持国家/地区、标题与达人/商品/店铺、发布时间、播放互动、近30日销量与 GMV、投流与带货类型、数据维度与销量口径、总结/脚本标记等筛选与排序。;无「查看全部」权限时仅可查询前 3 页;每页最多 30 条。",
4
+ "arguments": {
5
+ "type": "object",
6
+ "properties": {
7
+ "adSource": {
8
+ "description": "是否投流:0 否 / 1 是",
9
+ "type": "integer"
10
+ },
11
+ "commodityId": {
12
+ "description": "商品编号",
13
+ "type": "string"
14
+ },
15
+ "countryRegion": {
16
+ "description": "国家/地区,与站内选品一致;paramCheck 要求非空",
17
+ "type": "string"
18
+ },
19
+ "current": {
20
+ "description": "当前页码,默认 1;无「查看全部」权限时 current > 3 会报错",
21
+ "type": "integer"
22
+ },
23
+ "dataPeriod": {
24
+ "description": "数据维度,与 date 等联用",
25
+ "type": "string"
26
+ },
27
+ "date": {
28
+ "description": "数据日期,ISO 8601 日期时间字符串",
29
+ "type": "string"
30
+ },
31
+ "expertId": {
32
+ "description": "达人编号",
33
+ "type": "string"
34
+ },
35
+ "expertName": {
36
+ "description": "达人名称/昵称筛选",
37
+ "type": "string"
38
+ },
39
+ "fansNumberEnd": {
40
+ "description": "粉丝数区间上限",
41
+ "type": "integer"
42
+ },
43
+ "fansNumberStart": {
44
+ "description": "粉丝数区间下限",
45
+ "type": "integer"
46
+ },
47
+ "gmvLast30dEnd": {
48
+ "description": "近30天销售额区间上限",
49
+ "type": "integer"
50
+ },
51
+ "gmvLast30dStart": {
52
+ "description": "近30天销售额区间下限(与接口数值口径一致)",
53
+ "type": "integer"
54
+ },
55
+ "hasVideoScript": {
56
+ "description": "是否有视频脚本",
57
+ "type": "string"
58
+ },
59
+ "hasVideoSummary": {
60
+ "description": "是否有视频总结(与站内标记一致)",
61
+ "type": "string"
62
+ },
63
+ "hasVoiceSummary": {
64
+ "description": "是否有评论总结",
65
+ "type": "string"
66
+ },
67
+ "interactionRateEnd": {
68
+ "description": "互动率区间上限(百分比口径)",
69
+ "type": "string"
70
+ },
71
+ "interactionRateStart": {
72
+ "description": "互动率区间下限(百分比口径,与前端一致)",
73
+ "type": "string"
74
+ },
75
+ "likeNumberEnd": {
76
+ "description": "点赞数区间上限",
77
+ "type": "integer"
78
+ },
79
+ "likeNumberStart": {
80
+ "description": "点赞数区间下限",
81
+ "type": "integer"
82
+ },
83
+ "mainCategory": {
84
+ "description": "主营类目",
85
+ "type": "string"
86
+ },
87
+ "offset": {
88
+ "description": "偏移量,可选",
89
+ "type": "integer"
90
+ },
91
+ "orderType": {
92
+ "description": "排序类型,如 playNumberDesc(默认播放量降序)、publishTimeDesc 等,完整见 VideoInfoRequest 注释",
93
+ "type": "string"
94
+ },
95
+ "playNumberEnd": {
96
+ "description": "播放量区间上限",
97
+ "type": "integer"
98
+ },
99
+ "playNumberStart": {
100
+ "description": "播放量区间下限",
101
+ "type": "integer"
102
+ },
103
+ "publishTimeEnd": {
104
+ "description": "发布日期止,yyyy-MM-dd(GMT+8)",
105
+ "type": "string"
106
+ },
107
+ "publishTimeStart": {
108
+ "description": "发布日期起,yyyy-MM-dd(GMT+8)",
109
+ "type": "string"
110
+ },
111
+ "reviewsNumberEnd": {
112
+ "description": "评论数区间上限",
113
+ "type": "integer"
114
+ },
115
+ "reviewsNumberStart": {
116
+ "description": "评论数区间下限",
117
+ "type": "integer"
118
+ },
119
+ "salesPeriod": {
120
+ "description": "销量口径:day / last7Day / last30Day 等",
121
+ "type": "string"
122
+ },
123
+ "shopId": {
124
+ "description": "店铺 ID",
125
+ "type": "string"
126
+ },
127
+ "size": {
128
+ "description": "每页条数,默认 10,最大 30(paramPageListCheck)",
129
+ "type": "integer"
130
+ },
131
+ "soldLast30dEnd": {
132
+ "description": "近30天销量区间上限",
133
+ "type": "integer"
134
+ },
135
+ "soldLast30dStart": {
136
+ "description": "近30天销量区间下限",
137
+ "type": "integer"
138
+ },
139
+ "videoTitle": {
140
+ "description": "视频标题关键词,空格分词",
141
+ "type": "string"
142
+ },
143
+ "videoType": {
144
+ "description": "视频类型,如 powerVideo 带货视频",
145
+ "type": "string"
146
+ }
147
+ },
148
+ "required": [
149
+ "countryRegion"
150
+ ]
151
+ }
152
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "tt_video_new_video_summary",
3
+ "description": "按视频 ID 查询新版视频总结(结构化列表)。;data 为 Map 列表,键值以实际联调为准。",
4
+ "arguments": {
5
+ "type": "object",
6
+ "properties": {
7
+ "countryRegion": {
8
+ "description": "国家/地区;请求体字段与 VideoDetailRequest 一致,当前实现仅将 videoId 传入业务",
9
+ "type": "string"
10
+ },
11
+ "videoId": {
12
+ "description": "视频编号;paramCheck 要求非空",
13
+ "type": "string"
14
+ }
15
+ },
16
+ "required": [
17
+ "videoId"
18
+ ]
19
+ }
20
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "tt_video_script_diy_query",
3
+ "description": "查询当前用户在某视频下的 DIY 脚本列表及是否完成。;口播原文为空时直接返回空的 VideoScriptDiyResponse(成功)。",
4
+ "arguments": {
5
+ "type": "object",
6
+ "properties": {
7
+ "countryRegion": {
8
+ "description": "国家/地区;VideoDetailRequest 字段;本接口查询 DIY 脚本时未传入 getVideoContent 的 VideoDTO(仅按 videoId 拉口播),可忽略或与站内保持一致传入",
9
+ "type": "string"
10
+ },
11
+ "videoId": {
12
+ "description": "视频编号;paramCheck 要求非空",
13
+ "type": "string"
14
+ }
15
+ },
16
+ "required": [
17
+ "videoId"
18
+ ]
19
+ }
20
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "tt_video_voice_read",
3
+ "description": "分页查询视频评论(含子回复列表)。",
4
+ "arguments": {
5
+ "type": "object",
6
+ "properties": {
7
+ "countryRegion": {
8
+ "description": "国家/地区;传入 VideoDTO.countryRegion",
9
+ "type": "string"
10
+ },
11
+ "current": {
12
+ "description": "当前页码,默认 1",
13
+ "type": "integer"
14
+ },
15
+ "size": {
16
+ "description": "每页条数,默认 10;paramCheck 仅限制 size 不大于 1000(未使用 pbParamCheck,无 30 条上限)",
17
+ "type": "integer"
18
+ },
19
+ "videoId": {
20
+ "description": "视频编号;paramCheck 要求非空",
21
+ "type": "string"
22
+ }
23
+ },
24
+ "required": [
25
+ "videoId"
26
+ ]
27
+ }
28
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "tt_video_voice_summary",
3
+ "description": "查询视频评论总结模块:采集/总结进度(not_grip / gripping / gripped 等)与结构化总结列表(标题 + 描述条目)。",
4
+ "arguments": {
5
+ "type": "object",
6
+ "properties": {
7
+ "countryRegion": {
8
+ "description": "国家/地区;传入 VideoDTO.countryRegion",
9
+ "type": "string"
10
+ },
11
+ "current": {
12
+ "description": "当前页码,默认 1(Pagination;本接口为单视频总结,一般可不翻页)",
13
+ "type": "integer"
14
+ },
15
+ "size": {
16
+ "description": "每页条数,默认 10,最大 30(pbParamCheck)",
17
+ "type": "integer"
18
+ },
19
+ "videoId": {
20
+ "description": "视频编号;paramCheck 要求非空",
21
+ "type": "string"
22
+ }
23
+ },
24
+ "required": [
25
+ "videoId"
26
+ ]
27
+ }
28
+ }
@@ -0,0 +1,49 @@
1
+ from __future__ import annotations
2
+
3
+ import json
4
+ from importlib import resources
5
+ from typing import Any
6
+
7
+ from proboost_cli import MCP_NAMES
8
+
9
+
10
+ def _tools_pkg(mcp: str) -> str:
11
+ if mcp not in MCP_NAMES:
12
+ raise ValueError(f"Unknown MCP: {mcp}")
13
+ return f"proboost_cli.schemas.{mcp}"
14
+
15
+
16
+ def iter_tool_manifests(mcp: str) -> list[tuple[str, dict[str, Any]]]:
17
+ root = resources.files(_tools_pkg(mcp))
18
+ items: list[tuple[str, dict[str, Any]]] = []
19
+ for item in sorted(root.iterdir(), key=lambda p: p.name):
20
+ if not item.is_file() or not item.name.endswith(".json"):
21
+ continue
22
+ raw = json.loads(item.read_bytes().decode("utf-8"))
23
+ name = raw.get("name")
24
+ if isinstance(name, str):
25
+ items.append((name, raw))
26
+ return items
27
+
28
+
29
+ def load_tool_definitions(mcp: str) -> dict[str, dict[str, Any]]:
30
+ return dict(iter_tool_manifests(mcp))
31
+
32
+
33
+ def load_all_tool_definitions() -> dict[str, dict[str, dict[str, Any]]]:
34
+ return {mcp: load_tool_definitions(mcp) for mcp in MCP_NAMES}
35
+
36
+
37
+ def tool_schema_arguments(tool: dict[str, Any]) -> dict[str, Any]:
38
+ args = tool.get("arguments")
39
+ return args if isinstance(args, dict) else {}
40
+
41
+
42
+ def tool_schema_properties(tool: dict[str, Any]) -> dict[str, Any]:
43
+ props = tool_schema_arguments(tool).get("properties")
44
+ return props if isinstance(props, dict) else {}
45
+
46
+
47
+ def tool_schema_required(tool: dict[str, Any]) -> list[str]:
48
+ req = tool_schema_arguments(tool).get("required")
49
+ return list(req) if isinstance(req, list) else []