memorix 1.8.5 → 1.8.7
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 +51 -0
- package/README.md +5 -3
- package/README.zh-CN.md +1 -1
- package/assets/star-history-dark.svg +5 -5
- package/assets/star-history-light.svg +5 -5
- package/assets/star-history.json +35 -5
- package/dist/cli/index.js +2510 -1284
- package/dist/dashboard/static/app.js +51 -3
- package/dist/dashboard/static/style.css +88 -0
- package/dist/index.js +1797 -743
- package/dist/maintenance-runner.js +855 -218
- package/dist/media-audio-runner.js +856 -219
- package/dist/media-video-runner.js +854 -217
- package/dist/memcode-runtime/CHANGELOG.md +51 -0
- package/dist/sdk.js +1787 -733
- package/dist/types.d.ts +1 -1
- package/dist/vector-backfill-runner.js +853 -216
- package/docs/1.8.7-CODEGRAPH.md +166 -0
- package/docs/API_REFERENCE.md +24 -3
- package/docs/ARCHITECTURE.md +13 -0
- package/docs/DEVELOPMENT.md +2 -2
- package/docs/INTEGRATIONS.md +1 -0
- package/docs/MODULES.md +1 -1
- package/docs/README.md +6 -3
- package/docs/SETUP.md +1 -0
- package/package.json +3 -2
- package/plugins/antigravity/memorix/plugin.json +1 -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 +2 -2
- package/src/cli/commands/agent-integrations.ts +1 -0
- package/src/cli/commands/codegraph.ts +25 -11
- package/src/cli/commands/doctor.ts +11 -2
- package/src/cli/commands/hooks-install.ts +9 -2
- package/src/cli/commands/hooks-preview.ts +5 -0
- package/src/cli/commands/integrate.ts +2 -0
- package/src/cli/commands/serve-http.ts +27 -1
- package/src/cli/commands/setup.ts +11 -1
- package/src/cli/commands/uninstall.ts +24 -2
- package/src/codegraph/auto-context.ts +19 -10
- package/src/codegraph/context-pack.ts +20 -6
- package/src/codegraph/dashboard.ts +82 -0
- package/src/codegraph/external-provider.ts +10 -1
- package/src/codegraph/freshness.ts +1 -1
- package/src/codegraph/lite-provider.ts +81 -0
- package/src/codegraph/project-context.ts +18 -5
- package/src/codegraph/scip-provider.ts +181 -0
- package/src/codegraph/semantic-context.ts +139 -0
- package/src/codegraph/semantic-provider.ts +404 -0
- package/src/codegraph/store.ts +253 -18
- package/src/codegraph/task-lens.ts +72 -7
- package/src/codegraph/types.ts +25 -3
- package/src/dashboard/server.ts +6 -0
- package/src/dashboard/static/style.css +88 -0
- package/src/hooks/installers/index.ts +55 -0
- package/src/hooks/types.ts +2 -0
- package/src/integrations/registry.ts +9 -0
- package/src/knowledge/workset.ts +46 -44
- package/src/server/mcp-binding-store.ts +17 -0
- package/src/store/sqlite-db.ts +13 -0
- package/src/types.ts +1 -1
- package/src/workspace/mcp-adapters/workbuddy.ts +71 -0
|
@@ -387,6 +387,16 @@ const i18n = {
|
|
|
387
387
|
kgViewMode: 'View Mode',
|
|
388
388
|
kgFocused: 'Focused',
|
|
389
389
|
kgFullGraph: 'Full Graph',
|
|
390
|
+
codeGraphHealthTitle: 'CodeGraph health',
|
|
391
|
+
codeGraphStateReady: 'Semantic index ready',
|
|
392
|
+
codeGraphStatePartial: 'Needs attention',
|
|
393
|
+
codeGraphStateNotIndexed: 'Structural index only',
|
|
394
|
+
codeGraphFiles: 'files',
|
|
395
|
+
codeGraphSymbols: 'symbols',
|
|
396
|
+
codeGraphEdges: 'edges',
|
|
397
|
+
codeGraphParserErrors: 'parser errors',
|
|
398
|
+
codeGraphSnapshotIncomplete: 'incomplete scan',
|
|
399
|
+
codeGraphUnavailable: 'CodeGraph health unavailable',
|
|
390
400
|
|
|
391
401
|
// Identity (additional)
|
|
392
402
|
identityCurrentProject: 'Current Project',
|
|
@@ -840,6 +850,16 @@ const i18n = {
|
|
|
840
850
|
kgViewMode: '视图模式',
|
|
841
851
|
kgFocused: '聚焦',
|
|
842
852
|
kgFullGraph: '全量',
|
|
853
|
+
codeGraphHealthTitle: '代码图谱健康度',
|
|
854
|
+
codeGraphStateReady: '语义索引就绪',
|
|
855
|
+
codeGraphStatePartial: '需要处理',
|
|
856
|
+
codeGraphStateNotIndexed: '当前只有结构索引',
|
|
857
|
+
codeGraphFiles: '个文件',
|
|
858
|
+
codeGraphSymbols: '个符号',
|
|
859
|
+
codeGraphEdges: '条关系',
|
|
860
|
+
codeGraphParserErrors: '个解析错误',
|
|
861
|
+
codeGraphSnapshotIncomplete: '扫描不完整',
|
|
862
|
+
codeGraphUnavailable: '代码图谱状态不可用',
|
|
843
863
|
|
|
844
864
|
// Identity (additional)
|
|
845
865
|
identityCurrentProject: '当前项目',
|
|
@@ -2025,7 +2045,7 @@ async function loadGraph() {
|
|
|
2025
2045
|
const container = document.getElementById('page-graph');
|
|
2026
2046
|
container.innerHTML = '<div class="loading"><div class="spinner"></div></div>';
|
|
2027
2047
|
|
|
2028
|
-
const kg = await api('knowledge-graph');
|
|
2048
|
+
const [kg, codegraph] = await Promise.all([api('knowledge-graph'), api('codegraph')]);
|
|
2029
2049
|
if (!kg || !Array.isArray(kg.nodes) || !Array.isArray(kg.edges)) {
|
|
2030
2050
|
container.innerHTML = emptyState(
|
|
2031
2051
|
'<span class="iconify" data-icon="lucide:network" style="font-size:36px;"></span>',
|
|
@@ -2044,7 +2064,34 @@ async function loadGraph() {
|
|
|
2044
2064
|
return;
|
|
2045
2065
|
}
|
|
2046
2066
|
|
|
2047
|
-
renderSemanticGraph(kg);
|
|
2067
|
+
renderSemanticGraph(kg, codegraph);
|
|
2068
|
+
}
|
|
2069
|
+
|
|
2070
|
+
function renderCodeGraphHealth(status) {
|
|
2071
|
+
if (!status) {
|
|
2072
|
+
return `<div class="codegraph-health codegraph-health--unknown"><strong>${t('codeGraphUnavailable')}</strong></div>`;
|
|
2073
|
+
}
|
|
2074
|
+
const state = status.state === 'ready'
|
|
2075
|
+
? t('codeGraphStateReady')
|
|
2076
|
+
: status.state === 'partial'
|
|
2077
|
+
? t('codeGraphStatePartial')
|
|
2078
|
+
: t('codeGraphStateNotIndexed');
|
|
2079
|
+
const semantic = status.semantic || {};
|
|
2080
|
+
const snapshot = status.snapshot || {};
|
|
2081
|
+
const parserErrors = Number(semantic.parserErrors || 0);
|
|
2082
|
+
const snapshotLabel = snapshot.incomplete ? ` · ${t('codeGraphSnapshotIncomplete')}` : '';
|
|
2083
|
+
const errorTitle = (status.parserErrorPaths || []).join(', ');
|
|
2084
|
+
return `
|
|
2085
|
+
<div class="codegraph-health codegraph-health--${escapeHtml(status.state || 'partial')}" title="${escapeHtml(errorTitle)}">
|
|
2086
|
+
<div class="codegraph-health-title"><span class="codegraph-health-dot"></span><strong>${t('codeGraphHealthTitle')}</strong><span>${escapeHtml(state)}${snapshotLabel}</span></div>
|
|
2087
|
+
<div class="codegraph-health-metrics">
|
|
2088
|
+
<span>${Number(semantic.files || 0)} ${t('codeGraphFiles')}</span>
|
|
2089
|
+
<span>${Number(semantic.symbols || 0)} ${t('codeGraphSymbols')}</span>
|
|
2090
|
+
<span>${Number(semantic.edges || 0)} ${t('codeGraphEdges')}</span>
|
|
2091
|
+
${parserErrors > 0 ? `<span class="codegraph-health-error">${parserErrors} ${t('codeGraphParserErrors')}</span>` : ''}
|
|
2092
|
+
</div>
|
|
2093
|
+
</div>
|
|
2094
|
+
`;
|
|
2048
2095
|
}
|
|
2049
2096
|
|
|
2050
2097
|
// ============================================================
|
|
@@ -2052,7 +2099,7 @@ async function loadGraph() {
|
|
|
2052
2099
|
// Force layout, section categories, evidence-based edges
|
|
2053
2100
|
// ============================================================
|
|
2054
2101
|
|
|
2055
|
-
function renderSemanticGraph(kg) {
|
|
2102
|
+
function renderSemanticGraph(kg, codegraph) {
|
|
2056
2103
|
const container = document.getElementById('page-graph');
|
|
2057
2104
|
|
|
2058
2105
|
// Section color palette (vivid for both light/dark themes)
|
|
@@ -2255,6 +2302,7 @@ function renderSemanticGraph(kg) {
|
|
|
2255
2302
|
<h1 class="page-title">${t('kgTitle')}</h1>
|
|
2256
2303
|
<p class="page-subtitle">${t('kgSubtitle')}</p>
|
|
2257
2304
|
</div>
|
|
2305
|
+
<div id="codegraph-health-panel">${renderCodeGraphHealth(codegraph)}</div>
|
|
2258
2306
|
<div class="graph-layout">
|
|
2259
2307
|
<div class="graph-filter-panel" id="kg-filter-panel"></div>
|
|
2260
2308
|
<div id="graph-container">
|
|
@@ -1133,12 +1133,100 @@ body {
|
|
|
1133
1133
|
padding: 16px 20px 8px;
|
|
1134
1134
|
}
|
|
1135
1135
|
|
|
1136
|
+
#codegraph-health-panel {
|
|
1137
|
+
flex-shrink: 0;
|
|
1138
|
+
padding: 0 20px 10px;
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
.codegraph-health {
|
|
1142
|
+
display: flex;
|
|
1143
|
+
align-items: center;
|
|
1144
|
+
justify-content: space-between;
|
|
1145
|
+
gap: 16px;
|
|
1146
|
+
min-width: 0;
|
|
1147
|
+
padding: 9px 12px;
|
|
1148
|
+
border: 1px solid var(--border-subtle);
|
|
1149
|
+
border-left: 3px solid var(--accent-green);
|
|
1150
|
+
border-radius: var(--radius-sm);
|
|
1151
|
+
background: var(--bg-surface);
|
|
1152
|
+
color: var(--text-secondary);
|
|
1153
|
+
font-size: 11px;
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
.codegraph-health--partial {
|
|
1157
|
+
border-left-color: var(--accent-amber);
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
.codegraph-health--not-indexed,
|
|
1161
|
+
.codegraph-health--unknown {
|
|
1162
|
+
border-left-color: var(--text-muted);
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
.codegraph-health-title,
|
|
1166
|
+
.codegraph-health-metrics {
|
|
1167
|
+
display: flex;
|
|
1168
|
+
align-items: center;
|
|
1169
|
+
gap: 9px;
|
|
1170
|
+
min-width: 0;
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
.codegraph-health-title strong {
|
|
1174
|
+
color: var(--text-primary);
|
|
1175
|
+
white-space: nowrap;
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
.codegraph-health-title > span:not(.codegraph-health-dot) {
|
|
1179
|
+
overflow: hidden;
|
|
1180
|
+
text-overflow: ellipsis;
|
|
1181
|
+
white-space: nowrap;
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
.codegraph-health-dot {
|
|
1185
|
+
width: 7px;
|
|
1186
|
+
height: 7px;
|
|
1187
|
+
flex: 0 0 7px;
|
|
1188
|
+
border-radius: 50%;
|
|
1189
|
+
background: var(--accent-green);
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
.codegraph-health--partial .codegraph-health-dot {
|
|
1193
|
+
background: var(--accent-amber);
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1196
|
+
.codegraph-health--not-indexed .codegraph-health-dot,
|
|
1197
|
+
.codegraph-health--unknown .codegraph-health-dot {
|
|
1198
|
+
background: var(--text-muted);
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
.codegraph-health-metrics {
|
|
1202
|
+
flex-wrap: wrap;
|
|
1203
|
+
justify-content: flex-end;
|
|
1204
|
+
color: var(--text-muted);
|
|
1205
|
+
font-family: var(--font-mono);
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
.codegraph-health-error {
|
|
1209
|
+
color: var(--accent-amber);
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1136
1212
|
.kg-page-shell .graph-layout {
|
|
1137
1213
|
flex: 1;
|
|
1138
1214
|
min-height: 0;
|
|
1215
|
+
height: auto;
|
|
1139
1216
|
}
|
|
1140
1217
|
|
|
1141
1218
|
@media (max-width: 768px) {
|
|
1219
|
+
#codegraph-health-panel {
|
|
1220
|
+
padding: 0 12px 10px;
|
|
1221
|
+
}
|
|
1222
|
+
.codegraph-health {
|
|
1223
|
+
align-items: flex-start;
|
|
1224
|
+
flex-direction: column;
|
|
1225
|
+
gap: 6px;
|
|
1226
|
+
}
|
|
1227
|
+
.codegraph-health-metrics {
|
|
1228
|
+
justify-content: flex-start;
|
|
1229
|
+
}
|
|
1142
1230
|
.kg-page-shell .graph-layout {
|
|
1143
1231
|
flex-direction: column;
|
|
1144
1232
|
height: auto;
|