mcp-agents-memory 0.9.0 → 0.9.2
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/build/index.js +52 -9
- package/build/migrations/005_provenance.js +1 -1
- package/build/migrations/006_canonical_validation.js +1 -1
- package/build/migrations/007_seed_real_models.js +1 -1
- package/build/migrations/008_schema_realignment.js +1 -1
- package/build/migrations/009_skills_tables.js +1 -1
- package/build/migrations/010_subject_relationships.js +1 -1
- package/build/migrations/011_memories_metadata.js +1 -1
- package/build/migrations/012_memory_sources.js +1 -1
- package/build/migrations/013_refresh_models.js +1 -1
- package/build/migrations/014_drop_legacy_facts_constraints.js +1 -1
- package/build/migrations/015_agent_provenance.js +1 -1
- package/build/migrations/016_agent_curator.js +1 -1
- package/build/migrations/017_drop_trust_weight.js +1 -1
- package/build/migrations/018_transcript_queue.js +1 -1
- package/build/migrations/019_respec_fresh_v1.js +1 -1
- package/build/migrations/020_tag_processed_and_external_uuid.js +1 -1
- package/build/migrations/021_agent_model_nullable.js +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -25788,8 +25788,8 @@ import { fileURLToPath } from "url";
|
|
|
25788
25788
|
function configSearchPaths() {
|
|
25789
25789
|
const paths = [];
|
|
25790
25790
|
if (process.env.MEMORY_CONFIG_PATH) paths.push(process.env.MEMORY_CONFIG_PATH);
|
|
25791
|
-
paths.push(path.resolve(process.cwd(), ".env"));
|
|
25792
25791
|
paths.push(path.join(os.homedir(), ".config", "mcp-agents-memory", ".env"));
|
|
25792
|
+
paths.push(path.resolve(process.cwd(), ".env"));
|
|
25793
25793
|
paths.push(path.resolve(__dirname2, "..", ".env"));
|
|
25794
25794
|
return paths;
|
|
25795
25795
|
}
|
|
@@ -55330,8 +55330,8 @@ function inferProvider(modelName) {
|
|
|
55330
55330
|
return null;
|
|
55331
55331
|
}
|
|
55332
55332
|
var DEFAULTS = {
|
|
55333
|
-
tagger: { provider: "
|
|
55334
|
-
librarian: { provider: "
|
|
55333
|
+
tagger: { provider: "xai", model_name: "grok-4-1-fast-non-reasoning" },
|
|
55334
|
+
librarian: { provider: "xai", model_name: "grok-4-1-fast-non-reasoning" }
|
|
55335
55335
|
};
|
|
55336
55336
|
function envEnvelope(role) {
|
|
55337
55337
|
const upper = role.toUpperCase();
|
|
@@ -56567,14 +56567,57 @@ var _watcher = null;
|
|
|
56567
56567
|
var _flushInProgress = false;
|
|
56568
56568
|
var _flushPending = false;
|
|
56569
56569
|
var _flushDebounceTimer = null;
|
|
56570
|
-
function
|
|
56571
|
-
|
|
56572
|
-
|
|
56570
|
+
function findProjectDir(cwd) {
|
|
56571
|
+
let subdirs;
|
|
56572
|
+
try {
|
|
56573
|
+
subdirs = fs2.readdirSync(PROJECTS_ROOT, { withFileTypes: true });
|
|
56574
|
+
} catch {
|
|
56575
|
+
return null;
|
|
56576
|
+
}
|
|
56577
|
+
for (const subdir of subdirs) {
|
|
56578
|
+
if (!subdir.isDirectory()) continue;
|
|
56579
|
+
const dirPath = path3.join(PROJECTS_ROOT, subdir.name);
|
|
56580
|
+
let files;
|
|
56581
|
+
try {
|
|
56582
|
+
files = fs2.readdirSync(dirPath, { withFileTypes: true });
|
|
56583
|
+
} catch {
|
|
56584
|
+
continue;
|
|
56585
|
+
}
|
|
56586
|
+
const jsonlFile = files.find((f) => f.isFile() && f.name.endsWith(".jsonl"));
|
|
56587
|
+
if (!jsonlFile) continue;
|
|
56588
|
+
const foundCwd = readCwdFromJsonl(path3.join(dirPath, jsonlFile.name));
|
|
56589
|
+
if (foundCwd === cwd) return dirPath;
|
|
56590
|
+
}
|
|
56591
|
+
return null;
|
|
56592
|
+
}
|
|
56593
|
+
function readCwdFromJsonl(jsonlPath) {
|
|
56594
|
+
let fd;
|
|
56595
|
+
try {
|
|
56596
|
+
fd = fs2.openSync(jsonlPath, "r");
|
|
56597
|
+
} catch {
|
|
56598
|
+
return null;
|
|
56599
|
+
}
|
|
56600
|
+
try {
|
|
56601
|
+
const buf = Buffer.alloc(2048);
|
|
56602
|
+
const bytesRead = fs2.readSync(fd, buf, 0, 2048, 0);
|
|
56603
|
+
const raw = buf.slice(0, bytesRead).toString("utf-8");
|
|
56604
|
+
for (const line of raw.split("\n")) {
|
|
56605
|
+
if (!line.trim()) continue;
|
|
56606
|
+
try {
|
|
56607
|
+
const entry = JSON.parse(line);
|
|
56608
|
+
if (typeof entry.cwd === "string") return entry.cwd;
|
|
56609
|
+
} catch {
|
|
56610
|
+
}
|
|
56611
|
+
}
|
|
56612
|
+
return null;
|
|
56613
|
+
} finally {
|
|
56614
|
+
fs2.closeSync(fd);
|
|
56615
|
+
}
|
|
56573
56616
|
}
|
|
56574
56617
|
function captureSessionStart(cwd) {
|
|
56575
|
-
const projectDir = deriveProjectDir(cwd);
|
|
56576
56618
|
_state = { cwd, projectDir: null, files: /* @__PURE__ */ new Map() };
|
|
56577
|
-
|
|
56619
|
+
const projectDir = findProjectDir(cwd);
|
|
56620
|
+
if (!projectDir) {
|
|
56578
56621
|
return;
|
|
56579
56622
|
}
|
|
56580
56623
|
_state.projectDir = projectDir;
|
|
@@ -57549,7 +57592,7 @@ Configuration is loaded from (first hit wins):
|
|
|
57549
57592
|
Required settings:
|
|
57550
57593
|
DATABASE_URL=postgres://user:pass@host:5432/db?sslmode=require (or DB_HOST + DB_USER + DB_PASS + DB_NAME)
|
|
57551
57594
|
OPENAI_API_KEY=sk-... (embedding text-embedding-3-large)
|
|
57552
|
-
|
|
57595
|
+
XAI_API_KEY=... (Cold Path tagger/librarian \u2014 grok-4-1-fast-non-reasoning default)`);
|
|
57553
57596
|
}
|
|
57554
57597
|
async function runMcpServer() {
|
|
57555
57598
|
const instructions = await buildInstructions();
|
|
@@ -25770,8 +25770,8 @@ var __dirname2 = path.dirname(fileURLToPath(import.meta.url));
|
|
|
25770
25770
|
function configSearchPaths() {
|
|
25771
25771
|
const paths = [];
|
|
25772
25772
|
if (process.env.MEMORY_CONFIG_PATH) paths.push(process.env.MEMORY_CONFIG_PATH);
|
|
25773
|
-
paths.push(path.resolve(process.cwd(), ".env"));
|
|
25774
25773
|
paths.push(path.join(os.homedir(), ".config", "mcp-agents-memory", ".env"));
|
|
25774
|
+
paths.push(path.resolve(process.cwd(), ".env"));
|
|
25775
25775
|
paths.push(path.resolve(__dirname2, "..", ".env"));
|
|
25776
25776
|
return paths;
|
|
25777
25777
|
}
|
|
@@ -25770,8 +25770,8 @@ var __dirname2 = path.dirname(fileURLToPath(import.meta.url));
|
|
|
25770
25770
|
function configSearchPaths() {
|
|
25771
25771
|
const paths = [];
|
|
25772
25772
|
if (process.env.MEMORY_CONFIG_PATH) paths.push(process.env.MEMORY_CONFIG_PATH);
|
|
25773
|
-
paths.push(path.resolve(process.cwd(), ".env"));
|
|
25774
25773
|
paths.push(path.join(os.homedir(), ".config", "mcp-agents-memory", ".env"));
|
|
25774
|
+
paths.push(path.resolve(process.cwd(), ".env"));
|
|
25775
25775
|
paths.push(path.resolve(__dirname2, "..", ".env"));
|
|
25776
25776
|
return paths;
|
|
25777
25777
|
}
|
|
@@ -25770,8 +25770,8 @@ var __dirname2 = path.dirname(fileURLToPath(import.meta.url));
|
|
|
25770
25770
|
function configSearchPaths() {
|
|
25771
25771
|
const paths = [];
|
|
25772
25772
|
if (process.env.MEMORY_CONFIG_PATH) paths.push(process.env.MEMORY_CONFIG_PATH);
|
|
25773
|
-
paths.push(path.resolve(process.cwd(), ".env"));
|
|
25774
25773
|
paths.push(path.join(os.homedir(), ".config", "mcp-agents-memory", ".env"));
|
|
25774
|
+
paths.push(path.resolve(process.cwd(), ".env"));
|
|
25775
25775
|
paths.push(path.resolve(__dirname2, "..", ".env"));
|
|
25776
25776
|
return paths;
|
|
25777
25777
|
}
|
|
@@ -25770,8 +25770,8 @@ var __dirname2 = path.dirname(fileURLToPath(import.meta.url));
|
|
|
25770
25770
|
function configSearchPaths() {
|
|
25771
25771
|
const paths = [];
|
|
25772
25772
|
if (process.env.MEMORY_CONFIG_PATH) paths.push(process.env.MEMORY_CONFIG_PATH);
|
|
25773
|
-
paths.push(path.resolve(process.cwd(), ".env"));
|
|
25774
25773
|
paths.push(path.join(os.homedir(), ".config", "mcp-agents-memory", ".env"));
|
|
25774
|
+
paths.push(path.resolve(process.cwd(), ".env"));
|
|
25775
25775
|
paths.push(path.resolve(__dirname2, "..", ".env"));
|
|
25776
25776
|
return paths;
|
|
25777
25777
|
}
|
|
@@ -25770,8 +25770,8 @@ var __dirname2 = path.dirname(fileURLToPath(import.meta.url));
|
|
|
25770
25770
|
function configSearchPaths() {
|
|
25771
25771
|
const paths = [];
|
|
25772
25772
|
if (process.env.MEMORY_CONFIG_PATH) paths.push(process.env.MEMORY_CONFIG_PATH);
|
|
25773
|
-
paths.push(path.resolve(process.cwd(), ".env"));
|
|
25774
25773
|
paths.push(path.join(os.homedir(), ".config", "mcp-agents-memory", ".env"));
|
|
25774
|
+
paths.push(path.resolve(process.cwd(), ".env"));
|
|
25775
25775
|
paths.push(path.resolve(__dirname2, "..", ".env"));
|
|
25776
25776
|
return paths;
|
|
25777
25777
|
}
|
|
@@ -25770,8 +25770,8 @@ var __dirname2 = path.dirname(fileURLToPath(import.meta.url));
|
|
|
25770
25770
|
function configSearchPaths() {
|
|
25771
25771
|
const paths = [];
|
|
25772
25772
|
if (process.env.MEMORY_CONFIG_PATH) paths.push(process.env.MEMORY_CONFIG_PATH);
|
|
25773
|
-
paths.push(path.resolve(process.cwd(), ".env"));
|
|
25774
25773
|
paths.push(path.join(os.homedir(), ".config", "mcp-agents-memory", ".env"));
|
|
25774
|
+
paths.push(path.resolve(process.cwd(), ".env"));
|
|
25775
25775
|
paths.push(path.resolve(__dirname2, "..", ".env"));
|
|
25776
25776
|
return paths;
|
|
25777
25777
|
}
|
|
@@ -25770,8 +25770,8 @@ var __dirname2 = path.dirname(fileURLToPath(import.meta.url));
|
|
|
25770
25770
|
function configSearchPaths() {
|
|
25771
25771
|
const paths = [];
|
|
25772
25772
|
if (process.env.MEMORY_CONFIG_PATH) paths.push(process.env.MEMORY_CONFIG_PATH);
|
|
25773
|
-
paths.push(path.resolve(process.cwd(), ".env"));
|
|
25774
25773
|
paths.push(path.join(os.homedir(), ".config", "mcp-agents-memory", ".env"));
|
|
25774
|
+
paths.push(path.resolve(process.cwd(), ".env"));
|
|
25775
25775
|
paths.push(path.resolve(__dirname2, "..", ".env"));
|
|
25776
25776
|
return paths;
|
|
25777
25777
|
}
|
|
@@ -25770,8 +25770,8 @@ var __dirname2 = path.dirname(fileURLToPath(import.meta.url));
|
|
|
25770
25770
|
function configSearchPaths() {
|
|
25771
25771
|
const paths = [];
|
|
25772
25772
|
if (process.env.MEMORY_CONFIG_PATH) paths.push(process.env.MEMORY_CONFIG_PATH);
|
|
25773
|
-
paths.push(path.resolve(process.cwd(), ".env"));
|
|
25774
25773
|
paths.push(path.join(os.homedir(), ".config", "mcp-agents-memory", ".env"));
|
|
25774
|
+
paths.push(path.resolve(process.cwd(), ".env"));
|
|
25775
25775
|
paths.push(path.resolve(__dirname2, "..", ".env"));
|
|
25776
25776
|
return paths;
|
|
25777
25777
|
}
|
|
@@ -25770,8 +25770,8 @@ var __dirname2 = path.dirname(fileURLToPath(import.meta.url));
|
|
|
25770
25770
|
function configSearchPaths() {
|
|
25771
25771
|
const paths = [];
|
|
25772
25772
|
if (process.env.MEMORY_CONFIG_PATH) paths.push(process.env.MEMORY_CONFIG_PATH);
|
|
25773
|
-
paths.push(path.resolve(process.cwd(), ".env"));
|
|
25774
25773
|
paths.push(path.join(os.homedir(), ".config", "mcp-agents-memory", ".env"));
|
|
25774
|
+
paths.push(path.resolve(process.cwd(), ".env"));
|
|
25775
25775
|
paths.push(path.resolve(__dirname2, "..", ".env"));
|
|
25776
25776
|
return paths;
|
|
25777
25777
|
}
|
|
@@ -25770,8 +25770,8 @@ var __dirname2 = path.dirname(fileURLToPath(import.meta.url));
|
|
|
25770
25770
|
function configSearchPaths() {
|
|
25771
25771
|
const paths = [];
|
|
25772
25772
|
if (process.env.MEMORY_CONFIG_PATH) paths.push(process.env.MEMORY_CONFIG_PATH);
|
|
25773
|
-
paths.push(path.resolve(process.cwd(), ".env"));
|
|
25774
25773
|
paths.push(path.join(os.homedir(), ".config", "mcp-agents-memory", ".env"));
|
|
25774
|
+
paths.push(path.resolve(process.cwd(), ".env"));
|
|
25775
25775
|
paths.push(path.resolve(__dirname2, "..", ".env"));
|
|
25776
25776
|
return paths;
|
|
25777
25777
|
}
|
|
@@ -25770,8 +25770,8 @@ var __dirname2 = path.dirname(fileURLToPath(import.meta.url));
|
|
|
25770
25770
|
function configSearchPaths() {
|
|
25771
25771
|
const paths = [];
|
|
25772
25772
|
if (process.env.MEMORY_CONFIG_PATH) paths.push(process.env.MEMORY_CONFIG_PATH);
|
|
25773
|
-
paths.push(path.resolve(process.cwd(), ".env"));
|
|
25774
25773
|
paths.push(path.join(os.homedir(), ".config", "mcp-agents-memory", ".env"));
|
|
25774
|
+
paths.push(path.resolve(process.cwd(), ".env"));
|
|
25775
25775
|
paths.push(path.resolve(__dirname2, "..", ".env"));
|
|
25776
25776
|
return paths;
|
|
25777
25777
|
}
|
|
@@ -25770,8 +25770,8 @@ var __dirname2 = path.dirname(fileURLToPath(import.meta.url));
|
|
|
25770
25770
|
function configSearchPaths() {
|
|
25771
25771
|
const paths = [];
|
|
25772
25772
|
if (process.env.MEMORY_CONFIG_PATH) paths.push(process.env.MEMORY_CONFIG_PATH);
|
|
25773
|
-
paths.push(path.resolve(process.cwd(), ".env"));
|
|
25774
25773
|
paths.push(path.join(os.homedir(), ".config", "mcp-agents-memory", ".env"));
|
|
25774
|
+
paths.push(path.resolve(process.cwd(), ".env"));
|
|
25775
25775
|
paths.push(path.resolve(__dirname2, "..", ".env"));
|
|
25776
25776
|
return paths;
|
|
25777
25777
|
}
|
|
@@ -25770,8 +25770,8 @@ var __dirname2 = path.dirname(fileURLToPath(import.meta.url));
|
|
|
25770
25770
|
function configSearchPaths() {
|
|
25771
25771
|
const paths = [];
|
|
25772
25772
|
if (process.env.MEMORY_CONFIG_PATH) paths.push(process.env.MEMORY_CONFIG_PATH);
|
|
25773
|
-
paths.push(path.resolve(process.cwd(), ".env"));
|
|
25774
25773
|
paths.push(path.join(os.homedir(), ".config", "mcp-agents-memory", ".env"));
|
|
25774
|
+
paths.push(path.resolve(process.cwd(), ".env"));
|
|
25775
25775
|
paths.push(path.resolve(__dirname2, "..", ".env"));
|
|
25776
25776
|
return paths;
|
|
25777
25777
|
}
|
|
@@ -25770,8 +25770,8 @@ var __dirname2 = path.dirname(fileURLToPath(import.meta.url));
|
|
|
25770
25770
|
function configSearchPaths() {
|
|
25771
25771
|
const paths = [];
|
|
25772
25772
|
if (process.env.MEMORY_CONFIG_PATH) paths.push(process.env.MEMORY_CONFIG_PATH);
|
|
25773
|
-
paths.push(path.resolve(process.cwd(), ".env"));
|
|
25774
25773
|
paths.push(path.join(os.homedir(), ".config", "mcp-agents-memory", ".env"));
|
|
25774
|
+
paths.push(path.resolve(process.cwd(), ".env"));
|
|
25775
25775
|
paths.push(path.resolve(__dirname2, "..", ".env"));
|
|
25776
25776
|
return paths;
|
|
25777
25777
|
}
|
|
@@ -25770,8 +25770,8 @@ var __dirname2 = path.dirname(fileURLToPath(import.meta.url));
|
|
|
25770
25770
|
function configSearchPaths() {
|
|
25771
25771
|
const paths = [];
|
|
25772
25772
|
if (process.env.MEMORY_CONFIG_PATH) paths.push(process.env.MEMORY_CONFIG_PATH);
|
|
25773
|
-
paths.push(path.resolve(process.cwd(), ".env"));
|
|
25774
25773
|
paths.push(path.join(os.homedir(), ".config", "mcp-agents-memory", ".env"));
|
|
25774
|
+
paths.push(path.resolve(process.cwd(), ".env"));
|
|
25775
25775
|
paths.push(path.resolve(__dirname2, "..", ".env"));
|
|
25776
25776
|
return paths;
|
|
25777
25777
|
}
|
|
@@ -25770,8 +25770,8 @@ var __dirname2 = path.dirname(fileURLToPath(import.meta.url));
|
|
|
25770
25770
|
function configSearchPaths() {
|
|
25771
25771
|
const paths = [];
|
|
25772
25772
|
if (process.env.MEMORY_CONFIG_PATH) paths.push(process.env.MEMORY_CONFIG_PATH);
|
|
25773
|
-
paths.push(path.resolve(process.cwd(), ".env"));
|
|
25774
25773
|
paths.push(path.join(os.homedir(), ".config", "mcp-agents-memory", ".env"));
|
|
25774
|
+
paths.push(path.resolve(process.cwd(), ".env"));
|
|
25775
25775
|
paths.push(path.resolve(__dirname2, "..", ".env"));
|
|
25776
25776
|
return paths;
|
|
25777
25777
|
}
|
|
@@ -25770,8 +25770,8 @@ var __dirname2 = path.dirname(fileURLToPath(import.meta.url));
|
|
|
25770
25770
|
function configSearchPaths() {
|
|
25771
25771
|
const paths = [];
|
|
25772
25772
|
if (process.env.MEMORY_CONFIG_PATH) paths.push(process.env.MEMORY_CONFIG_PATH);
|
|
25773
|
-
paths.push(path.resolve(process.cwd(), ".env"));
|
|
25774
25773
|
paths.push(path.join(os.homedir(), ".config", "mcp-agents-memory", ".env"));
|
|
25774
|
+
paths.push(path.resolve(process.cwd(), ".env"));
|
|
25775
25775
|
paths.push(path.resolve(__dirname2, "..", ".env"));
|
|
25776
25776
|
return paths;
|
|
25777
25777
|
}
|