lingshu-skill 5.25.0 → 5.28.0

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 (47) hide show
  1. package/CHANGELOG.md +137 -0
  2. package/README.md +1577 -1577
  3. package/SKILL-lite.md +59 -59
  4. package/SKILL-tiny.md +38 -38
  5. package/SKILL.md +405 -405
  6. package/cordis-plugin/lingshu-cron/plugin.js +15 -5
  7. package/package.json +52 -52
  8. package/scripts/_ci_env_probe.py +81 -0
  9. package/scripts/astrbot_plugin_lingshu/CHECKSUMS.json +16 -16
  10. package/scripts/astrbot_plugin_lingshu/engine/CHANGELOG.md +137 -0
  11. package/scripts/astrbot_plugin_lingshu/engine/README.md +1577 -1577
  12. package/scripts/astrbot_plugin_lingshu/engine/SKILL-lite.md +59 -59
  13. package/scripts/astrbot_plugin_lingshu/engine/SKILL-tiny.md +38 -38
  14. package/scripts/astrbot_plugin_lingshu/engine/SKILL.md +405 -405
  15. package/scripts/astrbot_plugin_lingshu/engine/scripts/_ci_env_probe.py +81 -0
  16. package/scripts/astrbot_plugin_lingshu/engine/scripts/behavior_baseline.py +28 -0
  17. package/scripts/astrbot_plugin_lingshu/engine/scripts/bench.py +218 -190
  18. package/scripts/astrbot_plugin_lingshu/engine/scripts/check_pressure_sync.py +31 -0
  19. package/scripts/astrbot_plugin_lingshu/engine/scripts/check_tag.py +28 -0
  20. package/scripts/astrbot_plugin_lingshu/engine/scripts/coverage_report.py +28 -0
  21. package/scripts/astrbot_plugin_lingshu/engine/scripts/growth.py +28 -0
  22. package/scripts/astrbot_plugin_lingshu/engine/scripts/make_icon.py +24 -0
  23. package/scripts/astrbot_plugin_lingshu/engine/scripts/panel_build.py +31 -0
  24. package/scripts/astrbot_plugin_lingshu/engine/scripts/panel_server.py +28 -0
  25. package/scripts/astrbot_plugin_lingshu/engine/scripts/release.py +28 -0
  26. package/scripts/astrbot_plugin_lingshu/engine/scripts/session_import.py +28 -0
  27. package/scripts/astrbot_plugin_lingshu/make_checksums.py +28 -0
  28. package/scripts/behavior_baseline.py +28 -0
  29. package/scripts/bench.py +218 -190
  30. package/scripts/check_pressure_sync.py +31 -0
  31. package/scripts/check_tag.py +28 -0
  32. package/scripts/check_version.py +31 -0
  33. package/scripts/coverage_report.py +28 -0
  34. package/scripts/growth.py +28 -0
  35. package/scripts/make_icon.py +24 -0
  36. package/scripts/make_manifest.py +285 -254
  37. package/scripts/make_plugin_zip.py +28 -0
  38. package/scripts/panel_build.py +31 -0
  39. package/scripts/panel_server.py +28 -0
  40. package/scripts/release.py +28 -0
  41. package/scripts/run_tests.py +31 -0
  42. package/scripts/session_import.py +28 -0
  43. package/scripts/sync_engine.py +170 -139
  44. package/docs/npm-/345/217/221/345/270/203/350/257/264/346/230/216.md +0 -49
  45. package/docs/tgz-/345/256/211/350/243/205/350/257/264/346/230/216.md +0 -53
  46. package/docs//345/217/221/345/270/203/350/207/252/345/212/250/345/214/226.md +0 -54
  47. package/docs//345/256/241/346/240/270/346/224/271/350/277/233/345/276/205/345/212/236.md +0 -201
@@ -5379,6 +5379,34 @@ def _run(argv=None) -> int:
5379
5379
  from growth_parts import * # noqa: E402,F401,F403
5380
5380
 
5381
5381
 
5382
+ def _ensure_utf8_stdout() -> None:
5383
+ """把 stdout/stderr 切到 UTF-8,避免 Windows 控制台(cp1252/cp936)编不了中文就崩。
5384
+
5385
+ CI 的 windows-latest stdout 是 cp1252:脚本一 print 中文就 UnicodeEncodeError
5386
+ 直接退出(实测 sync_engine.py / make_checksums.py 都因此挂过,Ubuntu 同期正常)。
5387
+ 这不是业务 bug,是"中文输出 + 非 UTF-8 控制台"的必然结果。
5388
+ """
5389
+ for name in ("stdout", "stderr"):
5390
+ stream = getattr(sys, name, None)
5391
+ fn = getattr(stream, "reconfigure", None)
5392
+ if callable(fn):
5393
+ try:
5394
+ fn(encoding="utf-8", errors="replace")
5395
+ continue
5396
+ except (OSError, ValueError, AttributeError):
5397
+ pass
5398
+ try:
5399
+ import io
5400
+ buf = getattr(stream, "buffer", None)
5401
+ if buf is not None:
5402
+ setattr(sys, name,
5403
+ io.TextIOWrapper(buf, encoding="utf-8", errors="replace",
5404
+ line_buffering=True))
5405
+ except Exception: # noqa: BLE001
5406
+ pass
5407
+
5408
+
5382
5409
  if __name__ == "__main__":
5410
+ _ensure_utf8_stdout()
5383
5411
  sys.exit(run())
5384
5412
 
@@ -10,6 +10,7 @@
10
10
  用法:python scripts/make_icon.py [--out 路径.ico]
11
11
  """
12
12
  from __future__ import annotations
13
+ import sys
13
14
 
14
15
  import argparse
15
16
  import math
@@ -142,5 +143,28 @@ def main() -> int:
142
143
  return 0
143
144
 
144
145
 
146
+ def _ensure_utf8_stdout() -> None:
147
+ """stdout/stderr 切 UTF-8——Windows CI 是 cp1252,print 中文会直接崩。"""
148
+ for _name in ("stdout", "stderr"):
149
+ _s = getattr(sys, _name, None)
150
+ _fn = getattr(_s, "reconfigure", None)
151
+ if callable(_fn):
152
+ try:
153
+ _fn(encoding="utf-8", errors="replace")
154
+ continue
155
+ except (OSError, ValueError, AttributeError):
156
+ pass
157
+ try:
158
+ import io
159
+ _buf = getattr(_s, "buffer", None)
160
+ if _buf is not None:
161
+ setattr(sys, _name,
162
+ io.TextIOWrapper(_buf, encoding="utf-8", errors="replace",
163
+ line_buffering=True))
164
+ except Exception:
165
+ pass
166
+
167
+
145
168
  if __name__ == "__main__":
169
+ _ensure_utf8_stdout()
146
170
  raise SystemExit(main())
@@ -111,5 +111,36 @@ def main(argv=None) -> int:
111
111
  return 0
112
112
 
113
113
 
114
+ def _ensure_utf8_stdout() -> None:
115
+ """把 stdout/stderr 切到 UTF-8,避免 Windows 控制台(cp1252/cp936)编不了中文就崩。
116
+
117
+ 为什么必须有:CI 的 windows-latest stdout 是 cp1252,脚本一 print 中文就
118
+ UnicodeEncodeError 直接退出(实测 sync_engine.py 因此挂掉,Ubuntu 同期正常)。
119
+ 这不是业务 bug,是"中文输出 + 非 UTF-8 控制台"的必然结果。
120
+
121
+ reconfigure 不可用(3.6 及更早 / 被替换过的流)时静默跳过,绝不因此再崩。
122
+ """
123
+ for name in ("stdout", "stderr"):
124
+ stream = getattr(sys, name, None)
125
+ fn = getattr(stream, "reconfigure", None)
126
+ if callable(fn):
127
+ try:
128
+ fn(encoding="utf-8", errors="replace")
129
+ continue
130
+ except (OSError, ValueError, AttributeError):
131
+ pass
132
+ # 退路:包一层 UTF-8 writer(errors=replace,坏字符变 ?,不打断程序)
133
+ try:
134
+ import io
135
+ buf = getattr(stream, "buffer", None)
136
+ if buf is not None:
137
+ setattr(sys, name,
138
+ io.TextIOWrapper(buf, encoding="utf-8", errors="replace",
139
+ line_buffering=True))
140
+ except Exception: # noqa: BLE001
141
+ pass
142
+
143
+
114
144
  if __name__ == "__main__":
145
+ _ensure_utf8_stdout()
115
146
  sys.exit(main())
@@ -3050,7 +3050,35 @@ def serve(port: int = 8765, open_browser: bool = True) -> None:
3050
3050
  httpd.server_close()
3051
3051
 
3052
3052
 
3053
+ def _ensure_utf8_stdout() -> None:
3054
+ """把 stdout/stderr 切到 UTF-8,避免 Windows 控制台(cp1252/cp936)编不了中文就崩。
3055
+
3056
+ CI 的 windows-latest stdout 是 cp1252:脚本一 print 中文就 UnicodeEncodeError
3057
+ 直接退出(实测 sync_engine.py / make_checksums.py 都因此挂过,Ubuntu 同期正常)。
3058
+ 这不是业务 bug,是"中文输出 + 非 UTF-8 控制台"的必然结果。
3059
+ """
3060
+ for name in ("stdout", "stderr"):
3061
+ stream = getattr(sys, name, None)
3062
+ fn = getattr(stream, "reconfigure", None)
3063
+ if callable(fn):
3064
+ try:
3065
+ fn(encoding="utf-8", errors="replace")
3066
+ continue
3067
+ except (OSError, ValueError, AttributeError):
3068
+ pass
3069
+ try:
3070
+ import io
3071
+ buf = getattr(stream, "buffer", None)
3072
+ if buf is not None:
3073
+ setattr(sys, name,
3074
+ io.TextIOWrapper(buf, encoding="utf-8", errors="replace",
3075
+ line_buffering=True))
3076
+ except Exception: # noqa: BLE001
3077
+ pass
3078
+
3079
+
3053
3080
  if __name__ == "__main__":
3081
+ _ensure_utf8_stdout()
3054
3082
  import argparse
3055
3083
  ap = argparse.ArgumentParser()
3056
3084
  # 端口优先取 config.json 的 panel_port(设置页可改),再退回 8765。
@@ -255,5 +255,33 @@ def main() -> int:
255
255
  return do_status()
256
256
 
257
257
 
258
+ def _ensure_utf8_stdout() -> None:
259
+ """把 stdout/stderr 切到 UTF-8,避免 Windows 控制台(cp1252/cp936)编不了中文就崩。
260
+
261
+ CI 的 windows-latest stdout 是 cp1252:脚本一 print 中文就 UnicodeEncodeError
262
+ 直接退出(实测 sync_engine.py / make_checksums.py 都因此挂过,Ubuntu 同期正常)。
263
+ 这不是业务 bug,是"中文输出 + 非 UTF-8 控制台"的必然结果。
264
+ """
265
+ for name in ("stdout", "stderr"):
266
+ stream = getattr(sys, name, None)
267
+ fn = getattr(stream, "reconfigure", None)
268
+ if callable(fn):
269
+ try:
270
+ fn(encoding="utf-8", errors="replace")
271
+ continue
272
+ except (OSError, ValueError, AttributeError):
273
+ pass
274
+ try:
275
+ import io
276
+ buf = getattr(stream, "buffer", None)
277
+ if buf is not None:
278
+ setattr(sys, name,
279
+ io.TextIOWrapper(buf, encoding="utf-8", errors="replace",
280
+ line_buffering=True))
281
+ except Exception: # noqa: BLE001
282
+ pass
283
+
284
+
258
285
  if __name__ == "__main__":
286
+ _ensure_utf8_stdout()
259
287
  sys.exit(main())
@@ -732,5 +732,33 @@ def main(argv=None) -> int:
732
732
  return 0 if report.get("ok") else 1
733
733
 
734
734
 
735
+ def _ensure_utf8_stdout() -> None:
736
+ """把 stdout/stderr 切到 UTF-8,避免 Windows 控制台(cp1252/cp936)编不了中文就崩。
737
+
738
+ CI 的 windows-latest stdout 是 cp1252:脚本一 print 中文就 UnicodeEncodeError
739
+ 直接退出(实测 sync_engine.py / make_checksums.py 都因此挂过,Ubuntu 同期正常)。
740
+ 这不是业务 bug,是"中文输出 + 非 UTF-8 控制台"的必然结果。
741
+ """
742
+ for name in ("stdout", "stderr"):
743
+ stream = getattr(sys, name, None)
744
+ fn = getattr(stream, "reconfigure", None)
745
+ if callable(fn):
746
+ try:
747
+ fn(encoding="utf-8", errors="replace")
748
+ continue
749
+ except (OSError, ValueError, AttributeError):
750
+ pass
751
+ try:
752
+ import io
753
+ buf = getattr(stream, "buffer", None)
754
+ if buf is not None:
755
+ setattr(sys, name,
756
+ io.TextIOWrapper(buf, encoding="utf-8", errors="replace",
757
+ line_buffering=True))
758
+ except Exception: # noqa: BLE001
759
+ pass
760
+
761
+
735
762
  if __name__ == "__main__":
763
+ _ensure_utf8_stdout()
736
764
  sys.exit(main())
@@ -83,5 +83,33 @@ def main(argv: list[str] | None = None) -> int:
83
83
  return 0
84
84
 
85
85
 
86
+ def _ensure_utf8_stdout() -> None:
87
+ """把 stdout/stderr 切到 UTF-8,避免 Windows 控制台(cp1252/cp936)编不了中文就崩。
88
+
89
+ CI 的 windows-latest stdout 是 cp1252:脚本一 print 中文就 UnicodeEncodeError
90
+ 直接退出(实测 sync_engine.py / make_checksums.py 都因此挂过,Ubuntu 同期正常)。
91
+ 这不是业务 bug,是"中文输出 + 非 UTF-8 控制台"的必然结果。
92
+ """
93
+ for name in ("stdout", "stderr"):
94
+ stream = getattr(sys, name, None)
95
+ fn = getattr(stream, "reconfigure", None)
96
+ if callable(fn):
97
+ try:
98
+ fn(encoding="utf-8", errors="replace")
99
+ continue
100
+ except (OSError, ValueError, AttributeError):
101
+ pass
102
+ try:
103
+ import io
104
+ buf = getattr(stream, "buffer", None)
105
+ if buf is not None:
106
+ setattr(sys, name,
107
+ io.TextIOWrapper(buf, encoding="utf-8", errors="replace",
108
+ line_buffering=True))
109
+ except Exception: # noqa: BLE001
110
+ pass
111
+
112
+
86
113
  if __name__ == "__main__":
114
+ _ensure_utf8_stdout()
87
115
  sys.exit(main())
@@ -278,5 +278,33 @@ def main(argv: list[str]) -> int:
278
278
  return check(a.quiet)
279
279
 
280
280
 
281
+ def _ensure_utf8_stdout() -> None:
282
+ """把 stdout/stderr 切到 UTF-8,避免 Windows 控制台(cp1252/cp936)编不了中文就崩。
283
+
284
+ CI 的 windows-latest stdout 是 cp1252:脚本一 print 中文就 UnicodeEncodeError
285
+ 直接退出(实测 sync_engine.py / make_checksums.py 都因此挂过,Ubuntu 同期正常)。
286
+ 这不是业务 bug,是"中文输出 + 非 UTF-8 控制台"的必然结果。
287
+ """
288
+ for name in ("stdout", "stderr"):
289
+ stream = getattr(sys, name, None)
290
+ fn = getattr(stream, "reconfigure", None)
291
+ if callable(fn):
292
+ try:
293
+ fn(encoding="utf-8", errors="replace")
294
+ continue
295
+ except (OSError, ValueError, AttributeError):
296
+ pass
297
+ try:
298
+ import io
299
+ buf = getattr(stream, "buffer", None)
300
+ if buf is not None:
301
+ setattr(sys, name,
302
+ io.TextIOWrapper(buf, encoding="utf-8", errors="replace",
303
+ line_buffering=True))
304
+ except Exception: # noqa: BLE001
305
+ pass
306
+
307
+
281
308
  if __name__ == "__main__":
309
+ _ensure_utf8_stdout()
282
310
  sys.exit(main(sys.argv[1:]))