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/cli/index.js
CHANGED
|
@@ -3062,6 +3062,31 @@ async function createMemorixServer(cwd) {
|
|
|
3062
3062
|
}
|
|
3063
3063
|
} catch {
|
|
3064
3064
|
}
|
|
3065
|
+
let syncAdvisoryShown = false;
|
|
3066
|
+
let syncAdvisory = null;
|
|
3067
|
+
try {
|
|
3068
|
+
const engine = new WorkspaceSyncEngine(project.rootPath);
|
|
3069
|
+
const scan = await engine.scan();
|
|
3070
|
+
const lines = [];
|
|
3071
|
+
const totalMCP = Object.values(scan.mcpConfigs).reduce((sum, arr) => sum + arr.length, 0);
|
|
3072
|
+
const totalSkills = scan.skills.length;
|
|
3073
|
+
const totalRules = scan.rulesCount;
|
|
3074
|
+
const totalWorkflows = scan.workflows.length;
|
|
3075
|
+
if (totalMCP > 0 || totalSkills > 0 || totalRules > 0 || totalWorkflows > 0) {
|
|
3076
|
+
lines.push("", "---", "\u{1F504} **Cross-Agent Sync Available**");
|
|
3077
|
+
if (totalMCP > 0) lines.push(`- **${totalMCP} MCP server(s)** found across agents`);
|
|
3078
|
+
if (totalSkills > 0) lines.push(`- **${totalSkills} skill(s)** found across agents`);
|
|
3079
|
+
if (scan.skillConflicts.length > 0) lines.push(` \u26A0\uFE0F ${scan.skillConflicts.length} name conflict(s)`);
|
|
3080
|
+
if (totalRules > 0) lines.push(`- **${totalRules} rule(s)** found`);
|
|
3081
|
+
if (totalWorkflows > 0) lines.push(`- **${totalWorkflows} workflow(s)** found`);
|
|
3082
|
+
lines.push("");
|
|
3083
|
+
lines.push('Ask the user: "I found configs from other agents. Want me to sync them here?"');
|
|
3084
|
+
lines.push('Use `memorix_workspace_sync action="apply" target="<agent>"` to sync.');
|
|
3085
|
+
syncAdvisory = lines.join("\n");
|
|
3086
|
+
}
|
|
3087
|
+
console.error(`[memorix] Sync advisory: ${syncAdvisory ? "available" : "nothing to sync"}`);
|
|
3088
|
+
} catch {
|
|
3089
|
+
}
|
|
3065
3090
|
const observationsFile = projectDir2 + "/observations.json";
|
|
3066
3091
|
let reloadDebounce = null;
|
|
3067
3092
|
try {
|
|
@@ -3160,11 +3185,16 @@ Entity: ${entityName} | Type: ${type} | Project: ${project.id}${enrichment}`
|
|
|
3160
3185
|
type,
|
|
3161
3186
|
maxTokens
|
|
3162
3187
|
});
|
|
3188
|
+
let text = result.formatted;
|
|
3189
|
+
if (!syncAdvisoryShown && syncAdvisory) {
|
|
3190
|
+
text += syncAdvisory;
|
|
3191
|
+
syncAdvisoryShown = true;
|
|
3192
|
+
}
|
|
3163
3193
|
return {
|
|
3164
3194
|
content: [
|
|
3165
3195
|
{
|
|
3166
3196
|
type: "text",
|
|
3167
|
-
text
|
|
3197
|
+
text
|
|
3168
3198
|
}
|
|
3169
3199
|
]
|
|
3170
3200
|
};
|