@helloxiaohu/plugin-mineru 0.0.15 → 0.0.17

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 only validate if config is provided.
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;IAyH/E,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,YAAY;IA1H/B;;OAEG;IACH,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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S,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
- integration: {
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: [], // Integration is injected by permission system, parsing settings are optional
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 only validate if config is provided.
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
- if (config && !config.integration) {
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
  /**
@@ -33,9 +33,10 @@ export declare class MinerUToolset extends BuiltinToolset<StructuredToolInterfac
33
33
  constructor(config: MinerUToolsetConfig);
34
34
  /**
35
35
  * Validate credentials for MinerU toolset
36
- * Requires integration configuration to be provided
37
- * Note: configService and resultParser are runtime dependencies injected by the strategy,
38
- * they should not be validated here as they are not part of user credentials
36
+ * Note: During authorization phase, credentials may not include integration yet.
37
+ * Integration is injected by the permission system after authorization is complete.
38
+ * configService and resultParser are runtime dependencies injected by the strategy.
39
+ * We don't validate anything here to allow authorization to proceed.
39
40
  */
40
41
  _validateCredentials(credentials: MinerUToolsetConfig): Promise<void>;
41
42
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"mineru.toolset.d.ts","sourceRoot":"","sources":["../../src/lib/mineru.toolset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,WAAW,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,wBAAwB,CAAC,CAAC,CAAC;IAC9D,UAAU,CAAC,EAAE,YAAY,CAAC;IAC1B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,YAAY,CAAC,EAAE,yBAAyB,CAAC;IAEzC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACvB,YA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,YAAY,CAAC,EAAE,UAAU,GAAG,KAAK,CAAC;CACnC;AAED;;;GAGG;AACH,qBAAa,aAAc,SAAQ,cAAc,CAAC,uBAAuB,EAAE,mBAAmB,CAAC;IAC7F,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAsB;IAE7C;;;;;OAKG;gBACS,MAAM,EAAE,mBAAmB;IAKvC;;;;;;OAMG;IACY,oBAAoB,CAAC,WAAW,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IAKpF;;;OAGG;IACY,SAAS,IAAI,OAAO,CAAC,uBAAuB,CAAC,cAAc,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC;CAsBzF"}
@@ -17,14 +17,14 @@ export class MinerUToolset extends BuiltinToolset {
17
17
  }
18
18
  /**
19
19
  * Validate credentials for MinerU toolset
20
- * Requires integration configuration to be provided
21
- * Note: configService and resultParser are runtime dependencies injected by the strategy,
22
- * they should not be validated here as they are not part of user credentials
20
+ * Note: During authorization phase, credentials may not include integration yet.
21
+ * Integration is injected by the permission system after authorization is complete.
22
+ * configService and resultParser are runtime dependencies injected by the strategy.
23
+ * We don't validate anything here to allow authorization to proceed.
23
24
  */
24
25
  async _validateCredentials(credentials) {
25
- if (!credentials.integration) {
26
- throw new Error('MinerU integration is required');
27
- }
26
+ // No validation needed during authorization phase
27
+ // Integration will be validated when tools are actually used
28
28
  }
29
29
  /**
30
30
  * Initialize tools for MinerU toolset
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@helloxiaohu/plugin-mineru",
3
- "version": "0.0.15",
3
+ "version": "0.0.17",
4
4
  "license": "AGPL-3.0",
5
5
  "description": "MinerU PDF to Markdown converter plugin for XpertAI platform with toolset support",
6
6
  "keywords": [