memorix 1.6.2 → 1.7.0

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 (46) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/dist/cli/index.js +2042 -1430
  3. package/dist/cli/memcode.js +0 -0
  4. package/dist/dashboard/static/app.js +293 -33
  5. package/dist/dashboard/static/index.html +17 -0
  6. package/dist/dashboard/static/style.css +310 -0
  7. package/dist/index.js +1669 -970
  8. package/dist/maintenance-runner.js +1061 -1017
  9. package/dist/media-audio-runner.js +1052 -1009
  10. package/dist/media-video-runner.js +1052 -1009
  11. package/dist/memcode-runtime/CHANGELOG.md +34 -0
  12. package/dist/sdk.js +2293 -1684
  13. package/dist/vector-backfill-runner.js +1050 -1007
  14. package/docs/ARCHITECTURE.md +3 -0
  15. package/docs/DASHBOARD.md +54 -0
  16. package/docs/README.md +2 -0
  17. package/package.json +1 -1
  18. package/plugins/claude/memorix/.claude-plugin/plugin.json +1 -1
  19. package/plugins/codebuddy/memorix/.codebuddy-plugin/plugin.json +1 -1
  20. package/plugins/codex/memorix/.codex-plugin/plugin.json +1 -1
  21. package/plugins/copilot/memorix/plugin.json +1 -1
  22. package/plugins/gemini/memorix/gemini-extension.json +1 -1
  23. package/plugins/omp/memorix/package.json +1 -1
  24. package/plugins/openclaw/memorix/.codex-plugin/plugin.json +1 -1
  25. package/plugins/pi/memorix/package.json +1 -1
  26. package/server.json +2 -2
  27. package/src/cli/commands/background.ts +17 -3
  28. package/src/cli/commands/cleanup.ts +13 -114
  29. package/src/cli/commands/memory.ts +12 -43
  30. package/src/cli/commands/operator-shared.ts +12 -8
  31. package/src/cli/commands/serve-http.ts +25 -7
  32. package/src/cli/commands/serve-shared.ts +49 -6
  33. package/src/cli/commands/serve.ts +4 -0
  34. package/src/dashboard/maintenance.ts +303 -0
  35. package/src/dashboard/server.ts +100 -2
  36. package/src/dashboard/static/index.html +17 -0
  37. package/src/dashboard/static/style.css +310 -0
  38. package/src/memory/cleanup.ts +143 -0
  39. package/src/memory/deduplication.ts +178 -0
  40. package/src/memory/session.ts +13 -3
  41. package/src/project/launch-root.ts +115 -0
  42. package/src/runtime/isolated-maintenance.ts +12 -1
  43. package/src/server.ts +50 -51
  44. package/src/store/obs-store.ts +2 -2
  45. package/src/store/sqlite-db.ts +2 -0
  46. package/src/store/sqlite-store.ts +19 -4
@@ -2148,6 +2148,316 @@ body {
2148
2148
  color: var(--text-primary);
2149
2149
  }
2150
2150
 
2151
+ /* Maintenance workbench */
2152
+ .maintenance-strip {
2153
+ display: flex;
2154
+ align-items: center;
2155
+ justify-content: space-between;
2156
+ gap: 16px;
2157
+ padding: 12px 0;
2158
+ margin-bottom: 14px;
2159
+ border-top: 1px solid var(--border-subtle);
2160
+ border-bottom: 1px solid var(--border-subtle);
2161
+ }
2162
+
2163
+ .maintenance-strip-heading {
2164
+ display: flex;
2165
+ flex-direction: column;
2166
+ gap: 2px;
2167
+ min-width: 0;
2168
+ font-size: 13px;
2169
+ font-weight: 600;
2170
+ color: var(--text-primary);
2171
+ }
2172
+
2173
+ .maintenance-strip-heading small {
2174
+ font-size: 11px;
2175
+ font-weight: 400;
2176
+ color: var(--text-muted);
2177
+ }
2178
+
2179
+ .maintenance-actions {
2180
+ display: flex;
2181
+ flex-wrap: wrap;
2182
+ justify-content: flex-end;
2183
+ gap: 8px;
2184
+ }
2185
+
2186
+ .maintenance-actions button,
2187
+ .maintenance-primary,
2188
+ .maintenance-secondary {
2189
+ display: inline-flex;
2190
+ align-items: center;
2191
+ justify-content: center;
2192
+ gap: 7px;
2193
+ min-height: 36px;
2194
+ padding: 8px 12px;
2195
+ border: 1px solid var(--border-medium);
2196
+ border-radius: var(--radius-sm);
2197
+ background: transparent;
2198
+ color: var(--text-secondary);
2199
+ font: 500 12px var(--font-sans);
2200
+ cursor: pointer;
2201
+ transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
2202
+ }
2203
+
2204
+ .maintenance-actions button:hover,
2205
+ .maintenance-secondary:hover {
2206
+ background: var(--bg-card-hover);
2207
+ border-color: var(--text-muted);
2208
+ color: var(--text-primary);
2209
+ }
2210
+
2211
+ .maintenance-dialog {
2212
+ width: min(680px, calc(100vw - 32px));
2213
+ max-height: min(760px, calc(100dvh - 32px));
2214
+ padding: 0;
2215
+ border: 1px solid var(--border-medium);
2216
+ border-radius: var(--radius-md);
2217
+ background: var(--bg-surface);
2218
+ color: var(--text-primary);
2219
+ box-shadow: var(--elevation-3);
2220
+ overflow: hidden;
2221
+ }
2222
+
2223
+ .maintenance-dialog::backdrop {
2224
+ background: rgba(5, 5, 12, 0.72);
2225
+ backdrop-filter: blur(3px);
2226
+ }
2227
+
2228
+ .maintenance-dialog-shell {
2229
+ display: grid;
2230
+ grid-template-rows: auto minmax(0, 1fr) auto;
2231
+ max-height: min(760px, calc(100dvh - 32px));
2232
+ }
2233
+
2234
+ .maintenance-dialog-header,
2235
+ .maintenance-dialog-footer {
2236
+ display: flex;
2237
+ align-items: center;
2238
+ justify-content: space-between;
2239
+ gap: 12px;
2240
+ padding: 16px 18px;
2241
+ border-bottom: 1px solid var(--border-subtle);
2242
+ }
2243
+
2244
+ .maintenance-dialog-footer {
2245
+ justify-content: flex-end;
2246
+ border-top: 1px solid var(--border-subtle);
2247
+ border-bottom: 0;
2248
+ }
2249
+
2250
+ .maintenance-dialog-kicker {
2251
+ margin-bottom: 3px;
2252
+ font: 500 10px var(--font-mono);
2253
+ color: var(--text-muted);
2254
+ text-transform: uppercase;
2255
+ }
2256
+
2257
+ .maintenance-dialog-header h2 {
2258
+ font-size: 17px;
2259
+ line-height: 1.3;
2260
+ }
2261
+
2262
+ .maintenance-dialog-close {
2263
+ width: 34px;
2264
+ height: 34px;
2265
+ flex: 0 0 34px;
2266
+ }
2267
+
2268
+ .maintenance-dialog-body {
2269
+ min-height: 180px;
2270
+ overflow: auto;
2271
+ padding: 18px;
2272
+ }
2273
+
2274
+ .maintenance-summary {
2275
+ display: grid;
2276
+ grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
2277
+ border-top: 1px solid var(--border-subtle);
2278
+ border-bottom: 1px solid var(--border-subtle);
2279
+ margin-bottom: 16px;
2280
+ }
2281
+
2282
+ .maintenance-metric {
2283
+ display: flex;
2284
+ flex-direction: column;
2285
+ gap: 5px;
2286
+ min-width: 0;
2287
+ padding: 12px;
2288
+ border-right: 1px solid var(--border-subtle);
2289
+ }
2290
+
2291
+ .maintenance-metric:last-child {
2292
+ border-right: 0;
2293
+ }
2294
+
2295
+ .maintenance-metric span {
2296
+ font-size: 10px;
2297
+ color: var(--text-muted);
2298
+ }
2299
+
2300
+ .maintenance-metric strong {
2301
+ font: 600 19px var(--font-mono);
2302
+ color: var(--text-primary);
2303
+ }
2304
+
2305
+ .maintenance-records,
2306
+ .maintenance-group {
2307
+ display: flex;
2308
+ flex-direction: column;
2309
+ }
2310
+
2311
+ .maintenance-group {
2312
+ margin-bottom: 12px;
2313
+ border-top: 1px solid var(--border-subtle);
2314
+ }
2315
+
2316
+ .maintenance-group-title {
2317
+ padding: 10px 8px 6px;
2318
+ font-size: 11px;
2319
+ color: var(--text-secondary);
2320
+ }
2321
+
2322
+ .maintenance-record {
2323
+ display: grid;
2324
+ grid-template-columns: 52px minmax(0, 1fr) minmax(80px, auto);
2325
+ align-items: center;
2326
+ gap: 10px;
2327
+ min-height: 42px;
2328
+ padding: 8px;
2329
+ border-bottom: 1px solid var(--border-subtle);
2330
+ font-size: 12px;
2331
+ }
2332
+
2333
+ .maintenance-record-id,
2334
+ .maintenance-record-meta {
2335
+ font-family: var(--font-mono);
2336
+ color: var(--text-muted);
2337
+ }
2338
+
2339
+ .maintenance-record-title,
2340
+ .maintenance-record-meta {
2341
+ min-width: 0;
2342
+ overflow: hidden;
2343
+ text-overflow: ellipsis;
2344
+ white-space: nowrap;
2345
+ }
2346
+
2347
+ .maintenance-record-meta {
2348
+ text-align: right;
2349
+ font-size: 10px;
2350
+ }
2351
+
2352
+ .maintenance-toggle {
2353
+ display: flex;
2354
+ align-items: center;
2355
+ gap: 9px;
2356
+ margin-bottom: 14px;
2357
+ font-size: 12px;
2358
+ color: var(--text-secondary);
2359
+ cursor: pointer;
2360
+ }
2361
+
2362
+ .maintenance-toggle input {
2363
+ width: 16px;
2364
+ height: 16px;
2365
+ accent-color: var(--accent-purple);
2366
+ }
2367
+
2368
+ .maintenance-empty {
2369
+ display: flex;
2370
+ flex-direction: column;
2371
+ align-items: center;
2372
+ justify-content: center;
2373
+ gap: 8px;
2374
+ min-height: 130px;
2375
+ color: var(--text-muted);
2376
+ text-align: center;
2377
+ }
2378
+
2379
+ .maintenance-primary {
2380
+ border-color: var(--accent-purple);
2381
+ background: var(--accent-purple);
2382
+ color: var(--bg-base);
2383
+ }
2384
+
2385
+ .maintenance-primary:hover:not(:disabled) {
2386
+ filter: brightness(1.08);
2387
+ }
2388
+
2389
+ .maintenance-primary:disabled,
2390
+ .export-btn:disabled {
2391
+ opacity: 0.45;
2392
+ cursor: not-allowed;
2393
+ }
2394
+
2395
+ .dashboard-toast {
2396
+ position: fixed;
2397
+ right: 20px;
2398
+ bottom: 20px;
2399
+ z-index: 1200;
2400
+ max-width: min(420px, calc(100vw - 40px));
2401
+ padding: 11px 14px;
2402
+ border: 1px solid var(--accent-green);
2403
+ border-radius: var(--radius-sm);
2404
+ background: var(--bg-card);
2405
+ color: var(--text-primary);
2406
+ box-shadow: var(--elevation-2);
2407
+ font-size: 12px;
2408
+ opacity: 0;
2409
+ transform: translateY(10px);
2410
+ pointer-events: none;
2411
+ transition: opacity var(--transition-fast), transform var(--transition-fast);
2412
+ }
2413
+
2414
+ .dashboard-toast[data-tone="error"] {
2415
+ border-color: var(--accent-red);
2416
+ }
2417
+
2418
+ .dashboard-toast.visible {
2419
+ opacity: 1;
2420
+ transform: translateY(0);
2421
+ }
2422
+
2423
+ .page-header-actions {
2424
+ display: flex;
2425
+ align-items: center;
2426
+ justify-content: space-between;
2427
+ gap: 16px;
2428
+ }
2429
+
2430
+ @media (max-width: 720px) {
2431
+ .maintenance-strip,
2432
+ .page-header-actions {
2433
+ align-items: stretch;
2434
+ flex-direction: column;
2435
+ }
2436
+
2437
+ .maintenance-actions {
2438
+ display: grid;
2439
+ grid-template-columns: repeat(3, minmax(0, 1fr));
2440
+ }
2441
+
2442
+ .maintenance-actions button {
2443
+ min-width: 0;
2444
+ padding-inline: 8px;
2445
+ }
2446
+
2447
+ .maintenance-record {
2448
+ grid-template-columns: 44px minmax(0, 1fr);
2449
+ }
2450
+
2451
+ .maintenance-record-meta {
2452
+ grid-column: 2;
2453
+ text-align: left;
2454
+ }
2455
+
2456
+ .maintenance-dialog-body {
2457
+ padding: 14px;
2458
+ }
2459
+ }
2460
+
2151
2461
  /* Low quality indicator */
2152
2462
  .obs-card.low-quality {
2153
2463
  border-left: 3px solid var(--accent-amber);