@hiai-gg/docsmint 0.8.1 → 0.8.2

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 (83) hide show
  1. package/README.md +34 -148
  2. package/dist/backend/index.js +396 -39
  3. package/dist/backend-account-runtime-cleanup.js +2 -0
  4. package/dist/backend-api-key-facade.js +2 -0
  5. package/dist/backend-pipeline-cancellation.js +2 -0
  6. package/dist/client.d.ts +2 -1
  7. package/dist/client.js +3 -0
  8. package/dist/frontend/{CategoryDialog-D_xFSWGh.js → CategoryDialog-B6zqtwE6.js} +2 -2
  9. package/dist/frontend/{ConfirmDialog-Cfq3D2Di.js → ConfirmDialog-Dk7wwcj9.js} +1 -1
  10. package/dist/frontend/{CreateSnapshotDialog-BHODxZWK.js → CreateSnapshotDialog-BPYjO1qN.js} +2 -2
  11. package/dist/frontend/{DatePicker-CZyCnQ1q.js → DatePicker-SiGLx9yh.js} +46 -46
  12. package/dist/frontend/{DeleteDialog-DaJOO6SB.js → DeleteDialog-D1jox8h1.js} +2 -2
  13. package/dist/frontend/{FolderNode-C_91NlEO.js → FolderNode-BG4l6I5C.js} +100 -99
  14. package/dist/frontend/{HiAiEditor-DtUGbQg6.js → HiAiEditor-BpmzvTCP.js} +977 -1008
  15. package/dist/frontend/{SettingsDialog-BlIZqk2-.js → SettingsDialog-2d6ZA4Ze.js} +3 -3
  16. package/dist/frontend/Sidebar-Db_ffhAb.js +2149 -0
  17. package/dist/frontend/{TagCreateDialog-BlGz4O9Z.js → TagCreateDialog-C5j3H49u.js} +2 -2
  18. package/dist/frontend/app-shell.js +3 -3
  19. package/dist/frontend/components/category-dialog.js +1 -1
  20. package/dist/frontend/components/create-snapshot-dialog.js +1 -1
  21. package/dist/frontend/components/delete-dialog.js +1 -1
  22. package/dist/frontend/components/editor/compact-editor.js +1 -1
  23. package/dist/frontend/components/editor/document-editor.js +1 -1
  24. package/dist/frontend/components/editor/extensions.js +1 -1
  25. package/dist/frontend/components/editor/markdown-toggle.js +1 -1
  26. package/dist/frontend/components/editor/markdown.js +1 -1
  27. package/dist/frontend/components/folder-node.js +1 -1
  28. package/dist/frontend/components/save-as-dialog.js +2 -2
  29. package/dist/frontend/components/settings.js +1 -1
  30. package/dist/frontend/components/sidebar.js +1 -1
  31. package/dist/frontend/components/tag-create-dialog.js +1 -1
  32. package/dist/frontend/components/version-history.js +3 -3
  33. package/dist/frontend/dashboard.js +1034 -1034
  34. package/dist/frontend/{dialog-tHAH3-9M.js → dialog-DC97Hnxo.js} +1 -1
  35. package/dist/frontend/dist-BLpDfrDC.js +316 -0
  36. package/dist/frontend/dist-D7zL6zdU.js +40 -0
  37. package/dist/frontend/{dist-Cg1BpNS7.js → dist-qd_OnyUC.js} +492 -516
  38. package/dist/frontend/dropdown-menu-COZwS7c0.js +493 -0
  39. package/dist/frontend/editorExtensions-Cu__YKW7.js +158 -0
  40. package/dist/frontend/ellipsis-vertical-CObXWXZW.js +41 -0
  41. package/dist/frontend/frontend.css +1 -1
  42. package/dist/frontend/{editorExtensions-B-mKiWqq.js → lib-DYgslUw1.js} +6782 -6935
  43. package/dist/frontend/loader-circle-DnyUzAmN.js +25 -0
  44. package/dist/frontend/{markdown-CMij27Gg.js → markdown-Co8ZAKf4.js} +2 -1
  45. package/dist/frontend/search.js +2 -2
  46. package/dist/frontend/{confirm-dialog-BFTxjLv-.js → share-context-DooXPYKd.js} +2 -3
  47. package/dist/frontend/theme.js +1 -1
  48. package/dist/frontend/{theme.svelte-Bzitjfh9.js → theme.svelte-gLPpG6eU.js} +1 -0
  49. package/dist/frontend-ssr/app-shell.js +3 -3
  50. package/dist/frontend-ssr/assets/{FolderNode-CClgk8BL.js → FolderNode-CscMQ9sf.js} +2 -1
  51. package/dist/frontend-ssr/assets/{HiAiEditor-_-m7MJDd.js → HiAiEditor-DCpulE6N.js} +4 -50
  52. package/dist/frontend-ssr/assets/{SettingsDialog-BdvHRAxF.js → SettingsDialog-CpPxZahd.js} +1 -1
  53. package/dist/frontend-ssr/assets/{Sidebar-B3Saqn0O.js → Sidebar-BJ1XZ1DH.js} +7 -5
  54. package/dist/frontend-ssr/assets/dist-CshZmNmp.js +50 -0
  55. package/dist/frontend-ssr/assets/dist-DqeAICTy.js +300 -0
  56. package/dist/frontend-ssr/assets/{dropdown-menu-CdEpn_LT.js → dropdown-menu--acO7nXs.js} +1 -94
  57. package/dist/frontend-ssr/assets/ellipsis-vertical-BErUuhWg.js +96 -0
  58. package/dist/frontend-ssr/assets/{markdown-MhPwNWrC.js → markdown-Co31-Tl2.js} +1 -1
  59. package/dist/frontend-ssr/assets/{confirm-dialog-DeOR0SnQ.js → share-context-BvXQrIIH.js} +0 -1
  60. package/dist/frontend-ssr/assets/{theme.svelte-shZrSxz8.js → theme.svelte-CGgnJc3k.js} +1 -0
  61. package/dist/frontend-ssr/components/editor/compact-editor.js +1 -1
  62. package/dist/frontend-ssr/components/editor/document-editor.js +1 -1
  63. package/dist/frontend-ssr/components/editor/extensions.js +1 -1
  64. package/dist/frontend-ssr/components/editor/markdown-toggle.js +1 -1
  65. package/dist/frontend-ssr/components/editor/markdown.js +1 -1
  66. package/dist/frontend-ssr/components/folder-node.js +1 -1
  67. package/dist/frontend-ssr/components/settings.js +1 -1
  68. package/dist/frontend-ssr/components/sidebar.js +1 -1
  69. package/dist/frontend-ssr/dashboard.js +6 -4
  70. package/dist/frontend-ssr/search.js +1 -1
  71. package/dist/frontend-ssr/theme.js +1 -1
  72. package/dist/lifecycle-runtime.js +2 -0
  73. package/dist/mcp-cli.js +4 -1
  74. package/dist/mcp-server.js +4 -1
  75. package/dist/types.d.ts +12 -0
  76. package/package.json +1 -1
  77. package/packages/cli/src/index.ts +1 -1
  78. package/packages/db/src/schema.ts +2 -0
  79. package/server.json +2 -2
  80. package/dist/frontend/Sidebar-BVGm5BRR.js +0 -2147
  81. package/dist/frontend/dropdown-menu-AJYeFPHu.js +0 -530
  82. package/dist/frontend-ssr/assets/{DatePicker-TZVeMZ2S.js → DatePicker-CCylVH0q.js} +12 -12
  83. package/dist/frontend-ssr/assets/{editorExtensions-qNlZVP98.js → editorExtensions-rhletNji.js} +1 -1
package/README.md CHANGED
@@ -46,88 +46,20 @@ TypeScript SDK, CLI, and MCP server.
46
46
  - **Own the full stack**: application data, vectors, graph, queue, and files run
47
47
  on infrastructure you control.
48
48
 
49
- ## What's new in 0.8.1?
49
+ ## What's new in 0.8.2?
50
50
 
51
- - **GraphRAG expansion is connection-safe.** AGE reads pin `ag_catalog` on the
52
- same pooled connection as `cypher()`, so scoped search keeps graph neighbors
53
- even when the connection did not already have AGE first in `search_path`.
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.
54
59
 
55
- ## What's new in 0.7.9?
56
-
57
- - **GraphRAG on category/share search keeps inherited-folder neighbors.** The
58
- allowed document list is the ACL; category is not applied a second time.
59
-
60
- ## What's new in 0.7.8?
61
-
62
- - **GraphRAG still contributes after rerank.** Neighbors already in the fused
63
- prefix keep the graph channel, so scoped search does not lose graph evidence.
64
- - **Public API identity is DocsMint.** Health reports `service: "docsmint"`;
65
- startup and SDK errors no longer say `hiai-docs`.
66
-
67
- ## What's new in 0.7.7?
68
-
69
- - **Cross-encoder rerank is on by default.** After RRF, search reranks the
70
- original query against the fused prefix with Voyage `rerank-2.5` (Cohere
71
- and NVIDIA fallbacks). Provider failures keep RRF order. Set
72
- `SEARCH_RERANK_ENABLED=false` to turn it off.
73
- - **Live retrieval improved first-hit ranking.** On a 24-document labeled
74
- corpus, RRF+rerank moved MRR 0.969 → 1.000 and nDCG@10 0.958 → 0.986.
75
- Recall@10 stayed 1.0. The paraphrase query “operator API key header”
76
- moved the API-key document from rank 2 to rank 1 (MRR 0.50 → 1.00).
77
- - **Three-model fallbacks** for embeddings, extraction, expansion, and
78
- rerank so a single provider outage does not drop the channel.
79
-
80
- ## What's new in 0.7.6?
81
-
82
- - **Better Auth 1.6 rollback remains possible** after the issuer migration by
83
- deriving the legacy account issuer in a database trigger.
84
-
85
- ## What's new in 0.7.5?
86
-
87
- - **Runtime and dependency graph** to Bun 1.4, TypeScript 6, Better Auth 1.7,
88
- and current compatible editor/queue packages, with fail-closed issuer
89
- identity.
90
-
91
- ## What's new in 0.7.4?
92
-
93
- - **MCP Registry description fits the 100-character limit**, so official
94
- catalog publication can complete after 0.7.3 reached npm.
95
-
96
- ## What's new in 0.7.3?
97
-
98
- - **One public-link share dialog in OSS.** Dashboard, sidebar (including Recent),
99
- and the editor open the same public token share. Hosts can opt into restricted
100
- admission from `DocsmintAppShellHost`.
101
- - **Dialogs stay in their overlays** after hiai-ui 0.1, and nested routes load
102
- CSS from `/_app` instead of `./_app`.
103
- - **hiai-ui 0.1.3** for circular theme spread; Inter remains the product UI
104
- typeface.
105
-
106
- ## What's new in 0.7.2?
107
-
108
- - **Share view matches the editor.** Twitter/Twemoji SVG emoji images no longer
109
- expand across the public share column; they render as ordinary glyphs.
110
- - **Inter in the workspace chrome.** The sidebar uses the same Inter UI typeface
111
- as docsmint.com instead of the operating-system sans stack.
112
- - **MCP catalog 0.7.2.** Registry, LobeHub, and runtime metadata ship the dark
113
- catalog logo and the current product-aligned description.
114
-
115
- ## What's new in 0.7.0?
116
-
117
- - **Signed workspace assertions.** Trusted server-to-server hosts can restrict
118
- an assertion to one category with independent `read`, `edit`, and `write`
119
- permissions. An omitted scope remains workspace-wide and role-derived.
120
- - **Consistent effective-category authorization.** Direct and folder-inherited
121
- categories are enforced before counts, pagination, indexing, search, and
122
- GraphRAG retrieval. Index status is read-only; refresh requires write.
123
- - **Release-safe indexing.** Context-aware embedding generations and recovery
124
- prevent stale metadata work from becoming active.
125
-
126
- This OSS release adds no host RBAC, billing, invitations, or product UI. The
127
- 0.6.x reliability work — workspace-safe reindex, HTTPS sessions, trash-aware
128
- retrieval, explicit GraphRAG providers, MCP Registry identity, and the
129
- installable PWA — ships in this line. See the [changelog](CHANGELOG.md) for
130
- the complete history and the [roadmap](docs/ROADMAP.md) for what comes next.
60
+ Read the complete release history in the [changelog](CHANGELOG.md) or
61
+ [GitHub Releases](https://github.com/HiAi-gg/docsmint/releases). See the
62
+ [roadmap](docs/ROADMAP.md) for what comes next.
131
63
 
132
64
  ## Fastest installation: give this prompt to your agent
133
65
 
@@ -262,10 +194,24 @@ command and configuration precedence.
262
194
 
263
195
  ## Connect an MCP client
264
196
 
265
- DocsMint exposes document search, reading, creation, updates, categories,
266
- folders, tags, GraphRAG traversal, index status and refresh, snapshots,
267
- history, and export as MCP tools. It also publishes reusable prompts,
268
- context resources, and a document-manager skill for agent clients.
197
+ Give agents a secure path to search, read, and maintain your knowledge without
198
+ database or filesystem access. DocsMint publishes 17 tools plus ready-made
199
+ research prompts, scoped resources, and a document-manager skill.
200
+
201
+ ### Hosted DocsMint
202
+
203
+ Connect directly to the managed Streamable HTTP endpoint. Keep the API key in
204
+ an environment variable rather than writing it into client configuration:
205
+
206
+ ```bash
207
+ codex mcp add docsmint \
208
+ --url https://docsmint.com/mcp \
209
+ --bearer-token-env-var HIAI_DOCS_API_KEY
210
+ ```
211
+
212
+ ### Self-hosted DocsMint
213
+
214
+ Run the published stdio bridge against your own DocsMint API:
269
215
 
270
216
  ```json
271
217
  {
@@ -282,70 +228,10 @@ context resources, and a document-manager skill for agent clients.
282
228
  }
283
229
  ```
284
230
 
285
- Run the server directly to verify the installation:
286
-
287
- ```bash
288
- npx -y @hiai-gg/docsmint docsmint-mcp
289
- ```
290
-
291
- `npx` is the install path LobeHub and Node MCP clients validate. Bun checkouts can use
292
- `bunx --package @hiai-gg/docsmint docsmint-mcp` instead. The process speaks MCP on
293
- stdio and advertises tools, prompts, and resources without a running DocsMint API.
294
-
295
- The server uses stdio and works with MCP-capable clients such as Claude
296
- Desktop, Cursor, and coding agents that accept standard MCP configuration. See
297
- the [MCP guide](packages/mcp-server/README.md) for its 17 tools, prompts,
298
- resources, skill, and API routes.
299
-
300
- ## MCP Features
301
-
302
- ### Tools (17)
303
-
304
- - `search_documents`: Hybrid search (full-text + semantic pgvector).
305
- - `get_document`: Fetch document content and metadata.
306
- - `create_document`: Create a document with optional markdown, folder, and category.
307
- - `update_document`: Update title, content, folder, or category (new version on each save).
308
- - `list_documents`: Paginated document list, optionally filtered by folder or tag.
309
- - `list_folders`: List folders, optionally under a parent.
310
- - `create_folder`: Create a folder, optionally nested.
311
- - `create_snapshot`: Create a named snapshot of the current document.
312
- - `get_version_history`: List versions, optionally snapshots only.
313
- - `export_document`: Export a document as Markdown.
314
- - `list_categories`: List categories visible to the API key.
315
- - `create_category`: Create a category (workspace key with write access).
316
- - `list_tags`: List tags in the workspace or bound category.
317
- - `get_related_documents`: Traverse the knowledge graph from one authorized document.
318
- - `search_knowledge_graph`: Search connected knowledge from authorized seed documents.
319
- - `get_document_index_status`: Read indexing and knowledge-pipeline status.
320
- - `refresh_document_index`: Request reindexing after a document or metadata change.
321
-
322
- ### Prompts (2)
323
-
324
- - `organize_workspace`: Plan safe document organization using DocsMint categories and folders.
325
- - `research_workspace`: Research a question with hybrid search, GraphRAG, and rerank citing document IDs.
326
-
327
- ### Resources (3)
328
-
329
- - `docsmint://guide/editor`: Editor usage guide.
330
- - `docsmint://guide/search`: Search, GraphRAG, and rerank guide.
331
- - `docsmint://workspace/catalog`: Live scoped workspace catalog.
332
-
333
- ### Skills (1)
334
-
335
- - [`docsmint-document-manager`](skills/docsmint-document-manager/SKILL.md):
336
- create, organize, edit, and research DocsMint documents through the 17 MCP
337
- tools, including hybrid search, GraphRAG, rerank, and index refresh.
338
-
339
- The same Skill ships in the npm package under `skills/docsmint-document-manager/SKILL.md`.
340
-
341
- ## Agent skills after installation
342
-
343
- The MCP tools are the recommended portable agent skills. A category-bound agent
344
- can receive only the knowledge and operations it needs; a trusted personal
345
- agent can use a global key. Agents do not need database or filesystem access.
346
- After startup, create an API key in **Settings → API** and add the MCP block
347
- above to the agent client. For custom agent workflows, use the same key through
348
- the CLI, SDK, or REST API.
231
+ Category keys let you expose only the documents and operations an agent needs.
232
+ Use a global key only for trusted owner-wide automation. See the
233
+ [complete MCP reference](packages/mcp-server/README.md) for Bun, npm, local
234
+ checkout, all tools, prompts, resources, permissions, and REST mappings.
349
235
 
350
236
  ## TypeScript SDK
351
237