@yottameta/yotta-memory 0.2.3 → 0.2.4

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/SKILL.md CHANGED
@@ -1,14 +1,14 @@
1
1
  ---
2
2
  name: yotta-memory
3
3
  description: "元忆 —— 有权限边界的文件式智能体记忆。文件式、零依赖、可 diff/回滚:让任何 AI 智能体活过会话,开工 recall 恢复上下文、重要信息 remember 落盘、收工归档。类型体系 FACT(公共共享)/ PREF / BOUND / COMMIT(私密隔离)。触发:记住、别忘了、记一笔、记忆、remember、recall、跨会话、上次说到、续测、交接、归档"
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  license: MIT
6
6
  ---
7
7
 
8
8
  # yotta-memory(元忆)— 有权限边界的文件式智能体记忆
9
9
 
10
10
  > 一句话:元忆 —— 有权限边界的文件式智能体记忆(不注入、可 diff、能回滚;FACT 共享、PREF / BOUND / COMMIT 私密隔离)。
11
- > 版本:0.2.3 | 最后更新:2026-08-23
11
+ > 版本:0.2.4 | 最后更新:2026-08-23
12
12
 
13
13
  ## 这是什么
14
14
 
@@ -7,7 +7,7 @@ const fs = require('fs');
7
7
  const path = require('path');
8
8
  const os = require('os');
9
9
 
10
- const VERSION = '0.2.3';
10
+ const VERSION = '0.2.4';
11
11
  const TYPES = ['FACT', 'PREF', 'BOUND', 'COMMIT'];
12
12
  const TYPE_DIRS = { FACT: 'facts', PREF: 'prefs', BOUND: 'bounds', COMMIT: 'commits' };
13
13
  const ARCHIVE_DIR = '.archive';
@@ -340,6 +340,8 @@ function cmdRecall(query, opts) {
340
340
  const agent = opts.agent || currentAgent();
341
341
  const ownerFilter = opts.owner || '';
342
342
  const allSafe = !!opts.unsafe;
343
+ // 是否显式发起跨智能体读取(--all 或 --owner <其它agent>):只有此时越界读才报错/警告,默认 recall 保持原有静默跳过
344
+ const explicitCross = !!opts.all || (!!ownerFilter && ownerFilter.toLowerCase() !== 'user' && ownerFilter !== agent);
343
345
  const hits = [];
344
346
  let deniedCount = 0;
345
347
  for (const root of roots) {
@@ -372,7 +374,7 @@ function cmdRecall(query, opts) {
372
374
  });
373
375
  const shown = hits.slice(0, limit);
374
376
  if (!shown.length) {
375
- if (deniedCount > 0) {
377
+ if (deniedCount > 0 && explicitCross) {
376
378
  console.log('检测到 ' + deniedCount + ' 条越界访问已被拒绝。');
377
379
  console.log('如需读取其它智能体私密记忆,请加 --unsafe(用户显式授权)或 --owner user。');
378
380
  process.exit(3);
@@ -392,7 +394,7 @@ function cmdRecall(query, opts) {
392
394
  console.log('[' + h.entry.type + '] ' + h.entry.subject + ': ' + h.entry.statement);
393
395
  console.log(' ' + path.join(h.root, h.entry.file));
394
396
  }
395
- if (deniedCount > 0) {
397
+ if (deniedCount > 0 && explicitCross) {
396
398
  console.log('\n[警告] 本次检索共拒绝 ' + deniedCount + ' 条越界访问(其它智能体私密记忆,未授权不展示)。如需读取请加 --unsafe 或 --owner user。');
397
399
  }
398
400
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yottameta/yotta-memory",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "元忆 —— 有权限边界的文件式智能体记忆。文件式、零依赖、可 diff/回滚;FACT/PREF/BOUND/COMMIT 四分类(公共共享/私密隔离),用户级+项目级双级存储。",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -1,4 +1,4 @@
1
- # yotta-memory 协议规范 v0.2.3
1
+ # yotta-memory 协议规范 v0.2.4
2
2
 
3
3
  > 本文件定义 yotta-memory 记忆标准:存储位置、目录结构、文件格式、类型体系与 CLI 命令参考。
4
4
  > 目标:任何支持 Agent Skills 开放标准的智能体,装完即可读写同一份记忆。