@hiai-gg/docsmint 0.5.10 → 0.6.1
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/LICENSE +39 -8
- package/README.md +90 -46
- package/dist/backend/index.js +797 -136
- package/dist/backend-account-runtime-cleanup.js +17 -0
- package/dist/backend-api-key-facade.js +17 -0
- package/dist/backend-pipeline-cancellation.js +17 -0
- package/dist/client.d.ts +6 -1
- package/dist/client.js +11 -0
- package/dist/frontend/HiAiEditor-DSVG3GNd.js +2986 -0
- package/dist/frontend/SettingsDialog-BDNgf5rv.js +969 -0
- package/dist/frontend/ShareDialog-2Mty7hm4.js +258 -0
- package/dist/frontend/{Sidebar-CzcLd6v5.js → Sidebar-DX08utdV.js} +2 -2
- package/dist/frontend/app-shell.js +27 -26
- package/dist/frontend/components/editor/compact-editor.d.ts +3 -0
- package/dist/frontend/components/editor/compact-editor.js +36 -0
- package/dist/frontend/components/editor/document-editor.js +2 -2986
- package/dist/frontend/components/settings.js +1 -1
- package/dist/frontend/components/share-dialog.d.ts +2 -1
- package/dist/frontend/components/share-dialog.js +1 -1
- package/dist/frontend/components/sidebar.js +1 -1
- package/dist/frontend/dashboard.js +1 -1
- package/dist/frontend/editor-preferences.d.ts +4 -0
- package/dist/frontend/editor-preferences.js +2 -0
- package/dist/frontend/editor-preferences.svelte-Bt_A9k7n.js +61 -0
- package/dist/frontend/frontend.css +1 -1
- package/dist/frontend-ssr/app-shell.js +3 -2
- package/dist/frontend-ssr/assets/HiAiEditor-CUOJmKzT.js +2358 -0
- package/dist/frontend-ssr/assets/{SettingsDialog-DVp0OxPO.js → SettingsDialog-BjJIiVLc.js} +2 -64
- package/dist/frontend-ssr/assets/{ShareDialog-BZd28sg-.js → ShareDialog-C9C-XTm4.js} +1 -1
- package/dist/frontend-ssr/assets/{Sidebar-CqsMw0Hd.js → Sidebar-C2sUfGNk.js} +2 -2
- package/dist/frontend-ssr/assets/editor-preferences.svelte-iI5jJM1x.js +65 -0
- package/dist/frontend-ssr/components/editor/compact-editor.js +19 -0
- package/dist/frontend-ssr/components/editor/document-editor.js +1 -2357
- package/dist/frontend-ssr/components/settings.js +1 -1
- package/dist/frontend-ssr/components/share-dialog.js +1 -1
- package/dist/frontend-ssr/components/sidebar.js +1 -1
- package/dist/frontend-ssr/dashboard.js +1 -1
- package/dist/frontend-ssr/editor-preferences.js +2 -0
- package/dist/lifecycle-runtime.js +16 -0
- package/dist/types.d.ts +31 -0
- package/package.json +20 -2
- package/packages/cli/src/index.ts +1 -1
- package/packages/db/src/index.ts +16 -7
- package/packages/db/src/schema.ts +34 -0
- package/packages/mcp-server/src/capabilities.ts +165 -0
- package/packages/mcp-server/src/client.ts +191 -138
- package/packages/mcp-server/src/index.ts +4 -104
- package/packages/mcp-server/src/server.ts +82 -0
- package/packages/mcp-server/src/tools/create-document.ts +26 -19
- package/packages/mcp-server/src/tools/create-folder.ts +19 -12
- package/packages/mcp-server/src/tools/update-document.ts +31 -17
- package/skills/docsmint-document-manager/SKILL.md +33 -0
- package/dist/frontend/SettingsDialog-CyZSOjLE.js +0 -1024
- package/dist/frontend/ShareDialog-BC-Jl6v1.js +0 -257
|
@@ -46,6 +46,7 @@ __export(exports_schema, {
|
|
|
46
46
|
documentRelations: () => documentRelations,
|
|
47
47
|
documentPipelineRuns: () => documentPipelineRuns,
|
|
48
48
|
documentPipelineBatches: () => documentPipelineBatches,
|
|
49
|
+
documentKnowledgeSummaries: () => documentKnowledgeSummaries,
|
|
49
50
|
documentEmbeddings: () => documentEmbeddings,
|
|
50
51
|
documentEmbeddingRelations: () => documentEmbeddingRelations,
|
|
51
52
|
documentCreateOperations: () => documentCreateOperations,
|
|
@@ -310,6 +311,22 @@ var documentPipelineBatches = pgTable("document_pipeline_batches", {
|
|
|
310
311
|
index("document_pipeline_batches_stage_status_available_idx").on(table.stage, table.status, table.availableAt),
|
|
311
312
|
index("document_pipeline_batches_document_id_idx").on(table.documentId)
|
|
312
313
|
]);
|
|
314
|
+
var documentKnowledgeSummaries = pgTable("document_knowledge_summaries", {
|
|
315
|
+
id: uuid().primaryKey().defaultRandom(),
|
|
316
|
+
document_id: uuid().notNull().references(() => documents.id, { onDelete: "cascade" }),
|
|
317
|
+
owner_id: uuid().notNull().references(() => users.id, { onDelete: "cascade" }),
|
|
318
|
+
workspace_id: text(),
|
|
319
|
+
generation_id: uuid().notNull(),
|
|
320
|
+
revision: text().notNull(),
|
|
321
|
+
language: text().notNull(),
|
|
322
|
+
description: text().notNull(),
|
|
323
|
+
keywords: text().array().notNull().default(sql`ARRAY[]::text[]`),
|
|
324
|
+
created_at: timestamp().defaultNow().notNull(),
|
|
325
|
+
updated_at: timestamp().defaultNow().notNull()
|
|
326
|
+
}, (table) => [
|
|
327
|
+
uniqueIndex("document_knowledge_summaries_document_generation_idx").on(table.document_id, table.generation_id),
|
|
328
|
+
index("document_knowledge_summaries_owner_document_idx").on(table.owner_id, table.document_id)
|
|
329
|
+
]);
|
|
313
330
|
var tags = pgTable("tags", {
|
|
314
331
|
id: uuid("id").primaryKey().defaultRandom(),
|
|
315
332
|
ownerId: uuid("owner_id").notNull().references(() => users.id, { onDelete: "cascade" }),
|
|
@@ -46,6 +46,7 @@ __export(exports_schema, {
|
|
|
46
46
|
documentRelations: () => documentRelations,
|
|
47
47
|
documentPipelineRuns: () => documentPipelineRuns,
|
|
48
48
|
documentPipelineBatches: () => documentPipelineBatches,
|
|
49
|
+
documentKnowledgeSummaries: () => documentKnowledgeSummaries,
|
|
49
50
|
documentEmbeddings: () => documentEmbeddings,
|
|
50
51
|
documentEmbeddingRelations: () => documentEmbeddingRelations,
|
|
51
52
|
documentCreateOperations: () => documentCreateOperations,
|
|
@@ -310,6 +311,22 @@ var documentPipelineBatches = pgTable("document_pipeline_batches", {
|
|
|
310
311
|
index("document_pipeline_batches_stage_status_available_idx").on(table.stage, table.status, table.availableAt),
|
|
311
312
|
index("document_pipeline_batches_document_id_idx").on(table.documentId)
|
|
312
313
|
]);
|
|
314
|
+
var documentKnowledgeSummaries = pgTable("document_knowledge_summaries", {
|
|
315
|
+
id: uuid().primaryKey().defaultRandom(),
|
|
316
|
+
document_id: uuid().notNull().references(() => documents.id, { onDelete: "cascade" }),
|
|
317
|
+
owner_id: uuid().notNull().references(() => users.id, { onDelete: "cascade" }),
|
|
318
|
+
workspace_id: text(),
|
|
319
|
+
generation_id: uuid().notNull(),
|
|
320
|
+
revision: text().notNull(),
|
|
321
|
+
language: text().notNull(),
|
|
322
|
+
description: text().notNull(),
|
|
323
|
+
keywords: text().array().notNull().default(sql`ARRAY[]::text[]`),
|
|
324
|
+
created_at: timestamp().defaultNow().notNull(),
|
|
325
|
+
updated_at: timestamp().defaultNow().notNull()
|
|
326
|
+
}, (table) => [
|
|
327
|
+
uniqueIndex("document_knowledge_summaries_document_generation_idx").on(table.document_id, table.generation_id),
|
|
328
|
+
index("document_knowledge_summaries_owner_document_idx").on(table.owner_id, table.document_id)
|
|
329
|
+
]);
|
|
313
330
|
var tags = pgTable("tags", {
|
|
314
331
|
id: uuid("id").primaryKey().defaultRandom(),
|
|
315
332
|
ownerId: uuid("owner_id").notNull().references(() => users.id, { onDelete: "cascade" }),
|
|
@@ -46,6 +46,7 @@ __export(exports_schema, {
|
|
|
46
46
|
documentRelations: () => documentRelations,
|
|
47
47
|
documentPipelineRuns: () => documentPipelineRuns,
|
|
48
48
|
documentPipelineBatches: () => documentPipelineBatches,
|
|
49
|
+
documentKnowledgeSummaries: () => documentKnowledgeSummaries,
|
|
49
50
|
documentEmbeddings: () => documentEmbeddings,
|
|
50
51
|
documentEmbeddingRelations: () => documentEmbeddingRelations,
|
|
51
52
|
documentCreateOperations: () => documentCreateOperations,
|
|
@@ -310,6 +311,22 @@ var documentPipelineBatches = pgTable("document_pipeline_batches", {
|
|
|
310
311
|
index("document_pipeline_batches_stage_status_available_idx").on(table.stage, table.status, table.availableAt),
|
|
311
312
|
index("document_pipeline_batches_document_id_idx").on(table.documentId)
|
|
312
313
|
]);
|
|
314
|
+
var documentKnowledgeSummaries = pgTable("document_knowledge_summaries", {
|
|
315
|
+
id: uuid().primaryKey().defaultRandom(),
|
|
316
|
+
document_id: uuid().notNull().references(() => documents.id, { onDelete: "cascade" }),
|
|
317
|
+
owner_id: uuid().notNull().references(() => users.id, { onDelete: "cascade" }),
|
|
318
|
+
workspace_id: text(),
|
|
319
|
+
generation_id: uuid().notNull(),
|
|
320
|
+
revision: text().notNull(),
|
|
321
|
+
language: text().notNull(),
|
|
322
|
+
description: text().notNull(),
|
|
323
|
+
keywords: text().array().notNull().default(sql`ARRAY[]::text[]`),
|
|
324
|
+
created_at: timestamp().defaultNow().notNull(),
|
|
325
|
+
updated_at: timestamp().defaultNow().notNull()
|
|
326
|
+
}, (table) => [
|
|
327
|
+
uniqueIndex("document_knowledge_summaries_document_generation_idx").on(table.document_id, table.generation_id),
|
|
328
|
+
index("document_knowledge_summaries_owner_document_idx").on(table.owner_id, table.document_id)
|
|
329
|
+
]);
|
|
313
330
|
var tags = pgTable("tags", {
|
|
314
331
|
id: uuid("id").primaryKey().defaultRandom(),
|
|
315
332
|
ownerId: uuid("owner_id").notNull().references(() => users.id, { onDelete: "cascade" }),
|
package/dist/client.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* failures (502 / 503 / 504 / timeout / network reset) are retried
|
|
8
8
|
* with exponential backoff up to `config.retries` attempts.
|
|
9
9
|
*/
|
|
10
|
-
import type { DocsApiKeyCreated, DocsApiKeyListResponse, DocsAttachment, DocsAttachmentConfirmInput, DocsAttachmentListResponse, DocsAttachmentPresignInput, DocsAttachmentPresignResponse, DocsCategory, DocsCategoryInput, DocsCategoryUpdate, DocsDocument, DocsDocumentCreateInput,
|
|
10
|
+
import type { DocsApiKeyCreated, DocsApiKeyListResponse, DocsAttachment, DocsAttachmentConfirmInput, DocsAttachmentListResponse, DocsAttachmentPresignInput, DocsAttachmentPresignResponse, DocsCategory, DocsCategoryInput, DocsCategoryUpdate, DocsDocument, DocsDocumentCreateInput, DocsDocumentCursorPage, DocsDocumentIndexRefresh, DocsDocumentIndexStatus, DocsDocumentKnowledgeSummary, DocsDocumentListResponse, DocsDocumentPipeline, DocsDocumentUpdateInput, DocsFolder, DocsFolderCreateInput, DocsFolderUpdateInput, DocsGraphEntitiesResponse, DocsGraphRelatedResponse, DocsGraphSearchResponse, DocsHealthResponse, DocsRequestContext, DocsSearchOptions, DocsSearchResponse, DocsSearchSuggestItem, DocsSharedContent, DocsShareLink, DocsShareListResponse, DocsShareRole, DocsTag, DocsVersion, DocsVersionDiff } from "./types.js";
|
|
11
11
|
export interface DocsClientConfig {
|
|
12
12
|
/** Base URL of the hiai-docs API, e.g. `http://localhost:50700`. */
|
|
13
13
|
baseUrl: string;
|
|
@@ -76,9 +76,14 @@ export declare class DocsClient {
|
|
|
76
76
|
categoryId?: string;
|
|
77
77
|
cursor?: string;
|
|
78
78
|
limit?: number;
|
|
79
|
+
sortBy?: import("./types").DocsDocumentSortField;
|
|
80
|
+
sortOrder?: import("./types").DocsSortOrder;
|
|
79
81
|
}, context?: DocsRequestContext): Promise<DocsDocumentCursorPage>;
|
|
80
82
|
duplicateDoc(id: string, context?: DocsRequestContext): Promise<DocsDocument>;
|
|
81
83
|
getDocumentPipeline(id: string, context?: DocsRequestContext): Promise<DocsDocumentPipeline>;
|
|
84
|
+
getDocumentKnowledgeSummary(id: string, context?: DocsRequestContext): Promise<DocsDocumentKnowledgeSummary>;
|
|
85
|
+
getDocumentIndexStatus(id: string, context?: DocsRequestContext): Promise<DocsDocumentIndexStatus>;
|
|
86
|
+
refreshDocumentIndex(id: string, context?: DocsRequestContext): Promise<DocsDocumentIndexRefresh>;
|
|
82
87
|
publishDoc(id: string, context?: DocsRequestContext): Promise<DocsDocument>;
|
|
83
88
|
unpublishDoc(id: string, context?: DocsRequestContext): Promise<DocsDocument>;
|
|
84
89
|
/**
|
package/dist/client.js
CHANGED
|
@@ -112,6 +112,8 @@ export class DocsClient {
|
|
|
112
112
|
categoryId: options.categoryId,
|
|
113
113
|
cursor: options.cursor,
|
|
114
114
|
limit: options.limit,
|
|
115
|
+
sortBy: options.sortBy,
|
|
116
|
+
sortOrder: options.sortOrder,
|
|
115
117
|
}),
|
|
116
118
|
}, context);
|
|
117
119
|
}
|
|
@@ -121,6 +123,15 @@ export class DocsClient {
|
|
|
121
123
|
async getDocumentPipeline(id, context) {
|
|
122
124
|
return this.request("GET", `/api/documents/${encodeURIComponent(id)}/pipeline`, undefined, context);
|
|
123
125
|
}
|
|
126
|
+
async getDocumentKnowledgeSummary(id, context) {
|
|
127
|
+
return this.request("GET", `/api/documents/${encodeURIComponent(id)}/knowledge-summary`, undefined, context);
|
|
128
|
+
}
|
|
129
|
+
async getDocumentIndexStatus(id, context) {
|
|
130
|
+
return this.request("GET", `/api/documents/${encodeURIComponent(id)}/index-status`, undefined, context);
|
|
131
|
+
}
|
|
132
|
+
async refreshDocumentIndex(id, context) {
|
|
133
|
+
return this.request("POST", `/api/documents/${encodeURIComponent(id)}/index/refresh`, undefined, context);
|
|
134
|
+
}
|
|
124
135
|
async publishDoc(id, context) {
|
|
125
136
|
return this.request("POST", `/api/documents/${encodeURIComponent(id)}/publish`, undefined, context);
|
|
126
137
|
}
|