@yottameta/yotta-memory 0.11.0 → 0.12.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.
- package/CHANGELOG.md +20 -0
- package/README.md +23 -1
- package/README.zh-CN.md +23 -1
- package/SKILL.md +84 -5
- package/USER_GUIDE.md +20 -1
- package/bin/install.js +7 -7
- package/bin/yotta-memory.js +1099 -14
- package/install.sh +2 -2
- package/package.json +5 -2
- package/references/faq.md +11 -1
package/install.sh
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# yotta-memory
|
|
2
|
+
# yotta-memory 多智能体安装脚本
|
|
3
3
|
# 用法:
|
|
4
4
|
# bash install.sh --agent <name> # 按智能体默认用户级目录安装
|
|
5
5
|
# bash install.sh --dir <path> # 装到指定目录(用户改过目录的智能体)
|
|
@@ -129,4 +129,4 @@ main() {
|
|
|
129
129
|
fi
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
main "$@"
|
|
132
|
+
main "$@"
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yottameta/yotta-memory",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Yuanyi (元忆) — boundary-aware, file-based memory for AI agents. File-based, zero-dependency, diff/rollback-able; FACT/PREF/BOUND/COMMIT types (public shared / private isolated), user-level + project-level storage; v0.10 consolidation (periodic summaries with provenance, near-duplicate auto-merge, per-type decay, batch audit + rollback), v0.9 recall quality + context focus + optional local embedding plugin, plus v0.8 semantic search, feedback loop, self-organization and distillation.",
|
|
3
|
+
"version": "0.12.1",
|
|
4
|
+
"description": "Yuanyi (元忆) — boundary-aware, file-based memory for AI agents. File-based, zero-dependency, diff/rollback-able; FACT/PREF/BOUND/COMMIT types (public shared / private isolated), user-level + project-level storage; v0.12 reliability baseline (init guard, trash-based deletion, independent-volume backup/list/doctor/restore), v0.10 consolidation (periodic summaries with provenance, near-duplicate auto-merge, per-type decay, batch audit + rollback), v0.9 recall quality + context focus + optional local embedding plugin, plus v0.8 semantic search, feedback loop, self-organization and distillation.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"agent-skills",
|
|
@@ -36,5 +36,8 @@
|
|
|
36
36
|
"bin": {
|
|
37
37
|
"yotta-memory": "bin/yotta-memory.js",
|
|
38
38
|
"yotta-memory-install": "bin/install.js"
|
|
39
|
+
},
|
|
40
|
+
"scripts": {
|
|
41
|
+
"test": "node --test"
|
|
39
42
|
}
|
|
40
43
|
}
|
package/references/faq.md
CHANGED
|
@@ -30,7 +30,10 @@
|
|
|
30
30
|
开工运行 `yotta-memory context`(身份 + 画像 + 近期记忆 + 边界 + 承诺),需要细节再 `recall <关键词>`。
|
|
31
31
|
|
|
32
32
|
## 10. 备份与迁移?
|
|
33
|
-
`export --out 文件.json`
|
|
33
|
+
优先使用 `backup create --dir <独立盘目录>` 创建整库备份;`backup list` 查看,`backup doctor` 校验 SHA-256,`backup restore <id> --to <新目录>` 恢复到新目录。备份默认拒绝与记忆库同卷。`export --out 文件.json` 仍可用于跨工具迁移;公共 FACT 是明文文件也可直接 git 备份。
|
|
34
|
+
|
|
35
|
+
## 13. init 会不会覆盖已有记忆?
|
|
36
|
+
不会。v0.12.0 起 `init` 遇到已有记忆库默认拒绝;接入现有库用 `init --attach`。`--force` 在完整备份机制通过前也会明确拒绝,防止再次清空记忆。
|
|
34
37
|
|
|
35
38
|
## 11. 记忆太多 / 越来越膨胀怎么办?
|
|
36
39
|
两步走:`yotta-memory maintain --apply` 归档单条低效用旧记忆;同主题积累了很多「又老又不常用」的旧条目时,用 `yotta-memory consolidate`(先预览)→ `consolidate --apply` 把它们归纳成 1 条带溯源的周期摘要并归档原文。也可以先 `config set maintain_decay_halflife_COMMIT 90` 等让任务类承诺更快让位。
|
|
@@ -43,3 +46,10 @@
|
|
|
43
46
|
|
|
44
47
|
## 14. 半衰期 / 归档阈值怎么调?
|
|
45
48
|
`yotta-memory config set maintain_decay_halflife_FACT 1000`(FACT 慢衰减,单位天)、`maintain_decay_halflife_PREF` / `maintain_decay_halflife_COMMIT` 同理;BOUND 固定不衰减。归档阈值:`config set maintain_archived_utility 0.3`、`maintain_archived_age 180`;consolidate 参数 `consolidate_min_age` / `consolidate_min_idle` / `consolidate_max_utility` / `consolidate_min_group` / `consolidate_period`。改完 `config get` 可复查;单次运行也可用 CLI 参数(如 `consolidate --min-age 90`)临时覆盖。
|
|
49
|
+
|
|
50
|
+
## 15. 两个命令有什么区别?怎么更新?
|
|
51
|
+
|
|
52
|
+
- `yotta-memory` 是引擎 CLI,负责读写记忆库;`npx -y @yottameta/yotta-memory` 只是临时运行引擎,**不会安装技能**。
|
|
53
|
+
- `yotta-memory-install` 是技能安装器。安装或更新技能用 `npx -y --package @yottameta/yotta-memory yotta-memory-install --agent <name>`;用 `--dir` 安装时传入同一个技能目录。
|
|
54
|
+
- 更新 CLI:`npm i -g @yottameta/yotta-memory`。更新技能:重跑上面的 `--package ... yotta-memory-install` 命令,或全局安装后运行 `yotta-memory-install --agent <name>`。
|
|
55
|
+
- 为什么在 `npx -y @yottameta/yotta-memory` 后面加 `--agent <name>` 没有安装技能?因为 npm 默认运行的是包内同名的 `yotta-memory` 引擎 bin,而不是 `yotta-memory-install`;必须用 `--package` 显式指定安装器 bin。
|