@dsh-libing/knowledge-base 0.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/CHANGELOG.md +16 -0
- package/README.md +80 -0
- package/cordis.patch.yml +3 -0
- package/icon.svg +6 -0
- package/lib/chunks.d.ts +8 -0
- package/lib/chunks.js +197 -0
- package/lib/client-types/client/BrowsePanel.d.ts +13 -0
- package/lib/client-types/client/Icon.d.ts +4 -0
- package/lib/client-types/client/ImageReview.d.ts +20 -0
- package/lib/client-types/client/ImportPanel.d.ts +19 -0
- package/lib/client-types/client/JobsPanel.d.ts +6 -0
- package/lib/client-types/client/KnowledgePage.d.ts +7 -0
- package/lib/client-types/client/Metadata.d.ts +10 -0
- package/lib/client-types/client/QualityReport.d.ts +6 -0
- package/lib/client-types/client/SettingsPanel.d.ts +6 -0
- package/lib/client-types/client/SourceText.d.ts +3 -0
- package/lib/client-types/client/UsageGuide.d.ts +8 -0
- package/lib/client-types/client/api.d.ts +953 -0
- package/lib/client-types/client/common.d.ts +11 -0
- package/lib/client-types/client/index.d.ts +14 -0
- package/lib/client-types/client/locales.d.ts +284 -0
- package/lib/client-types/client/searchCommand.d.ts +2 -0
- package/lib/client-types/client/useKnowledge.d.ts +251 -0
- package/lib/client-types/contract.d.ts +1197 -0
- package/lib/client-types/data.d.ts +1972 -0
- package/lib/client-types/settings.d.ts +33 -0
- package/lib/client-types/shared.d.ts +95 -0
- package/lib/client.js +305 -0
- package/lib/config.d.ts +13 -0
- package/lib/config.js +13 -0
- package/lib/contract.d.ts +1197 -0
- package/lib/contract.js +18 -0
- package/lib/data.d.ts +1972 -0
- package/lib/data.js +80 -0
- package/lib/document/convert.d.ts +5 -0
- package/lib/document/convert.js +325 -0
- package/lib/document/pdf-data.d.ts +99 -0
- package/lib/document/pdf-data.js +9 -0
- package/lib/document/pdf-layout.d.ts +24 -0
- package/lib/document/pdf-layout.js +234 -0
- package/lib/document/pdf-session.d.ts +39 -0
- package/lib/document/pdf-session.js +127 -0
- package/lib/document/pdf-vision.d.ts +26 -0
- package/lib/document/pdf-vision.js +115 -0
- package/lib/document/pdf-worker.d.ts +1 -0
- package/lib/document/pdf-worker.js +210 -0
- package/lib/document/pdf.d.ts +3 -0
- package/lib/document/pdf.js +218 -0
- package/lib/document/zip.d.ts +3 -0
- package/lib/document/zip.js +59 -0
- package/lib/figures/process.d.ts +187 -0
- package/lib/figures/process.js +159 -0
- package/lib/figures/prompts.d.ts +7 -0
- package/lib/figures/prompts.js +27 -0
- package/lib/index.d.ts +8 -0
- package/lib/index.js +42 -0
- package/lib/indexes.d.ts +38 -0
- package/lib/indexes.js +101 -0
- package/lib/jobs.d.ts +2806 -0
- package/lib/jobs.js +435 -0
- package/lib/models.d.ts +24 -0
- package/lib/models.js +120 -0
- package/lib/retrieval.d.ts +209 -0
- package/lib/retrieval.js +173 -0
- package/lib/routes.d.ts +3 -0
- package/lib/routes.js +152 -0
- package/lib/runtime.d.ts +48 -0
- package/lib/runtime.js +41 -0
- package/lib/settings.d.ts +33 -0
- package/lib/settings.js +19 -0
- package/lib/shared.d.ts +95 -0
- package/lib/shared.js +17 -0
- package/lib/skills.d.ts +3 -0
- package/lib/skills.js +21 -0
- package/lib/store.d.ts +409 -0
- package/lib/store.js +328 -0
- package/lib/tools.d.ts +3 -0
- package/lib/tools.js +72 -0
- package/lib/util.d.ts +25 -0
- package/lib/util.js +89 -0
- package/package.json +125 -0
- package/skills/libing-kb-build/SKILL.md +10 -0
- package/skills/libing-kb-search/SKILL.md +10 -0
- package/skills/libing-knowledge-base/SKILL.md +15 -0
- package/skills/libing-knowledge-base/references/build.md +23 -0
- package/skills/libing-knowledge-base/references/search.md +21 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const settingsSchema: z.ZodObject<{
|
|
3
|
+
dataRoot: z.ZodString;
|
|
4
|
+
chunkTargetChars: z.ZodDefault<z.ZodNumber>;
|
|
5
|
+
evidenceMaxChars: z.ZodDefault<z.ZodNumber>;
|
|
6
|
+
catalogMaxChars: z.ZodDefault<z.ZodNumber>;
|
|
7
|
+
candidateLimit: z.ZodDefault<z.ZodNumber>;
|
|
8
|
+
maxInputBytes: z.ZodDefault<z.ZodNumber>;
|
|
9
|
+
maxUncompressedBytes: z.ZodDefault<z.ZodNumber>;
|
|
10
|
+
maxArchiveEntries: z.ZodDefault<z.ZodNumber>;
|
|
11
|
+
modelTimeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
12
|
+
modelAttempts: z.ZodDefault<z.ZodNumber>;
|
|
13
|
+
visionConcurrency: z.ZodDefault<z.ZodNumber>;
|
|
14
|
+
maxModelCalls: z.ZodDefault<z.ZodNumber>;
|
|
15
|
+
maxModelTokens: z.ZodDefault<z.ZodNumber>;
|
|
16
|
+
visionMaxEdge: z.ZodDefault<z.ZodNumber>;
|
|
17
|
+
visionTileSize: z.ZodDefault<z.ZodNumber>;
|
|
18
|
+
visionMaxTiles: z.ZodDefault<z.ZodNumber>;
|
|
19
|
+
modelMaxOutputTokens: z.ZodDefault<z.ZodNumber>;
|
|
20
|
+
summaryMaxChars: z.ZodDefault<z.ZodNumber>;
|
|
21
|
+
figureMaxChars: z.ZodDefault<z.ZodNumber>;
|
|
22
|
+
pdfMaxPages: z.ZodDefault<z.ZodNumber>;
|
|
23
|
+
pdfMaxPagePixels: z.ZodDefault<z.ZodNumber>;
|
|
24
|
+
pdfPageTimeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
25
|
+
libreOfficePath: z.ZodDefault<z.ZodString>;
|
|
26
|
+
visionProvider: z.ZodDefault<z.ZodString>;
|
|
27
|
+
visionModel: z.ZodDefault<z.ZodString>;
|
|
28
|
+
summaryProvider: z.ZodDefault<z.ZodString>;
|
|
29
|
+
summaryModel: z.ZodDefault<z.ZodString>;
|
|
30
|
+
skipImages: z.ZodDefault<z.ZodBoolean>;
|
|
31
|
+
acceptPartial: z.ZodDefault<z.ZodBoolean>;
|
|
32
|
+
}, z.core.$strict>;
|
|
33
|
+
export type Settings = z.output<typeof settingsSchema>;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const API = "/api/libing-knowledge-base";
|
|
3
|
+
export declare const buildSchema: z.ZodObject<{
|
|
4
|
+
kbId: z.ZodString;
|
|
5
|
+
createKb: z.ZodOptional<z.ZodBoolean>;
|
|
6
|
+
sourcePath: z.ZodOptional<z.ZodString>;
|
|
7
|
+
receiptId: z.ZodOptional<z.ZodString>;
|
|
8
|
+
title: z.ZodOptional<z.ZodString>;
|
|
9
|
+
sourceVersion: z.ZodOptional<z.ZodString>;
|
|
10
|
+
docId: z.ZodOptional<z.ZodString>;
|
|
11
|
+
chunkTargetChars: z.ZodOptional<z.ZodNumber>;
|
|
12
|
+
pageStart: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
pageEnd: z.ZodOptional<z.ZodNumber>;
|
|
14
|
+
confirmRangeChange: z.ZodOptional<z.ZodBoolean>;
|
|
15
|
+
visionProvider: z.ZodOptional<z.ZodString>;
|
|
16
|
+
visionModel: z.ZodOptional<z.ZodString>;
|
|
17
|
+
summaryProvider: z.ZodOptional<z.ZodString>;
|
|
18
|
+
summaryModel: z.ZodOptional<z.ZodString>;
|
|
19
|
+
skipImages: z.ZodOptional<z.ZodBoolean>;
|
|
20
|
+
acceptPartial: z.ZodOptional<z.ZodBoolean>;
|
|
21
|
+
}, z.core.$strict>;
|
|
22
|
+
export declare const browserBuildSchema: z.ZodObject<{
|
|
23
|
+
kbId: z.ZodString;
|
|
24
|
+
title: z.ZodOptional<z.ZodString>;
|
|
25
|
+
sourceVersion: z.ZodOptional<z.ZodString>;
|
|
26
|
+
docId: z.ZodOptional<z.ZodString>;
|
|
27
|
+
chunkTargetChars: z.ZodOptional<z.ZodNumber>;
|
|
28
|
+
pageStart: z.ZodOptional<z.ZodNumber>;
|
|
29
|
+
pageEnd: z.ZodOptional<z.ZodNumber>;
|
|
30
|
+
confirmRangeChange: z.ZodOptional<z.ZodBoolean>;
|
|
31
|
+
visionProvider: z.ZodOptional<z.ZodString>;
|
|
32
|
+
visionModel: z.ZodOptional<z.ZodString>;
|
|
33
|
+
summaryProvider: z.ZodOptional<z.ZodString>;
|
|
34
|
+
summaryModel: z.ZodOptional<z.ZodString>;
|
|
35
|
+
skipImages: z.ZodOptional<z.ZodBoolean>;
|
|
36
|
+
acceptPartial: z.ZodOptional<z.ZodBoolean>;
|
|
37
|
+
receiptId: z.ZodString;
|
|
38
|
+
}, z.core.$strict>;
|
|
39
|
+
export type BuildArgs = z.infer<typeof buildSchema> & {
|
|
40
|
+
sourceFilename?: string | undefined;
|
|
41
|
+
figureRefresh?: {
|
|
42
|
+
occurrenceId: string;
|
|
43
|
+
token: string;
|
|
44
|
+
} | undefined;
|
|
45
|
+
};
|
|
46
|
+
export declare const jobActionSchema: z.ZodObject<{
|
|
47
|
+
jobId: z.ZodString;
|
|
48
|
+
action: z.ZodDefault<z.ZodEnum<{
|
|
49
|
+
status: "status";
|
|
50
|
+
retry: "retry";
|
|
51
|
+
cancel: "cancel";
|
|
52
|
+
}>>;
|
|
53
|
+
acceptPartial: z.ZodOptional<z.ZodBoolean>;
|
|
54
|
+
maxModelCalls: z.ZodOptional<z.ZodNumber>;
|
|
55
|
+
maxModelTokens: z.ZodOptional<z.ZodNumber>;
|
|
56
|
+
}, z.core.$strict>;
|
|
57
|
+
export type JobOptions = Pick<z.infer<typeof jobActionSchema>, 'acceptPartial' | 'maxModelCalls' | 'maxModelTokens'>;
|
|
58
|
+
export declare const catalogQuerySchema: z.ZodObject<{
|
|
59
|
+
kbId: z.ZodOptional<z.ZodString>;
|
|
60
|
+
revision: z.ZodOptional<z.ZodString>;
|
|
61
|
+
docId: z.ZodOptional<z.ZodString>;
|
|
62
|
+
nodeId: z.ZodOptional<z.ZodString>;
|
|
63
|
+
page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
64
|
+
}, z.core.$strict>;
|
|
65
|
+
export type CatalogArgs = z.infer<typeof catalogQuerySchema>;
|
|
66
|
+
export declare const keywordsSchema: z.ZodArray<z.ZodString>;
|
|
67
|
+
export declare const searchSchema: z.ZodObject<{
|
|
68
|
+
kbId: z.ZodString;
|
|
69
|
+
revision: z.ZodOptional<z.ZodString>;
|
|
70
|
+
docId: z.ZodOptional<z.ZodString>;
|
|
71
|
+
query: z.ZodString;
|
|
72
|
+
keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
73
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
74
|
+
}, z.core.$strict>;
|
|
75
|
+
export type SearchArgs = z.infer<typeof searchSchema>;
|
|
76
|
+
export declare const readQuerySchema: z.ZodObject<{
|
|
77
|
+
kbId: z.ZodString;
|
|
78
|
+
revision: z.ZodOptional<z.ZodString>;
|
|
79
|
+
chunkId: z.ZodString;
|
|
80
|
+
query: z.ZodOptional<z.ZodString>;
|
|
81
|
+
keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
82
|
+
segmentIndex: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
83
|
+
offset: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
84
|
+
}, z.core.$strict>;
|
|
85
|
+
export type ReadArgs = z.infer<typeof readQuerySchema>;
|
|
86
|
+
export declare const assetQuerySchema: z.ZodObject<{
|
|
87
|
+
kbId: z.ZodString;
|
|
88
|
+
revision: z.ZodOptional<z.ZodString>;
|
|
89
|
+
docId: z.ZodString;
|
|
90
|
+
assetId: z.ZodString;
|
|
91
|
+
}, z.core.$strict>;
|
|
92
|
+
export declare const revisionQuerySchema: z.ZodObject<{
|
|
93
|
+
kbId: z.ZodString;
|
|
94
|
+
revision: z.ZodOptional<z.ZodString>;
|
|
95
|
+
}, z.core.$strict>;
|