memorix 1.8.0 → 1.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/dist/cli/index.js +407 -130
- package/dist/dashboard/static/app.js +37 -23
- package/dist/dashboard/static/index.html +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +633 -391
- 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 +29 -0
- package/dist/sdk.js +625 -390
- 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 +10 -8
- package/docs/API_REFERENCE.md +12 -8
- package/docs/ARCHITECTURE.md +3 -1
- package/docs/CONFIGURATION.md +2 -2
- package/docs/DASHBOARD.md +6 -0
- package/docs/DEVELOPMENT.md +2 -2
- package/docs/README.md +14 -8
- package/package.json +1 -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/dashboard.ts +1 -1
- package/src/cli/commands/serve-http.ts +38 -3
- 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/dashboard/server.ts +85 -86
- package/src/dashboard/static/index.html +1 -1
- package/src/llm/provider.ts +17 -4
- package/src/server/mcp-compat.ts +82 -0
- package/src/server/mcp-diagnostics.ts +13 -4
- package/src/server.ts +9 -6
package/dist/index.js
CHANGED
|
@@ -3279,8 +3279,10 @@ function loadEnvFile(filePath) {
|
|
|
3279
3279
|
loadedEnvFiles.push(filePath);
|
|
3280
3280
|
}
|
|
3281
3281
|
function loadDotenv(projectRoot, options = {}) {
|
|
3282
|
-
|
|
3283
|
-
|
|
3282
|
+
const userHomeDir = options.userHomeDir ?? homedir4();
|
|
3283
|
+
const normalizedProjectRoot = projectRoot ?? null;
|
|
3284
|
+
if (dotenvLoaded && dotenvProjectRoot === normalizedProjectRoot && dotenvHomeDir === userHomeDir) return;
|
|
3285
|
+
if (dotenvLoaded && (dotenvProjectRoot !== normalizedProjectRoot || dotenvHomeDir !== userHomeDir)) {
|
|
3284
3286
|
resetDotenv();
|
|
3285
3287
|
}
|
|
3286
3288
|
loadedEnvFiles.length = 0;
|
|
@@ -3289,9 +3291,10 @@ function loadDotenv(projectRoot, options = {}) {
|
|
|
3289
3291
|
if (projectRoot) {
|
|
3290
3292
|
loadEnvFile(getProjectDotenvPath(projectRoot));
|
|
3291
3293
|
}
|
|
3292
|
-
loadEnvFile(getGlobalDotenvPath(
|
|
3294
|
+
loadEnvFile(getGlobalDotenvPath(userHomeDir));
|
|
3293
3295
|
dotenvLoaded = true;
|
|
3294
|
-
dotenvProjectRoot =
|
|
3296
|
+
dotenvProjectRoot = normalizedProjectRoot;
|
|
3297
|
+
dotenvHomeDir = userHomeDir;
|
|
3295
3298
|
}
|
|
3296
3299
|
function resetDotenv() {
|
|
3297
3300
|
for (const key of injectedKeys) {
|
|
@@ -3300,6 +3303,7 @@ function resetDotenv() {
|
|
|
3300
3303
|
injectedKeys.clear();
|
|
3301
3304
|
dotenvLoaded = false;
|
|
3302
3305
|
dotenvProjectRoot = null;
|
|
3306
|
+
dotenvHomeDir = null;
|
|
3303
3307
|
loadedEnvFiles.length = 0;
|
|
3304
3308
|
loadedEnvKeys.clear();
|
|
3305
3309
|
}
|
|
@@ -3312,7 +3316,7 @@ function getLoadedEnvKeys() {
|
|
|
3312
3316
|
function getLoadedEnvValue(key) {
|
|
3313
3317
|
return loadedEnvValues.get(key);
|
|
3314
3318
|
}
|
|
3315
|
-
var dotenvLoaded, dotenvProjectRoot, loadedEnvFiles, loadedEnvKeys, loadedEnvValues, injectedKeys;
|
|
3319
|
+
var dotenvLoaded, dotenvProjectRoot, dotenvHomeDir, loadedEnvFiles, loadedEnvKeys, loadedEnvValues, injectedKeys;
|
|
3316
3320
|
var init_dotenv_loader = __esm({
|
|
3317
3321
|
"src/config/dotenv-loader.ts"() {
|
|
3318
3322
|
"use strict";
|
|
@@ -3320,6 +3324,7 @@ var init_dotenv_loader = __esm({
|
|
|
3320
3324
|
init_config_paths();
|
|
3321
3325
|
dotenvLoaded = false;
|
|
3322
3326
|
dotenvProjectRoot = null;
|
|
3327
|
+
dotenvHomeDir = null;
|
|
3323
3328
|
loadedEnvFiles = [];
|
|
3324
3329
|
loadedEnvKeys = /* @__PURE__ */ new Set();
|
|
3325
3330
|
loadedEnvValues = /* @__PURE__ */ new Map();
|
|
@@ -3671,33 +3676,33 @@ __export(config_exports, {
|
|
|
3671
3676
|
resetConfigCache: () => resetConfigCache,
|
|
3672
3677
|
resetDotenv: () => resetDotenv
|
|
3673
3678
|
});
|
|
3674
|
-
function getLLMApiKey() {
|
|
3675
|
-
return getResolvedMemoryLane().llm.apiKey;
|
|
3679
|
+
function getLLMApiKey(options = {}) {
|
|
3680
|
+
return getResolvedMemoryLane(options).llm.apiKey;
|
|
3676
3681
|
}
|
|
3677
|
-
function getLLMProvider() {
|
|
3678
|
-
const provider2 = getResolvedMemoryLane().llm.provider;
|
|
3682
|
+
function getLLMProvider(options = {}) {
|
|
3683
|
+
const provider2 = getResolvedMemoryLane(options).llm.provider;
|
|
3679
3684
|
if (provider2) return provider2;
|
|
3680
3685
|
if (process.env.ANTHROPIC_API_KEY && !process.env.OPENAI_API_KEY) return "anthropic";
|
|
3681
3686
|
if (process.env.OPENROUTER_API_KEY && !process.env.OPENAI_API_KEY) return "openrouter";
|
|
3682
3687
|
return "openai";
|
|
3683
3688
|
}
|
|
3684
|
-
function getLLMModel(providerDefault) {
|
|
3685
|
-
return getResolvedMemoryLane().llm.model || providerDefault;
|
|
3689
|
+
function getLLMModel(providerDefault, options = {}) {
|
|
3690
|
+
return getResolvedMemoryLane(options).llm.model || providerDefault;
|
|
3686
3691
|
}
|
|
3687
|
-
function getLLMBaseUrl(providerDefault) {
|
|
3688
|
-
return getResolvedMemoryLane().llm.baseUrl || providerDefault;
|
|
3692
|
+
function getLLMBaseUrl(providerDefault, options = {}) {
|
|
3693
|
+
return getResolvedMemoryLane(options).llm.baseUrl || providerDefault;
|
|
3689
3694
|
}
|
|
3690
|
-
function getAgentLLMApiKey() {
|
|
3691
|
-
return getResolvedAgentLane().apiKey;
|
|
3695
|
+
function getAgentLLMApiKey(options = {}) {
|
|
3696
|
+
return getResolvedAgentLane(options).apiKey;
|
|
3692
3697
|
}
|
|
3693
|
-
function getAgentLLMProvider() {
|
|
3694
|
-
return getResolvedAgentLane().provider || getLLMProvider();
|
|
3698
|
+
function getAgentLLMProvider(options = {}) {
|
|
3699
|
+
return getResolvedAgentLane(options).provider || getLLMProvider(options);
|
|
3695
3700
|
}
|
|
3696
|
-
function getAgentLLMModel(providerDefault) {
|
|
3697
|
-
return getResolvedAgentLane().model || getLLMModel(providerDefault);
|
|
3701
|
+
function getAgentLLMModel(providerDefault, options = {}) {
|
|
3702
|
+
return getResolvedAgentLane(options).model || getLLMModel(providerDefault, options);
|
|
3698
3703
|
}
|
|
3699
|
-
function getAgentLLMBaseUrl(providerDefault) {
|
|
3700
|
-
return getResolvedAgentLane().baseUrl || getLLMBaseUrl(providerDefault);
|
|
3704
|
+
function getAgentLLMBaseUrl(providerDefault, options = {}) {
|
|
3705
|
+
return getResolvedAgentLane(options).baseUrl || getLLMBaseUrl(providerDefault, options);
|
|
3701
3706
|
}
|
|
3702
3707
|
function getEmbeddingMode() {
|
|
3703
3708
|
const provider2 = getResolvedEmbeddingLane().provider?.toLowerCase()?.trim();
|
|
@@ -5956,18 +5961,19 @@ async function* callLLMWithToolsStream(messages, tools) {
|
|
|
5956
5961
|
}
|
|
5957
5962
|
function initLLM(options = {}) {
|
|
5958
5963
|
const scope = options.scope ?? "memory";
|
|
5959
|
-
const
|
|
5964
|
+
const configOptions = { projectRoot: options.projectRoot, homeDir: options.homeDir };
|
|
5965
|
+
const apiKey = scope === "agent" ? getAgentLLMApiKey(configOptions) : getLLMApiKey(configOptions);
|
|
5960
5966
|
if (!apiKey) {
|
|
5961
5967
|
currentConfig = null;
|
|
5962
5968
|
return null;
|
|
5963
5969
|
}
|
|
5964
|
-
const provider2 = scope === "agent" ? getAgentLLMProvider() : getLLMProvider();
|
|
5970
|
+
const provider2 = scope === "agent" ? getAgentLLMProvider(configOptions) : getLLMProvider(configOptions);
|
|
5965
5971
|
const defaults2 = PROVIDER_DEFAULTS[provider2] ?? PROVIDER_DEFAULTS.openai;
|
|
5966
5972
|
currentConfig = {
|
|
5967
5973
|
provider: provider2,
|
|
5968
5974
|
apiKey,
|
|
5969
|
-
model: scope === "agent" ? getAgentLLMModel(defaults2.model) : getLLMModel(defaults2.model),
|
|
5970
|
-
baseUrl: scope === "agent" ? getAgentLLMBaseUrl(defaults2.baseUrl) : getLLMBaseUrl(defaults2.baseUrl)
|
|
5975
|
+
model: scope === "agent" ? getAgentLLMModel(defaults2.model, configOptions) : getLLMModel(defaults2.model, configOptions),
|
|
5976
|
+
baseUrl: scope === "agent" ? getAgentLLMBaseUrl(defaults2.baseUrl, configOptions) : getLLMBaseUrl(defaults2.baseUrl, configOptions)
|
|
5971
5977
|
};
|
|
5972
5978
|
return currentConfig;
|
|
5973
5979
|
}
|
|
@@ -65987,11 +65993,11 @@ var require_bignumber = __commonJS({
|
|
|
65987
65993
|
return n > 0 || n === i2 ? i2 : i2 - 1;
|
|
65988
65994
|
}
|
|
65989
65995
|
function coeffToString(a) {
|
|
65990
|
-
var s2,
|
|
65996
|
+
var s2, z628, i2 = 1, j = a.length, r2 = a[0] + "";
|
|
65991
65997
|
for (; i2 < j; ) {
|
|
65992
65998
|
s2 = a[i2++] + "";
|
|
65993
|
-
|
|
65994
|
-
for (;
|
|
65999
|
+
z628 = LOG_BASE - s2.length;
|
|
66000
|
+
for (; z628--; s2 = "0" + s2) ;
|
|
65995
66001
|
r2 += s2;
|
|
65996
66002
|
}
|
|
65997
66003
|
for (j = r2.length; r2.charCodeAt(--j) === 48; ) ;
|
|
@@ -66024,15 +66030,15 @@ var require_bignumber = __commonJS({
|
|
|
66024
66030
|
function toExponential(str2, e2) {
|
|
66025
66031
|
return (str2.length > 1 ? str2.charAt(0) + "." + str2.slice(1) : str2) + (e2 < 0 ? "e" : "e+") + e2;
|
|
66026
66032
|
}
|
|
66027
|
-
function toFixedPoint(str2, e2,
|
|
66033
|
+
function toFixedPoint(str2, e2, z628) {
|
|
66028
66034
|
var len, zs;
|
|
66029
66035
|
if (e2 < 0) {
|
|
66030
|
-
for (zs =
|
|
66036
|
+
for (zs = z628 + "."; ++e2; zs += z628) ;
|
|
66031
66037
|
str2 = zs + str2;
|
|
66032
66038
|
} else {
|
|
66033
66039
|
len = str2.length;
|
|
66034
66040
|
if (++e2 > len) {
|
|
66035
|
-
for (zs =
|
|
66041
|
+
for (zs = z628, e2 -= len; --e2; zs += z628) ;
|
|
66036
66042
|
str2 += zs;
|
|
66037
66043
|
} else if (e2 < len) {
|
|
66038
66044
|
str2 = str2.slice(0, e2) + "." + str2.slice(e2);
|
|
@@ -158111,6 +158117,51 @@ var init_request_context = __esm({
|
|
|
158111
158117
|
}
|
|
158112
158118
|
});
|
|
158113
158119
|
|
|
158120
|
+
// src/server/mcp-compat.ts
|
|
158121
|
+
import { RequestSchema } from "@modelcontextprotocol/sdk/types.js";
|
|
158122
|
+
import { z as z625 } from "zod/v4";
|
|
158123
|
+
function buildMcpDiscoverResult(server, serverInfo) {
|
|
158124
|
+
const getCapabilities = server.server.getCapabilities.bind(server.server);
|
|
158125
|
+
return {
|
|
158126
|
+
resultType: "complete",
|
|
158127
|
+
supportedVersions: [
|
|
158128
|
+
MCP_MODERN_PROTOCOL_VERSION,
|
|
158129
|
+
MCP_LEGACY_PROTOCOL_VERSION,
|
|
158130
|
+
MCP_OLDEST_LEGACY_PROTOCOL_VERSION
|
|
158131
|
+
],
|
|
158132
|
+
capabilities: getCapabilities(),
|
|
158133
|
+
_meta: {
|
|
158134
|
+
[MCP_SERVER_INFO_META_KEY]: { ...serverInfo }
|
|
158135
|
+
},
|
|
158136
|
+
// v1 has no response-cache negotiation. A zero private TTL is the
|
|
158137
|
+
// conservative result and prevents clients from inventing a shared cache.
|
|
158138
|
+
ttlMs: 0,
|
|
158139
|
+
cacheScope: "private"
|
|
158140
|
+
};
|
|
158141
|
+
}
|
|
158142
|
+
function registerMcpDiscovery(server, serverInfo) {
|
|
158143
|
+
if (registeredServers.has(server)) return;
|
|
158144
|
+
server.server.setRequestHandler(ServerDiscoverRequestSchema, async () => buildMcpDiscoverResult(server, serverInfo));
|
|
158145
|
+
registeredServers.add(server);
|
|
158146
|
+
}
|
|
158147
|
+
var MCP_MODERN_PROTOCOL_VERSION, MCP_LEGACY_PROTOCOL_VERSION, MCP_OLDEST_LEGACY_PROTOCOL_VERSION, MCP_SERVER_DISCOVER_METHOD, MCP_SERVER_INFO_META_KEY, ServerDiscoverRequestSchema, registeredServers;
|
|
158148
|
+
var init_mcp_compat = __esm({
|
|
158149
|
+
"src/server/mcp-compat.ts"() {
|
|
158150
|
+
"use strict";
|
|
158151
|
+
init_esm_shims();
|
|
158152
|
+
MCP_MODERN_PROTOCOL_VERSION = "2026-07-28";
|
|
158153
|
+
MCP_LEGACY_PROTOCOL_VERSION = "2025-11-25";
|
|
158154
|
+
MCP_OLDEST_LEGACY_PROTOCOL_VERSION = "2024-11-05";
|
|
158155
|
+
MCP_SERVER_DISCOVER_METHOD = "server/discover";
|
|
158156
|
+
MCP_SERVER_INFO_META_KEY = "io.modelcontextprotocol/serverInfo";
|
|
158157
|
+
ServerDiscoverRequestSchema = RequestSchema.extend({
|
|
158158
|
+
method: z625.literal(MCP_SERVER_DISCOVER_METHOD),
|
|
158159
|
+
params: z625.looseObject({}).optional()
|
|
158160
|
+
});
|
|
158161
|
+
registeredServers = /* @__PURE__ */ new WeakSet();
|
|
158162
|
+
}
|
|
158163
|
+
});
|
|
158164
|
+
|
|
158114
158165
|
// src/runtime/maintenance-targets.ts
|
|
158115
158166
|
var maintenance_targets_exports = {};
|
|
158116
158167
|
__export(maintenance_targets_exports, {
|
|
@@ -159841,6 +159892,27 @@ function unavailableHealth(result) {
|
|
|
159841
159892
|
if (result.outputLimited) return { state: "invalid", reason: "A local CodeGraph response exceeded the safety limit." };
|
|
159842
159893
|
return { state: "unavailable", reason: "A local CodeGraph command did not complete." };
|
|
159843
159894
|
}
|
|
159895
|
+
function notAttemptedDiagnostic(command) {
|
|
159896
|
+
return { command, attempted: false, outcome: "not-attempted" };
|
|
159897
|
+
}
|
|
159898
|
+
function commandDiagnostic(command, result, outcome, reason) {
|
|
159899
|
+
return {
|
|
159900
|
+
command,
|
|
159901
|
+
attempted: true,
|
|
159902
|
+
outcome,
|
|
159903
|
+
...typeof result.exitCode === "number" ? { exitCode: result.exitCode } : {},
|
|
159904
|
+
...reason ? { reason: sanitizeCredentials(reason).slice(0, 240) } : {}
|
|
159905
|
+
};
|
|
159906
|
+
}
|
|
159907
|
+
function failedCommandDiagnostic(command, result) {
|
|
159908
|
+
const outcome = result.timedOut ? "timed-out" : result.outputLimited ? "output-limited" : "failed";
|
|
159909
|
+
return commandDiagnostic(
|
|
159910
|
+
command,
|
|
159911
|
+
result,
|
|
159912
|
+
outcome,
|
|
159913
|
+
result.error || result.stderr || "CodeGraph command did not complete."
|
|
159914
|
+
);
|
|
159915
|
+
}
|
|
159844
159916
|
async function runSafely(runner, input) {
|
|
159845
159917
|
try {
|
|
159846
159918
|
return await runner.run(input);
|
|
@@ -159990,6 +160062,7 @@ function parseOutline(value, projectRoot, exclude) {
|
|
|
159990
160062
|
if (nodes.some((node) => !node)) return void 0;
|
|
159991
160063
|
const byId = /* @__PURE__ */ new Map();
|
|
159992
160064
|
for (const node of nodes) {
|
|
160065
|
+
if (byId.has(node.id)) return void 0;
|
|
159993
160066
|
byId.set(node.id, externalSymbol(node));
|
|
159994
160067
|
}
|
|
159995
160068
|
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);
|
|
@@ -160003,7 +160076,7 @@ function parseOutline(value, projectRoot, exclude) {
|
|
|
160003
160076
|
if (!source || !target || !kind || rawEdge.line !== void 0 && (!line || line < 1)) return void 0;
|
|
160004
160077
|
const from = byId.get(source);
|
|
160005
160078
|
const to = byId.get(target);
|
|
160006
|
-
if (!from || !to)
|
|
160079
|
+
if (!from || !to) return void 0;
|
|
160007
160080
|
relations.push({ from, to, kind, ...line ? { line } : {} });
|
|
160008
160081
|
}
|
|
160009
160082
|
const relatedFiles = value.relatedFiles.map((item) => safeRelativePath(projectRoot, item, exclude));
|
|
@@ -160021,45 +160094,234 @@ function parseOutline(value, projectRoot, exclude) {
|
|
|
160021
160094
|
stats: { nodes: nodeCount, edges: edgeCount, files: fileCount }
|
|
160022
160095
|
};
|
|
160023
160096
|
}
|
|
160097
|
+
function parseTextLocation(value) {
|
|
160098
|
+
const match2 = value.trim().match(/^(.*?)(?::([1-9]\d*))?$/);
|
|
160099
|
+
if (!match2?.[1]) return void 0;
|
|
160100
|
+
return {
|
|
160101
|
+
filePath: match2[1].trim(),
|
|
160102
|
+
...match2[2] ? { line: Number(match2[2]) } : {}
|
|
160103
|
+
};
|
|
160104
|
+
}
|
|
160105
|
+
function parseExploreText(value, projectRoot, exclude) {
|
|
160106
|
+
if (!value.trim() || Buffer.byteLength(value, "utf8") > MAX_EXTERNAL_CODEGRAPH_OUTPUT_BYTES) return void 0;
|
|
160107
|
+
const entryPoints = [];
|
|
160108
|
+
const nodes = [];
|
|
160109
|
+
const relatedFiles = /* @__PURE__ */ new Set();
|
|
160110
|
+
const byName = /* @__PURE__ */ new Map();
|
|
160111
|
+
let section = null;
|
|
160112
|
+
let relationKind = "references";
|
|
160113
|
+
const addNode = (node, entry) => {
|
|
160114
|
+
const key = `${node.filePath}\0${node.name}`;
|
|
160115
|
+
const existing = byName.get(key);
|
|
160116
|
+
if (existing) return;
|
|
160117
|
+
byName.set(key, node);
|
|
160118
|
+
relatedFiles.add(node.filePath);
|
|
160119
|
+
(entry ? entryPoints : nodes).push(node);
|
|
160120
|
+
};
|
|
160121
|
+
for (const rawLine of value.split(/\r?\n/)) {
|
|
160122
|
+
const line = rawLine.trim();
|
|
160123
|
+
const fileHeader = line.match(/^\*\*`([^`]+)`\*\*\s+(?:—|-)\s+(.+)$/);
|
|
160124
|
+
if (fileHeader) {
|
|
160125
|
+
const filePath = safeRelativePath(projectRoot, fileHeader[1], exclude);
|
|
160126
|
+
if (!filePath) return void 0;
|
|
160127
|
+
const symbolText = fileHeader[2].split(/\s+·\s+/, 1)[0] ?? "";
|
|
160128
|
+
const symbols = [...symbolText.matchAll(/([^,]+?)\(([^()]+)\)/g)];
|
|
160129
|
+
if (symbols.length === 0) return void 0;
|
|
160130
|
+
const isFirstFile = entryPoints.length === 0 && nodes.length === 0;
|
|
160131
|
+
for (const symbol of symbols.slice(0, MAX_EXTERNAL_NODE_COUNT)) {
|
|
160132
|
+
const name = symbol[1]?.trim();
|
|
160133
|
+
const kind = symbol[2]?.trim();
|
|
160134
|
+
if (!name || !kind) return void 0;
|
|
160135
|
+
addNode({
|
|
160136
|
+
id: `explore:${filePath}:${name}`,
|
|
160137
|
+
kind,
|
|
160138
|
+
name,
|
|
160139
|
+
filePath
|
|
160140
|
+
}, isFirstFile);
|
|
160141
|
+
}
|
|
160142
|
+
section = null;
|
|
160143
|
+
continue;
|
|
160144
|
+
}
|
|
160145
|
+
if (/^#{2,3}\s+Entry Points?\b/i.test(line)) {
|
|
160146
|
+
section = "entry";
|
|
160147
|
+
continue;
|
|
160148
|
+
}
|
|
160149
|
+
if (/^#{2,3}\s+Related Symbols?\b/i.test(line)) {
|
|
160150
|
+
section = "related";
|
|
160151
|
+
continue;
|
|
160152
|
+
}
|
|
160153
|
+
if (/^\*\*Relationships\*\*$/i.test(line)) {
|
|
160154
|
+
section = "relationships";
|
|
160155
|
+
continue;
|
|
160156
|
+
}
|
|
160157
|
+
if (/^\*\*(?:Source Code|Code)\*\*$/i.test(line) || /^#{2,3}\s+/i.test(line)) {
|
|
160158
|
+
section = null;
|
|
160159
|
+
continue;
|
|
160160
|
+
}
|
|
160161
|
+
if (section === "entry") {
|
|
160162
|
+
const match2 = line.match(/^-\s+\*\*(.+?)\*\*\s+\(([^)]+)\)\s+-\s+(.+)$/);
|
|
160163
|
+
if (!match2) continue;
|
|
160164
|
+
const location = parseTextLocation(match2[3]);
|
|
160165
|
+
if (!location) return void 0;
|
|
160166
|
+
const filePath = safeRelativePath(projectRoot, location.filePath, exclude);
|
|
160167
|
+
if (!filePath) return void 0;
|
|
160168
|
+
addNode({
|
|
160169
|
+
id: `explore:${filePath}:${match2[1]}`,
|
|
160170
|
+
kind: match2[2],
|
|
160171
|
+
name: match2[1],
|
|
160172
|
+
filePath,
|
|
160173
|
+
...location.line ? { startLine: location.line, endLine: location.line } : {}
|
|
160174
|
+
}, true);
|
|
160175
|
+
continue;
|
|
160176
|
+
}
|
|
160177
|
+
if (section === "related") {
|
|
160178
|
+
const match2 = line.match(/^-\s+([^:]+):\s+(.+)$/);
|
|
160179
|
+
if (!match2) continue;
|
|
160180
|
+
const filePath = safeRelativePath(projectRoot, match2[1], exclude);
|
|
160181
|
+
if (!filePath) return void 0;
|
|
160182
|
+
relatedFiles.add(filePath);
|
|
160183
|
+
for (const rawSymbol of match2[2].split(",")) {
|
|
160184
|
+
const symbol = rawSymbol.trim().match(/^(.+?)(?::([1-9]\d*))?$/);
|
|
160185
|
+
if (!symbol?.[1]) return void 0;
|
|
160186
|
+
addNode({
|
|
160187
|
+
id: `explore:${filePath}:${symbol[1].trim()}`,
|
|
160188
|
+
kind: "unknown",
|
|
160189
|
+
name: symbol[1].trim(),
|
|
160190
|
+
filePath,
|
|
160191
|
+
...symbol[2] ? { startLine: Number(symbol[2]), endLine: Number(symbol[2]) } : {}
|
|
160192
|
+
}, false);
|
|
160193
|
+
}
|
|
160194
|
+
continue;
|
|
160195
|
+
}
|
|
160196
|
+
if (section === "relationships") {
|
|
160197
|
+
const kind = line.match(/^\*\*([^*]+):\*\*$/);
|
|
160198
|
+
if (kind?.[1]) {
|
|
160199
|
+
relationKind = kind[1].trim();
|
|
160200
|
+
continue;
|
|
160201
|
+
}
|
|
160202
|
+
}
|
|
160203
|
+
}
|
|
160204
|
+
const bySymbolName = /* @__PURE__ */ new Map();
|
|
160205
|
+
for (const node of [...entryPoints, ...nodes]) {
|
|
160206
|
+
if (!bySymbolName.has(node.name)) bySymbolName.set(node.name, node);
|
|
160207
|
+
}
|
|
160208
|
+
const relations = [];
|
|
160209
|
+
if (section === "relationships") {
|
|
160210
|
+
for (const rawLine of value.split(/\r?\n/)) {
|
|
160211
|
+
const line = rawLine.trim();
|
|
160212
|
+
const match2 = line.match(/^-\s+(.+?)\s+(?:\u2192|->)\s+(.+)$/);
|
|
160213
|
+
if (!match2) continue;
|
|
160214
|
+
const from = bySymbolName.get(match2[1].trim());
|
|
160215
|
+
const to = bySymbolName.get(match2[2].trim());
|
|
160216
|
+
if (!from || !to) continue;
|
|
160217
|
+
relations.push({
|
|
160218
|
+
from: externalSymbol(from),
|
|
160219
|
+
to: externalSymbol(to),
|
|
160220
|
+
kind: relationKind
|
|
160221
|
+
});
|
|
160222
|
+
}
|
|
160223
|
+
} else {
|
|
160224
|
+
const relationshipStart = value.split(/\r?\n/).findIndex((line) => /^\s*\*\*Relationships\*\*\s*$/i.test(line));
|
|
160225
|
+
if (relationshipStart >= 0) {
|
|
160226
|
+
const relationshipLines = value.split(/\r?\n/).slice(relationshipStart + 1);
|
|
160227
|
+
for (const rawLine of relationshipLines) {
|
|
160228
|
+
const line = rawLine.trim();
|
|
160229
|
+
if (/^\*\*(?:Source Code|Code)\*\*$/i.test(line) || /^#{2,3}\s+/i.test(line)) break;
|
|
160230
|
+
const kind = line.match(/^\*\*([^*]+):\*\*$/);
|
|
160231
|
+
if (kind?.[1]) {
|
|
160232
|
+
relationKind = kind[1].trim();
|
|
160233
|
+
continue;
|
|
160234
|
+
}
|
|
160235
|
+
const match2 = line.match(/^-\s+(.+?)\s+(?:\u2192|->)\s+(.+)$/);
|
|
160236
|
+
if (!match2) continue;
|
|
160237
|
+
const from = bySymbolName.get(match2[1].trim());
|
|
160238
|
+
const to = bySymbolName.get(match2[2].trim());
|
|
160239
|
+
if (from && to) relations.push({ from: externalSymbol(from), to: externalSymbol(to), kind: relationKind });
|
|
160240
|
+
}
|
|
160241
|
+
}
|
|
160242
|
+
}
|
|
160243
|
+
const allNodes = [...entryPoints, ...nodes];
|
|
160244
|
+
if (allNodes.length === 0) return void 0;
|
|
160245
|
+
return {
|
|
160246
|
+
provider: "external",
|
|
160247
|
+
entryPoints: entryPoints.map(externalSymbol).slice(0, 5),
|
|
160248
|
+
relations: relations.slice(0, 6),
|
|
160249
|
+
relatedFiles: [...relatedFiles].slice(0, 5),
|
|
160250
|
+
stats: {
|
|
160251
|
+
nodes: allNodes.length,
|
|
160252
|
+
edges: relations.length,
|
|
160253
|
+
files: relatedFiles.size
|
|
160254
|
+
}
|
|
160255
|
+
};
|
|
160256
|
+
}
|
|
160257
|
+
function parseExplorePayload(value, projectRoot, exclude) {
|
|
160258
|
+
if (typeof value === "string") return parseExploreText(value, projectRoot, exclude);
|
|
160259
|
+
if (isRecord3(value) && isRecord3(value.result)) value = value.result;
|
|
160260
|
+
if (isRecord3(value) && Array.isArray(value.content)) {
|
|
160261
|
+
const text2 = value.content.filter((item) => isRecord3(item) && item.type === "text" && typeof item.text === "string").map((item) => item.text).join("\n");
|
|
160262
|
+
return parseExploreText(text2, projectRoot, exclude);
|
|
160263
|
+
}
|
|
160264
|
+
return parseOutline(value, projectRoot, exclude);
|
|
160265
|
+
}
|
|
160024
160266
|
function fallbackCaution(health) {
|
|
160025
160267
|
if (health.state === "disabled" || health.state === "not-detected" || health.state === "not-initialized" || health.state === "ready") return void 0;
|
|
160026
160268
|
return "External semantic CodeGraph is " + health.state + "; using Lite structural evidence for this brief.";
|
|
160027
160269
|
}
|
|
160270
|
+
function queryFallbackCaution(diagnostics) {
|
|
160271
|
+
return `External semantic CodeGraph context was unavailable (context: ${diagnostics.context.outcome}; explore: ${diagnostics.explore.outcome}); using Lite structural evidence.`;
|
|
160272
|
+
}
|
|
160028
160273
|
async function getExternalCodeGraphContext(input) {
|
|
160029
160274
|
const inspected = await inspectExternalCodeGraph(input);
|
|
160030
160275
|
if (inspected.health.state !== "ready") {
|
|
160031
160276
|
return { ...inspected, caution: fallbackCaution(inspected.health) };
|
|
160032
160277
|
}
|
|
160033
160278
|
const mode = input.mode ?? "auto";
|
|
160034
|
-
const
|
|
160279
|
+
const runner = input.runner ?? defaultRunner;
|
|
160280
|
+
const contextResult = await runSafely(runner, {
|
|
160035
160281
|
command: input.command,
|
|
160036
160282
|
args: ["context", "--path", input.projectRoot, "--format", "json", "--max-nodes", "8", "--no-code", input.task],
|
|
160037
160283
|
cwd: input.projectRoot,
|
|
160038
160284
|
timeoutMs: boundedTimeout(input.timeoutMs),
|
|
160039
160285
|
maxOutputBytes: MAX_EXTERNAL_CODEGRAPH_OUTPUT_BYTES
|
|
160040
160286
|
});
|
|
160041
|
-
|
|
160042
|
-
|
|
160287
|
+
const diagnostics = {
|
|
160288
|
+
context: contextResult.ok ? commandDiagnostic("context", contextResult, "success") : failedCommandDiagnostic("context", contextResult),
|
|
160289
|
+
explore: notAttemptedDiagnostic("explore")
|
|
160290
|
+
};
|
|
160291
|
+
const contextOutline = contextResult.ok ? parseOutline(parseJson2(contextResult.stdout), input.projectRoot, input.exclude) : void 0;
|
|
160292
|
+
if (contextOutline && (contextOutline.entryPoints.length > 0 || contextOutline.relations.length > 0 || contextOutline.relatedFiles.length > 0)) {
|
|
160043
160293
|
return {
|
|
160044
|
-
|
|
160045
|
-
|
|
160046
|
-
|
|
160294
|
+
...inspected,
|
|
160295
|
+
outline: contextOutline,
|
|
160296
|
+
diagnostics,
|
|
160297
|
+
quality: providerQuality({ mode, health: inspected.health, selected: "external" })
|
|
160047
160298
|
};
|
|
160048
160299
|
}
|
|
160049
|
-
|
|
160050
|
-
|
|
160051
|
-
|
|
160300
|
+
if (contextResult.ok) diagnostics.context = commandDiagnostic("context", contextResult, "invalid-output", "The context payload failed validation or contained no safe outline.");
|
|
160301
|
+
const exploreResult = await runSafely(runner, {
|
|
160302
|
+
command: input.command,
|
|
160303
|
+
args: ["explore", "--path", input.projectRoot, "--max-files", "4", input.task],
|
|
160304
|
+
cwd: input.projectRoot,
|
|
160305
|
+
timeoutMs: boundedTimeout(input.timeoutMs),
|
|
160306
|
+
maxOutputBytes: MAX_EXTERNAL_CODEGRAPH_OUTPUT_BYTES
|
|
160307
|
+
});
|
|
160308
|
+
diagnostics.explore = exploreResult.ok ? commandDiagnostic("explore", exploreResult, "success") : failedCommandDiagnostic("explore", exploreResult);
|
|
160309
|
+
const exploreOutline = exploreResult.ok ? parseExplorePayload(parseJson2(exploreResult.stdout) ?? exploreResult.stdout, input.projectRoot, input.exclude) : void 0;
|
|
160310
|
+
if (exploreOutline && (exploreOutline.entryPoints.length > 0 || exploreOutline.relations.length > 0 || exploreOutline.relatedFiles.length > 0)) {
|
|
160052
160311
|
return {
|
|
160053
|
-
|
|
160054
|
-
|
|
160055
|
-
|
|
160312
|
+
...inspected,
|
|
160313
|
+
outline: exploreOutline,
|
|
160314
|
+
diagnostics,
|
|
160315
|
+
quality: providerQuality({ mode, health: inspected.health, selected: "external" })
|
|
160056
160316
|
};
|
|
160057
160317
|
}
|
|
160058
|
-
|
|
160318
|
+
if (exploreResult.ok) diagnostics.explore = commandDiagnostic("explore", exploreResult, "invalid-output", "The explore payload failed validation or contained no safe outline.");
|
|
160319
|
+
const health = exploreResult.ok ? { state: "invalid", reason: "The local CodeGraph context and explore payloads failed validation." } : unavailableHealth(exploreResult);
|
|
160059
160320
|
return {
|
|
160060
|
-
|
|
160061
|
-
|
|
160062
|
-
|
|
160321
|
+
health,
|
|
160322
|
+
quality: providerQuality({ mode, health }),
|
|
160323
|
+
diagnostics,
|
|
160324
|
+
caution: queryFallbackCaution(diagnostics)
|
|
160063
160325
|
};
|
|
160064
160326
|
}
|
|
160065
160327
|
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;
|
|
@@ -160070,7 +160332,7 @@ var init_external_provider = __esm({
|
|
|
160070
160332
|
init_secret_filter();
|
|
160071
160333
|
init_exclude3();
|
|
160072
160334
|
init_ids();
|
|
160073
|
-
DEFAULT_EXTERNAL_CODEGRAPH_TIMEOUT_MS =
|
|
160335
|
+
DEFAULT_EXTERNAL_CODEGRAPH_TIMEOUT_MS = 3e3;
|
|
160074
160336
|
MAX_EXTERNAL_CODEGRAPH_TIMEOUT_MS = 5e3;
|
|
160075
160337
|
EXTERNAL_CODEGRAPH_LIFECYCLE_TIMEOUT_MS = 3e4;
|
|
160076
160338
|
MAX_EXTERNAL_CODEGRAPH_OUTPUT_BYTES = 256 * 1024;
|
|
@@ -163353,6 +163615,7 @@ async function executeCleanup(context, payload, token) {
|
|
|
163353
163615
|
return { action: "cleanup", projectId: context.projectId, ...result };
|
|
163354
163616
|
}
|
|
163355
163617
|
async function previewDeduplicate(context) {
|
|
163618
|
+
initLLM({ scope: "memory", projectRoot: context.projectRoot });
|
|
163356
163619
|
if (!isLLMEnabled()) {
|
|
163357
163620
|
return {
|
|
163358
163621
|
action: "deduplicate",
|
|
@@ -164845,6 +165108,37 @@ function normalizeDashboardTask(task) {
|
|
|
164845
165108
|
preferredRole: task.preferred_role ?? task.preferredRole ?? null
|
|
164846
165109
|
};
|
|
164847
165110
|
}
|
|
165111
|
+
function emptyTeamSnapshot(mode, scope, status) {
|
|
165112
|
+
return {
|
|
165113
|
+
status,
|
|
165114
|
+
mode,
|
|
165115
|
+
readOnly: true,
|
|
165116
|
+
scope,
|
|
165117
|
+
agents: [],
|
|
165118
|
+
activeCount: 0,
|
|
165119
|
+
recentCount: 0,
|
|
165120
|
+
historicalCount: 0,
|
|
165121
|
+
totalAgents: 0,
|
|
165122
|
+
recentWindowDays: 7,
|
|
165123
|
+
locks: [],
|
|
165124
|
+
tasks: [],
|
|
165125
|
+
availableTasks: 0,
|
|
165126
|
+
sessions: 0,
|
|
165127
|
+
roles: [],
|
|
165128
|
+
roleOccupancy: [],
|
|
165129
|
+
handoffs: [],
|
|
165130
|
+
openTasks: 0,
|
|
165131
|
+
openHandoffs: 0,
|
|
165132
|
+
totalUnread: 0,
|
|
165133
|
+
activeSessions: 0,
|
|
165134
|
+
error: status === "error" ? "Coordination state unavailable" : "Coordination state is incomplete",
|
|
165135
|
+
errorCode: status === "error" ? "COORDINATION_STATE_UNAVAILABLE" : "COORDINATION_STATE_DEGRADED"
|
|
165136
|
+
};
|
|
165137
|
+
}
|
|
165138
|
+
function logTeamSnapshotFailure(scope, status) {
|
|
165139
|
+
const safeScope = scope === "global" ? "global" : "project";
|
|
165140
|
+
console.error("[dashboard] coordination snapshot unavailable", { status, scope: safeScope });
|
|
165141
|
+
}
|
|
164848
165142
|
async function buildTeamSnapshot(dataDir, projectId, scope, mode) {
|
|
164849
165143
|
try {
|
|
164850
165144
|
const { initTeamStore: initTeamStore2 } = await Promise.resolve().then(() => (init_team_store(), team_store_exports));
|
|
@@ -164871,8 +165165,9 @@ async function buildTeamSnapshot(dataDir, projectId, scope, mode) {
|
|
|
164871
165165
|
const roleOccupancy = effectiveProjectId ? teamStore.getRoleOccupancy(effectiveProjectId) : [];
|
|
164872
165166
|
const handoffs = effectiveProjectId ? teamStore.listHandoffs(effectiveProjectId) : [];
|
|
164873
165167
|
return {
|
|
165168
|
+
status: "ok",
|
|
164874
165169
|
mode,
|
|
164875
|
-
readOnly:
|
|
165170
|
+
readOnly: true,
|
|
164876
165171
|
scope,
|
|
164877
165172
|
agents: withTier,
|
|
164878
165173
|
activeCount,
|
|
@@ -164893,28 +165188,8 @@ async function buildTeamSnapshot(dataDir, projectId, scope, mode) {
|
|
|
164893
165188
|
activeSessions: activeCount
|
|
164894
165189
|
};
|
|
164895
165190
|
} catch {
|
|
164896
|
-
|
|
164897
|
-
|
|
164898
|
-
readOnly: mode === "standalone",
|
|
164899
|
-
scope,
|
|
164900
|
-
agents: [],
|
|
164901
|
-
activeCount: 0,
|
|
164902
|
-
recentCount: 0,
|
|
164903
|
-
historicalCount: 0,
|
|
164904
|
-
totalAgents: 0,
|
|
164905
|
-
recentWindowDays: 7,
|
|
164906
|
-
locks: [],
|
|
164907
|
-
tasks: [],
|
|
164908
|
-
availableTasks: 0,
|
|
164909
|
-
sessions: 0,
|
|
164910
|
-
roles: [],
|
|
164911
|
-
roleOccupancy: [],
|
|
164912
|
-
handoffs: [],
|
|
164913
|
-
openTasks: 0,
|
|
164914
|
-
openHandoffs: 0,
|
|
164915
|
-
totalUnread: 0,
|
|
164916
|
-
activeSessions: 0
|
|
164917
|
-
};
|
|
165191
|
+
logTeamSnapshotFailure(scope, "error");
|
|
165192
|
+
return emptyTeamSnapshot(mode, scope, "error");
|
|
164918
165193
|
}
|
|
164919
165194
|
}
|
|
164920
165195
|
function readBody(req) {
|
|
@@ -164933,13 +165208,12 @@ function readBody(req) {
|
|
|
164933
165208
|
req.on("error", reject);
|
|
164934
165209
|
});
|
|
164935
165210
|
}
|
|
164936
|
-
async function startDashboard(dataDir, port, staticDir, projectId, projectName, autoOpen = true,
|
|
165211
|
+
async function startDashboard(dataDir, port, staticDir, projectId, projectName, autoOpen = true, projectRoot = null, projectResolved = true) {
|
|
164937
165212
|
await initObservationStore(dataDir);
|
|
164938
165213
|
await initSessionStore(dataDir);
|
|
164939
165214
|
const resolvedStaticDir = staticDir;
|
|
164940
165215
|
const baseDir = getBaseDataDir();
|
|
164941
|
-
const
|
|
164942
|
-
const state = { projectId, projectName, dataDir, projectRoot, projectResolved, mode: isControlPlane ? "control-plane" : "standalone", port };
|
|
165216
|
+
const state = { projectId, projectName, dataDir, projectRoot, projectResolved, mode: "standalone", port };
|
|
164943
165217
|
const server = createServer(async (req, res) => {
|
|
164944
165218
|
const url = req.url || "/";
|
|
164945
165219
|
if (url.startsWith("/api/set-current-project") && req.method === "POST") {
|
|
@@ -164961,54 +165235,20 @@ async function startDashboard(dataDir, port, staticDir, projectId, projectName,
|
|
|
164961
165235
|
}
|
|
164962
165236
|
return;
|
|
164963
165237
|
}
|
|
164964
|
-
|
|
164965
|
-
|
|
164966
|
-
|
|
164967
|
-
const scope = parsedUrl.searchParams.get("scope") || "project";
|
|
164968
|
-
sendJson(res, await buildTeamSnapshot(state.dataDir, state.projectId, scope, state.mode));
|
|
164969
|
-
return;
|
|
164970
|
-
}
|
|
164971
|
-
try {
|
|
164972
|
-
teamInstances.fileLocks.cleanExpired();
|
|
164973
|
-
const agents = teamInstances.registry.listAgents();
|
|
164974
|
-
const locks = teamInstances.fileLocks.listLocks();
|
|
164975
|
-
const tasks = teamInstances.taskManager.list();
|
|
164976
|
-
const available = teamInstances.taskManager.getAvailable();
|
|
164977
|
-
let roles = [];
|
|
164978
|
-
let roleOccupancy = [];
|
|
164979
|
-
let handoffs = [];
|
|
164980
|
-
try {
|
|
164981
|
-
const { getTeamStore: getTeamStore2, isTeamStoreInitialized: isTeamStoreInitialized2 } = await Promise.resolve().then(() => (init_team_store(), team_store_exports));
|
|
164982
|
-
if (isTeamStoreInitialized2()) {
|
|
164983
|
-
const teamStore = getTeamStore2();
|
|
164984
|
-
const projectId2 = state.projectId;
|
|
164985
|
-
roles = teamStore.listRoles(projectId2);
|
|
164986
|
-
roleOccupancy = teamStore.getRoleOccupancy(projectId2);
|
|
164987
|
-
handoffs = teamStore.listHandoffs(projectId2);
|
|
164988
|
-
}
|
|
164989
|
-
} catch {
|
|
164990
|
-
}
|
|
165238
|
+
const parsedUrl = new URL(url, `http://127.0.0.1:${port}`);
|
|
165239
|
+
if (parsedUrl.pathname === "/api/team") {
|
|
165240
|
+
if (req.method !== "GET") {
|
|
164991
165241
|
sendJson(res, {
|
|
164992
|
-
|
|
164993
|
-
|
|
164994
|
-
|
|
164995
|
-
|
|
164996
|
-
|
|
164997
|
-
|
|
164998
|
-
tasks,
|
|
164999
|
-
availableTasks: available.length,
|
|
165000
|
-
roles,
|
|
165001
|
-
roleOccupancy,
|
|
165002
|
-
handoffs,
|
|
165003
|
-
// Resume data for "Continue this project" area
|
|
165004
|
-
openTasks: tasks.filter((t2) => t2.status === "pending" || t2.status === "in_progress").length,
|
|
165005
|
-
openHandoffs: handoffs.filter((h2) => h2.handoff_status === "open" || h2.handoffStatus === "open").length,
|
|
165006
|
-
totalUnread: agents.reduce((sum, a) => sum + teamInstances.messageBus.getUnreadCount(a.id), 0),
|
|
165007
|
-
activeSessions: agents.filter((a) => a.status === "active").length
|
|
165008
|
-
});
|
|
165009
|
-
} catch {
|
|
165010
|
-
sendJson(res, { agents: [], activeCount: 0, locks: [], tasks: [], availableTasks: 0, roles: [], roleOccupancy: [], handoffs: [] });
|
|
165242
|
+
status: "error",
|
|
165243
|
+
readOnly: true,
|
|
165244
|
+
error: "Coordination status is read-only",
|
|
165245
|
+
errorCode: "COORDINATION_STATUS_READ_ONLY"
|
|
165246
|
+
}, 405);
|
|
165247
|
+
return;
|
|
165011
165248
|
}
|
|
165249
|
+
const scope = parsedUrl.searchParams.get("scope") || "project";
|
|
165250
|
+
const snapshot = await buildTeamSnapshot(state.dataDir, state.projectId, scope, state.mode);
|
|
165251
|
+
sendJson(res, snapshot, snapshot.status === "error" ? 503 : 200);
|
|
165012
165252
|
return;
|
|
165013
165253
|
}
|
|
165014
165254
|
if (url.startsWith("/api/")) {
|
|
@@ -165029,13 +165269,12 @@ async function startDashboard(dataDir, port, staticDir, projectId, projectName,
|
|
|
165029
165269
|
server.listen(port, "127.0.0.1", () => {
|
|
165030
165270
|
const url = `http://127.0.0.1:${port}`;
|
|
165031
165271
|
const resolvedLabel = projectResolved ? "resolved" : "unresolved";
|
|
165032
|
-
const modeLabel =
|
|
165272
|
+
const modeLabel = "Standalone";
|
|
165033
165273
|
console.error(` Memorix Dashboard [${modeLabel}]`);
|
|
165034
165274
|
console.error(` \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500`);
|
|
165035
165275
|
console.error(` Mode: ${modeLabel}`);
|
|
165036
165276
|
console.error(` Project: ${projectName} (${projectId}) [${resolvedLabel}]`);
|
|
165037
165277
|
console.error(` Local: ${url}`);
|
|
165038
|
-
if (isControlPlane) console.error(` MCP: ${url}/mcp`);
|
|
165039
165278
|
console.error(` Data dir: ${dataDir}`);
|
|
165040
165279
|
console.error(`
|
|
165041
165280
|
Press Ctrl+C to stop
|
|
@@ -165133,7 +165372,7 @@ var init_event_bus = __esm({
|
|
|
165133
165372
|
});
|
|
165134
165373
|
|
|
165135
165374
|
// src/orchestrate/task-graph.ts
|
|
165136
|
-
import { z as
|
|
165375
|
+
import { z as z626 } from "zod";
|
|
165137
165376
|
function parseTaskGraph(raw) {
|
|
165138
165377
|
const json2 = extractJson(raw);
|
|
165139
165378
|
if (!json2) {
|
|
@@ -165325,25 +165564,25 @@ var init_task_graph = __esm({
|
|
|
165325
165564
|
"src/orchestrate/task-graph.ts"() {
|
|
165326
165565
|
"use strict";
|
|
165327
165566
|
init_esm_shims();
|
|
165328
|
-
TaskNodeSchema =
|
|
165329
|
-
tempId:
|
|
165330
|
-
role:
|
|
165331
|
-
description:
|
|
165332
|
-
deps:
|
|
165333
|
-
files:
|
|
165567
|
+
TaskNodeSchema = z626.object({
|
|
165568
|
+
tempId: z626.string().min(1).describe('Temporary ID like "t1", "t2"'),
|
|
165569
|
+
role: z626.enum(["pm", "engineer", "qa", "reviewer"]),
|
|
165570
|
+
description: z626.string().min(30).describe("Self-contained task description with all context"),
|
|
165571
|
+
deps: z626.array(z626.string()).describe("tempIds of prerequisite tasks"),
|
|
165572
|
+
files: z626.array(z626.string()).optional().describe("Files this task will create or modify"),
|
|
165334
165573
|
/** Phase 7: Natural-language acceptance criteria (Goal-First Testing) */
|
|
165335
|
-
goals:
|
|
165574
|
+
goals: z626.array(z626.string()).optional().describe("Acceptance criteria for task verification")
|
|
165336
165575
|
});
|
|
165337
|
-
TaskGraphSchema =
|
|
165338
|
-
summary:
|
|
165339
|
-
tasks:
|
|
165576
|
+
TaskGraphSchema = z626.object({
|
|
165577
|
+
summary: z626.string().min(10).describe("One-paragraph plan summary"),
|
|
165578
|
+
tasks: z626.array(TaskNodeSchema).min(2).max(30)
|
|
165340
165579
|
}).superRefine((data, ctx) => {
|
|
165341
165580
|
const ids = new Set(data.tasks.map((t2) => t2.tempId));
|
|
165342
165581
|
for (const task of data.tasks) {
|
|
165343
165582
|
for (const dep of task.deps) {
|
|
165344
165583
|
if (!ids.has(dep)) {
|
|
165345
165584
|
ctx.addIssue({
|
|
165346
|
-
code:
|
|
165585
|
+
code: z626.ZodIssueCode.custom,
|
|
165347
165586
|
message: `Task "${task.tempId}" references unknown dependency "${dep}"`,
|
|
165348
165587
|
path: ["tasks"]
|
|
165349
165588
|
});
|
|
@@ -165351,7 +165590,7 @@ var init_task_graph = __esm({
|
|
|
165351
165590
|
}
|
|
165352
165591
|
if (task.deps.includes(task.tempId)) {
|
|
165353
165592
|
ctx.addIssue({
|
|
165354
|
-
code:
|
|
165593
|
+
code: z626.ZodIssueCode.custom,
|
|
165355
165594
|
message: `Task "${task.tempId}" depends on itself`,
|
|
165356
165595
|
path: ["tasks"]
|
|
165357
165596
|
});
|
|
@@ -165359,21 +165598,21 @@ var init_task_graph = __esm({
|
|
|
165359
165598
|
}
|
|
165360
165599
|
if (data.tasks.length > 0 && data.tasks[data.tasks.length - 1].role !== "reviewer") {
|
|
165361
165600
|
ctx.addIssue({
|
|
165362
|
-
code:
|
|
165601
|
+
code: z626.ZodIssueCode.custom,
|
|
165363
165602
|
message: 'Last task must have role "reviewer"',
|
|
165364
165603
|
path: ["tasks"]
|
|
165365
165604
|
});
|
|
165366
165605
|
}
|
|
165367
165606
|
if (hasCycle(data.tasks)) {
|
|
165368
165607
|
ctx.addIssue({
|
|
165369
|
-
code:
|
|
165608
|
+
code: z626.ZodIssueCode.custom,
|
|
165370
165609
|
message: "Task graph contains a cycle",
|
|
165371
165610
|
path: ["tasks"]
|
|
165372
165611
|
});
|
|
165373
165612
|
}
|
|
165374
165613
|
if (ids.size !== data.tasks.length) {
|
|
165375
165614
|
ctx.addIssue({
|
|
165376
|
-
code:
|
|
165615
|
+
code: z626.ZodIssueCode.custom,
|
|
165377
165616
|
message: "Duplicate tempId values detected",
|
|
165378
165617
|
path: ["tasks"]
|
|
165379
165618
|
});
|
|
@@ -167836,7 +168075,7 @@ __export(server_exports2, {
|
|
|
167836
168075
|
});
|
|
167837
168076
|
import { createHash as createHash16 } from "crypto";
|
|
167838
168077
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
167839
|
-
import { z as
|
|
168078
|
+
import { z as z627 } from "zod";
|
|
167840
168079
|
function formatFormationStageDurations(stageDurationsMs) {
|
|
167841
168080
|
const orderedStages = ["extract", "resolve", "evaluate"];
|
|
167842
168081
|
const parts = orderedStages.filter((stage) => stageDurationsMs[stage] !== void 0).map((stage) => `${stage}=${stageDurationsMs[stage]}ms`);
|
|
@@ -168208,10 +168447,12 @@ The path should point to a directory containing a .git folder.`
|
|
|
168208
168447
|
isError: true
|
|
168209
168448
|
};
|
|
168210
168449
|
};
|
|
168211
|
-
const
|
|
168450
|
+
const serverInfo = {
|
|
168212
168451
|
name: "memorix",
|
|
168213
|
-
version: true ? "1.8.
|
|
168214
|
-
}
|
|
168452
|
+
version: true ? "1.8.2" : "1.0.1"
|
|
168453
|
+
};
|
|
168454
|
+
const server = existingServer ?? new McpServer(serverInfo);
|
|
168455
|
+
registerMcpDiscovery(server, serverInfo);
|
|
168215
168456
|
const originalRegisterTool = server.registerTool.bind(server);
|
|
168216
168457
|
server.registerTool = ((name, ...args) => {
|
|
168217
168458
|
if (!isToolInProfile(name, toolProfile)) {
|
|
@@ -168294,42 +168535,42 @@ The path should point to a directory containing a .git folder.`
|
|
|
168294
168535
|
title: "Store Memory",
|
|
168295
168536
|
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.",
|
|
168296
168537
|
inputSchema: {
|
|
168297
|
-
entityName:
|
|
168298
|
-
type:
|
|
168299
|
-
title:
|
|
168300
|
-
narrative:
|
|
168301
|
-
facts:
|
|
168302
|
-
filesModified:
|
|
168303
|
-
concepts:
|
|
168304
|
-
topicKey:
|
|
168538
|
+
entityName: z627.string().describe('The entity this observation belongs to (e.g., "auth-module", "port-config")'),
|
|
168539
|
+
type: z627.enum(OBSERVATION_TYPES).describe("Observation type for classification"),
|
|
168540
|
+
title: z627.string().describe("Short descriptive title (~5-10 words)"),
|
|
168541
|
+
narrative: z627.string().describe("Full description of the observation"),
|
|
168542
|
+
facts: z627.array(z627.string()).optional().describe('Structured facts (e.g., "Default timeout: 60s")'),
|
|
168543
|
+
filesModified: z627.array(z627.string()).optional().describe("Files involved"),
|
|
168544
|
+
concepts: z627.array(z627.string()).optional().describe("Related concepts/keywords"),
|
|
168545
|
+
topicKey: z627.string().optional().describe(
|
|
168305
168546
|
'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.'
|
|
168306
168547
|
),
|
|
168307
|
-
progress:
|
|
168308
|
-
feature:
|
|
168309
|
-
status:
|
|
168310
|
-
completion:
|
|
168548
|
+
progress: z627.object({
|
|
168549
|
+
feature: z627.string().describe("Feature or task name"),
|
|
168550
|
+
status: z627.enum(["in-progress", "completed", "blocked"]).describe("Current status"),
|
|
168551
|
+
completion: z627.number().optional().describe("Completion percentage 0-100")
|
|
168311
168552
|
}).optional().describe("Progress tracking for task/feature observations"),
|
|
168312
|
-
relatedCommits:
|
|
168313
|
-
relatedEntities:
|
|
168314
|
-
visibility:
|
|
168553
|
+
relatedCommits: z627.array(z627.string()).optional().describe("Git commit hashes this memory relates to (links ground truth \u2194 reasoning)"),
|
|
168554
|
+
relatedEntities: z627.array(z627.string()).optional().describe("Other entity names this memory cross-references"),
|
|
168555
|
+
visibility: z627.enum(["personal", "project", "team"]).optional().describe(
|
|
168315
168556
|
"Retrieval scope. Project is the normal shared default; personal/team require memorix_session_start with joinTeam=true."
|
|
168316
168557
|
),
|
|
168317
|
-
longTerm:
|
|
168318
|
-
kind:
|
|
168319
|
-
scope:
|
|
168320
|
-
tags:
|
|
168321
|
-
applicability:
|
|
168558
|
+
longTerm: z627.object({
|
|
168559
|
+
kind: z627.enum(["episodic", "semantic", "procedural"]).describe("Cognitive kind for an additional long-term candidate."),
|
|
168560
|
+
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."),
|
|
168561
|
+
tags: z627.array(z627.string()).optional().describe("Small set of retrieval tags for the candidate."),
|
|
168562
|
+
applicability: z627.string().optional().describe("When this durable fact or procedure applies.")
|
|
168322
168563
|
}).optional().describe("Optional explicit request to create a source-backed long-term candidate alongside this observation. Candidates are not automatically injected."),
|
|
168323
|
-
overrideReadOnly:
|
|
168564
|
+
overrideReadOnly: z627.boolean().optional().describe(
|
|
168324
168565
|
"Use only when the user explicitly asks to save memory during a read-only or no-modification task."
|
|
168325
168566
|
),
|
|
168326
|
-
attachments:
|
|
168327
|
-
modality:
|
|
168328
|
-
url:
|
|
168567
|
+
attachments: z627.array(z627.object({
|
|
168568
|
+
modality: z627.enum(["image", "audio", "video", "document"]),
|
|
168569
|
+
url: z627.string().describe(
|
|
168329
168570
|
"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."
|
|
168330
168571
|
),
|
|
168331
|
-
mimeType:
|
|
168332
|
-
name:
|
|
168572
|
+
mimeType: z627.string().optional(),
|
|
168573
|
+
name: z627.string().optional()
|
|
168333
168574
|
})).optional().describe("Safe public provenance references. They are stored as metadata for lexical retrieval; raw inline media is never stored.")
|
|
168334
168575
|
}
|
|
168335
168576
|
},
|
|
@@ -168867,8 +169108,8 @@ Entity: ${entityName} | Type: ${type} | Project: ${project.id}${obs.topicKey ? `
|
|
|
168867
169108
|
title: "Suggest Topic Key",
|
|
168868
169109
|
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".',
|
|
168869
169110
|
inputSchema: {
|
|
168870
|
-
type:
|
|
168871
|
-
title:
|
|
169111
|
+
type: z627.string().describe("Observation type (e.g., decision, architecture, bugfix, discovery)"),
|
|
169112
|
+
title: z627.string().describe("Observation title \u2014 used to generate the stable key")
|
|
168872
169113
|
}
|
|
168873
169114
|
},
|
|
168874
169115
|
async ({ type: obsType, title }) => {
|
|
@@ -168893,28 +169134,28 @@ Use this as the \`topicKey\` parameter in \`memorix_store\` to enable upsert beh
|
|
|
168893
169134
|
title: "Search Memory",
|
|
168894
169135
|
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.",
|
|
168895
169136
|
inputSchema: {
|
|
168896
|
-
query:
|
|
168897
|
-
limit:
|
|
168898
|
-
type:
|
|
168899
|
-
maxTokens:
|
|
168900
|
-
scope:
|
|
169137
|
+
query: z627.string().describe("Search query (natural language or keywords)"),
|
|
169138
|
+
limit: z627.number().optional().describe("Max results (default: 20)"),
|
|
169139
|
+
type: z627.enum(OBSERVATION_TYPES).optional().describe("Filter by observation type"),
|
|
169140
|
+
maxTokens: z627.number().optional().describe("Token budget \u2014 trim results to fit (0 = unlimited)"),
|
|
169141
|
+
scope: z627.enum(["project", "global"]).optional().default("project").describe(
|
|
168901
169142
|
'Search scope: "project" (default) only searches current project, "global" searches all projects'
|
|
168902
169143
|
),
|
|
168903
|
-
since:
|
|
168904
|
-
until:
|
|
168905
|
-
status:
|
|
169144
|
+
since: z627.string().optional().describe('Only return observations created after this date (ISO 8601 or natural like "2025-01-15")'),
|
|
169145
|
+
until: z627.string().optional().describe('Only return observations created before this date (ISO 8601 or natural like "2025-02-01")'),
|
|
169146
|
+
status: z627.enum(["active", "resolved", "archived", "all"]).optional().default("active").describe(
|
|
168906
169147
|
'Filter by memory status. "active" (default) shows current memories, "all" includes resolved/archived.'
|
|
168907
169148
|
),
|
|
168908
|
-
source:
|
|
169149
|
+
source: z627.enum(["agent", "git", "manual"]).optional().describe(
|
|
168909
169150
|
'Filter by memory source. "git" returns only commit-derived ground truth memories. Omit for all sources.'
|
|
168910
169151
|
),
|
|
168911
|
-
quality:
|
|
169152
|
+
quality: z627.enum(["fast", "balanced", "thorough"]).optional().default("balanced").describe(
|
|
168912
169153
|
"Retrieval profile: fast stays local, balanced uses configured embeddings, thorough explicitly permits optional LLM refinement."
|
|
168913
169154
|
),
|
|
168914
|
-
purpose:
|
|
169155
|
+
purpose: z627.string().optional().describe(
|
|
168915
169156
|
"Why this must expand beyond the latest Autopilot brief. Name the missing fact or the user's explicit request."
|
|
168916
169157
|
),
|
|
168917
|
-
force:
|
|
169158
|
+
force: z627.boolean().optional().describe(
|
|
168918
169159
|
"Use only when the user explicitly asks to read a record already represented in the latest Autopilot brief."
|
|
168919
169160
|
)
|
|
168920
169161
|
}
|
|
@@ -169003,9 +169244,9 @@ _Search mode: ${getLastSearchMode2(project.id)}_`;
|
|
|
169003
169244
|
title: "Memory Graph Context",
|
|
169004
169245
|
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.",
|
|
169005
169246
|
inputSchema: {
|
|
169006
|
-
query:
|
|
169007
|
-
limit:
|
|
169008
|
-
format:
|
|
169247
|
+
query: z627.string().describe("Current task or topic to build memory graph context for"),
|
|
169248
|
+
limit: z627.number().optional().describe("Max high-signal memories to include (default: 5)"),
|
|
169249
|
+
format: z627.enum(["prompt", "summary"]).optional().default("prompt").describe(
|
|
169009
169250
|
'Output format. "prompt" is agent-ready; "summary" is a compact human overview.'
|
|
169010
169251
|
)
|
|
169011
169252
|
}
|
|
@@ -169040,14 +169281,14 @@ _Search mode: ${getLastSearchMode2(project.id)}_`;
|
|
|
169040
169281
|
title: "Memory Autopilot Project Context",
|
|
169041
169282
|
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.",
|
|
169042
169283
|
inputSchema: {
|
|
169043
|
-
task:
|
|
169044
|
-
refresh:
|
|
169284
|
+
task: z627.string().optional().describe("Current coding task or question"),
|
|
169285
|
+
refresh: z627.enum(["auto", "always", "never"]).optional().default("auto").describe(
|
|
169045
169286
|
"Code Memory refresh policy. auto refreshes only when missing or stale."
|
|
169046
169287
|
),
|
|
169047
|
-
format:
|
|
169288
|
+
format: z627.enum(["prompt", "summary", "json", "receipt"]).optional().default("prompt").describe(
|
|
169048
169289
|
'Output format. "prompt" is agent-ready; "summary" is human-readable; "receipt" is bounded JSON; "json" is detailed diagnostics.'
|
|
169049
169290
|
),
|
|
169050
|
-
agent:
|
|
169291
|
+
agent: z627.enum([
|
|
169051
169292
|
"windsurf",
|
|
169052
169293
|
"cursor",
|
|
169053
169294
|
"claude-code",
|
|
@@ -169062,7 +169303,7 @@ _Search mode: ${getLastSearchMode2(project.id)}_`;
|
|
|
169062
169303
|
"opencode",
|
|
169063
169304
|
"trae"
|
|
169064
169305
|
]).optional().describe("Optional target agent for compatible workflow selection."),
|
|
169065
|
-
limit:
|
|
169306
|
+
limit: z627.number().optional().describe("Reserved for future source limits; current prompt stays compact by default.")
|
|
169066
169307
|
}
|
|
169067
169308
|
},
|
|
169068
169309
|
async ({ task, refresh, format, agent }) => {
|
|
@@ -169163,12 +169404,12 @@ _Search mode: ${getLastSearchMode2(project.id)}_`;
|
|
|
169163
169404
|
title: "Context Pack",
|
|
169164
169405
|
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.",
|
|
169165
169406
|
inputSchema: {
|
|
169166
|
-
task:
|
|
169167
|
-
limit:
|
|
169407
|
+
task: z627.string().describe("Current coding task or question"),
|
|
169408
|
+
limit: z627.preprocess(
|
|
169168
169409
|
(value) => typeof value === "string" && value.trim() !== "" ? Number(value) : value,
|
|
169169
|
-
|
|
169410
|
+
z627.number().int().positive().max(100)
|
|
169170
169411
|
).optional().describe("Max active memories to inspect before code-ref filtering (default: 20)"),
|
|
169171
|
-
purpose:
|
|
169412
|
+
purpose: z627.string().optional().describe(
|
|
169172
169413
|
"Why this must expand beyond the latest Autopilot brief. Name the missing fact or the user's explicit request."
|
|
169173
169414
|
)
|
|
169174
169415
|
}
|
|
@@ -169263,7 +169504,7 @@ _Search mode: ${getLastSearchMode2(project.id)}_`;
|
|
|
169263
169504
|
title: "Knowledge Workspace",
|
|
169264
169505
|
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.",
|
|
169265
169506
|
inputSchema: {
|
|
169266
|
-
action:
|
|
169507
|
+
action: z627.enum([
|
|
169267
169508
|
"workspace_init",
|
|
169268
169509
|
"status",
|
|
169269
169510
|
"claim_list",
|
|
@@ -169278,21 +169519,21 @@ _Search mode: ${getLastSearchMode2(project.id)}_`;
|
|
|
169278
169519
|
"workflow_apply",
|
|
169279
169520
|
"workflow_run"
|
|
169280
169521
|
]).describe("Knowledge operation to perform"),
|
|
169281
|
-
mode:
|
|
169282
|
-
path:
|
|
169283
|
-
proposalId:
|
|
169284
|
-
allowManualOverwrite:
|
|
169285
|
-
claimId:
|
|
169286
|
-
claimReviewState:
|
|
169287
|
-
reviewDetail:
|
|
169288
|
-
workflowId:
|
|
169289
|
-
agent:
|
|
169290
|
-
task:
|
|
169291
|
-
outcome:
|
|
169292
|
-
verificationVerdict:
|
|
169293
|
-
failureReason:
|
|
169294
|
-
startingSnapshotId:
|
|
169295
|
-
evidenceIds:
|
|
169522
|
+
mode: z627.enum(["local", "versioned"]).optional().default("local").describe("Workspace mode; versioned writes require an explicit project path during workspace_init"),
|
|
169523
|
+
path: z627.string().optional().describe("Explicit versioned workspace path, used only by workspace_init"),
|
|
169524
|
+
proposalId: z627.string().optional().describe("Pending proposal id for proposal_apply"),
|
|
169525
|
+
allowManualOverwrite: z627.boolean().optional().default(false).describe("Explicitly allow proposal_apply to replace a manually edited page"),
|
|
169526
|
+
claimId: z627.string().optional().describe("Source-backed claim id for claim_review"),
|
|
169527
|
+
claimReviewState: z627.enum(["approved", "rejected"]).optional().describe("Deliberate review verdict for claim_review"),
|
|
169528
|
+
reviewDetail: z627.string().max(2e3).optional().describe("Evidence check performed before approving or rejecting a claim"),
|
|
169529
|
+
workflowId: z627.string().optional().describe("Canonical workflow id for workflow preview, apply, or run"),
|
|
169530
|
+
agent: z627.string().optional().describe("Target agent for a workflow adapter"),
|
|
169531
|
+
task: z627.string().optional().describe("Task text for workflow selection or a workflow run"),
|
|
169532
|
+
outcome: z627.enum(["passed", "failed", "cancelled", "in-progress"]).optional().describe("Workflow run outcome"),
|
|
169533
|
+
verificationVerdict: z627.enum(["passed", "failed", "not-run"]).optional().describe("Workflow run verification verdict"),
|
|
169534
|
+
failureReason: z627.string().optional().describe("Sanitized workflow failure reason"),
|
|
169535
|
+
startingSnapshotId: z627.string().optional().describe("Code snapshot id present when a workflow run began"),
|
|
169536
|
+
evidenceIds: z627.array(z627.string()).max(24).optional().describe("Selected evidence ids for a workflow run")
|
|
169296
169537
|
}
|
|
169297
169538
|
},
|
|
169298
169539
|
async ({
|
|
@@ -169568,8 +169809,8 @@ _Search mode: ${getLastSearchMode2(project.id)}_`;
|
|
|
169568
169809
|
title: "Resolve Memories",
|
|
169569
169810
|
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.`,
|
|
169570
169811
|
inputSchema: {
|
|
169571
|
-
ids:
|
|
169572
|
-
status:
|
|
169812
|
+
ids: z627.array(z627.number()).describe("Observation IDs to mark as resolved"),
|
|
169813
|
+
status: z627.enum(["resolved", "archived"]).optional().default("resolved").describe(
|
|
169573
169814
|
'Target status: "resolved" (default, completed/done) or "archived" (permanently hidden)'
|
|
169574
169815
|
)
|
|
169575
169816
|
}
|
|
@@ -169607,17 +169848,17 @@ _Search mode: ${getLastSearchMode2(project.id)}_`;
|
|
|
169607
169848
|
title: "Store Reasoning Trace",
|
|
169608
169849
|
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.",
|
|
169609
169850
|
inputSchema: {
|
|
169610
|
-
entityName:
|
|
169611
|
-
decision:
|
|
169612
|
-
alternatives:
|
|
169613
|
-
rationale:
|
|
169614
|
-
constraints:
|
|
169615
|
-
expectedOutcome:
|
|
169616
|
-
risks:
|
|
169617
|
-
concepts:
|
|
169618
|
-
filesModified:
|
|
169619
|
-
relatedCommits:
|
|
169620
|
-
relatedEntities:
|
|
169851
|
+
entityName: z627.string().describe('The entity this reasoning applies to (e.g., "auth-module", "database-schema")'),
|
|
169852
|
+
decision: z627.string().describe("What was decided or chosen"),
|
|
169853
|
+
alternatives: z627.array(z627.string()).optional().describe("Other options that were considered"),
|
|
169854
|
+
rationale: z627.string().describe("Why this approach was chosen over alternatives"),
|
|
169855
|
+
constraints: z627.array(z627.string()).optional().describe("Constraints that influenced the decision (time, perf, compat, etc.)"),
|
|
169856
|
+
expectedOutcome: z627.string().optional().describe("What outcome is expected from this decision"),
|
|
169857
|
+
risks: z627.array(z627.string()).optional().describe("Known risks or potential downsides"),
|
|
169858
|
+
concepts: z627.array(z627.string()).optional().describe("Related technical concepts"),
|
|
169859
|
+
filesModified: z627.array(z627.string()).optional().describe("Files related to this reasoning"),
|
|
169860
|
+
relatedCommits: z627.array(z627.string()).optional().describe("Git commit hashes this reasoning explains (links ground truth \u2194 reasoning)"),
|
|
169861
|
+
relatedEntities: z627.array(z627.string()).optional().describe("Other entity names this reasoning relates to (cross-references)")
|
|
169621
169862
|
}
|
|
169622
169863
|
},
|
|
169623
169864
|
async ({ entityName, decision, alternatives, rationale, constraints, expectedOutcome, risks, concepts, filesModified, relatedCommits, relatedEntities }) => {
|
|
@@ -169692,7 +169933,7 @@ Entity: ${entityName} | ${facts.length} facts | ${obs.tokens} tokens${reasoningA
|
|
|
169692
169933
|
title: "Audit Project Attribution",
|
|
169693
169934
|
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.",
|
|
169694
169935
|
inputSchema: {
|
|
169695
|
-
threshold:
|
|
169936
|
+
threshold: z627.number().int().min(1).optional().describe(
|
|
169696
169937
|
"Minimum occurrences of an entityName in another project to flag it as suspicious (default: 2)"
|
|
169697
169938
|
)
|
|
169698
169939
|
}
|
|
@@ -169756,9 +169997,9 @@ Entity: ${entityName} | ${facts.length} facts | ${obs.tokens} tokens${reasoningA
|
|
|
169756
169997
|
title: "Search Reasoning Patterns",
|
|
169757
169998
|
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.",
|
|
169758
169999
|
inputSchema: {
|
|
169759
|
-
query:
|
|
169760
|
-
limit:
|
|
169761
|
-
scope:
|
|
170000
|
+
query: z627.string().describe('Search query \u2014 describe what reasoning you want to find (e.g., "why did we choose PostgreSQL", "auth approach rationale")'),
|
|
170001
|
+
limit: z627.number().optional().describe("Max results (default: 10)"),
|
|
170002
|
+
scope: z627.enum(["project", "global"]).optional().default("project").describe("Search scope")
|
|
169762
170003
|
}
|
|
169763
170004
|
},
|
|
169764
170005
|
async ({ query, limit: limit2, scope }) => {
|
|
@@ -169792,8 +170033,8 @@ ${result.formatted}` }]
|
|
|
169792
170033
|
title: "Deduplicate Memories",
|
|
169793
170034
|
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.",
|
|
169794
170035
|
inputSchema: {
|
|
169795
|
-
query:
|
|
169796
|
-
dryRun:
|
|
170036
|
+
query: z627.string().optional().describe("Optional query to scope dedup to a topic (default: scan all)"),
|
|
170037
|
+
dryRun: z627.boolean().optional().default(false).describe("Preview only \u2014 show what would be resolved without making changes")
|
|
169797
170038
|
}
|
|
169798
170039
|
},
|
|
169799
170040
|
async ({ query, dryRun }) => {
|
|
@@ -169862,9 +170103,9 @@ ${actionLines.join("\n")}`
|
|
|
169862
170103
|
title: "Memory Timeline",
|
|
169863
170104
|
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).",
|
|
169864
170105
|
inputSchema: {
|
|
169865
|
-
anchorId:
|
|
169866
|
-
depthBefore:
|
|
169867
|
-
depthAfter:
|
|
170106
|
+
anchorId: z627.number().describe("Observation ID to center the timeline on"),
|
|
170107
|
+
depthBefore: z627.number().optional().describe("Number of observations before (default: 3)"),
|
|
170108
|
+
depthAfter: z627.number().optional().describe("Number of observations after (default: 3)")
|
|
169868
170109
|
}
|
|
169869
170110
|
},
|
|
169870
170111
|
async ({ anchorId, depthBefore, depthAfter }) => {
|
|
@@ -169894,18 +170135,18 @@ ${actionLines.join("\n")}`
|
|
|
169894
170135
|
title: "Memory Details",
|
|
169895
170136
|
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.',
|
|
169896
170137
|
inputSchema: {
|
|
169897
|
-
ids:
|
|
169898
|
-
refs:
|
|
169899
|
-
|
|
169900
|
-
id:
|
|
169901
|
-
projectId:
|
|
170138
|
+
ids: z627.array(z627.number()).optional().describe("Observation IDs to fetch (legacy, from memorix_search results)"),
|
|
170139
|
+
refs: z627.array(
|
|
170140
|
+
z627.object({
|
|
170141
|
+
id: z627.number().describe("Observation ID"),
|
|
170142
|
+
projectId: z627.string().optional().describe("Project ID for global-search disambiguation")
|
|
169902
170143
|
})
|
|
169903
170144
|
).optional().describe("Explicit observation refs. Prefer this for global search results."),
|
|
169904
|
-
typedRefs:
|
|
169905
|
-
purpose:
|
|
170145
|
+
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"'),
|
|
170146
|
+
purpose: z627.string().optional().describe(
|
|
169906
170147
|
"Why this must expand beyond the latest Autopilot brief. Name the missing fact or the user's explicit request."
|
|
169907
170148
|
),
|
|
169908
|
-
force:
|
|
170149
|
+
force: z627.boolean().optional().describe(
|
|
169909
170150
|
"Use only when the user explicitly asks to read a record already represented in the latest Autopilot brief."
|
|
169910
170151
|
)
|
|
169911
170152
|
}
|
|
@@ -169984,7 +170225,7 @@ ${actionLines.join("\n")}`
|
|
|
169984
170225
|
title: "Memory Retention Status & Archive",
|
|
169985
170226
|
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.',
|
|
169986
170227
|
inputSchema: {
|
|
169987
|
-
action:
|
|
170228
|
+
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)')
|
|
169988
170229
|
}
|
|
169989
170230
|
},
|
|
169990
170231
|
async (args) => {
|
|
@@ -170249,10 +170490,10 @@ ${Math.max(0, managedIds.size - result.resolved.length)} visible writable observ
|
|
|
170249
170490
|
title: "Create Entities",
|
|
170250
170491
|
description: "Create multiple new entities in the knowledge graph",
|
|
170251
170492
|
inputSchema: {
|
|
170252
|
-
entities:
|
|
170253
|
-
name:
|
|
170254
|
-
entityType:
|
|
170255
|
-
observations:
|
|
170493
|
+
entities: z627.array(z627.object({
|
|
170494
|
+
name: z627.string().describe("The name of the entity"),
|
|
170495
|
+
entityType: z627.string().describe("The type of the entity"),
|
|
170496
|
+
observations: z627.array(z627.string()).describe("Initial observations")
|
|
170256
170497
|
}))
|
|
170257
170498
|
}
|
|
170258
170499
|
},
|
|
@@ -170272,10 +170513,10 @@ ${Math.max(0, managedIds.size - result.resolved.length)} visible writable observ
|
|
|
170272
170513
|
title: "Create Relations",
|
|
170273
170514
|
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",
|
|
170274
170515
|
inputSchema: {
|
|
170275
|
-
relations:
|
|
170276
|
-
from:
|
|
170277
|
-
to:
|
|
170278
|
-
relationType:
|
|
170516
|
+
relations: z627.array(z627.object({
|
|
170517
|
+
from: z627.string().describe("Source entity name"),
|
|
170518
|
+
to: z627.string().describe("Target entity name"),
|
|
170519
|
+
relationType: z627.string().describe("Type of relation (e.g., causes, fixes, supports, depends_on, implements)")
|
|
170279
170520
|
}))
|
|
170280
170521
|
}
|
|
170281
170522
|
},
|
|
@@ -170295,9 +170536,9 @@ ${Math.max(0, managedIds.size - result.resolved.length)} visible writable observ
|
|
|
170295
170536
|
title: "Add Observations",
|
|
170296
170537
|
description: "Add new observations to existing entities in the knowledge graph",
|
|
170297
170538
|
inputSchema: {
|
|
170298
|
-
observations:
|
|
170299
|
-
entityName:
|
|
170300
|
-
contents:
|
|
170539
|
+
observations: z627.array(z627.object({
|
|
170540
|
+
entityName: z627.string().describe("Entity name to add observations to"),
|
|
170541
|
+
contents: z627.array(z627.string()).describe("Observation contents to add")
|
|
170301
170542
|
}))
|
|
170302
170543
|
}
|
|
170303
170544
|
},
|
|
@@ -170317,7 +170558,7 @@ ${Math.max(0, managedIds.size - result.resolved.length)} visible writable observ
|
|
|
170317
170558
|
title: "Delete Entities",
|
|
170318
170559
|
description: "Delete multiple entities and their associated relations from the knowledge graph",
|
|
170319
170560
|
inputSchema: {
|
|
170320
|
-
entityNames:
|
|
170561
|
+
entityNames: z627.array(z627.string()).describe("Entity names to delete")
|
|
170321
170562
|
}
|
|
170322
170563
|
},
|
|
170323
170564
|
async ({ entityNames }) => {
|
|
@@ -170336,9 +170577,9 @@ ${Math.max(0, managedIds.size - result.resolved.length)} visible writable observ
|
|
|
170336
170577
|
title: "Delete Observations",
|
|
170337
170578
|
description: "Delete specific observations from entities in the knowledge graph",
|
|
170338
170579
|
inputSchema: {
|
|
170339
|
-
deletions:
|
|
170340
|
-
entityName:
|
|
170341
|
-
observations:
|
|
170580
|
+
deletions: z627.array(z627.object({
|
|
170581
|
+
entityName: z627.string().describe("Entity containing the observations"),
|
|
170582
|
+
observations: z627.array(z627.string()).describe("Observations to delete")
|
|
170342
170583
|
}))
|
|
170343
170584
|
}
|
|
170344
170585
|
},
|
|
@@ -170358,10 +170599,10 @@ ${Math.max(0, managedIds.size - result.resolved.length)} visible writable observ
|
|
|
170358
170599
|
title: "Delete Relations",
|
|
170359
170600
|
description: "Delete multiple relations from the knowledge graph",
|
|
170360
170601
|
inputSchema: {
|
|
170361
|
-
relations:
|
|
170362
|
-
from:
|
|
170363
|
-
to:
|
|
170364
|
-
relationType:
|
|
170602
|
+
relations: z627.array(z627.object({
|
|
170603
|
+
from: z627.string(),
|
|
170604
|
+
to: z627.string(),
|
|
170605
|
+
relationType: z627.string()
|
|
170365
170606
|
}))
|
|
170366
170607
|
}
|
|
170367
170608
|
},
|
|
@@ -170410,7 +170651,7 @@ ${Math.max(0, managedIds.size - result.resolved.length)} visible writable observ
|
|
|
170410
170651
|
title: "Search Nodes",
|
|
170411
170652
|
description: "Search for nodes in the knowledge graph based on a query",
|
|
170412
170653
|
inputSchema: {
|
|
170413
|
-
query:
|
|
170654
|
+
query: z627.string().describe("Search query to match against entity names, types, and observations")
|
|
170414
170655
|
}
|
|
170415
170656
|
},
|
|
170416
170657
|
async ({ query }) => {
|
|
@@ -170429,7 +170670,7 @@ ${Math.max(0, managedIds.size - result.resolved.length)} visible writable observ
|
|
|
170429
170670
|
title: "Open Nodes",
|
|
170430
170671
|
description: "Open specific nodes in the knowledge graph by their names",
|
|
170431
170672
|
inputSchema: {
|
|
170432
|
-
names:
|
|
170673
|
+
names: z627.array(z627.string()).describe("Entity names to retrieve")
|
|
170433
170674
|
}
|
|
170434
170675
|
},
|
|
170435
170676
|
async ({ names }) => {
|
|
@@ -170451,8 +170692,8 @@ ${Math.max(0, managedIds.size - result.resolved.length)} visible writable observ
|
|
|
170451
170692
|
title: "Rules Sync",
|
|
170452
170693
|
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.",
|
|
170453
170694
|
inputSchema: {
|
|
170454
|
-
action:
|
|
170455
|
-
target:
|
|
170695
|
+
action: z627.enum(["status", "generate"]).describe('Action: "status" for report, "generate" to produce target files'),
|
|
170696
|
+
target: z627.enum(RULE_SOURCES).optional().describe("Target agent format for generation (required when action=generate)")
|
|
170456
170697
|
}
|
|
170457
170698
|
},
|
|
170458
170699
|
async ({ action, target }) => {
|
|
@@ -170507,9 +170748,9 @@ ${Math.max(0, managedIds.size - result.resolved.length)} visible writable observ
|
|
|
170507
170748
|
title: "Workspace Sync",
|
|
170508
170749
|
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.',
|
|
170509
170750
|
inputSchema: {
|
|
170510
|
-
action:
|
|
170511
|
-
target:
|
|
170512
|
-
items:
|
|
170751
|
+
action: z627.enum(["scan", "migrate", "apply"]).describe('Action: "scan" to detect configs, "migrate" to preview, "apply" to write to disk'),
|
|
170752
|
+
target: z627.enum(AGENT_TARGETS).optional().describe("Target agent for migration (required for migrate)"),
|
|
170753
|
+
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.')
|
|
170513
170754
|
}
|
|
170514
170755
|
},
|
|
170515
170756
|
async ({ action, target, items }) => {
|
|
@@ -170605,10 +170846,10 @@ ${Math.max(0, managedIds.size - result.resolved.length)} visible writable observ
|
|
|
170605
170846
|
title: "Project Skills",
|
|
170606
170847
|
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.`,
|
|
170607
170848
|
inputSchema: {
|
|
170608
|
-
action:
|
|
170609
|
-
name:
|
|
170610
|
-
target:
|
|
170611
|
-
write:
|
|
170849
|
+
action: z627.enum(["list", "generate", "inject"]).describe('Action: "list" to discover skills, "generate" to create from memory, "inject" to get skill content'),
|
|
170850
|
+
name: z627.string().optional().describe('Skill name (required for "inject")'),
|
|
170851
|
+
target: z627.enum(AGENT_TARGETS).optional().describe('Target agent to write generated skills to (optional for "generate")'),
|
|
170852
|
+
write: z627.boolean().optional().describe("Whether to write generated skills to disk (default: false, preview only)")
|
|
170612
170853
|
}
|
|
170613
170854
|
},
|
|
170614
170855
|
async ({ action, name, target, write }) => {
|
|
@@ -170718,12 +170959,12 @@ ${skill2.content}` }]
|
|
|
170718
170959
|
title: "Promote to Mini-Skill",
|
|
170719
170960
|
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.',
|
|
170720
170961
|
inputSchema: {
|
|
170721
|
-
action:
|
|
170722
|
-
observationIds:
|
|
170723
|
-
skillId:
|
|
170724
|
-
trigger:
|
|
170725
|
-
instruction:
|
|
170726
|
-
tags:
|
|
170962
|
+
action: z627.enum(["promote", "list", "delete"]).describe("Action to perform"),
|
|
170963
|
+
observationIds: z627.array(z627.number()).optional().describe('Observation IDs to promote (required for "promote")'),
|
|
170964
|
+
skillId: z627.number().optional().describe('Mini-skill ID to delete (required for "delete")'),
|
|
170965
|
+
trigger: z627.string().optional().describe("Override: when this skill should be applied"),
|
|
170966
|
+
instruction: z627.string().optional().describe("Override: what the agent should do"),
|
|
170967
|
+
tags: z627.array(z627.string()).optional().describe("Extra classification tags")
|
|
170727
170968
|
}
|
|
170728
170969
|
},
|
|
170729
170970
|
async ({ action, observationIds, skillId, trigger, instruction, tags }) => {
|
|
@@ -170802,8 +171043,8 @@ ${skill2.content}` }]
|
|
|
170802
171043
|
title: "Consolidate Memories",
|
|
170803
171044
|
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.',
|
|
170804
171045
|
inputSchema: {
|
|
170805
|
-
action:
|
|
170806
|
-
threshold:
|
|
171046
|
+
action: z627.enum(["preview", "execute"]).describe("preview = dry run showing candidates, execute = actually merge"),
|
|
171047
|
+
threshold: z627.number().optional().describe("Similarity threshold 0.0-1.0 (default: 0.45). Lower = more aggressive merging")
|
|
170807
171048
|
}
|
|
170808
171049
|
},
|
|
170809
171050
|
async ({ action, threshold }) => {
|
|
@@ -170849,13 +171090,13 @@ ${skill2.content}` }]
|
|
|
170849
171090
|
title: "Start Session",
|
|
170850
171091
|
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.",
|
|
170851
171092
|
inputSchema: {
|
|
170852
|
-
sessionId:
|
|
170853
|
-
agent:
|
|
170854
|
-
agentType:
|
|
170855
|
-
instanceId:
|
|
170856
|
-
joinTeam:
|
|
170857
|
-
role:
|
|
170858
|
-
projectRoot:
|
|
171093
|
+
sessionId: z627.string().optional().describe("Custom session ID (auto-generated if omitted)"),
|
|
171094
|
+
agent: z627.string().optional().describe('Agent/IDE name (e.g., "cursor", "windsurf", "claude-code")'),
|
|
171095
|
+
agentType: z627.string().optional().describe('Agent type used for optional coordination identity mapping (e.g., "windsurf", "cursor").'),
|
|
171096
|
+
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."),
|
|
171097
|
+
joinTeam: z627.boolean().optional().describe("If true, also join orchestration coordination state for this session. Defaults to false."),
|
|
171098
|
+
role: z627.string().optional().describe("Explicit role override used only when joinTeam=true."),
|
|
171099
|
+
projectRoot: z627.string().optional().describe(
|
|
170859
171100
|
"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."
|
|
170860
171101
|
)
|
|
170861
171102
|
}
|
|
@@ -171062,8 +171303,8 @@ ${s2.instruction}`.toLowerCase();
|
|
|
171062
171303
|
title: "End Session",
|
|
171063
171304
|
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]",
|
|
171064
171305
|
inputSchema: {
|
|
171065
|
-
sessionId:
|
|
171066
|
-
summary:
|
|
171306
|
+
sessionId: z627.string().describe("Session ID to close (from memorix_session_start)"),
|
|
171307
|
+
summary: z627.string().optional().describe("Structured session summary (Goal/Discoveries/Accomplished/Files format)")
|
|
171067
171308
|
}
|
|
171068
171309
|
},
|
|
171069
171310
|
async ({ sessionId, summary }) => {
|
|
@@ -171091,7 +171332,7 @@ ${summary ? "Summary saved for next session context injection." : "No summary pr
|
|
|
171091
171332
|
title: "Session Context",
|
|
171092
171333
|
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.",
|
|
171093
171334
|
inputSchema: {
|
|
171094
|
-
limit:
|
|
171335
|
+
limit: z627.number().optional().describe("Number of recent sessions to include (default: 3)")
|
|
171095
171336
|
}
|
|
171096
171337
|
},
|
|
171097
171338
|
async ({ limit: limit2 }) => {
|
|
@@ -171124,14 +171365,14 @@ ${summary ? "Summary saved for next session context injection." : "No summary pr
|
|
|
171124
171365
|
title: "Compact Continuity Checkpoints",
|
|
171125
171366
|
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.",
|
|
171126
171367
|
inputSchema: {
|
|
171127
|
-
action:
|
|
171128
|
-
id:
|
|
171129
|
-
sessionId:
|
|
171130
|
-
agent:
|
|
171131
|
-
task:
|
|
171132
|
-
maxTokens:
|
|
171133
|
-
limit:
|
|
171134
|
-
includeArchived:
|
|
171368
|
+
action: z627.enum(["list", "show", "context", "archive"]).default("list"),
|
|
171369
|
+
id: z627.string().optional().describe("Checkpoint ID for show, context, or archive"),
|
|
171370
|
+
sessionId: z627.string().optional().describe("Optional host session ID filter"),
|
|
171371
|
+
agent: z627.string().optional().describe("Optional host agent filter"),
|
|
171372
|
+
task: z627.string().optional().describe("Current task for a bounded context preview"),
|
|
171373
|
+
maxTokens: z627.number().optional().describe("Maximum tokens for action=context (default: 420)"),
|
|
171374
|
+
limit: z627.number().optional().describe("Maximum records for action=list (default: 20)"),
|
|
171375
|
+
includeArchived: z627.boolean().optional().default(false).describe("Include archived records in action=list")
|
|
171135
171376
|
}
|
|
171136
171377
|
},
|
|
171137
171378
|
async ({ action, id, sessionId, agent, task, maxTokens, limit: limit2, includeArchived }) => {
|
|
@@ -171204,9 +171445,9 @@ ${summary ? "Summary saved for next session context injection." : "No summary pr
|
|
|
171204
171445
|
title: "Transfer Memories",
|
|
171205
171446
|
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).',
|
|
171206
171447
|
inputSchema: {
|
|
171207
|
-
action:
|
|
171208
|
-
format:
|
|
171209
|
-
data:
|
|
171448
|
+
action: z627.enum(["export", "import"]).describe("Operation: export or import"),
|
|
171449
|
+
format: z627.enum(["json", "markdown"]).optional().describe("Export format (for export, default: json)"),
|
|
171450
|
+
data: z627.string().optional().describe("JSON string from a previous export (for import)")
|
|
171210
171451
|
}
|
|
171211
171452
|
},
|
|
171212
171453
|
async ({ action, format, data: jsonStr }) => {
|
|
@@ -171255,7 +171496,7 @@ ${json2}
|
|
|
171255
171496
|
title: "Launch Dashboard",
|
|
171256
171497
|
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.",
|
|
171257
171498
|
inputSchema: {
|
|
171258
|
-
port:
|
|
171499
|
+
port: z627.number().optional().describe("Optional port override for standalone mode. In HTTP control-plane mode, the active dashboard port is reused.")
|
|
171259
171500
|
}
|
|
171260
171501
|
},
|
|
171261
171502
|
async ({ port: dashboardPort }) => {
|
|
@@ -171363,7 +171604,7 @@ ${json2}
|
|
|
171363
171604
|
}
|
|
171364
171605
|
}
|
|
171365
171606
|
console.error(`[memorix] Dashboard staticDir: ${staticDir}`);
|
|
171366
|
-
startDashboard2(projectDir2, portNum, staticDir, project.id, project.name, false,
|
|
171607
|
+
startDashboard2(projectDir2, portNum, staticDir, project.id, project.name, false, project.rootPath, projectResolved).then(() => {
|
|
171367
171608
|
dashboardRunning = true;
|
|
171368
171609
|
}).catch((err) => {
|
|
171369
171610
|
console.error("[memorix] Dashboard error:", err);
|
|
@@ -171419,13 +171660,13 @@ ${json2}
|
|
|
171419
171660
|
title: "Evidence Cards",
|
|
171420
171661
|
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.",
|
|
171421
171662
|
inputSchema: {
|
|
171422
|
-
action:
|
|
171423
|
-
candidateKind:
|
|
171424
|
-
candidateId:
|
|
171425
|
-
query:
|
|
171426
|
-
paths:
|
|
171427
|
-
reason:
|
|
171428
|
-
limit:
|
|
171663
|
+
action: z627.enum(["list", "get", "sync", "stale", "events"]).describe("Evidence operation"),
|
|
171664
|
+
candidateKind: z627.enum(["observation", "code", "git", "test", "document", "workflow", "graph"]).optional().default("observation"),
|
|
171665
|
+
candidateId: z627.string().optional().describe("Candidate id, usually an observation id"),
|
|
171666
|
+
query: z627.string().optional().describe("Optional title/source query for list"),
|
|
171667
|
+
paths: z627.array(z627.string()).max(200).optional().describe("Changed source paths for stale"),
|
|
171668
|
+
reason: z627.string().max(500).optional().describe("Why evidence became stale"),
|
|
171669
|
+
limit: z627.number().int().positive().max(100).optional().default(20)
|
|
171429
171670
|
}
|
|
171430
171671
|
},
|
|
171431
171672
|
async ({ action, candidateKind, candidateId, query, paths, reason, limit: limit2 }) => {
|
|
@@ -171465,15 +171706,15 @@ ${json2}
|
|
|
171465
171706
|
title: "Memory Feedback",
|
|
171466
171707
|
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.",
|
|
171467
171708
|
inputSchema: {
|
|
171468
|
-
action:
|
|
171469
|
-
candidateKind:
|
|
171470
|
-
candidateId:
|
|
171471
|
-
signal:
|
|
171472
|
-
sourceRef:
|
|
171473
|
-
actor:
|
|
171474
|
-
note:
|
|
171475
|
-
targetEventId:
|
|
171476
|
-
limit:
|
|
171709
|
+
action: z627.enum(["record", "show", "audit"]).describe("Feedback operation"),
|
|
171710
|
+
candidateKind: z627.enum(["observation", "claim", "durable-memory", "workflow"]).optional().default("observation"),
|
|
171711
|
+
candidateId: z627.string().describe("Memory or knowledge candidate id"),
|
|
171712
|
+
signal: z627.enum(["user-correction", "verification-success", "verification-failure", "code-change", "used", "not-used", "code-conflict", "strengthen", "weaken", "revoke"]).optional(),
|
|
171713
|
+
sourceRef: z627.string().max(500).optional().describe("Source of this feedback, such as test:run-42 or user:chat"),
|
|
171714
|
+
actor: z627.string().max(200).optional(),
|
|
171715
|
+
note: z627.string().max(2e3).optional(),
|
|
171716
|
+
targetEventId: z627.string().optional().describe("Existing event id when action=record and signal=revoke"),
|
|
171717
|
+
limit: z627.number().int().positive().max(200).optional().default(100)
|
|
171477
171718
|
}
|
|
171478
171719
|
},
|
|
171479
171720
|
async ({ action, candidateKind, candidateId, signal, sourceRef, actor, note, targetEventId, limit: limit2 }) => {
|
|
@@ -171539,19 +171780,19 @@ ${json2}
|
|
|
171539
171780
|
title: "Coordination Management",
|
|
171540
171781
|
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.',
|
|
171541
171782
|
inputSchema: {
|
|
171542
|
-
action:
|
|
171543
|
-
name:
|
|
171544
|
-
agentType:
|
|
171545
|
-
instanceId:
|
|
171546
|
-
role:
|
|
171547
|
-
capabilities:
|
|
171548
|
-
agentId:
|
|
171783
|
+
action: z627.enum(["join", "leave", "status", "listRoles", "addRole", "removeRole"]).describe("Operation to perform"),
|
|
171784
|
+
name: z627.string().optional().describe('Agent display name for join (e.g., "cursor-frontend")'),
|
|
171785
|
+
agentType: z627.string().optional().describe('Agent type for join (e.g., "windsurf", "cursor", "claude-code")'),
|
|
171786
|
+
instanceId: z627.string().optional().describe("Stable instance ID for join (preserves identity across restarts)"),
|
|
171787
|
+
role: z627.string().optional().describe("Agent role for join (defaults by agentType if omitted)"),
|
|
171788
|
+
capabilities: z627.array(z627.string()).optional().describe("Agent capabilities for join"),
|
|
171789
|
+
agentId: z627.string().optional().describe("Agent ID for leave"),
|
|
171549
171790
|
// Role management params
|
|
171550
|
-
roleId:
|
|
171551
|
-
label:
|
|
171552
|
-
roleDescription:
|
|
171553
|
-
preferredAgentTypes:
|
|
171554
|
-
maxConcurrent:
|
|
171791
|
+
roleId: z627.string().optional().describe("Role ID (for addRole/removeRole)"),
|
|
171792
|
+
label: z627.string().optional().describe("Role label (for addRole)"),
|
|
171793
|
+
roleDescription: z627.string().optional().describe("Role description (for addRole)"),
|
|
171794
|
+
preferredAgentTypes: z627.array(z627.string()).optional().describe("Preferred agent types for this role (for addRole)"),
|
|
171795
|
+
maxConcurrent: z627.number().optional().describe("Max concurrent agents for this role (for addRole, default 1)")
|
|
171555
171796
|
}
|
|
171556
171797
|
},
|
|
171557
171798
|
async ({ action, name, agentType, instanceId, role, capabilities, agentId, roleId, label, roleDescription, preferredAgentTypes, maxConcurrent }) => {
|
|
@@ -171664,9 +171905,9 @@ ${agentLines.join("\n")}`
|
|
|
171664
171905
|
title: "File Lock Management",
|
|
171665
171906
|
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.',
|
|
171666
171907
|
inputSchema: {
|
|
171667
|
-
action:
|
|
171668
|
-
file:
|
|
171669
|
-
agentId:
|
|
171908
|
+
action: z627.enum(["lock", "unlock", "status"]).describe("Operation to perform"),
|
|
171909
|
+
file: z627.string().optional().describe("File path (required for lock/unlock, optional for status \u2014 omit to list all)"),
|
|
171910
|
+
agentId: z627.string().optional().describe("Agent ID (required for lock/unlock)")
|
|
171670
171911
|
}
|
|
171671
171912
|
},
|
|
171672
171913
|
async ({ action, file, agentId }) => {
|
|
@@ -171705,20 +171946,20 @@ ${lines.join("\n")}` }] };
|
|
|
171705
171946
|
server.registerTool(
|
|
171706
171947
|
"team_task",
|
|
171707
171948
|
{
|
|
171708
|
-
title: "Task
|
|
171949
|
+
title: "Task Status",
|
|
171709
171950
|
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.',
|
|
171710
171951
|
inputSchema: {
|
|
171711
|
-
action:
|
|
171712
|
-
description:
|
|
171713
|
-
deps:
|
|
171714
|
-
taskId:
|
|
171715
|
-
agentId:
|
|
171716
|
-
result:
|
|
171717
|
-
status:
|
|
171718
|
-
available:
|
|
171719
|
-
metadata:
|
|
171720
|
-
requiredRole:
|
|
171721
|
-
preferredRole:
|
|
171952
|
+
action: z627.enum(["create", "claim", "complete", "list"]).describe("Operation to perform"),
|
|
171953
|
+
description: z627.string().optional().describe("Task description (for create)"),
|
|
171954
|
+
deps: z627.array(z627.string()).optional().describe("Dependency task IDs (for create)"),
|
|
171955
|
+
taskId: z627.string().optional().describe("Task ID (for claim/complete)"),
|
|
171956
|
+
agentId: z627.string().optional().describe("Agent ID (for claim/complete)"),
|
|
171957
|
+
result: z627.string().optional().describe("Result summary (for complete)"),
|
|
171958
|
+
status: z627.enum(["pending", "in_progress", "completed", "failed"]).optional().describe("Filter by status (for list)"),
|
|
171959
|
+
available: z627.boolean().optional().describe("Show only claimable tasks (for list)"),
|
|
171960
|
+
metadata: z627.string().optional().describe("JSON metadata for the task (for create). Used by planner/review tasks for autonomous mode."),
|
|
171961
|
+
requiredRole: z627.string().optional().describe("Required role for this task (for create). Agents without this role cannot claim."),
|
|
171962
|
+
preferredRole: z627.string().optional().describe("Preferred role for this task (for create). Agents with this role are prioritized.")
|
|
171722
171963
|
}
|
|
171723
171964
|
},
|
|
171724
171965
|
async ({ action, description: desc, deps, taskId, agentId, result, status, available, metadata, requiredRole, preferredRole }) => {
|
|
@@ -171791,15 +172032,15 @@ ${lines.join("\n")}` }] };
|
|
|
171791
172032
|
title: "Team Messaging",
|
|
171792
172033
|
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.`,
|
|
171793
172034
|
inputSchema: {
|
|
171794
|
-
action:
|
|
171795
|
-
from:
|
|
171796
|
-
to:
|
|
171797
|
-
type:
|
|
171798
|
-
content:
|
|
171799
|
-
agentId:
|
|
171800
|
-
markRead:
|
|
171801
|
-
toRole:
|
|
171802
|
-
handoffStatus:
|
|
172035
|
+
action: z627.enum(["send", "broadcast", "inbox"]).describe("Operation to perform"),
|
|
172036
|
+
from: z627.string().optional().describe("Your sender agent ID. Omit it to use this session identity."),
|
|
172037
|
+
to: z627.string().optional().describe("Receiver agent ID (for send)"),
|
|
172038
|
+
type: z627.enum(["request", "response", "info", "announcement", "contract", "error", "handoff"]).optional().describe("Message type (for send/broadcast)"),
|
|
172039
|
+
content: z627.string().optional().describe("Message content (for send/broadcast)"),
|
|
172040
|
+
agentId: z627.string().optional().describe("Agent ID (for inbox)"),
|
|
172041
|
+
markRead: z627.boolean().optional().default(false).describe("Mark messages as read (for inbox)"),
|
|
172042
|
+
toRole: z627.string().optional().describe("Target role for role-based messaging/handoff (for send)"),
|
|
172043
|
+
handoffStatus: z627.enum(["open", "claimed", "completed", "archived"]).optional().describe("Handoff status (for send with type=handoff)")
|
|
171803
172044
|
}
|
|
171804
172045
|
},
|
|
171805
172046
|
async ({ action, from, to, type: msgType, content, agentId, markRead, toRole, handoffStatus }) => {
|
|
@@ -171869,8 +172110,8 @@ ${lines.join("\n")}` }] };
|
|
|
171869
172110
|
title: "Team Poll \u2014 Situational Awareness",
|
|
171870
172111
|
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.",
|
|
171871
172112
|
inputSchema: {
|
|
171872
|
-
agentId:
|
|
171873
|
-
markInboxRead:
|
|
172113
|
+
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."),
|
|
172114
|
+
markInboxRead: z627.boolean().optional().describe("If true, mark all inbox messages as read after returning them.")
|
|
171874
172115
|
}
|
|
171875
172116
|
},
|
|
171876
172117
|
async ({ agentId, markInboxRead }) => {
|
|
@@ -171964,13 +172205,13 @@ ${lines.join("\n")}` }] };
|
|
|
171964
172205
|
title: "Team Handoff \u2014 Agent Context Transfer",
|
|
171965
172206
|
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.",
|
|
171966
172207
|
inputSchema: {
|
|
171967
|
-
fromAgentId:
|
|
171968
|
-
summary:
|
|
171969
|
-
context:
|
|
171970
|
-
toAgentId:
|
|
171971
|
-
taskId:
|
|
171972
|
-
filesModified:
|
|
171973
|
-
concepts:
|
|
172208
|
+
fromAgentId: z627.string().describe("Your agent ID (from team_manage join or session_start with joinTeam=true)"),
|
|
172209
|
+
summary: z627.string().describe("Human-readable summary of what you did and what needs to happen next"),
|
|
172210
|
+
context: z627.string().describe("Detailed context for the next agent: what was done, current state, known issues, next steps"),
|
|
172211
|
+
toAgentId: z627.string().optional().describe("Specific recipient agent ID. Omit to broadcast to all."),
|
|
172212
|
+
taskId: z627.string().optional().describe("Link to a specific team_task ID"),
|
|
172213
|
+
filesModified: z627.array(z627.string()).optional().describe("Files you modified during this work"),
|
|
172214
|
+
concepts: z627.array(z627.string()).optional().describe("Key concepts for search discoverability")
|
|
171974
172215
|
}
|
|
171975
172216
|
},
|
|
171976
172217
|
async ({ fromAgentId, summary, context, toAgentId, taskId, filesModified, concepts }) => {
|
|
@@ -172050,7 +172291,7 @@ ${lines.join("\n")}` }] };
|
|
|
172050
172291
|
title: "Manage Controlled Media",
|
|
172051
172292
|
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.",
|
|
172052
172293
|
inputSchema: {
|
|
172053
|
-
action:
|
|
172294
|
+
action: z627.enum([
|
|
172054
172295
|
"import",
|
|
172055
172296
|
"attach",
|
|
172056
172297
|
"list",
|
|
@@ -172061,32 +172302,32 @@ ${lines.join("\n")}` }] };
|
|
|
172061
172302
|
...mediaTranscriptionEnabled ? ["derive-audio"] : [],
|
|
172062
172303
|
...mediaGenerationEnabled ? ["generate-image", "generate-video"] : []
|
|
172063
172304
|
]),
|
|
172064
|
-
path:
|
|
172065
|
-
assetId:
|
|
172066
|
-
jobId:
|
|
172067
|
-
kind:
|
|
172068
|
-
limit:
|
|
172069
|
-
title:
|
|
172070
|
-
narrative:
|
|
172071
|
-
maxPages:
|
|
172072
|
-
maxChars:
|
|
172073
|
-
attach:
|
|
172305
|
+
path: z627.string().optional().describe("Explicit local image/audio/video/PDF path for import."),
|
|
172306
|
+
assetId: z627.string().optional().describe("Controlled MediaAsset ID for attach/show."),
|
|
172307
|
+
jobId: z627.string().optional().describe("Durable media job ID for status."),
|
|
172308
|
+
kind: z627.enum(["image", "audio", "video", "document"]).optional().describe("Optional asset list filter."),
|
|
172309
|
+
limit: z627.number().int().min(1).max(100).optional().describe("Maximum assets to list."),
|
|
172310
|
+
title: z627.string().optional().describe("Observation title when attaching generated/imported output."),
|
|
172311
|
+
narrative: z627.string().optional().describe("Short retrieval text when attaching an asset."),
|
|
172312
|
+
maxPages: z627.number().int().min(1).max(100).optional().describe("Bounded PDF extraction page limit."),
|
|
172313
|
+
maxChars: z627.number().int().min(1).max(6e4).optional().describe("Bounded PDF extraction character limit."),
|
|
172314
|
+
attach: z627.boolean().optional().describe("Attach generated/imported output to normal project memory explicitly."),
|
|
172074
172315
|
...mediaGenerationOrTranscription ? {
|
|
172075
|
-
model:
|
|
172076
|
-
prompt:
|
|
172316
|
+
model: z627.string().max(160).optional().describe("Provider model for the selected media action."),
|
|
172317
|
+
prompt: z627.string().optional().describe("Explicit prompt for generation or transcription.")
|
|
172077
172318
|
} : {},
|
|
172078
172319
|
...mediaTranscriptionEnabled ? {
|
|
172079
|
-
provider:
|
|
172080
|
-
language:
|
|
172320
|
+
provider: z627.enum(["openai", "groq"]).optional().describe("Explicit audio transcription provider."),
|
|
172321
|
+
language: z627.string().max(32).optional().describe("Optional ISO-639-1 hint for audio transcription.")
|
|
172081
172322
|
} : {},
|
|
172082
172323
|
...mediaGenerationEnabled ? {
|
|
172083
|
-
image:
|
|
172084
|
-
region:
|
|
172085
|
-
n:
|
|
172086
|
-
ratio:
|
|
172087
|
-
width:
|
|
172088
|
-
height:
|
|
172089
|
-
duration:
|
|
172324
|
+
image: z627.string().optional().describe("Base64-encoded reference image for image-to-image generation."),
|
|
172325
|
+
region: z627.enum(["global", "cn"]).optional().describe("MiniMax deployment region."),
|
|
172326
|
+
n: z627.number().int().min(1).max(4).optional().describe("Image output count."),
|
|
172327
|
+
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."),
|
|
172328
|
+
width: z627.number().int().min(1).max(8192).optional().describe("Requested image width."),
|
|
172329
|
+
height: z627.number().int().min(1).max(8192).optional().describe("Requested image height."),
|
|
172330
|
+
duration: z627.union([z627.literal(5), z627.literal(10)]).optional().describe("MiniMax video duration in seconds.")
|
|
172090
172331
|
} : {}
|
|
172091
172332
|
}
|
|
172092
172333
|
},
|
|
@@ -172284,10 +172525,10 @@ ${lines.join("\n")}` }] };
|
|
|
172284
172525
|
title: "Ingest Image",
|
|
172285
172526
|
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.",
|
|
172286
172527
|
inputSchema: {
|
|
172287
|
-
base64:
|
|
172288
|
-
mimeType:
|
|
172289
|
-
filename:
|
|
172290
|
-
prompt:
|
|
172528
|
+
base64: z627.string().describe("Base64-encoded image data"),
|
|
172529
|
+
mimeType: z627.string().optional().describe("Deprecated compatibility hint. Memorix detects the actual MIME type from the image bytes."),
|
|
172530
|
+
filename: z627.string().optional().describe("Original filename"),
|
|
172531
|
+
prompt: z627.string().optional().describe("Custom analysis prompt")
|
|
172291
172532
|
}
|
|
172292
172533
|
},
|
|
172293
172534
|
async (args) => {
|
|
@@ -172587,6 +172828,7 @@ var init_server2 = __esm({
|
|
|
172587
172828
|
init_secret_filter();
|
|
172588
172829
|
init_surfaced_registry();
|
|
172589
172830
|
init_request_context();
|
|
172831
|
+
init_mcp_compat();
|
|
172590
172832
|
FORMATION_TIMEOUT_MS = parseFormationTimeoutMs(process.env.MEMORIX_FORMATION_TIMEOUT_MS);
|
|
172591
172833
|
COMPACT_ON_WRITE_TIMEOUT_MS = 12e3;
|
|
172592
172834
|
COMPRESSION_TIMEOUT_MS = 5e3;
|
|
@@ -172759,7 +173001,7 @@ var init_serve_shared = __esm({
|
|
|
172759
173001
|
|
|
172760
173002
|
// src/cli/version.ts
|
|
172761
173003
|
function getCliVersion() {
|
|
172762
|
-
return true ? "1.8.
|
|
173004
|
+
return true ? "1.8.2" : pkg.version;
|
|
172763
173005
|
}
|
|
172764
173006
|
var init_version3 = __esm({
|
|
172765
173007
|
"src/cli/version.ts"() {
|