@hiai-gg/docsmint 0.8.2 → 0.8.4

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.
Files changed (36) hide show
  1. package/README.md +84 -58
  2. package/dist/backend/index.js +350 -251
  3. package/dist/client.js +7 -0
  4. package/dist/frontend/{HiAiEditor-BpmzvTCP.js → HiAiEditor-Dxqt8BUN.js} +2 -2
  5. package/dist/frontend/{SettingsDialog-2d6ZA4Ze.js → SettingsDialog-DnrPV8dM.js} +4 -4
  6. package/dist/frontend/{Sidebar-Db_ffhAb.js → Sidebar-BI_ccYTl.js} +1 -1
  7. package/dist/frontend/api/settings.js +1 -1
  8. package/dist/frontend/app-shell.js +2 -2
  9. package/dist/frontend/{auth-client-DCMne8vd.js → auth-client-Dc0mkuZH.js} +10 -10
  10. package/dist/frontend/components/editor/compact-editor.js +1 -1
  11. package/dist/frontend/components/editor/document-editor.js +1 -1
  12. package/dist/frontend/components/settings.js +1 -1
  13. package/dist/frontend/components/sidebar.js +1 -1
  14. package/dist/frontend/{db-CbFRFAm2.js → db-DUOtrCBC.js} +1 -1
  15. package/dist/frontend/{identity-O4lAuchv.js → identity-D_rjww-V.js} +1 -1
  16. package/dist/frontend/offline/identity.js +1 -1
  17. package/dist/frontend/{settings-DJW8JkdF.js → settings-CW_SR-EH.js} +1 -1
  18. package/dist/frontend-ssr/api/settings.js +1 -1
  19. package/dist/frontend-ssr/app-shell.js +2 -2
  20. package/dist/frontend-ssr/assets/{HiAiEditor-DCpulE6N.js → HiAiEditor-D-FYXUht.js} +2 -2
  21. package/dist/frontend-ssr/assets/{SettingsDialog-CpPxZahd.js → SettingsDialog-BaI2MU5d.js} +4 -4
  22. package/dist/frontend-ssr/assets/{Sidebar-BJ1XZ1DH.js → Sidebar-BpTS2uCa.js} +1 -1
  23. package/dist/frontend-ssr/assets/{auth-client-DzkZlSQ8.js → auth-client-Bo5Fg-sb.js} +13 -13
  24. package/dist/frontend-ssr/assets/{db-CUkQe9AU.js → db-DUKz2X3Z.js} +1 -1
  25. package/dist/frontend-ssr/assets/{identity-veXobEfE.js → identity-_M3U9lqe.js} +1 -1
  26. package/dist/frontend-ssr/assets/{settings-DwAcLGM1.js → settings-DaOQ4Gv2.js} +1 -1
  27. package/dist/frontend-ssr/components/editor/compact-editor.js +1 -1
  28. package/dist/frontend-ssr/components/editor/document-editor.js +1 -1
  29. package/dist/frontend-ssr/components/settings.js +1 -1
  30. package/dist/frontend-ssr/components/sidebar.js +1 -1
  31. package/dist/frontend-ssr/offline/identity.js +1 -1
  32. package/dist/mcp-cli.js +4 -1
  33. package/dist/mcp-server.js +4 -1
  34. package/package.json +3 -3
  35. package/packages/cli/src/index.ts +1 -1
  36. package/server.json +8 -8
package/README.md CHANGED
@@ -1,14 +1,14 @@
1
1
  # DocsMint
2
2
 
3
- **A self-hosted AI-native knowledge workspace and installable PWA for people,
4
- applications, and AI agents.**
3
+ **Turn your documents into knowledge you and your AI agents can use.**
5
4
 
6
- DocsMint stores documents in a structured JSON editor model first. Markdown is
7
- the convenient second format for editing, importing, and exporting content.
8
- Automatic chunking, 1024-dimensional embeddings, multilingual hybrid search,
9
- GraphRAG, and cross-encoder rerank make the same knowledge base useful to
10
- people, applications, and agents through the web application, REST API,
11
- TypeScript SDK, CLI, and MCP server.
5
+ Write and organize notes, guides, and project documentation in one workspace.
6
+ Find answers with search that understands related concepts, then give your
7
+ agents access to the same documents through MCP, REST, the SDK, or CLI.
8
+
9
+ **[Connect DocsMint Cloud](https://docsmint.com/mcp/connect?source=github_mcp)** to get started without
10
+ operating the stack, or **[self-host with Docker](#quickstart)** to run the
11
+ Apache-2.0 application on your own infrastructure.
12
12
 
13
13
  [![Apache-2.0 License](https://img.shields.io/badge/License-Apache--2.0-green.svg)](LICENSE)
14
14
  [![Release](https://img.shields.io/github/v/release/hiai-gg/docsmint?sort=semver)](https://github.com/hiai-gg/docsmint/releases)
@@ -16,7 +16,7 @@ TypeScript SDK, CLI, and MCP server.
16
16
  [![Docker Pulls](https://img.shields.io/docker/pulls/vgalibov/docsmint?logo=docker)](https://hub.docker.com/r/vgalibov/docsmint)
17
17
  [![Stars](https://img.shields.io/github/stars/hiai-gg/docsmint)](https://github.com/hiai-gg/docsmint/stargazers)
18
18
  [![CI](https://github.com/hiai-gg/docsmint/actions/workflows/ci.yml/badge.svg)](https://github.com/hiai-gg/docsmint/actions/workflows/ci.yml)
19
- [![Bun](https://img.shields.io/badge/Runtime-Bun_1.3-black?logo=bun&logoColor=white)](https://bun.sh)
19
+ [![Bun](https://img.shields.io/badge/Runtime-Bun_1.4-black?logo=bun&logoColor=white)](https://bun.sh)
20
20
  [![TypeScript](https://img.shields.io/badge/TypeScript-6.x-3178C6?logo=typescript&logoColor=white)](https://www.typescriptlang.org)
21
21
  [![Svelte](https://img.shields.io/badge/Svelte-5.x-FF3E00?logo=svelte&logoColor=white)](https://svelte.dev)
22
22
  [![Elysia](https://img.shields.io/badge/Elysia-1.4-lightgrey?logo=elysia&logoColor=white)](https://elysiajs.com)
@@ -32,40 +32,76 @@ TypeScript SDK, CLI, and MCP server.
32
32
 
33
33
  <img width="1920" height="974" alt="DocsMint installable document workspace" src="https://github.com/user-attachments/assets/94701d01-a361-4ca1-b16d-de2a0c64d684" />
34
34
 
35
+ ## Connect your AI agent
36
+
37
+ Connect DocsMint Cloud instantly or use your own self-hosted deployment. Search,
38
+ read, create, organize and update persistent knowledge through MCP with hybrid
39
+ retrieval, reranking and GraphRAG.
40
+
41
+ **Recommended: [DocsMint Cloud setup](https://docsmint.com/mcp/connect?source=github_mcp).**
42
+ No server installation is required. Sign up or log in, choose your workspace,
43
+ create an MCP/API credential in the authenticated browser UI, follow your client's
44
+ instructions, and verify the connection. Hosted MCP follows your plan and
45
+ workspace permissions. Prefer workspace-bound or category-scoped credentials.
46
+
47
+ The Cloud endpoint is `https://docsmint.com/mcp` (Streamable HTTP). OAuth-capable
48
+ clients discover authorization and open DocsMint login and consent in the browser.
49
+ Choose your workspace and explicit scopes; the authorization code uses PKCE S256.
50
+ Access tokens expire after one hour; reconnect through browser authorization when
51
+ they expire (no refresh tokens). API-key clients
52
+ send `Authorization: Bearer <key>`. Credentials cannot create or elevate other
53
+ credentials; lifecycle management belongs to the signed-in browser session.
54
+
55
+ **Self-hosted alternative:** run [DocsMint with Docker](#quickstart), create an API
56
+ key in its browser UI, and configure `HIAI_DOCS_URL` and `HIAI_DOCS_API_KEY` for
57
+ `npx --yes --package @hiai-gg/docsmint docsmint-mcp`. The npm package is a stdio
58
+ bridge to your running deployment, not a server installer. See the
59
+ [MCP guide](packages/mcp-server/README.md) for client configuration.
60
+
35
61
  ## Why DocsMint?
36
62
 
37
- - **Write naturally** in a rich visual editor or raw Markdown.
38
- - **Find meaning, not only keywords** with exact, lexical, fuzzy, vector,
39
- multilingual expansion, and graph retrieval fused through RRF, then
40
- reranked with a cross-encoder (Voyage rerank-2.5 in the reference profile).
41
- - **Keep retrieval current** with automatic, incremental chunking and
42
- re-embedding after document or metadata changes.
43
- - **Connect agents directly** through REST, a typed SDK, CLI, or MCP.
44
- - **Control access** with global keys or category-scoped `read`, `edit`, and
45
- `write` permissions.
46
- - **Own the full stack**: application data, vectors, graph, queue, and files run
47
- on infrastructure you control.
48
-
49
- ## What's new in 0.8.2?
50
-
51
- - **Correct rerank identity.** Empty candidates can no longer shift provider
52
- scores onto the wrong document ID; partial and invalid provider responses
53
- still preserve stable RRF fallback order.
54
- - **Recover optional AI stages safely.** Pipeline status includes typed graph
55
- and summary warnings, and the API or SDK can retry only failed enrichment on
56
- the current embedding generation without rebuilding ready chunks.
57
- - **Reliable public frontend imports.** The standalone frontend consumes only
58
- published `hiai-ui` exports, with no source or distribution aliases.
63
+ - **Keep knowledge easy to edit.** Use a rich visual editor or Markdown;
64
+ organize documents with folders, categories, and tags.
65
+ - **Find the document you mean.** Search combines keywords, meaning, typo
66
+ tolerance, and graph relationships across languages.
67
+ - **Keep agents close to the source.** Let your tools search, read, and update
68
+ the same knowledge through MCP, REST, a typed SDK, and CLI.
69
+ - **Choose what an integration can access.** Category keys grant explicit
70
+ `read`, `edit`, and `write` permissions for a defined part of your library.
71
+ - **Keep retrieval up to date.** Document edits and metadata changes refresh
72
+ the search index automatically in the background.
73
+ - **Choose how you run it.** Use [managed DocsMint](https://docsmint.com) or
74
+ self-host the application, database, search, queues, and files.
75
+
76
+ ## What's new in 0.8.4?
77
+
78
+ MCP discovery now explains both supported deployment choices:
79
+
80
+ - DocsMint Cloud is the recommended route for connecting without running a server.
81
+ - Self-hosted DocsMint remains the complete Apache-2.0 alternative with the same
82
+ npm/stdio bridge, tools, prompts, resources and public contracts.
83
+ - Registry, LobeHub and npm descriptions include hybrid search, reranking,
84
+ GraphRAG and scoped document access, with source-aware onboarding links.
85
+ - The MCP guide explains Cloud browser authorization for OAuth-capable clients,
86
+ existing API-key configuration and the separate self-hosted setup.
87
+ - Release checks now verify built public exports and MCP binaries before packaging.
88
+ - Authorization regression coverage includes mixed category scopes, external tenant
89
+ assertions, scoped attachment deletion, workspace tags and partial category updates.
90
+ - A deterministic offline retrieval baseline makes evaluation repeatable without
91
+ claiming a change to live retrieval quality.
92
+
93
+ No database migration, tool redesign or SDK contract change is added. Hosted
94
+ OAuth is a DocsMint Cloud capability; this OSS release documents how to connect
95
+ and does not embed Cloud accounts, billing or analytics in self-hosted installs.
59
96
 
60
97
  Read the complete release history in the [changelog](CHANGELOG.md) or
61
98
  [GitHub Releases](https://github.com/HiAi-gg/docsmint/releases). See the
62
99
  [roadmap](docs/ROADMAP.md) for what comes next.
63
100
 
64
- ## Fastest installation: give this prompt to your agent
101
+ ## Install with an AI agent
65
102
 
66
- If you are installing DocsMint through an AI coding agent, use this path first.
67
- It keeps the setup to Docker plus one provider choice and avoids unnecessary
68
- source-code changes.
103
+ Prefer an assisted self-hosted setup? Give your coding agent this prompt.
104
+ You will need Docker and a choice of AI provider.
69
105
 
70
106
  ```text
71
107
  Install DocsMint from https://github.com/HiAi-gg/docsmint.
@@ -112,8 +148,8 @@ docker pull vgalibov/docsmint:web-latest
112
148
  docker pull vgalibov/docsmint:caddy-latest
113
149
  ```
114
150
 
115
- Use versioned tags such as `api-v0.8.1` for reproducible deploys. The
116
- quickstart still builds the Compose stack from this repository so PostgreSQL,
151
+ Use versioned tags `api-v0.8.4`, `web-v0.8.4`, and `caddy-v0.8.4` for
152
+ reproducible deploys. The quickstart still builds the Compose stack from this repository so PostgreSQL,
117
153
  Redis, and SeaweedFS start together with the application.
118
154
 
119
155
  For OpenRouter, add one value to `.env` and run the script again:
@@ -173,7 +209,7 @@ The published package includes the CLI. It connects to an already running
173
209
  DocsMint server; installing it does not deploy the server.
174
210
 
175
211
  ```bash
176
- npm install @hiai-gg/docsmint
212
+ bun add @hiai-gg/docsmint
177
213
  ```
178
214
 
179
215
  ```bash
@@ -218,7 +254,7 @@ Run the published stdio bridge against your own DocsMint API:
218
254
  "mcpServers": {
219
255
  "docsmint": {
220
256
  "command": "npx",
221
- "args": ["-y", "@hiai-gg/docsmint", "docsmint-mcp"],
257
+ "args": ["--yes", "--package", "@hiai-gg/docsmint", "docsmint-mcp"],
222
258
  "env": {
223
259
  "HIAI_DOCS_URL": "http://localhost:50700",
224
260
  "HIAI_DOCS_API_KEY": "your-global-or-category-key"
@@ -256,7 +292,8 @@ const results = await docs.search('what did we decide?');
256
292
  console.log(created.id, results.items);
257
293
  ```
258
294
 
259
- The SDK is a typed `fetch` client with retries for transient failures. See the
295
+ The SDK is a typed `fetch` client with retries for transient failures and
296
+ idempotent document creation retries. See the
260
297
  [SDK reference](packages/sdk/README.md) and [REST API](docs/API.md).
261
298
 
262
299
  ## API keys and integrations
@@ -283,6 +320,10 @@ affected by browser CORS. Browser integrations must add their exact origin to
283
320
 
284
321
  ## What is included?
285
322
 
323
+ Documents use structured TipTap JSON as canonical content. Markdown is the
324
+ source-editing, import, and export format. The same document store serves the
325
+ web application and public integration interfaces.
326
+
286
327
  ```text
287
328
  frontend/ SvelteKit workspace and TipTap editor
288
329
  backend/ Elysia REST API, search, workers, and authentication
@@ -328,7 +369,7 @@ For pipeline internals and tuning, see [Architecture](docs/ARCHITECTURE.md) and
328
369
 
329
370
  ## Stack
330
371
 
331
- - Bun, TypeScript, Elysia, Zod, and Pino
372
+ - Bun 1.4.0+, TypeScript, Elysia, Zod, and Pino
332
373
  - Svelte 5, SvelteKit, Tailwind CSS, and TipTap
333
374
  - Better Auth and Drizzle ORM
334
375
  - PostgreSQL 18, pgvector, pgvectorscale, and Apache AGE
@@ -336,23 +377,6 @@ For pipeline internals and tuning, see [Architecture](docs/ARCHITECTURE.md) and
336
377
  - SeaweedFS with its S3-compatible API
337
378
  - OpenAI-compatible providers through OpenRouter or local Ollama
338
379
 
339
- ## Comparison
340
-
341
- DocsMint overlaps with several excellent open-source knowledge tools, but its
342
- focus is a compact knowledge runtime shared equally by humans and agents.
343
-
344
- | Project | Primary strength | Difference from DocsMint |
345
- | ------------------------------------------------------------ | -------------------------------------------- | -------------------------------------------------------------------------------------- |
346
- | [Outline](https://github.com/outline/outline) | Polished team wiki and collaboration | DocsMint emphasizes built-in retrieval, GraphRAG, scoped agent access, CLI, and MCP |
347
- | [Docmost](https://github.com/docmost/docmost) | Collaborative wiki and real-time editing | DocsMint centers automatic embeddings and agent-facing integration surfaces |
348
- | [AppFlowy](https://github.com/AppFlowy-IO/AppFlowy) | Broad local-first productivity workspace | DocsMint is narrower: a self-hosted document and retrieval service |
349
- | [AnythingLLM](https://github.com/Mintplex-Labs/anything-llm) | Chat-oriented RAG over imported sources | DocsMint starts with the editable knowledge base and exposes it to many clients |
350
- | [Danswer](https://github.com/danswer-ai/danswer) / Onyx | Enterprise search across external connectors | DocsMint owns and edits its native corpus rather than primarily indexing other systems |
351
-
352
- This is a product-positioning summary, not a claim that every listed project
353
- lacks a feature. Check each project's current documentation when choosing a
354
- deployment.
355
-
356
380
  ## Documentation
357
381
 
358
382
  - [Documentation index](docs/README.md)
@@ -368,6 +392,8 @@ deployment.
368
392
 
369
393
  ## Development
370
394
 
395
+ Use Bun 1.4.0 or later for local development.
396
+
371
397
  ```bash
372
398
  bun install
373
399
  bun run lint