memorix 1.8.1 → 1.8.3
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/CHANGELOG.md +36 -0
- package/dist/cli/index.js +577 -58
- package/dist/index.js +832 -321
- package/dist/maintenance-runner.js +31 -25
- package/dist/media-audio-runner.js +31 -25
- package/dist/media-video-runner.js +31 -25
- package/dist/memcode-runtime/CHANGELOG.md +36 -0
- package/dist/sdk.js +585 -315
- package/dist/vector-backfill-runner.js +31 -25
- package/docs/1.2.0-PROVIDER-QUALITY.md +15 -6
- package/docs/1.3.3-MULTIMODAL-MEDIA-AND-MCP-COMPAT.md +7 -6
- package/docs/1.8.0-RELEASE-CANDIDATE-SPEC.md +13 -8
- package/docs/API_REFERENCE.md +14 -11
- package/docs/CONFIGURATION.md +2 -2
- package/docs/DEVELOPMENT.md +3 -2
- package/docs/README.md +13 -7
- package/package.json +2 -1
- package/plugins/antigravity/memorix/plugin.json +2 -1
- package/plugins/claude/memorix/.claude-plugin/plugin.json +1 -1
- package/plugins/codebuddy/memorix/.codebuddy-plugin/plugin.json +1 -1
- package/plugins/codex/memorix/.codex-plugin/plugin.json +1 -1
- package/plugins/copilot/memorix/plugin.json +1 -1
- package/plugins/gemini/memorix/gemini-extension.json +1 -1
- package/plugins/hermes/memorix/plugin.yaml +1 -1
- package/plugins/omp/memorix/package.json +1 -1
- package/plugins/openclaw/memorix/.codex-plugin/plugin.json +1 -1
- package/plugins/pi/memorix/package.json +1 -1
- package/server.json +3 -3
- package/src/cli/commands/serve-http.ts +10 -2
- package/src/cli/commands/serve.ts +26 -7
- package/src/codegraph/external-provider.ts +299 -19
- package/src/config/dotenv-loader.ts +9 -4
- package/src/config.ts +16 -16
- package/src/dashboard/maintenance.ts +4 -1
- package/src/llm/provider.ts +17 -4
- package/src/server/mcp-compat.ts +63 -0
- package/src/server/mcp-diagnostics.ts +13 -4
- package/src/server/mcp-discovery.ts +61 -0
- package/src/server/stdio-startup-gate.ts +263 -0
- package/src/server.ts +4 -4
package/dist/sdk.js
CHANGED
|
@@ -3267,8 +3267,10 @@ function loadEnvFile(filePath) {
|
|
|
3267
3267
|
loadedEnvFiles.push(filePath);
|
|
3268
3268
|
}
|
|
3269
3269
|
function loadDotenv(projectRoot, options = {}) {
|
|
3270
|
-
|
|
3271
|
-
|
|
3270
|
+
const userHomeDir = options.userHomeDir ?? homedir4();
|
|
3271
|
+
const normalizedProjectRoot = projectRoot ?? null;
|
|
3272
|
+
if (dotenvLoaded && dotenvProjectRoot === normalizedProjectRoot && dotenvHomeDir === userHomeDir) return;
|
|
3273
|
+
if (dotenvLoaded && (dotenvProjectRoot !== normalizedProjectRoot || dotenvHomeDir !== userHomeDir)) {
|
|
3272
3274
|
resetDotenv();
|
|
3273
3275
|
}
|
|
3274
3276
|
loadedEnvFiles.length = 0;
|
|
@@ -3277,9 +3279,10 @@ function loadDotenv(projectRoot, options = {}) {
|
|
|
3277
3279
|
if (projectRoot) {
|
|
3278
3280
|
loadEnvFile(getProjectDotenvPath(projectRoot));
|
|
3279
3281
|
}
|
|
3280
|
-
loadEnvFile(getGlobalDotenvPath(
|
|
3282
|
+
loadEnvFile(getGlobalDotenvPath(userHomeDir));
|
|
3281
3283
|
dotenvLoaded = true;
|
|
3282
|
-
dotenvProjectRoot =
|
|
3284
|
+
dotenvProjectRoot = normalizedProjectRoot;
|
|
3285
|
+
dotenvHomeDir = userHomeDir;
|
|
3283
3286
|
}
|
|
3284
3287
|
function resetDotenv() {
|
|
3285
3288
|
for (const key of injectedKeys) {
|
|
@@ -3288,6 +3291,7 @@ function resetDotenv() {
|
|
|
3288
3291
|
injectedKeys.clear();
|
|
3289
3292
|
dotenvLoaded = false;
|
|
3290
3293
|
dotenvProjectRoot = null;
|
|
3294
|
+
dotenvHomeDir = null;
|
|
3291
3295
|
loadedEnvFiles.length = 0;
|
|
3292
3296
|
loadedEnvKeys.clear();
|
|
3293
3297
|
}
|
|
@@ -3300,7 +3304,7 @@ function getLoadedEnvKeys() {
|
|
|
3300
3304
|
function getLoadedEnvValue(key) {
|
|
3301
3305
|
return loadedEnvValues.get(key);
|
|
3302
3306
|
}
|
|
3303
|
-
var dotenvLoaded, dotenvProjectRoot, loadedEnvFiles, loadedEnvKeys, loadedEnvValues, injectedKeys;
|
|
3307
|
+
var dotenvLoaded, dotenvProjectRoot, dotenvHomeDir, loadedEnvFiles, loadedEnvKeys, loadedEnvValues, injectedKeys;
|
|
3304
3308
|
var init_dotenv_loader = __esm({
|
|
3305
3309
|
"src/config/dotenv-loader.ts"() {
|
|
3306
3310
|
"use strict";
|
|
@@ -3308,6 +3312,7 @@ var init_dotenv_loader = __esm({
|
|
|
3308
3312
|
init_config_paths();
|
|
3309
3313
|
dotenvLoaded = false;
|
|
3310
3314
|
dotenvProjectRoot = null;
|
|
3315
|
+
dotenvHomeDir = null;
|
|
3311
3316
|
loadedEnvFiles = [];
|
|
3312
3317
|
loadedEnvKeys = /* @__PURE__ */ new Set();
|
|
3313
3318
|
loadedEnvValues = /* @__PURE__ */ new Map();
|
|
@@ -3659,33 +3664,33 @@ __export(config_exports, {
|
|
|
3659
3664
|
resetConfigCache: () => resetConfigCache,
|
|
3660
3665
|
resetDotenv: () => resetDotenv
|
|
3661
3666
|
});
|
|
3662
|
-
function getLLMApiKey() {
|
|
3663
|
-
return getResolvedMemoryLane().llm.apiKey;
|
|
3667
|
+
function getLLMApiKey(options = {}) {
|
|
3668
|
+
return getResolvedMemoryLane(options).llm.apiKey;
|
|
3664
3669
|
}
|
|
3665
|
-
function getLLMProvider() {
|
|
3666
|
-
const provider2 = getResolvedMemoryLane().llm.provider;
|
|
3670
|
+
function getLLMProvider(options = {}) {
|
|
3671
|
+
const provider2 = getResolvedMemoryLane(options).llm.provider;
|
|
3667
3672
|
if (provider2) return provider2;
|
|
3668
3673
|
if (process.env.ANTHROPIC_API_KEY && !process.env.OPENAI_API_KEY) return "anthropic";
|
|
3669
3674
|
if (process.env.OPENROUTER_API_KEY && !process.env.OPENAI_API_KEY) return "openrouter";
|
|
3670
3675
|
return "openai";
|
|
3671
3676
|
}
|
|
3672
|
-
function getLLMModel(providerDefault) {
|
|
3673
|
-
return getResolvedMemoryLane().llm.model || providerDefault;
|
|
3677
|
+
function getLLMModel(providerDefault, options = {}) {
|
|
3678
|
+
return getResolvedMemoryLane(options).llm.model || providerDefault;
|
|
3674
3679
|
}
|
|
3675
|
-
function getLLMBaseUrl(providerDefault) {
|
|
3676
|
-
return getResolvedMemoryLane().llm.baseUrl || providerDefault;
|
|
3680
|
+
function getLLMBaseUrl(providerDefault, options = {}) {
|
|
3681
|
+
return getResolvedMemoryLane(options).llm.baseUrl || providerDefault;
|
|
3677
3682
|
}
|
|
3678
|
-
function getAgentLLMApiKey() {
|
|
3679
|
-
return getResolvedAgentLane().apiKey;
|
|
3683
|
+
function getAgentLLMApiKey(options = {}) {
|
|
3684
|
+
return getResolvedAgentLane(options).apiKey;
|
|
3680
3685
|
}
|
|
3681
|
-
function getAgentLLMProvider() {
|
|
3682
|
-
return getResolvedAgentLane().provider || getLLMProvider();
|
|
3686
|
+
function getAgentLLMProvider(options = {}) {
|
|
3687
|
+
return getResolvedAgentLane(options).provider || getLLMProvider(options);
|
|
3683
3688
|
}
|
|
3684
|
-
function getAgentLLMModel(providerDefault) {
|
|
3685
|
-
return getResolvedAgentLane().model || getLLMModel(providerDefault);
|
|
3689
|
+
function getAgentLLMModel(providerDefault, options = {}) {
|
|
3690
|
+
return getResolvedAgentLane(options).model || getLLMModel(providerDefault, options);
|
|
3686
3691
|
}
|
|
3687
|
-
function getAgentLLMBaseUrl(providerDefault) {
|
|
3688
|
-
return getResolvedAgentLane().baseUrl || getLLMBaseUrl(providerDefault);
|
|
3692
|
+
function getAgentLLMBaseUrl(providerDefault, options = {}) {
|
|
3693
|
+
return getResolvedAgentLane(options).baseUrl || getLLMBaseUrl(providerDefault, options);
|
|
3689
3694
|
}
|
|
3690
3695
|
function getEmbeddingMode() {
|
|
3691
3696
|
const provider2 = getResolvedEmbeddingLane().provider?.toLowerCase()?.trim();
|
|
@@ -5944,18 +5949,19 @@ async function* callLLMWithToolsStream(messages, tools) {
|
|
|
5944
5949
|
}
|
|
5945
5950
|
function initLLM(options = {}) {
|
|
5946
5951
|
const scope = options.scope ?? "memory";
|
|
5947
|
-
const
|
|
5952
|
+
const configOptions = { projectRoot: options.projectRoot, homeDir: options.homeDir };
|
|
5953
|
+
const apiKey = scope === "agent" ? getAgentLLMApiKey(configOptions) : getLLMApiKey(configOptions);
|
|
5948
5954
|
if (!apiKey) {
|
|
5949
5955
|
currentConfig = null;
|
|
5950
5956
|
return null;
|
|
5951
5957
|
}
|
|
5952
|
-
const provider2 = scope === "agent" ? getAgentLLMProvider() : getLLMProvider();
|
|
5958
|
+
const provider2 = scope === "agent" ? getAgentLLMProvider(configOptions) : getLLMProvider(configOptions);
|
|
5953
5959
|
const defaults2 = PROVIDER_DEFAULTS[provider2] ?? PROVIDER_DEFAULTS.openai;
|
|
5954
5960
|
currentConfig = {
|
|
5955
5961
|
provider: provider2,
|
|
5956
5962
|
apiKey,
|
|
5957
|
-
model: scope === "agent" ? getAgentLLMModel(defaults2.model) : getLLMModel(defaults2.model),
|
|
5958
|
-
baseUrl: scope === "agent" ? getAgentLLMBaseUrl(defaults2.baseUrl) : getLLMBaseUrl(defaults2.baseUrl)
|
|
5963
|
+
model: scope === "agent" ? getAgentLLMModel(defaults2.model, configOptions) : getLLMModel(defaults2.model, configOptions),
|
|
5964
|
+
baseUrl: scope === "agent" ? getAgentLLMBaseUrl(defaults2.baseUrl, configOptions) : getLLMBaseUrl(defaults2.baseUrl, configOptions)
|
|
5959
5965
|
};
|
|
5960
5966
|
return currentConfig;
|
|
5961
5967
|
}
|
|
@@ -65975,11 +65981,11 @@ var require_bignumber = __commonJS({
|
|
|
65975
65981
|
return n > 0 || n === i2 ? i2 : i2 - 1;
|
|
65976
65982
|
}
|
|
65977
65983
|
function coeffToString(a) {
|
|
65978
|
-
var s2,
|
|
65984
|
+
var s2, z628, i2 = 1, j = a.length, r2 = a[0] + "";
|
|
65979
65985
|
for (; i2 < j; ) {
|
|
65980
65986
|
s2 = a[i2++] + "";
|
|
65981
|
-
|
|
65982
|
-
for (;
|
|
65987
|
+
z628 = LOG_BASE - s2.length;
|
|
65988
|
+
for (; z628--; s2 = "0" + s2) ;
|
|
65983
65989
|
r2 += s2;
|
|
65984
65990
|
}
|
|
65985
65991
|
for (j = r2.length; r2.charCodeAt(--j) === 48; ) ;
|
|
@@ -66012,15 +66018,15 @@ var require_bignumber = __commonJS({
|
|
|
66012
66018
|
function toExponential(str2, e2) {
|
|
66013
66019
|
return (str2.length > 1 ? str2.charAt(0) + "." + str2.slice(1) : str2) + (e2 < 0 ? "e" : "e+") + e2;
|
|
66014
66020
|
}
|
|
66015
|
-
function toFixedPoint(str2, e2,
|
|
66021
|
+
function toFixedPoint(str2, e2, z628) {
|
|
66016
66022
|
var len, zs;
|
|
66017
66023
|
if (e2 < 0) {
|
|
66018
|
-
for (zs =
|
|
66024
|
+
for (zs = z628 + "."; ++e2; zs += z628) ;
|
|
66019
66025
|
str2 = zs + str2;
|
|
66020
66026
|
} else {
|
|
66021
66027
|
len = str2.length;
|
|
66022
66028
|
if (++e2 > len) {
|
|
66023
|
-
for (zs =
|
|
66029
|
+
for (zs = z628, e2 -= len; --e2; zs += z628) ;
|
|
66024
66030
|
str2 += zs;
|
|
66025
66031
|
} else if (e2 < len) {
|
|
66026
66032
|
str2 = str2.slice(0, e2) + "." + str2.slice(e2);
|
|
@@ -155820,6 +155826,27 @@ function unavailableHealth(result) {
|
|
|
155820
155826
|
if (result.outputLimited) return { state: "invalid", reason: "A local CodeGraph response exceeded the safety limit." };
|
|
155821
155827
|
return { state: "unavailable", reason: "A local CodeGraph command did not complete." };
|
|
155822
155828
|
}
|
|
155829
|
+
function notAttemptedDiagnostic(command) {
|
|
155830
|
+
return { command, attempted: false, outcome: "not-attempted" };
|
|
155831
|
+
}
|
|
155832
|
+
function commandDiagnostic(command, result, outcome, reason) {
|
|
155833
|
+
return {
|
|
155834
|
+
command,
|
|
155835
|
+
attempted: true,
|
|
155836
|
+
outcome,
|
|
155837
|
+
...typeof result.exitCode === "number" ? { exitCode: result.exitCode } : {},
|
|
155838
|
+
...reason ? { reason: sanitizeCredentials(reason).slice(0, 240) } : {}
|
|
155839
|
+
};
|
|
155840
|
+
}
|
|
155841
|
+
function failedCommandDiagnostic(command, result) {
|
|
155842
|
+
const outcome = result.timedOut ? "timed-out" : result.outputLimited ? "output-limited" : "failed";
|
|
155843
|
+
return commandDiagnostic(
|
|
155844
|
+
command,
|
|
155845
|
+
result,
|
|
155846
|
+
outcome,
|
|
155847
|
+
result.error || result.stderr || "CodeGraph command did not complete."
|
|
155848
|
+
);
|
|
155849
|
+
}
|
|
155823
155850
|
async function runSafely(runner, input) {
|
|
155824
155851
|
try {
|
|
155825
155852
|
return await runner.run(input);
|
|
@@ -155969,6 +155996,7 @@ function parseOutline(value, projectRoot, exclude) {
|
|
|
155969
155996
|
if (nodes.some((node) => !node)) return void 0;
|
|
155970
155997
|
const byId = /* @__PURE__ */ new Map();
|
|
155971
155998
|
for (const node of nodes) {
|
|
155999
|
+
if (byId.has(node.id)) return void 0;
|
|
155972
156000
|
byId.set(node.id, externalSymbol(node));
|
|
155973
156001
|
}
|
|
155974
156002
|
const entryPoints = value.entryPoints.map((item) => parseNode(item, projectRoot, exclude)).filter((node) => Boolean(node)).map(externalSymbol).filter((node, index, items) => items.findIndex((item) => item.id === node.id) === index).slice(0, 5);
|
|
@@ -155982,7 +156010,7 @@ function parseOutline(value, projectRoot, exclude) {
|
|
|
155982
156010
|
if (!source || !target || !kind || rawEdge.line !== void 0 && (!line || line < 1)) return void 0;
|
|
155983
156011
|
const from = byId.get(source);
|
|
155984
156012
|
const to = byId.get(target);
|
|
155985
|
-
if (!from || !to)
|
|
156013
|
+
if (!from || !to) return void 0;
|
|
155986
156014
|
relations.push({ from, to, kind, ...line ? { line } : {} });
|
|
155987
156015
|
}
|
|
155988
156016
|
const relatedFiles = value.relatedFiles.map((item) => safeRelativePath(projectRoot, item, exclude));
|
|
@@ -156000,45 +156028,234 @@ function parseOutline(value, projectRoot, exclude) {
|
|
|
156000
156028
|
stats: { nodes: nodeCount, edges: edgeCount, files: fileCount }
|
|
156001
156029
|
};
|
|
156002
156030
|
}
|
|
156031
|
+
function parseTextLocation(value) {
|
|
156032
|
+
const match2 = value.trim().match(/^(.*?)(?::([1-9]\d*))?$/);
|
|
156033
|
+
if (!match2?.[1]) return void 0;
|
|
156034
|
+
return {
|
|
156035
|
+
filePath: match2[1].trim(),
|
|
156036
|
+
...match2[2] ? { line: Number(match2[2]) } : {}
|
|
156037
|
+
};
|
|
156038
|
+
}
|
|
156039
|
+
function parseExploreText(value, projectRoot, exclude) {
|
|
156040
|
+
if (!value.trim() || Buffer.byteLength(value, "utf8") > MAX_EXTERNAL_CODEGRAPH_OUTPUT_BYTES) return void 0;
|
|
156041
|
+
const entryPoints = [];
|
|
156042
|
+
const nodes = [];
|
|
156043
|
+
const relatedFiles = /* @__PURE__ */ new Set();
|
|
156044
|
+
const byName = /* @__PURE__ */ new Map();
|
|
156045
|
+
let section = null;
|
|
156046
|
+
let relationKind = "references";
|
|
156047
|
+
const addNode = (node, entry) => {
|
|
156048
|
+
const key = `${node.filePath}\0${node.name}`;
|
|
156049
|
+
const existing = byName.get(key);
|
|
156050
|
+
if (existing) return;
|
|
156051
|
+
byName.set(key, node);
|
|
156052
|
+
relatedFiles.add(node.filePath);
|
|
156053
|
+
(entry ? entryPoints : nodes).push(node);
|
|
156054
|
+
};
|
|
156055
|
+
for (const rawLine of value.split(/\r?\n/)) {
|
|
156056
|
+
const line = rawLine.trim();
|
|
156057
|
+
const fileHeader = line.match(/^\*\*`([^`]+)`\*\*\s+(?:—|-)\s+(.+)$/);
|
|
156058
|
+
if (fileHeader) {
|
|
156059
|
+
const filePath = safeRelativePath(projectRoot, fileHeader[1], exclude);
|
|
156060
|
+
if (!filePath) return void 0;
|
|
156061
|
+
const symbolText = fileHeader[2].split(/\s+·\s+/, 1)[0] ?? "";
|
|
156062
|
+
const symbols = [...symbolText.matchAll(/([^,]+?)\(([^()]+)\)/g)];
|
|
156063
|
+
if (symbols.length === 0) return void 0;
|
|
156064
|
+
const isFirstFile = entryPoints.length === 0 && nodes.length === 0;
|
|
156065
|
+
for (const symbol of symbols.slice(0, MAX_EXTERNAL_NODE_COUNT)) {
|
|
156066
|
+
const name = symbol[1]?.trim();
|
|
156067
|
+
const kind = symbol[2]?.trim();
|
|
156068
|
+
if (!name || !kind) return void 0;
|
|
156069
|
+
addNode({
|
|
156070
|
+
id: `explore:${filePath}:${name}`,
|
|
156071
|
+
kind,
|
|
156072
|
+
name,
|
|
156073
|
+
filePath
|
|
156074
|
+
}, isFirstFile);
|
|
156075
|
+
}
|
|
156076
|
+
section = null;
|
|
156077
|
+
continue;
|
|
156078
|
+
}
|
|
156079
|
+
if (/^#{2,3}\s+Entry Points?\b/i.test(line)) {
|
|
156080
|
+
section = "entry";
|
|
156081
|
+
continue;
|
|
156082
|
+
}
|
|
156083
|
+
if (/^#{2,3}\s+Related Symbols?\b/i.test(line)) {
|
|
156084
|
+
section = "related";
|
|
156085
|
+
continue;
|
|
156086
|
+
}
|
|
156087
|
+
if (/^\*\*Relationships\*\*$/i.test(line)) {
|
|
156088
|
+
section = "relationships";
|
|
156089
|
+
continue;
|
|
156090
|
+
}
|
|
156091
|
+
if (/^\*\*(?:Source Code|Code)\*\*$/i.test(line) || /^#{2,3}\s+/i.test(line)) {
|
|
156092
|
+
section = null;
|
|
156093
|
+
continue;
|
|
156094
|
+
}
|
|
156095
|
+
if (section === "entry") {
|
|
156096
|
+
const match2 = line.match(/^-\s+\*\*(.+?)\*\*\s+\(([^)]+)\)\s+-\s+(.+)$/);
|
|
156097
|
+
if (!match2) continue;
|
|
156098
|
+
const location = parseTextLocation(match2[3]);
|
|
156099
|
+
if (!location) return void 0;
|
|
156100
|
+
const filePath = safeRelativePath(projectRoot, location.filePath, exclude);
|
|
156101
|
+
if (!filePath) return void 0;
|
|
156102
|
+
addNode({
|
|
156103
|
+
id: `explore:${filePath}:${match2[1]}`,
|
|
156104
|
+
kind: match2[2],
|
|
156105
|
+
name: match2[1],
|
|
156106
|
+
filePath,
|
|
156107
|
+
...location.line ? { startLine: location.line, endLine: location.line } : {}
|
|
156108
|
+
}, true);
|
|
156109
|
+
continue;
|
|
156110
|
+
}
|
|
156111
|
+
if (section === "related") {
|
|
156112
|
+
const match2 = line.match(/^-\s+([^:]+):\s+(.+)$/);
|
|
156113
|
+
if (!match2) continue;
|
|
156114
|
+
const filePath = safeRelativePath(projectRoot, match2[1], exclude);
|
|
156115
|
+
if (!filePath) return void 0;
|
|
156116
|
+
relatedFiles.add(filePath);
|
|
156117
|
+
for (const rawSymbol of match2[2].split(",")) {
|
|
156118
|
+
const symbol = rawSymbol.trim().match(/^(.+?)(?::([1-9]\d*))?$/);
|
|
156119
|
+
if (!symbol?.[1]) return void 0;
|
|
156120
|
+
addNode({
|
|
156121
|
+
id: `explore:${filePath}:${symbol[1].trim()}`,
|
|
156122
|
+
kind: "unknown",
|
|
156123
|
+
name: symbol[1].trim(),
|
|
156124
|
+
filePath,
|
|
156125
|
+
...symbol[2] ? { startLine: Number(symbol[2]), endLine: Number(symbol[2]) } : {}
|
|
156126
|
+
}, false);
|
|
156127
|
+
}
|
|
156128
|
+
continue;
|
|
156129
|
+
}
|
|
156130
|
+
if (section === "relationships") {
|
|
156131
|
+
const kind = line.match(/^\*\*([^*]+):\*\*$/);
|
|
156132
|
+
if (kind?.[1]) {
|
|
156133
|
+
relationKind = kind[1].trim();
|
|
156134
|
+
continue;
|
|
156135
|
+
}
|
|
156136
|
+
}
|
|
156137
|
+
}
|
|
156138
|
+
const bySymbolName = /* @__PURE__ */ new Map();
|
|
156139
|
+
for (const node of [...entryPoints, ...nodes]) {
|
|
156140
|
+
if (!bySymbolName.has(node.name)) bySymbolName.set(node.name, node);
|
|
156141
|
+
}
|
|
156142
|
+
const relations = [];
|
|
156143
|
+
if (section === "relationships") {
|
|
156144
|
+
for (const rawLine of value.split(/\r?\n/)) {
|
|
156145
|
+
const line = rawLine.trim();
|
|
156146
|
+
const match2 = line.match(/^-\s+(.+?)\s+(?:\u2192|->)\s+(.+)$/);
|
|
156147
|
+
if (!match2) continue;
|
|
156148
|
+
const from = bySymbolName.get(match2[1].trim());
|
|
156149
|
+
const to = bySymbolName.get(match2[2].trim());
|
|
156150
|
+
if (!from || !to) continue;
|
|
156151
|
+
relations.push({
|
|
156152
|
+
from: externalSymbol(from),
|
|
156153
|
+
to: externalSymbol(to),
|
|
156154
|
+
kind: relationKind
|
|
156155
|
+
});
|
|
156156
|
+
}
|
|
156157
|
+
} else {
|
|
156158
|
+
const relationshipStart = value.split(/\r?\n/).findIndex((line) => /^\s*\*\*Relationships\*\*\s*$/i.test(line));
|
|
156159
|
+
if (relationshipStart >= 0) {
|
|
156160
|
+
const relationshipLines = value.split(/\r?\n/).slice(relationshipStart + 1);
|
|
156161
|
+
for (const rawLine of relationshipLines) {
|
|
156162
|
+
const line = rawLine.trim();
|
|
156163
|
+
if (/^\*\*(?:Source Code|Code)\*\*$/i.test(line) || /^#{2,3}\s+/i.test(line)) break;
|
|
156164
|
+
const kind = line.match(/^\*\*([^*]+):\*\*$/);
|
|
156165
|
+
if (kind?.[1]) {
|
|
156166
|
+
relationKind = kind[1].trim();
|
|
156167
|
+
continue;
|
|
156168
|
+
}
|
|
156169
|
+
const match2 = line.match(/^-\s+(.+?)\s+(?:\u2192|->)\s+(.+)$/);
|
|
156170
|
+
if (!match2) continue;
|
|
156171
|
+
const from = bySymbolName.get(match2[1].trim());
|
|
156172
|
+
const to = bySymbolName.get(match2[2].trim());
|
|
156173
|
+
if (from && to) relations.push({ from: externalSymbol(from), to: externalSymbol(to), kind: relationKind });
|
|
156174
|
+
}
|
|
156175
|
+
}
|
|
156176
|
+
}
|
|
156177
|
+
const allNodes = [...entryPoints, ...nodes];
|
|
156178
|
+
if (allNodes.length === 0) return void 0;
|
|
156179
|
+
return {
|
|
156180
|
+
provider: "external",
|
|
156181
|
+
entryPoints: entryPoints.map(externalSymbol).slice(0, 5),
|
|
156182
|
+
relations: relations.slice(0, 6),
|
|
156183
|
+
relatedFiles: [...relatedFiles].slice(0, 5),
|
|
156184
|
+
stats: {
|
|
156185
|
+
nodes: allNodes.length,
|
|
156186
|
+
edges: relations.length,
|
|
156187
|
+
files: relatedFiles.size
|
|
156188
|
+
}
|
|
156189
|
+
};
|
|
156190
|
+
}
|
|
156191
|
+
function parseExplorePayload(value, projectRoot, exclude) {
|
|
156192
|
+
if (typeof value === "string") return parseExploreText(value, projectRoot, exclude);
|
|
156193
|
+
if (isRecord3(value) && isRecord3(value.result)) value = value.result;
|
|
156194
|
+
if (isRecord3(value) && Array.isArray(value.content)) {
|
|
156195
|
+
const text2 = value.content.filter((item) => isRecord3(item) && item.type === "text" && typeof item.text === "string").map((item) => item.text).join("\n");
|
|
156196
|
+
return parseExploreText(text2, projectRoot, exclude);
|
|
156197
|
+
}
|
|
156198
|
+
return parseOutline(value, projectRoot, exclude);
|
|
156199
|
+
}
|
|
156003
156200
|
function fallbackCaution(health) {
|
|
156004
156201
|
if (health.state === "disabled" || health.state === "not-detected" || health.state === "not-initialized" || health.state === "ready") return void 0;
|
|
156005
156202
|
return "External semantic CodeGraph is " + health.state + "; using Lite structural evidence for this brief.";
|
|
156006
156203
|
}
|
|
156204
|
+
function queryFallbackCaution(diagnostics) {
|
|
156205
|
+
return `External semantic CodeGraph context was unavailable (context: ${diagnostics.context.outcome}; explore: ${diagnostics.explore.outcome}); using Lite structural evidence.`;
|
|
156206
|
+
}
|
|
156007
156207
|
async function getExternalCodeGraphContext(input) {
|
|
156008
156208
|
const inspected = await inspectExternalCodeGraph(input);
|
|
156009
156209
|
if (inspected.health.state !== "ready") {
|
|
156010
156210
|
return { ...inspected, caution: fallbackCaution(inspected.health) };
|
|
156011
156211
|
}
|
|
156012
156212
|
const mode = input.mode ?? "auto";
|
|
156013
|
-
const
|
|
156213
|
+
const runner = input.runner ?? defaultRunner;
|
|
156214
|
+
const contextResult = await runSafely(runner, {
|
|
156014
156215
|
command: input.command,
|
|
156015
156216
|
args: ["context", "--path", input.projectRoot, "--format", "json", "--max-nodes", "8", "--no-code", input.task],
|
|
156016
156217
|
cwd: input.projectRoot,
|
|
156017
156218
|
timeoutMs: boundedTimeout(input.timeoutMs),
|
|
156018
156219
|
maxOutputBytes: MAX_EXTERNAL_CODEGRAPH_OUTPUT_BYTES
|
|
156019
156220
|
});
|
|
156020
|
-
|
|
156021
|
-
|
|
156221
|
+
const diagnostics = {
|
|
156222
|
+
context: contextResult.ok ? commandDiagnostic("context", contextResult, "success") : failedCommandDiagnostic("context", contextResult),
|
|
156223
|
+
explore: notAttemptedDiagnostic("explore")
|
|
156224
|
+
};
|
|
156225
|
+
const contextOutline = contextResult.ok ? parseOutline(parseJson2(contextResult.stdout), input.projectRoot, input.exclude) : void 0;
|
|
156226
|
+
if (contextOutline && (contextOutline.entryPoints.length > 0 || contextOutline.relations.length > 0 || contextOutline.relatedFiles.length > 0)) {
|
|
156022
156227
|
return {
|
|
156023
|
-
|
|
156024
|
-
|
|
156025
|
-
|
|
156228
|
+
...inspected,
|
|
156229
|
+
outline: contextOutline,
|
|
156230
|
+
diagnostics,
|
|
156231
|
+
quality: providerQuality({ mode, health: inspected.health, selected: "external" })
|
|
156026
156232
|
};
|
|
156027
156233
|
}
|
|
156028
|
-
|
|
156029
|
-
|
|
156030
|
-
|
|
156234
|
+
if (contextResult.ok) diagnostics.context = commandDiagnostic("context", contextResult, "invalid-output", "The context payload failed validation or contained no safe outline.");
|
|
156235
|
+
const exploreResult = await runSafely(runner, {
|
|
156236
|
+
command: input.command,
|
|
156237
|
+
args: ["explore", "--path", input.projectRoot, "--max-files", "4", input.task],
|
|
156238
|
+
cwd: input.projectRoot,
|
|
156239
|
+
timeoutMs: boundedTimeout(input.timeoutMs),
|
|
156240
|
+
maxOutputBytes: MAX_EXTERNAL_CODEGRAPH_OUTPUT_BYTES
|
|
156241
|
+
});
|
|
156242
|
+
diagnostics.explore = exploreResult.ok ? commandDiagnostic("explore", exploreResult, "success") : failedCommandDiagnostic("explore", exploreResult);
|
|
156243
|
+
const exploreOutline = exploreResult.ok ? parseExplorePayload(parseJson2(exploreResult.stdout) ?? exploreResult.stdout, input.projectRoot, input.exclude) : void 0;
|
|
156244
|
+
if (exploreOutline && (exploreOutline.entryPoints.length > 0 || exploreOutline.relations.length > 0 || exploreOutline.relatedFiles.length > 0)) {
|
|
156031
156245
|
return {
|
|
156032
|
-
|
|
156033
|
-
|
|
156034
|
-
|
|
156246
|
+
...inspected,
|
|
156247
|
+
outline: exploreOutline,
|
|
156248
|
+
diagnostics,
|
|
156249
|
+
quality: providerQuality({ mode, health: inspected.health, selected: "external" })
|
|
156035
156250
|
};
|
|
156036
156251
|
}
|
|
156037
|
-
|
|
156252
|
+
if (exploreResult.ok) diagnostics.explore = commandDiagnostic("explore", exploreResult, "invalid-output", "The explore payload failed validation or contained no safe outline.");
|
|
156253
|
+
const health = exploreResult.ok ? { state: "invalid", reason: "The local CodeGraph context and explore payloads failed validation." } : unavailableHealth(exploreResult);
|
|
156038
156254
|
return {
|
|
156039
|
-
|
|
156040
|
-
|
|
156041
|
-
|
|
156255
|
+
health,
|
|
156256
|
+
quality: providerQuality({ mode, health }),
|
|
156257
|
+
diagnostics,
|
|
156258
|
+
caution: queryFallbackCaution(diagnostics)
|
|
156042
156259
|
};
|
|
156043
156260
|
}
|
|
156044
156261
|
var DEFAULT_EXTERNAL_CODEGRAPH_TIMEOUT_MS, MAX_EXTERNAL_CODEGRAPH_TIMEOUT_MS, EXTERNAL_CODEGRAPH_LIFECYCLE_TIMEOUT_MS, MAX_EXTERNAL_CODEGRAPH_OUTPUT_BYTES, MAX_EXTERNAL_NODE_COUNT, MAX_EXTERNAL_EDGE_COUNT, MAX_EXTERNAL_FILE_COUNT, MAX_EXTERNAL_TEXT_LENGTH, LITE_SUPPORTED_LANGUAGES, defaultRunner;
|
|
@@ -156049,7 +156266,7 @@ var init_external_provider = __esm({
|
|
|
156049
156266
|
init_secret_filter();
|
|
156050
156267
|
init_exclude3();
|
|
156051
156268
|
init_ids();
|
|
156052
|
-
DEFAULT_EXTERNAL_CODEGRAPH_TIMEOUT_MS =
|
|
156269
|
+
DEFAULT_EXTERNAL_CODEGRAPH_TIMEOUT_MS = 3e3;
|
|
156053
156270
|
MAX_EXTERNAL_CODEGRAPH_TIMEOUT_MS = 5e3;
|
|
156054
156271
|
EXTERNAL_CODEGRAPH_LIFECYCLE_TIMEOUT_MS = 3e4;
|
|
156055
156272
|
MAX_EXTERNAL_CODEGRAPH_OUTPUT_BYTES = 256 * 1024;
|
|
@@ -159332,6 +159549,7 @@ async function executeCleanup(context, payload, token) {
|
|
|
159332
159549
|
return { action: "cleanup", projectId: context.projectId, ...result };
|
|
159333
159550
|
}
|
|
159334
159551
|
async function previewDeduplicate(context) {
|
|
159552
|
+
initLLM({ scope: "memory", projectRoot: context.projectRoot });
|
|
159335
159553
|
if (!isLLMEnabled()) {
|
|
159336
159554
|
return {
|
|
159337
159555
|
action: "deduplicate",
|
|
@@ -161088,7 +161306,7 @@ var init_event_bus = __esm({
|
|
|
161088
161306
|
});
|
|
161089
161307
|
|
|
161090
161308
|
// src/orchestrate/task-graph.ts
|
|
161091
|
-
import { z as
|
|
161309
|
+
import { z as z626 } from "zod";
|
|
161092
161310
|
function parseTaskGraph(raw) {
|
|
161093
161311
|
const json2 = extractJson(raw);
|
|
161094
161312
|
if (!json2) {
|
|
@@ -161280,25 +161498,25 @@ var init_task_graph = __esm({
|
|
|
161280
161498
|
"src/orchestrate/task-graph.ts"() {
|
|
161281
161499
|
"use strict";
|
|
161282
161500
|
init_esm_shims();
|
|
161283
|
-
TaskNodeSchema =
|
|
161284
|
-
tempId:
|
|
161285
|
-
role:
|
|
161286
|
-
description:
|
|
161287
|
-
deps:
|
|
161288
|
-
files:
|
|
161501
|
+
TaskNodeSchema = z626.object({
|
|
161502
|
+
tempId: z626.string().min(1).describe('Temporary ID like "t1", "t2"'),
|
|
161503
|
+
role: z626.enum(["pm", "engineer", "qa", "reviewer"]),
|
|
161504
|
+
description: z626.string().min(30).describe("Self-contained task description with all context"),
|
|
161505
|
+
deps: z626.array(z626.string()).describe("tempIds of prerequisite tasks"),
|
|
161506
|
+
files: z626.array(z626.string()).optional().describe("Files this task will create or modify"),
|
|
161289
161507
|
/** Phase 7: Natural-language acceptance criteria (Goal-First Testing) */
|
|
161290
|
-
goals:
|
|
161508
|
+
goals: z626.array(z626.string()).optional().describe("Acceptance criteria for task verification")
|
|
161291
161509
|
});
|
|
161292
|
-
TaskGraphSchema =
|
|
161293
|
-
summary:
|
|
161294
|
-
tasks:
|
|
161510
|
+
TaskGraphSchema = z626.object({
|
|
161511
|
+
summary: z626.string().min(10).describe("One-paragraph plan summary"),
|
|
161512
|
+
tasks: z626.array(TaskNodeSchema).min(2).max(30)
|
|
161295
161513
|
}).superRefine((data, ctx) => {
|
|
161296
161514
|
const ids = new Set(data.tasks.map((t2) => t2.tempId));
|
|
161297
161515
|
for (const task of data.tasks) {
|
|
161298
161516
|
for (const dep of task.deps) {
|
|
161299
161517
|
if (!ids.has(dep)) {
|
|
161300
161518
|
ctx.addIssue({
|
|
161301
|
-
code:
|
|
161519
|
+
code: z626.ZodIssueCode.custom,
|
|
161302
161520
|
message: `Task "${task.tempId}" references unknown dependency "${dep}"`,
|
|
161303
161521
|
path: ["tasks"]
|
|
161304
161522
|
});
|
|
@@ -161306,7 +161524,7 @@ var init_task_graph = __esm({
|
|
|
161306
161524
|
}
|
|
161307
161525
|
if (task.deps.includes(task.tempId)) {
|
|
161308
161526
|
ctx.addIssue({
|
|
161309
|
-
code:
|
|
161527
|
+
code: z626.ZodIssueCode.custom,
|
|
161310
161528
|
message: `Task "${task.tempId}" depends on itself`,
|
|
161311
161529
|
path: ["tasks"]
|
|
161312
161530
|
});
|
|
@@ -161314,21 +161532,21 @@ var init_task_graph = __esm({
|
|
|
161314
161532
|
}
|
|
161315
161533
|
if (data.tasks.length > 0 && data.tasks[data.tasks.length - 1].role !== "reviewer") {
|
|
161316
161534
|
ctx.addIssue({
|
|
161317
|
-
code:
|
|
161535
|
+
code: z626.ZodIssueCode.custom,
|
|
161318
161536
|
message: 'Last task must have role "reviewer"',
|
|
161319
161537
|
path: ["tasks"]
|
|
161320
161538
|
});
|
|
161321
161539
|
}
|
|
161322
161540
|
if (hasCycle(data.tasks)) {
|
|
161323
161541
|
ctx.addIssue({
|
|
161324
|
-
code:
|
|
161542
|
+
code: z626.ZodIssueCode.custom,
|
|
161325
161543
|
message: "Task graph contains a cycle",
|
|
161326
161544
|
path: ["tasks"]
|
|
161327
161545
|
});
|
|
161328
161546
|
}
|
|
161329
161547
|
if (ids.size !== data.tasks.length) {
|
|
161330
161548
|
ctx.addIssue({
|
|
161331
|
-
code:
|
|
161549
|
+
code: z626.ZodIssueCode.custom,
|
|
161332
161550
|
message: "Duplicate tempId values detected",
|
|
161333
161551
|
path: ["tasks"]
|
|
161334
161552
|
});
|
|
@@ -163796,7 +164014,7 @@ init_mini_skill_store();
|
|
|
163796
164014
|
init_session_store();
|
|
163797
164015
|
import { createHash as createHash16 } from "crypto";
|
|
163798
164016
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
163799
|
-
import { z as
|
|
164017
|
+
import { z as z627 } from "zod";
|
|
163800
164018
|
|
|
163801
164019
|
// src/memory/attribution-guard.ts
|
|
163802
164020
|
init_esm_shims();
|
|
@@ -167584,6 +167802,59 @@ function createProjectBindingController(projectRoot) {
|
|
|
167584
167802
|
return new ProjectBindingController(projectRoot);
|
|
167585
167803
|
}
|
|
167586
167804
|
|
|
167805
|
+
// src/server/mcp-compat.ts
|
|
167806
|
+
init_esm_shims();
|
|
167807
|
+
import { RequestSchema } from "@modelcontextprotocol/sdk/types.js";
|
|
167808
|
+
import { z as z625 } from "zod/v4";
|
|
167809
|
+
|
|
167810
|
+
// src/server/mcp-discovery.ts
|
|
167811
|
+
init_esm_shims();
|
|
167812
|
+
var MCP_MODERN_PROTOCOL_VERSION = "2026-07-28";
|
|
167813
|
+
var MCP_LEGACY_PROTOCOL_VERSION = "2025-11-25";
|
|
167814
|
+
var MCP_OLDEST_LEGACY_PROTOCOL_VERSION = "2024-11-05";
|
|
167815
|
+
var MCP_SERVER_DISCOVER_METHOD = "server/discover";
|
|
167816
|
+
var MCP_SERVER_INFO_META_KEY = "io.modelcontextprotocol/serverInfo";
|
|
167817
|
+
function getMcpServerInfo() {
|
|
167818
|
+
return {
|
|
167819
|
+
name: "memorix",
|
|
167820
|
+
version: true ? "1.8.3" : "1.0.1"
|
|
167821
|
+
};
|
|
167822
|
+
}
|
|
167823
|
+
function createMcpDiscoverResult(capabilities, serverInfo) {
|
|
167824
|
+
return {
|
|
167825
|
+
resultType: "complete",
|
|
167826
|
+
supportedVersions: [
|
|
167827
|
+
MCP_MODERN_PROTOCOL_VERSION,
|
|
167828
|
+
MCP_LEGACY_PROTOCOL_VERSION,
|
|
167829
|
+
MCP_OLDEST_LEGACY_PROTOCOL_VERSION
|
|
167830
|
+
],
|
|
167831
|
+
capabilities,
|
|
167832
|
+
_meta: {
|
|
167833
|
+
[MCP_SERVER_INFO_META_KEY]: { ...serverInfo }
|
|
167834
|
+
},
|
|
167835
|
+
// v1 has no response-cache negotiation. A zero private TTL prevents clients
|
|
167836
|
+
// from inventing a shared cache for an implementation that cannot invalidate it.
|
|
167837
|
+
ttlMs: 0,
|
|
167838
|
+
cacheScope: "private"
|
|
167839
|
+
};
|
|
167840
|
+
}
|
|
167841
|
+
|
|
167842
|
+
// src/server/mcp-compat.ts
|
|
167843
|
+
var ServerDiscoverRequestSchema = RequestSchema.extend({
|
|
167844
|
+
method: z625.literal(MCP_SERVER_DISCOVER_METHOD),
|
|
167845
|
+
params: z625.looseObject({}).optional()
|
|
167846
|
+
});
|
|
167847
|
+
var registeredServers = /* @__PURE__ */ new WeakSet();
|
|
167848
|
+
function buildMcpDiscoverResult(server, serverInfo) {
|
|
167849
|
+
const getCapabilities = server.server.getCapabilities.bind(server.server);
|
|
167850
|
+
return createMcpDiscoverResult(getCapabilities(), serverInfo);
|
|
167851
|
+
}
|
|
167852
|
+
function registerMcpDiscovery(server, serverInfo) {
|
|
167853
|
+
if (registeredServers.has(server)) return;
|
|
167854
|
+
server.server.setRequestHandler(ServerDiscoverRequestSchema, async () => buildMcpDiscoverResult(server, serverInfo));
|
|
167855
|
+
registeredServers.add(server);
|
|
167856
|
+
}
|
|
167857
|
+
|
|
167587
167858
|
// src/server.ts
|
|
167588
167859
|
var FORMATION_TIMEOUT_MS = parseFormationTimeoutMs(process.env.MEMORIX_FORMATION_TIMEOUT_MS);
|
|
167589
167860
|
var COMPACT_ON_WRITE_TIMEOUT_MS = 12e3;
|
|
@@ -167981,10 +168252,9 @@ The path should point to a directory containing a .git folder.`
|
|
|
167981
168252
|
isError: true
|
|
167982
168253
|
};
|
|
167983
168254
|
};
|
|
167984
|
-
const
|
|
167985
|
-
|
|
167986
|
-
|
|
167987
|
-
});
|
|
168255
|
+
const serverInfo = getMcpServerInfo();
|
|
168256
|
+
const server = existingServer ?? new McpServer(serverInfo);
|
|
168257
|
+
registerMcpDiscovery(server, serverInfo);
|
|
167988
168258
|
const originalRegisterTool = server.registerTool.bind(server);
|
|
167989
168259
|
server.registerTool = ((name, ...args) => {
|
|
167990
168260
|
if (!isToolInProfile(name, toolProfile)) {
|
|
@@ -168067,42 +168337,42 @@ The path should point to a directory containing a .git folder.`
|
|
|
168067
168337
|
title: "Store Memory",
|
|
168068
168338
|
description: "Store a new observation/memory. Automatically indexed for search. Use type to classify: gotcha ([GOTCHA] critical pitfall), decision ([DECISION] architecture choice), problem-solution ([FIX] bug fix), how-it-works ([INFO] explanation), what-changed ([CHANGE] change), discovery ([DISCOVERY] insight), why-it-exists ([WHY] rationale), trade-off ([TRADEOFF] compromise), session-request ([SESSION] original goal). Project visibility is the default. Personal or team visibility requires an explicitly joined coordination identity. Set longTerm only when the caller explicitly wants an additional source-backed long-term candidate; it is never injected until an operator records a review through the CLI. For a read-only task, do not store unless the user explicitly asks to save a record.",
|
|
168069
168339
|
inputSchema: {
|
|
168070
|
-
entityName:
|
|
168071
|
-
type:
|
|
168072
|
-
title:
|
|
168073
|
-
narrative:
|
|
168074
|
-
facts:
|
|
168075
|
-
filesModified:
|
|
168076
|
-
concepts:
|
|
168077
|
-
topicKey:
|
|
168340
|
+
entityName: z627.string().describe('The entity this observation belongs to (e.g., "auth-module", "port-config")'),
|
|
168341
|
+
type: z627.enum(OBSERVATION_TYPES).describe("Observation type for classification"),
|
|
168342
|
+
title: z627.string().describe("Short descriptive title (~5-10 words)"),
|
|
168343
|
+
narrative: z627.string().describe("Full description of the observation"),
|
|
168344
|
+
facts: z627.array(z627.string()).optional().describe('Structured facts (e.g., "Default timeout: 60s")'),
|
|
168345
|
+
filesModified: z627.array(z627.string()).optional().describe("Files involved"),
|
|
168346
|
+
concepts: z627.array(z627.string()).optional().describe("Related concepts/keywords"),
|
|
168347
|
+
topicKey: z627.string().optional().describe(
|
|
168078
168348
|
'Optional topic identifier for upserts (e.g., "architecture/auth-model"). If an observation with the same topicKey already exists in this project, it will be UPDATED instead of creating a new one. Use memorix_suggest_topic_key to generate a stable key. Good for evolving decisions, architecture docs, etc.'
|
|
168079
168349
|
),
|
|
168080
|
-
progress:
|
|
168081
|
-
feature:
|
|
168082
|
-
status:
|
|
168083
|
-
completion:
|
|
168350
|
+
progress: z627.object({
|
|
168351
|
+
feature: z627.string().describe("Feature or task name"),
|
|
168352
|
+
status: z627.enum(["in-progress", "completed", "blocked"]).describe("Current status"),
|
|
168353
|
+
completion: z627.number().optional().describe("Completion percentage 0-100")
|
|
168084
168354
|
}).optional().describe("Progress tracking for task/feature observations"),
|
|
168085
|
-
relatedCommits:
|
|
168086
|
-
relatedEntities:
|
|
168087
|
-
visibility:
|
|
168355
|
+
relatedCommits: z627.array(z627.string()).optional().describe("Git commit hashes this memory relates to (links ground truth \u2194 reasoning)"),
|
|
168356
|
+
relatedEntities: z627.array(z627.string()).optional().describe("Other entity names this memory cross-references"),
|
|
168357
|
+
visibility: z627.enum(["personal", "project", "team"]).optional().describe(
|
|
168088
168358
|
"Retrieval scope. Project is the normal shared default; personal/team require memorix_session_start with joinTeam=true."
|
|
168089
168359
|
),
|
|
168090
|
-
longTerm:
|
|
168091
|
-
kind:
|
|
168092
|
-
scope:
|
|
168093
|
-
tags:
|
|
168094
|
-
applicability:
|
|
168360
|
+
longTerm: z627.object({
|
|
168361
|
+
kind: z627.enum(["episodic", "semantic", "procedural"]).describe("Cognitive kind for an additional long-term candidate."),
|
|
168362
|
+
scope: z627.enum(["project", "user", "team"]).optional().default("project").describe("Long-term scope. User capture is private source evidence and needs a bound agent identity."),
|
|
168363
|
+
tags: z627.array(z627.string()).optional().describe("Small set of retrieval tags for the candidate."),
|
|
168364
|
+
applicability: z627.string().optional().describe("When this durable fact or procedure applies.")
|
|
168095
168365
|
}).optional().describe("Optional explicit request to create a source-backed long-term candidate alongside this observation. Candidates are not automatically injected."),
|
|
168096
|
-
overrideReadOnly:
|
|
168366
|
+
overrideReadOnly: z627.boolean().optional().describe(
|
|
168097
168367
|
"Use only when the user explicitly asks to save memory during a read-only or no-modification task."
|
|
168098
168368
|
),
|
|
168099
|
-
attachments:
|
|
168100
|
-
modality:
|
|
168101
|
-
url:
|
|
168369
|
+
attachments: z627.array(z627.object({
|
|
168370
|
+
modality: z627.enum(["image", "audio", "video", "document"]),
|
|
168371
|
+
url: z627.string().describe(
|
|
168102
168372
|
"Public HTTPS provenance reference without query parameters or fragments. Memorix does not fetch this URL: attachment metadata is persisted and BM25-searchable, while observation vectors remain text-only."
|
|
168103
168373
|
),
|
|
168104
|
-
mimeType:
|
|
168105
|
-
name:
|
|
168374
|
+
mimeType: z627.string().optional(),
|
|
168375
|
+
name: z627.string().optional()
|
|
168106
168376
|
})).optional().describe("Safe public provenance references. They are stored as metadata for lexical retrieval; raw inline media is never stored.")
|
|
168107
168377
|
}
|
|
168108
168378
|
},
|
|
@@ -168640,8 +168910,8 @@ Entity: ${entityName} | Type: ${type} | Project: ${project.id}${obs.topicKey ? `
|
|
|
168640
168910
|
title: "Suggest Topic Key",
|
|
168641
168911
|
description: 'Suggest a stable topic_key for memory upserts. Use this before memorix_store when you want evolving topics (like architecture decisions, config docs) to update a single observation over time instead of creating duplicates. Returns a key like "architecture/auth-model" or "bug/timeout-in-api-gateway".',
|
|
168642
168912
|
inputSchema: {
|
|
168643
|
-
type:
|
|
168644
|
-
title:
|
|
168913
|
+
type: z627.string().describe("Observation type (e.g., decision, architecture, bugfix, discovery)"),
|
|
168914
|
+
title: z627.string().describe("Observation title \u2014 used to generate the stable key")
|
|
168645
168915
|
}
|
|
168646
168916
|
},
|
|
168647
168917
|
async ({ type: obsType, title }) => {
|
|
@@ -168666,28 +168936,28 @@ Use this as the \`topicKey\` parameter in \`memorix_store\` to enable upsert beh
|
|
|
168666
168936
|
title: "Search Memory",
|
|
168667
168937
|
description: "Search project memory. Returns a compact index (~50-100 tokens/result). Do not use as a follow-up to a complete memorix_project_context brief unless a specific fact is still missing or the user asks for deeper history; provide purpose when intentionally expanding. Use memorix_detail to fetch full content for specific IDs. Use memorix_timeline to see chronological context. Searches across all observations stored from any IDE session \u2014 enabling cross-session and cross-agent context retrieval.",
|
|
168668
168938
|
inputSchema: {
|
|
168669
|
-
query:
|
|
168670
|
-
limit:
|
|
168671
|
-
type:
|
|
168672
|
-
maxTokens:
|
|
168673
|
-
scope:
|
|
168939
|
+
query: z627.string().describe("Search query (natural language or keywords)"),
|
|
168940
|
+
limit: z627.number().optional().describe("Max results (default: 20)"),
|
|
168941
|
+
type: z627.enum(OBSERVATION_TYPES).optional().describe("Filter by observation type"),
|
|
168942
|
+
maxTokens: z627.number().optional().describe("Token budget \u2014 trim results to fit (0 = unlimited)"),
|
|
168943
|
+
scope: z627.enum(["project", "global"]).optional().default("project").describe(
|
|
168674
168944
|
'Search scope: "project" (default) only searches current project, "global" searches all projects'
|
|
168675
168945
|
),
|
|
168676
|
-
since:
|
|
168677
|
-
until:
|
|
168678
|
-
status:
|
|
168946
|
+
since: z627.string().optional().describe('Only return observations created after this date (ISO 8601 or natural like "2025-01-15")'),
|
|
168947
|
+
until: z627.string().optional().describe('Only return observations created before this date (ISO 8601 or natural like "2025-02-01")'),
|
|
168948
|
+
status: z627.enum(["active", "resolved", "archived", "all"]).optional().default("active").describe(
|
|
168679
168949
|
'Filter by memory status. "active" (default) shows current memories, "all" includes resolved/archived.'
|
|
168680
168950
|
),
|
|
168681
|
-
source:
|
|
168951
|
+
source: z627.enum(["agent", "git", "manual"]).optional().describe(
|
|
168682
168952
|
'Filter by memory source. "git" returns only commit-derived ground truth memories. Omit for all sources.'
|
|
168683
168953
|
),
|
|
168684
|
-
quality:
|
|
168954
|
+
quality: z627.enum(["fast", "balanced", "thorough"]).optional().default("balanced").describe(
|
|
168685
168955
|
"Retrieval profile: fast stays local, balanced uses configured embeddings, thorough explicitly permits optional LLM refinement."
|
|
168686
168956
|
),
|
|
168687
|
-
purpose:
|
|
168957
|
+
purpose: z627.string().optional().describe(
|
|
168688
168958
|
"Why this must expand beyond the latest Autopilot brief. Name the missing fact or the user's explicit request."
|
|
168689
168959
|
),
|
|
168690
|
-
force:
|
|
168960
|
+
force: z627.boolean().optional().describe(
|
|
168691
168961
|
"Use only when the user explicitly asks to read a record already represented in the latest Autopilot brief."
|
|
168692
168962
|
)
|
|
168693
168963
|
}
|
|
@@ -168776,9 +169046,9 @@ _Search mode: ${getLastSearchMode2(project.id)}_`;
|
|
|
168776
169046
|
title: "Memory Graph Context",
|
|
168777
169047
|
description: "Build a compact, prompt-ready memory graph context packet for the current project. Use this for broad memory overview questions, project memory graph questions, or task-specific memory grounding. Returns high-signal memories, entities, relations, and risks as background context, not instructions.",
|
|
168778
169048
|
inputSchema: {
|
|
168779
|
-
query:
|
|
168780
|
-
limit:
|
|
168781
|
-
format:
|
|
169049
|
+
query: z627.string().describe("Current task or topic to build memory graph context for"),
|
|
169050
|
+
limit: z627.number().optional().describe("Max high-signal memories to include (default: 5)"),
|
|
169051
|
+
format: z627.enum(["prompt", "summary"]).optional().default("prompt").describe(
|
|
168782
169052
|
'Output format. "prompt" is agent-ready; "summary" is a compact human overview.'
|
|
168783
169053
|
)
|
|
168784
169054
|
}
|
|
@@ -168813,14 +169083,14 @@ _Search mode: ${getLastSearchMode2(project.id)}_`;
|
|
|
168813
169083
|
title: "Memory Autopilot Project Context",
|
|
168814
169084
|
description: "Build a compact Memory Autopilot brief for the current coding task. Schedules Code Memory refresh when needed, includes Start here files, reliable code-bound memories, stale/suspect cautions, and verification hints. Use this at the start of a new coding turn or after switching tasks.",
|
|
168815
169085
|
inputSchema: {
|
|
168816
|
-
task:
|
|
168817
|
-
refresh:
|
|
169086
|
+
task: z627.string().optional().describe("Current coding task or question"),
|
|
169087
|
+
refresh: z627.enum(["auto", "always", "never"]).optional().default("auto").describe(
|
|
168818
169088
|
"Code Memory refresh policy. auto refreshes only when missing or stale."
|
|
168819
169089
|
),
|
|
168820
|
-
format:
|
|
169090
|
+
format: z627.enum(["prompt", "summary", "json", "receipt"]).optional().default("prompt").describe(
|
|
168821
169091
|
'Output format. "prompt" is agent-ready; "summary" is human-readable; "receipt" is bounded JSON; "json" is detailed diagnostics.'
|
|
168822
169092
|
),
|
|
168823
|
-
agent:
|
|
169093
|
+
agent: z627.enum([
|
|
168824
169094
|
"windsurf",
|
|
168825
169095
|
"cursor",
|
|
168826
169096
|
"claude-code",
|
|
@@ -168835,7 +169105,7 @@ _Search mode: ${getLastSearchMode2(project.id)}_`;
|
|
|
168835
169105
|
"opencode",
|
|
168836
169106
|
"trae"
|
|
168837
169107
|
]).optional().describe("Optional target agent for compatible workflow selection."),
|
|
168838
|
-
limit:
|
|
169108
|
+
limit: z627.number().optional().describe("Reserved for future source limits; current prompt stays compact by default.")
|
|
168839
169109
|
}
|
|
168840
169110
|
},
|
|
168841
169111
|
async ({ task, refresh, format, agent }) => {
|
|
@@ -168936,12 +169206,12 @@ _Search mode: ${getLastSearchMode2(project.id)}_`;
|
|
|
168936
169206
|
title: "Context Pack",
|
|
168937
169207
|
description: "Build a prompt-ready working context pack for a coding task. Combines relevant memories, CodeGraph Memory facts, freshness warnings, suggested reads, and verification hints. After a complete memorix_project_context brief, provide purpose only when deliberately expanding beyond it.",
|
|
168938
169208
|
inputSchema: {
|
|
168939
|
-
task:
|
|
168940
|
-
limit:
|
|
169209
|
+
task: z627.string().describe("Current coding task or question"),
|
|
169210
|
+
limit: z627.preprocess(
|
|
168941
169211
|
(value) => typeof value === "string" && value.trim() !== "" ? Number(value) : value,
|
|
168942
|
-
|
|
169212
|
+
z627.number().int().positive().max(100)
|
|
168943
169213
|
).optional().describe("Max active memories to inspect before code-ref filtering (default: 20)"),
|
|
168944
|
-
purpose:
|
|
169214
|
+
purpose: z627.string().optional().describe(
|
|
168945
169215
|
"Why this must expand beyond the latest Autopilot brief. Name the missing fact or the user's explicit request."
|
|
168946
169216
|
)
|
|
168947
169217
|
}
|
|
@@ -169036,7 +169306,7 @@ _Search mode: ${getLastSearchMode2(project.id)}_`;
|
|
|
169036
169306
|
title: "Knowledge Workspace",
|
|
169037
169307
|
description: "Manage the reviewable project Knowledge Workspace. Use it only for deliberate knowledge operations: initialize a local or versioned workspace, review source-backed claims, compile proposals, lint, apply a reviewed proposal, or manage canonical workflows. It is intentionally absent from the default micro/lite profiles.",
|
|
169038
169308
|
inputSchema: {
|
|
169039
|
-
action:
|
|
169309
|
+
action: z627.enum([
|
|
169040
169310
|
"workspace_init",
|
|
169041
169311
|
"status",
|
|
169042
169312
|
"claim_list",
|
|
@@ -169051,21 +169321,21 @@ _Search mode: ${getLastSearchMode2(project.id)}_`;
|
|
|
169051
169321
|
"workflow_apply",
|
|
169052
169322
|
"workflow_run"
|
|
169053
169323
|
]).describe("Knowledge operation to perform"),
|
|
169054
|
-
mode:
|
|
169055
|
-
path:
|
|
169056
|
-
proposalId:
|
|
169057
|
-
allowManualOverwrite:
|
|
169058
|
-
claimId:
|
|
169059
|
-
claimReviewState:
|
|
169060
|
-
reviewDetail:
|
|
169061
|
-
workflowId:
|
|
169062
|
-
agent:
|
|
169063
|
-
task:
|
|
169064
|
-
outcome:
|
|
169065
|
-
verificationVerdict:
|
|
169066
|
-
failureReason:
|
|
169067
|
-
startingSnapshotId:
|
|
169068
|
-
evidenceIds:
|
|
169324
|
+
mode: z627.enum(["local", "versioned"]).optional().default("local").describe("Workspace mode; versioned writes require an explicit project path during workspace_init"),
|
|
169325
|
+
path: z627.string().optional().describe("Explicit versioned workspace path, used only by workspace_init"),
|
|
169326
|
+
proposalId: z627.string().optional().describe("Pending proposal id for proposal_apply"),
|
|
169327
|
+
allowManualOverwrite: z627.boolean().optional().default(false).describe("Explicitly allow proposal_apply to replace a manually edited page"),
|
|
169328
|
+
claimId: z627.string().optional().describe("Source-backed claim id for claim_review"),
|
|
169329
|
+
claimReviewState: z627.enum(["approved", "rejected"]).optional().describe("Deliberate review verdict for claim_review"),
|
|
169330
|
+
reviewDetail: z627.string().max(2e3).optional().describe("Evidence check performed before approving or rejecting a claim"),
|
|
169331
|
+
workflowId: z627.string().optional().describe("Canonical workflow id for workflow preview, apply, or run"),
|
|
169332
|
+
agent: z627.string().optional().describe("Target agent for a workflow adapter"),
|
|
169333
|
+
task: z627.string().optional().describe("Task text for workflow selection or a workflow run"),
|
|
169334
|
+
outcome: z627.enum(["passed", "failed", "cancelled", "in-progress"]).optional().describe("Workflow run outcome"),
|
|
169335
|
+
verificationVerdict: z627.enum(["passed", "failed", "not-run"]).optional().describe("Workflow run verification verdict"),
|
|
169336
|
+
failureReason: z627.string().optional().describe("Sanitized workflow failure reason"),
|
|
169337
|
+
startingSnapshotId: z627.string().optional().describe("Code snapshot id present when a workflow run began"),
|
|
169338
|
+
evidenceIds: z627.array(z627.string()).max(24).optional().describe("Selected evidence ids for a workflow run")
|
|
169069
169339
|
}
|
|
169070
169340
|
},
|
|
169071
169341
|
async ({
|
|
@@ -169341,8 +169611,8 @@ _Search mode: ${getLastSearchMode2(project.id)}_`;
|
|
|
169341
169611
|
title: "Resolve Memories",
|
|
169342
169612
|
description: `Mark observations as resolved (completed/no longer active). Resolved memories are hidden from default search but can still be found with status="all". Use this to mark completed tasks, fixed bugs, or outdated information so they don't pollute future context.`,
|
|
169343
169613
|
inputSchema: {
|
|
169344
|
-
ids:
|
|
169345
|
-
status:
|
|
169614
|
+
ids: z627.array(z627.number()).describe("Observation IDs to mark as resolved"),
|
|
169615
|
+
status: z627.enum(["resolved", "archived"]).optional().default("resolved").describe(
|
|
169346
169616
|
'Target status: "resolved" (default, completed/done) or "archived" (permanently hidden)'
|
|
169347
169617
|
)
|
|
169348
169618
|
}
|
|
@@ -169380,17 +169650,17 @@ _Search mode: ${getLastSearchMode2(project.id)}_`;
|
|
|
169380
169650
|
title: "Store Reasoning Trace",
|
|
169381
169651
|
description: "Store a reasoning trace \u2014 WHY you chose this approach, what alternatives you considered, and what outcome you expect. This creates a searchable record of your decision-making process. Use this when making non-trivial technical decisions, choosing between approaches, or solving complex problems. Unlike regular memories that record WHAT happened, reasoning memories record HOW you thought about it.",
|
|
169382
169652
|
inputSchema: {
|
|
169383
|
-
entityName:
|
|
169384
|
-
decision:
|
|
169385
|
-
alternatives:
|
|
169386
|
-
rationale:
|
|
169387
|
-
constraints:
|
|
169388
|
-
expectedOutcome:
|
|
169389
|
-
risks:
|
|
169390
|
-
concepts:
|
|
169391
|
-
filesModified:
|
|
169392
|
-
relatedCommits:
|
|
169393
|
-
relatedEntities:
|
|
169653
|
+
entityName: z627.string().describe('The entity this reasoning applies to (e.g., "auth-module", "database-schema")'),
|
|
169654
|
+
decision: z627.string().describe("What was decided or chosen"),
|
|
169655
|
+
alternatives: z627.array(z627.string()).optional().describe("Other options that were considered"),
|
|
169656
|
+
rationale: z627.string().describe("Why this approach was chosen over alternatives"),
|
|
169657
|
+
constraints: z627.array(z627.string()).optional().describe("Constraints that influenced the decision (time, perf, compat, etc.)"),
|
|
169658
|
+
expectedOutcome: z627.string().optional().describe("What outcome is expected from this decision"),
|
|
169659
|
+
risks: z627.array(z627.string()).optional().describe("Known risks or potential downsides"),
|
|
169660
|
+
concepts: z627.array(z627.string()).optional().describe("Related technical concepts"),
|
|
169661
|
+
filesModified: z627.array(z627.string()).optional().describe("Files related to this reasoning"),
|
|
169662
|
+
relatedCommits: z627.array(z627.string()).optional().describe("Git commit hashes this reasoning explains (links ground truth \u2194 reasoning)"),
|
|
169663
|
+
relatedEntities: z627.array(z627.string()).optional().describe("Other entity names this reasoning relates to (cross-references)")
|
|
169394
169664
|
}
|
|
169395
169665
|
},
|
|
169396
169666
|
async ({ entityName, decision, alternatives, rationale, constraints, expectedOutcome, risks, concepts, filesModified, relatedCommits, relatedEntities }) => {
|
|
@@ -169465,7 +169735,7 @@ Entity: ${entityName} | ${facts.length} facts | ${obs.tokens} tokens${reasoningA
|
|
|
169465
169735
|
title: "Audit Project Attribution",
|
|
169466
169736
|
description: "Scan the current project for observations that may have been written to the wrong project bucket. Identifies observations whose entityName appears exclusively in a different project. Read-only \u2014 no data is changed. Use memorix_resolve to archive confirmed mis-attributed observations.",
|
|
169467
169737
|
inputSchema: {
|
|
169468
|
-
threshold:
|
|
169738
|
+
threshold: z627.number().int().min(1).optional().describe(
|
|
169469
169739
|
"Minimum occurrences of an entityName in another project to flag it as suspicious (default: 2)"
|
|
169470
169740
|
)
|
|
169471
169741
|
}
|
|
@@ -169529,9 +169799,9 @@ Entity: ${entityName} | ${facts.length} facts | ${obs.tokens} tokens${reasoningA
|
|
|
169529
169799
|
title: "Search Reasoning Patterns",
|
|
169530
169800
|
description: "Search past reasoning traces to understand WHY decisions were made. Returns reasoning memories that explain the thought process behind technical choices. Use this when revisiting code, questioning a design decision, or looking for precedent on how similar problems were solved before.",
|
|
169531
169801
|
inputSchema: {
|
|
169532
|
-
query:
|
|
169533
|
-
limit:
|
|
169534
|
-
scope:
|
|
169802
|
+
query: z627.string().describe('Search query \u2014 describe what reasoning you want to find (e.g., "why did we choose PostgreSQL", "auth approach rationale")'),
|
|
169803
|
+
limit: z627.number().optional().describe("Max results (default: 10)"),
|
|
169804
|
+
scope: z627.enum(["project", "global"]).optional().default("project").describe("Search scope")
|
|
169535
169805
|
}
|
|
169536
169806
|
},
|
|
169537
169807
|
async ({ query, limit: limit2, scope }) => {
|
|
@@ -169565,8 +169835,8 @@ ${result.formatted}` }]
|
|
|
169565
169835
|
title: "Deduplicate Memories",
|
|
169566
169836
|
description: "Scan active memories for duplicates, contradictions, and outdated information using LLM analysis. Automatically resolves redundant memories. Requires LLM to be configured (set MEMORIX_LLM_API_KEY or OPENAI_API_KEY environment variable). Without LLM, falls back to basic similarity-based consolidation.",
|
|
169567
169837
|
inputSchema: {
|
|
169568
|
-
query:
|
|
169569
|
-
dryRun:
|
|
169838
|
+
query: z627.string().optional().describe("Optional query to scope dedup to a topic (default: scan all)"),
|
|
169839
|
+
dryRun: z627.boolean().optional().default(false).describe("Preview only \u2014 show what would be resolved without making changes")
|
|
169570
169840
|
}
|
|
169571
169841
|
},
|
|
169572
169842
|
async ({ query, dryRun }) => {
|
|
@@ -169635,9 +169905,9 @@ ${actionLines.join("\n")}`
|
|
|
169635
169905
|
title: "Memory Timeline",
|
|
169636
169906
|
description: "Deep retrieval: expand chronological context around a specific observation \u2014 distinguishes explicit memory evolution, hook activity traces, and git-backed facts. Natural follow-up after session L1 routing hints (hook traces) or L3 evidence pointers (git memory).",
|
|
169637
169907
|
inputSchema: {
|
|
169638
|
-
anchorId:
|
|
169639
|
-
depthBefore:
|
|
169640
|
-
depthAfter:
|
|
169908
|
+
anchorId: z627.number().describe("Observation ID to center the timeline on"),
|
|
169909
|
+
depthBefore: z627.number().optional().describe("Number of observations before (default: 3)"),
|
|
169910
|
+
depthAfter: z627.number().optional().describe("Number of observations after (default: 3)")
|
|
169641
169911
|
}
|
|
169642
169912
|
},
|
|
169643
169913
|
async ({ anchorId, depthBefore, depthAfter }) => {
|
|
@@ -169667,18 +169937,18 @@ ${actionLines.join("\n")}`
|
|
|
169667
169937
|
title: "Memory Details",
|
|
169668
169938
|
description: 'Fetch full observation, mini-skill, or curated durable-memory details \u2014 includes source kind (explicit memory / hook trace / git evidence), value category, and cross-references (~500-1000 tokens each). Do not re-fetch content already covered by a complete memorix_project_context brief unless a specific fact is still missing or the user asks for deeper history; provide purpose when intentionally expanding. Always use memorix_search first to find relevant IDs, then fetch only what you need. Accepts typed refs from search results (e.g. "obs:42", "skill:3") and durable refs from a project brief (e.g. "durable:<uuid>") via the typedRefs field, or legacy numeric ids / object refs for backward compatibility.',
|
|
169669
169939
|
inputSchema: {
|
|
169670
|
-
ids:
|
|
169671
|
-
refs:
|
|
169672
|
-
|
|
169673
|
-
id:
|
|
169674
|
-
projectId:
|
|
169940
|
+
ids: z627.array(z627.number()).optional().describe("Observation IDs to fetch (legacy, from memorix_search results)"),
|
|
169941
|
+
refs: z627.array(
|
|
169942
|
+
z627.object({
|
|
169943
|
+
id: z627.number().describe("Observation ID"),
|
|
169944
|
+
projectId: z627.string().optional().describe("Project ID for global-search disambiguation")
|
|
169675
169945
|
})
|
|
169676
169946
|
).optional().describe("Explicit observation refs. Prefer this for global search results."),
|
|
169677
|
-
typedRefs:
|
|
169678
|
-
purpose:
|
|
169947
|
+
typedRefs: z627.array(z627.string()).optional().describe('Typed memory refs from search results or a project brief, e.g. "obs:42", "skill:3", "durable:<uuid>", "obs:42@org/proj"'),
|
|
169948
|
+
purpose: z627.string().optional().describe(
|
|
169679
169949
|
"Why this must expand beyond the latest Autopilot brief. Name the missing fact or the user's explicit request."
|
|
169680
169950
|
),
|
|
169681
|
-
force:
|
|
169951
|
+
force: z627.boolean().optional().describe(
|
|
169682
169952
|
"Use only when the user explicitly asks to read a record already represented in the latest Autopilot brief."
|
|
169683
169953
|
)
|
|
169684
169954
|
}
|
|
@@ -169757,7 +170027,7 @@ ${actionLines.join("\n")}`
|
|
|
169757
170027
|
title: "Memory Retention Status & Archive",
|
|
169758
170028
|
description: 'Show memory retention status or archive expired memories. action="report" (default): show active/stale/archive-candidate counts. action="archive": move expired observations to archive file (reversible). action="stale": list stale observations with full retention explanation. Uses exponential decay scoring based on importance, age, and access patterns.',
|
|
169759
170029
|
inputSchema: {
|
|
169760
|
-
action:
|
|
170030
|
+
action: z627.enum(["report", "archive", "stale"]).optional().describe('Action: "report" (show status, default) or "archive" (move expired to archive) or "stale" (list stale observations with explanation)')
|
|
169761
170031
|
}
|
|
169762
170032
|
},
|
|
169763
170033
|
async (args) => {
|
|
@@ -170022,10 +170292,10 @@ ${Math.max(0, managedIds.size - result.resolved.length)} visible writable observ
|
|
|
170022
170292
|
title: "Create Entities",
|
|
170023
170293
|
description: "Create multiple new entities in the knowledge graph",
|
|
170024
170294
|
inputSchema: {
|
|
170025
|
-
entities:
|
|
170026
|
-
name:
|
|
170027
|
-
entityType:
|
|
170028
|
-
observations:
|
|
170295
|
+
entities: z627.array(z627.object({
|
|
170296
|
+
name: z627.string().describe("The name of the entity"),
|
|
170297
|
+
entityType: z627.string().describe("The type of the entity"),
|
|
170298
|
+
observations: z627.array(z627.string()).describe("Initial observations")
|
|
170029
170299
|
}))
|
|
170030
170300
|
}
|
|
170031
170301
|
},
|
|
@@ -170045,10 +170315,10 @@ ${Math.max(0, managedIds.size - result.resolved.length)} visible writable observ
|
|
|
170045
170315
|
title: "Create Relations",
|
|
170046
170316
|
description: "Create multiple new relations between entities in the knowledge graph. Relations should be in active voice. Recommended relation types (from mcp-memory-service): causes, fixes, supports, opposes, contradicts, depends_on, implements, extends, replaces, documents",
|
|
170047
170317
|
inputSchema: {
|
|
170048
|
-
relations:
|
|
170049
|
-
from:
|
|
170050
|
-
to:
|
|
170051
|
-
relationType:
|
|
170318
|
+
relations: z627.array(z627.object({
|
|
170319
|
+
from: z627.string().describe("Source entity name"),
|
|
170320
|
+
to: z627.string().describe("Target entity name"),
|
|
170321
|
+
relationType: z627.string().describe("Type of relation (e.g., causes, fixes, supports, depends_on, implements)")
|
|
170052
170322
|
}))
|
|
170053
170323
|
}
|
|
170054
170324
|
},
|
|
@@ -170068,9 +170338,9 @@ ${Math.max(0, managedIds.size - result.resolved.length)} visible writable observ
|
|
|
170068
170338
|
title: "Add Observations",
|
|
170069
170339
|
description: "Add new observations to existing entities in the knowledge graph",
|
|
170070
170340
|
inputSchema: {
|
|
170071
|
-
observations:
|
|
170072
|
-
entityName:
|
|
170073
|
-
contents:
|
|
170341
|
+
observations: z627.array(z627.object({
|
|
170342
|
+
entityName: z627.string().describe("Entity name to add observations to"),
|
|
170343
|
+
contents: z627.array(z627.string()).describe("Observation contents to add")
|
|
170074
170344
|
}))
|
|
170075
170345
|
}
|
|
170076
170346
|
},
|
|
@@ -170090,7 +170360,7 @@ ${Math.max(0, managedIds.size - result.resolved.length)} visible writable observ
|
|
|
170090
170360
|
title: "Delete Entities",
|
|
170091
170361
|
description: "Delete multiple entities and their associated relations from the knowledge graph",
|
|
170092
170362
|
inputSchema: {
|
|
170093
|
-
entityNames:
|
|
170363
|
+
entityNames: z627.array(z627.string()).describe("Entity names to delete")
|
|
170094
170364
|
}
|
|
170095
170365
|
},
|
|
170096
170366
|
async ({ entityNames }) => {
|
|
@@ -170109,9 +170379,9 @@ ${Math.max(0, managedIds.size - result.resolved.length)} visible writable observ
|
|
|
170109
170379
|
title: "Delete Observations",
|
|
170110
170380
|
description: "Delete specific observations from entities in the knowledge graph",
|
|
170111
170381
|
inputSchema: {
|
|
170112
|
-
deletions:
|
|
170113
|
-
entityName:
|
|
170114
|
-
observations:
|
|
170382
|
+
deletions: z627.array(z627.object({
|
|
170383
|
+
entityName: z627.string().describe("Entity containing the observations"),
|
|
170384
|
+
observations: z627.array(z627.string()).describe("Observations to delete")
|
|
170115
170385
|
}))
|
|
170116
170386
|
}
|
|
170117
170387
|
},
|
|
@@ -170131,10 +170401,10 @@ ${Math.max(0, managedIds.size - result.resolved.length)} visible writable observ
|
|
|
170131
170401
|
title: "Delete Relations",
|
|
170132
170402
|
description: "Delete multiple relations from the knowledge graph",
|
|
170133
170403
|
inputSchema: {
|
|
170134
|
-
relations:
|
|
170135
|
-
from:
|
|
170136
|
-
to:
|
|
170137
|
-
relationType:
|
|
170404
|
+
relations: z627.array(z627.object({
|
|
170405
|
+
from: z627.string(),
|
|
170406
|
+
to: z627.string(),
|
|
170407
|
+
relationType: z627.string()
|
|
170138
170408
|
}))
|
|
170139
170409
|
}
|
|
170140
170410
|
},
|
|
@@ -170183,7 +170453,7 @@ ${Math.max(0, managedIds.size - result.resolved.length)} visible writable observ
|
|
|
170183
170453
|
title: "Search Nodes",
|
|
170184
170454
|
description: "Search for nodes in the knowledge graph based on a query",
|
|
170185
170455
|
inputSchema: {
|
|
170186
|
-
query:
|
|
170456
|
+
query: z627.string().describe("Search query to match against entity names, types, and observations")
|
|
170187
170457
|
}
|
|
170188
170458
|
},
|
|
170189
170459
|
async ({ query }) => {
|
|
@@ -170202,7 +170472,7 @@ ${Math.max(0, managedIds.size - result.resolved.length)} visible writable observ
|
|
|
170202
170472
|
title: "Open Nodes",
|
|
170203
170473
|
description: "Open specific nodes in the knowledge graph by their names",
|
|
170204
170474
|
inputSchema: {
|
|
170205
|
-
names:
|
|
170475
|
+
names: z627.array(z627.string()).describe("Entity names to retrieve")
|
|
170206
170476
|
}
|
|
170207
170477
|
},
|
|
170208
170478
|
async ({ names }) => {
|
|
@@ -170224,8 +170494,8 @@ ${Math.max(0, managedIds.size - result.resolved.length)} visible writable observ
|
|
|
170224
170494
|
title: "Rules Sync",
|
|
170225
170495
|
description: "Scan project for agent rule files (Cursor, Claude Code, Codex, Windsurf, Antigravity, Gemini CLI, Copilot, Kiro, OpenCode, Trae), deduplicate, detect conflicts, and optionally generate rules for a target agent format. Without target: returns sync status report. With target: generates converted rule files.",
|
|
170226
170496
|
inputSchema: {
|
|
170227
|
-
action:
|
|
170228
|
-
target:
|
|
170497
|
+
action: z627.enum(["status", "generate"]).describe('Action: "status" for report, "generate" to produce target files'),
|
|
170498
|
+
target: z627.enum(RULE_SOURCES).optional().describe("Target agent format for generation (required when action=generate)")
|
|
170229
170499
|
}
|
|
170230
170500
|
},
|
|
170231
170501
|
async ({ action, target }) => {
|
|
@@ -170280,9 +170550,9 @@ ${Math.max(0, managedIds.size - result.resolved.length)} visible writable observ
|
|
|
170280
170550
|
title: "Workspace Sync",
|
|
170281
170551
|
description: 'Migrate your entire workspace environment between AI coding agents (Cursor, Windsurf, Claude Code, Codex, Copilot, Gemini CLI, OpenClaw, Hermes Agent, Oh-my-Pi, Kiro, Antigravity, OpenCode, Trae). Syncs MCP server configs, workflows, rules, and skills across IDEs. Action "scan": detect all workspace configs. Action "migrate": generate configs for target agent (preview only). Action "apply": migrate AND write configs to disk with backup/rollback.',
|
|
170282
170552
|
inputSchema: {
|
|
170283
|
-
action:
|
|
170284
|
-
target:
|
|
170285
|
-
items:
|
|
170553
|
+
action: z627.enum(["scan", "migrate", "apply"]).describe('Action: "scan" to detect configs, "migrate" to preview, "apply" to write to disk'),
|
|
170554
|
+
target: z627.enum(AGENT_TARGETS).optional().describe("Target agent for migration (required for migrate)"),
|
|
170555
|
+
items: z627.array(z627.string()).optional().describe('Selective sync: list specific MCP server or skill names to sync (e.g. ["figma-remote-mcp-server", "create-subagent"]). Omit to sync all.')
|
|
170286
170556
|
}
|
|
170287
170557
|
},
|
|
170288
170558
|
async ({ action, target, items }) => {
|
|
@@ -170378,10 +170648,10 @@ ${Math.max(0, managedIds.size - result.resolved.length)} visible writable observ
|
|
|
170378
170648
|
title: "Project Skills",
|
|
170379
170649
|
description: `Memory-driven project skills. Action "list": show all available skills from all agents. Action "generate": auto-generate project-specific skills from observation patterns (gotchas, decisions, how-it-works). Action "inject": return a specific skill's full content for direct use. Generated skills follow the SKILL.md standard and can be synced across Cursor, Windsurf, Claude Code, Codex, Copilot, Kiro, Antigravity, OpenCode, and Trae. OpenClaw, Hermes Agent, and Oh-my-Pi receive skills through their official bundle/plugin/package setup lanes rather than generic workspace skill copy.`,
|
|
170380
170650
|
inputSchema: {
|
|
170381
|
-
action:
|
|
170382
|
-
name:
|
|
170383
|
-
target:
|
|
170384
|
-
write:
|
|
170651
|
+
action: z627.enum(["list", "generate", "inject"]).describe('Action: "list" to discover skills, "generate" to create from memory, "inject" to get skill content'),
|
|
170652
|
+
name: z627.string().optional().describe('Skill name (required for "inject")'),
|
|
170653
|
+
target: z627.enum(AGENT_TARGETS).optional().describe('Target agent to write generated skills to (optional for "generate")'),
|
|
170654
|
+
write: z627.boolean().optional().describe("Whether to write generated skills to disk (default: false, preview only)")
|
|
170385
170655
|
}
|
|
170386
170656
|
},
|
|
170387
170657
|
async ({ action, name, target, write }) => {
|
|
@@ -170491,12 +170761,12 @@ ${skill2.content}` }]
|
|
|
170491
170761
|
title: "Promote to Mini-Skill",
|
|
170492
170762
|
description: 'Promote observations to permanent mini-skills that never decay and are auto-injected at session start. Action "promote": convert observation(s) to a mini-skill. Action "list": show all active mini-skills. Action "delete": remove a mini-skill by ID.\n\nMini-skills are project-specific specialized knowledge derived from your actual memories \u2014 gotchas, decisions, fixes that generic online skills cannot provide.',
|
|
170493
170763
|
inputSchema: {
|
|
170494
|
-
action:
|
|
170495
|
-
observationIds:
|
|
170496
|
-
skillId:
|
|
170497
|
-
trigger:
|
|
170498
|
-
instruction:
|
|
170499
|
-
tags:
|
|
170764
|
+
action: z627.enum(["promote", "list", "delete"]).describe("Action to perform"),
|
|
170765
|
+
observationIds: z627.array(z627.number()).optional().describe('Observation IDs to promote (required for "promote")'),
|
|
170766
|
+
skillId: z627.number().optional().describe('Mini-skill ID to delete (required for "delete")'),
|
|
170767
|
+
trigger: z627.string().optional().describe("Override: when this skill should be applied"),
|
|
170768
|
+
instruction: z627.string().optional().describe("Override: what the agent should do"),
|
|
170769
|
+
tags: z627.array(z627.string()).optional().describe("Extra classification tags")
|
|
170500
170770
|
}
|
|
170501
170771
|
},
|
|
170502
170772
|
async ({ action, observationIds, skillId, trigger, instruction, tags }) => {
|
|
@@ -170575,8 +170845,8 @@ ${skill2.content}` }]
|
|
|
170575
170845
|
title: "Consolidate Memories",
|
|
170576
170846
|
description: 'Find and merge similar observations to reduce memory bloat. Uses text similarity to cluster related observations by entity+type, then merges them into single consolidated records. Use action="preview" to see candidates without changing data, action="execute" to merge.\n\nExample: 10 similar gotchas about Windows paths \u2192 1 consolidated gotcha with all facts preserved.',
|
|
170577
170847
|
inputSchema: {
|
|
170578
|
-
action:
|
|
170579
|
-
threshold:
|
|
170848
|
+
action: z627.enum(["preview", "execute"]).describe("preview = dry run showing candidates, execute = actually merge"),
|
|
170849
|
+
threshold: z627.number().optional().describe("Similarity threshold 0.0-1.0 (default: 0.45). Lower = more aggressive merging")
|
|
170580
170850
|
}
|
|
170581
170851
|
},
|
|
170582
170852
|
async ({ action, threshold }) => {
|
|
@@ -170622,13 +170892,13 @@ ${skill2.content}` }]
|
|
|
170622
170892
|
title: "Start Session",
|
|
170623
170893
|
description: "Start a new coding session. Returns a compact continuation card with the latest handoff and a few memory references. Call this at the beginning of a session to track activity; retrieve a referenced memory only when it is relevant. Any previous active session for this project will be auto-closed. By default this is lightweight: it binds the project, opens a session, and avoids dumping full history into the new context. Coordination identity is opt-in via `joinTeam: true` or a separate `team_manage` join call.\n\nIMPORTANT for HTTP/control-plane mode: pass `projectRoot` with the absolute path to your workspace root (e.g., the directory open in your IDE). Memorix uses this to detect the git project and bind this session to the correct project context. Without it, project-scoped tools will be disabled.",
|
|
170624
170894
|
inputSchema: {
|
|
170625
|
-
sessionId:
|
|
170626
|
-
agent:
|
|
170627
|
-
agentType:
|
|
170628
|
-
instanceId:
|
|
170629
|
-
joinTeam:
|
|
170630
|
-
role:
|
|
170631
|
-
projectRoot:
|
|
170895
|
+
sessionId: z627.string().optional().describe("Custom session ID (auto-generated if omitted)"),
|
|
170896
|
+
agent: z627.string().optional().describe('Agent/IDE name (e.g., "cursor", "windsurf", "claude-code")'),
|
|
170897
|
+
agentType: z627.string().optional().describe('Agent type used for optional coordination identity mapping (e.g., "windsurf", "cursor").'),
|
|
170898
|
+
instanceId: z627.string().optional().describe("Stable instance ID for optional coordination identity across restarts. If omitted with joinTeam=true, Memorix derives a deterministic fallback from the project and agent identity."),
|
|
170899
|
+
joinTeam: z627.boolean().optional().describe("If true, also join orchestration coordination state for this session. Defaults to false."),
|
|
170900
|
+
role: z627.string().optional().describe("Explicit role override used only when joinTeam=true."),
|
|
170901
|
+
projectRoot: z627.string().optional().describe(
|
|
170632
170902
|
"Absolute path to the workspace/project root directory (e.g., the folder open in your IDE). Memorix will detect the git project from this path and bind this session to it. Required for HTTP transport when multiple projects are open simultaneously or when rebinding an existing control-plane session."
|
|
170633
170903
|
)
|
|
170634
170904
|
}
|
|
@@ -170835,8 +171105,8 @@ ${s2.instruction}`.toLowerCase();
|
|
|
170835
171105
|
title: "End Session",
|
|
170836
171106
|
description: "End a coding session with a structured summary. This summary will be injected into the next session so the next agent can resume work seamlessly.\n\nRecommended summary format:\n## Goal\n[What we were working on]\n\n## Discoveries\n- [Technical findings, gotchas, learnings]\n\n## Accomplished\n- [OK] [Completed tasks]\n- [PENDING] [Pending for next session]\n\n## Relevant Files\n- path/to/file \u2014 [what changed]",
|
|
170837
171107
|
inputSchema: {
|
|
170838
|
-
sessionId:
|
|
170839
|
-
summary:
|
|
171108
|
+
sessionId: z627.string().describe("Session ID to close (from memorix_session_start)"),
|
|
171109
|
+
summary: z627.string().optional().describe("Structured session summary (Goal/Discoveries/Accomplished/Files format)")
|
|
170840
171110
|
}
|
|
170841
171111
|
},
|
|
170842
171112
|
async ({ sessionId, summary }) => {
|
|
@@ -170864,7 +171134,7 @@ ${summary ? "Summary saved for next session context injection." : "No summary pr
|
|
|
170864
171134
|
title: "Session Context",
|
|
170865
171135
|
description: "Get context from previous coding sessions. Use this after compaction to recover lost context, or to manually review session history. Returns previous session summaries and key observations.",
|
|
170866
171136
|
inputSchema: {
|
|
170867
|
-
limit:
|
|
171137
|
+
limit: z627.number().optional().describe("Number of recent sessions to include (default: 3)")
|
|
170868
171138
|
}
|
|
170869
171139
|
},
|
|
170870
171140
|
async ({ limit: limit2 }) => {
|
|
@@ -170897,14 +171167,14 @@ ${summary ? "Summary saved for next session context injection." : "No summary pr
|
|
|
170897
171167
|
title: "Compact Continuity Checkpoints",
|
|
170898
171168
|
description: "Inspect, preview, or archive bounded checkpoints recorded around a host-native context compaction. Use only to debug or explicitly review compaction continuity. These are lifecycle records, not durable memories or transcript backups. CLI equivalent: memorix checkpoint list|show|context|archive.",
|
|
170899
171169
|
inputSchema: {
|
|
170900
|
-
action:
|
|
170901
|
-
id:
|
|
170902
|
-
sessionId:
|
|
170903
|
-
agent:
|
|
170904
|
-
task:
|
|
170905
|
-
maxTokens:
|
|
170906
|
-
limit:
|
|
170907
|
-
includeArchived:
|
|
171170
|
+
action: z627.enum(["list", "show", "context", "archive"]).default("list"),
|
|
171171
|
+
id: z627.string().optional().describe("Checkpoint ID for show, context, or archive"),
|
|
171172
|
+
sessionId: z627.string().optional().describe("Optional host session ID filter"),
|
|
171173
|
+
agent: z627.string().optional().describe("Optional host agent filter"),
|
|
171174
|
+
task: z627.string().optional().describe("Current task for a bounded context preview"),
|
|
171175
|
+
maxTokens: z627.number().optional().describe("Maximum tokens for action=context (default: 420)"),
|
|
171176
|
+
limit: z627.number().optional().describe("Maximum records for action=list (default: 20)"),
|
|
171177
|
+
includeArchived: z627.boolean().optional().default(false).describe("Include archived records in action=list")
|
|
170908
171178
|
}
|
|
170909
171179
|
},
|
|
170910
171180
|
async ({ action, id, sessionId, agent, task, maxTokens, limit: limit2, includeArchived }) => {
|
|
@@ -170977,9 +171247,9 @@ ${summary ? "Summary saved for next session context injection." : "No summary pr
|
|
|
170977
171247
|
title: "Transfer Memories",
|
|
170978
171248
|
description: 'Export or import project memories. Action "export": export observations visible to the current agent and project sessions (JSON or Markdown). Action "import": import from a JSON export (re-assigns IDs, skips duplicate topicKeys).',
|
|
170979
171249
|
inputSchema: {
|
|
170980
|
-
action:
|
|
170981
|
-
format:
|
|
170982
|
-
data:
|
|
171250
|
+
action: z627.enum(["export", "import"]).describe("Operation: export or import"),
|
|
171251
|
+
format: z627.enum(["json", "markdown"]).optional().describe("Export format (for export, default: json)"),
|
|
171252
|
+
data: z627.string().optional().describe("JSON string from a previous export (for import)")
|
|
170983
171253
|
}
|
|
170984
171254
|
},
|
|
170985
171255
|
async ({ action, format, data: jsonStr }) => {
|
|
@@ -171028,7 +171298,7 @@ ${json2}
|
|
|
171028
171298
|
title: "Launch Dashboard",
|
|
171029
171299
|
description: "Launch the Memorix Web Dashboard in the browser. In HTTP control-plane mode, this reuses the current control-plane dashboard. In stdio/standalone mode, it starts the standalone dashboard server.",
|
|
171030
171300
|
inputSchema: {
|
|
171031
|
-
port:
|
|
171301
|
+
port: z627.number().optional().describe("Optional port override for standalone mode. In HTTP control-plane mode, the active dashboard port is reused.")
|
|
171032
171302
|
}
|
|
171033
171303
|
},
|
|
171034
171304
|
async ({ port: dashboardPort }) => {
|
|
@@ -171192,13 +171462,13 @@ ${json2}
|
|
|
171192
171462
|
title: "Evidence Cards",
|
|
171193
171463
|
description: "Inspect the bounded, project-scoped provenance cards behind Memorix context. Use list for a compact index, get/events for one source, sync to repair the projection, and stale when known source files changed. Cards expose sourceRef, locator, capturedHash, and freshness.",
|
|
171194
171464
|
inputSchema: {
|
|
171195
|
-
action:
|
|
171196
|
-
candidateKind:
|
|
171197
|
-
candidateId:
|
|
171198
|
-
query:
|
|
171199
|
-
paths:
|
|
171200
|
-
reason:
|
|
171201
|
-
limit:
|
|
171465
|
+
action: z627.enum(["list", "get", "sync", "stale", "events"]).describe("Evidence operation"),
|
|
171466
|
+
candidateKind: z627.enum(["observation", "code", "git", "test", "document", "workflow", "graph"]).optional().default("observation"),
|
|
171467
|
+
candidateId: z627.string().optional().describe("Candidate id, usually an observation id"),
|
|
171468
|
+
query: z627.string().optional().describe("Optional title/source query for list"),
|
|
171469
|
+
paths: z627.array(z627.string()).max(200).optional().describe("Changed source paths for stale"),
|
|
171470
|
+
reason: z627.string().max(500).optional().describe("Why evidence became stale"),
|
|
171471
|
+
limit: z627.number().int().positive().max(100).optional().default(20)
|
|
171202
171472
|
}
|
|
171203
171473
|
},
|
|
171204
171474
|
async ({ action, candidateKind, candidateId, query, paths, reason, limit: limit2 }) => {
|
|
@@ -171238,15 +171508,15 @@ ${json2}
|
|
|
171238
171508
|
title: "Memory Feedback",
|
|
171239
171509
|
description: "Record or inspect auditable memory outcomes. Positive verification/use strengthens recall; correction, conflict, source change, or weaken lowers it. Use revoke with targetEventId to undo one prior signal without deleting audit history.",
|
|
171240
171510
|
inputSchema: {
|
|
171241
|
-
action:
|
|
171242
|
-
candidateKind:
|
|
171243
|
-
candidateId:
|
|
171244
|
-
signal:
|
|
171245
|
-
sourceRef:
|
|
171246
|
-
actor:
|
|
171247
|
-
note:
|
|
171248
|
-
targetEventId:
|
|
171249
|
-
limit:
|
|
171511
|
+
action: z627.enum(["record", "show", "audit"]).describe("Feedback operation"),
|
|
171512
|
+
candidateKind: z627.enum(["observation", "claim", "durable-memory", "workflow"]).optional().default("observation"),
|
|
171513
|
+
candidateId: z627.string().describe("Memory or knowledge candidate id"),
|
|
171514
|
+
signal: z627.enum(["user-correction", "verification-success", "verification-failure", "code-change", "used", "not-used", "code-conflict", "strengthen", "weaken", "revoke"]).optional(),
|
|
171515
|
+
sourceRef: z627.string().max(500).optional().describe("Source of this feedback, such as test:run-42 or user:chat"),
|
|
171516
|
+
actor: z627.string().max(200).optional(),
|
|
171517
|
+
note: z627.string().max(2e3).optional(),
|
|
171518
|
+
targetEventId: z627.string().optional().describe("Existing event id when action=record and signal=revoke"),
|
|
171519
|
+
limit: z627.number().int().positive().max(200).optional().default(100)
|
|
171250
171520
|
}
|
|
171251
171521
|
},
|
|
171252
171522
|
async ({ action, candidateKind, candidateId, signal, sourceRef, actor, note, targetEventId, limit: limit2 }) => {
|
|
@@ -171312,19 +171582,19 @@ ${json2}
|
|
|
171312
171582
|
title: "Coordination Management",
|
|
171313
171583
|
description: 'Register, unregister, or list agents in the project coordination state. Action "join": register this agent (returns agent ID and instance ID for reactivation). Action "leave": mark agent inactive, release locks. Action "status": list all agents with roles and capabilities, plus role occupancy. Action "listRoles": show defined roles for this project. Action "addRole": define a new role for this project. Action "removeRole": remove a role definition.',
|
|
171314
171584
|
inputSchema: {
|
|
171315
|
-
action:
|
|
171316
|
-
name:
|
|
171317
|
-
agentType:
|
|
171318
|
-
instanceId:
|
|
171319
|
-
role:
|
|
171320
|
-
capabilities:
|
|
171321
|
-
agentId:
|
|
171585
|
+
action: z627.enum(["join", "leave", "status", "listRoles", "addRole", "removeRole"]).describe("Operation to perform"),
|
|
171586
|
+
name: z627.string().optional().describe('Agent display name for join (e.g., "cursor-frontend")'),
|
|
171587
|
+
agentType: z627.string().optional().describe('Agent type for join (e.g., "windsurf", "cursor", "claude-code")'),
|
|
171588
|
+
instanceId: z627.string().optional().describe("Stable instance ID for join (preserves identity across restarts)"),
|
|
171589
|
+
role: z627.string().optional().describe("Agent role for join (defaults by agentType if omitted)"),
|
|
171590
|
+
capabilities: z627.array(z627.string()).optional().describe("Agent capabilities for join"),
|
|
171591
|
+
agentId: z627.string().optional().describe("Agent ID for leave"),
|
|
171322
171592
|
// Role management params
|
|
171323
|
-
roleId:
|
|
171324
|
-
label:
|
|
171325
|
-
roleDescription:
|
|
171326
|
-
preferredAgentTypes:
|
|
171327
|
-
maxConcurrent:
|
|
171593
|
+
roleId: z627.string().optional().describe("Role ID (for addRole/removeRole)"),
|
|
171594
|
+
label: z627.string().optional().describe("Role label (for addRole)"),
|
|
171595
|
+
roleDescription: z627.string().optional().describe("Role description (for addRole)"),
|
|
171596
|
+
preferredAgentTypes: z627.array(z627.string()).optional().describe("Preferred agent types for this role (for addRole)"),
|
|
171597
|
+
maxConcurrent: z627.number().optional().describe("Max concurrent agents for this role (for addRole, default 1)")
|
|
171328
171598
|
}
|
|
171329
171599
|
},
|
|
171330
171600
|
async ({ action, name, agentType, instanceId, role, capabilities, agentId, roleId, label, roleDescription, preferredAgentTypes, maxConcurrent }) => {
|
|
@@ -171437,9 +171707,9 @@ ${agentLines.join("\n")}`
|
|
|
171437
171707
|
title: "File Lock Management",
|
|
171438
171708
|
description: 'Advisory file locks to prevent conflicting edits. Auto-releases after 10 min TTL. Action "lock": acquire lock. Action "unlock": release lock. Action "status": check lock status.',
|
|
171439
171709
|
inputSchema: {
|
|
171440
|
-
action:
|
|
171441
|
-
file:
|
|
171442
|
-
agentId:
|
|
171710
|
+
action: z627.enum(["lock", "unlock", "status"]).describe("Operation to perform"),
|
|
171711
|
+
file: z627.string().optional().describe("File path (required for lock/unlock, optional for status \u2014 omit to list all)"),
|
|
171712
|
+
agentId: z627.string().optional().describe("Agent ID (required for lock/unlock)")
|
|
171443
171713
|
}
|
|
171444
171714
|
},
|
|
171445
171715
|
async ({ action, file, agentId }) => {
|
|
@@ -171481,17 +171751,17 @@ ${lines.join("\n")}` }] };
|
|
|
171481
171751
|
title: "Task Status",
|
|
171482
171752
|
description: 'Create, claim, complete, or list tasks in the team task board. Supports dependencies. Action "create": create a task. Action "claim": assign to yourself (atomic, race-safe). Action "complete": mark done with result. Action "list": show tasks.',
|
|
171483
171753
|
inputSchema: {
|
|
171484
|
-
action:
|
|
171485
|
-
description:
|
|
171486
|
-
deps:
|
|
171487
|
-
taskId:
|
|
171488
|
-
agentId:
|
|
171489
|
-
result:
|
|
171490
|
-
status:
|
|
171491
|
-
available:
|
|
171492
|
-
metadata:
|
|
171493
|
-
requiredRole:
|
|
171494
|
-
preferredRole:
|
|
171754
|
+
action: z627.enum(["create", "claim", "complete", "list"]).describe("Operation to perform"),
|
|
171755
|
+
description: z627.string().optional().describe("Task description (for create)"),
|
|
171756
|
+
deps: z627.array(z627.string()).optional().describe("Dependency task IDs (for create)"),
|
|
171757
|
+
taskId: z627.string().optional().describe("Task ID (for claim/complete)"),
|
|
171758
|
+
agentId: z627.string().optional().describe("Agent ID (for claim/complete)"),
|
|
171759
|
+
result: z627.string().optional().describe("Result summary (for complete)"),
|
|
171760
|
+
status: z627.enum(["pending", "in_progress", "completed", "failed"]).optional().describe("Filter by status (for list)"),
|
|
171761
|
+
available: z627.boolean().optional().describe("Show only claimable tasks (for list)"),
|
|
171762
|
+
metadata: z627.string().optional().describe("JSON metadata for the task (for create). Used by planner/review tasks for autonomous mode."),
|
|
171763
|
+
requiredRole: z627.string().optional().describe("Required role for this task (for create). Agents without this role cannot claim."),
|
|
171764
|
+
preferredRole: z627.string().optional().describe("Preferred role for this task (for create). Agents with this role are prioritized.")
|
|
171495
171765
|
}
|
|
171496
171766
|
},
|
|
171497
171767
|
async ({ action, description: desc, deps, taskId, agentId, result, status, available, metadata, requiredRole, preferredRole }) => {
|
|
@@ -171564,15 +171834,15 @@ ${lines.join("\n")}` }] };
|
|
|
171564
171834
|
title: "Team Messaging",
|
|
171565
171835
|
description: `Send, broadcast, or read messages between agents. Durable: messages survive restarts and reach inactive recipients. Action "send": direct message to one agent. Action "broadcast": message all agents. Action "inbox": read this agent's inbox.`,
|
|
171566
171836
|
inputSchema: {
|
|
171567
|
-
action:
|
|
171568
|
-
from:
|
|
171569
|
-
to:
|
|
171570
|
-
type:
|
|
171571
|
-
content:
|
|
171572
|
-
agentId:
|
|
171573
|
-
markRead:
|
|
171574
|
-
toRole:
|
|
171575
|
-
handoffStatus:
|
|
171837
|
+
action: z627.enum(["send", "broadcast", "inbox"]).describe("Operation to perform"),
|
|
171838
|
+
from: z627.string().optional().describe("Your sender agent ID. Omit it to use this session identity."),
|
|
171839
|
+
to: z627.string().optional().describe("Receiver agent ID (for send)"),
|
|
171840
|
+
type: z627.enum(["request", "response", "info", "announcement", "contract", "error", "handoff"]).optional().describe("Message type (for send/broadcast)"),
|
|
171841
|
+
content: z627.string().optional().describe("Message content (for send/broadcast)"),
|
|
171842
|
+
agentId: z627.string().optional().describe("Agent ID (for inbox)"),
|
|
171843
|
+
markRead: z627.boolean().optional().default(false).describe("Mark messages as read (for inbox)"),
|
|
171844
|
+
toRole: z627.string().optional().describe("Target role for role-based messaging/handoff (for send)"),
|
|
171845
|
+
handoffStatus: z627.enum(["open", "claimed", "completed", "archived"]).optional().describe("Handoff status (for send with type=handoff)")
|
|
171576
171846
|
}
|
|
171577
171847
|
},
|
|
171578
171848
|
async ({ action, from, to, type: msgType, content, agentId, markRead, toRole, handoffStatus }) => {
|
|
@@ -171642,8 +171912,8 @@ ${lines.join("\n")}` }] };
|
|
|
171642
171912
|
title: "Team Poll \u2014 Situational Awareness",
|
|
171643
171913
|
description: "Get a full snapshot of your project coordination state in one call. Returns: your agent info, watermark (new observations since last session), inbox (unread messages), tasks (your in-progress, available to claim, completed, failed), and team roster (active agents). Use this to decide what to work on next.",
|
|
171644
171914
|
inputSchema: {
|
|
171645
|
-
agentId:
|
|
171646
|
-
markInboxRead:
|
|
171915
|
+
agentId: z627.string().optional().describe("Your agent ID (from team_manage join or session_start with joinTeam=true). If omitted, returns project-level overview only."),
|
|
171916
|
+
markInboxRead: z627.boolean().optional().describe("If true, mark all inbox messages as read after returning them.")
|
|
171647
171917
|
}
|
|
171648
171918
|
},
|
|
171649
171919
|
async ({ agentId, markInboxRead }) => {
|
|
@@ -171737,13 +172007,13 @@ ${lines.join("\n")}` }] };
|
|
|
171737
172007
|
title: "Team Handoff \u2014 Agent Context Transfer",
|
|
171738
172008
|
description: "Create a structured handoff artifact when passing work to another agent. A targeted handoff is visible only to its sender and recipient; a broadcast handoff is team-visible. The handoff is stored as a durable observation (immune to archival) and a notification message is sent to the recipient. Use this when completing a task and another agent should continue, or when you want to leave context for whoever works on this next.",
|
|
171739
172009
|
inputSchema: {
|
|
171740
|
-
fromAgentId:
|
|
171741
|
-
summary:
|
|
171742
|
-
context:
|
|
171743
|
-
toAgentId:
|
|
171744
|
-
taskId:
|
|
171745
|
-
filesModified:
|
|
171746
|
-
concepts:
|
|
172010
|
+
fromAgentId: z627.string().describe("Your agent ID (from team_manage join or session_start with joinTeam=true)"),
|
|
172011
|
+
summary: z627.string().describe("Human-readable summary of what you did and what needs to happen next"),
|
|
172012
|
+
context: z627.string().describe("Detailed context for the next agent: what was done, current state, known issues, next steps"),
|
|
172013
|
+
toAgentId: z627.string().optional().describe("Specific recipient agent ID. Omit to broadcast to all."),
|
|
172014
|
+
taskId: z627.string().optional().describe("Link to a specific team_task ID"),
|
|
172015
|
+
filesModified: z627.array(z627.string()).optional().describe("Files you modified during this work"),
|
|
172016
|
+
concepts: z627.array(z627.string()).optional().describe("Key concepts for search discoverability")
|
|
171747
172017
|
}
|
|
171748
172018
|
},
|
|
171749
172019
|
async ({ fromAgentId, summary, context, toAgentId, taskId, filesModified, concepts }) => {
|
|
@@ -171823,7 +172093,7 @@ ${lines.join("\n")}` }] };
|
|
|
171823
172093
|
title: "Manage Controlled Media",
|
|
171824
172094
|
description: "Use the controlled local media library for an explicit import, attachment, inspection, or MiniMax generation request. Assets stay outside the Git worktree and enter normal memory only when attach is explicitly true. Use the CLI for destructive removal, quota cleanup, and direct generation. MCP generation is disabled by default and requires MEMORIX_MCP_MEDIA_GENERATION=1 after the operator reviews provider billing.",
|
|
171825
172095
|
inputSchema: {
|
|
171826
|
-
action:
|
|
172096
|
+
action: z627.enum([
|
|
171827
172097
|
"import",
|
|
171828
172098
|
"attach",
|
|
171829
172099
|
"list",
|
|
@@ -171834,32 +172104,32 @@ ${lines.join("\n")}` }] };
|
|
|
171834
172104
|
...mediaTranscriptionEnabled ? ["derive-audio"] : [],
|
|
171835
172105
|
...mediaGenerationEnabled ? ["generate-image", "generate-video"] : []
|
|
171836
172106
|
]),
|
|
171837
|
-
path:
|
|
171838
|
-
assetId:
|
|
171839
|
-
jobId:
|
|
171840
|
-
kind:
|
|
171841
|
-
limit:
|
|
171842
|
-
title:
|
|
171843
|
-
narrative:
|
|
171844
|
-
maxPages:
|
|
171845
|
-
maxChars:
|
|
171846
|
-
attach:
|
|
172107
|
+
path: z627.string().optional().describe("Explicit local image/audio/video/PDF path for import."),
|
|
172108
|
+
assetId: z627.string().optional().describe("Controlled MediaAsset ID for attach/show."),
|
|
172109
|
+
jobId: z627.string().optional().describe("Durable media job ID for status."),
|
|
172110
|
+
kind: z627.enum(["image", "audio", "video", "document"]).optional().describe("Optional asset list filter."),
|
|
172111
|
+
limit: z627.number().int().min(1).max(100).optional().describe("Maximum assets to list."),
|
|
172112
|
+
title: z627.string().optional().describe("Observation title when attaching generated/imported output."),
|
|
172113
|
+
narrative: z627.string().optional().describe("Short retrieval text when attaching an asset."),
|
|
172114
|
+
maxPages: z627.number().int().min(1).max(100).optional().describe("Bounded PDF extraction page limit."),
|
|
172115
|
+
maxChars: z627.number().int().min(1).max(6e4).optional().describe("Bounded PDF extraction character limit."),
|
|
172116
|
+
attach: z627.boolean().optional().describe("Attach generated/imported output to normal project memory explicitly."),
|
|
171847
172117
|
...mediaGenerationOrTranscription ? {
|
|
171848
|
-
model:
|
|
171849
|
-
prompt:
|
|
172118
|
+
model: z627.string().max(160).optional().describe("Provider model for the selected media action."),
|
|
172119
|
+
prompt: z627.string().optional().describe("Explicit prompt for generation or transcription.")
|
|
171850
172120
|
} : {},
|
|
171851
172121
|
...mediaTranscriptionEnabled ? {
|
|
171852
|
-
provider:
|
|
171853
|
-
language:
|
|
172122
|
+
provider: z627.enum(["openai", "groq"]).optional().describe("Explicit audio transcription provider."),
|
|
172123
|
+
language: z627.string().max(32).optional().describe("Optional ISO-639-1 hint for audio transcription.")
|
|
171854
172124
|
} : {},
|
|
171855
172125
|
...mediaGenerationEnabled ? {
|
|
171856
|
-
image:
|
|
171857
|
-
region:
|
|
171858
|
-
n:
|
|
171859
|
-
ratio:
|
|
171860
|
-
width:
|
|
171861
|
-
height:
|
|
171862
|
-
duration:
|
|
172126
|
+
image: z627.string().optional().describe("Base64-encoded reference image for image-to-image generation."),
|
|
172127
|
+
region: z627.enum(["global", "cn"]).optional().describe("MiniMax deployment region."),
|
|
172128
|
+
n: z627.number().int().min(1).max(4).optional().describe("Image output count."),
|
|
172129
|
+
ratio: z627.enum(["adaptive", "1:1", "16:9", "4:3", "3:2", "2:3", "3:4", "9:16", "21:9"]).optional().describe("Image or video aspect ratio."),
|
|
172130
|
+
width: z627.number().int().min(1).max(8192).optional().describe("Requested image width."),
|
|
172131
|
+
height: z627.number().int().min(1).max(8192).optional().describe("Requested image height."),
|
|
172132
|
+
duration: z627.union([z627.literal(5), z627.literal(10)]).optional().describe("MiniMax video duration in seconds.")
|
|
171863
172133
|
} : {}
|
|
171864
172134
|
}
|
|
171865
172135
|
},
|
|
@@ -172057,10 +172327,10 @@ ${lines.join("\n")}` }] };
|
|
|
172057
172327
|
title: "Ingest Image",
|
|
172058
172328
|
description: "Legacy compatibility path: import caller-provided image bytes into the controlled local asset library, then store a text retrieval projection. For durable media operations, prefer memorix_media or the media CLI.",
|
|
172059
172329
|
inputSchema: {
|
|
172060
|
-
base64:
|
|
172061
|
-
mimeType:
|
|
172062
|
-
filename:
|
|
172063
|
-
prompt:
|
|
172330
|
+
base64: z627.string().describe("Base64-encoded image data"),
|
|
172331
|
+
mimeType: z627.string().optional().describe("Deprecated compatibility hint. Memorix detects the actual MIME type from the image bytes."),
|
|
172332
|
+
filename: z627.string().optional().describe("Original filename"),
|
|
172333
|
+
prompt: z627.string().optional().describe("Custom analysis prompt")
|
|
172064
172334
|
}
|
|
172065
172335
|
},
|
|
172066
172336
|
async (args) => {
|