@hiai-gg/docsmint 2.2.5 → 2.2.7

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
@@ -63,7 +63,7 @@ management belongs to the signed-in browser session.
63
63
 
64
64
  **Self-hosted alternative:** run [DocsMint with Docker](#quickstart), create an API
65
65
  key in its browser UI, and configure `HIAI_DOCS_URL` and `HIAI_DOCS_API_KEY` for
66
- `npx --yes --package https://github.com/HiAi-gg/docsmint/releases/download/v2.2.5/hiai-gg-docsmint-2.2.5.tgz docsmint-mcp`. Install Bun 1.4.4 or
66
+ `npx --yes --package https://github.com/HiAi-gg/docsmint/releases/download/v2.2.7/hiai-gg-docsmint-2.2.7.tgz docsmint-mcp`. Install Bun 1.4.4 or
67
67
  later to execute the published binary. The npm package is a stdio bridge to
68
68
  your own API; it does not install the DocsMint application or Cloud OAuth server.
69
69
  See the [MCP guide](https://github.com/HiAi-gg/docsmint/blob/main/packages/mcp-server/README.md)
@@ -90,7 +90,7 @@ is a separate listing.
90
90
 
91
91
  REST and HTTP MCP responses include a server-issued request ID in the
92
92
  X-Request-ID header. Include that ID when reporting a failed request.
93
- See the [2.2.5 release notes](docs/release/v2.2.5-notes.md).
93
+ See the [2.2.7 release notes](docs/release/v2.2.7-notes.md).
94
94
 
95
95
  ## Document version patch 2.1.4
96
96
 
@@ -185,7 +185,7 @@ docker pull vgalibov/docsmint:web-latest
185
185
  docker pull vgalibov/docsmint:caddy-latest
186
186
  ```
187
187
 
188
- Use versioned tags `api-v2.2.5`, `web-v2.2.5`, and `caddy-v2.2.5` for
188
+ Use versioned tags `api-v2.2.7`, `web-v2.2.7`, and `caddy-v2.2.7` for
189
189
  reproducible deploys. Caddy is the supporting reverse proxy with rate limiting;
190
190
  it is separate from the API and web application. The quickstart still builds the Compose stack from this repository so PostgreSQL,
191
191
  Redis, and SeaweedFS start together with the application.
@@ -293,7 +293,7 @@ Run the published stdio bridge against your own DocsMint API:
293
293
  "mcpServers": {
294
294
  "docsmint": {
295
295
  "command": "npx",
296
- "args": ["--yes", "--package", "https://github.com/HiAi-gg/docsmint/releases/download/v2.2.5/hiai-gg-docsmint-2.2.5.tgz", "docsmint-mcp"],
296
+ "args": ["--yes", "--package", "https://github.com/HiAi-gg/docsmint/releases/download/v2.2.7/hiai-gg-docsmint-2.2.7.tgz", "docsmint-mcp"],
297
297
  "env": {
298
298
  "HIAI_DOCS_URL": "http://localhost:50700",
299
299
  "HIAI_DOCS_API_KEY": "your-global-or-category-key"
@@ -76671,6 +76671,7 @@ var init_config_schema = __esm(() => {
76671
76671
  SEARCH_EXPANSION_FALLBACK_2_BASE_URL: string2().default(OPENROUTER_PUBLIC_BASE_URL),
76672
76672
  SEARCH_EXPANSION_FALLBACK_2_API_KEY: string2().optional(),
76673
76673
  SEARCH_EXPANSION_FALLBACK_2_MODEL: string2().default(OPENROUTER_PUBLIC_EXPANSION_MODELS.fallback_2),
76674
+ SEARCH_TRANSLATED_CATEGORY_MATCH: _enum(["lexical", "hybrid"]).default("lexical"),
76674
76675
  SEARCH_RERANK_ENABLED: string2().optional().default("true").transform((v) => v === "true"),
76675
76676
  SEARCH_RERANK_BASE_URL: string2().default(OPENROUTER_PUBLIC_BASE_URL),
76676
76677
  SEARCH_RERANK_API_KEY: string2().optional(),
@@ -255720,7 +255721,7 @@ function registerDocsmintMcpCapabilities(server, client, workspaceRouting, decor
255720
255721
  registerPromptsAndResources(server, client);
255721
255722
  }
255722
255723
  function createDocsmintMcpServer(options = {}) {
255723
- const server = new DocsMintMcpServer({ name: "docsmint", version: "2.2.5" });
255724
+ const server = new DocsMintMcpServer({ name: "docsmint", version: "2.2.7" });
255724
255725
  const client = options.docsClient ? createMcpDocsClient(options.docsClient, options.requestContext) : options.client ?? createMcpDocsClient(createDefaultDocsClient(), options.requestContext);
255725
255726
  registerDocsmintMcpCapabilities(server, client, options.workspaceRouting, options.decorateResult);
255726
255727
  return server;
@@ -257254,6 +257255,20 @@ async function searchDocuments(ctx, request, adapters = {}) {
257254
257255
  });
257255
257256
  const earlyExpansionStarted = languageMismatch ? performance.now() : undefined;
257256
257257
  const earlyExpansion = languageMismatch ? Promise.resolve().then(runExpansion).catch(() => null) : undefined;
257258
+ const expandedChannels = async (expandedPlan) => {
257259
+ try {
257260
+ return await retrieveExpanded(ctx, expandedPlan, {
257261
+ limit: rankingWindow,
257262
+ documentIds: request.documentIds,
257263
+ categoryId: request.authorizedCategoryId ?? request.filters?.categoryId,
257264
+ filters: request.filters,
257265
+ getEmbedding: getCachedEmbedding
257266
+ });
257267
+ } catch {
257268
+ return [];
257269
+ }
257270
+ };
257271
+ const earlyChannels = earlyExpansion && ctx.resourceScope?.kind === "category" ? earlyExpansion.then((result) => result ? expandedChannels(result.plan) : []) : undefined;
257257
257272
  let fast;
257258
257273
  const fastStarted = performance.now();
257259
257274
  try {
@@ -257306,17 +257321,7 @@ async function searchDocuments(ctx, request, adapters = {}) {
257306
257321
  expansionUsed = true;
257307
257322
  expandedPlan = expansion.plan;
257308
257323
  expansionModel = expansion.model;
257309
- try {
257310
- expanded = await retrieveExpanded(ctx, expandedPlan, {
257311
- limit: rankingWindow,
257312
- documentIds: request.documentIds,
257313
- categoryId: request.authorizedCategoryId ?? request.filters?.categoryId,
257314
- filters: request.filters,
257315
- getEmbedding: getCachedEmbedding
257316
- });
257317
- } catch {
257318
- expanded = [];
257319
- }
257324
+ expanded = await (earlyChannels ?? expandedChannels(expandedPlan));
257320
257325
  }
257321
257326
  } catch {}
257322
257327
  expanded = restrictChannelResults(expanded, request.documentIds);
@@ -257449,6 +257454,11 @@ async function searchDocuments(ctx, request, adapters = {}) {
257449
257454
  ];
257450
257455
  }
257451
257456
  }
257457
+ if (config3.SEARCH_TRANSLATED_CATEGORY_MATCH === "lexical" && request.authorizedCategoryId && languageMismatch && /^\p{L}+$/u.test(plan.normalized) && expandedPlan?.translations.length) {
257458
+ const terms = new Set([...expandedPlan.translations, ...expandedPlan.synonyms].map((term) => term.trim().toLowerCase()));
257459
+ const supported = new Set([...fast, ...expanded].flatMap((result) => result.candidates.filter((candidate) => candidate.channel === "exact" || candidate.channel === "fts" || candidate.channel === "fuzzy" || (candidate.channel === "expanded_fts" || candidate.channel === "expanded_fuzzy") && terms.has(candidate.queryVariant?.trim().toLowerCase() ?? "")).map((candidate) => candidate.documentId)));
257460
+ ranked = ranked.filter((item) => supported.has(item.documentId));
257461
+ }
257452
257462
  const titleMatches = fast.find((channel) => channel.channel === "fuzzy")?.candidates ?? [];
257453
257463
  if (isShortTitleQuery(plan.normalized) && (request.filters?.sort ?? "relevance") === "relevance") {
257454
257464
  const best = titleMatches[0]?.rawScore ?? 0;
@@ -262417,7 +262427,7 @@ var swaggerConfig = {
262417
262427
  },
262418
262428
  info: {
262419
262429
  title: "DocsMint API",
262420
- version: "2.2.5",
262430
+ version: "2.2.7",
262421
262431
  description: "Self-hosted AI-native knowledge workspace and installable PWA with hybrid search, GraphRAG, REST, SDK, CLI, and MCP access for people and AI agents.",
262422
262432
  contact: { name: "HiAi-gg", url: "https://github.com/HiAi-gg/docsmint" },
262423
262433
  license: {
@@ -52555,6 +52555,7 @@ var envSchema = object({
52555
52555
  SEARCH_EXPANSION_FALLBACK_2_BASE_URL: string2().default(OPENROUTER_PUBLIC_BASE_URL),
52556
52556
  SEARCH_EXPANSION_FALLBACK_2_API_KEY: string2().optional(),
52557
52557
  SEARCH_EXPANSION_FALLBACK_2_MODEL: string2().default(OPENROUTER_PUBLIC_EXPANSION_MODELS.fallback_2),
52558
+ SEARCH_TRANSLATED_CATEGORY_MATCH: _enum(["lexical", "hybrid"]).default("lexical"),
52558
52559
  SEARCH_RERANK_ENABLED: string2().optional().default("true").transform((v) => v === "true"),
52559
52560
  SEARCH_RERANK_BASE_URL: string2().default(OPENROUTER_PUBLIC_BASE_URL),
52560
52561
  SEARCH_RERANK_API_KEY: string2().optional(),
package/dist/mcp-cli.js CHANGED
@@ -1860,7 +1860,7 @@ function registerDocsmintMcpCapabilities(server, client, workspaceRouting, decor
1860
1860
  registerPromptsAndResources(server, client);
1861
1861
  }
1862
1862
  function createDocsmintMcpServer(options = {}) {
1863
- const server = new DocsMintMcpServer({ name: "docsmint", version: "2.2.5" });
1863
+ const server = new DocsMintMcpServer({ name: "docsmint", version: "2.2.7" });
1864
1864
  const client = options.docsClient ? createMcpDocsClient(options.docsClient, options.requestContext) : options.client ?? createMcpDocsClient(createDefaultDocsClient(), options.requestContext);
1865
1865
  registerDocsmintMcpCapabilities(server, client, options.workspaceRouting, options.decorateResult);
1866
1866
  return server;
@@ -2062,7 +2062,7 @@ function registerDocsmintMcpCapabilities(server, client, workspaceRouting, decor
2062
2062
  registerPromptsAndResources(server, client);
2063
2063
  }
2064
2064
  function createDocsmintMcpServer(options = {}) {
2065
- const server = new DocsMintMcpServer({ name: "docsmint", version: "2.2.5" });
2065
+ const server = new DocsMintMcpServer({ name: "docsmint", version: "2.2.7" });
2066
2066
  const client = options.docsClient ? createMcpDocsClient(options.docsClient, options.requestContext) : options.client ?? createMcpDocsClient(createDefaultDocsClient(), options.requestContext);
2067
2067
  registerDocsmintMcpCapabilities(server, client, options.workspaceRouting, options.decorateResult);
2068
2068
  return server;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hiai-gg/docsmint",
3
3
  "mcpName": "io.github.HiAi-gg/docsmint",
4
- "version": "2.2.5",
4
+ "version": "2.2.7",
5
5
  "type": "module",
6
6
  "browser": {
7
7
  "./dist/backend-launcher.js": false,
@@ -25,7 +25,7 @@ import { registerSearch } from './commands/search.js';
25
25
  import { registerSnapshot } from './commands/snapshot.js';
26
26
  import { registerUpdate } from './commands/update.js';
27
27
 
28
- const VERSION = '2.2.5';
28
+ const VERSION = '2.2.7';
29
29
 
30
30
  const program = new Command();
31
31
  program.name('docsmint').description('CLI for the DocsMint knowledge workspace').version(VERSION);
package/server.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "id": "1249550690",
11
11
  "subfolder": "packages/mcp-server"
12
12
  },
13
- "version": "2.2.5",
13
+ "version": "2.2.7",
14
14
  "icons": [
15
15
  {
16
16
  "src": "https://raw.githubusercontent.com/HiAi-gg/docsmint/main/frontend/static/logo-dark.png",
@@ -34,7 +34,7 @@
34
34
  "registryType": "npm",
35
35
  "registryBaseUrl": "https://registry.npmjs.org",
36
36
  "identifier": "@hiai-gg/docsmint",
37
- "version": "2.2.5",
37
+ "version": "2.2.7",
38
38
  "runtimeHint": "npx",
39
39
  "transport": {
40
40
  "type": "stdio"