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.
- package/CHANGELOG.md +16 -0
- package/README.md +2 -2
- package/dist/cli/index.js +19505 -19136
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/memcode.js +0 -0
- package/dist/index.js +7849 -7628
- package/dist/index.js.map +1 -1
- package/dist/maintenance-jobs-o1rYSFcM.d.ts +36 -0
- package/dist/maintenance-runner.d.ts +1 -34
- package/dist/maintenance-runner.js +5892 -5692
- package/dist/maintenance-runner.js.map +1 -1
- package/dist/memcode-runtime/CHANGELOG.md +16 -0
- package/dist/sdk.js +7782 -7561
- package/dist/sdk.js.map +1 -1
- package/dist/vector-backfill-runner.d.ts +31 -0
- package/dist/vector-backfill-runner.js +12670 -0
- package/dist/vector-backfill-runner.js.map +1 -0
- package/docs/AGENT_OPERATOR_PLAYBOOK.md +2 -2
- package/docs/DEVELOPMENT.md +7 -1
- package/docs/INTEGRATIONS.md +1 -1
- package/docs/SETUP.md +6 -4
- package/docs/hooks-architecture.md +1 -1
- package/package.json +6 -2
- package/plugins/claude/memorix/.claude-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/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 +38 -0
- package/src/cli/commands/agent-integrations.ts +12 -6
- package/src/cli/commands/operator-shared.ts +4 -1
- package/src/cli/commands/serve-http.ts +44 -47
- package/src/cli/commands/setup.ts +200 -23
- package/src/dashboard/server.ts +43 -63
- package/src/memory/observations.ts +108 -79
- package/src/memory/retention.ts +106 -28
- package/src/memory/session.ts +71 -12
- package/src/runtime/vector-backfill-runner.ts +144 -0
- package/src/search/intent-detector.ts +39 -1
- 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
|
|
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
|
|
3649
|
-
'Call this at the beginning of a session to track activity
|
|
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
|
|
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] **
|
|
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
|
}
|