weflow-cli 1.17.0 → 1.19.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.
Files changed (73) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/README.md +3 -0
  3. package/bin/weflow-cli.ts +167 -0
  4. package/dist/bin/weflow-cli.js +199 -0
  5. package/dist/bin/weflow-cli.js.map +1 -1
  6. package/dist/src/services/diagnosticReport.d.ts +6 -0
  7. package/dist/src/services/diagnosticReport.d.ts.map +1 -1
  8. package/dist/src/services/diagnosticReport.js +16 -0
  9. package/dist/src/services/diagnosticReport.js.map +1 -1
  10. package/dist/src/services/wechatCompat.d.ts +29 -0
  11. package/dist/src/services/wechatCompat.d.ts.map +1 -0
  12. package/dist/src/services/wechatCompat.js +65 -0
  13. package/dist/src/services/wechatCompat.js.map +1 -0
  14. package/docs/DATA_CONTRACT.md +25 -25
  15. package/docs/DECISIONS.md +26 -0
  16. package/docs/FUNCTIONAL-IMPROVEMENT-SPEC.md +365 -365
  17. package/docs/HEALTH-CHECK.md +104 -104
  18. package/docs/JEV/345/272/224/347/224/250/346/226/275/345/267/245/346/226/207/346/241/243.md +310 -310
  19. package/docs/NEXT_ACTIONS.md +236 -236
  20. package/docs/NPM-PUBLISH.md +130 -130
  21. package/docs/NT_DATABASES.md +47 -0
  22. package/docs/POSITIONING.md +68 -68
  23. package/docs/PROJECT_STATE.md +3 -2
  24. package/docs/RELEASING.md +4 -0
  25. package/package.json +1 -1
  26. package/requirements-3x.txt +4 -4
  27. package/requirements-voice.txt +15 -15
  28. package/resources/js/graph3d/NOTICE.txt +35 -35
  29. package/resources/js/graph3d/d3-binarytree.min.js +2 -2
  30. package/resources/js/graph3d/d3-dispatch.min.js +2 -2
  31. package/resources/js/graph3d/d3-force-3d.min.js +2 -2
  32. package/resources/js/graph3d/d3-octree.min.js +2 -2
  33. package/resources/js/graph3d/d3-quadtree.min.js +2 -2
  34. package/resources/js/graph3d/d3-timer.min.js +2 -2
  35. package/resources/js/graph3d/three.min.js +6 -6
  36. package/resources/panel/quick-menu.cjs +197 -197
  37. package/scripts/_utils.py +1338 -1338
  38. package/scripts/annual_report.py +3 -1
  39. package/scripts/article_notes.py +423 -423
  40. package/scripts/contact_schema.py +339 -339
  41. package/scripts/create_reading_notes.py +11 -11
  42. package/scripts/daily_mail.py +51 -5
  43. package/scripts/daily_task.ps1 +216 -213
  44. package/scripts/extract_todos.py +3 -1
  45. package/scripts/fav_notes.py +321 -321
  46. package/scripts/health_check.py +473 -473
  47. package/scripts/imported_chats.py +68 -68
  48. package/scripts/install_tasks.ps1 +105 -105
  49. package/scripts/key_cache.py +232 -0
  50. package/scripts/leads.py +179 -179
  51. package/scripts/mcp_bridge.py +3 -1
  52. package/scripts/media_index.py +150 -0
  53. package/scripts/network.py +206 -206
  54. package/scripts/nt_common.py +32 -0
  55. package/scripts/nt_decrypt.py +2023 -1954
  56. package/scripts/opinion_timeline.py +138 -138
  57. package/scripts/replay.py +803 -803
  58. package/scripts/run_hidden.vbs +24 -24
  59. package/scripts/semantic_search.py +5 -1
  60. package/scripts/user_notes.py +315 -315
  61. package/scripts/voice_transcribe.py +139 -139
  62. package/scripts/watch_issues.py +212 -212
  63. package/scripts/watch_mail.py +131 -131
  64. package/scripts/wechat_avatar.py +185 -0
  65. package/scripts/wechat_ledger.py +190 -0
  66. package/src/services/cursorProbe.ts +222 -222
  67. package/src/services/diagnosticReport.ts +22 -0
  68. package/src/services/qchatImport.ts +327 -327
  69. package/src/services/setupVenv.ts +238 -238
  70. package/src/services/syncService.ts +363 -363
  71. package/src/services/syncState.ts +275 -275
  72. package/src/services/wechatCompat.ts +67 -0
  73. package/src/services/wechatMedia.ts +166 -166
@@ -1,25 +1,25 @@
1
- ' Silent launcher for the WeFlow daily task.
2
- '
3
- ' Why this file exists: a scheduled action that runs "powershell.exe -File ..." starts a
4
- ' CONSOLE program, so Windows creates a console window before PowerShell can hide it - you
5
- ' see a black box appear, and it is especially intrusive over a full-screen game. wscript.exe
6
- ' is a GUI process with no console at all, and WshShell.Run with window style 0 keeps the
7
- ' child hidden too.
8
- '
9
- ' Arguments are forwarded verbatim, so "run_hidden.vbs noon" is the noon pass.
10
- '
11
- ' ASCII only on purpose: Windows Script Host reads this file with the ANSI code page.
12
-
13
- Dim fso, here, script, cmd, sh
14
- Set fso = CreateObject("Scripting.FileSystemObject")
15
- here = fso.GetParentFolderName(WScript.ScriptFullName)
16
- script = fso.BuildPath(here, "daily_task.ps1")
17
-
18
- cmd = "powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -WindowStyle Hidden -File """ & script & """"
19
- If WScript.Arguments.Count > 0 Then
20
- cmd = cmd & " " & WScript.Arguments(0)
21
- End If
22
-
23
- Set sh = CreateObject("WScript.Shell")
24
- ' 0 = hidden window, True = wait for the child so the task's last result reflects the run.
1
+ ' Silent launcher for the WeFlow daily task.
2
+ '
3
+ ' Why this file exists: a scheduled action that runs "powershell.exe -File ..." starts a
4
+ ' CONSOLE program, so Windows creates a console window before PowerShell can hide it - you
5
+ ' see a black box appear, and it is especially intrusive over a full-screen game. wscript.exe
6
+ ' is a GUI process with no console at all, and WshShell.Run with window style 0 keeps the
7
+ ' child hidden too.
8
+ '
9
+ ' Arguments are forwarded verbatim, so "run_hidden.vbs noon" is the noon pass.
10
+ '
11
+ ' ASCII only on purpose: Windows Script Host reads this file with the ANSI code page.
12
+
13
+ Dim fso, here, script, cmd, sh
14
+ Set fso = CreateObject("Scripting.FileSystemObject")
15
+ here = fso.GetParentFolderName(WScript.ScriptFullName)
16
+ script = fso.BuildPath(here, "daily_task.ps1")
17
+
18
+ cmd = "powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -WindowStyle Hidden -File """ & script & """"
19
+ If WScript.Arguments.Count > 0 Then
20
+ cmd = cmd & " " & WScript.Arguments(0)
21
+ End If
22
+
23
+ Set sh = CreateObject("WScript.Shell")
24
+ ' 0 = hidden window, True = wait for the child so the task's last result reflects the run.
25
25
  sh.Run cmd, 0, True
@@ -63,6 +63,7 @@ except:
63
63
 
64
64
  sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
65
65
  from _utils import load_config, decrypt_lock, get_dashscope_key, get_api_key, LINE_LABELS # noqa: E402
66
+ from nt_common import decode_content # noqa: E402
66
67
  from jev_client import create_client
67
68
 
68
69
  OUTPUT_ROOT = 'output'
@@ -248,7 +249,10 @@ def collect_chat_messages(conns, name_map, days=90, per_talker=500):
248
249
  except Exception:
249
250
  continue
250
251
  for rid, ts, sender, content in rows:
251
- if not content or not isinstance(content, str) or len(content) < 10:
252
+ # 正文可能是 zstd 压缩的 BLOB(issue #12):先解码再判断长度,
253
+ # 否则这些消息会被整条跳过、索引里永远缺一段。
254
+ content = decode_content(content)
255
+ if len(content) < 10:
252
256
  continue
253
257
  item_id = f"chat:{talker}:{ts}:{rid}"
254
258
  if item_id in seen: