lingshu-skill 5.17.0 → 5.19.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 (30) hide show
  1. package/CHANGELOG.md +123 -0
  2. package/README.md +48 -1
  3. package/SKILL.md +2 -1
  4. package/assets/panel.html +3 -1
  5. package/cordis-plugin/lingshu-cron/plugin.js +2 -2
  6. package/docs//350/277/233/345/261/225/344/270/216/345/276/205/345/212/236.md +14 -0
  7. package/package.json +1 -1
  8. package/scripts/astrbot_plugin_lingshu/CHECKSUMS.json +13 -13
  9. package/scripts/astrbot_plugin_lingshu/engine/CHANGELOG.md +123 -0
  10. package/scripts/astrbot_plugin_lingshu/engine/README.md +48 -1
  11. package/scripts/astrbot_plugin_lingshu/engine/SKILL.md +2 -1
  12. package/scripts/astrbot_plugin_lingshu/engine/assets/panel.html +3 -1
  13. package/scripts/astrbot_plugin_lingshu/engine/scripts/brain.py +60 -46
  14. package/scripts/astrbot_plugin_lingshu/engine/scripts/cli.py +80 -9
  15. package/scripts/astrbot_plugin_lingshu/engine/scripts/core.py +98 -19
  16. package/scripts/astrbot_plugin_lingshu/engine/scripts/emotion.py +1381 -1180
  17. package/scripts/astrbot_plugin_lingshu/engine/scripts/growth.py +26 -1
  18. package/scripts/astrbot_plugin_lingshu/engine/scripts/memory.py +110 -12
  19. package/scripts/astrbot_plugin_lingshu/engine/scripts/panel_cloud.py +610 -609
  20. package/scripts/astrbot_plugin_lingshu/engine/scripts/panel_server.py +12 -0
  21. package/scripts/astrbot_plugin_lingshu/engine/scripts/panel_settings.py +12 -0
  22. package/scripts/brain.py +60 -46
  23. package/scripts/cli.py +80 -9
  24. package/scripts/core.py +98 -19
  25. package/scripts/emotion.py +1381 -1180
  26. package/scripts/growth.py +26 -1
  27. package/scripts/memory.py +110 -12
  28. package/scripts/panel_cloud.py +610 -609
  29. package/scripts/panel_server.py +12 -0
  30. package/scripts/panel_settings.py +12 -0
@@ -962,6 +962,18 @@ class Handler(BaseHTTPRequestHandler):
962
962
  limit = _int_param(url, "limit", 60, 1, 300)
963
963
  self._json(brain.growth_timeline(days, limit))
964
964
  return
965
+ if path == "/api/doctor-history":
966
+ # P2-4:体检历史(成长阶段/健康度都基于它)。limit 默认 90 条。
967
+ try:
968
+ lim = _int_param(url, "limit", 90, 1, 1000)
969
+ hist = growth.doctor_history(limit=lim)
970
+ st = growth.stage_state()
971
+ except Exception as exc: # noqa: BLE001
972
+ self._json({"error": f"读取体检历史失败:{exc}"}, 500)
973
+ return
974
+ self._json({"items": hist, "count": len(hist),
975
+ "stage": st, "health": st.get("health")})
976
+ return
965
977
  if path == "/api/logs":
966
978
  limit = _int_param(url, "limit", 200, 1, 2000)
967
979
  level = (parse_qs(url.query).get("level") or [""])[0] or None
@@ -76,6 +76,18 @@ CONFIG_SCHEMA: list[dict[str, Any]] = [
76
76
  "hint": "送进 rerank 的候选条数,越大越准也越慢"},
77
77
 
78
78
  # —— 面板与宿主 ——
79
+ {"key": "emotion_memory_weight", "group": "情绪与人格", "label": "情绪驱动记忆权重",
80
+ "kind": "bool",
81
+ "hint": "负面且强烈的情绪会让相关记忆更重要、更容易被想起(累计增量封顶 0.30)"},
82
+ {"key": "emotion_inertia_enabled", "group": "情绪与人格", "label": "情绪惯性",
83
+ "kind": "bool",
84
+ "hint": "情绪上来快、下去慢:负面衰减更慢 + 强情绪冷却 + 标签需 2 条事件才切换"},
85
+ {"key": "emotion_negative_slow", "group": "情绪与人格", "label": "负面情绪更耐放",
86
+ "kind": "bool", "hint": "负面情绪衰减速率更慢(半衰期 ×1.25)"},
87
+ {"key": "emotion_cooldown_enabled", "group": "情绪与人格", "label": "强情绪冷却",
88
+ "kind": "bool", "hint": "强度>0.7 之后 3 个事件内同组增益减半,防越说越气"},
89
+ {"key": "emotion_label_gate_enabled", "group": "情绪与人格", "label": "心情标签防跳变",
90
+ "kind": "bool", "hint": "标签需 ≥2 条情绪事件支撑才切换,避免单句话横跳"},
79
91
  {"key": "speak_up_prob", "group": "水位与节奏", "label": "主动搭话概率",
80
92
  "kind": "float", "min": 0, "max": 1, "step": 0.05,
81
93
  "hint": "每轮结束按此概率让灵枢自己说一句(纯模板、不进模型);0=关闭"},