memorix 0.3.2 → 0.3.3
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/dist/cli/index.js +31 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/index.js +31 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2888,6 +2888,31 @@ async function createMemorixServer(cwd) {
|
|
|
2888
2888
|
}
|
|
2889
2889
|
} catch {
|
|
2890
2890
|
}
|
|
2891
|
+
let syncAdvisoryShown = false;
|
|
2892
|
+
let syncAdvisory = null;
|
|
2893
|
+
try {
|
|
2894
|
+
const engine = new WorkspaceSyncEngine(project.rootPath);
|
|
2895
|
+
const scan = await engine.scan();
|
|
2896
|
+
const lines = [];
|
|
2897
|
+
const totalMCP = Object.values(scan.mcpConfigs).reduce((sum, arr) => sum + arr.length, 0);
|
|
2898
|
+
const totalSkills = scan.skills.length;
|
|
2899
|
+
const totalRules = scan.rulesCount;
|
|
2900
|
+
const totalWorkflows = scan.workflows.length;
|
|
2901
|
+
if (totalMCP > 0 || totalSkills > 0 || totalRules > 0 || totalWorkflows > 0) {
|
|
2902
|
+
lines.push("", "---", "\u{1F504} **Cross-Agent Sync Available**");
|
|
2903
|
+
if (totalMCP > 0) lines.push(`- **${totalMCP} MCP server(s)** found across agents`);
|
|
2904
|
+
if (totalSkills > 0) lines.push(`- **${totalSkills} skill(s)** found across agents`);
|
|
2905
|
+
if (scan.skillConflicts.length > 0) lines.push(` \u26A0\uFE0F ${scan.skillConflicts.length} name conflict(s)`);
|
|
2906
|
+
if (totalRules > 0) lines.push(`- **${totalRules} rule(s)** found`);
|
|
2907
|
+
if (totalWorkflows > 0) lines.push(`- **${totalWorkflows} workflow(s)** found`);
|
|
2908
|
+
lines.push("");
|
|
2909
|
+
lines.push('Ask the user: "I found configs from other agents. Want me to sync them here?"');
|
|
2910
|
+
lines.push('Use `memorix_workspace_sync action="apply" target="<agent>"` to sync.');
|
|
2911
|
+
syncAdvisory = lines.join("\n");
|
|
2912
|
+
}
|
|
2913
|
+
console.error(`[memorix] Sync advisory: ${syncAdvisory ? "available" : "nothing to sync"}`);
|
|
2914
|
+
} catch {
|
|
2915
|
+
}
|
|
2891
2916
|
const observationsFile = projectDir2 + "/observations.json";
|
|
2892
2917
|
let reloadDebounce = null;
|
|
2893
2918
|
try {
|
|
@@ -2986,11 +3011,16 @@ Entity: ${entityName} | Type: ${type} | Project: ${project.id}${enrichment}`
|
|
|
2986
3011
|
type,
|
|
2987
3012
|
maxTokens
|
|
2988
3013
|
});
|
|
3014
|
+
let text = result.formatted;
|
|
3015
|
+
if (!syncAdvisoryShown && syncAdvisory) {
|
|
3016
|
+
text += syncAdvisory;
|
|
3017
|
+
syncAdvisoryShown = true;
|
|
3018
|
+
}
|
|
2989
3019
|
return {
|
|
2990
3020
|
content: [
|
|
2991
3021
|
{
|
|
2992
3022
|
type: "text",
|
|
2993
|
-
text
|
|
3023
|
+
text
|
|
2994
3024
|
}
|
|
2995
3025
|
]
|
|
2996
3026
|
};
|