mendao-cli 1.2.1__tar.gz → 1.2.2__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 (30) hide show
  1. {mendao_cli-1.2.1 → mendao_cli-1.2.2}/PKG-INFO +2 -2
  2. {mendao_cli-1.2.1 → mendao_cli-1.2.2}/README.md +1 -1
  3. {mendao_cli-1.2.1 → mendao_cli-1.2.2}/pyproject.toml +1 -1
  4. {mendao_cli-1.2.1 → mendao_cli-1.2.2}/src/mendao_cli/account.py +1 -1
  5. {mendao_cli-1.2.1 → mendao_cli-1.2.2}/src/mendao_cli/errors.py +1 -1
  6. {mendao_cli-1.2.1 → mendao_cli-1.2.2}/src/mendao_cli/http.py +1 -1
  7. {mendao_cli-1.2.1 → mendao_cli-1.2.2}/src/mendao_cli/library.py +2 -2
  8. {mendao_cli-1.2.1 → mendao_cli-1.2.2}/.gitignore +0 -0
  9. {mendao_cli-1.2.1 → mendao_cli-1.2.2}/LICENSE +0 -0
  10. {mendao_cli-1.2.1 → mendao_cli-1.2.2}/scripts/site_release.py +0 -0
  11. {mendao_cli-1.2.1 → mendao_cli-1.2.2}/src/mendao_cli/__init__.py +0 -0
  12. {mendao_cli-1.2.1 → mendao_cli-1.2.2}/src/mendao_cli/admin.py +0 -0
  13. {mendao_cli-1.2.1 → mendao_cli-1.2.2}/src/mendao_cli/config.py +0 -0
  14. {mendao_cli-1.2.1 → mendao_cli-1.2.2}/src/mendao_cli/device.py +0 -0
  15. {mendao_cli-1.2.1 → mendao_cli-1.2.2}/src/mendao_cli/main.py +0 -0
  16. {mendao_cli-1.2.1 → mendao_cli-1.2.2}/src/mendao_cli/owner.py +0 -0
  17. {mendao_cli-1.2.1 → mendao_cli-1.2.2}/src/mendao_cli/parser.py +0 -0
  18. {mendao_cli-1.2.1 → mendao_cli-1.2.2}/src/mendao_cli/py.typed +0 -0
  19. {mendao_cli-1.2.1 → mendao_cli-1.2.2}/src/mendao_cli/result.py +0 -0
  20. {mendao_cli-1.2.1 → mendao_cli-1.2.2}/src/mendao_cli/shape.py +0 -0
  21. {mendao_cli-1.2.1 → mendao_cli-1.2.2}/src/mendao_cli/update.py +0 -0
  22. {mendao_cli-1.2.1 → mendao_cli-1.2.2}/tests/conftest.py +0 -0
  23. {mendao_cli-1.2.1 → mendao_cli-1.2.2}/tests/fake_site.py +0 -0
  24. {mendao_cli-1.2.1 → mendao_cli-1.2.2}/tests/test_account_and_errors.py +0 -0
  25. {mendao_cli-1.2.1 → mendao_cli-1.2.2}/tests/test_admin.py +0 -0
  26. {mendao_cli-1.2.1 → mendao_cli-1.2.2}/tests/test_device_login.py +0 -0
  27. {mendao_cli-1.2.1 → mendao_cli-1.2.2}/tests/test_library.py +0 -0
  28. {mendao_cli-1.2.1 → mendao_cli-1.2.2}/tests/test_site_release.py +0 -0
  29. {mendao_cli-1.2.1 → mendao_cli-1.2.2}/tests/test_transport.py +0 -0
  30. {mendao_cli-1.2.1 → mendao_cli-1.2.2}/tests/test_update.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: mendao-cli
3
- Version: 1.2.1
3
+ Version: 1.2.2
4
4
  Summary: 门道的命令行:让 Agent 按问题查做法、搜整个库、增量同步。输出只有 JSON。
5
5
  Project-URL: Homepage, https://mendaoai.com
6
6
  Project-URL: Documentation, https://mendaoai.com/connect
@@ -55,7 +55,7 @@ uv tool install ./mendao_cli-<版本>-py3-none-any.whl
55
55
 
56
56
  ## 登录
57
57
 
58
- 不登录也能用,只能读公开内容,即每个问题排名前 20 的做法;登录后未开通会员可读前 60,会员读全部。
58
+ 不登录也能用,只能读公开内容,即每个问题排名前 20 的做法;登录后未开通会员可读前 40,会员读全部。
59
59
 
60
60
  ```bash
61
61
  mendao login # 在浏览器里确认,拿到一把以「命令行」命名的密钥
@@ -25,7 +25,7 @@ uv tool install ./mendao_cli-<版本>-py3-none-any.whl
25
25
 
26
26
  ## 登录
27
27
 
28
- 不登录也能用,只能读公开内容,即每个问题排名前 20 的做法;登录后未开通会员可读前 60,会员读全部。
28
+ 不登录也能用,只能读公开内容,即每个问题排名前 20 的做法;登录后未开通会员可读前 40,会员读全部。
29
29
 
30
30
  ```bash
31
31
  mendao login # 在浏览器里确认,拿到一把以「命令行」命名的密钥
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  name = "mendao-cli"
3
3
  # The only place the version is written: the package reads it from its metadata, the site's latest.txt from the built wheel.
4
- version = "1.2.1"
4
+ version = "1.2.2"
5
5
  description = "门道的命令行:让 Agent 按问题查做法、搜整个库、增量同步。输出只有 JSON。"
6
6
  readme = "README.md"
7
7
  requires-python = ">=3.10"
@@ -89,7 +89,7 @@ def _standing(site: Site) -> Standing:
89
89
 
90
90
 
91
91
  def _membership_notice(url: str) -> dict[str, str]:
92
- return {"id": "mendao.needs-membership", "text": "密钥有效,但这个账号的会员没开通或已到期,现在只能读每个问题排名前 60 的做法。", "fix": "到 " + url + "/membership 开通或续费;这把密钥不用换"}
92
+ return {"id": "mendao.needs-membership", "text": "密钥有效,但这个账号的会员没开通或已到期,现在只能读每个问题排名前 40 的做法。", "fix": "到 " + url + "/membership 开通或续费;这把密钥不用换"}
93
93
 
94
94
 
95
95
  def login(args: argparse.Namespace) -> Result:
@@ -25,7 +25,7 @@ ERROR_TYPES: dict[str, tuple[int, bool, str, int]] = {
25
25
  GUIDANCE: dict[str, dict[str, str]] = {
26
26
  "mendao.free-limit": {"kind": "notice", "text": "没有密钥时,只能读公开内容,即每个问题排名前 20 的做法。", "fix": "运行 mendao login,在浏览器里确认登录;或到 {url}/me 创建 Agent 密钥,再运行 mendao login --key-file ~/.config/mendao/key"},
27
27
  "mendao.needs-key": {"kind": "error", "text": "这项内容要 Agent 密钥。", "fix": "运行 mendao login,在浏览器里确认登录;或到 {url}/me 创建 Agent 密钥,再运行 mendao login --key-file ~/.config/mendao/key"},
28
- "mendao.needs-membership": {"kind": "error", "text": "密钥有效,但这个账号的会员没开通或已到期。", "fix": "到 {url}/membership 开通或续费;不开通会员也能读每个问题排名前 60 的做法"},
28
+ "mendao.needs-membership": {"kind": "error", "text": "密钥有效,但这个账号的会员没开通或已到期。", "fix": "到 {url}/membership 开通或续费;不开通会员也能读每个问题排名前 40 的做法"},
29
29
  "mendao.key-rejected": {"kind": "error", "text": "服务器不认这把密钥,可能已撤销。", "fix": "重新运行 mendao login;或到 {url}/me 重新创建,再运行 mendao login --key-file ~/.config/mendao/key"},
30
30
  "mendao.offline": {"kind": "error", "text": "连不上门道。", "fix": "检查网络后重试;地址可用环境变量 MENDAO_URL 改"},
31
31
  "mendao.rate-limited": {"kind": "error", "text": "调用太频繁,已被限流。", "fix": "有 retry_after 就等这么多秒再试,没有就是服务器没说,过一会儿再试;缩小范围或用 mendao changes 增量同步"},
@@ -121,7 +121,7 @@ class Site:
121
121
  if self.key and "login_required" in (detail, _problem_code(response)):
122
122
  # The key is good; what it asked for is for members, and this account's membership is not running (never opened, or ended).
123
123
  raise CliError("auth", "这项内容要会员:这个账号的会员没开通或已到期", code=status, error_code="mendao.needs-membership",
124
- suggestion="到 https://mendaoai.com/membership 开通或续费;不开通会员也能读每个问题排名前 60 的做法")
124
+ suggestion="到 https://mendaoai.com/membership 开通或续费;不开通会员也能读每个问题排名前 40 的做法")
125
125
  if self.key:
126
126
  raise CliError("auth", "密钥被拒绝", code=status, error_code="mendao.key-rejected")
127
127
  if self.use_secret:
@@ -121,8 +121,8 @@ def _list(args: argparse.Namespace, q: str | None) -> Result:
121
121
  def _limit_notice(url: str, total: int, visible: int, unlock: Any) -> dict[str, str]:
122
122
  """Why the list is cut, as the server says (`unlock`): no key was used (`login`), or the key's account is not a member (`subscribe`: what it needs is a membership, not another key)."""
123
123
  if unlock == "subscribe":
124
- return {**notice("mendao.needs-membership", url), "text": f"共匹配 {total} 条,这把密钥的账号还不是会员,只能看其中 {visible} 条(每个问题排名前 60 的做法)。", "fix": f"到 {url}/membership 开通会员;这把密钥不用换,开通后马上生效"}
125
- return {**notice("mendao.free-limit", url), "text": f"共匹配 {total} 条,没有密钥只能看其中 {visible} 条(公开内容,即每个问题排名前 20 的做法;未开通会员的账号可读前 60)。"}
124
+ return {**notice("mendao.needs-membership", url), "text": f"共匹配 {total} 条,这把密钥的账号还不是会员,只能看其中 {visible} 条(每个问题排名前 40 的做法)。", "fix": f"到 {url}/membership 开通会员;这把密钥不用换,开通后马上生效"}
125
+ return {**notice("mendao.free-limit", url), "text": f"共匹配 {total} 条,没有密钥只能看其中 {visible} 条(公开内容,即每个问题排名前 20 的做法;未开通会员的账号可读前 40)。"}
126
126
 
127
127
 
128
128
  def posts(args: argparse.Namespace) -> Result:
File without changes
File without changes
File without changes