@futdevpro/fdp-agent-memory 0.1.0 → 1.1.12

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.
Files changed (100) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +7 -7
  3. package/build/package.json +6 -5
  4. package/build/src/_cli/_collections/fam-arg.util.js +48 -0
  5. package/build/src/_cli/_collections/fam-cli.const.js +40 -0
  6. package/build/src/_cli/_collections/fam-output.util.js +86 -0
  7. package/build/src/_cli/_collections/fam-project-discovery.util.js +98 -0
  8. package/build/src/_cli/_commands/capture.command.js +73 -0
  9. package/build/src/_cli/_commands/config.command.js +93 -0
  10. package/build/src/_cli/_commands/doctor.command.js +124 -0
  11. package/build/src/_cli/_commands/errors.command.js +66 -0
  12. package/build/src/_cli/_commands/export.command.js +65 -0
  13. package/build/src/_cli/_commands/find-duplicates.command.js +97 -0
  14. package/build/src/_cli/_commands/import.command.js +136 -0
  15. package/build/src/_cli/_commands/init.command.js +147 -0
  16. package/build/src/_cli/_commands/read.command.js +109 -0
  17. package/build/src/_cli/_commands/scan-projects.command.js +138 -0
  18. package/build/src/_cli/_commands/scan.command.js +98 -0
  19. package/build/src/_cli/_commands/seed.command.js +40 -0
  20. package/build/src/_cli/_commands/serve.command.js +350 -0
  21. package/build/src/_cli/_commands/start.command.js +134 -0
  22. package/build/src/_cli/_commands/stats.command.js +54 -0
  23. package/build/src/_cli/_commands/write.command.js +103 -0
  24. package/build/src/_cli/_models/interfaces/fam-cli-global-options.interface.js +2 -0
  25. package/build/src/_cli/_models/interfaces/fam-cli-output.interface.js +9 -0
  26. package/build/src/_cli/_models/interfaces/fam-client-result.interface.js +2 -0
  27. package/build/src/_cli/_services/fam-client.service.js +140 -0
  28. package/build/src/_cli/register-commands.js +86 -0
  29. package/build/src/_collections/config-catalog.const.js +67 -1
  30. package/build/src/_collections/fam-console.util.js +367 -0
  31. package/build/src/_collections/fam-entry-bootstrap.util.js +158 -4
  32. package/build/src/_collections/fam-error-factory.util.js +0 -9
  33. package/build/src/_collections/fam-mcp-bridge.util.js +49 -0
  34. package/build/src/_collections/fam-reference-code.util.js +105 -0
  35. package/build/src/_collections/fam-version.const.js +10 -0
  36. package/build/src/_models/data-models/fam-entry-base-properties.const.js +1 -0
  37. package/build/src/_models/data-models/fam-entry.data-model.js +6 -0
  38. package/build/src/_models/data-models/fam-ingest-run.data-model.js +3 -1
  39. package/build/src/_models/data-models/fam-reference.data-model.js +7 -0
  40. package/build/src/_modules/capture/_collections/fam-capture.const.js +11 -0
  41. package/build/src/_modules/capture/_services/fam-auto-capture.control-service.js +87 -0
  42. package/build/src/_modules/capture/index.js +8 -0
  43. package/build/src/_modules/embedding/_collections/fam-embedding-prefix.util.js +77 -0
  44. package/build/src/_modules/embedding/_services/fam-duplicate-scan.control-service.js +202 -0
  45. package/build/src/_modules/embedding/_services/fam-embedding-pipeline.control-service.js +33 -9
  46. package/build/src/_modules/embedding/_services/fam-embedding.control-service.js +21 -2
  47. package/build/src/_modules/embedding/_services/fam-entry.data-service.js +135 -0
  48. package/build/src/_modules/embedding/_services/fam-vector-search.control-service.js +42 -32
  49. package/build/src/_modules/embedding/index.js +4 -1
  50. package/build/src/_modules/export/_collections/fam-export.const.js +22 -0
  51. package/build/src/_modules/export/_services/fam-export.control-service.js +64 -0
  52. package/build/src/_modules/export/index.js +8 -0
  53. package/build/src/_modules/ingest/_collections/fam-famignore.util.js +83 -0
  54. package/build/src/_modules/ingest/_collections/fam-file-routing.util.js +59 -48
  55. package/build/src/_modules/ingest/_collections/fam-project-identity.util.js +134 -0
  56. package/build/src/_modules/ingest/_collections/fam-scan-progress.util.js +57 -0
  57. package/build/src/_modules/ingest/_collections/fam-scan-summary.util.js +60 -0
  58. package/build/src/_modules/ingest/_collections/fam-scan-weight.util.js +53 -0
  59. package/build/src/_modules/ingest/_collections/fam-secret-exclude.util.js +37 -14
  60. package/build/src/_modules/ingest/_collections/fam-sliding-chunker.util.js +34 -0
  61. package/build/src/_modules/ingest/_collections/fam-ts-chunker.util.js +200 -14
  62. package/build/src/_modules/ingest/_services/fam-delta-compare.util.js +4 -1
  63. package/build/src/_modules/ingest/_services/fam-ingest-run.data-service.js +7 -4
  64. package/build/src/_modules/ingest/_services/fam-ingest.control-service.js +346 -17
  65. package/build/src/_modules/ingest/_services/fam-scan.control-service.js +25 -2
  66. package/build/src/_modules/ingest/index.js +3 -1
  67. package/build/src/_modules/mcp/_collections/fam-active-rules.util.js +56 -0
  68. package/build/src/_modules/mcp/_collections/fam-core-tools.const.js +47 -6
  69. package/build/src/_modules/mcp/_services/fam-capabilities-tool.service.js +4 -4
  70. package/build/src/_modules/mcp/_services/fam-capability-registry.service.js +224 -18
  71. package/build/src/_modules/mcp/_services/fam-mcp-adapter.service.js +4 -4
  72. package/build/src/_modules/mcp/_services/fam-mcp-server.service.js +4 -4
  73. package/build/src/_modules/mcp/_services/fam-read-tool.service.js +53 -1
  74. package/build/src/_modules/mcp/_services/fam-write-tool.service.js +104 -8
  75. package/build/src/_modules/mcp/index.js +4 -4
  76. package/build/src/_modules/migration/_collections/fam-claude-mem-normalize.util.js +66 -3
  77. package/build/src/_modules/migration/_collections/fam-prompt-aggregate.util.js +143 -0
  78. package/build/src/_modules/migration/_collections/fam-target-mapping.util.js +19 -0
  79. package/build/src/_modules/migration/_enums/fam-claude-mem-source.type-enum.js +6 -0
  80. package/build/src/_modules/migration/_models/interfaces/fam-claude-mem.interface.js +5 -0
  81. package/build/src/_modules/migration/_services/fam-agent-memory-reader.service.js +125 -0
  82. package/build/src/_modules/migration/_services/fam-claude-mem-import.control-service.js +101 -18
  83. package/build/src/_modules/migration/_services/fam-import-dedup.data-service.js +53 -0
  84. package/build/src/_modules/migration/index.js +3 -1
  85. package/build/src/_modules/retrieval/_services/fam-retrieval-candidate.data-service.js +78 -4
  86. package/build/src/_modules/retrieval/_services/fam-retrieval.control-service.js +293 -50
  87. package/build/src/_modules/scope-reference/_collections/fam-scope-normalize.util.js +6 -3
  88. package/build/src/_modules/scope-reference/_services/fam-reference.data-service.js +18 -0
  89. package/build/src/_modules/scope-reference/_services/fam-scope-resolver.control-service.js +79 -20
  90. package/build/src/_routes/server/api/api.controller.js +34 -2
  91. package/build/src/_routes/server/client-app/client-app.control-service.js +1 -1
  92. package/build/src/_routes/server/server-status/server-status.controller.js +2 -1
  93. package/build/src/app.server.js +13 -1
  94. package/build/src/environments/environment.js +1 -1
  95. package/build/src/index.js +1 -1
  96. package/client-dist/{chunk-GHKRM4SM.js → chunk-I77GXVAQ.js} +1 -1
  97. package/client-dist/{chunk-LMTL7GA3.js → chunk-YXHWCJ5O.js} +1 -1
  98. package/client-dist/index.html +1 -1
  99. package/client-dist/{main-2KWB3QYK.js → main-PJPEDVJT.js} +1 -1
  100. package/package.json +6 -5
@@ -0,0 +1,134 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FAM_Start_Util = void 0;
4
+ const child_process_1 = require("child_process");
5
+ const fs_1 = require("fs");
6
+ const path_1 = require("path");
7
+ const commander_1 = require("commander");
8
+ const fam_output_util_1 = require("../_collections/fam-output.util");
9
+ const fam_cli_const_1 = require("../_collections/fam-cli.const");
10
+ /**
11
+ * `fam start` — az MCP-szerver indítása **stdio** transporton (dsgn-010 §6, dsgn-003 §1). A szerver a
12
+ * `build/src/index.js start`-on indul (a 3 hirdetett eszközzel: read/write/capabilities). stdio módban a
13
+ * **stdout a JSON-RPC csatorna** → minden CLI-/szerver-log a **stderr**-re; a `--json` itt NEM értelmezett
14
+ * (a transport maga JSON-RPC). A CLI maga NEM daemonizál (a process-menedzsment a hívóé / az MCP-kliensé).
15
+ *
16
+ * A szerver-belépő feloldása (a publikus boundary szerint a CLI NEM importálja a szerver-kódot, csak
17
+ * spawn-olja): a `FAM_SERVER_ENTRY` env, különben a node_modules-beli telepített
18
+ * `@futdevpro/fdp-agent-memory/build/src/index.js`, különben a repo-relatív `../server/build/src/index.js`.
19
+ *
20
+ * A `start-server` setup-alias erre delegál (dsgn-010 §10).
21
+ */
22
+ class FAM_Start_Util {
23
+ /** A `start` parancs-deszkriptor. */
24
+ static command() {
25
+ const command = new commander_1.Command('start');
26
+ command
27
+ .description('Az MCP-szerver indítása stdio-transporton (read/write/capabilities)')
28
+ .option('--transport <stdio>', 'transport (MVP1: csak stdio)', 'stdio')
29
+ .option('--mongodb-uri <uri>', 'Mongo connection string (env-felülírás)')
30
+ .option('--db-name <name>', 'Mongo DB-név (env-felülírás)')
31
+ .option('--log-level <level>', 'log-szint')
32
+ .action(async () => {
33
+ fam_output_util_1.FAM_Output_Util.exit(await FAM_Start_Util.run(command));
34
+ });
35
+ return command;
36
+ }
37
+ /** A `start-server` delegáló alias (dsgn-010 §10) — a `start`-ra fut. */
38
+ static aliasCommand(aliasName) {
39
+ const command = new commander_1.Command(aliasName);
40
+ command
41
+ .description('(alias) a `fam start` — MCP-szerver stdio-n')
42
+ .option('--transport <stdio>', 'transport (MVP1: csak stdio)', 'stdio')
43
+ .option('--mongodb-uri <uri>', 'Mongo connection string')
44
+ .option('--db-name <name>', 'Mongo DB-név')
45
+ .option('--log-level <level>', 'log-szint')
46
+ .action(async () => {
47
+ fam_output_util_1.FAM_Output_Util.exit(await FAM_Start_Util.run(command));
48
+ });
49
+ return command;
50
+ }
51
+ /** A szerver-process spawn-olása (`node <entry> start`); a CLI a process-exit-kódját örökli. */
52
+ static async run(command) {
53
+ const globals = command.optsWithGlobals();
54
+ const local = command.opts();
55
+ const entry = FAM_Start_Util.resolveServerEntry();
56
+ if (!entry) {
57
+ return fam_output_util_1.FAM_Output_Util.failure({
58
+ options: globals,
59
+ command: 'start',
60
+ error: {
61
+ errorCode: 'FAM-CLI-START-001',
62
+ message: 'A FAM szerver-belépő nem található (build/src/index.js).',
63
+ fixHint: 'Buildeld a szervert (`cd server && pnpm run build-base`), vagy állítsd be a `FAM_SERVER_ENTRY` env-et.',
64
+ },
65
+ });
66
+ }
67
+ const childEnv = { ...process.env };
68
+ if (local.mongodbUri) {
69
+ childEnv.MONGODB_URI = local.mongodbUri;
70
+ }
71
+ if (local.dbName) {
72
+ childEnv.MONGODB_DB_NAME = local.dbName;
73
+ }
74
+ if (local.logLevel) {
75
+ childEnv.LOG_LEVEL = local.logLevel;
76
+ }
77
+ // FAM-REV-062: a vektor-pool boot-hidratálása (sok ezer 2560-dim vektor) memória-igényes; a nagy
78
+ // korpuszon (teljes CURSOR felé) a default ~4GB heap OOM-közelbe ér (igazolt heap-WARNING 93%). A
79
+ // spawnolt szerver heap-plafonját megemeljük (`--max-old-space-size`, MB). Hangolható: `FAM_MAX_OLD_SPACE_MB`
80
+ // (default 8192); `0`/üres → node-default (constrained gépeken). A flag a SCRIPT ELŐTT kell (node-CLI flag).
81
+ const nodeArgs = [];
82
+ const heapMb = FAM_Start_Util.resolveHeapMb();
83
+ if (heapMb > 0) {
84
+ nodeArgs.push(`--max-old-space-size=${heapMb}`);
85
+ fam_output_util_1.FAM_Output_Util.logInfo(globals, `FAM szerver heap-plafon: --max-old-space-size=${heapMb}MB (FAM_MAX_OLD_SPACE_MB).`);
86
+ }
87
+ fam_output_util_1.FAM_Output_Util.logInfo(globals, `FAM szerver indítása (stdio): node ${nodeArgs.join(' ')} ${entry} start`);
88
+ // stdio: a child stdin/stdout a JSON-RPC csatorna (inherit), a stderr is inherit (logok).
89
+ const child = (0, child_process_1.spawn)(process.execPath, [...nodeArgs, entry, 'start'], {
90
+ stdio: 'inherit',
91
+ env: childEnv,
92
+ });
93
+ return new Promise((resolvePromise) => {
94
+ child.on('error', (spawnError) => {
95
+ fam_output_util_1.FAM_Output_Util.logError(`✗ A szerver-process nem indítható: ${spawnError.message}`);
96
+ resolvePromise(fam_cli_const_1.FAM_CliExitCode.operationError);
97
+ });
98
+ child.on('exit', (code) => {
99
+ resolvePromise(code === 0 || code === null ? fam_cli_const_1.FAM_CliExitCode.ok : fam_cli_const_1.FAM_CliExitCode.operationError);
100
+ });
101
+ });
102
+ }
103
+ /**
104
+ * A spawnolt szerver heap-plafonja MB-ban (FAM-REV-062). `FAM_MAX_OLD_SPACE_MB` env felülírja; default 8192.
105
+ * `0` (vagy nem-pozitív / nem-szám) → 0 (= ne adjunk flag-et, node-default heap — constrained gépeken hasznos).
106
+ */
107
+ static resolveHeapMb() {
108
+ const raw = process.env.FAM_MAX_OLD_SPACE_MB;
109
+ if (raw === undefined || raw.trim() === '') {
110
+ return 16384;
111
+ }
112
+ const parsed = Number(raw);
113
+ return Number.isFinite(parsed) && parsed > 0 ? Math.floor(parsed) : 0;
114
+ }
115
+ /** A szerver-belépő feloldása (env → resolve → repo-relatív; a publikus boundary szerint spawn, nem import). */
116
+ static resolveServerEntry() {
117
+ const fromEnv = process.env.FAM_SERVER_ENTRY;
118
+ if (fromEnv && (0, fs_1.existsSync)(fromEnv)) {
119
+ return fromEnv;
120
+ }
121
+ // A build-layout (tsconfig `rootDir: ./src` → `build/_commands/start.command.js`): a `__dirname`
122
+ // futás-időben `<cli>/build/_commands`, így a CLI-gyökér 2, a repo-gyökér 3 szint feljebb.
123
+ const candidates = [
124
+ // A telepített publikus package belépője (a `@futdevpro/fdp-agent-memory` bin) — a CLI
125
+ // node_modules-jában (a workspace-ben szibling-csomagként).
126
+ (0, path_1.resolve)(__dirname, '../../node_modules/@futdevpro/fdp-agent-memory/build/src/index.js'),
127
+ // Repo-relatív fallback (a CLI build-jéből a sibling server/).
128
+ (0, path_1.resolve)(__dirname, '../../../server/build/src/index.js'),
129
+ (0, path_1.resolve)(process.cwd(), 'server/build/src/index.js'),
130
+ ];
131
+ return candidates.find((candidate) => (0, fs_1.existsSync)(candidate));
132
+ }
133
+ }
134
+ exports.FAM_Start_Util = FAM_Start_Util;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FAM_Stats_Util = void 0;
4
+ const commander_1 = require("commander");
5
+ const fam_output_util_1 = require("../_collections/fam-output.util");
6
+ const fam_client_service_1 = require("../_services/fam-client.service");
7
+ const fam_cli_const_1 = require("../_collections/fam-cli.const");
8
+ /**
9
+ * `fam stats` — a high-level stats aggregátum CLI-tükre (dsgn-010 §11.2, dsgn-011 §3). `--table` nélkül
10
+ * minden fő tár (`GET /api/stats`: elem-szám, embedding-státusz, utolsó ingest, üres/ok jelzés);
11
+ * `--table <t>` az adott tár részletei (`GET /api/stats/:table`); `--scopes` a scope-fát kérné a
12
+ * capability-eszközről (`get_scope_tree`, late-bind MP-12 → addig jelzett).
13
+ */
14
+ class FAM_Stats_Util {
15
+ /** A `stats` parancs-deszkriptor. */
16
+ static command() {
17
+ const command = new commander_1.Command('stats');
18
+ command
19
+ .description('Tár- és scope-szintű statisztika (count/ingest/vektor-státusz/embedding-költség)')
20
+ .option('--table <table>', 'egy tár részletes statja')
21
+ .option('--scopes', 'scope-fa + layer-statisztikák (get_scope_tree)', false)
22
+ .action(async () => {
23
+ fam_output_util_1.FAM_Output_Util.exit(await FAM_Stats_Util.run(command));
24
+ });
25
+ return command;
26
+ }
27
+ /** A `stats` futtatása: `--table`/`--scopes` → a megfelelő REST/capability-hívás. */
28
+ static async run(command) {
29
+ const globals = command.optsWithGlobals();
30
+ const local = command.opts();
31
+ const client = new fam_client_service_1.FAM_CliClient_Service(globals.serverUrl);
32
+ if (local.scopes) {
33
+ // A scope-fa a capability-eszközön át (a `/api/stats` REST nem adja).
34
+ const scopeResult = await client.post('/api/capabilities', { action: 'invoke', name: 'get_scope_tree' });
35
+ return FAM_Stats_Util.render(globals, scopeResult);
36
+ }
37
+ const path = local.table ? `/api/stats/${encodeURIComponent(local.table)}` : '/api/stats';
38
+ const result = await client.get(path);
39
+ return FAM_Stats_Util.render(globals, result);
40
+ }
41
+ /** Közös render (unreachable → 3, egyébként 1/0). */
42
+ static render(globals, result) {
43
+ if (!result.ok) {
44
+ return fam_output_util_1.FAM_Output_Util.failure({
45
+ options: globals,
46
+ command: 'stats',
47
+ error: result.error ?? { errorCode: 'FAM-CLI-STATS-001', message: 'Ismeretlen stats-hiba.' },
48
+ exitCode: result.unreachable ? fam_cli_const_1.FAM_CliExitCode.serverUnreachable : fam_cli_const_1.FAM_CliExitCode.operationError,
49
+ });
50
+ }
51
+ return fam_output_util_1.FAM_Output_Util.success({ options: globals, command: 'stats', data: result.data });
52
+ }
53
+ }
54
+ exports.FAM_Stats_Util = FAM_Stats_Util;
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FAM_Write_Util = void 0;
4
+ const fs_1 = require("fs");
5
+ const commander_1 = require("commander");
6
+ const fam_arg_util_1 = require("../_collections/fam-arg.util");
7
+ const fam_output_util_1 = require("../_collections/fam-output.util");
8
+ const fam_client_service_1 = require("../_services/fam-client.service");
9
+ const fam_cli_const_1 = require("../_collections/fam-cli.const");
10
+ /** A scope-kötelező write-műveletek (dsgn-002 §3.2). */
11
+ const SCOPE_REQUIRED_OPERATIONS = [
12
+ 'create', 'scan-file', 'scan-folder', 'scan-project', 'import',
13
+ ];
14
+ /**
15
+ * `fam write` — a dsgn-003 §3 `write` MCP-tool / `POST /api/write` REST CLI-tükre (dsgn-010 §7.2).
16
+ * MINDIG pontosan **1** `--table`; a `--scope` KÖTELEZŐ `create`/`scan-*`/`import`-nál. A `delete`
17
+ * soft-delete default (dsgn-001 §8). A CLI csak flag→server-input map (nincs külön write-logika).
18
+ */
19
+ class FAM_Write_Util {
20
+ /** A `write` parancs-deszkriptor. */
21
+ static command() {
22
+ const command = new commander_1.Command('write');
23
+ command
24
+ .description('Explicit, 1-táras írás (create/update/delete/scan-*/re-embed/import; dsgn-003 §3). '
25
+ + '⚠️ scan-folder/scan-project ELŐTT: `.fdpfamignore` a scan-gyökérbe + ellenőrzés `--scan-dry-run`-nal '
26
+ + '(vagy használd a `fam scan` parancsot, ott a részletes figyelmeztetés) — tisztán szkennelni olcsóbb.')
27
+ .requiredOption('--table <table>', 'pontosan egy fő tár (vagy reference)')
28
+ .requiredOption('--operation <op>', 'create|update|delete|scan-file|scan-folder|scan-project|re-embed|import')
29
+ .option('--scope <layer=name,...>', 'scope-lánc (KÖTELEZŐ create/scan-*/import-nál)')
30
+ .option('--kind <kind>', 'kind')
31
+ .option('--tags <tag,...>', 'tagek')
32
+ .option('--weight <f>', 'retrieval-súly')
33
+ .option('--importance <f>', 'kvalitatív hangsúly (0..1)')
34
+ .option('--content <text>', 'inline tartalom (create/update)')
35
+ .option('--file <path>', 'tartalom fájlból (create/update)')
36
+ .option('--target-by <id|sourceFilePath|query>', 'update/delete cél-azonosítás módja')
37
+ .option('--target-value <v>', 'update/delete cél-azonosító érték')
38
+ .option('--dry-run', 'nem ír, csak a tervezett hatást jelzi', false)
39
+ .action(async () => {
40
+ fam_output_util_1.FAM_Output_Util.exit(await FAM_Write_Util.run(command));
41
+ });
42
+ return command;
43
+ }
44
+ /** A `write` futtatása: a flag-ek → `POST /api/write` input + scope-kötelezőség-ellenőrzés. */
45
+ static async run(command) {
46
+ const globals = command.optsWithGlobals();
47
+ const local = command.opts();
48
+ const scopePath = fam_arg_util_1.FAM_Arg_Util.parseScope(local.scope);
49
+ if (SCOPE_REQUIRED_OPERATIONS.includes(local.operation) && !scopePath) {
50
+ return fam_output_util_1.FAM_Output_Util.failure({
51
+ options: globals,
52
+ command: 'write',
53
+ error: {
54
+ errorCode: 'FAM-CLI-WRITE-001',
55
+ message: `A(z) '${local.operation}' művelethez --scope KÖTELEZŐ (dsgn-002 §3.2).`,
56
+ fixHint: 'Add meg pl.: --scope "organization=FutDevPro,project=Adventor"',
57
+ },
58
+ });
59
+ }
60
+ let content = local.content;
61
+ if (local.file) {
62
+ try {
63
+ content = (0, fs_1.readFileSync)(local.file, 'utf-8');
64
+ }
65
+ catch (fileError) {
66
+ return fam_output_util_1.FAM_Output_Util.failure({
67
+ options: globals,
68
+ command: 'write',
69
+ error: {
70
+ errorCode: 'FAM-CLI-WRITE-002',
71
+ message: `A --file nem olvasható: ${local.file} (${fileError.message}).`,
72
+ },
73
+ });
74
+ }
75
+ }
76
+ const body = {
77
+ table: local.table,
78
+ operation: local.operation,
79
+ scopePath: scopePath,
80
+ kind: local.kind,
81
+ tags: fam_arg_util_1.FAM_Arg_Util.parseList(local.tags),
82
+ content: content,
83
+ weight: local.weight ? Number(local.weight) : undefined,
84
+ importance: local.importance ? Number(local.importance) : undefined,
85
+ target: local.targetBy && local.targetValue
86
+ ? { by: local.targetBy, value: local.targetValue }
87
+ : undefined,
88
+ scan: local.dryRun ? { path: '', dryRun: true } : undefined,
89
+ };
90
+ const client = new fam_client_service_1.FAM_CliClient_Service(globals.serverUrl);
91
+ const result = await client.post('/api/write', body);
92
+ if (!result.ok) {
93
+ return fam_output_util_1.FAM_Output_Util.failure({
94
+ options: globals,
95
+ command: 'write',
96
+ error: result.error ?? { errorCode: 'FAM-CLI-WRITE-003', message: 'Ismeretlen write-hiba.' },
97
+ exitCode: result.unreachable ? fam_cli_const_1.FAM_CliExitCode.serverUnreachable : fam_cli_const_1.FAM_CliExitCode.operationError,
98
+ });
99
+ }
100
+ return fam_output_util_1.FAM_Output_Util.success({ options: globals, command: 'write', data: result.data });
101
+ }
102
+ }
103
+ exports.FAM_Write_Util = FAM_Write_Util;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ /**
3
+ * A CLI egységes kimenet- és hiba-shape-jei (dsgn-010 §3/§12). Egy fájlban a szorosan összetartozó
4
+ * burok-/hiba-interfészek (a `*.interface.ts` az egy-export-per-file konvenció ismert kivétele).
5
+ *
6
+ * Minden `--json` parancs-kimenet a `FAM_CliEnvelope` burokban jelenik meg a stdout-on (és semmi más a
7
+ * stdout-on); minden log/diag a stderr-re megy, hogy a `… --json | jq` pipe tiszta legyen.
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,140 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FAM_CliClient_Service = void 0;
4
+ const fam_cli_const_1 = require("../_collections/fam-cli.const");
5
+ /**
6
+ * `FAM_CliClient_Service` — a CLI → szerver elérési réteg (dsgn-010 §9). A `read`/`write`/`scan`/
7
+ * `stats`/`errors`/`config`/`capabilities` parancsok ezen át hívják a futó szerver REST-felületét
8
+ * (`FAM_SERVER_URL`/`--server-url`, default `http://127.0.0.1:39265`), így öröklik a szerver
9
+ * Mongo-kapcsolatát + hidratált vektor-pool-ját.
10
+ *
11
+ * **Elérhetőség (dsgn-010 §9):** ha a remote szerver nem elérhető → `unreachable:true` (a hívó exit `3`
12
+ * + fix-tipp). **Hiba-átvitel (dsgn-008):** a server `{ ok:false, error:{errorCode,message} }` testjét a
13
+ * CLI NEM nyeli el — a `FAM_ClientResult.error`-ba viszi tovább.
14
+ *
15
+ * > MVP1: a dsgn-010 §9 **embedded one-shot** fallback (in-process `App`) NINCS bekötve a CLI-be (a
16
+ * > szerver `App` boundary-okból nem importálható a publikus CLI-ből; lásd a riport "deferred"
17
+ * > szekcióját) — a data-parancsok a remote utat használják, és elérhetetlen szervernél tiszta exit `3`-at
18
+ * > + fix-tippet adnak (`fam start`). A `doctor` env-szintű al-checkjei szerver nélkül is futnak.
19
+ */
20
+ class FAM_CliClient_Service {
21
+ /** A feloldott base-URL (a `/api`/`/server` útak elé). */
22
+ baseUrl;
23
+ /**
24
+ * @param serverUrlOverride a `--server-url` flag (felülírja az env-et); ha nincs, az env
25
+ * `FAM_SERVER_URL`, különben a `FAM_DEFAULT_SERVER_URL`.
26
+ */
27
+ constructor(serverUrlOverride) {
28
+ const raw = serverUrlOverride || process.env.FAM_SERVER_URL || fam_cli_const_1.FAM_DEFAULT_SERVER_URL;
29
+ this.baseUrl = raw.replace(/\/+$/, '');
30
+ }
31
+ /** A feloldott szerver base-URL (a fix-tippekhez / diaghoz). */
32
+ getBaseUrl() {
33
+ return this.baseUrl;
34
+ }
35
+ /**
36
+ * Elérhetőség-próba a `GET /api/health`-en (dsgn-010 §9). `true`, ha a szerver válaszol `2xx`-szel.
37
+ * Hibát NEM dob (a nem-elérhetőség normál állapot, amit a hívó exit `3`-ra fordít). **Timeout** (default
38
+ * 2000ms, `timeoutMs`-szel állítható): egy fél-halott / nem-válaszoló primary NE akassza meg határtalanul
39
+ * a hívót (pl. a `fam start` PRIMARY-vs-BRIDGE döntését) — timeout/abort → `false` (nem elérhető).
40
+ */
41
+ async isReachable(timeoutMs = 2000) {
42
+ const controller = new AbortController();
43
+ const timer = setTimeout(() => controller.abort(), timeoutMs);
44
+ try {
45
+ const response = await fetch(`${this.baseUrl}/api/health`, { signal: controller.signal });
46
+ return response.ok;
47
+ }
48
+ catch {
49
+ return false;
50
+ }
51
+ finally {
52
+ clearTimeout(timer);
53
+ }
54
+ }
55
+ /** `GET <path>` (a `path` a base-URL utáni rész, pl. `/api/stats`). */
56
+ async get(path) {
57
+ return this.request('GET', path);
58
+ }
59
+ /** `POST <path>` JSON-body-val (pl. `/api/read`, `/api/write`, `/api/capabilities`). */
60
+ async post(path, body) {
61
+ return this.request('POST', path, body);
62
+ }
63
+ /** `PUT <path>` JSON-body-val (a `/api/config` set). */
64
+ async put(path, body) {
65
+ return this.request('PUT', path, body);
66
+ }
67
+ /**
68
+ * A közös HTTP-réteg: a server-választ `FAM_ClientResult`-tá fordítja. Elérhetetlen szerver →
69
+ * `unreachable:true`; a `{ ok:false, error }` test → `error` átvitel; egyéb non-2xx → szintetikus
70
+ * `FAM_CLI-HTTP-001` (nem néma); siker → `data`.
71
+ */
72
+ async request(method, path, body) {
73
+ const url = `${this.baseUrl}${path}`;
74
+ let response;
75
+ try {
76
+ response = await fetch(url, {
77
+ method: method,
78
+ headers: body === undefined ? {} : { 'content-type': 'application/json' },
79
+ body: body === undefined ? undefined : JSON.stringify(body),
80
+ });
81
+ }
82
+ catch (networkError) {
83
+ return {
84
+ ok: false,
85
+ unreachable: true,
86
+ error: {
87
+ errorCode: 'FAM-CLI-CLIENT-003',
88
+ message: `A FAM szerver elérhetetlen: ${url} (${networkError.message}).`,
89
+ fixHint: 'Indítsd a szervert (`fam start`), vagy adj `--server-url`-t / `FAM_SERVER_URL`-t.',
90
+ },
91
+ };
92
+ }
93
+ const payload = await this.parseBody(response);
94
+ if (!response.ok) {
95
+ return { ok: false, error: this.extractError(payload, response.status) };
96
+ }
97
+ // A szerver `{ ok:false, error }` testet is adhat 2xx-szel (a `/config` set / capabilities-invoke);
98
+ // ezt is hiba-átvitelnek vesszük (dsgn-008, nem nyeljük el).
99
+ if (this.isServerErrorBody(payload)) {
100
+ return { ok: false, error: this.extractError(payload, response.status) };
101
+ }
102
+ return { ok: true, data: payload };
103
+ }
104
+ /** A válasz-body JSON-ként (vagy `null`, ha üres/nem-JSON — nem dob). */
105
+ async parseBody(response) {
106
+ const text = await response.text();
107
+ if (!text) {
108
+ return null;
109
+ }
110
+ try {
111
+ return JSON.parse(text);
112
+ }
113
+ catch {
114
+ return { __raw: text };
115
+ }
116
+ }
117
+ /** `true`, ha a payload a server `{ ok:false, error }` hibatestje. */
118
+ isServerErrorBody(payload) {
119
+ if (!payload || typeof payload !== 'object') {
120
+ return false;
121
+ }
122
+ const candidate = payload;
123
+ return candidate.ok === false && typeof candidate.error === 'object' && candidate.error !== null;
124
+ }
125
+ /** A server-hibatest → `FAM_CliError` (vagy szintetikus HTTP-hiba, ha a test nem strukturált). */
126
+ extractError(payload, status) {
127
+ if (this.isServerErrorBody(payload)) {
128
+ const serverError = payload.error;
129
+ return {
130
+ errorCode: typeof serverError.errorCode === 'string' ? serverError.errorCode : 'FAM-CLI-HTTP-001',
131
+ message: typeof serverError.message === 'string' ? serverError.message : `HTTP ${status}.`,
132
+ };
133
+ }
134
+ return {
135
+ errorCode: 'FAM-CLI-HTTP-001',
136
+ message: `A szerver HTTP ${status}-t adott (nem strukturált hibatest).`,
137
+ };
138
+ }
139
+ }
140
+ exports.FAM_CliClient_Service = FAM_CliClient_Service;
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.registerFAMCommands = registerFAMCommands;
4
+ const read_command_1 = require("./_commands/read.command");
5
+ const write_command_1 = require("./_commands/write.command");
6
+ const scan_command_1 = require("./_commands/scan.command");
7
+ const scan_projects_command_1 = require("./_commands/scan-projects.command");
8
+ const config_command_1 = require("./_commands/config.command");
9
+ const stats_command_1 = require("./_commands/stats.command");
10
+ const find_duplicates_command_1 = require("./_commands/find-duplicates.command");
11
+ const errors_command_1 = require("./_commands/errors.command");
12
+ const init_command_1 = require("./_commands/init.command");
13
+ const doctor_command_1 = require("./_commands/doctor.command");
14
+ const start_command_1 = require("./_commands/start.command");
15
+ const serve_command_1 = require("./_commands/serve.command");
16
+ const seed_command_1 = require("./_commands/seed.command");
17
+ const import_command_1 = require("./_commands/import.command");
18
+ const export_command_1 = require("./_commands/export.command");
19
+ const capture_command_1 = require("./_commands/capture.command");
20
+ /**
21
+ * Regisztrálja az összes FDP Agent Memory-specifikus CLI command-ot (dsgn-010 §2 `buildCli()`).
22
+ *
23
+ * A scaffold-minta szerint a globális `program` singleton-re fűzünk (a `registerDynamoCommands` generikus
24
+ * parancsai mellé): először a globális opció-keret (`--json` / `--server-url` / `--quiet`), majd a **10
25
+ * parancs-csoport** (`init`/`doctor`/`start`/`read`/`write`/`scan`/`import`/`config`/`stats`/`errors`) és a
26
+ * **7 delegáló setup-alias** (`validate-env`/`test-db`/`test-embedding`/`create-config`/`migrate`/
27
+ * `seed-example`/`start-server`). Az alias-ok NEM duplikálnak logikát — a gazdaparancs al-checkjére/
28
+ * lépésére delegálnak (dsgn-010 §10).
29
+ *
30
+ * Minden parancs-csoport egy `{Group}_Util` (egy-export-per-file `*.command.ts`); a globális opciókat a
31
+ * sub-command-handler-ek a `optsWithGlobals()`-ból olvassák.
32
+ */
33
+ function registerFAMCommands(program, version) {
34
+ void version;
35
+ // --- Globális opció-keret (dsgn-010 §3): a stdout-tisztaság + a remote-elérés + a csendes mód. ---
36
+ program
37
+ .option('--json', 'gépi-olvasható JSON kimenet (minden parancsra)', false)
38
+ .option('--server-url <url>', 'FAM szerver REST URL (env: FAM_SERVER_URL)')
39
+ .option('--quiet', 'csak hibák a stderr-re', false);
40
+ // --- A 10 parancs-csoport + 7 delegáló setup-alias (dsgn-010 §13/1, §2/§10). ---
41
+ const famCommands = [
42
+ // 10 parancs-csoport.
43
+ init_command_1.FAM_Init_Util.command(),
44
+ doctor_command_1.FAM_Doctor_Util.command(),
45
+ start_command_1.FAM_Start_Util.command(),
46
+ serve_command_1.FAM_Serve_Util.command(),
47
+ read_command_1.FAM_Read_Util.command(),
48
+ write_command_1.FAM_Write_Util.command(),
49
+ scan_command_1.FAM_Scan_Util.command(),
50
+ scan_projects_command_1.FAM_ScanProjects_Util.command(),
51
+ import_command_1.FAM_Import_Util.command(),
52
+ export_command_1.FAM_Export_Util.command(),
53
+ capture_command_1.FAM_Capture_Util.command(),
54
+ config_command_1.FAM_Config_Util.command(),
55
+ stats_command_1.FAM_Stats_Util.command(),
56
+ find_duplicates_command_1.FAM_FindDuplicates_Util.command(),
57
+ errors_command_1.FAM_Errors_Util.command(),
58
+ // 7 delegáló alias (README copy-paste-elhetőség, nincs külön logika; dsgn-010 §10).
59
+ doctor_command_1.FAM_Doctor_Util.aliasCommand('validate-env', ['env']),
60
+ doctor_command_1.FAM_Doctor_Util.aliasCommand('test-db', ['mongodb']),
61
+ doctor_command_1.FAM_Doctor_Util.aliasCommand('test-embedding', ['embedding']),
62
+ init_command_1.FAM_Init_Util.configScaffoldAlias('create-config'),
63
+ import_command_1.FAM_Import_Util.aliasCommand('migrate'),
64
+ seed_command_1.FAM_Seed_Util.command('seed-example'),
65
+ start_command_1.FAM_Start_Util.aliasCommand('start-server'),
66
+ ];
67
+ for (const command of famCommands) {
68
+ applyExitMapping(command);
69
+ program.addCommand(command);
70
+ }
71
+ }
72
+ /**
73
+ * A dsgn-010 §3 exit-kód-mapping rákötése egy FAM parancsra ÉS minden al-parancsára (rekurzívan): a
74
+ * commander használati/argument-hibái `2`-vel lépnek ki (a parancs-handler-ek `0`/`1`/`3` kódjait a
75
+ * `process.exitCode` adja, ezeket nem érinti). A root `program` saját override-ja a top-level hibákat
76
+ * fedi; ez a sub-command-okat (pl. `config get`, `import claude-mem`) is befedi.
77
+ */
78
+ function applyExitMapping(command) {
79
+ command.exitOverride((error) => {
80
+ const cleanExit = ['commander.help', 'commander.helpDisplayed', 'commander.version'];
81
+ process.exit(cleanExit.includes(error.code) ? 0 : 2);
82
+ });
83
+ for (const sub of command.commands) {
84
+ applyExitMapping(sub);
85
+ }
86
+ }
@@ -26,8 +26,28 @@ const GLOBAL_ONLY = [fam_config_level_type_enum_1.FAM_ConfigLevel.global];
26
26
  */
27
27
  exports.SCAN_IGNORE_PATTERNS_DEFAULT = [
28
28
  '**/node_modules/**', '**/.git/**', '**/build/**', '**/dist/**', '**/coverage/**',
29
- '**/*.min.js', '**/*.map', '**/.env', '**/.env.*', '**/*.pem', '**/*.key',
29
+ // Framework build-/futás-cache + generált kimenet (FAM-REV-056) — sosem forrás, gyakran minifikált/bináris-
30
+ // szerű (pl. az Angular `.angular/cache/.../babel-webpack` ezreket számláló, embed-timeout-ot okozó junk-ja).
31
+ '**/.angular/**', '**/.nx/**', '**/.cache/**', '**/.turbo/**', '**/.next/**', '**/.nuxt/**', '**/.svelte-kit/**',
32
+ // Generált report-ok / logok / teszt-artefaktumok (FAM-REV-057) — minifikált HTML / nagy JSON-log → embed-hang
33
+ // (pl. dynamo-ngx: 515KB playwright-report HTML, 320KB .dynamo/logs status.json, 173KB logs/cicd-report.json).
34
+ '**/playwright-report/**', '**/test-results/**', '**/.dynamo/**', '**/logs/**', '**/*.log', '**/*-report.json',
35
+ '**/*.min.js', '**/*.min.css', '**/*.map', '**/.env', '**/.env.*', '**/*.pem', '**/*.key',
30
36
  '**/*.secret', '**/secrets/**', '**/*.lock', '**/package-lock.json', '**/pnpm-lock.yaml',
37
+ // Python (L4) — bytecode/venv/teszt-/lint-cache + telepített csomagok (SOHA nem forrás; a `*.pyc`/`*.pyo`
38
+ // amúgy a binary-routing kizárja, de a mappa-szintű ignore a bejárást is megspórolja). A `src/`/`tests/`
39
+ // `.py` forrás MARAD.
40
+ '**/__pycache__/**', '**/.pytest_cache/**', '**/.mypy_cache/**', '**/.ruff_cache/**', '**/.tox/**',
41
+ '**/venv/**', '**/.venv/**', '**/site-packages/**', '**/*.egg-info/**', '**/.ipynb_checkpoints/**',
42
+ // C# / Unity (L5) — a Unity GENERÁLT cache-/build-/log-mappái (a `Library/` GB-os lehet!) + a generált
43
+ // projekt-fájlok + az asset-metaadat (`.meta`: assetenként EGY → óriási zaj). A `.cs` forrás az `Assets/`
44
+ // alatt MARAD. A mappa-nevek PascalCase-ek (Unity-konvenció), ezért EXPLICIT uppercase minták (a `logs`
45
+ // lowercase NEM matchelné a Unity `Logs/`-át).
46
+ '**/Library/**', '**/Temp/**', '**/Obj/**', '**/obj/**', '**/bin/**', '**/Logs/**', '**/Build/**', '**/Builds/**',
47
+ '**/.vs/**', '**/*.csproj', '**/*.sln', '**/*.meta', '**/*.unity', '**/*.prefab', '**/*.asset',
48
+ // A `.fdpfamignore` SAJÁT MAGÁT kizárja: ignore-spec-ként OLVASSUK (FAM_FamIgnore_Util.loadFromDir,
49
+ // a walk/routing megkerülésével), de SOHA nem ingesteljük content-ként (a router amúgy is skip-elné).
50
+ '**/.fdpfamignore',
31
51
  ];
32
52
  /**
33
53
  * A teljes katalógus (dsgn-007 §4). A kulcsok dotted-formában; a `FAM_ConfigKey` típus ebből
@@ -39,6 +59,11 @@ exports.CONFIG_CATALOG = {
39
59
  type: 'number', default: 5, min: 1, max: 200, integer: true, levels: ALL_LEVELS,
40
60
  description: 'Alap visszaadott találat-szám (CCAP DEFAULT_TOP_K=5).',
41
61
  },
62
+ 'read.deepTopK': {
63
+ type: 'number', default: 25, min: 1, max: 200, integer: true, levels: ALL_LEVELS,
64
+ description: 'A `depth:"deep"` (mély feltárás) read-mód találat-száma: ennyit ad vissza, ha a query NEM '
65
+ + 'ad explicit topK-t. Sokkal több chunk/kontextus egy-egy mély feltáráshoz (a query topK felülírja).',
66
+ },
42
67
  'read.maxResults': {
43
68
  type: 'number', default: 50, min: 1, max: 500, integer: true, levels: ALL_LEVELS,
44
69
  description: 'A topK effektív felső korlátja (CCAP DEFAULT_PAGE_SIZE=50, cap 500).',
@@ -51,6 +76,22 @@ exports.CONFIG_CATALOG = {
51
76
  type: 'number', default: 0.0, min: 0.0, max: 1.0, levels: ALL_LEVELS,
52
77
  description: 'Minimum similarity-score küszöb (CCAP default 0 = nincs vágás).',
53
78
  },
79
+ 'read.relevanceFloor': {
80
+ type: 'number', default: 0.5, min: 0.0, max: 1.0, levels: ALL_LEVELS,
81
+ description: 'Confidence-padló a nyers cosine score-on: a relevancia-JELZÉSEK (totalRelevant / '
82
+ + 'denseResults / truncated / suggestions) CSAK az e fölötti hit-eket számolják „magabiztosan '
83
+ + 'relevánsnak". A returnedHits ettől függetlenül best-effort (recall). Ha a legjobb score is e '
84
+ + 'ALATT van → a read jelzi, hogy valószínűleg nincs lefedve (north-star). Modell-függő (qwen3 '
85
+ + 'zaj-padló ~0.44); állítsd a provider/modell szerint.',
86
+ },
87
+ 'read.importChunkWeight': {
88
+ type: 'number', default: 0.4, min: 0.0, max: 1.0, levels: ALL_LEVELS,
89
+ description: 'Az import-only chunkok (`chunkType:"imports"`) read-idejű rangsor-szorzója (FAM-REV-060). '
90
+ + 'A szimbólum-név query-knél az import-sorok (`import { X } from "./y"`) magas cosine-t kapnak, de '
91
+ + 'alacsony az ÉRTÉKük (csak import, nem definíció) → e szorzóval a `finalScore = score × weight × '
92
+ + 'importChunkWeight` a definíció-chunkok ALÁ rangsorolja őket. READ-time (nincs re-embed); a nyers '
93
+ + 'cosine score (relevancia-jelzések) NEM változik, csak a ranking. 1 = nincs csökkentés.',
94
+ },
54
95
  'read.denseResultRatio': {
55
96
  type: 'number', default: 2.0, min: 1.0, max: 50.0, levels: ALL_LEVELS,
56
97
  description: 'Dense-jelzés ratio-kapuja: totalRelevant >= ratio*topK → denseResults (dsgn-005 §4.2).',
@@ -125,6 +166,15 @@ exports.CONFIG_CATALOG = {
125
166
  type: 'number', default: 64, min: 1, max: 512, integer: true, levels: ALL_LEVELS,
126
167
  description: 'Embed-batch méret (token-/rate-limit védelem).',
127
168
  },
169
+ 'embedding.taskPrefixMode': {
170
+ type: 'string', default: 'auto', enumValues: ['auto', 'off', 'on'], levels: ALL_LEVELS,
171
+ description: 'Embedding task-prefix (FEAT-004): query/document aszimmetrikus prefix '
172
+ + '(`search_query:` / `search_document:`) instruction-tuned modelleknek (nomic-embed-*). '
173
+ + '`auto` = modell-név alapján (nomic→on, openai→off; a `mock` provider MINDIG kihagyva a '
174
+ + 'determinizmusért); `on` = erőltetve (a nomic-sémával); `off` = soha. A prefix ÉLESÍTI a '
175
+ + 'szeparációt + leszállítja a zaj-padlót (a 2026-06-20 live-teszt szerint nomic-nál ~0.5–0.63 '
176
+ + 'a nem-kapcsolódóknál is). A séma BE-/KIKAPCSOLÁSA `re-embed`-et igényel (a doc-oldal konzisztenciájához).',
177
+ },
128
178
  // --- 4.4. Embedding cost — cap + warn (fogyasztó: dsgn-006 / dsgn-008) ---
129
179
  'embedding.costCapUsd': {
130
180
  type: 'number-or-null', default: null, min: 0, levels: ALL_LEVELS,
@@ -155,6 +205,22 @@ exports.CONFIG_CATALOG = {
155
205
  type: 'boolean', default: false, levels: ALL_LEVELS,
156
206
  description: 'Symlink-követés (path-traversal védelem, dsgn-004).',
157
207
  },
208
+ 'scan.testFileWeight': {
209
+ type: 'number', default: 0.5, min: 0.0, max: 10.0, levels: ALL_LEVELS,
210
+ description: 'A teszt-/spec-fájlok (`*.spec.*` / `*.test.*`) DEFAULT retrieval-súlya (FAM-REV-058) — a próza-'
211
+ + 'nehéz specek különben az IMPLEMENTÁCIÓ fölé rangsorolnak. <1 → a forrás alá; explicit scan-`weights` '
212
+ + 'felülírja; 1 = nincs csökkentés.',
213
+ },
214
+ 'scan.estimateMsPerChunk': {
215
+ type: 'number', default: 250, min: 1, max: 10000, integer: true, levels: ALL_LEVELS,
216
+ description: 'A `dryRun` pre-scan idő-becsléshez: becsült embed-idő chunkonként (ms). DURVA, gép-/modell-/'
217
+ + 'provider-függő — a futó scan MÉRT ETA-ja pontosítja. Kalibráld a saját embedding-sebességedhez.',
218
+ },
219
+ 'scan.progressIntervalMs': {
220
+ type: 'number', default: 2000, min: 250, max: 60000, integer: true, levels: ALL_LEVELS,
221
+ description: 'A futás-közbeni scan-progress log min. időköze (ms) — a nagy scan haladását ennyente jelzi '
222
+ + 'a konzolon (`[famIngest]` activity-sor). A végső 100% mindig kibocsátódik.',
223
+ },
158
224
  // --- 4.6. Reference / scope (fogyasztó: dsgn-002) ---
159
225
  'reference.cacheTtlMs': {
160
226
  type: 'number', default: 60000, min: 0, max: 3600000, integer: true, levels: GLOBAL_ONLY,