lingshu-skill 4.5.0 → 4.6.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.
- package/CHANGELOG.md +1 -1
- package/README.md +1 -1
- package/SKILL.md +1 -1
- package/assets/panel.html +2 -0
- package/docs//350/277/233/345/261/225/344/270/216/345/276/205/345/212/236.md +8 -0
- package/package.json +1 -1
- package/scripts/astrbot_plugin_lingshu/CHECKSUMS.json +6 -6
- package/scripts/astrbot_plugin_lingshu/engine/CHANGELOG.md +1 -1
- package/scripts/astrbot_plugin_lingshu/engine/README.md +1 -1
- package/scripts/astrbot_plugin_lingshu/engine/SKILL.md +1 -1
- package/scripts/astrbot_plugin_lingshu/engine/assets/panel.html +2 -0
- package/scripts/astrbot_plugin_lingshu/engine/scripts/desktop_shortcut.py +19 -3
- package/scripts/astrbot_plugin_lingshu/engine/scripts/panel_server.py +11 -2
- package/scripts/desktop_shortcut.py +19 -3
- package/scripts/panel_server.py +11 -2
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> 名字取自《黄帝内经》:**算力给思考,人格给灵魂,记忆给生命。**
|
|
4
4
|
|
|
5
|
-
> 当前版本 **v4.
|
|
5
|
+
> 当前版本 **v4.6**(变更见 [CHANGELOG.md](CHANGELOG.md))
|
|
6
6
|
|
|
7
7
|
> 🔁 **双仓库镜像**:GitHub(主)与 Gitee(镜像)保持同步——[gitee.com/htmcwy_0/lingshu-skill](https://gitee.com/htmcwy_0/lingshu-skill)。灵枢的更新检查会探测两边最新提交,**谁更新就自动从谁拉取**;任一边不可达(Gitee 匿名风控 / GitHub 限额)时走另一边兜底。
|
|
8
8
|
|
package/SKILL.md
CHANGED
package/assets/panel.html
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
<meta charset="utf-8">
|
|
4
4
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
5
5
|
<title>灵枢 · 类脑记忆</title>
|
|
6
|
+
<link rel="icon" type="image/x-icon" href="/favicon.ico">
|
|
7
|
+
<link rel="apple-touch-icon" href="/favicon.ico">
|
|
6
8
|
<style>
|
|
7
9
|
:root{
|
|
8
10
|
--bg:#0a0c0f; --surface:#11151a; --surface2:#151a21; --line:#222831;
|
|
@@ -489,6 +489,14 @@ startup 注入的记忆块与 cron 的瞬态提醒**同名**,于是 cron 的 p
|
|
|
489
489
|
- **根因**:CI 的 `tests` 步骤给**整段 loop 共用同一个 `BRAIN_MEMORY_HOME`**,前面的测试写进共享库的记忆/配置污染后面(二分定位:`test_context_ab.py` 之后必挂)。而项目自己的约定就是「每个测试文件独立临时 HOME」(`scripts/run_tests.py` 一直这么做,本地 67/67 全绿)。
|
|
490
490
|
- **修**:`ci.yml` 的 tests 步骤改为循环内按序号建 `ls-ci-home-$i` / `ls-ci-skills-$i`,每个测试文件用干净 HOME。实测按此规则跑 43/43 全过。
|
|
491
491
|
|
|
492
|
+
83. **【已修 v4.6】快捷方式/标签页图标显示为空白(用户反馈"图标白了")**:
|
|
493
|
+
- **先取证**:`.ico` 文件本身是好的——实测 7 个尺寸 alpha 均值≈245、不透明像素 99%、中心像素 `#F0C470`(琥珀)、四角透明。所以问题在 Windows/浏览器这一侧。
|
|
494
|
+
- **两个真原因**:
|
|
495
|
+
① `IconLocation` 指向 `E:\丁厚同\文档\程序\灵枢-skill\assets\lingshu.ico` —— **路径含中文**,Explorer 有概率加载失败、回退成 `wscript.exe` 的白色脚本图标;
|
|
496
|
+
② 面板 `/favicon.ico` 一直返回**透明 1×1 PNG**(当初只为避免控制台刷 404),所以**浏览器标签页图标是空白**。
|
|
497
|
+
- **修**:① `_icon_path()` 改为把图标复制到 `~/.brain-memory/lingshu.ico`(纯 ASCII、稳定存在)再设 `IconLocation`;② `/favicon.ico` 改为返回真 ICO(找不到才退回占位 PNG),并在 `index.html` 里声明 `rel="icon"`;③ 重建快捷方式 + `ie4uinit -show` 刷图标缓存。
|
|
498
|
+
- **教训**:Windows 图标路径尽量避开非 ASCII;"透明占位 PNG"这类省事写法会直接表现成"图标白了"。
|
|
499
|
+
|
|
492
500
|
## 三、已知问题与风险
|
|
493
501
|
|
|
494
502
|
| # | 现象 | 影响 | 处置 |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lingshu-skill",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.6.0",
|
|
4
4
|
"description": "Brain-inspired persistent memory, persona and growth system for AI coding agents. Local-only, zero-dependency Python. Requires Python 3.10+.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"PATCH_NOTES.md": "9296e524f743f358fd11115598398a754cfd69534526dde9c8ad85f14a418f89",
|
|
3
3
|
"README.md": "3d634d743b085eebd2cbb5dd3a00edfa728ed23947e20cc29e7c3b29087ec043",
|
|
4
|
-
"engine/CHANGELOG.md": "
|
|
5
|
-
"engine/README.md": "
|
|
4
|
+
"engine/CHANGELOG.md": "73cef10aa404c5b5206adff47d82b337428f1f8b64f80a167753084c491b9043",
|
|
5
|
+
"engine/README.md": "a07dc56aa271a65237195e4ed92fb92e55f259a2a7f7f51b8abdde7726361a6d",
|
|
6
6
|
"engine/SKILL-lite.md": "04b87789232a0f7537c861c857888b4a0e947bcf92a461cbad5328af05361c58",
|
|
7
7
|
"engine/SKILL-tiny.md": "74e1955cc5bf4ec0ca28d52030f799f039283de27a52345a33ce783d6ee0c608",
|
|
8
|
-
"engine/SKILL.md": "
|
|
9
|
-
"engine/assets/panel.html": "
|
|
8
|
+
"engine/SKILL.md": "29b0d281fe82cc1559ebbd254218d683946c4d0b8881f88fde0783df3c5cae5c",
|
|
9
|
+
"engine/assets/panel.html": "4613dc80c6e08fb7679ce6751ff8231d7dd478440c3081e25f195a1ff9516fff",
|
|
10
10
|
"engine/docs/commands.md": "ede9351a28478bcb8f5a8af2b63fccb1965d5e995fda1eecb470c72e7b8a69c5",
|
|
11
11
|
"engine/docs/mechanics.md": "e8a6602a434ed5b78cac64a98884f65a6888eb48daa7a1c0be1f6c3984041b34",
|
|
12
12
|
"engine/docs/models.md": "596bc1a3414f2de5569dcb41a0c494acae7daa534efd5a91dbcc3c4cb308d695",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"engine/scripts/cli.py": "d74bed5414da2bfdc03d70d3187df3026560f31844e29b70765e292b9f21ee86",
|
|
23
23
|
"engine/scripts/context_ab.py": "3d383f1fc16d328612825bbf731866fa427da0746490d027a0ddb719d210f1cb",
|
|
24
24
|
"engine/scripts/core.py": "778ec1935722c0a32ee0a4b416f6676fd7599541fd1d50b2d78dbe4aaaee60c8",
|
|
25
|
-
"engine/scripts/desktop_shortcut.py": "
|
|
25
|
+
"engine/scripts/desktop_shortcut.py": "ac202335a9ce32e12729e04d82e62337b880a49c962945e9112482523ce9cc0b",
|
|
26
26
|
"engine/scripts/dream.py": "c1ba3de2958fb045db7b6962a6dd0fcf70f225bfb4d372dd9c3e8584e4f759ce",
|
|
27
27
|
"engine/scripts/emotion.py": "c2928217a856c9201291ebd63dee33a4a641ff30dcd79964738c24e7a9d94672",
|
|
28
28
|
"engine/scripts/failures.py": "3a16234a1871f62e3ba7b7b743110b4044fb7b715b4d0e924b8ebf1cf0be50d0",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"engine/scripts/panel_build.py": "6394c1d74d203093e43b2106d7acca6e0ca9db61ca1cd6cd3a1616053653414b",
|
|
43
43
|
"engine/scripts/panel_cloud.py": "fff72888123d45bbf05ab329a06b2126f1c0b972c76283ecff32454bc4155c58",
|
|
44
44
|
"engine/scripts/panel_data.py": "5788aaee9b4e56e73587c4d0474687cecaa40dd7e507f02c27dd07aa208ba237",
|
|
45
|
-
"engine/scripts/panel_server.py": "
|
|
45
|
+
"engine/scripts/panel_server.py": "a1e2bf96a5ffc7ae2ea2e23175d9cfef1990d3217e84b8b91012a8984654f15e",
|
|
46
46
|
"engine/scripts/panel_settings.py": "e0e41e59365944a4df9d803648b4a0e7e52e8ea1b796979d59ba141f4d59e83a",
|
|
47
47
|
"engine/scripts/panel_update.py": "06f1c3c0362a49532dcd24651cc2e85ca1a1b3ba05fff6eb6f6566a72e876e2a",
|
|
48
48
|
"engine/scripts/panels.py": "87dfce47693340af7c9bc6010a593256331e32c2e8504a0ac0745cf2ef992fd6",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> 名字取自《黄帝内经》:**算力给思考,人格给灵魂,记忆给生命。**
|
|
4
4
|
|
|
5
|
-
> 当前版本 **v4.
|
|
5
|
+
> 当前版本 **v4.6**(变更见 [CHANGELOG.md](CHANGELOG.md))
|
|
6
6
|
|
|
7
7
|
> 🔁 **双仓库镜像**:GitHub(主)与 Gitee(镜像)保持同步——[gitee.com/htmcwy_0/lingshu-skill](https://gitee.com/htmcwy_0/lingshu-skill)。灵枢的更新检查会探测两边最新提交,**谁更新就自动从谁拉取**;任一边不可达(Gitee 匿名风控 / GitHub 限额)时走另一边兜底。
|
|
8
8
|
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
<meta charset="utf-8">
|
|
4
4
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
5
5
|
<title>灵枢 · 类脑记忆</title>
|
|
6
|
+
<link rel="icon" type="image/x-icon" href="/favicon.ico">
|
|
7
|
+
<link rel="apple-touch-icon" href="/favicon.ico">
|
|
6
8
|
<style>
|
|
7
9
|
:root{
|
|
8
10
|
--bg:#0a0c0f; --surface:#11151a; --surface2:#151a21; --line:#222831;
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
from __future__ import annotations
|
|
11
11
|
|
|
12
12
|
import os
|
|
13
|
+
import shutil
|
|
13
14
|
import subprocess
|
|
14
15
|
import sys
|
|
15
16
|
from pathlib import Path
|
|
@@ -55,9 +56,24 @@ def _panel_script() -> Path:
|
|
|
55
56
|
|
|
56
57
|
|
|
57
58
|
def _icon_path() -> Path | None:
|
|
58
|
-
"""
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
"""快捷方式图标:优先用**数据目录**里的 ASCII 路径副本。
|
|
60
|
+
|
|
61
|
+
为什么不直接用 `assets/lingshu.ico`:程序目录常常含中文
|
|
62
|
+
(如 `E:\\丁厚同\\文档\\程序\\灵枢-skill`),Explorer 有概率加载不了
|
|
63
|
+
IconLocation,回退成 wscript.exe 的**白色脚本图标**(实测踩过)。
|
|
64
|
+
所以把图标复制到 `~/.brain-memory/lingshu.ico`(纯 ASCII、稳定存在)再用。
|
|
65
|
+
"""
|
|
66
|
+
src = Path(__file__).resolve().parent.parent / "assets" / ICON_NAME
|
|
67
|
+
if not src.is_file():
|
|
68
|
+
return None
|
|
69
|
+
try:
|
|
70
|
+
dst = Path(core.HOME) / ICON_NAME
|
|
71
|
+
if not dst.is_file() or dst.stat().st_size != src.stat().st_size:
|
|
72
|
+
dst.parent.mkdir(parents=True, exist_ok=True)
|
|
73
|
+
shutil.copy2(src, dst)
|
|
74
|
+
return dst
|
|
75
|
+
except Exception:
|
|
76
|
+
return src # 复制失败就退回原路径,总比没有图标好
|
|
61
77
|
|
|
62
78
|
|
|
63
79
|
def _write_launcher(port: int | None = None, script: Path | None = None) -> Path:
|
|
@@ -627,8 +627,17 @@ class Handler(BaseHTTPRequestHandler):
|
|
|
627
627
|
content = content.replace("/*__PANEL_TOKEN__*/", TOKEN)
|
|
628
628
|
self._send(200, content.encode("utf-8"), "text/html; charset=utf-8")
|
|
629
629
|
return
|
|
630
|
-
if path
|
|
631
|
-
#
|
|
630
|
+
if path in ("/favicon.ico", "/apple-touch-icon.png"):
|
|
631
|
+
# 浏览器自动请求。优先返回真图标(assets/lingshu.ico,由 make_icon.py 生成),
|
|
632
|
+
# 没有才退回透明 1x1 PNG(避免控制台刷 404)。
|
|
633
|
+
# 原来这里恒返回透明 PNG,标签页图标就是空白(用户反馈"图标白了")。
|
|
634
|
+
ico = ASSETS / "lingshu.ico"
|
|
635
|
+
try:
|
|
636
|
+
if ico.is_file():
|
|
637
|
+
self._send(200, ico.read_bytes(), "image/x-icon")
|
|
638
|
+
return
|
|
639
|
+
except OSError:
|
|
640
|
+
pass
|
|
632
641
|
self._send(200, bytes.fromhex(
|
|
633
642
|
"89504e470d0a1a0a0000000d49484452000000010000000108060000001f15c489"
|
|
634
643
|
"0000000d4944415478da63fcffff3f030005fe02fea72d1e480000000049454e44ae426082"),
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
from __future__ import annotations
|
|
11
11
|
|
|
12
12
|
import os
|
|
13
|
+
import shutil
|
|
13
14
|
import subprocess
|
|
14
15
|
import sys
|
|
15
16
|
from pathlib import Path
|
|
@@ -55,9 +56,24 @@ def _panel_script() -> Path:
|
|
|
55
56
|
|
|
56
57
|
|
|
57
58
|
def _icon_path() -> Path | None:
|
|
58
|
-
"""
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
"""快捷方式图标:优先用**数据目录**里的 ASCII 路径副本。
|
|
60
|
+
|
|
61
|
+
为什么不直接用 `assets/lingshu.ico`:程序目录常常含中文
|
|
62
|
+
(如 `E:\\丁厚同\\文档\\程序\\灵枢-skill`),Explorer 有概率加载不了
|
|
63
|
+
IconLocation,回退成 wscript.exe 的**白色脚本图标**(实测踩过)。
|
|
64
|
+
所以把图标复制到 `~/.brain-memory/lingshu.ico`(纯 ASCII、稳定存在)再用。
|
|
65
|
+
"""
|
|
66
|
+
src = Path(__file__).resolve().parent.parent / "assets" / ICON_NAME
|
|
67
|
+
if not src.is_file():
|
|
68
|
+
return None
|
|
69
|
+
try:
|
|
70
|
+
dst = Path(core.HOME) / ICON_NAME
|
|
71
|
+
if not dst.is_file() or dst.stat().st_size != src.stat().st_size:
|
|
72
|
+
dst.parent.mkdir(parents=True, exist_ok=True)
|
|
73
|
+
shutil.copy2(src, dst)
|
|
74
|
+
return dst
|
|
75
|
+
except Exception:
|
|
76
|
+
return src # 复制失败就退回原路径,总比没有图标好
|
|
61
77
|
|
|
62
78
|
|
|
63
79
|
def _write_launcher(port: int | None = None, script: Path | None = None) -> Path:
|
package/scripts/panel_server.py
CHANGED
|
@@ -627,8 +627,17 @@ class Handler(BaseHTTPRequestHandler):
|
|
|
627
627
|
content = content.replace("/*__PANEL_TOKEN__*/", TOKEN)
|
|
628
628
|
self._send(200, content.encode("utf-8"), "text/html; charset=utf-8")
|
|
629
629
|
return
|
|
630
|
-
if path
|
|
631
|
-
#
|
|
630
|
+
if path in ("/favicon.ico", "/apple-touch-icon.png"):
|
|
631
|
+
# 浏览器自动请求。优先返回真图标(assets/lingshu.ico,由 make_icon.py 生成),
|
|
632
|
+
# 没有才退回透明 1x1 PNG(避免控制台刷 404)。
|
|
633
|
+
# 原来这里恒返回透明 PNG,标签页图标就是空白(用户反馈"图标白了")。
|
|
634
|
+
ico = ASSETS / "lingshu.ico"
|
|
635
|
+
try:
|
|
636
|
+
if ico.is_file():
|
|
637
|
+
self._send(200, ico.read_bytes(), "image/x-icon")
|
|
638
|
+
return
|
|
639
|
+
except OSError:
|
|
640
|
+
pass
|
|
632
641
|
self._send(200, bytes.fromhex(
|
|
633
642
|
"89504e470d0a1a0a0000000d49484452000000010000000108060000001f15c489"
|
|
634
643
|
"0000000d4944415478da63fcffff3f030005fe02fea72d1e480000000049454e44ae426082"),
|