@hiai-gg/docsmint 2.0.4 → 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.
- package/README.md +67 -2
- package/dist/backend/index.js +22540 -2807
- package/dist/backend-account-runtime-cleanup.js +2 -1
- package/dist/backend-api-key-facade.js +2 -1
- package/dist/backend-pipeline-cancellation.js +2 -1
- package/dist/client.d.ts +33 -7
- package/dist/client.js +55 -1
- package/dist/frontend/{HiAiEditor-DDpfdQEg.js → HiAiEditor-D6ad_auS.js} +2 -2
- package/dist/frontend/{SettingsDialog-DzlYW50I.js → SettingsDialog-B8Oswuqb.js} +4 -4
- package/dist/frontend/{Sidebar-rFiVen96.js → Sidebar-BV0IDqTS.js} +1 -1
- package/dist/frontend/api/settings.js +1 -1
- package/dist/frontend/app-shell.js +2 -2
- package/dist/frontend/{auth-client-CXR-7mIO.js → auth-client-C5EyWdAF.js} +416 -349
- package/dist/frontend/components/editor/compact-editor.js +1 -1
- package/dist/frontend/components/editor/document-editor.js +1 -1
- package/dist/frontend/components/settings.js +1 -1
- package/dist/frontend/components/sidebar.js +1 -1
- package/dist/frontend/{db-Dya0HRhS.js → db-CgTtukT4.js} +1 -1
- package/dist/frontend/{identity-BOA7Jejv.js → identity-CNhtuCJV.js} +1 -1
- package/dist/frontend/offline/identity.js +1 -1
- package/dist/frontend/{settings-BRcYFQa_.js → settings-CHx4wBwb.js} +1 -1
- package/dist/frontend-ssr/api/settings.js +1 -1
- package/dist/frontend-ssr/app-shell.js +2 -2
- package/dist/frontend-ssr/assets/{HiAiEditor-Bj6tiE97.js → HiAiEditor-Cj3B2Dt6.js} +2 -2
- package/dist/frontend-ssr/assets/{SettingsDialog-h4SFwpUa.js → SettingsDialog-DAT-Zxu0.js} +4 -4
- package/dist/frontend-ssr/assets/{Sidebar-BFBpsd3L.js → Sidebar-B_Ey6QNL.js} +1 -1
- package/dist/frontend-ssr/assets/{auth-client-BC4hSFKF.js → auth-client-CITU3xkE.js} +308 -227
- package/dist/frontend-ssr/assets/{db-C3rFdTZa.js → db-DxRzq-kx.js} +1 -1
- package/dist/frontend-ssr/assets/{identity-DNIo1bgc.js → identity-B7ngLQzZ.js} +1 -1
- package/dist/frontend-ssr/assets/{settings-DWCpfCPj.js → settings-BRxvn30Y.js} +1 -1
- package/dist/frontend-ssr/components/editor/compact-editor.js +1 -1
- package/dist/frontend-ssr/components/editor/document-editor.js +1 -1
- package/dist/frontend-ssr/components/settings.js +1 -1
- package/dist/frontend-ssr/components/sidebar.js +1 -1
- package/dist/frontend-ssr/offline/identity.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/lifecycle-runtime.js +4 -1
- package/dist/mcp-cli.js +301 -22
- package/dist/mcp-server.d.ts +92 -23
- package/dist/mcp-server.js +469 -22
- package/dist/types.d.ts +68 -1
- package/package.json +2 -2
- package/packages/cli/src/index.ts +1 -1
- package/packages/db/src/schema.ts +3 -1
- package/server.json +2 -2
package/README.md
CHANGED
|
@@ -15,6 +15,7 @@ Apache-2.0 application on your own infrastructure.
|
|
|
15
15
|
[](https://www.npmjs.com/package/@hiai-gg/docsmint)
|
|
16
16
|
[](https://hub.docker.com/r/vgalibov/docsmint)
|
|
17
17
|
[](https://github.com/hiai-gg/docsmint/actions/workflows/ci.yml)
|
|
18
|
+
[](https://hol.org/registry/plugins/hiai-gg%2Fdocsmint)
|
|
18
19
|
|
|
19
20
|
[](https://glama.ai/mcp/servers/HiAi-gg/docsmint)
|
|
20
21
|
[](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
|
|
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
|
|
@@ -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
|
|
410
|
+
packages/mcp-server/ MCP stdio and HTTP contract
|
|
346
411
|
postgres/ PostgreSQL image with vector and graph extensions
|
|
347
412
|
```
|
|
348
413
|
|