engine7 7.1.152 → 7.1.154
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/dist/bg-worker.mjs +787 -458
- package/dist/cli.mjs +172 -80
- package/dist/engine-startup.mjs +873 -515
- package/dist/main.mjs +879 -521
- package/dist/recall-worker.mjs +133 -73
- package/dist/sqlite-maintenance-worker.mjs +4 -0
- package/dist/topics-worker.mjs +102 -37
- package/dist/travel-data.mjs +4 -0
- package/dist/travel-gateway.mjs +103 -45
- package/dist/travel-host.mjs +137 -48
- package/dist/travel-initial-baseline.mjs +4 -0
- package/dist/travel-node-data.mjs +4 -0
- package/dist/travel-node.mjs +101 -43
- package/dist/travel-pairing.mjs +103 -45
- package/dist/travel-sync-worker.mjs +2 -1
- package/dist/web-console.mjs +221 -69
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -3078,6 +3078,10 @@ function invalidateChildren(db2, scope, pending2, reason) {
|
|
|
3078
3078
|
if (!referencedPlan.get(scope, child.child_id, scope, child.child_id)) continue;
|
|
3079
3079
|
}
|
|
3080
3080
|
const state2 = child.deleted ? "deleted" : "needs_revalidation";
|
|
3081
|
+
if (child.child_kind === "foresight" && !child.deleted) {
|
|
3082
|
+
pending2.push(...db2.prepare(`SELECT child_kind,child_id,role FROM memory_dependencies WHERE scope_id=? AND parent_kind='artifact' AND parent_id=?`).all(scope, child.child_id).map((row) => ({ ...row })));
|
|
3083
|
+
continue;
|
|
3084
|
+
}
|
|
3081
3085
|
db2.prepare(`UPDATE memory_derivations SET state=?,reason=?,updated_at=?
|
|
3082
3086
|
WHERE scope_id=? AND child_kind=? AND child_id=? AND state IN ('current','needs_revalidation') AND state<>?`).run(state2, reason, (/* @__PURE__ */ new Date()).toISOString(), scope, child.child_kind, child.child_id, state2);
|
|
3083
3087
|
result.push(child.child_id);
|
|
@@ -3306,12 +3310,14 @@ var init_dependencies = __esm({
|
|
|
3306
3310
|
return false;
|
|
3307
3311
|
}
|
|
3308
3312
|
}
|
|
3309
|
-
|
|
3313
|
+
/** excludeKinds:没有重验消费者的类别不计入(1203:foresight,1015 起不做周期重验,见 invalidateChildren)。 */
|
|
3314
|
+
dirty(scope, options = {}) {
|
|
3310
3315
|
return this.readTransaction(() => {
|
|
3311
3316
|
checkMemoryReadBudget();
|
|
3312
3317
|
const memo = /* @__PURE__ */ new Map();
|
|
3313
3318
|
return this.db.prepare("SELECT child_kind,child_id,version,state,updated_at FROM memory_derivations WHERE scope_id=? AND state IN ('current','needs_revalidation')").all(scopeId(scope)).filter((row) => {
|
|
3314
3319
|
checkMemoryReadBudget();
|
|
3320
|
+
if (options.excludeKinds?.has(row.child_kind)) return false;
|
|
3315
3321
|
return row.state === "needs_revalidation" || !this.artifactTimeCurrent(scope, row.child_kind, row.child_id, /* @__PURE__ */ new Set(), memo);
|
|
3316
3322
|
}).map((row) => ({
|
|
3317
3323
|
kind: row.child_kind,
|
|
@@ -3321,6 +3327,20 @@ var init_dependencies = __esm({
|
|
|
3321
3327
|
}));
|
|
3322
3328
|
});
|
|
3323
3329
|
}
|
|
3330
|
+
/** needs_revalidation 的派生件按给定的现势状态归位(1203:foresight 一次性清标记——开窗的回 current、
|
|
3331
|
+
* 过期的 retire、行已不存在的记 deleted)。只动 needs_revalidation,不碰 current/invalid/deleted。 */
|
|
3332
|
+
settleRevalidation(scope, kind, verdicts) {
|
|
3333
|
+
return this.transaction(() => {
|
|
3334
|
+
const rows = this.db.prepare("SELECT child_id FROM memory_derivations WHERE scope_id=? AND child_kind=? AND state='needs_revalidation'").all(scopeId(scope), kind);
|
|
3335
|
+
let settled = 0;
|
|
3336
|
+
for (const row of rows) {
|
|
3337
|
+
const verdict = verdicts.get(row.child_id);
|
|
3338
|
+
if (!verdict) continue;
|
|
3339
|
+
settled += Number(this.db.prepare("UPDATE memory_derivations SET state=?,reason=?,updated_at=? WHERE scope_id=? AND child_kind=? AND child_id=? AND state='needs_revalidation'").run(verdict.state, verdict.reason, (/* @__PURE__ */ new Date()).toISOString(), scopeId(scope), kind, row.child_id).changes);
|
|
3340
|
+
}
|
|
3341
|
+
return settled;
|
|
3342
|
+
});
|
|
3343
|
+
}
|
|
3324
3344
|
invalidate(scope, kind, id2, expectedVersion, reason) {
|
|
3325
3345
|
this.transaction(() => {
|
|
3326
3346
|
this.db.prepare("UPDATE memory_derivations SET state='invalid',reason=?,updated_at=? WHERE scope_id=? AND child_kind=? AND child_id=? AND version=? AND state IN ('current','needs_revalidation')").run(reason, (/* @__PURE__ */ new Date()).toISOString(), scopeId(scope), kind, id2, expectedVersion);
|
|
@@ -5356,6 +5376,7 @@ var tokenizer_exports = {};
|
|
|
5356
5376
|
__export(tokenizer_exports, {
|
|
5357
5377
|
DEFAULT_STOPWORDS: () => DEFAULT_STOPWORDS,
|
|
5358
5378
|
MIN_TOKEN_LENGTH: () => MIN_TOKEN_LENGTH,
|
|
5379
|
+
TOKENIZER_VERSION: () => TOKENIZER_VERSION,
|
|
5359
5380
|
cjkBigrams: () => cjkBigrams,
|
|
5360
5381
|
tokenize: () => tokenize,
|
|
5361
5382
|
tokenizeCjk: () => tokenizeCjk,
|
|
@@ -5368,7 +5389,7 @@ function engine() {
|
|
|
5368
5389
|
return jieba;
|
|
5369
5390
|
}
|
|
5370
5391
|
function tokenize(text4) {
|
|
5371
|
-
const raw = engine().cutForSearch(String(text4 ?? ""));
|
|
5392
|
+
const raw = engine().cutForSearch(String(text4 ?? ""), true);
|
|
5372
5393
|
const out = [];
|
|
5373
5394
|
for (const t of raw) {
|
|
5374
5395
|
const tok = t.trim().toLowerCase();
|
|
@@ -5391,7 +5412,7 @@ function cjkBigrams(text4) {
|
|
|
5391
5412
|
function tokenizeCjk(text4) {
|
|
5392
5413
|
return [...tokenize(text4), ...cjkBigrams(text4)];
|
|
5393
5414
|
}
|
|
5394
|
-
var DEFAULT_STOPWORDS, MIN_TOKEN_LENGTH, jieba;
|
|
5415
|
+
var DEFAULT_STOPWORDS, MIN_TOKEN_LENGTH, TOKENIZER_VERSION, jieba;
|
|
5395
5416
|
var init_tokenizer = __esm({
|
|
5396
5417
|
"src/mem7/core/tokenizer.ts"() {
|
|
5397
5418
|
"use strict";
|
|
@@ -5463,6 +5484,7 @@ var init_tokenizer = __esm({
|
|
|
5463
5484
|
"\u54E6"
|
|
5464
5485
|
]);
|
|
5465
5486
|
MIN_TOKEN_LENGTH = 2;
|
|
5487
|
+
TOKENIZER_VERSION = 2;
|
|
5466
5488
|
jieba = null;
|
|
5467
5489
|
}
|
|
5468
5490
|
});
|
|
@@ -5832,11 +5854,17 @@ function loadArrow() {
|
|
|
5832
5854
|
}
|
|
5833
5855
|
return arrowPromise;
|
|
5834
5856
|
}
|
|
5835
|
-
function
|
|
5836
|
-
const
|
|
5837
|
-
|
|
5838
|
-
|
|
5839
|
-
|
|
5857
|
+
function plainRow(row) {
|
|
5858
|
+
const out = {};
|
|
5859
|
+
for (const [key5, value] of Object.entries(row)) {
|
|
5860
|
+
if (TIMESTAMP_COLUMNS.has(key5) && typeof value === "number") {
|
|
5861
|
+
out[key5] = new Date(value);
|
|
5862
|
+
continue;
|
|
5863
|
+
}
|
|
5864
|
+
const raw = value !== null && typeof value === "object" && typeof value.toArray === "function" ? value.toArray() : value;
|
|
5865
|
+
out[key5] = raw !== null && typeof raw === "object" && ArrayBuffer.isView(raw) ? Array.from(raw) : raw;
|
|
5866
|
+
}
|
|
5867
|
+
return out;
|
|
5840
5868
|
}
|
|
5841
5869
|
function buildSchemas(arrow) {
|
|
5842
5870
|
const vecField = () => new arrow.Field("vector", new arrow.FixedSizeList(VECTOR_DIM, new arrow.Field("item", new arrow.Float32(), true)), true);
|
|
@@ -5934,7 +5962,7 @@ function textColumnOf(kind) {
|
|
|
5934
5962
|
return "fact";
|
|
5935
5963
|
}
|
|
5936
5964
|
}
|
|
5937
|
-
var isIntelMac, lancePromise, mem7VectorWarning, arrowPromise, Mem7VectorUnavailableError, VECTOR_DIM, BM25_FIELDS,
|
|
5965
|
+
var isIntelMac, lancePromise, mem7VectorWarning, arrowPromise, Mem7VectorUnavailableError, VECTOR_DIM, BM25_FIELDS, TOKEN_FIELDS, TIMESTAMP_COLUMNS, RRF_K, warnedFts, warnedVecIdx, incompatibleIndexSegments, bootAt, schemasCache, Mem7VectorStore;
|
|
5938
5966
|
var init_vector_store = __esm({
|
|
5939
5967
|
"src/mem7/core/vector-store.ts"() {
|
|
5940
5968
|
"use strict";
|
|
@@ -5965,14 +5993,14 @@ var init_vector_store = __esm({
|
|
|
5965
5993
|
agent_case: ["task_intent_tokens", "approach_tokens"],
|
|
5966
5994
|
agent_skill: ["description_tokens", "content_tokens"]
|
|
5967
5995
|
};
|
|
5968
|
-
|
|
5969
|
-
foresight: ["foresight", "evidence"],
|
|
5970
|
-
episode: ["episode"],
|
|
5971
|
-
atomic_fact: ["fact"],
|
|
5972
|
-
agent_case: ["task_intent", "approach"],
|
|
5973
|
-
agent_skill: ["description", "content"]
|
|
5996
|
+
TOKEN_FIELDS = {
|
|
5997
|
+
foresight: [["foresight", "foresight_tokens"], ["evidence", "evidence_tokens"]],
|
|
5998
|
+
episode: [["episode", "episode_tokens"]],
|
|
5999
|
+
atomic_fact: [["fact", "fact_tokens"]],
|
|
6000
|
+
agent_case: [["task_intent", "task_intent_tokens"], ["approach", "approach_tokens"]],
|
|
6001
|
+
agent_skill: [["description", "description_tokens"], ["content", "content_tokens"]]
|
|
5974
6002
|
};
|
|
5975
|
-
|
|
6003
|
+
TIMESTAMP_COLUMNS = /* @__PURE__ */ new Set(["created_at", "updated_at", "timestamp", "start_time", "end_time"]);
|
|
5976
6004
|
RRF_K = 60;
|
|
5977
6005
|
warnedFts = /* @__PURE__ */ new Set();
|
|
5978
6006
|
warnedVecIdx = /* @__PURE__ */ new Set();
|
|
@@ -5994,6 +6022,8 @@ var init_vector_store = __esm({
|
|
|
5994
6022
|
vectorIndexChecks = /* @__PURE__ */ new Map();
|
|
5995
6023
|
vectorIndexRechecks = /* @__PURE__ */ new Set();
|
|
5996
6024
|
vectorIndexesReady = /* @__PURE__ */ new Set();
|
|
6025
|
+
/** 自上次 optimize 后有写入的表(bg-worker 每小时收一次,见 optimizePending) */
|
|
6026
|
+
unoptimized = /* @__PURE__ */ new Set();
|
|
5997
6027
|
ledger = null;
|
|
5998
6028
|
ledgerPath;
|
|
5999
6029
|
withProofSnapshot = (operation) => {
|
|
@@ -6373,10 +6403,25 @@ var init_vector_store = __esm({
|
|
|
6373
6403
|
assertRuntimeAuthority(this.stateDir, "WRITE");
|
|
6374
6404
|
validate3?.();
|
|
6375
6405
|
await tbl.add(mapped);
|
|
6406
|
+
this.unoptimized.add(kind);
|
|
6376
6407
|
assertRuntimeAuthority(this.stateDir, "WRITE");
|
|
6377
6408
|
validate3?.();
|
|
6378
6409
|
void this.ensureVectorIndexes(kind, tbl, true);
|
|
6379
6410
|
}
|
|
6411
|
+
/**
|
|
6412
|
+
* 有写入的表做一次 optimize。1203 实测:lancedb 新写入片段在 optimize 之前 FTS 匹配不到多字中文词
|
|
6413
|
+
* (MatchQuery('山径') 新行 0 命中 → optimize 后 3;ASCII 词不受影响),新对话的中文词 BM25 要等这一步才看得见。
|
|
6414
|
+
*/
|
|
6415
|
+
async optimizePending() {
|
|
6416
|
+
const done2 = [];
|
|
6417
|
+
for (const kind of [...this.unoptimized]) {
|
|
6418
|
+
const tbl = await this.table(kind);
|
|
6419
|
+
await tbl.optimize();
|
|
6420
|
+
this.unoptimized.delete(kind);
|
|
6421
|
+
done2.push(kind);
|
|
6422
|
+
}
|
|
6423
|
+
return done2;
|
|
6424
|
+
}
|
|
6380
6425
|
/**
|
|
6381
6426
|
* 按 id upsert(everos repo.upsert 语义,1004 read 侧):digest 相同 → 跳过(不重嵌
|
|
6382
6427
|
* 不重写,everos cascade 的 content_sha256 diff-skip);digest 变了 → 删旧行再插新。
|
|
@@ -6397,6 +6442,7 @@ var init_vector_store = __esm({
|
|
|
6397
6442
|
assertRuntimeAuthority(this.stateDir, "WRITE");
|
|
6398
6443
|
validate3?.();
|
|
6399
6444
|
await tbl.delete(`id = '${r.id.replace(/'/g, "''")}'`);
|
|
6445
|
+
this.unoptimized.add(kind);
|
|
6400
6446
|
assertRuntimeAuthority(this.stateDir, "WRITE");
|
|
6401
6447
|
validate3?.();
|
|
6402
6448
|
await this.insert(kind, [r], validate3);
|
|
@@ -6416,6 +6462,49 @@ var init_vector_store = __esm({
|
|
|
6416
6462
|
return null;
|
|
6417
6463
|
}
|
|
6418
6464
|
}
|
|
6465
|
+
/**
|
|
6466
|
+
* 分词器版本变了(TOKENIZER_VERSION)→ 存量行的 *_tokens 按当前 tokenize() 重切(1203:HMM 开回 everos 默认,
|
|
6467
|
+
* 人名要进索引)。向量不动:整行原样回写只改 tokens 列,按 id 分批 mergeInsert;有改动就 optimize 一次
|
|
6468
|
+
* (新片段不进 ANN/FTS 索引,重切完不 optimize 等于没切)。先取全量 id 再分批——回写会产生新片段,
|
|
6469
|
+
* 边写边按 offset 翻页会漏行/重行。
|
|
6470
|
+
*/
|
|
6471
|
+
async retokenize(kind, options = {}) {
|
|
6472
|
+
if (this.options.readOnly) throw new Error("MEM7_VECTOR_READ_ONLY");
|
|
6473
|
+
if (!this.tables.has(kind) && !this.openingTables.has(kind) && !existsSync4(join8(this.dir, `${kind}.lance`))) return { rows: 0, changed: 0 };
|
|
6474
|
+
const tbl = await this.table(kind);
|
|
6475
|
+
const fields = TOKEN_FIELDS[kind];
|
|
6476
|
+
const batchSize = Math.max(1, options.batchSize ?? 500);
|
|
6477
|
+
const ids = [];
|
|
6478
|
+
for (let offset = 0; ; offset += 5e3) {
|
|
6479
|
+
const page = await tbl.query().select(["id"]).limit(5e3).offset(offset).toArray();
|
|
6480
|
+
for (const row of page) ids.push(String(row.id));
|
|
6481
|
+
if (page.length < 5e3) break;
|
|
6482
|
+
}
|
|
6483
|
+
let changed = 0;
|
|
6484
|
+
for (let start = 0; start < ids.length; start += batchSize) {
|
|
6485
|
+
assertRuntimeAuthority(this.stateDir, "WRITE");
|
|
6486
|
+
const slice = ids.slice(start, start + batchSize);
|
|
6487
|
+
const rows = await tbl.query().where(`id IN (${slice.map((id2) => `'${id2.replace(/'/g, "''")}'`).join(",")})`).toArray();
|
|
6488
|
+
const updates = [];
|
|
6489
|
+
for (const row of rows) {
|
|
6490
|
+
let diff = false;
|
|
6491
|
+
for (const [textCol, tokenCol] of fields) {
|
|
6492
|
+
const next = tokenizeToField(String(row[textCol] ?? ""));
|
|
6493
|
+
if (next !== String(row[tokenCol] ?? "")) {
|
|
6494
|
+
row[tokenCol] = next;
|
|
6495
|
+
diff = true;
|
|
6496
|
+
}
|
|
6497
|
+
}
|
|
6498
|
+
if (!diff) continue;
|
|
6499
|
+
updates.push(plainRow(row));
|
|
6500
|
+
}
|
|
6501
|
+
if (updates.length) await tbl.mergeInsert("id").whenMatchedUpdateAll().execute(updates);
|
|
6502
|
+
changed += updates.length;
|
|
6503
|
+
options.onProgress?.(Math.min(ids.length, start + batchSize), ids.length);
|
|
6504
|
+
}
|
|
6505
|
+
if (changed) await tbl.optimize();
|
|
6506
|
+
return { rows: ids.length, changed };
|
|
6507
|
+
}
|
|
6419
6508
|
/** KNN(lancedb vectorSearch:cosine 距离,score=1-distance) */
|
|
6420
6509
|
async readVisibleCandidates(kind, limit, query, method = "scan") {
|
|
6421
6510
|
let count = Math.max(1, limit);
|
|
@@ -6570,28 +6659,6 @@ var init_vector_store = __esm({
|
|
|
6570
6659
|
if (!cur || score > Number(cur._score ?? 0)) best.set(rid, r);
|
|
6571
6660
|
}
|
|
6572
6661
|
}
|
|
6573
|
-
const grams = shortCjkQueryBigrams(queryText);
|
|
6574
|
-
if (grams) {
|
|
6575
|
-
try {
|
|
6576
|
-
const textCols = BM25_TEXT_FIELDS[kind];
|
|
6577
|
-
const expr = textCols.map((col) => `(${grams.map((g) => `contains(${col}, '${sqlLiteral(g)}')`).join(" OR ")})`).join(" OR ");
|
|
6578
|
-
const where2 = compileFilter(opts.filter);
|
|
6579
|
-
const extra = await tbl.query().where(where2 ? `(${where2}) AND (${expr})` : expr).limit(topK * 3).toArray();
|
|
6580
|
-
const maxScore = [...best.values()].reduce((max, r) => Math.max(max, Number(r._score ?? 0)), 0);
|
|
6581
|
-
for (const r of extra) {
|
|
6582
|
-
const rid = String(r.id ?? "");
|
|
6583
|
-
if (!rid) continue;
|
|
6584
|
-
const text4 = textCols.map((col) => String(r[col] ?? "")).join(" ");
|
|
6585
|
-
const matched = grams.filter((gram) => text4.includes(gram)).length;
|
|
6586
|
-
if (!matched) continue;
|
|
6587
|
-
const score = maxScore + matched / grams.length;
|
|
6588
|
-
const cur = best.get(rid);
|
|
6589
|
-
if (cur) cur._score = Math.max(Number(cur._score ?? 0), score);
|
|
6590
|
-
else best.set(rid, { ...r, _score: score });
|
|
6591
|
-
}
|
|
6592
|
-
} catch {
|
|
6593
|
-
}
|
|
6594
|
-
}
|
|
6595
6662
|
return this.visibleRows(kind, [...best.values()]).filter((r) => Number(r._score ?? 0) > 0).sort((a, b) => Number(b._score ?? 0) - Number(a._score ?? 0)).slice(0, topK).map((r) => ({ ...this.toHit(kind, r), distance: 0, score: Number(r._score ?? 0) }));
|
|
6596
6663
|
} catch (err) {
|
|
6597
6664
|
const msg2 = String(err?.message ?? err);
|
|
@@ -21307,6 +21374,36 @@ var init_peer_tunnel = __esm({
|
|
|
21307
21374
|
}
|
|
21308
21375
|
});
|
|
21309
21376
|
|
|
21377
|
+
// src/cc-driver/peer-probe.ts
|
|
21378
|
+
function classifyPeerError(message) {
|
|
21379
|
+
if (/远程接入已关闭|未授权/.test(message)) return "disabled";
|
|
21380
|
+
if (/binding unavailable/i.test(message)) return "unbound";
|
|
21381
|
+
if (/fetch failed|ECONNREFUSED|ECONNRESET|EPIPE|timed? ?out|timeout|socket hang up|CC partner configuration|not configured/i.test(message)) return "hub";
|
|
21382
|
+
return "unknown";
|
|
21383
|
+
}
|
|
21384
|
+
function describePeerError(message) {
|
|
21385
|
+
switch (classifyPeerError(message)) {
|
|
21386
|
+
case "disabled":
|
|
21387
|
+
return `${message}\u2014\u2014\u8FDC\u7A0B\u63A5\u5165\u5728 CC \u4F19\u4F34\u90A3\u53F0\u673A\u5668\u4E0A\u662F\u5173\u7740\u7684\uFF0C\u53BB\u90A3\u53F0\u673A\u5668\u7684 CC \u4F19\u4F34\u9875\u70B9\u300C\u91CD\u5EFA\u8FDE\u63A5\u300D`;
|
|
21388
|
+
case "unbound":
|
|
21389
|
+
return `${message}\u2014\u2014CC \u4F19\u4F34\u90A3\u53F0\u673A\u5668\u4E0A\u6CA1\u6709\u7ED9\u8FD9\u4F4D\u4F19\u4F34\u7ED1\u5B9A CC`;
|
|
21390
|
+
case "hub":
|
|
21391
|
+
return `CC \u4F19\u4F34\u90A3\u53F0\u673A\u5668\u4E0A\u7684 hub \u6CA1\u5E94\u7B54\uFF1A${message}`;
|
|
21392
|
+
default:
|
|
21393
|
+
return message;
|
|
21394
|
+
}
|
|
21395
|
+
}
|
|
21396
|
+
function describeSshFailure(host, stderr) {
|
|
21397
|
+
return `\u8FDC\u7A0B CC \u94FE\u8DEF\u4E0D\u901A\uFF08${host}\uFF09\uFF1A${lastLine(stderr) || "SSH \u8FDE\u63A5\u5931\u8D25"}\u2014\u2014\u96A7\u9053\u65AD\u4E86\u6216 CC \u4F19\u4F34\u90A3\u53F0\u673A\u5668\u4E0A\u7684 hub \u6CA1\u5728\u8DD1\uFF0C\u6062\u590D\u540E\u4F1A\u81EA\u52A8\u8FDE\u4E0A\uFF1B\u63A7\u5236\u53F0\u300CCC \u4F19\u4F34\u300D\u9875\u53EF\u91CD\u65B0\u68C0\u6D4B`;
|
|
21398
|
+
}
|
|
21399
|
+
var lastLine;
|
|
21400
|
+
var init_peer_probe = __esm({
|
|
21401
|
+
"src/cc-driver/peer-probe.ts"() {
|
|
21402
|
+
"use strict";
|
|
21403
|
+
lastLine = (text4) => text4.split("\n").map((s) => s.trim()).filter(Boolean).at(-1) ?? "";
|
|
21404
|
+
}
|
|
21405
|
+
});
|
|
21406
|
+
|
|
21310
21407
|
// src/tools/cc-peer.ts
|
|
21311
21408
|
import { execFile as execFile2 } from "node:child_process";
|
|
21312
21409
|
import { randomUUID as randomUUID17 } from "node:crypto";
|
|
@@ -21348,15 +21445,15 @@ function callPeer(peer, ctx, input, signal) {
|
|
|
21348
21445
|
"ClearAllForwardings=yes",
|
|
21349
21446
|
peer.host,
|
|
21350
21447
|
"cc-peer"
|
|
21351
|
-
], { timeout: 8e3, maxBuffer: 160 * 1024, signal }, (error, stdout) => {
|
|
21448
|
+
], { timeout: 8e3, maxBuffer: 160 * 1024, signal }, (error, stdout, stderr) => {
|
|
21352
21449
|
if (error) {
|
|
21353
|
-
reject(new Error(
|
|
21450
|
+
reject(new Error(describeSshFailure(peer.host, String(stderr))));
|
|
21354
21451
|
return;
|
|
21355
21452
|
}
|
|
21356
21453
|
try {
|
|
21357
21454
|
const reply = JSON.parse(stdout);
|
|
21358
21455
|
if (!reply || typeof reply !== "object") throw new Error("\u8FDC\u7A0B CC \u56DE\u6267\u683C\u5F0F\u65E0\u6548");
|
|
21359
|
-
if (reply.error) throw new Error(reply.error);
|
|
21456
|
+
if (reply.error) throw new Error(describePeerError(reply.error));
|
|
21360
21457
|
resolve53(reply);
|
|
21361
21458
|
} catch (cause) {
|
|
21362
21459
|
reject(cause);
|
|
@@ -21414,6 +21511,7 @@ var init_cc_peer = __esm({
|
|
|
21414
21511
|
"use strict";
|
|
21415
21512
|
init_live();
|
|
21416
21513
|
init_peer_tunnel();
|
|
21514
|
+
init_peer_probe();
|
|
21417
21515
|
validAlias = (s) => /^[a-z0-9_-]{1,32}$/.test(s);
|
|
21418
21516
|
peerConfig = () => liveConfig.get("channels.ccDriver.remoteTargets");
|
|
21419
21517
|
asError = (error) => ({ content: error.message, isError: true });
|
|
@@ -28516,7 +28614,7 @@ var init_on_demand_recall = __esm({
|
|
|
28516
28614
|
async search(binding, args, run, signal) {
|
|
28517
28615
|
const status = (value, reason) => JSON.stringify({ historySearch: { status: value, reason } });
|
|
28518
28616
|
if (signal?.aborted) return status("aborted", "\u672C\u8F6E\u5DF2\u53D6\u6D88\u3002");
|
|
28519
|
-
if (args.mode === "agentic") return status("unavailable", "\u60C5\u611F\u8F6E\u8BF7\u7528
|
|
28617
|
+
if (args.mode === "agentic") return status("unavailable", "\u60C5\u611F\u8F6E\u8BF7\u7528 hybrid\uFF08\u4E0D\u586B mode\uFF09\u6709\u754C\u8865\u67E5\u3002");
|
|
28520
28618
|
const bounded = {
|
|
28521
28619
|
query: String(args.query ?? "").trim(),
|
|
28522
28620
|
view: args.view ?? "mixed",
|
|
@@ -36448,7 +36546,8 @@ function buildMemoryContext(store, scope, request2, clock = () => (/* @__PURE__
|
|
|
36448
36546
|
if (!resolved.has(id2)) resolved.set(id2, store.entities.resolve(scope, id2, snapshot.entityRevision, cutoff ?? void 0));
|
|
36449
36547
|
return resolved.get(id2);
|
|
36450
36548
|
};
|
|
36451
|
-
const
|
|
36549
|
+
const pool = request2.entityRef || matching.length ? matching : request2.matchedEntitiesOnly ? [] : entities;
|
|
36550
|
+
const resolvedSelection = new Set(pool.map((entity) => resolve53(entity.entityId)?.entityId));
|
|
36452
36551
|
const selected = new Set(entities.filter((entity) => resolvedSelection.has(resolve53(entity.entityId)?.entityId)).map((entity) => entity.entityId));
|
|
36453
36552
|
const context2 = {
|
|
36454
36553
|
validAt,
|
|
@@ -36459,7 +36558,7 @@ function buildMemoryContext(store, scope, request2, clock = () => (/* @__PURE__
|
|
|
36459
36558
|
historicalFacts: [],
|
|
36460
36559
|
...request2.includeProjectionStatus === false ? {} : { projections: {
|
|
36461
36560
|
pendingJobs: store.jobStatus(scope).filter((job) => ["pending", "running", "failed"].includes(job.state)).length,
|
|
36462
|
-
dirtyArtifacts: store.dependencies.dirty(scope).length,
|
|
36561
|
+
dirtyArtifacts: store.dependencies.dirty(scope, { excludeKinds: NO_REVALIDATION_KINDS }).length,
|
|
36463
36562
|
...cutoff ? { asOf: "current" } : {}
|
|
36464
36563
|
} },
|
|
36465
36564
|
futureChanges: [],
|
|
@@ -36752,6 +36851,7 @@ function attachHistoricalEvidence(store, scope, context2, request2, episodes) {
|
|
|
36752
36851
|
});
|
|
36753
36852
|
return boundMemoryContext(context2, request2.maxTokens ?? 3e3);
|
|
36754
36853
|
}
|
|
36854
|
+
var NO_REVALIDATION_KINDS;
|
|
36755
36855
|
var init_context = __esm({
|
|
36756
36856
|
"src/mem7/core/context.ts"() {
|
|
36757
36857
|
"use strict";
|
|
@@ -36764,6 +36864,7 @@ var init_context = __esm({
|
|
|
36764
36864
|
init_relationship_context();
|
|
36765
36865
|
init_read_budget();
|
|
36766
36866
|
init_fit_prefix();
|
|
36867
|
+
NO_REVALIDATION_KINDS = /* @__PURE__ */ new Set(["foresight"]);
|
|
36767
36868
|
}
|
|
36768
36869
|
});
|
|
36769
36870
|
|
|
@@ -61888,13 +61989,10 @@ var init_intent = __esm({
|
|
|
61888
61989
|
}
|
|
61889
61990
|
});
|
|
61890
61991
|
|
|
61891
|
-
// src/memory/proactive/
|
|
61892
|
-
var
|
|
61893
|
-
"src/memory/proactive/
|
|
61992
|
+
// src/memory/proactive/care-leads.ts
|
|
61993
|
+
var init_care_leads = __esm({
|
|
61994
|
+
"src/memory/proactive/care-leads.ts"() {
|
|
61894
61995
|
"use strict";
|
|
61895
|
-
init_calendar_bridge();
|
|
61896
|
-
init_intent();
|
|
61897
|
-
init_clock();
|
|
61898
61996
|
}
|
|
61899
61997
|
});
|
|
61900
61998
|
|
|
@@ -61923,7 +62021,8 @@ var init_opportunity = __esm({
|
|
|
61923
62021
|
init_read_guard();
|
|
61924
62022
|
init_scoped_opportunity();
|
|
61925
62023
|
init_published_basis();
|
|
61926
|
-
|
|
62024
|
+
init_intent();
|
|
62025
|
+
init_care_leads();
|
|
61927
62026
|
OPPORTUNITY_SCAN_INTERVAL_MS = 6 * 60 * 6e4;
|
|
61928
62027
|
FORESIGHT_CACHE_TTL_MS = 30 * 6e4;
|
|
61929
62028
|
OPPORTUNITY_DELAY_MS = 30 * 6e4;
|
|
@@ -61947,6 +62046,16 @@ var init_agent = __esm({
|
|
|
61947
62046
|
}
|
|
61948
62047
|
});
|
|
61949
62048
|
|
|
62049
|
+
// src/memory/proactive/sweep.ts
|
|
62050
|
+
var init_sweep = __esm({
|
|
62051
|
+
"src/memory/proactive/sweep.ts"() {
|
|
62052
|
+
"use strict";
|
|
62053
|
+
init_calendar_bridge();
|
|
62054
|
+
init_intent();
|
|
62055
|
+
init_clock();
|
|
62056
|
+
}
|
|
62057
|
+
});
|
|
62058
|
+
|
|
61950
62059
|
// src/memory/proactive/planning-context.ts
|
|
61951
62060
|
import { DatabaseSync as DatabaseSync14 } from "node:sqlite";
|
|
61952
62061
|
var init_planning_context = __esm({
|
|
@@ -63182,27 +63291,8 @@ function mem7RelationshipContext(binding, args, hostBudget, options = {}) {
|
|
|
63182
63291
|
});
|
|
63183
63292
|
return result;
|
|
63184
63293
|
}
|
|
63185
|
-
function boundSearchResponse(context2, episodes,
|
|
63186
|
-
|
|
63187
|
-
const budget = maxTokens ?? Math.min(64e3, 3e3 + roughTokenCountEstimation(JSON.stringify(episodes)) + 100);
|
|
63188
|
-
const exceeds = () => JSON.stringify(result).length > budget * 4 || roughTokenCountEstimation(JSON.stringify(result)) > budget;
|
|
63189
|
-
if (exceeds()) {
|
|
63190
|
-
const reserve = budget - 140 - roughTokenCountEstimation(JSON.stringify(result.episodes));
|
|
63191
|
-
try {
|
|
63192
|
-
const trimmed = boundMemoryContext(context2, Math.max(1, reserve));
|
|
63193
|
-
Object.assign(result, trimmed);
|
|
63194
|
-
if (!trimmed.relationships) delete result.relationships;
|
|
63195
|
-
result.truncated = true;
|
|
63196
|
-
} catch {
|
|
63197
|
-
for (const collection of ["pendingSources", "historicalEvidence", "historicalFacts", "hypotheses", "futureChanges", "people", "currentFacts", "conflicts", "ambiguity", "citations"]) {
|
|
63198
|
-
result[collection] = [];
|
|
63199
|
-
}
|
|
63200
|
-
delete result.relationships;
|
|
63201
|
-
result.truncated = true;
|
|
63202
|
-
}
|
|
63203
|
-
}
|
|
63204
|
-
if (result.truncated && historySearch?.status === "complete") historySearch.status = "partial";
|
|
63205
|
-
return JSON.stringify(result);
|
|
63294
|
+
function boundSearchResponse(context2, episodes, historySearch) {
|
|
63295
|
+
return JSON.stringify({ ...context2, episodes, ...historySearch ? { historySearch } : {} });
|
|
63206
63296
|
}
|
|
63207
63297
|
function searchResponse(service, request2, episodes, historySearch) {
|
|
63208
63298
|
const retained = episodes.filter((episode) => {
|
|
@@ -63246,7 +63336,7 @@ function searchResponse(service, request2, episodes, historySearch) {
|
|
|
63246
63336
|
...episode
|
|
63247
63337
|
}) => episode);
|
|
63248
63338
|
if (historySearch.status === "complete") historySearch.status = retained.length < episodes.length ? "partial" : retained.length ? "complete" : "empty";
|
|
63249
|
-
return boundSearchResponse(context2, histories,
|
|
63339
|
+
return boundSearchResponse(context2, histories, historySearch);
|
|
63250
63340
|
}
|
|
63251
63341
|
function bindingMemoryService(binding, options = {}) {
|
|
63252
63342
|
if (binding.backend !== "mem7" || !binding.stateDir) throw new Error("STORAGE_UNAVAILABLE: mem7 binding requires stateDir");
|
|
@@ -63322,7 +63412,8 @@ async function mem7Search(binding, args, options = {}) {
|
|
|
63322
63412
|
entityRef: args.entity_ref,
|
|
63323
63413
|
maxTokens: args.max_tokens,
|
|
63324
63414
|
sessionId: args.session_id,
|
|
63325
|
-
includeRelationships: false
|
|
63415
|
+
includeRelationships: false,
|
|
63416
|
+
matchedEntitiesOnly: true
|
|
63326
63417
|
};
|
|
63327
63418
|
const fresh = service.store.readTransaction(() => JSON.parse(searchResponse(
|
|
63328
63419
|
service,
|
|
@@ -63335,7 +63426,7 @@ async function mem7Search(binding, args, options = {}) {
|
|
|
63335
63426
|
else if (hits.length && ["unavailable", "timeout", "stale"].includes(result.historySearch.status)) result.historySearch.status = "partial";
|
|
63336
63427
|
result.topicsHistory = { status: retained.some((ep) => ep.history_ref) ? "complete" : "empty", method: topicsImported(binding) ? "imported_native" : hasTopicsHistory(binding) ? "fts5" : "file_selection" };
|
|
63337
63428
|
const { episodes: _episodes, ...context2 } = { ...fresh, topicsHistory: result.topicsHistory };
|
|
63338
|
-
return boundSearchResponse(context2, retained,
|
|
63429
|
+
return boundSearchResponse(context2, retained, result.historySearch);
|
|
63339
63430
|
});
|
|
63340
63431
|
}
|
|
63341
63432
|
async function searchBoundMemory(binding, args, options) {
|
|
@@ -63352,7 +63443,8 @@ async function searchBoundMemory(binding, args, options) {
|
|
|
63352
63443
|
entityRef: args.entity_ref,
|
|
63353
63444
|
maxTokens: args.max_tokens,
|
|
63354
63445
|
sessionId: args.session_id,
|
|
63355
|
-
includeRelationships: false
|
|
63446
|
+
includeRelationships: false,
|
|
63447
|
+
matchedEntitiesOnly: true
|
|
63356
63448
|
};
|
|
63357
63449
|
validateMemoryContextRequest(service.store, service.scope, request2);
|
|
63358
63450
|
recordSearchTiming("validate", validationStarted);
|
|
@@ -63376,7 +63468,6 @@ async function searchBoundMemory(binding, args, options) {
|
|
|
63376
63468
|
version: evidence.version,
|
|
63377
63469
|
publishedAt: evidence.publishedAt
|
|
63378
63470
|
})),
|
|
63379
|
-
request2.maxTokens,
|
|
63380
63471
|
{ status: context2.historicalEvidence.length ? "complete" : "empty", method: "keyword" }
|
|
63381
63472
|
);
|
|
63382
63473
|
});
|
|
@@ -63782,7 +63873,7 @@ var init_tool_contracts = __esm({
|
|
|
63782
63873
|
memory_search: { type: "object", properties: {
|
|
63783
63874
|
query: { type: "string" },
|
|
63784
63875
|
maxResults: { type: "number" },
|
|
63785
|
-
mode: { type: "string", enum: ["hybrid", "hybrid_agentic", "agentic"
|
|
63876
|
+
mode: { type: "string", enum: ["hybrid", "hybrid_agentic", "agentic"] },
|
|
63786
63877
|
strategy: { type: "string", enum: ["multi_query", "refined_query"] },
|
|
63787
63878
|
view: { type: "string", enum: ["current", "historical", "mixed"] },
|
|
63788
63879
|
valid_at: { type: "string" },
|
|
@@ -63995,7 +64086,7 @@ var init_tool_contracts = __esm({
|
|
|
63995
64086
|
};
|
|
63996
64087
|
memoryToolDescriptions = {
|
|
63997
64088
|
memory_relationship_context: "\u6309\u4EBA\u7269\u8BFB\u5404\u81EA\u89C6\u89D2\u3001\u539F\u59CB\u7ECF\u5386\u3001\u5173\u7CFB\u5224\u65AD\u53CA\u56FE\u4E2D\u8DEF\u5F84\u3002\u8FD4\u56DEtruncated\u65F6\u53EF\u6CBFcontinuationIds\u8865\u67E5\uFF0C\u5E76\u4F20\u4E0A\u6B21\u7684explorationToken\u3002\u5BBF\u4E3B\u7D2F\u8BA1\u8865\u67E5\uFF0C\u6700\u591A\u4E24\u8F6E\uFF1B\u8FC7\u671F\u6216\u91CD\u542F\u540E\u5148\u91CD\u65B0\u8BFB\u53D6\u3002\u4FDD\u7559\u6765\u6E90\u548C\u65B9\u5411\uFF0C\u8DEF\u5F84\u4E0D\u8BC1\u660E\u7AEF\u70B9\u6709\u76F4\u63A5\u5173\u7CFB\u3002",
|
|
63998
|
-
memory_search: '\u73B0\u6709\u5BF9\u8BDD\u4E0E\u8BB0\u5FC6\u4E0D\u8DB3\u4EE5\u56DE\u7B54\u5177\u4F53\u5F80\u4E8B\u3001\u65E7\u7EA6\u5B9A\u65F6\u8865\u67E5\u3002query \u5199\u4EBA\u7269/\u4E8B\u4EF6/\u65F6\u95F4\u7EBF\u7D22\
|
|
64089
|
+
memory_search: '\u73B0\u6709\u5BF9\u8BDD\u4E0E\u8BB0\u5FC6\u4E0D\u8DB3\u4EE5\u56DE\u7B54\u5177\u4F53\u5F80\u4E8B\u3001\u65E7\u7EA6\u5B9A\u65F6\u8865\u67E5\u3002query \u5199\u4EBA\u7269/\u4E8B\u4EF6/\u65F6\u95F4\u7EBF\u7D22\uFF08\u4EBA\u540D\u76F4\u63A5\u5199\uFF0C\u4E00\u4E2A\u8BCD\u6216\u51E0\u4E2A\u8BCD\u90FD\u884C\uFF09\u3002mode \u4E0D\u586B\uFF1Dhybrid\uFF08BM25+\u5411\u91CF+rerank\uFF0C\u4EBA\u540D\u548C\u8BCD\u9762\u90FD\u5728 BM25 \u91CC\uFF0C\u9ED8\u8BA4\u5C31\u7528\u5B83\uFF1B\u6CA1\u914D embedding \u65F6\u81EA\u52A8\u9000\u6210\u7EAF\u8BCD\u9762\uFF09\uFF1Bagentic \u6DF1\u5EA6\u591A\u8F6E\u3002view=mixed \u67E5\u5F53\u524D\u4E0E\u5386\u53F2\uFF0Ccurrent \u4E0D\u67E5\u5386\u53F2\u3002\u4F8B\uFF1A{"query":"\u90ED\u91D1 \u5408\u540C","view":"mixed","maxResults":5}\u3002historySearch.status\uFF1Acomplete \u67E5\u6210\u4E86\uFF1Bempty \u6CA1\u547D\u4E2D\uFF1Bpartial\uFF1D\u6709\u4E00\u90E8\u5206\u547D\u4E2D\u6CA1\u8FC7\u53EF\u89C1\u6027\u6821\u9A8C\u6216\u67D0\u4E00\u8DEF\u68C0\u7D22\u5931\u8D25\uFF0Cepisodes \u91CC\u7ED9\u7684\u662F\u6709\u6548\u7684\u90A3\u4E9B\uFF1Btimeout/unavailable/stale \u624D\u662F\u6CA1\u67E5\u6210\u3002truncated=true \u53EA\u8868\u793A\u9644\u5E26\u7684\u5F53\u524D\u4E8B\u5B9E\u8D85\u51FA\u4E86\u4E0A\u4E0B\u6587\u989D\u5EA6\uFF0C\u4E0E\u68C0\u7D22\u7ED3\u679C\u65E0\u5173\u3002method \u662F\u5B9E\u9645\u65B9\u5F0F\u3002\u9700\u8981\u539F\u8BDD\u65F6\u628A\u7ED3\u679C\u7684\u6765\u6E90 ID \u4EA4\u7ED9 memory_get\uFF1Bentity_ref \u53EA\u63A5\u53D7\u5DF2\u8FD4\u56DE\u7684\u5B9E\u4F53 ID\u3002\u5B89\u6392\u53EA\u7528 validationState=current \u7684\u786E\u5B9A\u4E8B\u5B9E\uFF1Bhistorical \u4E3A\u5F53\u65F6\u6240\u77E5\uFF0Chypotheses/pendingSources \u9700\u6838\u5BF9\uFF0CknowledgeCoverage=partial \u8868\u793A\u65E7\u5386\u53F2\u4E0D\u5B8C\u6574\u3002',
|
|
63999
64090
|
memory_get: "\u8BFB\u53D6\u767B\u8BB0\u6240\u9700\u7684\u539F\u8BDD\u4E0E\u8EAB\u4EFD\u4F9D\u636E\uFF1A\u4F20 {source_id} \u8FD4\u56DE text\u3001sourceVersion\u3001peopleUpdateReady\u3001confirmedMentions\uFF08\u5DF2\u89E3\u6790\u4EBA\u540D\uFF0C\u53EF\u590D\u5236\u4E3A identity.anchor\uFF09\u3001unresolvedMentions\uFF08\u542B mentionId\uFF0C\u7528\u4E8E memory_identity_resolve\uFF09\u3002\u4E5F\u53EF\u6309\u6C99\u7BB1 path/entry_id/\u884C\u8303\u56F4\u8BFB\u53D6\u5F53\u524D\u6761\u76EE\u3002\u65E7 topics \u590D\u5236 memory_search \u8FD4\u56DE\u7684 history_ref \u6216 path\uFF0C\u8BFB\u53D6\u7ECF\u6E05\u6D17\u5E76\u6821\u9A8C\u7248\u672C\u7684\u5386\u53F2\u7247\u6BB5\uFF1B\u65E5\u671F\u548C\u4F5C\u8005\u4EE5\u5BBF\u4E3B\u6807\u7B7E\u4E3A\u51C6\uFF0C\u6574\u7406\u7A3F\u4E0D\u8BC1\u660E\u771F\u4EBA\u539F\u8BDD\u3002\u5220\u9664\u6765\u6E90\u4E0D\u53EF\u8BFB\u3002",
|
|
64000
64091
|
memory_write: "\u5F52\u6863\u539F\u8BDD\u6216\u81EA\u5DF1\u7684\u7406\u89E3\u3002\u5BBF\u4E3B\u5DF2\u5F52\u6863\u7684\u540C\u4E00\u539F\u8BDD\u81EA\u52A8\u590D\u7528\u539F\u6765\u6E90\u548C\u56DE\u6267\uFF1B\u8865\u5B58\u65E7\u539F\u8BDD\u53EF\u6307\u5B9Asource_id\u3002\u81EA\u5DF1\u7684\u7406\u89E3\u7528role=assistant\uFF0C\u4FDD\u7559\u81EA\u5DF1\u7684\u8EAB\u4EFD\u53CA\u5BBF\u4E3B\u63D0\u4F9B\u7684\u539F\u8BDD\u4F9D\u636E\u3002\u65B0\u6765\u6E90\u8FD4\u56DEreceived\uFF1B\u89E3\u91CA\u5B8C\u6210\u524D\u4E0D\u80FD\u58F0\u79F0\u4E8B\u5B9E\u5DF2\u66F4\u65B0\u3002",
|
|
64001
64092
|
memory_people_update: peopleUpdateGuide,
|
|
@@ -67466,6 +67557,7 @@ function syncExcludeWith(mediaPolicy) {
|
|
|
67466
67557
|
const name = parts[parts.length - 1];
|
|
67467
67558
|
if (isTopicsCleaningWorkPath(relPath)) return "\u8BDD\u9898\u6E05\u6D17\u4E2D\u95F4\u6587\u4EF6\u7559\u5728\u539F\u673A";
|
|
67468
67559
|
if (parts[0] === "runtime") return "\u5F15\u64CE\u5B89\u88C5\u526F\u672C\u4E0D\u968F\u884C\uFF08\u4E91\u7AEF\u72EC\u7ACB\u5B89\u88C5\u5F53\u524D\u5F15\u64CE\uFF09";
|
|
67560
|
+
if (parts[0] === "instances") return "\u672C\u673A\u4E13\u5C5E\u5B9E\u4F8B\u4E0D\u968F\u884C\uFF08instances/ \u662F\u8FD9\u53F0\u673A\u5668\u81EA\u5DF1\u7684 CC \u4F19\u4F34 hub \u4E0E\u4EFB\u52A1\u5B9E\u4F8B\uFF0C\u4E0D\u662F\u8BB0\u5FC6\uFF09";
|
|
67469
67561
|
if (!relPath.includes("/") && (relPath === "config.json" || relPath === "secrets.env")) {
|
|
67470
67562
|
return "\u5BF9\u7AEF\u5B89\u88C5\u4EA7\u7269\u4FDD\u62A4\uFF08config \u8D70 config-remap\uFF0Csecrets \u8D70 travel-setup\uFF09";
|
|
67471
67563
|
}
|
|
@@ -67518,7 +67610,7 @@ var init_exclusions = __esm({
|
|
|
67518
67610
|
init_import_backups();
|
|
67519
67611
|
init_selfie_references();
|
|
67520
67612
|
EXCLUDED_NAMES = /* @__PURE__ */ new Set(["node_modules", ".venv", ".venvs", "venv", ".git", "__pycache__", ".cache", "cache", "caches", "tmp", "temp", ".playwright-mcp", ".DS_Store"]);
|
|
67521
|
-
EXCLUDED_TOP = /* @__PURE__ */ new Set(["logs", "diagnostics", "node_modules", "CogniFold", "everos-venv", "ollama-models", ".log-baseline.txt"]);
|
|
67613
|
+
EXCLUDED_TOP = /* @__PURE__ */ new Set(["logs", "diagnostics", "node_modules", "CogniFold", "everos-venv", "ollama-models", ".log-baseline.txt", "instances"]);
|
|
67522
67614
|
WORKSPACE_MEMORY_DIRS = /* @__PURE__ */ new Set(["topics", "memory", "inner-voice", ".calendar", ".proactive", ".system", "docs", "skills"]);
|
|
67523
67615
|
WORKSPACE_MEDIA_EXT = /\.(mp4|mov|mkv|webm|avi|m4v|flv|wmv|mpg|mpeg|mp3|wav|flac|aac|ogg|opus|m4a|zip|rar|7z|dmg|iso)$/i;
|
|
67524
67616
|
WORKSPACE_BIG_FILE_BYTES = 32 * 1024 * 1024;
|