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.
Files changed (45) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/cli/index.js +407 -130
  3. package/dist/dashboard/static/app.js +37 -23
  4. package/dist/dashboard/static/index.html +1 -1
  5. package/dist/index.d.ts +2 -2
  6. package/dist/index.js +633 -391
  7. package/dist/maintenance-runner.js +31 -25
  8. package/dist/media-audio-runner.js +31 -25
  9. package/dist/media-video-runner.js +31 -25
  10. package/dist/memcode-runtime/CHANGELOG.md +29 -0
  11. package/dist/sdk.js +625 -390
  12. package/dist/vector-backfill-runner.js +31 -25
  13. package/docs/1.2.0-PROVIDER-QUALITY.md +15 -6
  14. package/docs/1.3.3-MULTIMODAL-MEDIA-AND-MCP-COMPAT.md +7 -6
  15. package/docs/1.8.0-RELEASE-CANDIDATE-SPEC.md +10 -8
  16. package/docs/API_REFERENCE.md +12 -8
  17. package/docs/ARCHITECTURE.md +3 -1
  18. package/docs/CONFIGURATION.md +2 -2
  19. package/docs/DASHBOARD.md +6 -0
  20. package/docs/DEVELOPMENT.md +2 -2
  21. package/docs/README.md +14 -8
  22. package/package.json +1 -1
  23. package/plugins/antigravity/memorix/plugin.json +2 -1
  24. package/plugins/claude/memorix/.claude-plugin/plugin.json +1 -1
  25. package/plugins/codebuddy/memorix/.codebuddy-plugin/plugin.json +1 -1
  26. package/plugins/codex/memorix/.codex-plugin/plugin.json +1 -1
  27. package/plugins/copilot/memorix/plugin.json +1 -1
  28. package/plugins/gemini/memorix/gemini-extension.json +1 -1
  29. package/plugins/hermes/memorix/plugin.yaml +1 -1
  30. package/plugins/omp/memorix/package.json +1 -1
  31. package/plugins/openclaw/memorix/.codex-plugin/plugin.json +1 -1
  32. package/plugins/pi/memorix/package.json +1 -1
  33. package/server.json +3 -3
  34. package/src/cli/commands/dashboard.ts +1 -1
  35. package/src/cli/commands/serve-http.ts +38 -3
  36. package/src/codegraph/external-provider.ts +299 -19
  37. package/src/config/dotenv-loader.ts +9 -4
  38. package/src/config.ts +16 -16
  39. package/src/dashboard/maintenance.ts +4 -1
  40. package/src/dashboard/server.ts +85 -86
  41. package/src/dashboard/static/index.html +1 -1
  42. package/src/llm/provider.ts +17 -4
  43. package/src/server/mcp-compat.ts +82 -0
  44. package/src/server/mcp-diagnostics.ts +13 -4
  45. package/src/server.ts +9 -6
@@ -142,17 +142,21 @@ const i18n = {
142
142
  noRetentionDesc: 'Store observations to see memory retention scores',
143
143
 
144
144
  // Team -> Coordination
145
- teamTitle: 'Coordination',
146
- teamSubtitle: 'Coordinated agents, tasks, locks, and handoffs',
147
- teamNoData: 'No coordination workflow activity yet',
148
- teamNoDataHint: 'Use the CLI orchestrator or inspect coordination state.',
145
+ teamTitle: 'Coordination Status',
146
+ teamSubtitle: 'Read-only project coordination status',
147
+ teamNoData: 'No coordination status is available',
148
+ teamNoDataHint: 'Coordination state is read-only and comes from the project SQLite store.',
149
+ teamStatusError: 'Coordination status unavailable',
150
+ teamStatusDegraded: 'Coordination status degraded',
151
+ teamStatusErrorDesc: 'The persistent coordination state could not be read. This view has no write actions.',
152
+ teamStatusDegradedDesc: 'Some persistent coordination state could not be read. Values may be incomplete.',
149
153
  teamActiveAgents: 'Active Agents',
150
154
  teamLockedFiles: 'Locked Files',
151
155
  teamTasks: 'Tasks',
152
156
  teamAvailable: 'Available',
153
157
  teamAgents: 'Agents',
154
158
  teamLocks: 'File Locks',
155
- teamTaskBoard: 'Task Board',
159
+ teamTaskStatus: 'Task Status',
156
160
  // Resume area
157
161
  resumeTitle: 'Continue This Project',
158
162
  resumeDesc: 'What needs attention right now',
@@ -282,7 +286,7 @@ const i18n = {
282
286
  projectUnresolved: 'Unresolved',
283
287
  projectUnresolvedDesc: 'No project bound — select a project from the switcher',
284
288
  projectResolved: 'Resolved',
285
- projectScopeProject: 'Project Coordination',
289
+ projectScopeProject: 'Project Coordination Status',
286
290
  projectScopeGlobal: 'All Projects',
287
291
  projectScopeProjectDesc: 'Agents and tasks coordinated for this project',
288
292
  projectScopeGlobalDesc: 'Agents and tasks coordinated across projects',
@@ -469,8 +473,8 @@ const i18n = {
469
473
  // Mode banner
470
474
  modeStandalone: 'Standalone',
471
475
  modeControlPlane: 'Control Plane',
472
- modeStandaloneHint: 'Standalone dashboard - memory and read-only coordination state',
473
- modeControlPlaneHint: 'HTTP control plane - shared MCP access and live dashboard',
476
+ modeStandaloneHint: 'Standalone dashboard - memory and read-only coordination status',
477
+ modeControlPlaneHint: 'HTTP control plane - shared MCP access and read-only coordination status',
474
478
  modeBannerProject: 'Project',
475
479
  modeBannerMcp: 'MCP',
476
480
 
@@ -621,17 +625,21 @@ const i18n = {
621
625
  noRetentionDesc: '存储观察记录以查看记忆衰减分数',
622
626
 
623
627
  // Team -> 编排协作
624
- teamTitle: '编排协作',
625
- teamSubtitle: 'agents、任务、文件锁和交接状态',
626
- teamNoData: '暂无编排协作活动',
627
- teamNoDataHint: '使用 CLI 编排任务,或查看协调状态。',
628
+ teamTitle: '协作状态',
629
+ teamSubtitle: '只读项目协作状态',
630
+ teamNoData: '暂无可用的协作状态',
631
+ teamNoDataHint: '协作状态为只读,并来自项目 SQLite 存储。',
632
+ teamStatusError: '协作状态不可用',
633
+ teamStatusDegraded: '协作状态已降级',
634
+ teamStatusErrorDesc: '无法读取持久协作状态。此视图不提供写入操作。',
635
+ teamStatusDegradedDesc: '部分持久协作状态无法读取,当前数据可能不完整。',
628
636
  teamActiveAgents: '活跃 Agent',
629
637
  teamLockedFiles: '锁定文件',
630
638
  teamTasks: '任务',
631
639
  teamAvailable: '可领取',
632
640
  teamAgents: 'Agent',
633
641
  teamLocks: '文件锁',
634
- teamTaskBoard: '任务看板',
642
+ teamTaskStatus: '任务状态',
635
643
  // Resume area
636
644
  resumeTitle: '继续这个项目',
637
645
  resumeDesc: '当前需要关注的事项',
@@ -761,7 +769,7 @@ const i18n = {
761
769
  projectUnresolved: '未绑定',
762
770
  projectUnresolvedDesc: '无项目绑定 — 请从切换器选择项目',
763
771
  projectResolved: '已绑定',
764
- projectScopeProject: '项目编排协作',
772
+ projectScopeProject: '项目协作状态',
765
773
  projectScopeGlobal: '所有项目',
766
774
  projectScopeProjectDesc: '当前项目中的 agents 和任务',
767
775
  projectScopeGlobalDesc: '所有项目中的 agents 和任务',
@@ -953,8 +961,8 @@ const i18n = {
953
961
  // Mode banner
954
962
  modeStandalone: '独立模式',
955
963
  modeControlPlane: '控制平面',
956
- modeStandaloneHint: '独立看板 - 记忆与只读协调状态',
957
- modeControlPlaneHint: 'HTTP 控制平面 - 共享 MCP 接入与实时看板',
964
+ modeStandaloneHint: '独立视图 - 记忆与只读协作状态',
965
+ modeControlPlaneHint: 'HTTP 控制平面 - 共享 MCP 接入与只读协作状态',
958
966
  modeBannerProject: '项目',
959
967
  modeBannerMcp: 'MCP',
960
968
 
@@ -1157,8 +1165,12 @@ async function api(endpoint) {
1157
1165
  ? `/api/${endpoint}${sep}project=${encodeURIComponent(selectedProject)}`
1158
1166
  : `/api/${endpoint}`;
1159
1167
  const res = await fetch(url);
1160
- if (!res.ok) throw new Error(`HTTP ${res.status}`);
1161
- return await res.json();
1168
+ const payload = await res.json().catch(() => null);
1169
+ if (!res.ok) {
1170
+ if (endpoint.startsWith('team') && payload?.status) return payload;
1171
+ throw new Error(`HTTP ${res.status}`);
1172
+ }
1173
+ return payload;
1162
1174
  } catch (err) {
1163
1175
  console.error(`API error (${endpoint}):`, err);
1164
1176
  return null;
@@ -4492,7 +4504,10 @@ async function loadTeam() {
4492
4504
  }
4493
4505
 
4494
4506
  const data = await api('team?scope=' + teamScope);
4495
- if (!data || data.unavailable) {
4507
+ if (!data || data.unavailable || data.status === 'error' || data.status === 'degraded') {
4508
+ const isDegraded = data?.status === 'degraded';
4509
+ const statusTitle = isDegraded ? t('teamStatusDegraded') : (data?.status === 'error' ? t('teamStatusError') : t('teamNoData'));
4510
+ const statusDescription = isDegraded ? t('teamStatusDegradedDesc') : (data?.status === 'error' ? t('teamStatusErrorDesc') : t('teamNoDataHint'));
4496
4511
  container.innerHTML = `
4497
4512
  <div class="page-header">
4498
4513
  <h1 class="page-title">${t('teamTitle')}</h1>
@@ -4501,10 +4516,9 @@ async function loadTeam() {
4501
4516
  <div class="panel">
4502
4517
  <div class="panel-body" style="text-align:center;padding:48px;">
4503
4518
  <div style="font-size:36px;margin-bottom:12px;"><span class="iconify" data-icon="lucide:users" style="font-size:36px;"></span></div>
4504
- <div style="font-size:16px;font-weight:600;color:var(--text-primary);margin-bottom:8px;">${t('teamNoData')}</div>
4519
+ <div style="font-size:16px;font-weight:600;color:var(--text-primary);margin-bottom:8px;">${statusTitle}</div>
4505
4520
  <div style="font-size:13px;color:var(--text-muted);max-width:480px;margin:0 auto;line-height:1.6;">
4506
- ${t('teamNoDataHint')}<br>
4507
- <code style="background:var(--bg-surface);padding:4px 10px;border-radius:6px;margin-top:8px;display:inline-block;font-size:12px;">memorix orchestrate · memorix team status · memorix task list</code>
4521
+ ${statusDescription}<br>
4508
4522
  </div>
4509
4523
  </div>
4510
4524
  </div>
@@ -4763,7 +4777,7 @@ async function loadTeam() {
4763
4777
 
4764
4778
  <div class="panel">
4765
4779
  <div class="panel-header">
4766
- <span class="panel-title">${t('teamTaskBoard')}</span>
4780
+ <span class="panel-title">${t('teamTaskStatus')}</span>
4767
4781
  <span class="team-panel-count">${data.availableTasks || 0} ${t('teamAvailableToClaim')}</span>
4768
4782
  </div>
4769
4783
  <div class="panel-body">
@@ -135,7 +135,7 @@
135
135
  </svg>
136
136
  <span class="nav-label">Sessions</span>
137
137
  </button>
138
- <button class="nav-btn" data-page="team" title="Coordination" aria-label="Coordination">
138
+ <button class="nav-btn" data-page="team" title="Coordination Status" aria-label="Coordination Status">
139
139
  <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
140
140
  <path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/>
141
141
  <circle cx="9" cy="7" r="4"/>
package/dist/index.d.ts CHANGED
@@ -479,7 +479,7 @@ type ToolProfile = 'micro' | 'lite' | 'team' | 'full';
479
479
  * Create and configure the Memorix MCP Server.
480
480
  */
481
481
  /** Optional shared TeamStore — passed by serve-http so all sessions share state */
482
- interface SharedTeamInstances {
482
+ interface SharedTeamStore {
483
483
  teamStore: TeamStore;
484
484
  }
485
485
  interface CreateMemorixServerOptions {
@@ -500,7 +500,7 @@ interface CreateMemorixServerOptions {
500
500
  */
501
501
  projectBinding?: ProjectBindingController;
502
502
  }
503
- declare function createMemorixServer(cwd?: string, existingServer?: McpServer, sharedTeam?: SharedTeamInstances, options?: CreateMemorixServerOptions): Promise<{
503
+ declare function createMemorixServer(cwd?: string, existingServer?: McpServer, sharedTeam?: SharedTeamStore, options?: CreateMemorixServerOptions): Promise<{
504
504
  server: McpServer;
505
505
  graphManager: KnowledgeGraphManager;
506
506
  projectId: string;