@zerowall/dsh-plugin-mineru 0.0.0-stage → 0.1.0-preview.2

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.
@@ -0,0 +1,290 @@
1
+ /* Generated by @deepseek-ai/dsh-typert-generator from the Host FaceModel — do not edit. */
2
+ import { z } from 'zod'
3
+
4
+ import { createTypertRemoteInfo } from '@deepseek-ai/dsh-typert-protocol/remote-info'
5
+
6
+ let _zerowall_dsh_plugin_mineru_zerowallMineru_clearToken_result$schema$value
7
+ const _zerowall_dsh_plugin_mineru_zerowallMineru_clearToken_result$schema = () => (_zerowall_dsh_plugin_mineru_zerowallMineru_clearToken_result$schema$value ??= z.object({
8
+ 'apiBaseUrl': z.string(),
9
+ 'tokenCredential': z.string(),
10
+ 'mode': z.union([z.literal("auto"), z.literal("precision"), z.literal("agent")]),
11
+ 'modelVersion': z.union([z.literal("pipeline"), z.literal("vlm"), z.literal("MinerU-HTML")]),
12
+ 'language': z.string(),
13
+ 'enableTable': z.boolean(),
14
+ 'enableFormula': z.boolean(),
15
+ 'isOcr': z.boolean(),
16
+ 'extraFormats': z.array(z.union([z.literal("docx"), z.literal("html"), z.literal("latex")])),
17
+ 'timeoutMs': z.number(),
18
+ 'pollIntervalMs': z.number(),
19
+ 'pollJitterMs': z.number(),
20
+ 'submitRatePerMinute': z.number(),
21
+ 'dailyLimit': z.number(),
22
+ 'inlineMarkdownBytes': z.number(),
23
+ 'artifactRootName': z.string(),
24
+ 'api': z.union([z.literal("precision"), z.literal("agent"), z.literal("local")]),
25
+ 'tokenConfigured': z.boolean(),
26
+ 'tokenManagementUrl': z.string(),
27
+ 'available': z.boolean(),
28
+ 'registeredTools': z.array(z.string()),
29
+ }))
30
+ let _zerowall_dsh_plugin_mineru_zerowallMineru_getConfigStatus_result$schema$value
31
+ const _zerowall_dsh_plugin_mineru_zerowallMineru_getConfigStatus_result$schema = () => (_zerowall_dsh_plugin_mineru_zerowallMineru_getConfigStatus_result$schema$value ??= z.object({
32
+ 'apiBaseUrl': z.string(),
33
+ 'tokenCredential': z.string(),
34
+ 'mode': z.union([z.literal("auto"), z.literal("precision"), z.literal("agent")]),
35
+ 'modelVersion': z.union([z.literal("pipeline"), z.literal("vlm"), z.literal("MinerU-HTML")]),
36
+ 'language': z.string(),
37
+ 'enableTable': z.boolean(),
38
+ 'enableFormula': z.boolean(),
39
+ 'isOcr': z.boolean(),
40
+ 'extraFormats': z.array(z.union([z.literal("docx"), z.literal("html"), z.literal("latex")])),
41
+ 'timeoutMs': z.number(),
42
+ 'pollIntervalMs': z.number(),
43
+ 'pollJitterMs': z.number(),
44
+ 'submitRatePerMinute': z.number(),
45
+ 'dailyLimit': z.number(),
46
+ 'inlineMarkdownBytes': z.number(),
47
+ 'artifactRootName': z.string(),
48
+ 'api': z.union([z.literal("precision"), z.literal("agent"), z.literal("local")]),
49
+ 'tokenConfigured': z.boolean(),
50
+ 'tokenManagementUrl': z.string(),
51
+ 'available': z.boolean(),
52
+ 'registeredTools': z.array(z.string()),
53
+ }))
54
+ let _zerowall_dsh_plugin_mineru_zerowallMineru_setToken_parameter_0$schema$value
55
+ const _zerowall_dsh_plugin_mineru_zerowallMineru_setToken_parameter_0$schema = () => (_zerowall_dsh_plugin_mineru_zerowallMineru_setToken_parameter_0$schema$value ??= z.string())
56
+ let _zerowall_dsh_plugin_mineru_zerowallMineru_setToken_result$schema$value
57
+ const _zerowall_dsh_plugin_mineru_zerowallMineru_setToken_result$schema = () => (_zerowall_dsh_plugin_mineru_zerowallMineru_setToken_result$schema$value ??= z.object({
58
+ 'apiBaseUrl': z.string(),
59
+ 'tokenCredential': z.string(),
60
+ 'mode': z.union([z.literal("auto"), z.literal("precision"), z.literal("agent")]),
61
+ 'modelVersion': z.union([z.literal("pipeline"), z.literal("vlm"), z.literal("MinerU-HTML")]),
62
+ 'language': z.string(),
63
+ 'enableTable': z.boolean(),
64
+ 'enableFormula': z.boolean(),
65
+ 'isOcr': z.boolean(),
66
+ 'extraFormats': z.array(z.union([z.literal("docx"), z.literal("html"), z.literal("latex")])),
67
+ 'timeoutMs': z.number(),
68
+ 'pollIntervalMs': z.number(),
69
+ 'pollJitterMs': z.number(),
70
+ 'submitRatePerMinute': z.number(),
71
+ 'dailyLimit': z.number(),
72
+ 'inlineMarkdownBytes': z.number(),
73
+ 'artifactRootName': z.string(),
74
+ 'api': z.union([z.literal("precision"), z.literal("agent"), z.literal("local")]),
75
+ 'tokenConfigured': z.boolean(),
76
+ 'tokenManagementUrl': z.string(),
77
+ 'available': z.boolean(),
78
+ 'registeredTools': z.array(z.string()),
79
+ }))
80
+ let _zerowall_dsh_plugin_mineru_zerowallMineru_testAgent_result$schema$value
81
+ const _zerowall_dsh_plugin_mineru_zerowallMineru_testAgent_result$schema = () => (_zerowall_dsh_plugin_mineru_zerowallMineru_testAgent_result$schema$value ??= z.object({
82
+ 'ok': z.literal(true),
83
+ 'api': z.literal("agent"),
84
+ }))
85
+ let _zerowall_dsh_plugin_mineru_zerowallMineru_testConnection_result$schema$value
86
+ const _zerowall_dsh_plugin_mineru_zerowallMineru_testConnection_result$schema = () => (_zerowall_dsh_plugin_mineru_zerowallMineru_testConnection_result$schema$value ??= z.object({
87
+ 'ok': z.literal(true),
88
+ 'api': z.union([z.literal("precision"), z.literal("agent"), z.literal("local")]),
89
+ 'tokenConfigured': z.boolean(),
90
+ }))
91
+ let _zerowall_dsh_plugin_mineru_zerowallMineru_testToken_result$schema$value
92
+ const _zerowall_dsh_plugin_mineru_zerowallMineru_testToken_result$schema = () => (_zerowall_dsh_plugin_mineru_zerowallMineru_testToken_result$schema$value ??= z.object({
93
+ 'ok': z.literal(true),
94
+ 'api': z.literal("precision"),
95
+ }))
96
+ let _zerowall_dsh_plugin_mineru_zerowallMineru_updateConfig_parameter_0$schema$value
97
+ const _zerowall_dsh_plugin_mineru_zerowallMineru_updateConfig_parameter_0$schema = () => (_zerowall_dsh_plugin_mineru_zerowallMineru_updateConfig_parameter_0$schema$value ??= z.object({
98
+ 'apiBaseUrl': z.union([z.undefined(), z.string()]).optional(),
99
+ 'tokenCredential': z.union([z.undefined(), z.string()]).optional(),
100
+ 'mode': z.union([z.undefined(), z.literal("auto"), z.literal("precision"), z.literal("agent")]).optional(),
101
+ 'modelVersion': z.union([z.undefined(), z.literal("pipeline"), z.literal("vlm"), z.literal("MinerU-HTML")]).optional(),
102
+ 'language': z.union([z.undefined(), z.string()]).optional(),
103
+ 'enableTable': z.union([z.undefined(), z.literal(false), z.literal(true)]).optional(),
104
+ 'enableFormula': z.union([z.undefined(), z.literal(false), z.literal(true)]).optional(),
105
+ 'isOcr': z.union([z.undefined(), z.literal(false), z.literal(true)]).optional(),
106
+ 'extraFormats': z.union([z.undefined(), z.array(z.union([z.literal("docx"), z.literal("html"), z.literal("latex")]))]).optional(),
107
+ 'timeoutMs': z.union([z.undefined(), z.number()]).optional(),
108
+ 'pollIntervalMs': z.union([z.undefined(), z.number()]).optional(),
109
+ 'pollJitterMs': z.union([z.undefined(), z.number()]).optional(),
110
+ 'submitRatePerMinute': z.union([z.undefined(), z.number()]).optional(),
111
+ 'dailyLimit': z.union([z.undefined(), z.number()]).optional(),
112
+ 'inlineMarkdownBytes': z.union([z.undefined(), z.number()]).optional(),
113
+ 'artifactRootName': z.union([z.undefined(), z.string()]).optional(),
114
+ }))
115
+ let _zerowall_dsh_plugin_mineru_zerowallMineru_updateConfig_result$schema$value
116
+ const _zerowall_dsh_plugin_mineru_zerowallMineru_updateConfig_result$schema = () => (_zerowall_dsh_plugin_mineru_zerowallMineru_updateConfig_result$schema$value ??= z.object({
117
+ 'apiBaseUrl': z.string(),
118
+ 'tokenCredential': z.string(),
119
+ 'mode': z.union([z.literal("auto"), z.literal("precision"), z.literal("agent")]),
120
+ 'modelVersion': z.union([z.literal("pipeline"), z.literal("vlm"), z.literal("MinerU-HTML")]),
121
+ 'language': z.string(),
122
+ 'enableTable': z.boolean(),
123
+ 'enableFormula': z.boolean(),
124
+ 'isOcr': z.boolean(),
125
+ 'extraFormats': z.array(z.union([z.literal("docx"), z.literal("html"), z.literal("latex")])),
126
+ 'timeoutMs': z.number(),
127
+ 'pollIntervalMs': z.number(),
128
+ 'pollJitterMs': z.number(),
129
+ 'submitRatePerMinute': z.number(),
130
+ 'dailyLimit': z.number(),
131
+ 'inlineMarkdownBytes': z.number(),
132
+ 'artifactRootName': z.string(),
133
+ 'api': z.union([z.literal("precision"), z.literal("agent"), z.literal("local")]),
134
+ 'tokenConfigured': z.boolean(),
135
+ 'tokenManagementUrl': z.string(),
136
+ 'available': z.boolean(),
137
+ 'registeredTools': z.array(z.string()),
138
+ }))
139
+ let _zerowall_dsh_plugin_mineru_zerowallMineru_setToken_parameter_0_strict$schema$value
140
+ const _zerowall_dsh_plugin_mineru_zerowallMineru_setToken_parameter_0_strict$schema = () => (_zerowall_dsh_plugin_mineru_zerowallMineru_setToken_parameter_0_strict$schema$value ??= z.string())
141
+ let _zerowall_dsh_plugin_mineru_zerowallMineru_updateConfig_parameter_0_strict$schema$value
142
+ const _zerowall_dsh_plugin_mineru_zerowallMineru_updateConfig_parameter_0_strict$schema = () => (_zerowall_dsh_plugin_mineru_zerowallMineru_updateConfig_parameter_0_strict$schema$value ??= z.strictObject({
143
+ 'apiBaseUrl': z.union([z.undefined(), z.string()]).optional(),
144
+ 'tokenCredential': z.union([z.undefined(), z.string()]).optional(),
145
+ 'mode': z.union([z.undefined(), z.literal("auto"), z.literal("precision"), z.literal("agent")]).optional(),
146
+ 'modelVersion': z.union([z.undefined(), z.literal("pipeline"), z.literal("vlm"), z.literal("MinerU-HTML")]).optional(),
147
+ 'language': z.union([z.undefined(), z.string()]).optional(),
148
+ 'enableTable': z.union([z.undefined(), z.literal(false), z.literal(true)]).optional(),
149
+ 'enableFormula': z.union([z.undefined(), z.literal(false), z.literal(true)]).optional(),
150
+ 'isOcr': z.union([z.undefined(), z.literal(false), z.literal(true)]).optional(),
151
+ 'extraFormats': z.union([z.undefined(), z.array(z.union([z.literal("docx"), z.literal("html"), z.literal("latex")]))]).optional(),
152
+ 'timeoutMs': z.union([z.undefined(), z.number()]).optional(),
153
+ 'pollIntervalMs': z.union([z.undefined(), z.number()]).optional(),
154
+ 'pollJitterMs': z.union([z.undefined(), z.number()]).optional(),
155
+ 'submitRatePerMinute': z.union([z.undefined(), z.number()]).optional(),
156
+ 'dailyLimit': z.union([z.undefined(), z.number()]).optional(),
157
+ 'inlineMarkdownBytes': z.union([z.undefined(), z.number()]).optional(),
158
+ 'artifactRootName': z.union([z.undefined(), z.string()]).optional(),
159
+ }))
160
+
161
+ export const TYPERT_REMOTE = createTypertRemoteInfo({
162
+ package: '@zerowall/dsh-plugin-mineru',
163
+ methods: {
164
+ 'zerowallMineru/clearToken': {
165
+ service: 'zerowallMineru',
166
+ invocation: { kind: 'direct' },
167
+ parameters: [
168
+ ],
169
+ result: {
170
+ mode: 'strict',
171
+ typeSymbol: '@zerowall/dsh-plugin-mineru/types#MineruConfigStatus',
172
+ create: _zerowall_dsh_plugin_mineru_zerowallMineru_clearToken_result$schema,
173
+ jsonSchema: {"type":"object","properties":{"apiBaseUrl":{"type":"string"},"tokenCredential":{"type":"string"},"mode":{"type":"string","enum":["auto","precision","agent"]},"modelVersion":{"type":"string","enum":["pipeline","vlm","MinerU-HTML"]},"language":{"type":"string"},"enableTable":{"type":"boolean"},"enableFormula":{"type":"boolean"},"isOcr":{"type":"boolean"},"extraFormats":{"type":"array","items":{"type":"string","enum":["docx","html","latex"]}},"timeoutMs":{"type":"number"},"pollIntervalMs":{"type":"number"},"pollJitterMs":{"type":"number"},"submitRatePerMinute":{"type":"number"},"dailyLimit":{"type":"number"},"inlineMarkdownBytes":{"type":"number"},"artifactRootName":{"type":"string"},"api":{"type":"string","enum":["precision","agent","local"]},"tokenConfigured":{"type":"boolean"},"tokenManagementUrl":{"type":"string"},"available":{"type":"boolean"},"registeredTools":{"type":"array","items":{"type":"string"}}},"required":["apiBaseUrl","tokenCredential","mode","modelVersion","language","enableTable","enableFormula","isOcr","extraFormats","timeoutMs","pollIntervalMs","pollJitterMs","submitRatePerMinute","dailyLimit","inlineMarkdownBytes","artifactRootName","api","tokenConfigured","tokenManagementUrl","available","registeredTools"],"additionalProperties":true},
174
+ },
175
+ sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":225,"column":31},
176
+ },
177
+ 'zerowallMineru/getConfigStatus': {
178
+ service: 'zerowallMineru',
179
+ invocation: { kind: 'direct' },
180
+ parameters: [
181
+ ],
182
+ result: {
183
+ mode: 'strict',
184
+ typeSymbol: '@zerowall/dsh-plugin-mineru/types#MineruConfigStatus',
185
+ create: _zerowall_dsh_plugin_mineru_zerowallMineru_getConfigStatus_result$schema,
186
+ jsonSchema: {"type":"object","properties":{"apiBaseUrl":{"type":"string"},"tokenCredential":{"type":"string"},"mode":{"type":"string","enum":["auto","precision","agent"]},"modelVersion":{"type":"string","enum":["pipeline","vlm","MinerU-HTML"]},"language":{"type":"string"},"enableTable":{"type":"boolean"},"enableFormula":{"type":"boolean"},"isOcr":{"type":"boolean"},"extraFormats":{"type":"array","items":{"type":"string","enum":["docx","html","latex"]}},"timeoutMs":{"type":"number"},"pollIntervalMs":{"type":"number"},"pollJitterMs":{"type":"number"},"submitRatePerMinute":{"type":"number"},"dailyLimit":{"type":"number"},"inlineMarkdownBytes":{"type":"number"},"artifactRootName":{"type":"string"},"api":{"type":"string","enum":["precision","agent","local"]},"tokenConfigured":{"type":"boolean"},"tokenManagementUrl":{"type":"string"},"available":{"type":"boolean"},"registeredTools":{"type":"array","items":{"type":"string"}}},"required":["apiBaseUrl","tokenCredential","mode","modelVersion","language","enableTable","enableFormula","isOcr","extraFormats","timeoutMs","pollIntervalMs","pollJitterMs","submitRatePerMinute","dailyLimit","inlineMarkdownBytes","artifactRootName","api","tokenConfigured","tokenManagementUrl","available","registeredTools"],"additionalProperties":true},
187
+ },
188
+ sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":222,"column":36},
189
+ },
190
+ 'zerowallMineru/setToken': {
191
+ service: 'zerowallMineru',
192
+ invocation: { kind: 'direct' },
193
+ parameters: [
194
+ {
195
+ name: 'value',
196
+ source: 'json',
197
+ codec: {
198
+ mode: 'strict',
199
+ typeSymbol: '@zerowall/dsh-plugin-mineru#zerowallMineru/setToken:value',
200
+ create: _zerowall_dsh_plugin_mineru_zerowallMineru_setToken_parameter_0$schema,
201
+ jsonSchema: {"type":"string"},
202
+ },
203
+ strictCodec: {
204
+ mode: 'strict',
205
+ typeSymbol: '@zerowall/dsh-plugin-mineru#zerowallMineru/setToken:value',
206
+ create: _zerowall_dsh_plugin_mineru_zerowallMineru_setToken_parameter_0_strict$schema,
207
+ jsonSchema: {"type":"string"},
208
+ },
209
+ },
210
+ ],
211
+ result: {
212
+ mode: 'strict',
213
+ typeSymbol: '@zerowall/dsh-plugin-mineru/types#MineruConfigStatus',
214
+ create: _zerowall_dsh_plugin_mineru_zerowallMineru_setToken_result$schema,
215
+ jsonSchema: {"type":"object","properties":{"apiBaseUrl":{"type":"string"},"tokenCredential":{"type":"string"},"mode":{"type":"string","enum":["auto","precision","agent"]},"modelVersion":{"type":"string","enum":["pipeline","vlm","MinerU-HTML"]},"language":{"type":"string"},"enableTable":{"type":"boolean"},"enableFormula":{"type":"boolean"},"isOcr":{"type":"boolean"},"extraFormats":{"type":"array","items":{"type":"string","enum":["docx","html","latex"]}},"timeoutMs":{"type":"number"},"pollIntervalMs":{"type":"number"},"pollJitterMs":{"type":"number"},"submitRatePerMinute":{"type":"number"},"dailyLimit":{"type":"number"},"inlineMarkdownBytes":{"type":"number"},"artifactRootName":{"type":"string"},"api":{"type":"string","enum":["precision","agent","local"]},"tokenConfigured":{"type":"boolean"},"tokenManagementUrl":{"type":"string"},"available":{"type":"boolean"},"registeredTools":{"type":"array","items":{"type":"string"}}},"required":["apiBaseUrl","tokenCredential","mode","modelVersion","language","enableTable","enableFormula","isOcr","extraFormats","timeoutMs","pollIntervalMs","pollJitterMs","submitRatePerMinute","dailyLimit","inlineMarkdownBytes","artifactRootName","api","tokenConfigured","tokenManagementUrl","available","registeredTools"],"additionalProperties":true},
216
+ },
217
+ sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":224,"column":29},
218
+ },
219
+ 'zerowallMineru/testAgent': {
220
+ service: 'zerowallMineru',
221
+ invocation: { kind: 'direct' },
222
+ parameters: [
223
+ ],
224
+ result: {
225
+ mode: 'strict',
226
+ typeSymbol: '@zerowall/dsh-plugin-mineru#zerowallMineru/testAgent:result',
227
+ create: _zerowall_dsh_plugin_mineru_zerowallMineru_testAgent_result$schema,
228
+ jsonSchema: {"type":"object","properties":{"ok":{"type":"boolean","const":true},"api":{"type":"string","const":"agent"}},"required":["ok","api"],"additionalProperties":true},
229
+ },
230
+ sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":276,"column":30},
231
+ },
232
+ 'zerowallMineru/testConnection': {
233
+ service: 'zerowallMineru',
234
+ invocation: { kind: 'direct' },
235
+ parameters: [
236
+ ],
237
+ result: {
238
+ mode: 'strict',
239
+ typeSymbol: '@zerowall/dsh-plugin-mineru/types#MineruConnectionTestResult',
240
+ create: _zerowall_dsh_plugin_mineru_zerowallMineru_testConnection_result$schema,
241
+ jsonSchema: {"type":"object","properties":{"ok":{"type":"boolean","const":true},"api":{"type":"string","enum":["precision","agent","local"]},"tokenConfigured":{"type":"boolean"}},"required":["ok","api","tokenConfigured"],"additionalProperties":true},
242
+ },
243
+ sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":226,"column":35},
244
+ },
245
+ 'zerowallMineru/testToken': {
246
+ service: 'zerowallMineru',
247
+ invocation: { kind: 'direct' },
248
+ parameters: [
249
+ ],
250
+ result: {
251
+ mode: 'strict',
252
+ typeSymbol: '@zerowall/dsh-plugin-mineru#zerowallMineru/testToken:result',
253
+ create: _zerowall_dsh_plugin_mineru_zerowallMineru_testToken_result$schema,
254
+ jsonSchema: {"type":"object","properties":{"ok":{"type":"boolean","const":true},"api":{"type":"string","const":"precision"}},"required":["ok","api"],"additionalProperties":true},
255
+ },
256
+ sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":263,"column":30},
257
+ },
258
+ 'zerowallMineru/updateConfig': {
259
+ service: 'zerowallMineru',
260
+ invocation: { kind: 'direct' },
261
+ parameters: [
262
+ {
263
+ name: 'input',
264
+ source: 'json',
265
+ codec: {
266
+ mode: 'strict',
267
+ typeSymbol: '@zerowall/dsh-plugin-mineru#zerowallMineru/updateConfig:input',
268
+ create: _zerowall_dsh_plugin_mineru_zerowallMineru_updateConfig_parameter_0$schema,
269
+ jsonSchema: {"type":"object","properties":{"apiBaseUrl":{"type":"string"},"tokenCredential":{"type":"string"},"mode":{"type":"string","enum":["auto","precision","agent"]},"modelVersion":{"type":"string","enum":["pipeline","vlm","MinerU-HTML"]},"language":{"type":"string"},"enableTable":{"type":"boolean","enum":[false,true]},"enableFormula":{"type":"boolean","enum":[false,true]},"isOcr":{"type":"boolean","enum":[false,true]},"extraFormats":{"type":"array","items":{"type":"string","enum":["docx","html","latex"]}},"timeoutMs":{"type":"number"},"pollIntervalMs":{"type":"number"},"pollJitterMs":{"type":"number"},"submitRatePerMinute":{"type":"number"},"dailyLimit":{"type":"number"},"inlineMarkdownBytes":{"type":"number"},"artifactRootName":{"type":"string"}},"required":[],"additionalProperties":true},
270
+ },
271
+ strictCodec: {
272
+ mode: 'strict',
273
+ typeSymbol: '@zerowall/dsh-plugin-mineru#zerowallMineru/updateConfig:input',
274
+ create: _zerowall_dsh_plugin_mineru_zerowallMineru_updateConfig_parameter_0_strict$schema,
275
+ jsonSchema: {"type":"object","properties":{"apiBaseUrl":{"type":"string"},"tokenCredential":{"type":"string"},"mode":{"type":"string","enum":["auto","precision","agent"]},"modelVersion":{"type":"string","enum":["pipeline","vlm","MinerU-HTML"]},"language":{"type":"string"},"enableTable":{"type":"boolean","enum":[false,true]},"enableFormula":{"type":"boolean","enum":[false,true]},"isOcr":{"type":"boolean","enum":[false,true]},"extraFormats":{"type":"array","items":{"type":"string","enum":["docx","html","latex"]}},"timeoutMs":{"type":"number"},"pollIntervalMs":{"type":"number"},"pollJitterMs":{"type":"number"},"submitRatePerMinute":{"type":"number"},"dailyLimit":{"type":"number"},"inlineMarkdownBytes":{"type":"number"},"artifactRootName":{"type":"string"}},"required":[],"additionalProperties":false},
276
+ },
277
+ },
278
+ ],
279
+ result: {
280
+ mode: 'strict',
281
+ typeSymbol: '@zerowall/dsh-plugin-mineru/types#MineruConfigStatus',
282
+ create: _zerowall_dsh_plugin_mineru_zerowallMineru_updateConfig_result$schema,
283
+ jsonSchema: {"type":"object","properties":{"apiBaseUrl":{"type":"string"},"tokenCredential":{"type":"string"},"mode":{"type":"string","enum":["auto","precision","agent"]},"modelVersion":{"type":"string","enum":["pipeline","vlm","MinerU-HTML"]},"language":{"type":"string"},"enableTable":{"type":"boolean"},"enableFormula":{"type":"boolean"},"isOcr":{"type":"boolean"},"extraFormats":{"type":"array","items":{"type":"string","enum":["docx","html","latex"]}},"timeoutMs":{"type":"number"},"pollIntervalMs":{"type":"number"},"pollJitterMs":{"type":"number"},"submitRatePerMinute":{"type":"number"},"dailyLimit":{"type":"number"},"inlineMarkdownBytes":{"type":"number"},"artifactRootName":{"type":"string"},"api":{"type":"string","enum":["precision","agent","local"]},"tokenConfigured":{"type":"boolean"},"tokenManagementUrl":{"type":"string"},"available":{"type":"boolean"},"registeredTools":{"type":"array","items":{"type":"string"}}},"required":["apiBaseUrl","tokenCredential","mode","modelVersion","language","enableTable","enableFormula","isOcr","extraFormats","timeoutMs","pollIntervalMs","pollJitterMs","submitRatePerMinute","dailyLimit","inlineMarkdownBytes","artifactRootName","api","tokenConfigured","tokenManagementUrl","available","registeredTools"],"additionalProperties":true},
284
+ },
285
+ sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":223,"column":33},
286
+ },
287
+ },
288
+ }, z)
289
+
290
+ export default TYPERT_REMOTE
@@ -0,0 +1,2 @@
1
+ /** Remote metadata is mounted by the package build entry. Settings live in the environment page. */
2
+ export declare function apply(): void;
@@ -0,0 +1,4 @@
1
+ /** Convert both official content-list formats without discarding original artifacts. */
2
+ type Row = Record<string, any>;
3
+ export declare function normalizeContent(value: unknown): Row[];
4
+ export {};
@@ -0,0 +1,95 @@
1
+ import { TypertRemoteService } from '@deepseek-ai/dsh-typert-protocol';
2
+ import type { SettingsNamespace } from '@deepseek-ai/dsh-settings';
3
+ import z from '@deepseek-ai/schemastery';
4
+ import type { Context } from '@deepseek-ai/cordis';
5
+ import type { MineruApi, MineruConfig, MineruConfigStatus, MineruConnectionTestResult, MineruMode, MineruParseResult, MineruTaskResult } from '../shared/types.js';
6
+ export type * from '../shared/types.js';
7
+ export declare const name = "zerowall-mineru";
8
+ export declare const inject: string[];
9
+ export declare const MINERU_SETTINGS_NS: SettingsNamespace;
10
+ export declare const TOKEN_MANAGEMENT_URL = "https://mineru.net/apiManage/token";
11
+ declare const DEFAULTS: MineruConfig;
12
+ export declare const Config: z<NoInfer<MineruConfig>, NoInfer<MineruConfig>, "volatile">;
13
+ interface ParseInput {
14
+ sessionId: string;
15
+ source: string;
16
+ mode?: MineruMode;
17
+ overrides?: Partial<MineruConfig>;
18
+ signal?: AbortSignal;
19
+ onTaskSubmitted?: (id: string) => Promise<void>;
20
+ }
21
+ interface TaskInput {
22
+ sessionId: string;
23
+ taskId: string;
24
+ api: MineruApi;
25
+ wait: boolean;
26
+ signal?: AbortSignal;
27
+ }
28
+ interface PendingUpload {
29
+ url: string;
30
+ path: string;
31
+ sha256: string;
32
+ complete: boolean;
33
+ }
34
+ declare function validateConfig(value: MineruConfig): MineruConfig;
35
+ /** Resolve all parse inputs with one admission rule, shared by single and batch tools. */
36
+ export declare function resolveMineruSource(ctx: Context, sessionId: string, input: string): Promise<{
37
+ filePath?: string;
38
+ sourceName: string;
39
+ url?: string;
40
+ }>;
41
+ declare function apiFor(mode: MineruMode, token?: string): MineruApi | 'local';
42
+ declare function extractZip(data: Uint8Array, destination: string): Promise<void>;
43
+ declare function payloadData(value: unknown): Record<string, unknown>;
44
+ declare function remoteParse(cfg: MineruConfig, api: MineruApi, token: string | undefined, filePath: string | undefined, sourceUrl: string | undefined, signal: AbortSignal, onSubmitted?: (taskId: string, batch: boolean, upload?: PendingUpload) => Promise<void>): Promise<{
45
+ taskId?: string;
46
+ markdown?: string;
47
+ archive?: Uint8Array;
48
+ }>;
49
+ declare function writeResult(cfg: MineruConfig, sessionId: string, cwd: string, sourceName: string, api: MineruApi, taskId: string | undefined, markdown: string | undefined, archive: Uint8Array | undefined, started: number): Promise<MineruParseResult>;
50
+ declare module '@deepseek-ai/cordis' {
51
+ interface Context {
52
+ zerowallMineru: ZeroWallMineruService;
53
+ }
54
+ }
55
+ export declare class ZeroWallMineruService extends TypertRemoteService {
56
+ private readonly hostCtx;
57
+ static inject: string[];
58
+ static Config: z<MineruConfig>;
59
+ private readonly secrets;
60
+ private readonly runs;
61
+ private readonly stopped;
62
+ private readonly inFlight;
63
+ private settings;
64
+ constructor(hostCtx: Context, config: MineruConfig);
65
+ private config;
66
+ private token;
67
+ getConfigStatus(): Promise<MineruConfigStatus>;
68
+ updateConfig(input: Partial<MineruConfig>): Promise<MineruConfigStatus>;
69
+ setToken(value: string): Promise<MineruConfigStatus>;
70
+ clearToken(): Promise<MineruConfigStatus>;
71
+ testConnection(): Promise<MineruConnectionTestResult>;
72
+ testToken(): Promise<{
73
+ ok: true;
74
+ api: 'precision';
75
+ }>;
76
+ testAgent(): Promise<{
77
+ ok: true;
78
+ api: 'agent';
79
+ }>;
80
+ private track;
81
+ /** Parse a session attachment, workspace file or document URL and retain its task for recovery. */
82
+ parse(input: ParseInput): Promise<MineruParseResult>;
83
+ private parseInternal;
84
+ getRun(input: {
85
+ taskId: string;
86
+ }): MineruParseResult | undefined;
87
+ listRuns(): MineruParseResult[];
88
+ /** Resume the recorded upload or poll an existing task without submitting another document. */
89
+ task(input: TaskInput): Promise<MineruTaskResult>;
90
+ private taskInternal;
91
+ }
92
+ export declare function apply(ctx: Context, config: {
93
+ get(): MineruConfig;
94
+ }): Promise<void>;
95
+ export { validateConfig, apiFor, extractZip, writeResult, remoteParse, DEFAULTS, payloadData };
@@ -0,0 +1,77 @@
1
+ export type MineruMode = 'auto' | 'precision' | 'agent';
2
+ export type MineruApi = 'precision' | 'agent';
3
+ export type MineruModelVersion = 'pipeline' | 'vlm' | 'MinerU-HTML';
4
+ export type MineruExtraFormat = 'docx' | 'html' | 'latex';
5
+ export type MineruJsonValue = null | boolean | number | string | MineruJsonValue[] | MineruJsonObject;
6
+ export type MineruJsonObject = {
7
+ [key: string]: MineruJsonValue;
8
+ };
9
+ export type MineruConfig = {
10
+ apiBaseUrl: string;
11
+ tokenCredential: string;
12
+ mode: MineruMode;
13
+ modelVersion: MineruModelVersion;
14
+ language: string;
15
+ enableTable: boolean;
16
+ enableFormula: boolean;
17
+ isOcr: boolean;
18
+ extraFormats: MineruExtraFormat[];
19
+ timeoutMs: number;
20
+ pollIntervalMs: number;
21
+ pollJitterMs: number;
22
+ submitRatePerMinute: number;
23
+ dailyLimit: number;
24
+ inlineMarkdownBytes: number;
25
+ artifactRootName: string;
26
+ };
27
+ export type MineruConfigStatus = MineruConfig & {
28
+ api: MineruApi | 'local';
29
+ tokenConfigured: boolean;
30
+ tokenManagementUrl: string;
31
+ available: boolean;
32
+ registeredTools: readonly string[];
33
+ };
34
+ export type MineruConnectionTestResult = {
35
+ ok: true;
36
+ api: MineruApi | 'local';
37
+ tokenConfigured: boolean;
38
+ };
39
+ export type MineruArtifact = {
40
+ name: string;
41
+ path: string;
42
+ mediaType: string;
43
+ bytes: number;
44
+ checksum: string;
45
+ kind: 'markdown' | 'json' | 'image' | 'export' | 'archive';
46
+ };
47
+ export type MineruParseResult = {
48
+ ok: true;
49
+ api: MineruApi;
50
+ mode: MineruMode;
51
+ modelVersion: MineruModelVersion;
52
+ taskId?: string;
53
+ sourceName: string;
54
+ runDir: string;
55
+ durationMs: number;
56
+ preview: {
57
+ markdown: string;
58
+ truncated: boolean;
59
+ bytes: number;
60
+ };
61
+ artifacts: MineruArtifact[];
62
+ };
63
+ export type MineruBatchResult = {
64
+ ok: true;
65
+ api: 'precision';
66
+ results: MineruParseResult[];
67
+ succeeded: number;
68
+ failed: number;
69
+ };
70
+ export type MineruTaskResult = {
71
+ ok: true;
72
+ api: MineruApi;
73
+ taskId: string;
74
+ state: 'waiting-file' | 'pending' | 'running' | 'converting' | 'done' | 'failed';
75
+ result?: MineruParseResult;
76
+ error?: string;
77
+ };
package/lib/types.js ADDED
File without changes
package/locale/en.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "meta": {
3
+ "title": "MinerU document parsing",
4
+ "description": "Parse PDFs and documents into Markdown, structured content and images with recoverable tasks.",
5
+ "detail": "plugin-detail.md"
6
+ }
7
+ }
package/locale/zh.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "meta": {
3
+ "title": "MinerU 文档解析",
4
+ "description": "将 PDF 和文档解析为 Markdown、结构化内容与图片,支持任务恢复。",
5
+ "detail": "plugin-detail.zh.md"
6
+ }
7
+ }
package/package.json CHANGED
@@ -1,6 +1,105 @@
1
1
  {
2
2
  "name": "@zerowall/dsh-plugin-mineru",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.0-preview.2",
4
+ "description": "MinerU document parsing and recoverable tasks for ZeroWallScience.",
5
+ "type": "module",
6
+ "main": "./lib/index.js",
7
+ "types": "./lib/types/host/index.d.ts",
8
+ "exports": {
9
+ "./types": {
10
+ "types": "./lib/types/shared/types.d.ts",
11
+ "default": "./lib/types.js"
12
+ },
13
+ ".": {
14
+ "types": "./lib/types/host/index.d.ts",
15
+ "default": "./lib/index.js"
16
+ },
17
+ "./client": {
18
+ "types": "./lib/types/client/index.d.ts",
19
+ "default": "./lib/client.js"
20
+ },
21
+ "./typert": {
22
+ "types": "./lib/typert.host.d.ts",
23
+ "default": "./lib/typert.host.js"
24
+ },
25
+ "./remote": {
26
+ "types": "./lib/typert.remote-client.d.ts",
27
+ "default": "./lib/typert.remote-client.js"
28
+ },
29
+ "./package.json": "./package.json",
30
+ "./locale/*.json": "./locale/*.json"
31
+ },
32
+ "dsh": {
33
+ "bundle": {
34
+ "patch": "dsh.bundle.patch.yml"
35
+ },
36
+ "client": {
37
+ "inject": [
38
+ "@deepseek-ai/dsh-api-remotes"
39
+ ],
40
+ "platform": "web"
41
+ }
42
+ },
43
+ "zerowall": {
44
+ "build": {
45
+ "host": "src/host/index.ts",
46
+ "client": "src/client/index.ts",
47
+ "shared": {
48
+ "types": "src/shared/types.ts"
49
+ }
50
+ }
51
+ },
52
+ "files": [
53
+ "lib",
54
+ "dsh.bundle.patch.yml",
55
+ "locale",
56
+ "plugin-detail.md",
57
+ "plugin-detail.zh.md",
58
+ "README.md",
59
+ "README.zh.md",
60
+ "LICENSE"
61
+ ],
62
+ "dependencies": {
63
+ "jszip": "3.10.1",
64
+ "@zerowall/dsh-plugin-ai-cloud": "^0.1.0-preview.8",
65
+ "@zerowall/dsh-plugin-environment": "0.1.0-preview.4"
66
+ },
67
+ "peerDependencies": {
68
+ "@deepseek-ai/cordis": "4.1.0",
69
+ "@deepseek-ai/schemastery": "3.19.0",
70
+ "@deepseek-ai/dsh-session": "0.2.2-rc.1",
71
+ "@deepseek-ai/dsh-typert-protocol": "0.2.2-rc.1",
72
+ "@deepseek-ai/dsh-tools": "0.2.2-rc.1",
73
+ "@deepseek-ai/dsh-settings": "0.2.2-rc.1",
74
+ "@deepseek-ai/dsh-attachment": "0.2.2-rc.1",
75
+ "@deepseek-ai/dsh-credentials": "0.2.2-rc.1"
76
+ },
77
+ "devDependencies": {
78
+ "@deepseek-ai/cordis": "4.1.0",
79
+ "@deepseek-ai/schemastery": "3.19.0",
80
+ "@deepseek-ai/dsh-session": "0.2.2-rc.1",
81
+ "@deepseek-ai/dsh-typert-protocol": "0.2.2-rc.1",
82
+ "@deepseek-ai/dsh-tools": "0.2.2-rc.1",
83
+ "@deepseek-ai/dsh-settings": "0.2.2-rc.1",
84
+ "@deepseek-ai/dsh-attachment": "0.2.2-rc.1",
85
+ "@deepseek-ai/dsh-credentials": "0.2.2-rc.1",
86
+ "typescript": "6.0.3",
87
+ "vitest": "^4.1.10",
88
+ "esbuild": "0.27.7",
89
+ "@deepseek-ai/dsh-typert-generator": "0.2.2-rc.1"
90
+ },
91
+ "publishConfig": {
92
+ "access": "public",
93
+ "tag": "next",
94
+ "registry": "https://registry.npmjs.org/"
95
+ },
96
+ "license": "AGPL-3.0-only",
97
+ "engines": {
98
+ "node": ">=24.9.0"
99
+ },
100
+ "scripts": {
101
+ "build": "node ../../scripts/build-plugin.mjs",
102
+ "typecheck": "tsc -p tsconfig.build.json --noEmit",
103
+ "test": "vitest run"
104
+ }
6
105
  }
@@ -0,0 +1,7 @@
1
+ # MinerU document parsing
2
+
3
+ Parse document URLs, workspace files and verified session attachments into Markdown, structured content and images. Interrupted tasks resume through their original task identifier.
4
+
5
+ Configure the API endpoint, parsing mode and token below or in Environment settings. Credentials use the Host credential store. The connection test checks availability without submitting a document; missing credentials and service failures are reported explicitly.
6
+
7
+ Results and task records are saved under the workspace artifact directory, or the selected DSH home for sessions without a workspace. This plugin requires no local Python runtime and supplies no separate MinerU Skill.
@@ -0,0 +1,7 @@
1
+ # MinerU 文档解析
2
+
3
+ 将文档 URL、工作区文件和已验证的会话附件解析为 Markdown、结构化内容与图片。中断的任务使用原任务标识恢复。
4
+
5
+ 在下方或环境配置中设置 API 地址、解析模式和令牌。凭据写入 Host 安全存储。连接测试只检查服务状态,不提交文档;缺少凭据或服务失败时会明确显示原因。
6
+
7
+ 结果与任务记录保存在工作区产物目录;没有工作区的会话使用所选 DSH 主目录。本插件不需要本地 Python 环境,也不提供独立的 MinerU Skill。