memorix 1.5.1 → 1.6.1
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 +47 -0
- package/README.md +3 -3
- package/README.zh-CN.md +3 -3
- package/dist/cli/index.js +558 -102
- package/dist/cli/memcode.js +12 -1
- package/dist/index.js +221 -27
- package/dist/maintenance-runner.js +59 -11
- package/dist/media-audio-runner.js +59 -11
- package/dist/media-video-runner.js +59 -11
- package/dist/memcode-runtime/CHANGELOG.md +47 -0
- package/dist/sdk.js +220 -26
- package/dist/vector-backfill-runner.js +59 -11
- package/docs/1.2.4-PERSISTENT-MEMORY-DELIVERY.md +1 -1
- package/docs/AGENT_OPERATOR_PLAYBOOK.md +11 -3
- package/docs/API_REFERENCE.md +2 -2
- package/docs/DEVELOPMENT.md +5 -3
- package/docs/DOCKER.md +5 -1
- package/docs/PERFORMANCE.md +2 -2
- package/docs/README.md +3 -1
- package/docs/SETUP.md +8 -2
- package/package.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/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 +9 -3
- package/src/cli/commands/codegraph.ts +48 -5
- package/src/cli/commands/context.ts +20 -4
- package/src/cli/commands/doctor.ts +46 -15
- package/src/cli/commands/hook.ts +13 -1
- package/src/cli/commands/resume.ts +4 -0
- package/src/cli/commands/serve-http.ts +68 -7
- package/src/cli/heap.ts +76 -0
- package/src/cli/invocation.ts +7 -4
- package/src/codegraph/auto-context.ts +4 -1
- package/src/codegraph/context-pack.ts +3 -1
- package/src/codegraph/external-provider.ts +93 -0
- package/src/embedding/provider.ts +76 -6
- package/src/hooks/handler.ts +9 -18
- package/src/hooks/installers/index.ts +1 -1
- package/src/hooks/lifecycle.ts +173 -0
- package/src/hooks/official-skills.ts +3 -3
- package/src/hooks/rules/memorix-agent-rules.md +1 -1
- package/src/knowledge/context-receipt.ts +41 -0
- package/src/knowledge/workflows.ts +6 -3
- package/src/knowledge/workset.ts +56 -2
- package/src/server.ts +15 -3
package/src/server.ts
CHANGED
|
@@ -1579,13 +1579,17 @@ export async function createMemorixServer(
|
|
|
1579
1579
|
refresh: z.enum(['auto', 'always', 'never']).optional().default('auto').describe(
|
|
1580
1580
|
'Code Memory refresh policy. auto refreshes only when missing or stale.',
|
|
1581
1581
|
),
|
|
1582
|
-
format: z.enum(['prompt', 'summary', 'json']).optional().default('prompt').describe(
|
|
1583
|
-
'Output format. "prompt" is agent-ready; "summary" is human-readable; "json" is
|
|
1582
|
+
format: z.enum(['prompt', 'summary', 'json', 'receipt']).optional().default('prompt').describe(
|
|
1583
|
+
'Output format. "prompt" is agent-ready; "summary" is human-readable; "receipt" is bounded JSON; "json" is detailed diagnostics.',
|
|
1584
1584
|
),
|
|
1585
|
+
agent: z.enum([
|
|
1586
|
+
'windsurf', 'cursor', 'claude-code', 'codex', 'copilot', 'antigravity', 'gemini-cli',
|
|
1587
|
+
'openclaw', 'hermes', 'omp', 'kiro', 'opencode', 'trae',
|
|
1588
|
+
]).optional().describe('Optional target agent for compatible workflow selection.'),
|
|
1585
1589
|
limit: z.number().optional().describe('Reserved for future source limits; current prompt stays compact by default.'),
|
|
1586
1590
|
},
|
|
1587
1591
|
},
|
|
1588
|
-
async ({ task, refresh, format }) => {
|
|
1592
|
+
async ({ task, refresh, format, agent }) => {
|
|
1589
1593
|
const unresolved = requireResolvedProject('build project context for the current project');
|
|
1590
1594
|
if (unresolved) return unresolved;
|
|
1591
1595
|
|
|
@@ -1599,11 +1603,13 @@ export async function createMemorixServer(
|
|
|
1599
1603
|
{ getObservationStore },
|
|
1600
1604
|
{ MaintenanceJobStore },
|
|
1601
1605
|
{ enqueueCodegraphRefresh },
|
|
1606
|
+
{ buildBoundedContextReceipt },
|
|
1602
1607
|
] = await Promise.all([
|
|
1603
1608
|
import('./codegraph/auto-context.js'),
|
|
1604
1609
|
import('./store/obs-store.js'),
|
|
1605
1610
|
import('./runtime/maintenance-jobs.js'),
|
|
1606
1611
|
import('./runtime/lifecycle.js'),
|
|
1612
|
+
import('./knowledge/context-receipt.js'),
|
|
1607
1613
|
]);
|
|
1608
1614
|
const observations = filterReadableObservations(
|
|
1609
1615
|
await getObservationStore().loadByProject(project.id, { status: 'active' }),
|
|
@@ -1614,6 +1620,7 @@ export async function createMemorixServer(
|
|
|
1614
1620
|
dataDir: projectDir,
|
|
1615
1621
|
observations,
|
|
1616
1622
|
task,
|
|
1623
|
+
agent,
|
|
1617
1624
|
refresh: refresh ?? 'auto',
|
|
1618
1625
|
reader: getObservationReader(),
|
|
1619
1626
|
enqueueRefresh: () => {
|
|
@@ -1628,6 +1635,11 @@ export async function createMemorixServer(
|
|
|
1628
1635
|
});
|
|
1629
1636
|
const text = format === 'json'
|
|
1630
1637
|
? JSON.stringify({ ...context, brief: buildAutoProjectBrief(context) }, null, 2)
|
|
1638
|
+
: format === 'receipt'
|
|
1639
|
+
? JSON.stringify(buildBoundedContextReceipt({
|
|
1640
|
+
workset: context.workset,
|
|
1641
|
+
providerQuality: context.providerQuality,
|
|
1642
|
+
}), null, 2)
|
|
1631
1643
|
: format === 'summary'
|
|
1632
1644
|
? formatAutoProjectContextSummary(context)
|
|
1633
1645
|
: formatAutoProjectContextPrompt(context);
|