@yottameta/yotta-memory 0.22.2 → 0.22.3

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 CHANGED
@@ -1,3 +1,7 @@
1
+ ## v0.22.3 (2026-10-05)
2
+
3
+ - **安装器 junction 守卫**:`bin/install.js` 对目标基目录 / 技能目录为符号链接(含 Windows junction)时 fail-closed 拒绝(退出码 4,与 `install.sh` 同口径)——不再写穿 Hub 链接指向的真源,也不再误删 Hub 侧 `bin/` runtimePayload。统一安装器以分技能灰度补丁落地(模板与其余技能输出不变)。
4
+
1
5
  ## v0.22.2 (2026-10-05)
2
6
 
3
7
  - **修复(分发载荷缺口)**:`@yottameta/yotta-memory-plugin@0.22.1` 包内载荷落后技能源(`errText` 0/17、`bodyMirrorsStatement` 0/2)——0.22.1 的 D2/D3 修复未随插件分发。本版为维护性同步升版:引擎行为与 0.22.1 一致,插件载荷重新从技能源构建并对齐(逐字节校验)。
package/SKILL.md CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: yotta-memory
3
3
  description: 元忆 —— 有权限边界的文件式智能体记忆。文件式、零依赖、可 diff/可回滚:让任何 AI 智能体活过会话,开工 recall 恢复上下文、重要信息 remember 落盘、收工归档。类型体系 FACT(公共共享)/ PREF / BOUND / COMMIT(私密隔离)。触发:记住、别忘了、记一笔、记忆、remember、recall、跨会话、上次说到、续测、交接、归档、记忆盘、共享记忆、局域网记忆、画像、开工上下文、长期理解摘要、近期走廊、会话闭环、记忆守则、profile、context、越用越懂、语义检索、反馈、维护、蒸馏、feedback、maintain、distill、explain、自我学习、自我进化、自我提升、查看平台分页、recall 候选预过滤、任务相关记忆、--focus、--embedding、压缩遗忘、consolidate、周期摘要、自动合并、分类型衰减、回滚、备份、backup、防误删、doctor、事务快照、基线探针、恢复演练、记忆库安全扫描、scan、命中打点、容量水位、--capacity、--propose、上下文压缩审计、context --audit
4
- version: 0.22.2
4
+ version: 0.22.3
5
5
  license: MIT
6
6
  ---
7
7
 
@@ -46,7 +46,7 @@ license: MIT
46
46
  ## 安装 / 更新(两个 bin)
47
47
 
48
48
  - `yotta-memory`:引擎 CLI,负责读写记忆库。`npx -y @yottameta/yotta-memory` 只是临时运行引擎,不会安装技能。
49
- - `yotta-memory-install`:技能安装器。安装或更新技能使用 `npx -y --package @yottameta/yotta-memory yotta-memory-install --agent <name>`(或 `--dir <技能目录>`)。
49
+ - `yotta-memory-install`:技能安装器。安装或更新技能使用 `npx -y --package @yottameta/yotta-memory yotta-memory-install --agent <name>`(或 `--dir <技能目录>`);目标基目录 / 技能目录是符号链接(含 Windows junction)时 fail-closed 拒绝(不写穿 Hub 链接、不动 runtimePayload)。
50
50
 
51
51
  AI 更新流程:先运行 `yotta-memory --version` 记录当前引擎版本;升级 CLI 用 `npm i -g @yottameta/yotta-memory`;升级技能用 `npx -y --package @yottameta/yotta-memory yotta-memory-install --agent <name>`(或原安装时使用的 `--dir` / `install.sh`);完成后回读 `yotta-memory --version` 与已安装 `SKILL.md` 的 `version:`,两者不一致时不得声称更新成功。
52
52
 
package/bin/install.js CHANGED
@@ -244,6 +244,13 @@ function installTo(dest, opts) {
244
244
  if (!dest || typeof dest !== 'string') throw new UsageError('目标目录不能为空');
245
245
  const target = path.resolve(dest, SKILL_NAME);
246
246
  assertSafeTarget(target);
247
+ // fail-closed:目标基目录 / 技能目录是符号链接(含 Windows junction)时拒绝跟随;
248
+ // 与 install.sh 同口径,避免安装器改写 Hub 链接指向的真源(含 runtimePayload)。
249
+ for (const p of [path.resolve(dest), target]) {
250
+ let st = null;
251
+ try { st = fs.lstatSync(p); } catch (_) { continue; }
252
+ if (st.isSymbolicLink()) throw new TargetError('目标路径是符号链接,拒绝跟随:' + p);
253
+ }
247
254
  if (opts.dryRun) {
248
255
  console.log('[dry-run] 将安装到 -> ' + target);
249
256
  return target;
@@ -25,7 +25,7 @@ const net = require('net');
25
25
  const child_process = require('child_process');
26
26
  const { AsyncLocalStorage } = require('async_hooks');
27
27
 
28
- const VERSION = '0.22.2';
28
+ const VERSION = '0.22.3';
29
29
  const CLI_VALUE_OPTS = new Set(['--type', '--limit', '--days', '--out', '--owner', '--agent', '--agent-id', '--agent-key', '--agent-key-file', '--plugin-data', '--threshold', '--scope', '--host', '--port', '--dir', '--name', '--user', '--relationship', '--source', '--weight', '--budget', '--password', '--new-password', '--recovery-key', '--recovery-key-out', '--reason', '--merge', '--model', '--subject', '--embedding', '--focus', '--embedding-timeout', '--min-age', '--min-idle', '--max-utility', '--min-group', '--period', '--to', '--id', '--time', '--tools', '--mcp-config', '--skill-dir', '--year', '--evalset', '--k', '--seed', '--bootstrap', '--gate', '--against', '--template', '--path', '--from']);
30
30
  const CLI_FLAG_OPTS = new Set(['--project', '--all', '--unsafe', '--no-auth', '--stdio', '--onstart', '--from-current', '--restart', '--force', '--attach', '--allow-same-volume', '--verify', '--no-hint', '--encrypt', '--no-encrypt', '--password-stdin', '--json', '--manual', '--skip-schedule', '--useful', '--useless', '--undo', '--dry-run', '--apply', '--purge', '--dedup', '--batches', '--propose', '--audit', '--capacity', '--rules', '--explain', '--semantic', '--runtime', '--ablate', '--timing', '--baseline', '--probe', '--quarantine', '--restore', '--no-usage', '--yes', '--keep-memories', '--keep-identity']);
31
31
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yottameta/yotta-memory",
3
- "version": "0.22.2",
3
+ "version": "0.22.3",
4
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, start-of-work doctor, transactional snapshots before destructive writes), 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": [
@@ -3,7 +3,7 @@
3
3
  "slug": "yotta-memory",
4
4
  "name": "元忆",
5
5
  "package": "@yottameta/yotta-memory",
6
- "version": "0.22.2",
6
+ "version": "0.22.3",
7
7
  "trust": "yottameta",
8
8
  "install": {
9
9
  "idempotent": true