@jagilber-org/index-server 1.22.0 → 1.22.1

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/README.md CHANGED
@@ -26,7 +26,7 @@ Index Server is a central knowledge base that AI agents connect to via the [Mode
26
26
  ### Path A: npx (zero install)
27
27
 
28
28
  ```bash
29
- npx @jagilber-org/index-server --dashboard
29
+ npx @jagilber-org/index-server@latest --dashboard
30
30
  ```
31
31
 
32
32
  ### Path B: VS Code Extension
@@ -62,7 +62,7 @@ Add to VS Code (`.vscode/mcp.json`):
62
62
  "type": "stdio",
63
63
  "command": "npx",
64
64
  "args": [
65
- "@jagilber-org/index-server",
65
+ "@jagilber-org/index-server@latest",
66
66
  "--dashboard"
67
67
  ]
68
68
  }
@@ -78,7 +78,7 @@ Copilot CLI (`~/.copilot/mcp-config.json`):
78
78
  "index-server": {
79
79
  "type": "stdio",
80
80
  "command": "npx",
81
- "args": ["@jagilber-org/index-server", "--dashboard"],
81
+ "args": ["@jagilber-org/index-server@latest", "--dashboard"],
82
82
  "tools": ["*"]
83
83
  }
84
84
  }
@@ -93,7 +93,7 @@ Claude Desktop (`claude_desktop_config.json`):
93
93
  "index-server": {
94
94
  "type": "stdio",
95
95
  "command": "npx",
96
- "args": ["@jagilber-org/index-server", "--dashboard"],
96
+ "args": ["@jagilber-org/index-server@latest", "--dashboard"],
97
97
  "tools": ["*"]
98
98
  }
99
99
  }
@@ -1,28 +1,28 @@
1
1
  <!DOCTYPE html>
2
2
  <html lang="en">
3
3
  <head>
4
- <meta name="dashboard-build-version" content="1.22.0-e21c1bf9">
4
+ <meta name="dashboard-build-version" content="1.22.1-2d9ca384">
5
5
  <meta charset="UTF-8">
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
7
  <title>Index Server Admin</title>
8
- <link rel="stylesheet" href="css/admin.css?v=1.22.0-e21c1bf9">
9
- <script defer src="js/admin.utils.js?v=1.22.0-e21c1bf9"></script>
10
- <script defer src="js/admin.auth.js?v=1.22.0-e21c1bf9"></script>
11
- <script defer src="js/admin.overview.js?v=1.22.0-e21c1bf9"></script>
12
- <script defer src="js/admin.sessions.js?v=1.22.0-e21c1bf9"></script>
13
- <script defer src="js/admin.monitor.js?v=1.22.0-e21c1bf9"></script>
14
- <script defer src="js/admin.graph.js?v=1.22.0-e21c1bf9"></script>
8
+ <link rel="stylesheet" href="css/admin.css?v=1.22.1-2d9ca384">
9
+ <script defer src="js/admin.utils.js?v=1.22.1-2d9ca384"></script>
10
+ <script defer src="js/admin.auth.js?v=1.22.1-2d9ca384"></script>
11
+ <script defer src="js/admin.overview.js?v=1.22.1-2d9ca384"></script>
12
+ <script defer src="js/admin.sessions.js?v=1.22.1-2d9ca384"></script>
13
+ <script defer src="js/admin.monitor.js?v=1.22.1-2d9ca384"></script>
14
+ <script defer src="js/admin.graph.js?v=1.22.1-2d9ca384"></script>
15
15
  <script defer src="js/marked.umd.js"></script>
16
- <script defer src="js/admin.instructions.js?v=1.22.0-e21c1bf9"></script>
17
- <script defer src="js/admin.logs.js?v=1.22.0-e21c1bf9"></script>
18
- <script defer src="js/admin.maintenance.js?v=1.22.0-e21c1bf9"></script>
19
- <script defer src="js/admin.config.js?v=1.22.0-e21c1bf9"></script>
20
- <script defer src="js/admin.performance.js?v=1.22.0-e21c1bf9"></script>
21
- <script defer src="js/admin.instances.js?v=1.22.0-e21c1bf9"></script>
22
- <script defer src="js/admin.embeddings.js?v=1.22.0-e21c1bf9"></script>
23
- <script defer src="js/admin.messaging.js?v=1.22.0-e21c1bf9"></script>
24
- <script defer src="js/admin.sqlite.js?v=1.22.0-e21c1bf9"></script>
25
- <script defer src="js/admin.boot.js?v=1.22.0-e21c1bf9"></script>
16
+ <script defer src="js/admin.instructions.js?v=1.22.1-2d9ca384"></script>
17
+ <script defer src="js/admin.logs.js?v=1.22.1-2d9ca384"></script>
18
+ <script defer src="js/admin.maintenance.js?v=1.22.1-2d9ca384"></script>
19
+ <script defer src="js/admin.config.js?v=1.22.1-2d9ca384"></script>
20
+ <script defer src="js/admin.performance.js?v=1.22.1-2d9ca384"></script>
21
+ <script defer src="js/admin.instances.js?v=1.22.1-2d9ca384"></script>
22
+ <script defer src="js/admin.embeddings.js?v=1.22.1-2d9ca384"></script>
23
+ <script defer src="js/admin.messaging.js?v=1.22.1-2d9ca384"></script>
24
+ <script defer src="js/admin.sqlite.js?v=1.22.1-2d9ca384"></script>
25
+ <script defer src="js/admin.boot.js?v=1.22.1-2d9ca384"></script>
26
26
  </head>
27
27
  <body>
28
28
  <div class="admin-container admin-root">
@@ -40,6 +40,7 @@
40
40
  </div>
41
41
  </div>
42
42
  <div id="buildMeta" class="build-meta">Loading build metadata…</div>
43
+ <a id="feedback-btn" class="feedback-btn" href="https://github.com/jagilber-org/index-server/issues/new/choose" target="_blank" rel="noopener noreferrer" title="Send Feedback (opens GitHub Issues)">&#x1F4AC; Feedback</a>
43
44
  <div class="admin-nav">
44
45
  <!-- Added explicit data-section attributes so JS can reliably map buttons to sections after HTML refactor -->
45
46
  <!-- Redundant inline onclick fallback keeps basic navigation working even if JS wiring changes -->
@@ -790,10 +791,10 @@
790
791
  }
791
792
  }
792
793
 
793
- // Graph logic was extracted to js/admin.graph.js?v=1.22.0-e21c1bf9
794
+ // Graph logic was extracted to js/admin.graph.js?v=1.22.1-2d9ca384
794
795
  // Functions available globally: reloadGraphMermaid, initGraphScopeDefaults, copyMermaidSource, toggleGraphEdit, applyGraphEdit, cancelGraphEdit, refreshDrillCategories, loadDrillInstructions, clearSelections
795
796
 
796
- <!-- overview functions moved to js/admin.overview.js?v=1.22.0-e21c1bf9 -->
797
+ <!-- overview functions moved to js/admin.overview.js?v=1.22.1-2d9ca384 -->
797
798
 
798
799
  // Lightweight overview-level maintenance display (optional)
799
800
  // Intentionally minimal to avoid blocking overview rendering.
@@ -974,7 +975,7 @@
974
975
  }
975
976
 
976
977
  // --- Backup / Restore ---
977
- // Extracted to js/admin.maintenance.js?v=1.22.0-e21c1bf9
978
+ // Extracted to js/admin.maintenance.js?v=1.22.1-2d9ca384
978
979
 
979
980
  async function performBackup() {
980
981
  try {
@@ -1040,7 +1041,7 @@
1040
1041
  }
1041
1042
 
1042
1043
  async function loadConfiguration() {
1043
- // Primary implementation in js/admin.config.js?v=1.22.0-e21c1bf9 (loaded via defer).
1044
+ // Primary implementation in js/admin.config.js?v=1.22.1-2d9ca384 (loaded via defer).
1044
1045
  // This inline fallback only fires if the external script failed to load.
1045
1046
  if (window.__configExternalLoaded) return;
1046
1047
  try {
@@ -1098,10 +1099,10 @@
1098
1099
  return false;
1099
1100
  }
1100
1101
 
1101
- // Monitoring functions moved to js/admin.monitor.js?v=1.22.0-e21c1bf9
1102
+ // Monitoring functions moved to js/admin.monitor.js?v=1.22.1-2d9ca384
1102
1103
 
1103
1104
  // ===== Log Viewer =====
1104
- // Extracted to js/admin.logs.js?v=1.22.0-e21c1bf9
1105
+ // Extracted to js/admin.logs.js?v=1.22.1-2d9ca384
1105
1106
 
1106
1107
  // ===== Instruction Management =====
1107
1108
  let instructionEditing = null;
@@ -1592,7 +1593,7 @@
1592
1593
  setInterval(fetchResourceTrends, 10000);
1593
1594
  })();
1594
1595
 
1595
- // Instruction management logic extracted to js/admin.instructions.js?v=1.22.0-e21c1bf9
1596
+ // Instruction management logic extracted to js/admin.instructions.js?v=1.22.1-2d9ca384
1596
1597
  // Functions exposed globally: loadInstructions, renderInstructionList, editInstruction, saveInstruction, deleteInstruction, etc.
1597
1598
 
1598
1599
  function startAutoRefresh() {
@@ -1606,11 +1607,12 @@
1606
1607
  }
1607
1608
  }, 30000); // Refresh every 30 seconds
1608
1609
  }
1609
- // Build metadata loader
1610
+ // Build metadata loader — uses plain fetch (no auth needed for /api/status)
1610
1611
  (async function fetchBuildMeta(){
1611
1612
  try {
1612
1613
  // Cache bust query param to avoid any intermediary caching of status response
1613
- const r = await adminAuth.adminFetch('/api/status?t=' + Date.now());
1614
+ const r = await fetch('/api/status?t=' + Date.now());
1615
+ if (!r.ok) throw new Error(r.statusText);
1614
1616
  const j = await r.json();
1615
1617
  const el = document.getElementById('buildMeta');
1616
1618
  const ver = j.version || '?.?.?';
@@ -166,6 +166,25 @@ body {
166
166
  padding-bottom: 8px;
167
167
  }
168
168
 
169
+ .feedback-btn {
170
+ position: absolute;
171
+ top: 12px;
172
+ right: 24px;
173
+ font-size: 12px;
174
+ color: var(--admin-text-dim);
175
+ background: transparent;
176
+ border: 1px solid var(--admin-border);
177
+ border-radius: 4px;
178
+ padding: 4px 10px;
179
+ text-decoration: none;
180
+ cursor: pointer;
181
+ transition: color 0.15s, border-color 0.15s;
182
+ }
183
+ .feedback-btn:hover {
184
+ color: var(--admin-accent);
185
+ border-color: var(--admin-accent);
186
+ }
187
+
169
188
  /* --- Horizontal nav bar --- */
170
189
  .admin-nav {
171
190
  display: flex;
@@ -17,8 +17,10 @@ const runtimeConfig_js_1 = require("../../../config/runtimeConfig.js");
17
17
  function getGitCommit() {
18
18
  try {
19
19
  const head = path_1.default.join(process.cwd(), '.git', 'HEAD');
20
- if (!fs_1.default.existsSync(head))
21
- return null;
20
+ if (!fs_1.default.existsSync(head)) {
21
+ // Fallback: read from deployment-manifest.json (local deploy without .git)
22
+ return getDeployManifestField('gitCommit');
23
+ }
22
24
  let ref = fs_1.default.readFileSync(head, 'utf8').trim();
23
25
  if (ref.startsWith('ref:')) {
24
26
  const refPath = path_1.default.join(process.cwd(), '.git', ref.split(' ')[1]);
@@ -40,6 +42,22 @@ function getBuildTime() {
40
42
  const stat = fs_1.default.statSync(candidate);
41
43
  return new Date(stat.mtimeMs).toISOString();
42
44
  }
45
+ // Fallback: read from deployment-manifest.json (local deploy)
46
+ return getDeployManifestField('deployedAt');
47
+ }
48
+ catch { /* ignore */ }
49
+ return null;
50
+ }
51
+ /** Read a top-level field from deployment-manifest.json (written by deploy-local.ps1) */
52
+ function getDeployManifestField(field) {
53
+ try {
54
+ const manifestPath = path_1.default.join(process.cwd(), 'deployment-manifest.json');
55
+ if (fs_1.default.existsSync(manifestPath)) {
56
+ const manifest = JSON.parse(fs_1.default.readFileSync(manifestPath, 'utf8'));
57
+ const value = manifest?.[field];
58
+ if (typeof value === 'string' && value && !value.startsWith('<'))
59
+ return value.substring(0, 64);
60
+ }
43
61
  }
44
62
  catch { /* ignore */ }
45
63
  return null;
@@ -408,10 +408,10 @@ function ensureLoaded() {
408
408
  const backend = (0, runtimeConfig_1.getRuntimeConfig)().storage?.backend ?? 'json';
409
409
  const store = backend === 'sqlite' ? getStoreForDir(baseDir) : null;
410
410
  let result = store ? store.load() : new indexLoader_1.IndexLoader(baseDir).load();
411
- // Auto-migrate JSON → SQLite when the DB is empty but JSON files exist on disk
412
- if (store && result.entries.length === 0 && (0, runtimeConfig_1.getRuntimeConfig)().storage?.sqliteMigrateOnStart) {
413
- const jsonFiles = fs_1.default.existsSync(baseDir) ? fs_1.default.readdirSync(baseDir).filter(f => f.endsWith('.json')) : [];
414
- if (jsonFiles.length > 0) {
411
+ // Auto-migrate JSON → SQLite when JSON files on disk outnumber SQLite rows
412
+ if (store && (0, runtimeConfig_1.getRuntimeConfig)().storage?.sqliteMigrateOnStart) {
413
+ const jsonFiles = fs_1.default.existsSync(baseDir) ? fs_1.default.readdirSync(baseDir).filter(f => f.endsWith('.json') && !f.startsWith('_')) : [];
414
+ if (jsonFiles.length > result.entries.length) {
415
415
  try {
416
416
  const dbPath = (0, runtimeConfig_1.getRuntimeConfig)().storage?.sqlitePath ?? path_1.default.join(process.cwd(), 'data', 'index.db');
417
417
  const mr = (0, migrationEngine_1.migrateJsonToSqlite)(baseDir, dbPath);
@@ -132,19 +132,19 @@ Add these to your copilot instructions so agents always know about the knowledge
132
132
  ### VS Code (.vscode/mcp.json)
133
133
 
134
134
  \`\`\`json
135
- {"servers": {"index-server": {"type": "stdio", "command": "npx", "args": ["@jagilber-org/index-server", "--dashboard"]}}}
135
+ {"servers": {"index-server": {"type": "stdio", "command": "npx", "args": ["@jagilber-org/index-server@latest", "--dashboard"]}}}
136
136
  \`\`\`
137
137
 
138
138
  ### Copilot CLI (~/.copilot/mcp-config.json)
139
139
 
140
140
  \`\`\`json
141
- {"mcpServers": {"index-server": {"type": "stdio", "command": "npx", "args": ["@jagilber-org/index-server", "--dashboard"], "tools": ["*"]}}}
141
+ {"mcpServers": {"index-server": {"type": "stdio", "command": "npx", "args": ["@jagilber-org/index-server@latest", "--dashboard"], "tools": ["*"]}}}
142
142
  \`\`\`
143
143
 
144
144
  ### Claude Desktop (claude_desktop_config.json)
145
145
 
146
146
  \`\`\`json
147
- {"mcpServers": {"index-server": {"type": "stdio", "command": "npx", "args": ["@jagilber-org/index-server", "--dashboard"], "tools": ["*"]}}}
147
+ {"mcpServers": {"index-server": {"type": "stdio", "command": "npx", "args": ["@jagilber-org/index-server@latest", "--dashboard"], "tools": ["*"]}}}
148
148
  \`\`\`
149
149
 
150
150
  ### Docker
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jagilber-org/index-server",
3
- "version": "1.22.0",
3
+ "version": "1.22.1",
4
4
  "description": "MCP instruction indexing server for AI assistant governance — search, CRUD, schema validation, usage tracking, and cross-repo knowledge promotion.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",