token-goat 2.9.19 → 2.9.21
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/README.md +3 -1
- package/dist/{token-goat-chunk-JNIFSVWM.mjs → token-goat-chunk-2ZHD3XCD.mjs} +5 -1
- package/dist/{token-goat-chunk-P46RTOAQ.mjs → token-goat-chunk-4IIU3GNS.mjs} +10 -7
- package/dist/{token-goat-chunk-2GTB5RBZ.mjs → token-goat-chunk-4V4OZHHV.mjs} +11 -271
- package/dist/token-goat-chunk-64OEF3UN.mjs +128 -0
- package/dist/{token-goat-chunk-AVRD7SBO.mjs → token-goat-chunk-6AQLZMCO.mjs} +270 -29
- package/dist/{token-goat-chunk-LACH3WKS.mjs → token-goat-chunk-BIEDTF6V.mjs} +3 -3
- package/dist/{token-goat-chunk-PIAESKVU.mjs → token-goat-chunk-BKHJRFDE.mjs} +568 -429
- package/dist/token-goat-chunk-CAHN4QU7.mjs +26 -0
- package/dist/{token-goat-chunk-MU6I4IDI.mjs → token-goat-chunk-CMAJGP3E.mjs} +11 -7
- package/dist/token-goat-chunk-CMHBTXMY.mjs +41 -0
- package/dist/{token-goat-chunk-HPMMLV37.mjs → token-goat-chunk-CZ5ZFJSN.mjs} +256 -341
- package/dist/{token-goat-chunk-7DGTVBWP.mjs → token-goat-chunk-DDP64XR7.mjs} +159 -1863
- package/dist/{token-goat-chunk-FX5DHKGF.mjs → token-goat-chunk-DISVHOW6.mjs} +4 -4
- package/dist/{token-goat-chunk-L2UOJBV4.mjs → token-goat-chunk-FZN77SZD.mjs} +27 -19
- package/dist/{token-goat-chunk-DA6TIDLI.mjs → token-goat-chunk-GO7OWONJ.mjs} +18 -13
- package/dist/{token-goat-chunk-EP7TCWHM.mjs → token-goat-chunk-IAMIQLCV.mjs} +83 -66
- package/dist/{token-goat-chunk-NJKNAC37.mjs → token-goat-chunk-IJUHQX2M.mjs} +1 -1
- package/dist/token-goat-chunk-KQI24O4B.mjs +292 -0
- package/dist/{token-goat-chunk-GYC34EGE.mjs → token-goat-chunk-KRPJIXCT.mjs} +2 -2
- package/dist/token-goat-chunk-KVAXTA2W.mjs +198 -0
- package/dist/{token-goat-chunk-FJZ5MZK7.mjs → token-goat-chunk-LK3YOKDF.mjs} +2 -2
- package/dist/token-goat-chunk-M43UJVYQ.mjs +1816 -0
- package/dist/{token-goat-chunk-SOKAPOOC.mjs → token-goat-chunk-M6CDVASA.mjs} +46 -47
- package/dist/token-goat-chunk-MECDAPXB.mjs +1989 -0
- package/dist/token-goat-chunk-MEKVJZUN.mjs +324 -0
- package/dist/token-goat-chunk-MQACN7VG.mjs +1379 -0
- package/dist/{token-goat-chunk-3W5P673V.mjs → token-goat-chunk-MZQORUX5.mjs} +1 -1
- package/dist/{token-goat-chunk-DHIXE6GV.mjs → token-goat-chunk-ORRDWKLA.mjs} +1 -1
- package/dist/{token-goat-chunk-F24NE3FO.mjs → token-goat-chunk-PCR43MCM.mjs} +2 -2
- package/dist/token-goat-chunk-PDYQA3AP.mjs +248 -0
- package/dist/{token-goat-chunk-S7RFIX4Y.mjs → token-goat-chunk-PHDNWISV.mjs} +45 -14
- package/dist/token-goat-chunk-PPYZS7TI.mjs +304 -0
- package/dist/{token-goat-chunk-BTKDZW7F.mjs → token-goat-chunk-QTIRVK3M.mjs} +1 -1
- package/dist/{token-goat-chunk-62VJ47WN.mjs → token-goat-chunk-QUM3UNWS.mjs} +5 -5
- package/dist/{token-goat-chunk-KWM6KBPA.mjs → token-goat-chunk-SHV6QQAS.mjs} +1 -1
- package/dist/{token-goat-chunk-FQYMZASI.mjs → token-goat-chunk-SMUYPBF5.mjs} +796 -4464
- package/dist/{token-goat-chunk-ZGQXRYKE.mjs → token-goat-chunk-TGBSMHPM.mjs} +1 -1
- package/dist/{token-goat-chunk-EXLLLIC3.mjs → token-goat-chunk-VXKT3W4C.mjs} +3 -3
- package/dist/{token-goat-chunk-WKO5TVNA.mjs → token-goat-chunk-XJUPKJF5.mjs} +544 -576
- package/dist/{token-goat-chunk-IBTFGZBX.mjs → token-goat-chunk-XQSSPX3X.mjs} +2 -2
- package/dist/{token-goat-chunk-VJQBYSXG.mjs → token-goat-chunk-ZJWPJL7O.mjs} +3 -3
- package/dist/token-goat-hook.mjs +17 -11
- package/dist/token-goat.core.mjs +27 -19
- package/docs/C4_RUNTIME_ARCHITECTURE.md +1 -1
- package/docs/cli.md +13 -12
- package/docs/install.md +1 -1
- package/docs/security.md +2 -2
- package/package.json +3 -2
- package/dist/token-goat-chunk-NYFYIRG3.mjs +0 -35
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
foldPath,
|
|
14
14
|
projectConfigPath,
|
|
15
15
|
runGit
|
|
16
|
-
} from "./token-goat-chunk-
|
|
16
|
+
} from "./token-goat-chunk-TGBSMHPM.mjs";
|
|
17
17
|
import {
|
|
18
18
|
normalizeDarwinSystemAlias
|
|
19
19
|
} from "./token-goat-chunk-NMTKNYGF.mjs";
|
|
@@ -1205,7 +1205,14 @@ var PROJECT_LOCKED_KEYS = [
|
|
|
1205
1205
|
// Same reasoning as the two thresholds above, on the chunk axis: a checked-in `.token-goat.toml` dropping this to 1 would take every file in the repository out of `semantic` for a reviewing agent, and `semantic` would answer "no matches" in the words it uses for a genuine absence.
|
|
1206
1206
|
"indexing.max_chunks_per_file",
|
|
1207
1207
|
"indexing.cross_project_symbols",
|
|
1208
|
-
"
|
|
1208
|
+
// The same blast radius as the indexing keys above, applied to retrieval rather than to what gets indexed: `semantic` drops a dense hit whose distance exceeds this, so a checked-in `.token-goat.toml` setting it near the floor removes this repository's own code from the vector half of every search a reviewing agent runs, and the command then answers "no matches" in the words it uses for a name that genuinely is not there. The keyword pass would still answer, which makes it worse rather than better -- the result looks like a working search. The user's own global config still sets it freely; only the project-supplied layer is refused.
|
|
1209
|
+
"semantic.max_distance",
|
|
1210
|
+
"worker.blocked_roots",
|
|
1211
|
+
// global.db is a machine-wide shared database across every project on the host. A checked-in
|
|
1212
|
+
// per-project .token-goat.toml must not be able to lower the size warning threshold or trigger
|
|
1213
|
+
// auto-reclaim/purging of embeddings across other repositories sharing the same database.
|
|
1214
|
+
"indexing.max_db_size_mb",
|
|
1215
|
+
"indexing.auto_reclaim_embeddings"
|
|
1209
1216
|
];
|
|
1210
1217
|
var _lastProjectConfigLockedKeys = [];
|
|
1211
1218
|
function lastProjectConfigLockedKeys() {
|
|
@@ -1344,6 +1351,13 @@ function isAutoTriggerMultiplierExplicit() {
|
|
|
1344
1351
|
init_define_import_meta_env();
|
|
1345
1352
|
import * as path2 from "node:path";
|
|
1346
1353
|
|
|
1354
|
+
// src/own_lookup.ts
|
|
1355
|
+
init_define_import_meta_env();
|
|
1356
|
+
function ownGet(map, key) {
|
|
1357
|
+
if (!map || !Object.hasOwn(map, key)) return void 0;
|
|
1358
|
+
return map[key];
|
|
1359
|
+
}
|
|
1360
|
+
|
|
1347
1361
|
// src/config_types.ts
|
|
1348
1362
|
init_define_import_meta_env();
|
|
1349
1363
|
|
|
@@ -1352,16 +1366,7 @@ init_define_import_meta_env();
|
|
|
1352
1366
|
var CONFIG_DEFAULTS = {
|
|
1353
1367
|
compact_assist: {
|
|
1354
1368
|
enabled: true,
|
|
1355
|
-
triggers: ["manual", "auto"],
|
|
1356
|
-
min_events: 3,
|
|
1357
|
-
max_manifest_tokens: 400,
|
|
1358
1369
|
auto_trigger_multiplier: 2,
|
|
1359
|
-
compact_skip_ttl_secs: 300,
|
|
1360
|
-
noise_floor_tokens: 0,
|
|
1361
|
-
edited_dir_group_threshold: 3,
|
|
1362
|
-
max_section_lines: 0,
|
|
1363
|
-
wide_session_threshold: 15,
|
|
1364
|
-
orchestrator_commit_threshold: 5,
|
|
1365
1370
|
max_manifest_chars: 1600,
|
|
1366
1371
|
summary_budget_chars: 24e3,
|
|
1367
1372
|
harness: "auto"
|
|
@@ -1550,7 +1555,9 @@ var CONFIG_DEFAULTS = {
|
|
|
1550
1555
|
skip_dirs: [],
|
|
1551
1556
|
skip_files: ["coverage.json", "coverage-final.json"],
|
|
1552
1557
|
embeddings_enabled: true,
|
|
1553
|
-
cross_project_symbols: true
|
|
1558
|
+
cross_project_symbols: true,
|
|
1559
|
+
max_db_size_mb: 1500,
|
|
1560
|
+
auto_reclaim_embeddings: false
|
|
1554
1561
|
},
|
|
1555
1562
|
compression: {
|
|
1556
1563
|
profile: "auto"
|
|
@@ -1582,7 +1589,9 @@ var CONFIG_DEFAULTS = {
|
|
|
1582
1589
|
},
|
|
1583
1590
|
semantic: {
|
|
1584
1591
|
archive_weight: 0.7,
|
|
1585
|
-
docs_weight: 0.92
|
|
1592
|
+
docs_weight: 0.92,
|
|
1593
|
+
// Deliberately loose enough to admit everything this metric produces, which is a measured conclusion rather than a placeholder. Against a large index, 12 genuine questions about code that is present had best hits from 0.635 to 0.813 and 11 off-corpus ones (nonsense strings, digits, a cake recipe) from 0.820 to 1.017, which looks separable at about 0.9. It is not: on a small corpus the nearest genuine match is much further away, and a two-file project in this repo's own suite matches its target at 0.934 -- above that cut and inside the noise band. So the two populations overlap across corpus sizes and no fixed distance tells them apart, while getting it wrong removes real answers and says nothing. Left at the retrieval bound's value so the default filters nothing; it exists to be lowered per-project by someone who has measured their own corpus, and runSemantic says which distance it refused when a lowered value empties the vector half.
|
|
1594
|
+
max_distance: 1.2
|
|
1586
1595
|
}
|
|
1587
1596
|
};
|
|
1588
1597
|
function getDefaultConfig(section2) {
|
|
@@ -1663,15 +1672,7 @@ function section(raw, key) {
|
|
|
1663
1672
|
return val !== null && typeof val === "object" && !Array.isArray(val) ? val : {};
|
|
1664
1673
|
}
|
|
1665
1674
|
var NUMERIC_FIELD_BOUNDS = {
|
|
1666
|
-
"compact_assist.min_events": { min: 0, max: 1e3 },
|
|
1667
|
-
"compact_assist.max_manifest_tokens": { min: 50, max: 1e4 },
|
|
1668
1675
|
"compact_assist.auto_trigger_multiplier": { min: 1, max: 10 },
|
|
1669
|
-
"compact_assist.compact_skip_ttl_secs": { min: 1, max: 3600 },
|
|
1670
|
-
"compact_assist.noise_floor_tokens": { min: 0, max: 1e4 },
|
|
1671
|
-
"compact_assist.edited_dir_group_threshold": { min: 0, max: 100 },
|
|
1672
|
-
"compact_assist.max_section_lines": { min: 0, max: 1e4 },
|
|
1673
|
-
"compact_assist.wide_session_threshold": { min: 1, max: 1e4 },
|
|
1674
|
-
"compact_assist.orchestrator_commit_threshold": { min: 1, max: 1e4 },
|
|
1675
1676
|
"compact_assist.max_manifest_chars": { min: 0, max: 16e3 },
|
|
1676
1677
|
"compact_assist.summary_budget_chars": { min: 0, max: 2e5 },
|
|
1677
1678
|
"bash_compress.max_lines": { min: 50, max: 1e5 },
|
|
@@ -1725,15 +1726,18 @@ var NUMERIC_FIELD_BOUNDS = {
|
|
|
1725
1726
|
"indexing.large_file_symbol_only_kb": { min: 1, max: 1048576, clampTo: "indexing.large_file_skip_kb" },
|
|
1726
1727
|
"indexing.large_file_skip_kb": { min: 1, max: 1048576 },
|
|
1727
1728
|
"indexing.max_chunks_per_file": { min: 1, max: 1e6 },
|
|
1729
|
+
"indexing.max_db_size_mb": { min: 1, max: 1e5 },
|
|
1728
1730
|
"context.model_window_tokens": { min: 1e4, max: 1e7 },
|
|
1729
1731
|
"hint_stats.suppress_threshold_pct": { min: 0, max: 100 },
|
|
1730
1732
|
"hint_stats.defiance_threshold_pct": { min: 0, max: 100 },
|
|
1731
1733
|
"hint_stats.min_sample_size": { min: 1, max: 1e4 },
|
|
1732
1734
|
"semantic.archive_weight": { min: 0.05, max: 1 },
|
|
1733
|
-
"semantic.docs_weight": { min: 0.05, max: 1 }
|
|
1735
|
+
"semantic.docs_weight": { min: 0.05, max: 1 },
|
|
1736
|
+
// Upper bound is DEFAULT_DISTANCE_THRESHOLD, not the metric's own ceiling of 2. An L2 distance between unit vectors cannot exceed 2, so 2 reads like 'admit everything' -- but this floor only ever narrows what searchSemantic already returned, and runSemantic lets that scan keep its own 1.2 bound (see the max_distance comment on SemanticConfig for why the scan is the wrong place for a relevance decision). Anything between 1.2 and 2 was therefore discarded inside the scan before the floor could see it: a user raising this to widen recall got the setting accepted, validated and persisted, and identical results, with no diagnostic able to say why. validatedFloat clamps rather than rejects, so an existing value above the new bound becomes 1.2 and behaves exactly as it already did. The lower bound is not 0: a floor of 0 admits only an exact vector match, which would disable the vector half entirely while `semantic` went on answering in the words it uses for a genuine absence.
|
|
1737
|
+
"semantic.max_distance": { min: 0.05, max: 1.2 }
|
|
1734
1738
|
};
|
|
1735
1739
|
function boundsOf(key) {
|
|
1736
|
-
const b = NUMERIC_FIELD_BOUNDS
|
|
1740
|
+
const b = ownGet(NUMERIC_FIELD_BOUNDS, key);
|
|
1737
1741
|
if (!b) throw new Error(`token-goat: no NUMERIC_FIELD_BOUNDS entry for '${key}'`);
|
|
1738
1742
|
return [b.min, b.max];
|
|
1739
1743
|
}
|
|
@@ -1747,7 +1751,7 @@ function walkGetNumeric(obj, parts) {
|
|
|
1747
1751
|
return typeof cur === "number" ? cur : void 0;
|
|
1748
1752
|
}
|
|
1749
1753
|
function validateNumericField(fieldKey, value, cfg) {
|
|
1750
|
-
const bounds = NUMERIC_FIELD_BOUNDS
|
|
1754
|
+
const bounds = ownGet(NUMERIC_FIELD_BOUNDS, fieldKey);
|
|
1751
1755
|
if (!bounds) return void 0;
|
|
1752
1756
|
let clamped = Math.max(bounds.min, Math.min(bounds.max, value));
|
|
1753
1757
|
if (bounds.clampTo) {
|
|
@@ -1773,7 +1777,7 @@ function validateEnumField(fieldKey, value) {
|
|
|
1773
1777
|
const allowed2 = [...SUPPORTED_OCR_LANG_CODES];
|
|
1774
1778
|
return tokens.length > 0 && tokens.every((t) => isSupportedOcrLang(t)) ? void 0 : allowed2;
|
|
1775
1779
|
}
|
|
1776
|
-
const allowed = ENUM_FIELD_VALUES
|
|
1780
|
+
const allowed = ownGet(ENUM_FIELD_VALUES, fieldKey);
|
|
1777
1781
|
if (!allowed) return void 0;
|
|
1778
1782
|
return allowed.includes(value) ? void 0 : allowed;
|
|
1779
1783
|
}
|
|
@@ -1822,7 +1826,9 @@ var ENV_KEYS2 = [
|
|
|
1822
1826
|
"TOKEN_GOAT_WEB_CACHE_MAX_FILES",
|
|
1823
1827
|
"TOKEN_GOAT_WEB_CACHE_MAX_BYTES",
|
|
1824
1828
|
"TOKEN_GOAT_WRITE_REWRITE_MIN_LINES",
|
|
1825
|
-
"TOKEN_GOAT_WRITE_REWRITE_UNCHANGED_PCT"
|
|
1829
|
+
"TOKEN_GOAT_WRITE_REWRITE_UNCHANGED_PCT",
|
|
1830
|
+
"TOKEN_GOAT_INDEXING_MAX_DB_SIZE_MB",
|
|
1831
|
+
"TOKEN_GOAT_INDEXING_AUTO_RECLAIM_EMBEDDINGS"
|
|
1826
1832
|
];
|
|
1827
1833
|
function allEnvKeys() {
|
|
1828
1834
|
return [.../* @__PURE__ */ new Set([...ENV_KEYS2, ...Object.values(CONFIG_KEY_ENV_OVERRIDES).flat()])];
|
|
@@ -1868,7 +1874,7 @@ function rawValueEquals(a, b) {
|
|
|
1868
1874
|
}
|
|
1869
1875
|
function rejectionReason(key, rawValue, effectiveValue, cfg) {
|
|
1870
1876
|
if (typeof rawValue === "number") {
|
|
1871
|
-
const bounds = NUMERIC_FIELD_BOUNDS
|
|
1877
|
+
const bounds = ownGet(NUMERIC_FIELD_BOUNDS, key);
|
|
1872
1878
|
if (bounds !== void 0) {
|
|
1873
1879
|
if (rawValue < bounds.min || rawValue > bounds.max) return `outside the allowed range ${bounds.min}-${bounds.max}`;
|
|
1874
1880
|
if (!Number.isInteger(rawValue) && Number.isInteger(effectiveValue)) return "not a whole number";
|
|
@@ -2001,16 +2007,7 @@ function _buildConfig(raw, projectRaw = {}) {
|
|
|
2001
2007
|
const ca_raw = section(raw, "compact_assist");
|
|
2002
2008
|
const ca = getDefaultConfig("compact_assist");
|
|
2003
2009
|
ca.enabled = validatedBool(ca_raw["enabled"], ca.enabled);
|
|
2004
|
-
ca.triggers = validatedStrList(ca_raw["triggers"], ca.triggers);
|
|
2005
|
-
ca.min_events = validatedInt(ca_raw["min_events"], ca.min_events, ...boundsOf("compact_assist.min_events"));
|
|
2006
|
-
ca.max_manifest_tokens = validatedInt(ca_raw["max_manifest_tokens"], ca.max_manifest_tokens, ...boundsOf("compact_assist.max_manifest_tokens"));
|
|
2007
2010
|
ca.auto_trigger_multiplier = validatedFloat(ca_raw["auto_trigger_multiplier"], ca.auto_trigger_multiplier, ...boundsOf("compact_assist.auto_trigger_multiplier"));
|
|
2008
|
-
ca.compact_skip_ttl_secs = validatedFloat(ca_raw["compact_skip_ttl_secs"], ca.compact_skip_ttl_secs, ...boundsOf("compact_assist.compact_skip_ttl_secs"));
|
|
2009
|
-
ca.noise_floor_tokens = validatedInt(ca_raw["noise_floor_tokens"], ca.noise_floor_tokens, ...boundsOf("compact_assist.noise_floor_tokens"));
|
|
2010
|
-
ca.edited_dir_group_threshold = validatedInt(ca_raw["edited_dir_group_threshold"], ca.edited_dir_group_threshold, ...boundsOf("compact_assist.edited_dir_group_threshold"));
|
|
2011
|
-
ca.max_section_lines = validatedInt(ca_raw["max_section_lines"], ca.max_section_lines, ...boundsOf("compact_assist.max_section_lines"));
|
|
2012
|
-
ca.wide_session_threshold = validatedInt(ca_raw["wide_session_threshold"], ca.wide_session_threshold, ...boundsOf("compact_assist.wide_session_threshold"));
|
|
2013
|
-
ca.orchestrator_commit_threshold = validatedInt(ca_raw["orchestrator_commit_threshold"], ca.orchestrator_commit_threshold, ...boundsOf("compact_assist.orchestrator_commit_threshold"));
|
|
2014
2011
|
ca.max_manifest_chars = validatedInt(ca_raw["max_manifest_chars"], ca.max_manifest_chars, ...boundsOf("compact_assist.max_manifest_chars"));
|
|
2015
2012
|
ca.summary_budget_chars = validatedInt(ca_raw["summary_budget_chars"], ca.summary_budget_chars, ...boundsOf("compact_assist.summary_budget_chars"));
|
|
2016
2013
|
ca.harness = validatedStr(ca_raw["harness"], ca.harness);
|
|
@@ -2227,6 +2224,10 @@ function _buildConfig(raw, projectRaw = {}) {
|
|
|
2227
2224
|
ix.embeddings_enabled = envBool("TOKEN_GOAT_EMBEDDINGS_ENABLED", ix.embeddings_enabled);
|
|
2228
2225
|
ix.cross_project_symbols = validatedBool(ix_raw["cross_project_symbols"], ix.cross_project_symbols);
|
|
2229
2226
|
ix.cross_project_symbols = envBool("TOKEN_GOAT_CROSS_PROJECT_SYMBOLS", ix.cross_project_symbols);
|
|
2227
|
+
ix.max_db_size_mb = validatedInt(ix_raw["max_db_size_mb"], ix.max_db_size_mb, ...boundsOf("indexing.max_db_size_mb"));
|
|
2228
|
+
ix.max_db_size_mb = envInt("TOKEN_GOAT_INDEXING_MAX_DB_SIZE_MB", ix.max_db_size_mb, ...boundsOf("indexing.max_db_size_mb"));
|
|
2229
|
+
ix.auto_reclaim_embeddings = validatedBool(ix_raw["auto_reclaim_embeddings"], ix.auto_reclaim_embeddings);
|
|
2230
|
+
ix.auto_reclaim_embeddings = envBool("TOKEN_GOAT_INDEXING_AUTO_RECLAIM_EMBEDDINGS", ix.auto_reclaim_embeddings);
|
|
2230
2231
|
const cpr_raw = section(raw, "compression");
|
|
2231
2232
|
const cpr = getDefaultConfig("compression");
|
|
2232
2233
|
cpr.profile = validatedStr(cpr_raw["profile"], cpr.profile);
|
|
@@ -2269,6 +2270,7 @@ function _buildConfig(raw, projectRaw = {}) {
|
|
|
2269
2270
|
const sem = getDefaultConfig("semantic");
|
|
2270
2271
|
sem.archive_weight = validatedFloat(sem_raw["archive_weight"], sem.archive_weight, ...boundsOf("semantic.archive_weight"));
|
|
2271
2272
|
sem.docs_weight = validatedFloat(sem_raw["docs_weight"], sem.docs_weight, ...boundsOf("semantic.docs_weight"));
|
|
2273
|
+
sem.max_distance = validatedFloat(sem_raw["max_distance"], sem.max_distance, ...boundsOf("semantic.max_distance"));
|
|
2272
2274
|
return {
|
|
2273
2275
|
compact_assist: ca,
|
|
2274
2276
|
bash_compress: bc,
|
|
@@ -2379,7 +2381,9 @@ var CONFIG_KEY_ENV_OVERRIDES = {
|
|
|
2379
2381
|
"mcp.allowed_roots": ["TOKEN_GOAT_MCP_ALLOWED_ROOTS"],
|
|
2380
2382
|
"webfetch.allow": ["TOKEN_GOAT_WEBFETCH_ALLOW"],
|
|
2381
2383
|
"webfetch.deny": ["TOKEN_GOAT_WEBFETCH_DENY"],
|
|
2382
|
-
"indexing.embeddings_enabled": ["TOKEN_GOAT_EMBEDDINGS_ENABLED"]
|
|
2384
|
+
"indexing.embeddings_enabled": ["TOKEN_GOAT_EMBEDDINGS_ENABLED"],
|
|
2385
|
+
"indexing.max_db_size_mb": ["TOKEN_GOAT_INDEXING_MAX_DB_SIZE_MB"],
|
|
2386
|
+
"indexing.auto_reclaim_embeddings": ["TOKEN_GOAT_INDEXING_AUTO_RECLAIM_EMBEDDINGS"]
|
|
2383
2387
|
};
|
|
2384
2388
|
function saveConfig(config) {
|
|
2385
2389
|
const ca = config.compact_assist;
|
|
@@ -2392,16 +2396,7 @@ function saveConfig(config) {
|
|
|
2392
2396
|
const data = {
|
|
2393
2397
|
compact_assist: {
|
|
2394
2398
|
enabled: ca.enabled,
|
|
2395
|
-
triggers: ca.triggers,
|
|
2396
|
-
min_events: ca.min_events,
|
|
2397
|
-
max_manifest_tokens: ca.max_manifest_tokens,
|
|
2398
2399
|
...keepsMultiplierDefault ? {} : { auto_trigger_multiplier: ca.auto_trigger_multiplier },
|
|
2399
|
-
compact_skip_ttl_secs: ca.compact_skip_ttl_secs,
|
|
2400
|
-
noise_floor_tokens: ca.noise_floor_tokens,
|
|
2401
|
-
edited_dir_group_threshold: ca.edited_dir_group_threshold,
|
|
2402
|
-
max_section_lines: ca.max_section_lines,
|
|
2403
|
-
wide_session_threshold: ca.wide_session_threshold,
|
|
2404
|
-
orchestrator_commit_threshold: ca.orchestrator_commit_threshold,
|
|
2405
2400
|
max_manifest_chars: ca.max_manifest_chars,
|
|
2406
2401
|
summary_budget_chars: ca.summary_budget_chars,
|
|
2407
2402
|
harness: ca.harness
|
|
@@ -2538,7 +2533,9 @@ function saveConfig(config) {
|
|
|
2538
2533
|
skip_dirs: config.indexing.skip_dirs,
|
|
2539
2534
|
skip_files: config.indexing.skip_files,
|
|
2540
2535
|
embeddings_enabled: config.indexing.embeddings_enabled,
|
|
2541
|
-
cross_project_symbols: config.indexing.cross_project_symbols
|
|
2536
|
+
cross_project_symbols: config.indexing.cross_project_symbols,
|
|
2537
|
+
max_db_size_mb: config.indexing.max_db_size_mb,
|
|
2538
|
+
auto_reclaim_embeddings: config.indexing.auto_reclaim_embeddings
|
|
2542
2539
|
},
|
|
2543
2540
|
compression: {
|
|
2544
2541
|
profile: config.compression.profile
|
|
@@ -2569,6 +2566,7 @@ function saveConfig(config) {
|
|
|
2569
2566
|
},
|
|
2570
2567
|
semantic: {
|
|
2571
2568
|
archive_weight: config.semantic.archive_weight,
|
|
2569
|
+
max_distance: config.semantic.max_distance,
|
|
2572
2570
|
docs_weight: config.semantic.docs_weight
|
|
2573
2571
|
}
|
|
2574
2572
|
};
|
|
@@ -2593,6 +2591,7 @@ export {
|
|
|
2593
2591
|
SUPPORTED_OCR_LANG_CODES,
|
|
2594
2592
|
isSupportedOcrLang,
|
|
2595
2593
|
resolveOcrLangs,
|
|
2594
|
+
ownGet,
|
|
2596
2595
|
defaultConfig,
|
|
2597
2596
|
makeProjectAt,
|
|
2598
2597
|
findProject,
|