@jagilber-org/index-server 1.28.8 → 1.28.10

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.
@@ -1,30 +1,30 @@
1
1
  <!DOCTYPE html>
2
2
  <html lang="en">
3
3
  <head>
4
- <meta name="dashboard-build-version" content="1.28.8-0009101e">
4
+ <meta name="dashboard-build-version" content="1.28.10-0009101e">
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.28.8-0009101e">
9
- <script defer src="js/admin.utils.js?v=1.28.8-0009101e"></script>
10
- <script defer src="js/admin.auth.js?v=1.28.8-0009101e"></script>
11
- <script defer src="js/admin.overview.js?v=1.28.8-0009101e"></script>
12
- <script defer src="js/admin.sessions.js?v=1.28.8-0009101e"></script>
13
- <script defer src="js/admin.monitor.js?v=1.28.8-0009101e"></script>
14
- <script defer src="js/admin.events.js?v=1.28.8-0009101e"></script>
15
- <script defer src="js/admin.graph.js?v=1.28.8-0009101e"></script>
8
+ <link rel="stylesheet" href="css/admin.css?v=1.28.10-0009101e">
9
+ <script defer src="js/admin.utils.js?v=1.28.10-0009101e"></script>
10
+ <script defer src="js/admin.auth.js?v=1.28.10-0009101e"></script>
11
+ <script defer src="js/admin.overview.js?v=1.28.10-0009101e"></script>
12
+ <script defer src="js/admin.sessions.js?v=1.28.10-0009101e"></script>
13
+ <script defer src="js/admin.monitor.js?v=1.28.10-0009101e"></script>
14
+ <script defer src="js/admin.events.js?v=1.28.10-0009101e"></script>
15
+ <script defer src="js/admin.graph.js?v=1.28.10-0009101e"></script>
16
16
  <script defer src="js/marked.umd.js"></script>
17
- <script defer src="js/admin.instructions.js?v=1.28.8-0009101e"></script>
18
- <script defer src="js/admin.logs.js?v=1.28.8-0009101e"></script>
19
- <script defer src="js/admin.maintenance.js?v=1.28.8-0009101e"></script>
20
- <script defer src="js/admin.config.js?v=1.28.8-0009101e"></script>
21
- <script defer src="js/admin.performance.js?v=1.28.8-0009101e"></script>
22
- <script defer src="js/admin.instances.js?v=1.28.8-0009101e"></script>
23
- <script defer src="js/admin.embeddings.js?v=1.28.8-0009101e"></script>
24
- <script defer src="js/admin.messaging.js?v=1.28.8-0009101e"></script>
25
- <script defer src="js/admin.sqlite.js?v=1.28.8-0009101e"></script>
26
- <script defer src="js/admin.boot.js?v=1.28.8-0009101e"></script>
27
- <script defer src="js/admin.feedback.js?v=1.28.8-0009101e"></script>
17
+ <script defer src="js/admin.instructions.js?v=1.28.10-0009101e"></script>
18
+ <script defer src="js/admin.logs.js?v=1.28.10-0009101e"></script>
19
+ <script defer src="js/admin.maintenance.js?v=1.28.10-0009101e"></script>
20
+ <script defer src="js/admin.config.js?v=1.28.10-0009101e"></script>
21
+ <script defer src="js/admin.performance.js?v=1.28.10-0009101e"></script>
22
+ <script defer src="js/admin.instances.js?v=1.28.10-0009101e"></script>
23
+ <script defer src="js/admin.embeddings.js?v=1.28.10-0009101e"></script>
24
+ <script defer src="js/admin.messaging.js?v=1.28.10-0009101e"></script>
25
+ <script defer src="js/admin.sqlite.js?v=1.28.10-0009101e"></script>
26
+ <script defer src="js/admin.boot.js?v=1.28.10-0009101e"></script>
27
+ <script defer src="js/admin.feedback.js?v=1.28.10-0009101e"></script>
28
28
  </head>
29
29
  <body>
30
30
  <div class="admin-container admin-root">
@@ -909,10 +909,10 @@
909
909
  }
910
910
  }
911
911
 
912
- // Graph logic was extracted to js/admin.graph.js?v=1.28.8-0009101e
912
+ // Graph logic was extracted to js/admin.graph.js?v=1.28.10-0009101e
913
913
  // Functions available globally: reloadGraphMermaid, initGraphScopeDefaults, copyMermaidSource, toggleGraphEdit, applyGraphEdit, cancelGraphEdit, refreshDrillCategories, loadDrillInstructions, clearSelections
914
914
 
915
- <!-- overview functions moved to js/admin.overview.js?v=1.28.8-0009101e -->
915
+ <!-- overview functions moved to js/admin.overview.js?v=1.28.10-0009101e -->
916
916
 
917
917
  // Lightweight overview-level maintenance display (optional)
918
918
  // Intentionally minimal to avoid blocking overview rendering.
@@ -1097,7 +1097,7 @@
1097
1097
  }
1098
1098
 
1099
1099
  // --- Backup / Restore ---
1100
- // Extracted to js/admin.maintenance.js?v=1.28.8-0009101e
1100
+ // Extracted to js/admin.maintenance.js?v=1.28.10-0009101e
1101
1101
 
1102
1102
  async function performBackup() {
1103
1103
  try {
@@ -1163,7 +1163,7 @@
1163
1163
  }
1164
1164
 
1165
1165
  async function loadConfiguration() {
1166
- // Primary implementation in js/admin.config.js?v=1.28.8-0009101e (loaded via defer).
1166
+ // Primary implementation in js/admin.config.js?v=1.28.10-0009101e (loaded via defer).
1167
1167
  // This inline fallback only fires if the external script failed to load.
1168
1168
  if (window.__configExternalLoaded) return;
1169
1169
  try {
@@ -1223,10 +1223,10 @@
1223
1223
  return false;
1224
1224
  }
1225
1225
 
1226
- // Monitoring functions moved to js/admin.monitor.js?v=1.28.8-0009101e
1226
+ // Monitoring functions moved to js/admin.monitor.js?v=1.28.10-0009101e
1227
1227
 
1228
1228
  // ===== Log Viewer =====
1229
- // Extracted to js/admin.logs.js?v=1.28.8-0009101e
1229
+ // Extracted to js/admin.logs.js?v=1.28.10-0009101e
1230
1230
 
1231
1231
  // ===== Instruction Management =====
1232
1232
  let instructionEditing = null;
@@ -1723,7 +1723,7 @@
1723
1723
  setInterval(fetchResourceTrends, 10000);
1724
1724
  })();
1725
1725
 
1726
- // Instruction management logic extracted to js/admin.instructions.js?v=1.28.8-0009101e
1726
+ // Instruction management logic extracted to js/admin.instructions.js?v=1.28.10-0009101e
1727
1727
  // Functions exposed globally: loadInstructions, renderInstructionList, editInstruction, saveInstruction, deleteInstruction, etc.
1728
1728
 
1729
1729
  function startAutoRefresh() {
@@ -77,8 +77,12 @@ function buildServerEntry(format, config, paths, envOverrides = {}) {
77
77
  entry.cwd = (0, flagCatalog_1.toForwardSlashes)(launch.cwd);
78
78
  if (format === 'vscode-global' && launch.command === 'node') {
79
79
  const firstArg = launch.args[0] ?? '';
80
- entry.args = [path_1.default.isAbsolute(firstArg) ? (0, flagCatalog_1.toForwardSlashes)(firstArg) : (0, flagCatalog_1.toForwardSlashes)(path_1.default.resolve(launch.cwd ?? config.root, firstArg))];
81
- entry.cwd = (0, flagCatalog_1.toForwardSlashes)(path_1.default.resolve(__dirname, '..', '..', '..'));
80
+ const baseCwd = launch.cwd ?? config.root;
81
+ entry.args = [path_1.default.isAbsolute(firstArg) ? (0, flagCatalog_1.toForwardSlashes)(firstArg) : (0, flagCatalog_1.toForwardSlashes)(path_1.default.resolve(baseCwd, firstArg))];
82
+ // Prefer the launch cwd (config.root for 'local' source — a stable user-scope
83
+ // directory). Fall back to package root only when the runtime hasn't been
84
+ // self-deployed under config.root (e.g. 'packaged' source straight out of npm-global).
85
+ entry.cwd = (0, flagCatalog_1.toForwardSlashes)(launch.cwd ?? path_1.default.resolve(__dirname, '..', '..', '..'));
82
86
  }
83
87
  return entry;
84
88
  }
@@ -15,7 +15,12 @@ export declare class AgentMailbox {
15
15
  read(opts?: ReadMessagesOptions): AgentMessage[];
16
16
  /** List all channels with message counts. */
17
17
  listChannels(): ChannelInfo[];
18
- /** Acknowledge messages by marking them read. Returns count acknowledged. */
18
+ /**
19
+ * Acknowledge messages by marking them read.
20
+ * Idempotent: returns the count of message IDs successfully resolved and ack'd
21
+ * for the reader, regardless of whether the reader had already been added by a
22
+ * prior `read({ markRead: true })` call. Unknown IDs are silently skipped.
23
+ */
19
24
  ack(messageIds: string[], reader: string): number;
20
25
  /** Get stats for a reader. */
21
26
  getStats(reader: string): MessagingStats;
@@ -135,10 +135,16 @@ class AgentMailbox {
135
135
  latestAt: info.latest,
136
136
  }));
137
137
  }
138
- /** Acknowledge messages by marking them read. Returns count acknowledged. */
138
+ /**
139
+ * Acknowledge messages by marking them read.
140
+ * Idempotent: returns the count of message IDs successfully resolved and ack'd
141
+ * for the reader, regardless of whether the reader had already been added by a
142
+ * prior `read({ markRead: true })` call. Unknown IDs are silently skipped.
143
+ */
139
144
  ack(messageIds, reader) {
140
145
  this.ensureLoaded();
141
146
  let count = 0;
147
+ let dirty = false;
142
148
  for (const id of messageIds) {
143
149
  const key = this.idIndex.get(id);
144
150
  if (!key)
@@ -150,10 +156,11 @@ class AgentMailbox {
150
156
  msg.readBy = [];
151
157
  if (!msg.readBy.includes(reader)) {
152
158
  msg.readBy.push(reader);
153
- count++;
159
+ dirty = true;
154
160
  }
161
+ count++;
155
162
  }
156
- if (count > 0)
163
+ if (dirty)
157
164
  this.persistAll();
158
165
  return count;
159
166
  }
@@ -156,12 +156,14 @@ docker compose up # HTTP on :8787
156
156
  Restart your MCP client after configuration changes. Verify with \`health_check\`.
157
157
 
158
158
  For full configuration options: see \`docs/mcp_configuration.md\` and \`docs/configuration.md\`.`,
159
- audience: 'agents',
160
- requirement: 'required',
159
+ audience: 'all',
160
+ requirement: 'mandatory',
161
161
  priority: 100,
162
+ priorityTier: 'P1',
163
+ contentType: 'instruction',
162
164
  categories: ['bootstrap', 'mcp-activation', 'quick-start', 'documentation'],
163
165
  owner: 'system',
164
- version: 3,
166
+ version: '3.0.0',
165
167
  schemaVersion: '5',
166
168
  semanticSummary: 'Index Server quick start: search-first workflow, knowledge contribution, copilot instructions setup, and MCP client configuration for AI agents'
167
169
  }
@@ -173,12 +175,14 @@ For full configuration options: see \`docs/mcp_configuration.md\` and \`docs/con
173
175
  id: '001-lifecycle-bootstrap',
174
176
  title: 'Lifecycle Bootstrap: Local-First Instruction Strategy',
175
177
  body: 'Purpose: Early lifecycle guidance after bootstrap confirmation. Keep index minimal; prefer local-first P0/P1 additions; promote only after stability.',
176
- audience: 'agents',
178
+ audience: 'all',
177
179
  requirement: 'recommended',
178
- priorityTier: 'p1',
180
+ priority: 99,
181
+ priorityTier: 'P1',
182
+ contentType: 'instruction',
179
183
  categories: ['bootstrap', 'lifecycle'],
180
184
  owner: 'system',
181
- version: 1,
185
+ version: '1.0.0',
182
186
  schemaVersion: '5',
183
187
  semanticSummary: 'Lifecycle and promotion guardrails after bootstrap confirmation',
184
188
  reviewIntervalDays: 120
@@ -226,7 +230,12 @@ function autoSeedBootstrap() {
226
230
  // Inject timestamps at write time so loaders never trigger
227
231
  // [invariant-repair] firstSeenTs WARN noise on subsequent reads.
228
232
  const nowIso = new Date().toISOString();
229
- const stamped = { createdAt: nowIso, firstSeenTs: nowIso, ...seed.json };
233
+ // Bake-in sourceHash so integrity_verify reports zero drift on a fresh install.
234
+ // Schema requires sha256(body) for the body field; without this seeds appear
235
+ // as drift forever (expected hash empty, actual populated).
236
+ const bodyStr = typeof seed.json.body === 'string' ? seed.json.body : '';
237
+ const sourceHash = crypto_1.default.createHash('sha256').update(bodyStr, 'utf8').digest('hex');
238
+ const stamped = { createdAt: nowIso, updatedAt: nowIso, firstSeenTs: nowIso, sourceHash, ...seed.json };
230
239
  fs_1.default.writeFileSync(tmp, JSON.stringify(stamped, null, 2), { encoding: 'utf8' });
231
240
  fs_1.default.renameSync(tmp, target);
232
241
  summary.created.push(seed.file);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jagilber-org/index-server",
3
- "version": "1.28.8",
3
+ "version": "1.28.10",
4
4
  "mcpName": "io.github.jagilber-org/index-server",
5
5
  "description": "MCP instruction indexing server with search, CRUD, validation, and cross-repo knowledge promotion.",
6
6
  "publishConfig": {
@@ -648,6 +648,12 @@ Non-interactive mode:
648
648
  console.log(`\n✅ .env written to: ${envPath}`);
649
649
  }
650
650
 
651
+ // ── Deploy runtime BEFORE config generation ─────────────────────────
652
+ // resolveServerLaunch picks 'local' source (cwd = config.root) only when
653
+ // <config.root>/dist/server/index-server.js exists. Deploy first so configs
654
+ // are emitted with stable user-data-root paths instead of npm-global paths.
655
+ await deployRuntime(config);
656
+
651
657
  // ── Multi-target config generation ──────────────────────────────────
652
658
  const configTargets = resolveConfigPaths(config);
653
659
 
@@ -705,9 +711,6 @@ Non-interactive mode:
705
711
  }
706
712
  }
707
713
 
708
- // ── Deploy runtime if target root differs from package root ─────────
709
- await deployRuntime(config);
710
-
711
714
  // ── Next steps ──────────────────────────────────────────────────────
712
715
  const proto = (config.profile === 'enhanced' || config.profile === 'experimental') ? 'https' : 'http';
713
716
  const launch = resolveServerLaunch(config);
package/server.json CHANGED
@@ -6,12 +6,12 @@
6
6
  "url": "https://github.com/jagilber-org/index-server",
7
7
  "source": "github"
8
8
  },
9
- "version": "1.28.8",
9
+ "version": "1.28.10",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "identifier": "@jagilber-org/index-server",
14
- "version": "1.28.8",
14
+ "version": "1.28.10",
15
15
  "transport": {
16
16
  "type": "stdio"
17
17
  }