@yoooclaw/phone-notifications 1.10.0-beta.9 → 1.10.1

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.
package/README.md CHANGED
@@ -31,7 +31,7 @@ OpenClaw / QClaw 手机通知同步插件:接收手机通知并写入本地 JS
31
31
  - 通知写入 `YYYY-MM-DD.json` 的 JSON 数组(append-only)
32
32
  - 通知条目字段为 `appName`、`title`、`content`、`timestamp`(ISO 8601 含时区)
33
33
  - 同一天内按 `notification-id` 去重(使用内部索引文件)
34
- - `retentionDays`(默认 30)会清理过期日期文件
34
+ - 未设置 `retentionDays` 时永久保存;显式设置后会按天数清理过期日期文件
35
35
 
36
36
  ## 前置要求
37
37
 
@@ -139,7 +139,7 @@ bash install.sh --tgz-url ./yoooclaw-phone-notifications-1.2.3.tgz
139
139
  | `--host-cli <cmd>` | 宿主 CLI 命令名 | `openclaw` |
140
140
  | `--api-key <apiKey>` | 灯控鉴权 API Key | - |
141
141
  | `--token <token>` | 兼容旧参数,等价于 `--api-key` | - |
142
- | `--retention-days <n>` | 通知数据保留天数 | 30 |
142
+ | `--retention-days <n>` | 通知数据保留天数 | 不设置则永久保存 |
143
143
 
144
144
  #### 脚本做了什么
145
145
 
@@ -195,7 +195,7 @@ openclaw phone-notifications -v
195
195
  安装脚本会自动写入必要的插件注册配置。如需手动调整:
196
196
 
197
197
  ```bash
198
- # 可选:数据保留天数(默认 30)
198
+ # 可选:数据保留天数(不设置则永久保存)
199
199
  openclaw config set plugins.entries.phone-notifications.config.retentionDays 30
200
200
 
201
201
  # 可选:忽略特定 app
@@ -203,7 +203,7 @@ openclaw config set plugins.entries.phone-notifications.config.ignoredApps '["co
203
203
  ```
204
204
 
205
205
  配置项说明:
206
- - `retentionDays?: number`(默认 30)
206
+ - `retentionDays?: number`(未设置则永久保存;设置后按天数清理)
207
207
  - `ignoredApps?: string[]`
208
208
 
209
209
  ## 长录音 & ASR 配置
@@ -217,14 +217,14 @@ openclaw config set plugins.entries.phone-notifications.config.ignoredApps '["co
217
217
  | `asr.mode` | 说明 | 额外依赖 |
218
218
  |---|---|---|
219
219
  | `"local"` | 本地离线 Whisper(推荐,隐私安全) | `whisper-cli`(brew install whisper-cpp) |
220
- | `"api"` | 云端 API(DashScope / OpenAI Whisper) | API Key |
220
+ | `"api"` | 云端 model-proxy 长录音转写 | 请求级 `asr.api.apiKey`,未传则回退插件本地 API Key |
221
221
  | 未传 `asr` | 关闭转写,仅下载保存音频 | — |
222
222
 
223
223
  ### 初始化接口
224
224
 
225
225
  客户端在正式转写前可先调用 `recordings.asr.init`:
226
226
 
227
- - `mode = "api"`:校验 `provider` / `apiKey` 是否齐全,不持久化保存
227
+ - `mode = "api"`:校验请求级或插件本地 API Key 是否可用,并返回当前环境的长录音 submit-task 端点
228
228
  - `mode = "local"`:探测本地环境并预下载所需 Whisper 模型
229
229
 
230
230
  示例:
@@ -274,7 +274,7 @@ openclaw config set plugins.entries.phone-notifications.config.ignoredApps '["co
274
274
  }
275
275
  ```
276
276
 
277
- 云端 API(OpenAI Whisper 兼容):
277
+ 云端 API(model-proxy 长录音):
278
278
 
279
279
  ```json
280
280
  {
@@ -293,9 +293,31 @@ openclaw config set plugins.entries.phone-notifications.config.ignoredApps '["co
293
293
  "asr": {
294
294
  "mode": "api",
295
295
  "api": {
296
- "provider": "openai",
297
- "apiKey": "sk-xxx",
298
- "endpoint": "https://your-proxy/v1/audio/transcriptions"
296
+ "language": "zh",
297
+ "enableNormalization": true
298
+ }
299
+ }
300
+ }
301
+ }
302
+ ```
303
+
304
+ ### 手动重新触发转写
305
+
306
+ 当录音状态为 `synced`、`transcribe_failed` 或 `transcribed` 时,客户端可通过 Gateway Native 主动调用 `recordings.retranscribe`。
307
+
308
+ - 当前接口必须再次传入 `asr`
309
+ - HTTP `POST /recordings` 仅支持同步录音,不支持重新转写
310
+ - 接口会立即返回,实际转写进度应结合 `recording.status` 广播或 `recordings.status` 查询确认
311
+
312
+ ```json
313
+ {
314
+ "method": "recordings.retranscribe",
315
+ "params": {
316
+ "recordingId": "2026-03-23_14-32",
317
+ "asr": {
318
+ "mode": "api",
319
+ "api": {
320
+ "language": "zh"
299
321
  }
300
322
  }
301
323
  }
@@ -426,10 +448,10 @@ openclaw ntf stats --dim hour --from 2026-03-01 --to 2026-03-09
426
448
  # 扫描未同步通知
427
449
  openclaw ntf sync scan
428
450
 
429
- # 获取指定日期未处理通知
451
+ # 获取指定日期未处理通知(单次最多 300 条)
430
452
  openclaw ntf sync fetch --date 2026-03-09
431
453
 
432
- # 标记同步完成
454
+ # 标记当前批次同步完成;若 fetch 返回 hasMore=true,继续重复 fetch/commit
433
455
  openclaw ntf sync commit --date 2026-03-09
434
456
  ```
435
457