lingshu-skill 5.31.0 → 5.32.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/package.json CHANGED
@@ -1,52 +1,52 @@
1
- {
2
- "name": "lingshu-skill",
3
- "version": "5.31.0",
4
- "description": "Brain-inspired persistent memory, persona and growth system for AI coding agents. Local-only, zero-dependency Python. Requires Python 3.10+.",
5
- "repository": {
6
- "type": "git",
7
- "url": "git+https://github.com/Q2667671398/lingshu-skill.git"
8
- },
9
- "homepage": "https://github.com/Q2667671398/lingshu-skill#readme",
10
- "license": "MIT",
11
- "type": "module",
12
- "main": "index.js",
13
- "files": [
14
- "SKILL.md",
15
- "SKILL-lite.md",
16
- "SKILL-tiny.md",
17
- "README.md",
18
- "CHANGELOG.md",
19
- "index.js",
20
- "cordis.patch.yml",
21
- "start-panel.bat",
22
- "assets/",
23
- "docs/",
24
- "cordis-plugin/",
25
- "scripts/"
26
- ],
27
- "scripts": {
28
- "prepack": "python scripts/npm_prepack.py"
29
- },
30
- "peerDependencies": {
31
- "@deepseek-ai/cordis": "^0.2.0-rc.1 || ^0.2.1-alpha.3 || ^0.2.1-rc.1 || ^0.2.1-rc.2 || ^0.2.1-rc.3"
32
- },
33
- "peerDependenciesMeta": {
34
- "@deepseek-ai/cordis": {
35
- "optional": true
36
- }
37
- },
38
- "keywords": [
39
- "dsh",
40
- "deepseek",
41
- "coding-agent",
42
- "plugin",
43
- "memory",
44
- "persona"
45
- ],
46
- "dsh": {
47
- "bundle": {
48
- "patch": "./cordis.patch.yml"
49
- }
50
- },
51
- "packageManager": "pnpm@12.21.0+sha512.66fd8278ee28935ce951792d34367ff3af5c432a2756445823029533835b8da529bbe0be5130afd56ed0713fb8789e47bad82d93bd5ae2fe54b15562d6276ef0"
52
- }
1
+ {
2
+ "name": "lingshu-skill",
3
+ "version": "5.32.0",
4
+ "description": "Brain-inspired persistent memory, persona and growth system for AI coding agents. Local-only, zero-dependency Python. Requires Python 3.10+.",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/Q2667671398/lingshu-skill.git"
8
+ },
9
+ "homepage": "https://github.com/Q2667671398/lingshu-skill#readme",
10
+ "license": "MIT",
11
+ "type": "module",
12
+ "main": "index.js",
13
+ "files": [
14
+ "SKILL.md",
15
+ "SKILL-lite.md",
16
+ "SKILL-tiny.md",
17
+ "README.md",
18
+ "CHANGELOG.md",
19
+ "index.js",
20
+ "cordis.patch.yml",
21
+ "start-panel.bat",
22
+ "assets/",
23
+ "docs/",
24
+ "cordis-plugin/",
25
+ "scripts/"
26
+ ],
27
+ "scripts": {
28
+ "prepack": "python scripts/npm_prepack.py"
29
+ },
30
+ "peerDependencies": {
31
+ "@deepseek-ai/cordis": "^0.2.0-rc.1 || ^0.2.1-alpha.3 || ^0.2.1-rc.1 || ^0.2.1-rc.2 || ^0.2.1-rc.3"
32
+ },
33
+ "peerDependenciesMeta": {
34
+ "@deepseek-ai/cordis": {
35
+ "optional": true
36
+ }
37
+ },
38
+ "keywords": [
39
+ "dsh",
40
+ "deepseek",
41
+ "coding-agent",
42
+ "plugin",
43
+ "memory",
44
+ "persona"
45
+ ],
46
+ "dsh": {
47
+ "bundle": {
48
+ "patch": "./cordis.patch.yml"
49
+ }
50
+ },
51
+ "packageManager": "pnpm@12.21.0+sha512.66fd8278ee28935ce951792d34367ff3af5c432a2756445823029533835b8da529bbe0be5130afd56ed0713fb8789e47bad82d93bd5ae2fe54b15562d6276ef0"
52
+ }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "PATCH_NOTES.md": "9296e524f743f358fd11115598398a754cfd69534526dde9c8ad85f14a418f89",
3
3
  "README.md": "3d634d743b085eebd2cbb5dd3a00edfa728ed23947e20cc29e7c3b29087ec043",
4
- "engine/CHANGELOG.md": "948915a7568c1bd087a838c784c4e872a327470566ab18cbb8d894db9426fb68",
5
- "engine/README.md": "af118e93800c308de869eca4fbc6363d277f9abf2fe8e6d5154b2f2843f8d680",
6
- "engine/SKILL-lite.md": "e9147de39af645cf3b79c389285de70545a77e23fe1ef9039a2c50562585584c",
7
- "engine/SKILL-tiny.md": "321e193370dc16f0f9600f59c18e5882c192c70098591fb2961f92a08482e8d0",
8
- "engine/SKILL.md": "fc0753c72eaa3f3562f805a01bf42b4af9be1c7d6404796e7e047d73e92c027a",
9
- "engine/assets/panel.html": "0fcd68c914924babfa001770be9784204ce299f638ef92598529420883f9ab65",
4
+ "engine/CHANGELOG.md": "dd9a2d44135beb92c13cdad61b4b7190a1506246a1ea80040410114d29d0c64a",
5
+ "engine/README.md": "90dfd4c056fb50c1690f750c30b24d50d5ca2efff1526300187b7e2670d24d54",
6
+ "engine/SKILL-lite.md": "b6b25a4ebafb495e3f87cdadf5aa19499525cd03bc2212d54a38800283aaaaac",
7
+ "engine/SKILL-tiny.md": "caf0d028fc5597a01c4cc02dbe76f49a804f7b7efc2ceaa4dc80e53dae1746ee",
8
+ "engine/SKILL.md": "66717790ab9d2cbfa176ce71912cd0aba6fcc30d6990be2323b5d947cd9282bd",
9
+ "engine/assets/panel.html": "263eef3e1ecca3c69580ae7f15596a162986756bdfccf2cddbdfdfdc36cea907",
10
10
  "engine/docs/commands.md": "e3f515a760f06fc8f528e93b59716d46499ffb1976e945814ac6dc1d18964e0f",
11
11
  "engine/docs/mechanics.md": "e8a6602a434ed5b78cac64a98884f65a6888eb48daa7a1c0be1f6c3984041b34",
12
12
  "engine/docs/models.md": "596bc1a3414f2de5569dcb41a0c494acae7daa534efd5a91dbcc3c4cb308d695",
@@ -38,7 +38,7 @@
38
38
  "engine/scripts/mem_lesson.py": "e1520786315f3e41c829909c739e5af3eee89397da7db5026d106710b2b3c118",
39
39
  "engine/scripts/mem_score.py": "95dcecba5f4db7c0c16ebc415434e1cb58cc7dd8b8213360b4df36e2a90faf6e",
40
40
  "engine/scripts/mem_topic.py": "c22f75c128cdd3b26ff845f1a71608401bc0dc8955f9f0e1988d7f0cd663d0d5",
41
- "engine/scripts/memory.py": "5cecfe368af057c145c940799fe0447490ea8b4c7180a3c41411519450786b74",
41
+ "engine/scripts/memory.py": "cd564cb22e5414701d97d61051ddca4686c25a19df13871ab442859e8ba42a77",
42
42
  "engine/scripts/npm_prepack.py": "d62c491a6f9edfcab2dd465a995e72df879a61b4da26ae0fe76121c8adc77e02",
43
43
  "engine/scripts/panel_build.py": "e36dbc2e2c3ea1e36da6a4aa279f666937199d685ea3af7f676b1f350f59d608",
44
44
  "engine/scripts/panel_cloud.py": "956b1ae529b1c29fc1271b635b5a6a73be6b82c9acb94aa59fab8cfda63c9440",
@@ -1,5 +1,47 @@
1
1
  # 更新日志
2
2
 
3
+ ## v5.32(2026-11-28)
4
+
5
+ > 主题:**常加载文档改用 token 最省的写法**(实测选型,不靠猜)。
6
+
7
+ ### 实测:英文不省,符号压缩才省
8
+
9
+ 同一条规则,三种写法的 token 成本(按 DeepSeek 官方口径:中文 0.6 token/字、英文 0.3 token/字符):
10
+
11
+ | 写法 | 字符 | token | 相对 |
12
+ |---|---|---|---|
13
+ | 中文散句 | 60 | 33 | 1.00x |
14
+ | 英文散句 | 208 | 63 | **1.94x(更贵)** |
15
+ | 符号压缩(中英混) | 40 | 19 | **0.59x(最省)** |
16
+
17
+ **结论与直觉相反**:英文反而贵近一倍——DeepSeek 对中文分词效率高,
18
+ 一个汉字约 1 token 量级,而英文一个单词要拆成好几个 token。
19
+ 真正省 token 的是**压缩编码**(表格化、符号化、删虚词),不是换语言。
20
+
21
+ ### 改了什么
22
+
23
+ SKILL.md 全量改写为符号压缩体:| 分隔同级项、→ 表因果与动作、> 表优先、
24
+ 删虚词(的/了/就是)、表格化一切可表格化的。
25
+
26
+ | 版本 | 字符 | token |
27
+ |---|---|---|
28
+ | 原始(v5.30 前) | 21,939 | 12,066 |
29
+ | v5.31 | 14,381 | 5,846 |
30
+ | **v5.32(本版)** | **13,759** | **5,468** |
31
+
32
+ 相对原始版**省 55%**。18 个章节与全部行为规则一条未删(脚本核验)。
33
+
34
+ ### 顺带修:context-stats 崩溃
35
+
36
+ memory.py 用 **assert** 校验注入账单字符数,而上方对 _result 做过指针标记替换
37
+ ((<token><id>)→(id:<id>,memory show 取))会改变长度 → 每次调用必抛
38
+ AssertionError (2873, 2864),观测工具直接变故障源。
39
+
40
+ 修法:不一致时按真实长度校正到 other 段(保证 Σ段==总长、账单可信),记一条 warn,
41
+ 绝不崩。顺带发现注入包实际**超预算**(1465/1400 token),已记入待办待优化。
42
+
43
+ 验证:94/94 测试通过。
44
+
3
45
  ## v5.31(2026-11-28)
4
46
 
5
47
  > 主题:**水位显示 14% 而实际 67% 的根治** + 观测层全修 + 常加载文档瘦身。