earshot-cli 0.3.0__tar.gz → 0.4.0__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 (36) hide show
  1. {earshot_cli-0.3.0 → earshot_cli-0.4.0}/PKG-INFO +96 -4
  2. {earshot_cli-0.3.0 → earshot_cli-0.4.0}/README.md +95 -3
  3. {earshot_cli-0.3.0 → earshot_cli-0.4.0}/pyproject.toml +1 -1
  4. earshot_cli-0.4.0/src/earshot/__init__.py +25 -0
  5. {earshot_cli-0.3.0 → earshot_cli-0.4.0}/src/earshot/auth.py +3 -2
  6. {earshot_cli-0.3.0 → earshot_cli-0.4.0}/src/earshot/cli.py +3 -1
  7. {earshot_cli-0.3.0 → earshot_cli-0.4.0}/src/earshot/deliver.py +2 -1
  8. {earshot_cli-0.3.0 → earshot_cli-0.4.0}/src/earshot/transcribe_cloud.py +2 -1
  9. {earshot_cli-0.3.0 → earshot_cli-0.4.0}/tests/test_me.py +1 -1
  10. earshot_cli-0.4.0/tests/test_ua.py +63 -0
  11. {earshot_cli-0.3.0 → earshot_cli-0.4.0}/uv.lock +1 -1
  12. earshot_cli-0.3.0/src/earshot/__init__.py +0 -7
  13. {earshot_cli-0.3.0 → earshot_cli-0.4.0}/.github/workflows/ci.yml +0 -0
  14. {earshot_cli-0.3.0 → earshot_cli-0.4.0}/.github/workflows/publish.yml +0 -0
  15. {earshot_cli-0.3.0 → earshot_cli-0.4.0}/.gitignore +0 -0
  16. {earshot_cli-0.3.0 → earshot_cli-0.4.0}/LICENSE +0 -0
  17. {earshot_cli-0.3.0 → earshot_cli-0.4.0}/scripts/download_models.sh +0 -0
  18. {earshot_cli-0.3.0 → earshot_cli-0.4.0}/src/earshot/capture.py +0 -0
  19. {earshot_cli-0.3.0 → earshot_cli-0.4.0}/src/earshot/compose.py +0 -0
  20. {earshot_cli-0.3.0 → earshot_cli-0.4.0}/src/earshot/config.py +0 -0
  21. {earshot_cli-0.3.0 → earshot_cli-0.4.0}/src/earshot/extract.py +0 -0
  22. {earshot_cli-0.3.0 → earshot_cli-0.4.0}/src/earshot/live.py +0 -0
  23. {earshot_cli-0.3.0 → earshot_cli-0.4.0}/src/earshot/models.py +0 -0
  24. {earshot_cli-0.3.0 → earshot_cli-0.4.0}/src/earshot/subtitle.py +0 -0
  25. {earshot_cli-0.3.0 → earshot_cli-0.4.0}/src/earshot/transcribe.py +0 -0
  26. {earshot_cli-0.3.0 → earshot_cli-0.4.0}/tests/conftest.py +0 -0
  27. {earshot_cli-0.3.0 → earshot_cli-0.4.0}/tests/test_auth.py +0 -0
  28. {earshot_cli-0.3.0 → earshot_cli-0.4.0}/tests/test_compose.py +0 -0
  29. {earshot_cli-0.3.0 → earshot_cli-0.4.0}/tests/test_config.py +0 -0
  30. {earshot_cli-0.3.0 → earshot_cli-0.4.0}/tests/test_deliver.py +0 -0
  31. {earshot_cli-0.3.0 → earshot_cli-0.4.0}/tests/test_deliver_api.py +0 -0
  32. {earshot_cli-0.3.0 → earshot_cli-0.4.0}/tests/test_do_deliver.py +0 -0
  33. {earshot_cli-0.3.0 → earshot_cli-0.4.0}/tests/test_extract.py +0 -0
  34. {earshot_cli-0.3.0 → earshot_cli-0.4.0}/tests/test_live.py +0 -0
  35. {earshot_cli-0.3.0 → earshot_cli-0.4.0}/tests/test_subtitle.py +0 -0
  36. {earshot_cli-0.3.0 → earshot_cli-0.4.0}/tests/test_wizard.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: earshot-cli
3
- Version: 0.3.0
3
+ Version: 0.4.0
4
4
  Summary: 旁听剪藏:跨平台桌面端系统声录制 → 本地转写 → 投递知识库(默认 ExoMind,可插拔)
5
5
  Project-URL: Homepage, https://github.com/helloworldtang/earshot
6
6
  Project-URL: Repository, https://github.com/helloworldtang/earshot
@@ -44,11 +44,103 @@ Description-Content-Type: text/markdown
44
44
 
45
45
  ## 安装(开箱即用)
46
46
 
47
+ 唯一的依赖是 [uv](https://docs.astral.sh/uv/)(Python 的包管理器)。**不需要预装 Python**——uv 会自动下载并管理所需版本(earshot 需要 Python ≥3.12,uv 全程代劳)。
48
+
49
+ 按顺序三步:
50
+
51
+ **第 1 步:安装 uv**(已装可跳过,`uv --version` 可验证)
52
+
53
+ ```bash
54
+ # macOS / Linux
55
+ curl -LsSf https://astral.sh/uv/install.sh | sh
56
+
57
+ # Windows(PowerShell)
58
+ powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
59
+ ```
60
+
61
+ 装完**重开一个终端**(或按安装器提示把 uv 加进 PATH),再验证:
62
+
63
+ ```bash
64
+ uv --version
65
+ ```
66
+
67
+ <details>
68
+ <summary><b>国内网络看这里</b>(直连 GitHub/PyPI 慢或超时;两条路线均已在 macOS 实测通过,Windows 命令来自镜像官方文档)</summary>
69
+
70
+ **路线 A(推荐——什么都不用预装,一条命令搞定)**
71
+
72
+ A1. 用国内镜像安装 uv([uv.agentsmirror.com](https://github.com/Wangnov/uv-custom) 公益镜像,分发的是官方原版安装脚本,只把下载源切到国内):
73
+
47
74
  ```bash
48
- uv tool install earshot-cli # 或 pipx install earshot-cli
49
- earshot doctor # 环境自检;earshot 与 earshot-cli 两个命令名等价可用
75
+ # macOS / Linux
76
+ curl -LsSf https://uv.agentsmirror.com/install-cn.sh | sh
77
+ # Windows(PowerShell)
78
+ powershell -ExecutionPolicy ByPass -c "irm https://uv.agentsmirror.com/install-cn.ps1 | iex"
50
79
  ```
51
80
 
81
+ A2. **重开一个终端**(关键:镜像的 PyPI 源配置写在 shell 配置里,不重开终端不生效),验证 uv:
82
+
83
+ ```bash
84
+ uv --version # 输出版本号(如 uv 0.13.7)即成功
85
+ ```
86
+
87
+ A3. 安装 earshot(Python 与全部依赖自动下载,均走国内源):
88
+
89
+ ```bash
90
+ uv tool install earshot-cli
91
+ ```
92
+
93
+ A4. 验证命令可用:
94
+
95
+ ```bash
96
+ earshot me # 看到「凭据:未配置(earshot login …)」即安装成功,接着看下方第 3 步登录
97
+ ```
98
+
99
+ **路线 B(机器上已有 Python 和 pip)**
100
+
101
+ B1. 用清华源装 uv:
102
+
103
+ ```bash
104
+ pip install uv -i https://pypi.tuna.tsinghua.edu.cn/simple
105
+ ```
106
+
107
+ B2. 写入国内源配置(包索引走清华、Python 下载走 agentsmirror,一劳永逸):
108
+
109
+ ```bash
110
+ mkdir -p ~/.config/uv
111
+ printf '[[index]]\nurl = "https://pypi.tuna.tsinghua.edu.cn/simple"\ndefault = true\n\npython-install-mirror = "https://uv.agentsmirror.com/python-build-standalone/releases/download"\n' > ~/.config/uv/uv.toml
112
+ ```
113
+
114
+ (Windows 路径为 `%APPDATA%\uv\uv.toml`,内容相同)
115
+
116
+ B3. 安装并验证:
117
+
118
+ ```bash
119
+ uv tool install earshot-cli
120
+ earshot me
121
+ ```
122
+
123
+ </details>
124
+
125
+ **第 2 步:安装 earshot**(uv 自动下载 Python ≥3.12 与全部依赖,含内置 ffmpeg)
126
+
127
+ ```bash
128
+ uv tool install earshot-cli
129
+ ```
130
+
131
+ > 若提示 `command not found: earshot`:uv 把命令装到了 `~/.local/bin`(Windows 为 `%USERPROFILE%\.local\bin`),按提示把它加入 PATH 或重开终端。
132
+
133
+ **第 3 步:登录并自检**
134
+
135
+ ```bash
136
+ earshot login # 浏览器打开授权页,点「授权登录」即完成(已登录过 exomind 则免)
137
+ earshot me # 显示凭据状态与服务连通性(「凭据状态:有效」即就绪)
138
+ ```
139
+
140
+ 没有 ExoMind 账号?投递可换任意 webhook(`--deliver webhook --webhook <url>`),或 `--deliver none` 只本地存档,两者都不需要登录。
141
+
142
+ `earshot` 与 `earshot-cli` 两个命令名等价可用;`earshot doctor` 可做完整环境自检。
143
+
52
144
  升级:
53
145
 
54
146
  ```bash
@@ -60,7 +152,7 @@ uv tool upgrade earshot-cli
60
152
  源码安装请**锁版本 tag**,不要引滚动的 `main`(消费方 `uv sync`/`pip install` 会隐性升级到未审阅代码;升级应当是显式改版本号的决策):
61
153
 
62
154
  ```bash
63
- uv tool install "earshot-cli @ https://github.com/helloworldtang/earshot/archive/refs/tags/v0.3.0.tar.gz"
155
+ uv tool install "earshot-cli @ https://github.com/helloworldtang/earshot/archive/refs/tags/v0.3.1.tar.gz"
64
156
  ```
65
157
 
66
158
  - **零系统依赖**:ffmpeg 已随 Python wheel 内置([imageio-ffmpeg](https://pypi.org/project/imageio-ffmpeg),MoviePy 同款),无需 brew/apt。
@@ -11,11 +11,103 @@
11
11
 
12
12
  ## 安装(开箱即用)
13
13
 
14
+ 唯一的依赖是 [uv](https://docs.astral.sh/uv/)(Python 的包管理器)。**不需要预装 Python**——uv 会自动下载并管理所需版本(earshot 需要 Python ≥3.12,uv 全程代劳)。
15
+
16
+ 按顺序三步:
17
+
18
+ **第 1 步:安装 uv**(已装可跳过,`uv --version` 可验证)
19
+
20
+ ```bash
21
+ # macOS / Linux
22
+ curl -LsSf https://astral.sh/uv/install.sh | sh
23
+
24
+ # Windows(PowerShell)
25
+ powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
26
+ ```
27
+
28
+ 装完**重开一个终端**(或按安装器提示把 uv 加进 PATH),再验证:
29
+
30
+ ```bash
31
+ uv --version
32
+ ```
33
+
34
+ <details>
35
+ <summary><b>国内网络看这里</b>(直连 GitHub/PyPI 慢或超时;两条路线均已在 macOS 实测通过,Windows 命令来自镜像官方文档)</summary>
36
+
37
+ **路线 A(推荐——什么都不用预装,一条命令搞定)**
38
+
39
+ A1. 用国内镜像安装 uv([uv.agentsmirror.com](https://github.com/Wangnov/uv-custom) 公益镜像,分发的是官方原版安装脚本,只把下载源切到国内):
40
+
14
41
  ```bash
15
- uv tool install earshot-cli # 或 pipx install earshot-cli
16
- earshot doctor # 环境自检;earshot 与 earshot-cli 两个命令名等价可用
42
+ # macOS / Linux
43
+ curl -LsSf https://uv.agentsmirror.com/install-cn.sh | sh
44
+ # Windows(PowerShell)
45
+ powershell -ExecutionPolicy ByPass -c "irm https://uv.agentsmirror.com/install-cn.ps1 | iex"
17
46
  ```
18
47
 
48
+ A2. **重开一个终端**(关键:镜像的 PyPI 源配置写在 shell 配置里,不重开终端不生效),验证 uv:
49
+
50
+ ```bash
51
+ uv --version # 输出版本号(如 uv 0.13.7)即成功
52
+ ```
53
+
54
+ A3. 安装 earshot(Python 与全部依赖自动下载,均走国内源):
55
+
56
+ ```bash
57
+ uv tool install earshot-cli
58
+ ```
59
+
60
+ A4. 验证命令可用:
61
+
62
+ ```bash
63
+ earshot me # 看到「凭据:未配置(earshot login …)」即安装成功,接着看下方第 3 步登录
64
+ ```
65
+
66
+ **路线 B(机器上已有 Python 和 pip)**
67
+
68
+ B1. 用清华源装 uv:
69
+
70
+ ```bash
71
+ pip install uv -i https://pypi.tuna.tsinghua.edu.cn/simple
72
+ ```
73
+
74
+ B2. 写入国内源配置(包索引走清华、Python 下载走 agentsmirror,一劳永逸):
75
+
76
+ ```bash
77
+ mkdir -p ~/.config/uv
78
+ printf '[[index]]\nurl = "https://pypi.tuna.tsinghua.edu.cn/simple"\ndefault = true\n\npython-install-mirror = "https://uv.agentsmirror.com/python-build-standalone/releases/download"\n' > ~/.config/uv/uv.toml
79
+ ```
80
+
81
+ (Windows 路径为 `%APPDATA%\uv\uv.toml`,内容相同)
82
+
83
+ B3. 安装并验证:
84
+
85
+ ```bash
86
+ uv tool install earshot-cli
87
+ earshot me
88
+ ```
89
+
90
+ </details>
91
+
92
+ **第 2 步:安装 earshot**(uv 自动下载 Python ≥3.12 与全部依赖,含内置 ffmpeg)
93
+
94
+ ```bash
95
+ uv tool install earshot-cli
96
+ ```
97
+
98
+ > 若提示 `command not found: earshot`:uv 把命令装到了 `~/.local/bin`(Windows 为 `%USERPROFILE%\.local\bin`),按提示把它加入 PATH 或重开终端。
99
+
100
+ **第 3 步:登录并自检**
101
+
102
+ ```bash
103
+ earshot login # 浏览器打开授权页,点「授权登录」即完成(已登录过 exomind 则免)
104
+ earshot me # 显示凭据状态与服务连通性(「凭据状态:有效」即就绪)
105
+ ```
106
+
107
+ 没有 ExoMind 账号?投递可换任意 webhook(`--deliver webhook --webhook <url>`),或 `--deliver none` 只本地存档,两者都不需要登录。
108
+
109
+ `earshot` 与 `earshot-cli` 两个命令名等价可用;`earshot doctor` 可做完整环境自检。
110
+
19
111
  升级:
20
112
 
21
113
  ```bash
@@ -27,7 +119,7 @@ uv tool upgrade earshot-cli
27
119
  源码安装请**锁版本 tag**,不要引滚动的 `main`(消费方 `uv sync`/`pip install` 会隐性升级到未审阅代码;升级应当是显式改版本号的决策):
28
120
 
29
121
  ```bash
30
- uv tool install "earshot-cli @ https://github.com/helloworldtang/earshot/archive/refs/tags/v0.3.0.tar.gz"
122
+ uv tool install "earshot-cli @ https://github.com/helloworldtang/earshot/archive/refs/tags/v0.3.1.tar.gz"
31
123
  ```
32
124
 
33
125
  - **零系统依赖**:ffmpeg 已随 Python wheel 内置([imageio-ffmpeg](https://pypi.org/project/imageio-ffmpeg),MoviePy 同款),无需 brew/apt。
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "earshot-cli"
3
- version = "0.3.0"
3
+ version = "0.4.0"
4
4
  description = "旁听剪藏:跨平台桌面端系统声录制 → 本地转写 → 投递知识库(默认 ExoMind,可插拔)"
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -0,0 +1,25 @@
1
+ """earshot:旁听剪藏 —— 听到的都能进知识库。
2
+
3
+ 跨平台桌面端:系统声环回录制(macOS 需 BlackHole)→ 端侧 VAD+ASR 转写
4
+ → 组装 Markdown → 投递(默认 exomind CLI,可插拔 webhook)。
5
+ """
6
+
7
+ from importlib import metadata as _metadata
8
+
9
+ try:
10
+ # 单一版本源:pyproject.toml(已安装发行版的元数据);源码 checkout 未安装时回退。
11
+ # 旧写法在此手写 "0.1.1",与 pyproject 的 0.3.x 漂移两月无人察觉——UA 带版本
12
+ # 后漂移会直接暴露在服务端日志里,先根治版本源。
13
+ # 注意发行版名是 earshot-cli(import 名才是 earshot),两个键都试。
14
+ __version__ = _metadata.version("earshot-cli")
15
+ except _metadata.PackageNotFoundError: # pragma: no cover - 仅源码运行路径
16
+ __version__ = "0.0.dev0"
17
+
18
+
19
+ def ua_headers(**extra: str) -> dict[str, str]:
20
+ """自有服务(exomind)请求头:显式 UA(可观测性标配)+ 附加头(Authorization 等)。
21
+
22
+ 全仓唯一注入点——deliver/auth/transcribe_cloud 旁路端点一律复用,不写两遍;
23
+ 第三方 webhook(deliver_webhook)不经过这里(无自有服务端可分桶,不值得改)。
24
+ """
25
+ return {"User-Agent": f"earshot/{__version__}", **extra}
@@ -17,6 +17,7 @@ from typing import Any
17
17
 
18
18
  import httpx
19
19
 
20
+ from earshot import ua_headers
20
21
  from earshot.config import EXOMIND_CONFIG_FILENAME
21
22
 
22
23
  Poster = Callable[[str, dict[str, Any]], dict[str, Any]]
@@ -26,13 +27,13 @@ Sleeper = Callable[[float], None]
26
27
 
27
28
 
28
29
  def _post_json(url: str, payload: dict[str, Any]) -> dict[str, Any]:
29
- resp = httpx.post(url, json=payload, timeout=30.0)
30
+ resp = httpx.post(url, json=payload, headers=ua_headers(), timeout=30.0)
30
31
  resp.raise_for_status()
31
32
  return dict(resp.json())
32
33
 
33
34
 
34
35
  def _get_status(url: str, headers: dict[str, str]) -> int:
35
- return int(httpx.get(url, headers=headers, timeout=30.0).status_code)
36
+ return int(httpx.get(url, headers=ua_headers(**headers), timeout=30.0).status_code)
36
37
 
37
38
 
38
39
  def _open_browser(url: str) -> bool:
@@ -525,7 +525,9 @@ def cmd_me(_args: argparse.Namespace, settings: Settings) -> int:
525
525
  masked = f"{key[:8]}…{key[-4:]}" if len(key) > 12 else key
526
526
  print(f"凭据:{masked}")
527
527
  if verify_key(settings.exomind_base_url, key):
528
- print("凭据状态:有效")
528
+ # 设备流签发的是长期 API Key(无 expires_at),与 wxpub 委托票的 15 分钟 TTL 不同——
529
+ # 一致性口径对齐 wxpub me 的 sk_ 分支:「长期有效」;失效才需要重登
530
+ print("凭据状态:有效(长期 API Key,无到期时间)")
529
531
  return EXIT_OK
530
532
  print("凭据状态:无效或服务不可达(重登用: earshot login --force)")
531
533
  return EXIT_FAIL
@@ -12,6 +12,7 @@ from typing import Any
12
12
 
13
13
  import httpx
14
14
 
15
+ from earshot import ua_headers
15
16
  from earshot.config import Settings
16
17
 
17
18
  EXOMIND_ORIGIN = "earshot"
@@ -178,7 +179,7 @@ def deliver_exomind_api(
178
179
  post = poster or _post
179
180
  get = getter or _get
180
181
  base = settings.exomind_base_url
181
- headers = {"Authorization": f"Bearer {settings.exomind_api_key}"}
182
+ headers = ua_headers(Authorization=f"Bearer {settings.exomind_api_key}")
182
183
 
183
184
  content = md_path.read_text(encoding="utf-8")
184
185
  payload: dict[str, Any] = {"content": content, "origin": EXOMIND_ORIGIN, "client_key": client_key_for(content)}
@@ -7,6 +7,7 @@ from pathlib import Path
7
7
 
8
8
  import httpx
9
9
 
10
+ from earshot import ua_headers
10
11
  from earshot.config import Settings
11
12
 
12
13
  POLL_INTERVAL_S = 3.0
@@ -36,7 +37,7 @@ def transcribe_cloud(wav: Path, settings: Settings, timeout_s: float = DEFAULT_T
36
37
  msg = "未配置 exomind 凭据(先 `exomind login` 生成 ~/.exomind/config.json,或设 EXOMIND_API_KEY)"
37
38
  raise CloudTranscribeError(msg)
38
39
  base = settings.exomind_base_url
39
- headers = {"Authorization": f"Bearer {settings.exomind_api_key}"}
40
+ headers = ua_headers(Authorization=f"Bearer {settings.exomind_api_key}")
40
41
 
41
42
  try:
42
43
  with wav.open("rb") as f:
@@ -30,7 +30,7 @@ def test_me_valid_key(
30
30
  assert code == 0
31
31
  assert "https://exomind.example" in out
32
32
  assert "sk_live_…_key" in out, "凭据掩码展示"
33
- assert "凭据状态:有效" in out
33
+ assert "凭据状态:有效(长期 API Key,无到期时间)" in out, "长期 key 无 TTL,口径对齐 wxpub sk_ 分支"
34
34
 
35
35
 
36
36
  def test_me_invalid_key(
@@ -0,0 +1,63 @@
1
+ """显式 UA 护栏(可观测性标配,2026-11-09):自有服务(exomind)流量必须带
2
+ earshot/<version>,默认 python-httpx/x 即未收编。
3
+
4
+ 质量点:①ua_headers 单一注入点格式与合并;②deliver_exomind_api 的 wire 头
5
+ 真实携带(经注入 poster 捕获);③webhook(第三方)不经 ua_headers——无自有
6
+ 服务端可分桶,不乱标。
7
+ """
8
+
9
+ from pathlib import Path
10
+ from typing import Any
11
+
12
+ import httpx
13
+ import pytest
14
+
15
+ from earshot import __version__, ua_headers
16
+ from earshot.config import Settings
17
+ from earshot.deliver import deliver_exomind_api, deliver_webhook
18
+
19
+
20
+ def _settings() -> Settings:
21
+ return Settings(
22
+ home=Path("/tmp/earshot-test"),
23
+ model_root=Path("/tmp/earshot-test/models"),
24
+ exomind_base_url="https://api.example.com",
25
+ exomind_api_key="key-1",
26
+ )
27
+
28
+
29
+ def test_ua_headers_format_and_merge() -> None:
30
+ h = ua_headers(Authorization="Bearer k")
31
+ assert h["User-Agent"] == f"earshot/{__version__}"
32
+ assert h["Authorization"] == "Bearer k"
33
+ assert __version__ not in ("", "0.0.dev0"), "安装态下版本必须来自包元数据,不再是漂移的手写常量"
34
+
35
+
36
+ def test_deliver_api_carries_ua_on_wire(tmp_path: Path) -> None:
37
+ md = tmp_path / "n.md"
38
+ md.write_text("内容", encoding="utf-8")
39
+ seen: dict[str, str] = {}
40
+
41
+ def poster(_u: str, _p: dict[str, Any], h: dict[str, str]) -> dict[str, Any]:
42
+ seen.update(h)
43
+ return {"job_id": "j"}
44
+
45
+ def getter(_u: str, _p: dict[str, str], _h: dict[str, str]) -> dict[str, Any]:
46
+ return {"status": "done", "entities": 1}
47
+
48
+ deliver_exomind_api(md, "t", [], _settings(), poster=poster, getter=getter, poll_interval_s=0)
49
+ assert seen["User-Agent"].startswith("earshot/")
50
+ assert seen["Authorization"].startswith("Bearer ")
51
+
52
+
53
+ def test_webhook_does_not_claim_earshot_ua(monkeypatch: pytest.MonkeyPatch) -> None:
54
+ """第三方 webhook 不打 earshot UA——收编范围=自有服务,乱标反而污染对方统计。"""
55
+ sent: list[Any] = []
56
+
57
+ def fake_post(url: str, **kw: Any) -> httpx.Response:
58
+ sent.append(kw.get("headers")) # None = 未传头
59
+ return httpx.Response(200)
60
+
61
+ monkeypatch.setattr(httpx, "post", fake_post)
62
+ deliver_webhook("https://example.org/hook", "t", "c", ["a"])
63
+ assert sent == [None]
@@ -188,7 +188,7 @@ wheels = [
188
188
 
189
189
  [[package]]
190
190
  name = "earshot-cli"
191
- version = "0.1.1"
191
+ version = "0.4.0"
192
192
  source = { editable = "." }
193
193
  dependencies = [
194
194
  { name = "httpx" },
@@ -1,7 +0,0 @@
1
- """earshot:旁听剪藏 —— 听到的都能进知识库。
2
-
3
- 跨平台桌面端:系统声环回录制(macOS 需 BlackHole)→ 端侧 VAD+ASR 转写
4
- → 组装 Markdown → 投递(默认 exomind CLI,可插拔 webhook)。
5
- """
6
-
7
- __version__ = "0.1.1"
File without changes
File without changes