@hiai-gg/docsmint 0.6.2 → 0.6.6

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
@@ -40,10 +40,23 @@ server.
40
40
  - **Own the full stack**: application data, vectors, graph, queue, and files run
41
41
  on infrastructure you control.
42
42
 
43
- ## What's new in DocsMint 0.6.2?
43
+ ## What's new in DocsMint 0.6.6?
44
+
45
+ - **Safe explicit index recovery.** Admin document reindexing keeps the active
46
+ generation searchable until a new generation has passed embedding, graph,
47
+ summary, and finalize stages.
48
+ - **Truthful queue admission.** Maintenance requests force a replacement
49
+ generation and report an error when durable enqueue fails instead of
50
+ returning a false-positive success.
51
+ - **Verified MCP distribution.** The official MCP Registry manifest, npm stdio
52
+ package, hosted Streamable HTTP endpoint, bundled Skill, prompts, resources,
53
+ and 17-tool catalog remain one versioned contract.
54
+
55
+ DocsMint 0.6.6 includes the registry metadata fixes released in 0.6.3-0.6.5
56
+ and the complete MCP foundation introduced in 0.6.2:
44
57
 
45
58
  - **Official MCP identity.** DocsMint now publishes the verified
46
- `io.github.hiai-gg/docsmint` registry identity for both the npm stdio server
59
+ `io.github.HiAi-gg/docsmint` registry identity for both the npm stdio server
47
60
  and the hosted Streamable HTTP endpoint.
48
61
  - **One capability implementation.** The public `@hiai-gg/docsmint/mcp`
49
62
  contract lets hosts provide a scoped API client while reusing the same 17
@@ -194473,7 +194473,7 @@ async function claimEnqueueSlot(docId, workspaceId) {
194473
194473
  return true;
194474
194474
  }
194475
194475
  }
194476
- async function enqueueReembed(docIds, workspaceId) {
194476
+ async function enqueueReembed(docIds, workspaceId, options = {}) {
194477
194477
  const unique = new Set;
194478
194478
  for (const id2 of docIds) {
194479
194479
  if (typeof id2 !== "string" || id2.trim().length === 0)
@@ -194482,9 +194482,10 @@ async function enqueueReembed(docIds, workspaceId) {
194482
194482
  }
194483
194483
  let pushed = 0;
194484
194484
  for (const id2 of unique) {
194485
- if (await claimEnqueueSlot(id2, workspaceId)) {
194486
- enqueueEmbedding(id2, "interactive", workspaceId);
194487
- pushed += 1;
194485
+ if (options.bypassDedup || await claimEnqueueSlot(id2, workspaceId)) {
194486
+ const queued = await enqueueEmbedding(id2, options.source ?? "interactive", workspaceId, { forceNewGeneration: options.forceNewGeneration });
194487
+ if (queued)
194488
+ pushed += 1;
194488
194489
  }
194489
194490
  }
194490
194491
  return pushed;
@@ -194620,14 +194621,20 @@ var adminRoutes = new Elysia({ prefix: "/api/admin" }).post("/reindex/:docId", a
194620
194621
  set2.status = 404;
194621
194622
  return { error: "Document not found" };
194622
194623
  }
194623
- await withTenant(adminTenantContextBound(), async (tx) => {
194624
- await tx.delete(documentEmbeddings).where(eq(documentEmbeddings.documentId, params.docId));
194624
+ const enqueued = await enqueueReembed([params.docId], undefined, {
194625
+ bypassDedup: true,
194626
+ forceNewGeneration: true,
194627
+ source: "reindex"
194625
194628
  });
194626
- enqueueReembed([params.docId]);
194629
+ if (enqueued !== 1) {
194630
+ set2.status = 503;
194631
+ return { error: "Failed to queue document reindex" };
194632
+ }
194627
194633
  return {
194628
194634
  success: true,
194629
194635
  documentId: params.docId,
194630
- message: "Existing embeddings cleared and document re-queued"
194636
+ enqueued,
194637
+ message: "Document reindex queued with a new generation"
194631
194638
  };
194632
194639
  } catch (err) {
194633
194640
  logger3.error({ err, docId: params.docId }, "Admin reindex failed");
@@ -234946,7 +234953,7 @@ var swaggerConfig = {
234946
234953
  },
234947
234954
  info: {
234948
234955
  title: "DocsMint API",
234949
- version: "0.6.2",
234956
+ version: "0.6.6",
234950
234957
  description: "Self-hosted AI-first documentation platform. Full-text + semantic search, version history, sharing, and folder organization.",
234951
234958
  contact: { name: "HiAi-gg", url: "https://github.com/HiAi-gg/docsmint" },
234952
234959
  license: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hiai-gg/docsmint",
3
- "mcpName": "io.github.hiai-gg/docsmint",
4
- "version": "0.6.2",
3
+ "mcpName": "io.github.HiAi-gg/docsmint",
4
+ "version": "0.6.6",
5
5
  "type": "module",
6
6
  "browser": {
7
7
  "./dist/backend-launcher.js": false,
@@ -8,53 +8,50 @@
8
8
  * Bun-native. ESM-only. No external color/formatting libraries.
9
9
  */
10
10
 
11
- import { Command } from "commander";
12
- import { configFilePath, loadConfig, saveConfig } from "./config.js";
13
- import { client, type HiaiDocsClient } from "./client.js";
14
- import { registerConfig } from "./commands/config.js";
15
- import { registerCreate } from "./commands/create.js";
16
- import { registerDelete } from "./commands/delete.js";
17
- import { registerExport } from "./commands/export.js";
18
- import { registerFolders } from "./commands/folders.js";
19
- import { registerHistory } from "./commands/history.js";
20
- import { registerList } from "./commands/list.js";
21
- import { registerRead } from "./commands/read.js";
22
- import { registerRestore } from "./commands/restore.js";
23
- import { registerSearch } from "./commands/search.js";
24
- import { registerSnapshot } from "./commands/snapshot.js";
25
- import { registerUpdate } from "./commands/update.js";
11
+ import { Command } from 'commander';
12
+ import { configFilePath, loadConfig, saveConfig } from './config.js';
13
+ import { client, type HiaiDocsClient } from './client.js';
14
+ import { registerConfig } from './commands/config.js';
15
+ import { registerCreate } from './commands/create.js';
16
+ import { registerDelete } from './commands/delete.js';
17
+ import { registerExport } from './commands/export.js';
18
+ import { registerFolders } from './commands/folders.js';
19
+ import { registerHistory } from './commands/history.js';
20
+ import { registerList } from './commands/list.js';
21
+ import { registerRead } from './commands/read.js';
22
+ import { registerRestore } from './commands/restore.js';
23
+ import { registerSearch } from './commands/search.js';
24
+ import { registerSnapshot } from './commands/snapshot.js';
25
+ import { registerUpdate } from './commands/update.js';
26
26
 
27
- const VERSION = "0.6.2";
27
+ const VERSION = '0.6.6';
28
28
 
29
29
  const program = new Command();
30
- program
31
- .name("hiai-docs")
32
- .description("CLI for the hiai-docs knowledge base")
33
- .version(VERSION);
30
+ program.name('hiai-docs').description('CLI for the hiai-docs knowledge base').version(VERSION);
34
31
 
35
32
  const getClient = (): HiaiDocsClient => client;
36
33
 
37
34
  // Bootstrap command — interactive first-run helper.
38
35
  program
39
- .command("init")
40
- .description("Initialize the CLI (writes ~/.hiai-docs/config.json)")
41
- .option("--url <url>", "API base URL")
42
- .option("--key <key>", "API key")
43
- .action(async (opts: { url?: string; key?: string }) => {
44
- const current = loadConfig();
45
- const next = {
46
- url: opts.url ?? current.url,
47
- apiKey: opts.key ?? current.apiKey,
48
- };
49
- saveConfig(next);
50
- process.stdout.write(`Config written to ${configFilePath()}\n`);
51
- process.stdout.write(`url: ${next.url}\n`);
52
- if (next.apiKey) {
53
- process.stdout.write(`key: ${next.apiKey.slice(0, 4)}…(redacted)\n`);
54
- } else {
55
- process.stdout.write("key: (unset)\n");
56
- }
57
- });
36
+ .command('init')
37
+ .description('Initialize the CLI (writes ~/.hiai-docs/config.json)')
38
+ .option('--url <url>', 'API base URL')
39
+ .option('--key <key>', 'API key')
40
+ .action(async (opts: { url?: string; key?: string }) => {
41
+ const current = loadConfig();
42
+ const next = {
43
+ url: opts.url ?? current.url,
44
+ apiKey: opts.key ?? current.apiKey,
45
+ };
46
+ saveConfig(next);
47
+ process.stdout.write(`Config written to ${configFilePath()}\n`);
48
+ process.stdout.write(`url: ${next.url}\n`);
49
+ if (next.apiKey) {
50
+ process.stdout.write(`key: ${next.apiKey.slice(0, 4)}…(redacted)\n`);
51
+ } else {
52
+ process.stdout.write('key: (unset)\n');
53
+ }
54
+ });
58
55
 
59
56
  // Register the spec'd commands.
60
57
  registerSearch(program, getClient);
@@ -81,7 +81,7 @@ export interface CreateDocsmintMcpServerOptions {
81
81
  }
82
82
 
83
83
  export function createDocsmintMcpServer(options: CreateDocsmintMcpServerOptions = {}): McpServer {
84
- const server = new McpServer({ name: 'docsmint', version: '0.6.2' });
84
+ const server = new McpServer({ name: 'docsmint', version: '0.6.6' });
85
85
  registerDocsmintMcpCapabilities(server, options.client ?? defaultClient);
86
86
  return server;
87
87
  }
package/server.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
- "name": "io.github.hiai-gg/docsmint",
3
+ "name": "io.github.HiAi-gg/docsmint",
4
4
  "title": "DocsMint",
5
5
  "description": "Manage scoped DocsMint documents, folders, categories, search, GraphRAG, and indexing through MCP.",
6
6
  "repository": {
@@ -8,12 +8,12 @@
8
8
  "source": "github",
9
9
  "id": "1249550690"
10
10
  },
11
- "version": "0.6.2",
11
+ "version": "0.6.6",
12
12
  "packages": [
13
13
  {
14
14
  "registryType": "npm",
15
15
  "identifier": "@hiai-gg/docsmint",
16
- "version": "0.6.2",
16
+ "version": "0.6.6",
17
17
  "transport": {
18
18
  "type": "stdio"
19
19
  },