@futdevpro/fdp-agent-memory 1.1.162 → 1.1.166

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@futdevpro/fdp-agent-memory",
3
- "version": "1.1.162",
3
+ "version": "1.1.166",
4
4
  "description": "Local-first, vector-backed multi-table agent memory exposed as an MCP server (read/write/capabilities). Public, FDP-Templates-free, no auth.",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -37,6 +37,18 @@ exports.SCAN_IGNORE_PATTERNS_DEFAULT = [
37
37
  // Generált report-ok / logok / teszt-artefaktumok (FAM-REV-057) — minifikált HTML / nagy JSON-log → embed-hang
38
38
  // (pl. dynamo-ngx: 515KB playwright-report HTML, 320KB .dynamo/logs status.json, 173KB logs/cicd-report.json).
39
39
  '**/playwright-report/**', '**/test-results/**', '**/.dynamo/**', '**/logs/**', '**/*.log', '**/*-report.json',
40
+ // GENERÁLT audit-/report-/evidence-artefaktumok (2026-08-22, a játék-projektek beemelésekor mérve). A fenti
41
+ // `*-report.json` TÚL SZŰK volt: a VERZIÓZOTT nevek (`asset-qa-report-v14.json`, `cat-animation-audit-v12.json`)
42
+ // átcsúsztak rajta. Mérve a teljes codebase táron: `evidence.json` 1082 chunk / 1,17M char (detektor-kimenet),
43
+ // `*-report*` 788, `*-audit*` 589, `asset|atlas-manifest` 257 (pixel-koordináták, occupancy-arányok),
44
+ // `dom-snapshot` 192, `*-capture` 153.
45
+ '**/*-report*.json', '**/*-audit*.json', '**/evidence.json', '**/dom-snapshot*.json', '**/*-capture.json',
46
+ '**/asset-manifest*.json', '**/atlas-manifest*.json',
47
+ // ⚠️ SZÁNDÉKOSAN NEM `**/reports/**` és NEM `**/manifest.json`:
48
+ // - a `reports/` mappa-minta **4053 markdown DOKSI-chunkot** zárt volna ki (`__documentations/reports/…`),
49
+ // ezért csak az e2e generált riport-mappája megy ki;
50
+ // - a sima `manifest.json` a Unity `Packages/manifest.json` = a FÜGGŐSÉG-LISTA, ami valódi érték.
51
+ '**/e2e/reports/**',
40
52
  '**/*.min.js', '**/*.min.css', '**/*.map', '**/.env', '**/.env.*', '**/*.pem', '**/*.key',
41
53
  '**/*.secret', '**/secrets/**', '**/*.lock', '**/package-lock.json', '**/pnpm-lock.yaml',
42
54
  // Python (L4) — bytecode/venv/teszt-/lint-cache + telepített csomagok (SOHA nem forrás; a `*.pyc`/`*.pyo`
@@ -50,6 +62,19 @@ exports.SCAN_IGNORE_PATTERNS_DEFAULT = [
50
62
  // lowercase NEM matchelné a Unity `Logs/`-át).
51
63
  '**/Library/**', '**/Temp/**', '**/Obj/**', '**/obj/**', '**/bin/**', '**/Logs/**', '**/Build/**', '**/Builds/**',
52
64
  '**/.vs/**', '**/*.csproj', '**/*.sln', '**/*.meta', '**/*.unity', '**/*.prefab', '**/*.asset',
65
+ // Unity GÉPI SZERIALIZÁCIÓ — szöveges fájlok, ezért a bináris-routing ÁTENGEDTE őket, de a tartalmuk
66
+ // GUID-leves / YAML objektum-gráf / animációs görbe / mesh-vertex: NULLA emberi tudás. Mérve (2026-08-22, a
67
+ // játék-projektek beemelése után): **9 017 chunk / 9,5M karakter** csak ezekből — `.shadergraph` 4344,
68
+ // `.dwlt` 1105, `.anim` 1086, `.shadersubgraph` 1075, `.mat` 685, `.vfx` 281, `.controller` 178. És nem is
69
+ // csak holt teher: egy „shader for the water surface" query top-5-jéből **4 slot** ilyen szemét volt, a
70
+ // „UI button click handler"-ből 2 — a grafikai/UI kérdéseket gyakorlatilag használhatatlanná tette.
71
+ // A `.shader`/`.hlsl`/`.compute` SZÁNDÉKOSAN MARAD: azok kézzel írt forrás.
72
+ '**/*.shadergraph', '**/*.shadersubgraph', '**/*.vfx', '**/*.mat', '**/*.physicMaterial', '**/*.physicsMaterial2D',
73
+ '**/*.controller', '**/*.overrideController', '**/*.anim', '**/*.playable', '**/*.signal', '**/*.mask',
74
+ '**/*.terrainlayer', '**/*.brush', '**/*.inputactions', '**/*.lighting', '**/*.giparams', '**/*.cubemap',
75
+ '**/*.flare', '**/*.fontsettings', '**/*.guiskin', '**/*.spriteatlas', '**/*.spriteatlasv2', '**/*.mixer',
76
+ // Unity editor-layout + 3D-mesh + szerkesztői mentés (a `.obj` ProBuilder-generált geometria, nem forrás).
77
+ '**/*.dwlt', '**/*.obj', '**/*.fbx', '**/*.blend', '**/*.bak',
53
78
  // Agent-/böngésző-state (lokális futás-melléktermék, SOHA nem korpusz-anyag): `.local-state` (pl. agent
54
79
  // browser-automation profil) + Chromium-profil/cache — lockolt SQLite + bináris blobok (Login Data /
55
80
  // Cookies / Web Data = SZEMÉLYES adat), olvashatatlanok + junk. (Lelet 2026-06-22: fdp-assistant/__agent/
@@ -29,6 +29,7 @@ exports.famEntryBaseProperties = {
29
29
  referenceLinks: { type: 'string[]', default: [] },
30
30
  referenceCodes: { type: 'string[]', index: true, default: [] },
31
31
  weight: { type: 'number', default: 1 },
32
+ projectWeight: { type: 'number' },
32
33
  importance: { type: 'number', index: true },
33
34
  source: { type: 'object' },
34
35
  sourceFilePath: { type: 'string', index: true },
@@ -55,6 +55,14 @@ class FAM_Entry extends fsm_dynamo_1.DyFM_Metadata {
55
55
  // --- pontozás ---
56
56
  /** Retrieval-score multiplikátor (`> 0`); `0` → kizárt. Default `1.0` (per-tár override). */
57
57
  weight = 1;
58
+ /**
59
+ * A PROJEKT-szintu retrieval-szorzo a `.famconfig.json`-bol (`FAM_ProjectConfig_Util`). Kulon mezo a
60
+ * `weight`-tol, mert a `weight` a temperalason (`effectiveWeight`) megy at — az `read.weightInfluence: 0.06`
61
+ * mellett onnan MAXIMUM 6% lehuzas johet, barmilyen alacsony erteket adunk (merve 2026-08-22: `weight: 0.6`
62
+ * -> 2,4% csokkenes). Ez a mezo TEMPERALATLANUL szorozza a `finalScore`-t, igy a projekt-szintu policy
63
+ * valodi hatassal bir. Hianyzik/undefined -> 1 (nincs hatas).
64
+ */
65
+ projectWeight;
58
66
  /** Opcionális kvalitatív hangsúly (0..1). */
59
67
  importance;
60
68
  // --- Memory Activation Model (dsgn-013, CSAK a `memory` táron értelmezett) ---
@@ -0,0 +1,101 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FAM_ProjectConfig_Util = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const fs = tslib_1.__importStar(require("fs"));
6
+ const path = tslib_1.__importStar(require("path"));
7
+ const fsm_dynamo_1 = require("@futdevpro/fsm-dynamo");
8
+ /**
9
+ * `FAM_ProjectConfig_Util` — a **projektben látható, verziókezelt** FAM-beállítás: `.famconfig.json` a
10
+ * scan-gyökérben, a már bevett `.fdpfamignore` MELLETT (owner-igény 2026-08-22: „ne csak a FAM-ban éljenek
11
+ * ezek a beállítások", legyen kényelmesen konfigurálható és a projektben is látszódjon).
12
+ *
13
+ * **Miért a SÚLY a fő mező.** A retrieval-rangsor RELATÍV: a `finalScore` a jelöltek KÖZÖTT dönt. Ezért egy
14
+ * projekt EGÉSZÉRE adott, egyenletes súly-szorzó pontosan azt csinálja, amit az owner kért:
15
+ * - **általános keresésben** (a projekt más projektekkel VERSENYZIK) a tartalma halkabban jelenik meg;
16
+ * - **célzott keresésben** (`scopeFilter` az adott projektre) MINDEN jelölt ugyanazt a szorzót kapja,
17
+ * így a sorrend VÁLTOZATLAN — a projekt a saját keresésében teljes értékű marad.
18
+ * Nem kell tehát külön „általános vs. célzott" mechanika: az egyenletes szorzó önmagában elvégzi.
19
+ *
20
+ * A `weight: 0` és a negatív érték SZÁNDÉKOSAN tiltott: a `finalScore = score × weight` miatt az a bejegyzést
21
+ * VÉGLEG visszakereshetetlenné tenné (2026-08-22-én mérve a `write` oldalán — az entry a saját egyedi
22
+ * markerére sem jött vissza). Aki ki akar zárni valamit, `.fdpfamignore`-t írjon: az a szándék helyes kifejezése.
23
+ */
24
+ class FAM_ProjectConfig_Util {
25
+ /** A projekt-konfig fájlneve — a `.fdpfamignore` testvére, ugyanabban a gyökérben. */
26
+ static FILE_NAME = '.famconfig.json';
27
+ /** Catch-all glob a projekt-szintű súlyhoz (a `weights` specifikus mintái ELÉBE kerülnek). */
28
+ static CATCH_ALL = '**';
29
+ /**
30
+ * A `.famconfig.json` beolvasása a megadott gyökérből. Hiányzó fájl → `undefined` (teljesen opcionális).
31
+ * Hibás JSON / érvénytelen érték → **WARN + a hibás mező kihagyása**, SOHA nem dönti meg a scant: egy
32
+ * elgépelt konfig ne akadályozza meg a projekt indexelését (`core-rich-error-handling`).
33
+ */
34
+ static load(rootDir) {
35
+ const file = path.join(rootDir, FAM_ProjectConfig_Util.FILE_NAME);
36
+ if (!fs.existsSync(file)) {
37
+ return undefined;
38
+ }
39
+ let raw;
40
+ try {
41
+ raw = JSON.parse(fs.readFileSync(file, 'utf8'));
42
+ }
43
+ catch (error) {
44
+ fsm_dynamo_1.DyFM_Log.warn(`[FAM scan] '${file}' NEM értelmezhető JSON (${error?.message}) — a projekt-konfig `
45
+ + 'KIHAGYVA, a scan a default beállításokkal folytatódik.');
46
+ return undefined;
47
+ }
48
+ const parsed = (raw && typeof raw === 'object') ? raw : {};
49
+ const config = {};
50
+ const weight = parsed.weight;
51
+ if (weight !== undefined) {
52
+ if (typeof weight === 'number' && Number.isFinite(weight) && weight > 0) {
53
+ config.weight = weight;
54
+ }
55
+ else {
56
+ fsm_dynamo_1.DyFM_Log.warn(`[FAM scan] '${file}': a \`weight\` POZITÍV szám kell legyen (kapott: ${String(weight)}) — `
57
+ + 'kihagyva. A 0/negatív súly visszakereshetetlenné tenné a projektet; kizáráshoz `.fdpfamignore` kell.');
58
+ }
59
+ }
60
+ const weights = parsed.weights;
61
+ if (Array.isArray(weights)) {
62
+ const valid = weights.filter((rule) => !!rule && typeof rule === 'object'
63
+ && typeof rule.pattern === 'string'
64
+ && typeof rule.weight === 'number'
65
+ && Number.isFinite(rule.weight)
66
+ && rule.weight > 0);
67
+ if (valid.length !== weights.length) {
68
+ fsm_dynamo_1.DyFM_Log.warn(`[FAM scan] '${file}': ${weights.length - valid.length} érvénytelen \`weights\` szabály `
69
+ + 'kihagyva (kell: `pattern` string + POZITÍV `weight`).');
70
+ }
71
+ if (valid.length) {
72
+ config.weights = valid;
73
+ }
74
+ }
75
+ if (typeof parsed.note === 'string') {
76
+ config.note = parsed.note;
77
+ }
78
+ return (config.weight !== undefined || config.weights || config.note) ? config : undefined;
79
+ }
80
+ /**
81
+ * A PROJEKT-FAKTOR szabálylistája (a temperálatlan `projectWeight`-hez). Az első illeszkedő nyer, ezért a
82
+ * sorrend jelentéses: ① a konfig SPECIFIKUS mintái, ② a projekt-szintű `weight` catch-all glob-ként — így
83
+ * egy `{"pattern": "__documentations/**", "weight": 1.0}` kivétel TÉNYLEGESEN kiveszi a doksikat a halkítás alól.
84
+ *
85
+ * ⚠️ KÜLÖN CSATORNA a hívó `weights`-étől. A hívó (scan-API) szabályai a `weight` mezőre mennek, ami a
86
+ * retrieval `effectiveWeight` temperálásán át hat (0.06 influence → max 6%). A projekt-konfig szabályai ide
87
+ * jönnek, ahol a szorzó KÖZVETLEN. A kettő összekeverése azt jelentené, hogy a `.famconfig.json`-ban felvett
88
+ * kivétel némán hatástalan marad — pontosan az a fajta látszat-funkció, amit kerülni akarunk.
89
+ */
90
+ static projectWeightRules(config) {
91
+ if (!config) {
92
+ return undefined;
93
+ }
94
+ const rules = [...(config.weights ?? [])];
95
+ if (config.weight !== undefined) {
96
+ rules.push({ pattern: FAM_ProjectConfig_Util.CATCH_ALL, weight: config.weight });
97
+ }
98
+ return rules.length ? rules : undefined;
99
+ }
100
+ }
101
+ exports.FAM_ProjectConfig_Util = FAM_ProjectConfig_Util;
@@ -484,6 +484,8 @@ class FAM_Ingest_ControlService {
484
484
  scopePath: set.scopePath,
485
485
  // Súly-kiemelés (FAM-REV-055): a scan-`weights`-ből feloldott fájl-súly (undefined → a tár model-default).
486
486
  weight: set.file.weight,
487
+ // A projekt-szintu szorzo a `.famconfig.json`-bol — a retrieval TEMPERALATLANUL alkalmazza.
488
+ projectWeight: set.file.projectWeight,
487
489
  sourceFilePath: set.file.relativePath,
488
490
  chunkIndex: set.chunk.chunkIndex,
489
491
  chunkTotal: set.chunk.chunkTotal,
@@ -8,6 +8,7 @@ const fsm_dynamo_1 = require("@futdevpro/fsm-dynamo");
8
8
  const config_catalog_const_1 = require("../../../_collections/config-catalog.const");
9
9
  const config_control_service_1 = require("../../../_routes/server/config/config.control-service");
10
10
  const fam_famignore_util_1 = require("../_collections/fam-famignore.util");
11
+ const fam_project_config_util_1 = require("../_collections/fam-project-config.util");
11
12
  const fam_file_routing_util_1 = require("../_collections/fam-file-routing.util");
12
13
  const fam_glob_match_util_1 = require("../_collections/fam-glob-match.util");
13
14
  const fam_scan_path_util_1 = require("../_collections/fam-scan-path.util");
@@ -48,6 +49,17 @@ class FAM_Scan_ControlService {
48
49
  // (in-repo, gitignore-szerű; folder/project scan-nél — a scan-file egyetlen explicit fájlt céloz). HOZZÁADÓDIK.
49
50
  const baseIgnore = await this.resolveIgnorePatterns(set.scopePath, set.exclude);
50
51
  const famIgnore = set.operation === 'scan-file' ? [] : fam_famignore_util_1.FAM_FamIgnore_Util.loadFromDir(resolvedRoot);
52
+ // A projektben LATHATO, verziokezelt FAM-beallitas (`.famconfig.json`) — a `.fdpfamignore` testvere.
53
+ // Owner-igeny 2026-08-22: a beallitasok ne CSAK a FAM-ban eljenek, hanem a projektben is latszodjanak.
54
+ const projectConfig = set.operation === 'scan-file'
55
+ ? undefined
56
+ : fam_project_config_util_1.FAM_ProjectConfig_Util.load(resolvedRoot);
57
+ if (projectConfig) {
58
+ fsm_dynamo_1.DyFM_Log.info(`[famIngest] ${fam_project_config_util_1.FAM_ProjectConfig_Util.FILE_NAME} betoltve (${resolvedRoot}): `
59
+ + `weight=${projectConfig.weight ?? '-'}, per-minta szabaly=${projectConfig.weights?.length ?? 0}`
60
+ + `${projectConfig.note ? ` | ${projectConfig.note}` : ''}`);
61
+ }
62
+ const projectWeightRules = fam_project_config_util_1.FAM_ProjectConfig_Util.projectWeightRules(projectConfig);
51
63
  if (famIgnore.length) {
52
64
  fsm_dynamo_1.DyFM_Log.info(`[famIngest] .fdpfamignore betöltve (${resolvedRoot}): ${famIgnore.length / 2} minta-sor`);
53
65
  }
@@ -94,6 +106,7 @@ class FAM_Scan_ControlService {
94
106
  maxFileSizeBytes: maxFileSizeBytes,
95
107
  tableOverride: set.tableOverride,
96
108
  weights: set.weights,
109
+ projectWeightRules: projectWeightRules,
97
110
  testFileWeight: testFileWeight,
98
111
  });
99
112
  if (routed.route === 'skip') {
@@ -154,6 +167,7 @@ class FAM_Scan_ControlService {
154
167
  return {
155
168
  ...base, route: route,
156
169
  weight: fam_scan_weight_util_1.FAM_ScanWeight_Util.resolveWithDefault(set.relativePath, set.weights, set.testFileWeight),
170
+ projectWeight: fam_scan_weight_util_1.FAM_ScanWeight_Util.resolve(set.relativePath, set.projectWeightRules),
157
171
  };
158
172
  }
159
173
  /**
@@ -469,12 +469,21 @@ class FAM_Retrieval_ControlService {
469
469
  })
470
470
  : 0;
471
471
  const keywordBoost = 1 + set.config.keywordWeight * lexicalScore;
472
+ // PROJEKT-SZINTU szorzo a `.famconfig.json`-bol — SZANDEKOSAN a temperalason KIVUL. A `weight` mezo az
473
+ // `effectiveWeight`-en megy at, ahonnan a 0.06-os influence mellett MAXIMUM 6% lehuzas johet (merve
474
+ // 2026-08-22), ezert egy projekt-szintu policy ott gyakorlatilag hatastalan lenne. Itt viszont a szorzo
475
+ // KOZVETLENUL hat. A rangsor RELATIV, ezert az egyenletes projekt-szorzo altalanos keresesben halkit, de
476
+ // scope-olt (celzott) keresesben NEM valtoztat sorrendet — minden jelolt ugyanazt a szorzot kapja.
477
+ const projectFactor = typeof set.entry.projectWeight === 'number'
478
+ && Number.isFinite(set.entry.projectWeight) && set.entry.projectWeight > 0
479
+ ? set.entry.projectWeight
480
+ : 1;
472
481
  return {
473
482
  id: set.vectorHit.id,
474
483
  table: set.table,
475
484
  score: set.vectorHit.score,
476
485
  weight: set.weight,
477
- finalScore: set.vectorHit.score * FAM_Retrieval_ControlService.effectiveWeight(set.weight, set.config.weightInfluence) * chunkFactor * sourceFactor * summaryFactor * decayFactor * keywordBoost,
486
+ finalScore: set.vectorHit.score * FAM_Retrieval_ControlService.effectiveWeight(set.weight, set.config.weightInfluence) * chunkFactor * sourceFactor * summaryFactor * decayFactor * keywordBoost * projectFactor,
478
487
  lexicalScore: lexicalScore,
479
488
  content: set.includeContent ? set.entry.content : undefined,
480
489
  contentHash: set.entry.contentHash,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@futdevpro/fdp-agent-memory",
3
- "version": "1.1.162",
3
+ "version": "1.1.166",
4
4
  "description": "Local-first, vector-backed multi-table agent memory exposed as an MCP server (read/write/capabilities). Public, FDP-Templates-free, no auth.",
5
5
  "private": false,
6
6
  "publishConfig": {