@unson/brainbase-mcp 0.22.1 → 0.22.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unson/brainbase-mcp",
3
- "version": "0.22.1",
3
+ "version": "0.22.2",
4
4
  "description": "Local-first Brainbase judgment OS that lets supported AI agents reuse a user's approved goals, priorities, decisions, and judgment criteria.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -407,5 +407,5 @@
407
407
  "engines": {
408
408
  "node": ">=20"
409
409
  },
410
- "gitHead": "8ce6f52ff6e5650f7f26f913de3888b8906cff81"
410
+ "gitHead": "3a54233ed19d3ddae6b1f346955fecb878af962e"
411
411
  }
@@ -1761,7 +1761,8 @@ export function createWorldView({ root, rail, page, document: explicitDocument,
1761
1761
  const onVisible = () => {
1762
1762
  if (doc.visibilityState === 'visible') void recheckDistrict();
1763
1763
  };
1764
- doc.addEventListener('visibilitychange', onVisible);
1764
+ // Hosts may hand in a document without events (tests, server rendering); the recheck is then off.
1765
+ doc.addEventListener?.('visibilitychange', onVisible);
1765
1766
 
1766
1767
  // --- inside a district (AC-11): the world rests behind it while it is open ---------------------
1767
1768
  let district = null;
@@ -2177,7 +2178,7 @@ export function createWorldView({ root, rail, page, document: explicitDocument,
2177
2178
  void load();
2178
2179
  return {
2179
2180
  dispose() {
2180
- doc.removeEventListener('visibilitychange', onVisible);
2181
+ doc.removeEventListener?.('visibilitychange', onVisible);
2181
2182
  scene?.dispose();
2182
2183
  },
2183
2184
  };