@aexol/spectral 0.4.3 → 0.4.4
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/server/pi-bridge.js +10 -4
- package/package.json +1 -1
package/dist/server/pi-bridge.js
CHANGED
|
@@ -1040,11 +1040,12 @@ function detectMemorySystem(message) {
|
|
|
1040
1040
|
return "memory_observer";
|
|
1041
1041
|
if (lower.includes("compaction") || lower.includes("compact"))
|
|
1042
1042
|
return "memory_compaction";
|
|
1043
|
-
if (lower.includes("reflection"))
|
|
1043
|
+
if (lower.includes("reflection") || lower.includes("reflect"))
|
|
1044
1044
|
return "memory_reflection";
|
|
1045
1045
|
if (lower.includes("pruner") || lower.includes("prune"))
|
|
1046
1046
|
return "memory_pruner";
|
|
1047
|
-
|
|
1047
|
+
// Keep generic observational-memory messages visible in the landing badge.
|
|
1048
|
+
return "memory_observer";
|
|
1048
1049
|
}
|
|
1049
1050
|
/**
|
|
1050
1051
|
* Create a minimal ExtensionUIContext that forwards `notify()` calls as
|
|
@@ -1061,11 +1062,16 @@ function createHeadlessUIContext(emit) {
|
|
|
1061
1062
|
get(_target, prop) {
|
|
1062
1063
|
if (prop === "notify") {
|
|
1063
1064
|
return (message, type) => {
|
|
1065
|
+
const level = type ?? "info";
|
|
1066
|
+
const system = detectMemorySystem(message);
|
|
1067
|
+
if (system?.startsWith("memory_")) {
|
|
1068
|
+
console.info(`[PiBridge][memory][${level}] ${message}`);
|
|
1069
|
+
}
|
|
1064
1070
|
emit({
|
|
1065
1071
|
type: "agent_notification",
|
|
1066
1072
|
message,
|
|
1067
|
-
level
|
|
1068
|
-
system
|
|
1073
|
+
level,
|
|
1074
|
+
system,
|
|
1069
1075
|
});
|
|
1070
1076
|
};
|
|
1071
1077
|
}
|