memorix 1.2.8 → 1.2.10

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 (42) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +2 -2
  3. package/dist/cli/index.js +19505 -19136
  4. package/dist/cli/index.js.map +1 -1
  5. package/dist/cli/memcode.js +0 -0
  6. package/dist/index.js +7849 -7628
  7. package/dist/index.js.map +1 -1
  8. package/dist/maintenance-jobs-o1rYSFcM.d.ts +36 -0
  9. package/dist/maintenance-runner.d.ts +1 -34
  10. package/dist/maintenance-runner.js +5892 -5692
  11. package/dist/maintenance-runner.js.map +1 -1
  12. package/dist/memcode-runtime/CHANGELOG.md +16 -0
  13. package/dist/sdk.js +7782 -7561
  14. package/dist/sdk.js.map +1 -1
  15. package/dist/vector-backfill-runner.d.ts +31 -0
  16. package/dist/vector-backfill-runner.js +12670 -0
  17. package/dist/vector-backfill-runner.js.map +1 -0
  18. package/docs/AGENT_OPERATOR_PLAYBOOK.md +2 -2
  19. package/docs/DEVELOPMENT.md +7 -1
  20. package/docs/INTEGRATIONS.md +1 -1
  21. package/docs/SETUP.md +6 -4
  22. package/docs/hooks-architecture.md +1 -1
  23. package/package.json +6 -2
  24. package/plugins/claude/memorix/.claude-plugin/plugin.json +1 -1
  25. package/plugins/codex/memorix/.codex-plugin/plugin.json +1 -1
  26. package/plugins/copilot/memorix/plugin.json +1 -1
  27. package/plugins/gemini/memorix/gemini-extension.json +1 -1
  28. package/plugins/omp/memorix/package.json +1 -1
  29. package/plugins/openclaw/memorix/.codex-plugin/plugin.json +1 -1
  30. package/plugins/pi/memorix/package.json +1 -1
  31. package/server.json +38 -0
  32. package/src/cli/commands/agent-integrations.ts +12 -6
  33. package/src/cli/commands/operator-shared.ts +4 -1
  34. package/src/cli/commands/serve-http.ts +44 -47
  35. package/src/cli/commands/setup.ts +200 -23
  36. package/src/dashboard/server.ts +43 -63
  37. package/src/memory/observations.ts +108 -79
  38. package/src/memory/retention.ts +106 -28
  39. package/src/memory/session.ts +71 -12
  40. package/src/runtime/vector-backfill-runner.ts +144 -0
  41. package/src/search/intent-detector.ts +39 -1
  42. package/src/server.ts +5 -5
@@ -12,7 +12,7 @@ import type { ObservationType } from '../types.js';
12
12
 
13
13
  // ─── Types ───
14
14
 
15
- export type QueryIntent = 'why' | 'when' | 'how' | 'what_changed' | 'problem' | 'general';
15
+ export type QueryIntent = 'why' | 'when' | 'how' | 'what_changed' | 'problem' | 'state' | 'general';
16
16
 
17
17
  export interface IntentResult {
18
18
  /** Detected intent category */
@@ -39,6 +39,30 @@ interface IntentPattern {
39
39
  }
40
40
 
41
41
  const INTENT_PATTERNS: IntentPattern[] = [
42
+ {
43
+ // Resumption queries — "where were we", "what's left". Weighted just above the
44
+ // others because these are asked at handoff time, when returning the current
45
+ // state matters more than returning the best semantic match.
46
+ intent: 'state',
47
+ patterns: [
48
+ /\bprogress\b/i,
49
+ /\bstatus\b/i,
50
+ /\bremaining\b/i,
51
+ /\bnext steps?\b/i,
52
+ /\bwhere (?:did|are) we\b/i,
53
+ /\bpick(?:ing)? up\b/i,
54
+ /\bresume\b/i,
55
+ /\bto-?do\b/i,
56
+ /进度/,
57
+ /做到哪/,
58
+ /下一步/,
59
+ /待办/,
60
+ /剩下/,
61
+ /继续/,
62
+ /接着做/,
63
+ ],
64
+ weight: 1.1,
65
+ },
42
66
  {
43
67
  intent: 'why',
44
68
  patterns: [
@@ -139,6 +163,12 @@ const INTENT_PATTERNS: IntentPattern[] = [
139
163
  // ─── Type Boost Maps ───
140
164
 
141
165
  const INTENT_TYPE_BOOSTS: Record<QueryIntent, Partial<Record<ObservationType, number>>> = {
166
+ state: {
167
+ 'session-request': 2.5,
168
+ 'what-changed': 2.0,
169
+ 'discovery': 1.5,
170
+ 'problem-solution': 1.2,
171
+ },
142
172
  why: {
143
173
  'decision': 3.0,
144
174
  'why-it-exists': 3.0,
@@ -198,6 +228,14 @@ const INTENT_SOURCE_BOOSTS: Partial<Record<QueryIntent, Partial<Record<'agent' |
198
228
  };
199
229
 
200
230
  const INTENT_FIELD_BOOSTS: Partial<Record<QueryIntent, Record<string, number>>> = {
231
+ state: {
232
+ title: 3, // State notes are titled by topic — the title carries the signal
233
+ entityName: 1.5,
234
+ narrative: 2,
235
+ facts: 2.5, // Progress lines usually live in facts
236
+ concepts: 1,
237
+ filesModified: 0.5,
238
+ },
201
239
  why: {
202
240
  title: 2,
203
241
  entityName: 1.5,
package/src/server.ts CHANGED
@@ -3637,7 +3637,7 @@ export async function createMemorixServer(
3637
3637
  /**
3638
3638
  * memorix_session_start — Start a new coding session
3639
3639
  *
3640
- * Creates a session record and returns context from previous sessions.
3640
+ * Creates a session record and returns a compact continuation card.
3641
3641
  * This is the entry point for session-aware memory management.
3642
3642
  */
3643
3643
  server.registerTool(
@@ -3645,10 +3645,10 @@ export async function createMemorixServer(
3645
3645
  {
3646
3646
  title: 'Start Session',
3647
3647
  description:
3648
- 'Start a new coding session. Returns context from previous sessions so you can resume work seamlessly. ' +
3649
- 'Call this at the beginning of a session to track activity and get injected context. ' +
3648
+ 'Start a new coding session. Returns a compact continuation card with the latest handoff and a few memory references. ' +
3649
+ 'Call this at the beginning of a session to track activity; retrieve a referenced memory only when it is relevant. ' +
3650
3650
  'Any previous active session for this project will be auto-closed. ' +
3651
- 'By default this is lightweight: it binds the project, opens a session, and injects context only. ' +
3651
+ 'By default this is lightweight: it binds the project, opens a session, and avoids dumping full history into the new context. ' +
3652
3652
  'Coordination identity is opt-in via `joinTeam: true` or a separate `team_manage` join call.\n\n' +
3653
3653
  'IMPORTANT for HTTP/control-plane mode: pass `projectRoot` with the absolute path to your ' +
3654
3654
  'workspace root (e.g., the directory open in your IDE). Memorix uses this to detect the git ' +
@@ -3851,7 +3851,7 @@ export async function createMemorixServer(
3851
3851
  } catch { /* mini-skills not available yet — skip */ }
3852
3852
 
3853
3853
  if (result.previousContext) {
3854
- lines.push('---', '[TASK] **Context from previous sessions:**', '', result.previousContext);
3854
+ lines.push('---', '[TASK] **Continuation card:**', '', result.previousContext);
3855
3855
  } else {
3856
3856
  lines.push('No previous session context found. This appears to be a fresh project.');
3857
3857
  }