@helloxiaohu/plugin-mineru 0.0.15 → 0.0.16
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.
|
@@ -31,17 +31,6 @@ export declare class MinerUToolsetStrategy implements IToolsetStrategy<MinerUToo
|
|
|
31
31
|
configSchema: {
|
|
32
32
|
type: string;
|
|
33
33
|
properties: {
|
|
34
|
-
integration: {
|
|
35
|
-
type: string;
|
|
36
|
-
title: {
|
|
37
|
-
en_US: string;
|
|
38
|
-
zh_Hans: string;
|
|
39
|
-
};
|
|
40
|
-
description: {
|
|
41
|
-
en_US: string;
|
|
42
|
-
zh_Hans: string;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
34
|
isOcr: {
|
|
46
35
|
type: string;
|
|
47
36
|
title: {
|
|
@@ -116,7 +105,8 @@ export declare class MinerUToolsetStrategy implements IToolsetStrategy<MinerUToo
|
|
|
116
105
|
/**
|
|
117
106
|
* Validate toolset configuration
|
|
118
107
|
* Note: During authorization phase, config may be null/undefined or missing integration.
|
|
119
|
-
* Integration is injected by the permission system, so we
|
|
108
|
+
* Integration is injected by the permission system, so we don't validate it here.
|
|
109
|
+
* We only validate the optional parsing settings if provided.
|
|
120
110
|
*/
|
|
121
111
|
validateConfig(config: MinerUToolsetConfig | null | undefined): Promise<void>;
|
|
122
112
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mineru-toolset.strategy.d.ts","sourceRoot":"","sources":["../../src/lib/mineru-toolset.strategy.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EACL,cAAc,EACd,gBAAgB,EAEhB,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAiB,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAGzE;;;GAGG;AACH,qBAEa,qBAAsB,YAAW,gBAAgB,CAAC,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"mineru-toolset.strategy.d.ts","sourceRoot":"","sources":["../../src/lib/mineru-toolset.strategy.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EACL,cAAc,EACd,gBAAgB,EAEhB,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAiB,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAGzE;;;GAGG;AACH,qBAEa,qBAAsB,YAAW,gBAAgB,CAAC,mBAAmB,CAAC;IA+G/E,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAhH/B;;OAEG;IACH,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAuFF;IAEF;;OAEG;IACH,QAAQ,CAAC,WAAW,mDAWlB;gBAIiB,aAAa,EAAE,aAAa,EAE5B,YAAY,EAAE,yBAAyB;IAG1D;;;;;OAKG;IACH,cAAc,CAAC,MAAM,EAAE,mBAAmB,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;IAO7E;;;OAGG;IACG,MAAM,CAAC,MAAM,EAAE,mBAAmB,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAAC,cAAc,CAAC;IAYrF;;;;OAIG;IACH,WAAW;CAKZ"}
|
|
@@ -35,17 +35,7 @@ let MinerUToolsetStrategy = class MinerUToolsetStrategy {
|
|
|
35
35
|
configSchema: {
|
|
36
36
|
type: 'object',
|
|
37
37
|
properties: {
|
|
38
|
-
|
|
39
|
-
type: 'object',
|
|
40
|
-
title: {
|
|
41
|
-
en_US: 'MinerU Integration',
|
|
42
|
-
zh_Hans: 'MinerU 集成',
|
|
43
|
-
},
|
|
44
|
-
description: {
|
|
45
|
-
en_US: 'MinerU integration configuration (API URL, API Key, Server Type). Configure this in the integration settings.',
|
|
46
|
-
zh_Hans: 'MinerU 集成配置(API URL、API Key、服务类型)。请在集成设置中配置。',
|
|
47
|
-
},
|
|
48
|
-
},
|
|
38
|
+
// Note: integration is NOT defined here because it's injected by the permission system
|
|
49
39
|
// Default parsing settings (optional, can be overridden when calling the tool)
|
|
50
40
|
isOcr: {
|
|
51
41
|
type: 'boolean',
|
|
@@ -110,7 +100,7 @@ let MinerUToolsetStrategy = class MinerUToolsetStrategy {
|
|
|
110
100
|
default: 'pipeline',
|
|
111
101
|
},
|
|
112
102
|
},
|
|
113
|
-
required: [], //
|
|
103
|
+
required: [], // All settings are optional with defaults
|
|
114
104
|
},
|
|
115
105
|
};
|
|
116
106
|
/**
|
|
@@ -132,14 +122,13 @@ let MinerUToolsetStrategy = class MinerUToolsetStrategy {
|
|
|
132
122
|
/**
|
|
133
123
|
* Validate toolset configuration
|
|
134
124
|
* Note: During authorization phase, config may be null/undefined or missing integration.
|
|
135
|
-
* Integration is injected by the permission system, so we
|
|
125
|
+
* Integration is injected by the permission system, so we don't validate it here.
|
|
126
|
+
* We only validate the optional parsing settings if provided.
|
|
136
127
|
*/
|
|
137
128
|
validateConfig(config) {
|
|
138
|
-
// During authorization, config may be null/undefined
|
|
139
|
-
// Integration will be injected by the permission system later
|
|
140
|
-
|
|
141
|
-
throw new Error('MinerU integration is required');
|
|
142
|
-
}
|
|
129
|
+
// During authorization, config may be null/undefined or an empty object
|
|
130
|
+
// Integration will be injected by the permission system later, so we don't validate it here
|
|
131
|
+
// Optional parsing settings (isOcr, enableFormula, etc.) have defaults, so no validation needed
|
|
143
132
|
return Promise.resolve();
|
|
144
133
|
}
|
|
145
134
|
/**
|