@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/dist/types.d.ts CHANGED
@@ -14,6 +14,9 @@
14
14
  * `metadata` fields.
15
15
  */
16
16
  export interface DocsDocument {
17
+ workspaceId?: string | null;
18
+ workspaceSlug?: string | null;
19
+ url?: string | null;
17
20
  id: string;
18
21
  ownerId: string;
19
22
  folderId: string | null;
@@ -51,6 +54,12 @@ export interface DocsDocumentUpdateInput {
51
54
  * `metadata` are not included.
52
55
  */
53
56
  export interface DocsDocumentListItem {
57
+ effectiveCategoryId?: string | null;
58
+ effectiveCategoryName?: string | null;
59
+ preview?: string;
60
+ workspaceId?: string | null;
61
+ workspaceSlug?: string | null;
62
+ url?: string | null;
54
63
  id: string;
55
64
  title: string;
56
65
  content: string;
@@ -70,10 +79,11 @@ export interface DocsDocumentListResponse {
70
79
  }
71
80
  /** Opaque, scope-bound cursor returned by the bounded document listing API. */
72
81
  export interface DocsDocumentCursorPage {
82
+ total?: number;
73
83
  items: DocsDocumentListItem[];
74
84
  nextCursor: string | null;
75
85
  }
76
- export type DocsDocumentSortField = "title" | "category" | "folder" | "updated";
86
+ export type DocsDocumentSortField = "title" | "category" | "folder" | "updated" | "updatedAt" | "createdAt";
77
87
  export type DocsSortOrder = "asc" | "desc";
78
88
  export interface DocsFolder {
79
89
  id: string;
@@ -156,6 +166,17 @@ export interface DocsTrashResponse {
156
166
  * consumers don't need to remap.
157
167
  */
158
168
  export interface DocsSearchResult {
169
+ effectiveCategoryId?: string | null;
170
+ effectiveCategoryName?: string | null;
171
+ folderId?: string | null;
172
+ folderName?: string | null;
173
+ categoryId?: string | null;
174
+ categoryName?: string | null;
175
+ createdAt?: string;
176
+ updatedAt?: string;
177
+ workspaceId?: string | null;
178
+ workspaceSlug?: string | null;
179
+ url?: string | null;
159
180
  id: string;
160
181
  title: string;
161
182
  snippet: string;
@@ -199,6 +220,7 @@ export interface DocsSearchOptions {
199
220
  graphHops?: number;
200
221
  graphBoost?: number;
201
222
  includeChunks?: boolean;
223
+ includeDiagnostics?: boolean;
202
224
  }
203
225
  export interface DocsGraphEntity {
204
226
  name: string;
@@ -468,3 +490,48 @@ export interface DocsRequestContext {
468
490
  /** Idempotency key forwarded as the standard Idempotency-Key header. */
469
491
  idempotencyKey?: string;
470
492
  }
493
+ /** Additive page-based list filters. All filters are applied server-side. */
494
+ export interface DocsListOptions {
495
+ visibility?: "private" | "shared" | "public";
496
+ folderId?: string;
497
+ categoryId?: string;
498
+ rootOnly?: boolean;
499
+ tag?: string;
500
+ tagIds?: string[];
501
+ tagMatch?: "all" | "any";
502
+ q?: string;
503
+ updatedFrom?: string;
504
+ updatedTo?: string;
505
+ sortBy?: "updatedAt" | "createdAt" | "title";
506
+ sortOrder?: "asc" | "desc";
507
+ page?: number;
508
+ limit?: number;
509
+ }
510
+ export interface DocsWorkspaceDescriptor {
511
+ id: string | null;
512
+ name: string;
513
+ slug: string | null;
514
+ entireWorkspace: boolean;
515
+ categoryIds: string[];
516
+ }
517
+ export interface DocsIdentity {
518
+ principalType: "account" | "workspace" | "category";
519
+ scopes: string[];
520
+ permissions: Array<"read" | "edit" | "write">;
521
+ workspace: {
522
+ id: string | null;
523
+ slug: string | null;
524
+ } | null;
525
+ categoryId: string | null;
526
+ plan: string | null;
527
+ }
528
+ export interface DocsDocumentExport {
529
+ id?: string;
530
+ title?: string;
531
+ updatedAt?: string;
532
+ markdown: string;
533
+ filename?: string;
534
+ workspaceId?: string | null;
535
+ workspaceSlug?: string | null;
536
+ url?: string | null;
537
+ }
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.0.3",
4
+ "version": "2.1.0",
5
5
  "type": "module",
6
6
  "browser": {
7
7
  "./dist/backend-launcher.js": false,
@@ -15,7 +15,7 @@
15
15
  "./dist/backend-account-runtime-cleanup.js": false
16
16
  },
17
17
  "license": "Apache-2.0",
18
- "description": "DocsMint SDK and CLI plus a self-hosted MCP stdio bridge that uses your API key. For DocsMint Cloud MCP, connect to https://docsmint.com/mcp.",
18
+ "description": "DocsMint SDK and CLI plus a self-hosted MCP stdio bridge and scoped HTTP transport. For DocsMint Cloud MCP, connect to https://docsmint.com/mcp.",
19
19
  "repository": {
20
20
  "type": "git",
21
21
  "url": "https://github.com/HiAi-gg/docsmint"
@@ -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.0.3';
28
+ const VERSION = '2.1.0';
29
29
 
30
30
  const program = new Command();
31
31
  program.name('docsmint').description('CLI for the DocsMint knowledge workspace').version(VERSION);
@@ -110,10 +110,12 @@ export const accounts = pgTable("accounts", {
110
110
  id: uuid("id").primaryKey().defaultRandom(),
111
111
  userId: uuid("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
112
112
  accountId: text("account_id").notNull(),
113
- issuer: text("issuer").notNull(),
113
+ // Retained for rollback; the database trigger fills omitted legacy issuers.
114
+ issuer: text("issuer"),
114
115
  providerId: text("provider_id").notNull(),
115
116
  accessToken: text("access_token"),
116
117
  refreshToken: text("refresh_token"),
118
+ idToken: text("id_token"),
117
119
  accessTokenExpiresAt: timestamp("access_token_expires_at"),
118
120
  refreshTokenExpiresAt: timestamp("refresh_token_expires_at"),
119
121
  scope: text("scope"),
package/server.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "id": "1249550690",
11
11
  "subfolder": "packages/mcp-server"
12
12
  },
13
- "version": "2.0.3",
13
+ "version": "2.1.0",
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.0.3",
37
+ "version": "2.1.0",
38
38
  "runtimeHint": "npx",
39
39
  "transport": {
40
40
  "type": "stdio"