{"_id":"@agentxin-ai/plugin-mineru","_rev":"4-285fee27be1a7055bb382e42e5541642","name":"@agentxin-ai/plugin-mineru","dist-tags":{"latest":"0.0.13"},"versions":{"0.0.10":{"name":"@agentxin-ai/plugin-mineru","version":"0.0.10","_id":"@agentxin-ai/plugin-mineru@0.0.10","maintainers":[{"name":"agentxin-ai","email":"1304040880@qq.com"}],"homepage":"https://github.com/agentxin-ai/agentxin-plugins#readme","bugs":{"url":"https://github.com/agentxin-ai/agentxin-plugins/issues"},"dist":{"shasum":"2dde221b4b0c6c60d8c140edfa70da3a73d9c90c","tarball":"https://registry.npmjs.org/@agentxin-ai/plugin-mineru/-/plugin-mineru-0.0.10.tgz","fileCount":2,"integrity":"sha512-C2nh4rZH/FjcO0TsRCvzw2R46SEg2wPlICabVu+hRF+5NmOaadyafPpSZcX/f4cXwHnjpBj2bHIXXhZkXBYS0A==","signatures":[{"sig":"MEUCIGtQKdI8I0Ik7fBiYf/CGi3wYFQfJqZ2oYNIsrdUpoRyAiEA5jxybRFQgDXyttjxzHSqLQmB3wQpFFN1SWM/VZ1ru9o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6165},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","@agentxin-plugins-starter/source":"./src/index.ts"},"./package.json":"./package.json"},"_npmUser":{"name":"agentxin-ai","email":"1304040880@qq.com"},"repository":{"url":"git+https://github.com/agentxin-ai/agentxin-plugins.git","type":"git"},"_npmVersion":"10.9.4","description":"`@agentxin-ai/plugin-mineru` is a MinerU document converter plugin for the [AgentXin AI](https://github.com/agentxin-ai/agentxin) platform, providing extraction capabilities from PDF to Markdown and structured JSON. The plugin includes built-in MinerU int","directories":{},"_nodeVersion":"22.22.0","dependencies":{"tslib":"^2.3.0","unzipper":"0.12.3","form-data":"^4.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/unzipper":"^0.10.11"},"peerDependencies":{"zod":"3.25.67","uuid":"8.3.2","axios":"1.12.2","chalk":"4.1.2","lodash-es":"4.17.21","nestjs-i18n":"10.5.1","@nestjs/common":"^11.1.6","@nestjs/config":"^4.0.2","@langchain/core":"^0.3.72","@metad/contracts":"^3.6.2","@agentxin-ai/plugin-sdk":"^3.6.2"},"_npmOperationalInternal":{"tmp":"tmp/plugin-mineru_0.0.10_1773917210968_0.05314886020147824","host":"s3://npm-registry-packages-npm-production"}},"0.0.11":{"name":"@agentxin-ai/plugin-mineru","version":"0.0.11","_id":"@agentxin-ai/plugin-mineru@0.0.11","maintainers":[{"name":"agentxin-ai","email":"1304040880@qq.com"}],"homepage":"https://github.com/agentxin-ai/agentxin-plugins#readme","bugs":{"url":"https://github.com/agentxin-ai/agentxin-plugins/issues"},"dist":{"shasum":"91f4c6ca799bf0092d9c4504824092c5ee5f3bd4","tarball":"https://registry.npmjs.org/@agentxin-ai/plugin-mineru/-/plugin-mineru-0.0.11.tgz","fileCount":29,"integrity":"sha512-OSkoRq4WcOHOm/+MdbdDcwyC2hoInRo72T7WMMSqyyFXIwQuDQQP4MCxFBhNJwTuBQjHZhB0ZKcu3Uw2uyszWA==","signatures":[{"sig":"MEYCIQDZPkVEx/e5kEO8JacfkV5a6lloqbSzVxMHfjZN3tP4wwIhANvmSLhKH1gQlJEWk56gJdNK+rN5XmHcWnSlnCGOssQL","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":81981},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","@xpert-plugins-starter/source":"./src/index.ts"},"./package.json":"./package.json"},"_npmUser":{"name":"agentxin-ai","email":"1304040880@qq.com"},"repository":{"url":"git+https://github.com/agentxin-ai/agentxin-plugins.git","type":"git"},"_npmVersion":"10.9.4","description":"`@xpert-ai/plugin-mineru` is a MinerU document converter plugin for the [Xpert AI](https://github.com/xpert-ai/xpert) platform, providing extraction capabilities from PDF to Markdown and structured JSON. The plugin includes built-in MinerU integration str","directories":{},"_nodeVersion":"22.22.0","dependencies":{"tslib":"^2.3.0","unzipper":"0.12.3","form-data":"^4.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/unzipper":"^0.10.11"},"peerDependencies":{"zod":"3.25.67","uuid":"8.3.2","axios":"1.12.2","chalk":"4.1.2","lodash-es":"4.17.21","nestjs-i18n":"10.5.1","@nestjs/common":"^11.1.6","@nestjs/config":"^4.0.2","@langchain/core":"^0.3.72","@metad/contracts":"^3.6.2","@xpert-ai/plugin-sdk":"^3.6.2"},"_npmOperationalInternal":{"tmp":"tmp/plugin-mineru_0.0.11_1774329782183_0.009016684779315165","host":"s3://npm-registry-packages-npm-production"}},"0.0.12":{"name":"@agentxin-ai/plugin-mineru","version":"0.0.12","_id":"@agentxin-ai/plugin-mineru@0.0.12","maintainers":[{"name":"agentxin-ai","email":"1304040880@qq.com"}],"homepage":"https://github.com/agentxin-ai/agentxin-plugins#readme","bugs":{"url":"https://github.com/agentxin-ai/agentxin-plugins/issues"},"dist":{"shasum":"7843845273859234409f700c4b9549fd0dba5d3d","tarball":"https://registry.npmjs.org/@agentxin-ai/plugin-mineru/-/plugin-mineru-0.0.12.tgz","fileCount":29,"integrity":"sha512-haYUUCQywhip1xCCI4W617xzrmJXy60+0o8icNfBFQ2iBie/49HxkMYq9UB8B5DzowjagRCOrOaJ4BPI6MtRYg==","signatures":[{"sig":"MEYCIQDbg//k2t5DHAvtrzQGnfIRq2/zbGyzlv2orp5EsY5f2wIhANLbo8gmnwXeeGFtCxvAQ9t4M+/1LYeXnHOyXwfddpiG","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":82077},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","@agentxin-plugins-starter/source":"./src/index.ts"},"./package.json":"./package.json"},"_npmUser":{"name":"agentxin-ai","email":"1304040880@qq.com"},"repository":{"url":"git+https://github.com/agentxin-ai/agentxin-plugins.git","type":"git"},"_npmVersion":"10.9.4","description":"`@agentxin-ai/plugin-mineru` is a MinerU document converter plugin for the [AgentXin AI](https://github.com/agentxin-ai/agentxin) platform, providing extraction capabilities from PDF to Markdown and structured JSON. The plugin includes built-in MinerU int","directories":{},"_nodeVersion":"22.22.0","dependencies":{"tslib":"^2.3.0","unzipper":"0.12.3","form-data":"^4.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/unzipper":"^0.10.11"},"peerDependencies":{"zod":"3.25.67","uuid":"8.3.2","axios":"1.12.2","chalk":"4.1.2","lodash-es":"4.17.21","nestjs-i18n":"10.5.1","@nestjs/common":"^11.1.6","@nestjs/config":"^4.0.2","@langchain/core":"^0.3.72","@metad/contracts":"^3.6.2","@agentxin-ai/plugin-sdk":"^3.6.2"},"_npmOperationalInternal":{"tmp":"tmp/plugin-mineru_0.0.12_1774575445659_0.5708973028402373","host":"s3://npm-registry-packages-npm-production"}},"0.0.13":{"name":"@agentxin-ai/plugin-mineru","version":"0.0.13","repository":{"type":"git","url":"git+https://github.com/agentxin-ai/agentxin-plugins.git"},"bugs":{"url":"https://github.com/agentxin-ai/agentxin-plugins/issues"},"type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{"./package.json":"./package.json",".":{"@agentxin-plugins-starter/source":"./src/index.ts","types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"dependencies":{"form-data":"^4.0.0","tslib":"^2.3.0","unzipper":"0.12.3"},"peerDependencies":{"@nestjs/config":"^4.0.2","zod":"3.25.67","@agentxin-ai/plugin-sdk":"^3.6.2","@metad/contracts":"^3.6.2","@nestjs/common":"^11.1.6","axios":"1.12.2","nestjs-i18n":"10.5.1","chalk":"4.1.2","@langchain/core":"^0.3.72","lodash-es":"4.17.21","uuid":"8.3.2"},"devDependencies":{"@types/unzipper":"^0.10.11"},"_id":"@agentxin-ai/plugin-mineru@0.0.13","description":"`@agentxin-ai/plugin-mineru` is a MinerU document converter plugin for the [AgentXin AI](https://github.com/agentxin-ai/agentxin) platform, providing extraction capabilities from PDF to Markdown and structured JSON. The plugin includes built-in MinerU int","homepage":"https://github.com/agentxin-ai/agentxin-plugins#readme","_nodeVersion":"22.22.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-0c222bU0dl7F2f1aopPvCQBcNhuSmqway4PhSHkbRfKJtZr7Xxqb2pJGsIL2j3Q52YeJFx3UFEnQuHASJz1iDQ==","shasum":"fad831ab2ccd8ae54c843319fac7cd528b3fd110","tarball":"https://registry.npmjs.org/@agentxin-ai/plugin-mineru/-/plugin-mineru-0.0.13.tgz","fileCount":29,"unpackedSize":82077,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHomESWPknH4dZxjOnkYIreRQoM37SuzM5fLITFPc0DVAiEAiyh/8kkhJj1bDwCBgPrPUSeFinkchU0+1nn14LRa3gY="}]},"_npmUser":{"name":"agentxin-ai","email":"1304040880@qq.com"},"directories":{},"maintainers":[{"name":"agentxin-ai","email":"1304040880@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/plugin-mineru_0.0.13_1775182342779_0.4284024368695978"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-19T10:46:50.855Z","modified":"2026-04-03T02:12:23.079Z","0.0.10":"2026-03-19T10:46:51.115Z","0.0.11":"2026-03-24T05:23:02.338Z","0.0.12":"2026-03-27T01:37:25.821Z","0.0.13":"2026-04-03T02:12:22.952Z"},"bugs":{"url":"https://github.com/agentxin-ai/agentxin-plugins/issues"},"homepage":"https://github.com/agentxin-ai/agentxin-plugins#readme","repository":{"type":"git","url":"git+https://github.com/agentxin-ai/agentxin-plugins.git"},"description":"`@agentxin-ai/plugin-mineru` is a MinerU document converter plugin for the [AgentXin AI](https://github.com/agentxin-ai/agentxin) platform, providing extraction capabilities from PDF to Markdown and structured JSON. The plugin includes built-in MinerU int","maintainers":[{"name":"agentxin-ai","email":"1304040880@qq.com"}],"readme":"# AgentXin Plugin: MinerU\n\n`@agentxin-ai/plugin-mineru` is a MinerU document converter plugin for the [AgentXin AI](https://github.com/agentxin-ai/agentxin) platform, providing extraction capabilities from PDF to Markdown and structured JSON. The plugin includes built-in MinerU integration strategies, document conversion strategies, and result parsing services, enabling secure access to the MinerU API in automated workflows, polling task status, and writing parsed content and attachment resources to the platform file system.\n\n## Installation\n\n```bash\npnpm add @agentxin-ai/plugin-mineru\n# or\nnpm install @agentxin-ai/plugin-mineru\n```\n\n> **Note**: This plugin depends on `@agentxin-ai/plugin-sdk`, `@nestjs/common@^11`, `@nestjs/config@^4`, `@metad/contracts`, `axios@1`, `chalk@4`, `@langchain/core@^0.3.72`, and `uuid@8` as peerDependencies. Please ensure these packages are installed in your host project.\n\n## Quick Start\n\n1. **Prepare MinerU Credentials**  \n    Obtain a valid API Key from the MinerU dashboard and confirm the service address (default: `https://mineru.net/api/v4`).\n\n2. **Configure Integration in AgentXin**  \n    - Via AgentXin Console: Create a MinerU integration and fill in the following fields.  \n    - Or set environment variables in your deployment environment:\n      - `MINERU_API_BASE_URL`: Optional, defaults to `https://mineru.net/api/v4`.\n      - `MINERU_API_TOKEN`: Required, used as a fallback credential if no integration is configured.\n\n    Example integration configuration (JSON):\n\n    ```json\n    {\n      \"provider\": \"mineru\",\n      \"options\": {\n         \"apiUrl\": \"https://mineru.net/api/v4\",\n         \"apiKey\": \"your-mineru-api-key\"\n      }\n    }\n    ```\n\n3. **Register the Plugin**  \n    Configure the plugin in your host service's plugin registration process:\n\n    ```sh .env\n    PLUGINS=@agentxin-ai/plugin-mineru\n    ```\n\n    The plugin returns the NestJS module `MinerUPlugin` in the `register` hook and logs messages during the `onStart`/`onStop` lifecycle.\n\n## MinerU Integration Options\n\n| Field    | Type   | Description                           | Required | Default                      |\n| -------- | ------ | ------------------------------------- | -------- | ---------------------------- |\n| apiUrl   | string | MinerU API base URL                   | No       | `https://mineru.net/api/v4`  |\n| apiKey   | string | MinerU service API Key (keep secret)  | Yes      | —                            |\n\n> If both integration configuration and environment variables are provided, options from the integration configuration take precedence.\n\n## Document Conversion Parameters\n\n`MinerUTransformerStrategy` supports the following configuration options (passed to the MinerU API when starting a workflow):\n\n| Field            | Type    | Default      | Description                                         |\n| ---------------- | ------- | ------------ | --------------------------------------------------- |\n| `isOcr`          | boolean | `true`       | Enable OCR for image-based PDFs.                    |\n| `enableFormula`  | boolean | `true`       | Recognize mathematical formulas and output tags.    |\n| `enableTable`    | boolean | `true`       | Recognize tables and output structured tags.        |\n| `language`       | string  | `\"ch\"`       | Main document language, per MinerU API (`en`/`ch`). |\n| `modelVersion`   | string  | `\"pipeline\"` | MinerU model version (`pipeline`, `vlm`, etc.).     |\n\nBy default, the plugin creates MinerU tasks for each file to be processed, polls until `full_zip_url` is returned, then downloads and parses the zip package in memory.\n\n## Permissions\n\n- **Integration**: Access MinerU integration configuration to read API address and credentials.\n- **File System**: Perform `read/write/list` on `XpFileSystem` to store image resources from MinerU results.\n\nEnsure the plugin is granted these permissions in your authorization policy, or it will not be able to retrieve results or write attachments.\n\n## Output Content\n\nThe parser generates:\n\n- Full Markdown: Resource links are automatically replaced to point to actual URLs written via `XpFileSystem`.\n- Structured metadata: Includes MinerU task ID, layout JSON (`layout.json`), content list (`content_list.json`), original PDF filename, etc.\n- Attachment asset list: Records written image resources for easy association by callers.\n\nThe returned `Document<ChunkMetadata>` array currently defaults to a single chunk containing the full Markdown; you can split it as needed.\n\n## Development & Debugging\n\nRun the following commands in the repository root to build and test locally:\n\n```bash\nnpm install\nnpx nx build @agentxin-ai/plugin-mineru\nnpx nx test @agentxin-ai/plugin-mineru\n```\n\nTypeScript build artifacts are output to `packages/mineru/dist`. Before publishing, ensure `package.json`, type declarations, and runtime files are in sync.\n\n## License\n\nThis project follows the [AGPL-3.0 License](../../../LICENSE) in the repository root.\n","readmeFilename":"README.md"}