agent-knowledge 1.3.12 → 1.3.13

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.
@@ -2,7 +2,7 @@
2
2
  "id": "agent-knowledge",
3
3
  "name": "Knowledge",
4
4
  "icon": "psychology",
5
- "version": "1.3.9",
5
+ "version": "1.3.13",
6
6
  "description": "Knowledge base — entries, sessions, search, graph relationships",
7
7
  "ui": "./dist/ui/app.js",
8
8
  "css": "./dist/ui/styles.css",
package/dist/ui/app.js CHANGED
@@ -210,7 +210,7 @@
210
210
  function switchTab(name, updateHash = true) {
211
211
  if (state.activeTab === name) return;
212
212
  state.activeTab = name;
213
- if (updateHash) location.hash = '#' + name;
213
+ if (updateHash && K._root === document) location.hash = '#' + name;
214
214
 
215
215
  Object.keys(el.tabs).forEach((k) => {
216
216
  const active = k === name;
@@ -494,18 +494,20 @@
494
494
  K.initSessionScroll(state, el);
495
495
  wsConnect();
496
496
 
497
- // Restore tab from URL hash
498
- const hash = location.hash.replace('#', '');
499
- const validTabs = Object.keys(el.tabs);
500
- if (hash && validTabs.includes(hash)) {
501
- switchTab(hash, false);
502
- }
497
+ // Restore tab from URL hash (standalone mode only)
498
+ if (K._root === document) {
499
+ const hash = location.hash.replace('#', '');
500
+ const validTabs = Object.keys(el.tabs);
501
+ if (hash && validTabs.includes(hash)) {
502
+ switchTab(hash, false);
503
+ }
503
504
 
504
- // Listen for back/forward navigation
505
- window.addEventListener('hashchange', () => {
506
- const h = location.hash.replace('#', '');
507
- if (h && validTabs.includes(h)) switchTab(h, false);
508
- });
505
+ // Listen for back/forward navigation
506
+ window.addEventListener('hashchange', () => {
507
+ const h = location.hash.replace('#', '');
508
+ if (h && validTabs.includes(h)) switchTab(h, false);
509
+ });
510
+ }
509
511
 
510
512
  // Load initial data in parallel
511
513
  try {
@@ -517,7 +519,7 @@
517
519
  // Hide loading overlay after a short delay if ws hasn't connected
518
520
  setTimeout(() => {
519
521
  el.loadingOverlay.classList.add('hidden');
520
- }, 5000);
522
+ }, 2000);
521
523
  }
522
524
 
523
525
  // ── Plugin mount / unmount ─────────────────────────────────────────────────
@@ -28,9 +28,10 @@
28
28
  function closePanel() {
29
29
  const state = K._state;
30
30
  const el = K._el;
31
+ if (!el || !el.sidePanel) return;
31
32
  state.panel = { open: false, type: null, data: null };
32
33
  el.sidePanel.classList.remove('open');
33
- el.contentWrapper.classList.remove('panel-visible');
34
+ if (el.contentWrapper) el.contentWrapper.classList.remove('panel-visible');
34
35
  el.sidePanel.addEventListener(
35
36
  'transitionend',
36
37
  function handler() {
@@ -127,10 +127,13 @@
127
127
  t.innerHTML = `<span class="material-symbols-outlined toast-icon">${icons[type] || 'info'}</span>
128
128
  <span class="toast-msg">${esc(msg)}</span>`;
129
129
  container.appendChild(t);
130
- requestAnimationFrame(() => t.classList.add('show'));
131
130
  setTimeout(() => {
132
- t.classList.remove('show');
133
- t.addEventListener('transitionend', () => t.remove());
131
+ t.classList.add('fade-out');
132
+ t.addEventListener('animationend', () => t.remove());
133
+ // Fallback removal if animationend doesn't fire
134
+ setTimeout(() => {
135
+ if (t.parentNode) t.remove();
136
+ }, 500);
134
137
  }, duration);
135
138
  }
136
139
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-knowledge",
3
- "version": "1.3.12",
3
+ "version": "1.3.13",
4
4
  "description": "Cross-session memory and recall for AI agents — git-synced knowledge base, knowledge graph, confidence scoring, hybrid semantic+TF-IDF search, auto-distillation with secrets scrubbing",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",