@hiai-gg/docsmint 2.0.3 → 2.1.0

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 (46) hide show
  1. package/README.md +68 -3
  2. package/dist/backend/index.js +22540 -2807
  3. package/dist/backend-account-runtime-cleanup.js +2 -1
  4. package/dist/backend-api-key-facade.js +2 -1
  5. package/dist/backend-pipeline-cancellation.js +2 -1
  6. package/dist/client.d.ts +33 -7
  7. package/dist/client.js +55 -1
  8. package/dist/frontend/{HiAiEditor-DDpfdQEg.js → HiAiEditor-D6ad_auS.js} +2 -2
  9. package/dist/frontend/{SettingsDialog-DzlYW50I.js → SettingsDialog-B8Oswuqb.js} +4 -4
  10. package/dist/frontend/{Sidebar-rFiVen96.js → Sidebar-BV0IDqTS.js} +1 -1
  11. package/dist/frontend/api/settings.js +1 -1
  12. package/dist/frontend/app-shell.js +45 -36
  13. package/dist/frontend/{auth-client-CXR-7mIO.js → auth-client-C5EyWdAF.js} +416 -349
  14. package/dist/frontend/components/editor/compact-editor.js +1 -1
  15. package/dist/frontend/components/editor/document-editor.js +1 -1
  16. package/dist/frontend/components/settings.js +1 -1
  17. package/dist/frontend/components/sidebar.js +1 -1
  18. package/dist/frontend/{db-Dya0HRhS.js → db-CgTtukT4.js} +1 -1
  19. package/dist/frontend/{identity-BOA7Jejv.js → identity-CNhtuCJV.js} +1 -1
  20. package/dist/frontend/offline/identity.js +1 -1
  21. package/dist/frontend/{settings-BRcYFQa_.js → settings-CHx4wBwb.js} +1 -1
  22. package/dist/frontend-ssr/api/settings.js +1 -1
  23. package/dist/frontend-ssr/app-shell.js +2 -2
  24. package/dist/frontend-ssr/assets/{HiAiEditor-Bj6tiE97.js → HiAiEditor-Cj3B2Dt6.js} +2 -2
  25. package/dist/frontend-ssr/assets/{SettingsDialog-h4SFwpUa.js → SettingsDialog-DAT-Zxu0.js} +4 -4
  26. package/dist/frontend-ssr/assets/{Sidebar-BFBpsd3L.js → Sidebar-B_Ey6QNL.js} +1 -1
  27. package/dist/frontend-ssr/assets/{auth-client-BC4hSFKF.js → auth-client-CITU3xkE.js} +308 -227
  28. package/dist/frontend-ssr/assets/{db-C3rFdTZa.js → db-DxRzq-kx.js} +1 -1
  29. package/dist/frontend-ssr/assets/{identity-DNIo1bgc.js → identity-B7ngLQzZ.js} +1 -1
  30. package/dist/frontend-ssr/assets/{settings-DWCpfCPj.js → settings-BRxvn30Y.js} +1 -1
  31. package/dist/frontend-ssr/components/editor/compact-editor.js +1 -1
  32. package/dist/frontend-ssr/components/editor/document-editor.js +1 -1
  33. package/dist/frontend-ssr/components/settings.js +1 -1
  34. package/dist/frontend-ssr/components/sidebar.js +1 -1
  35. package/dist/frontend-ssr/offline/identity.js +1 -1
  36. package/dist/index.d.ts +1 -1
  37. package/dist/index.js +1 -1
  38. package/dist/lifecycle-runtime.js +4 -1
  39. package/dist/mcp-cli.js +301 -22
  40. package/dist/mcp-server.d.ts +92 -23
  41. package/dist/mcp-server.js +469 -22
  42. package/dist/types.d.ts +68 -1
  43. package/package.json +2 -2
  44. package/packages/cli/src/index.ts +1 -1
  45. package/packages/db/src/schema.ts +3 -1
  46. package/server.json +2 -2
package/README.md CHANGED
@@ -15,6 +15,7 @@ Apache-2.0 application on your own infrastructure.
15
15
  [![npm](https://img.shields.io/npm/v/@hiai-gg/docsmint?logo=npm)](https://www.npmjs.com/package/@hiai-gg/docsmint)
16
16
  [![Docker Pulls](https://img.shields.io/docker/pulls/vgalibov/docsmint?logo=docker)](https://hub.docker.com/r/vgalibov/docsmint)
17
17
  [![CI](https://github.com/hiai-gg/docsmint/actions/workflows/ci.yml/badge.svg)](https://github.com/hiai-gg/docsmint/actions/workflows/ci.yml)
18
+ [![HOL Registry trust](https://img.shields.io/endpoint?url=https%3A%2F%2Fhol.org%2Fapi%2Fregistry%2Fbadges%2Fplugin%3Fslug%3Dhiai-gg%252Fdocsmint)](https://hol.org/registry/plugins/hiai-gg%2Fdocsmint)
18
19
 
19
20
  [![DocsMint MCP server](https://glama.ai/mcp/servers/HiAi-gg/docsmint/badges/score.svg)](https://glama.ai/mcp/servers/HiAi-gg/docsmint)
20
21
  [![MCP Badge](https://lobehub.com/badge/mcp/hiai-gg-docsmint)](https://lobehub.com/mcp/hiai-gg-docsmint)
@@ -83,7 +84,17 @@ is a separate listing.
83
84
  - **Choose how you run it.** Use [managed DocsMint](https://docsmint.com) or
84
85
  self-host the application, database, search, queues, and files.
85
86
 
86
- ## What's new in 2.0.3?
87
+ ## What's new in 2.1.0?
88
+
89
+ - Add stateless Bearer HTTP MCP for self-hosted installations, including the public web-origin proxy and configurable Origin/CORS policy.
90
+ - Keep the 22-tool catalog and generate schemas, annotations and branch examples from real MCP discovery.
91
+ - Return redacted argument diagnostics as JSON-RPC errors without replacing upstream dispatch; keep compatible compact text and structured results.
92
+ - Add server-side document filters, stable cursor pagination, scoped totals, previews, metadata-rich export and normalized search fields.
93
+ - Add credential/workspace discovery and an explicit SDK API prefix while retaining existing routes, fields and methods.
94
+
95
+ [2.1.0 release notes](docs/release/v2.1.0-notes.md).
96
+
97
+ ## Previous release: 2.0.4
87
98
 
88
99
  Hosted MCP integrations can discover granted workspaces, including empty spaces, with
89
100
  `list_workspace_structure(kind="workspaces")` and select one with the optional
@@ -93,7 +104,7 @@ results and independent pagination. Existing single-scope calls remain compatibl
93
104
 
94
105
  The OSS frontend adopts SvelteKit 3; dependency updates resolve the current security
95
106
  audit findings. No database migration is required. See the
96
- [2.0.3 release notes](docs/release/v2.0.3-notes.md).
107
+ [2.0.4 release notes](docs/release/v2.0.4-notes.md).
97
108
 
98
109
  ## Previous release: 1.0.3
99
110
 
@@ -281,6 +292,60 @@ Use a global key only for trusted owner-wide automation. See the
281
292
  [complete MCP reference](https://github.com/HiAi-gg/docsmint/blob/main/packages/mcp-server/README.md) for Bun, npm, local
282
293
  checkout, all tools, prompts, resources, permissions, and REST mappings.
283
294
 
295
+ ### Self-hosted HTTP
296
+
297
+ The same 22-tool contract is also available at `/mcp` on your installation's
298
+ **public web origin**. With the default Compose ports, that is
299
+ `http://localhost:50701/mcp`; with Caddy, use your normal application domain,
300
+ such as `https://docs.example.com/mcp`. The web server streams requests to the
301
+ backend using its trusted `API_URL` setting (`http://api:50700` in Compose).
302
+ Do not point `API_URL` back at the public web server.
303
+
304
+ Create a global or category-scoped key in **Settings → API**, then supply it
305
+ as an environment variable to your MCP client:
306
+
307
+ ```bash
308
+ codex mcp add docsmint-selfhost \
309
+ --url https://docs.example.com/mcp \
310
+ --bearer-token-env-var HIAI_DOCS_API_KEY
311
+ ```
312
+
313
+ Self-hosted HTTP uses `Authorization: Bearer <key>`; it does not implement
314
+ DocsMint Cloud OAuth or accept a browser session as an API credential. Category
315
+ keys keep their existing category and independent read/edit/write restrictions.
316
+ An ordinary OSS installation has a personal space rather than Cloud workspace
317
+ slugs: omit `X-Docsmint-Workspace` on these requests.
318
+
319
+ Configure the public application URL and the exact browser origins you trust:
320
+
321
+ ```dotenv
322
+ PUBLIC_APP_URL=https://docs.example.com
323
+ CORS_ORIGINS=https://docs.example.com,https://trusted-client.example.com
324
+ MCP_HTTP_ENABLED=true
325
+ ```
326
+
327
+ `PUBLIC_APP_URL` is used for trusted absolute document links; leaving it unset
328
+ keeps OSS document links relative. `CORS_ORIGINS` applies to the HTTP integration
329
+ endpoints. An allowed browser origin receives CORS headers, an unknown Origin
330
+ is rejected, and authenticated server clients may omit Origin. Do not use a
331
+ wildcard for credentialed browser access. Compose passes these settings to the
332
+ API container; restart the application through your normal deployment workflow
333
+ after changing them.
334
+
335
+ The HTTP transport is stateless and does not issue `Mcp-Session-Id`. Send MCP
336
+ JSON-RPC through POST; accepted notifications return 202. GET and DELETE return
337
+ 405 because this endpoint provides neither a standalone SSE listener nor
338
+ server-side sessions. Clients must accept JSON and SSE responses: the installed
339
+ MCP SDK can use SSE for legacy protocol requests even when modern JSON mode is
340
+ configured. `/mcp/` is normalized internally without redirecting the POST or
341
+ dropping its Bearer header. The proxy preserves response status, authentication
342
+ challenges, CORS headers and streaming bodies, and does not forward browser
343
+ cookies or server workspace assertions as authority.
344
+
345
+ Set `MCP_HTTP_ENABLED=false` to disable this HTTP endpoint independently. The
346
+ existing REST API and stdio bridge remain available; existing stdio client
347
+ configuration does not need to change.
348
+
284
349
  ## TypeScript SDK
285
350
 
286
351
  ```bash
@@ -342,7 +407,7 @@ backend/ Elysia REST API, search, workers, and authentication
342
407
  packages/db/ Drizzle schema and migrations
343
408
  packages/sdk/ Typed API client
344
409
  packages/cli/ Terminal client
345
- packages/mcp-server/ MCP stdio server
410
+ packages/mcp-server/ MCP stdio and HTTP contract
346
411
  postgres/ PostgreSQL image with vector and graph extensions
347
412
  ```
348
413