@agfpd/iapeer-memory-core 0.1.1 → 0.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agfpd/iapeer-memory-core",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "iapeer-memory core — host-neutral TypeScript memory primitive: vault schema/taxonomy config, search engine, memoryd, context renderer, role contracts. Consumed by the @agfpd/iapeer-memory facade; version kept in lockstep by its release flow (docs/10-distribution.md).",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/src/config.ts CHANGED
@@ -174,10 +174,17 @@ export function configFromEnv(): CoreConfig {
174
174
  }
175
175
  const taxonomy = getTaxonomy(rawLocale);
176
176
 
177
- const dbPath = envString(
178
- "IAPEER_MEMORY_DB_PATH",
179
- `${process.env.HOME}/.iapeer/cache/iapeer-memory/index.db`,
177
+ // DB default follows the SAME ladder as the package's memoryPaths():
178
+ // explicit DB_PATH → CACHE_DIR/index.db → IAPEER_ROOT/cache/… → ~/.iapeer/….
179
+ // A hardcoded ~/.iapeer default here once ignored IAPEER_MEMORY_CACHE_DIR
180
+ // and leaked SQLite writes OUT of a sandbox into the prod cache (e2e §A/C
181
+ // finding, boris 10.06) — the override chain must be honoured end-to-end.
182
+ const iapeerRoot = envString("IAPEER_ROOT", `${process.env.HOME}/.iapeer`);
183
+ const cacheDir = envString(
184
+ "IAPEER_MEMORY_CACHE_DIR",
185
+ `${iapeerRoot}/cache/iapeer-memory`,
180
186
  );
187
+ const dbPath = envString("IAPEER_MEMORY_DB_PATH", `${cacheDir}/index.db`);
181
188
 
182
189
  const embeddingEndpoint = envString("IAPEER_MEMORY_EMBEDDING_ENDPOINT");
183
190
  const rerankerEndpoint = envString("IAPEER_MEMORY_RERANKER_ENDPOINT");
@@ -167,8 +167,15 @@ export function fillInbox(
167
167
  fmBlock = setIfMissing(fmBlock, "title", basenameNoExt(opts.path));
168
168
  fmBlock = setIfMissing(fmBlock, "status", taxonomy.statusTokens.draft);
169
169
  fmBlock = setIfMissing(fmBlock, "created", opts.today);
170
- fmBlock = setIfMissing(fmBlock, "author", opts.agent);
170
+ // AUTHOR GUARD (инвариант Артура, инверсия 10.06): агент curator-set
171
+ // НИКОГДА не становится author в inbox-зоне. Курайторы трогают черновики
172
+ // только как курирование (rename/правки стиля — горячая дорожка
173
+ // инвертированного конвейера: копирайтер пишет НОВЫЙ файл при ренейме);
174
+ // бесхозный файл от курайтора остаётся без author до явной атрибуции —
175
+ // видимая аномалия лучше тихо присвоенного авторства. Существующий
176
+ // author и без гарда неприкосновенен (setIfMissing).
171
177
  if (!isCurator(opts.agent, opts.ctx)) {
178
+ fmBlock = setIfMissing(fmBlock, "author", opts.agent);
172
179
  fmBlock = setIfMissing(fmBlock, "needs_review", "true");
173
180
  }
174
181
  return fmBlock;