rednote-cli 0.1.4__tar.gz → 0.1.5__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.
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/PKG-INFO +1 -1
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/pyproject.toml +1 -1
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/__init__.py +1 -1
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/_runtime/platforms/rednote/issues.py +14 -7
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli.egg-info/PKG-INFO +1 -1
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/README.md +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/setup.cfg +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/_runtime/__init__.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/_runtime/common/__init__.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/_runtime/common/app_utils.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/_runtime/common/config.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/_runtime/common/enums.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/_runtime/common/errors.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/_runtime/core/__init__.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/_runtime/core/account_manager.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/_runtime/core/browser/__init__.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/_runtime/core/browser/manager.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/_runtime/core/database/__init__.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/_runtime/core/database/manager.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/_runtime/platforms/__init__.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/_runtime/platforms/base.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/_runtime/platforms/factory.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/_runtime/platforms/publishing/__init__.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/_runtime/platforms/publishing/media.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/_runtime/platforms/publishing/models.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/_runtime/platforms/publishing/validator.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/_runtime/platforms/rednote/__init__.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/_runtime/services/__init__.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/_runtime/services/scraper_service.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/adapters/__init__.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/adapters/output/__init__.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/adapters/output/event_stream.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/adapters/output/formatter_json.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/adapters/output/formatter_table.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/adapters/output/writer.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/adapters/persistence/__init__.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/adapters/persistence/file_account_repo.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/adapters/platform/__init__.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/adapters/platform/rednote/__init__.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/adapters/platform/rednote/extractor.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/adapters/platform/rednote/publisher.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/adapters/platform/rednote/runtime_extractor.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/adapters/platform/rednote/runtime_publisher.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/adapters/platform/rednote/runtime_registration.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/application/__init__.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/application/dto/__init__.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/application/dto/input_models.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/application/dto/output_models.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/application/use_cases/__init__.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/application/use_cases/account_list.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/application/use_cases/account_mutation.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/application/use_cases/auth_login.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/application/use_cases/auth_status.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/application/use_cases/doctor.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/application/use_cases/init_runtime.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/application/use_cases/note_get.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/application/use_cases/note_search.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/application/use_cases/publish_note.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/application/use_cases/user_get.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/application/use_cases/user_search.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/application/use_cases/user_self.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/cli/__init__.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/cli/__main__.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/cli/commands/__init__.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/cli/commands/account.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/cli/commands/doctor.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/cli/commands/init.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/cli/commands/note.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/cli/commands/publish.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/cli/commands/search.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/cli/commands/user.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/cli/main.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/cli/options.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/cli/runtime.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/cli/utils.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/cli/xsec_help.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/domain/__init__.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/domain/errors.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/domain/note_search_filters.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/infra/__init__.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/infra/exit_codes.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/infra/logger.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/infra/paths.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/infra/platforms.py +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli.egg-info/SOURCES.txt +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli.egg-info/dependency_links.txt +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli.egg-info/entry_points.txt +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli.egg-info/requires.txt +0 -0
- {rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli.egg-info/top_level.txt +0 -0
{rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/_runtime/platforms/rednote/issues.py
RENAMED
|
@@ -23,24 +23,20 @@ class RednoteIssue:
|
|
|
23
23
|
reason_code: str
|
|
24
24
|
failure_reason: str
|
|
25
25
|
next_action: str
|
|
26
|
+
agent_action: str
|
|
26
27
|
source: str
|
|
27
28
|
retry_recommended: bool = False
|
|
28
29
|
cli_code: str = "INTERNAL_ERROR"
|
|
29
30
|
observed_text: str = ""
|
|
30
31
|
|
|
31
32
|
def to_details(self) -> dict:
|
|
32
|
-
|
|
33
|
+
return {
|
|
33
34
|
"failure_type": self.failure_type,
|
|
34
|
-
"reason_code": self.reason_code,
|
|
35
35
|
"failure_reason": self.failure_reason,
|
|
36
36
|
"next_action": self.next_action,
|
|
37
|
-
"source": self.source,
|
|
38
37
|
"retry_recommended": self.retry_recommended,
|
|
39
|
-
"
|
|
38
|
+
"agent_action": self.agent_action,
|
|
40
39
|
}
|
|
41
|
-
if self.observed_text:
|
|
42
|
-
details["observed_text"] = self.observed_text
|
|
43
|
-
return details
|
|
44
40
|
|
|
45
41
|
|
|
46
42
|
_ISSUE_RULES: tuple[dict, ...] = (
|
|
@@ -49,6 +45,7 @@ _ISSUE_RULES: tuple[dict, ...] = (
|
|
|
49
45
|
"failure_type": "PHONE_NOT_BOUND",
|
|
50
46
|
"reason_code": "PHONE_NOT_BOUND",
|
|
51
47
|
"next_action": "请给账号绑定手机号",
|
|
48
|
+
"agent_action": "REQUEST_USER_ACTION",
|
|
52
49
|
"retry_recommended": False,
|
|
53
50
|
"cli_code": "INTERNAL_ERROR",
|
|
54
51
|
},
|
|
@@ -57,6 +54,7 @@ _ISSUE_RULES: tuple[dict, ...] = (
|
|
|
57
54
|
"failure_type": "VERIFICATION_REQUIRED",
|
|
58
55
|
"reason_code": "VERIFICATION_REQUIRED",
|
|
59
56
|
"next_action": "请使用已登录小红书 APP 扫码完成验证",
|
|
57
|
+
"agent_action": "REQUEST_USER_ACTION",
|
|
60
58
|
"retry_recommended": False,
|
|
61
59
|
"cli_code": "RISK_CONTROL_TRIGGERED",
|
|
62
60
|
},
|
|
@@ -65,6 +63,7 @@ _ISSUE_RULES: tuple[dict, ...] = (
|
|
|
65
63
|
"failure_type": "RISK_CONTROL",
|
|
66
64
|
"reason_code": "CAPTAIN_POTATO",
|
|
67
65
|
"next_action": "请暂停当前操作,稍后重试或联系开发者",
|
|
66
|
+
"agent_action": "STOP",
|
|
68
67
|
"retry_recommended": False,
|
|
69
68
|
"cli_code": "RISK_CONTROL_TRIGGERED",
|
|
70
69
|
},
|
|
@@ -73,6 +72,7 @@ _ISSUE_RULES: tuple[dict, ...] = (
|
|
|
73
72
|
"failure_type": "NETWORK_ENV_RISK",
|
|
74
73
|
"reason_code": "IP_RISK",
|
|
75
74
|
"next_action": "请切换可靠网络环境后重试",
|
|
75
|
+
"agent_action": "STOP",
|
|
76
76
|
"retry_recommended": False,
|
|
77
77
|
"cli_code": "RISK_CONTROL_TRIGGERED",
|
|
78
78
|
},
|
|
@@ -81,6 +81,7 @@ _ISSUE_RULES: tuple[dict, ...] = (
|
|
|
81
81
|
"failure_type": "TRANSIENT_NETWORK",
|
|
82
82
|
"reason_code": "SERVER_DISCONNECTED",
|
|
83
83
|
"next_action": "请刷新页面后重试当前步骤",
|
|
84
|
+
"agent_action": "RETRY_LATER",
|
|
84
85
|
"retry_recommended": True,
|
|
85
86
|
"cli_code": "INTERNAL_ERROR",
|
|
86
87
|
},
|
|
@@ -89,6 +90,7 @@ _ISSUE_RULES: tuple[dict, ...] = (
|
|
|
89
90
|
"failure_type": "CONTENT_UNAVAILABLE",
|
|
90
91
|
"reason_code": "CONTENT_UNAVAILABLE",
|
|
91
92
|
"next_action": "请跳过该内容或联系开发者确认可见性限制",
|
|
93
|
+
"agent_action": "STOP",
|
|
92
94
|
"retry_recommended": False,
|
|
93
95
|
"cli_code": "INTERNAL_ERROR",
|
|
94
96
|
},
|
|
@@ -97,6 +99,7 @@ _ISSUE_RULES: tuple[dict, ...] = (
|
|
|
97
99
|
"failure_type": "PAGE_UNAVAILABLE",
|
|
98
100
|
"reason_code": "PAGE_NOT_FOUND",
|
|
99
101
|
"next_action": "请检查链接参数或联系开发者确认页面访问路径",
|
|
102
|
+
"agent_action": "STOP",
|
|
100
103
|
"retry_recommended": False,
|
|
101
104
|
"cli_code": "INTERNAL_ERROR",
|
|
102
105
|
},
|
|
@@ -105,6 +108,7 @@ _ISSUE_RULES: tuple[dict, ...] = (
|
|
|
105
108
|
"failure_type": "LOGIN_PAGE_BROKEN",
|
|
106
109
|
"reason_code": "QR_WIDGET_SCRIPT_ERROR",
|
|
107
110
|
"next_action": "请刷新页面后重试登录;若仍失败请联系开发者",
|
|
111
|
+
"agent_action": "RETRY_LATER",
|
|
108
112
|
"retry_recommended": True,
|
|
109
113
|
"cli_code": "INTERNAL_ERROR",
|
|
110
114
|
},
|
|
@@ -133,6 +137,7 @@ def _match_rule(text: str, source: str) -> RednoteIssue | None:
|
|
|
133
137
|
reason_code=rule["reason_code"],
|
|
134
138
|
failure_reason=line,
|
|
135
139
|
next_action=rule["next_action"],
|
|
140
|
+
agent_action=rule["agent_action"],
|
|
136
141
|
source=source,
|
|
137
142
|
retry_recommended=rule["retry_recommended"],
|
|
138
143
|
cli_code=rule["cli_code"],
|
|
@@ -159,12 +164,14 @@ def build_unknown_issue(
|
|
|
159
164
|
observed_text: str = "",
|
|
160
165
|
failure_reason: str = "未知原因",
|
|
161
166
|
next_action: str = "请联系开发者",
|
|
167
|
+
agent_action: str = "STOP",
|
|
162
168
|
) -> RednoteIssue:
|
|
163
169
|
return RednoteIssue(
|
|
164
170
|
failure_type="UNKNOWN",
|
|
165
171
|
reason_code="UNKNOWN",
|
|
166
172
|
failure_reason=failure_reason,
|
|
167
173
|
next_action=next_action,
|
|
174
|
+
agent_action=agent_action,
|
|
168
175
|
source=source,
|
|
169
176
|
retry_recommended=False,
|
|
170
177
|
cli_code="INTERNAL_ERROR",
|
|
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
|
{rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/_runtime/platforms/publishing/__init__.py
RENAMED
|
File without changes
|
{rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/_runtime/platforms/publishing/media.py
RENAMED
|
File without changes
|
{rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/_runtime/platforms/publishing/models.py
RENAMED
|
File without changes
|
{rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/_runtime/platforms/publishing/validator.py
RENAMED
|
File without changes
|
{rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/_runtime/platforms/rednote/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/_runtime/services/scraper_service.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/adapters/persistence/file_account_repo.py
RENAMED
|
File without changes
|
|
File without changes
|
{rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/adapters/platform/rednote/__init__.py
RENAMED
|
File without changes
|
{rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/adapters/platform/rednote/extractor.py
RENAMED
|
File without changes
|
{rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/adapters/platform/rednote/publisher.py
RENAMED
|
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
|
{rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/application/use_cases/account_list.py
RENAMED
|
File without changes
|
{rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/application/use_cases/account_mutation.py
RENAMED
|
File without changes
|
|
File without changes
|
{rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/application/use_cases/auth_status.py
RENAMED
|
File without changes
|
|
File without changes
|
{rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/application/use_cases/init_runtime.py
RENAMED
|
File without changes
|
|
File without changes
|
{rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/application/use_cases/note_search.py
RENAMED
|
File without changes
|
{rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/application/use_cases/publish_note.py
RENAMED
|
File without changes
|
|
File without changes
|
{rednote-cli-0.1.4 → rednote-cli-0.1.5}/src/rednote_cli/application/use_cases/user_search.py
RENAMED
|
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
|