forked from EduCraft/curriculum-project-hub
7bc9e4f449
Replace the MinerU client with Alibaba Cloud Document Mind (docmind) as the backing service for pdf_to_md_bundle. Aliyun docmind covers both PDF→MD (with LaTeX formula enhancement) and audio/video→text in one provider, unlike MinerU which only does documents. Changes: - Install @alicloud/docmind-api20220711 + @alicloud/credentials + tea-util - Delete mineruClient.ts; add docmindClient.ts with AliyunDocmindClient using the official SDK (SubmitDocParserJobAdvance → poll → GetDocParserResult) - CapabilitySecretPayload: baseUrl+apiToken → accessKeyId+accessKeySecret+endpoint - pdfToMdBundle adapter: provider aliyun_docmind, DocmindClientError - Tests updated: 7/7 green, mock client matches new interface Pricing (aliyun docmind, 2025-07): - PDF 增强链路 (含公式 LaTeX): 0.04元/页 ≈ $0.0056/页 - 视频: 0.002元/秒 - 音频: 0.00035元/秒 Cost is derived from page count × unit price (COST_PER_PAGE_USD) until the service reports an actual cost field; costSource=provider_reported. The aliyun CLI is NOT used at runtime — Hub calls the SDK directly. The CLI remains available for operators to manage AccessKeys and test connectivity.
54 lines
1.9 KiB
JSON
54 lines
1.9 KiB
JSON
{
|
|
"name": "@paradigm/hub",
|
|
"version": "0.0.31",
|
|
"private": true,
|
|
"type": "module",
|
|
"engines": {
|
|
"node": ">=24"
|
|
},
|
|
"dependencies": {
|
|
"@alicloud/credentials": "^2.4.5",
|
|
"@alicloud/docmind-api20220711": "^1.4.15",
|
|
"@alicloud/tea-util": "^1.4.11",
|
|
"@anthropic-ai/claude-agent-sdk": "^0.3.202",
|
|
"@fastify/cookie": "^11.0.2",
|
|
"@larksuiteoapi/node-sdk": "^1.70.0",
|
|
"@prisma/client": "^6.19.3",
|
|
"ai": "^7.0.16",
|
|
"dotenv": "^17.4.2",
|
|
"fastify": "^5.8.5",
|
|
"zod": "^4.4.3"
|
|
},
|
|
"devDependencies": {
|
|
"prisma": "^6.19.3",
|
|
"tsx": "^4.19.0",
|
|
"typescript": "^5.7.0",
|
|
"vitest": "^4.1.10"
|
|
},
|
|
"overrides": {
|
|
"@larksuiteoapi/node-sdk": {
|
|
"axios": "1.18.1"
|
|
}
|
|
},
|
|
"description": "Curriculum Project Hub — org-scoped Feishu collaboration and confined Agent runtime. Aligns to spec/System through ADR-0024.",
|
|
"scripts": {
|
|
"dev": "npm run prisma:migrate && tsx watch src/server.ts",
|
|
"build": "tsc -p tsconfig.json && npm run admin:build",
|
|
"start": "npm run prisma:migrate && node dist/server.js",
|
|
"check": "tsc -p tsconfig.json --noEmit",
|
|
"audit:production": "npm audit --omit=dev --audit-level=high",
|
|
"prisma:generate": "prisma generate --schema prisma/schema.prisma",
|
|
"prisma:validate": "prisma validate --schema prisma/schema.prisma",
|
|
"prisma:migrate": "prisma migrate deploy --schema prisma/schema.prisma",
|
|
"secrets:rotate-kek": "node dist/deployment/rotate-secret-kek.js",
|
|
"agent-config": "node dist/deployment/agent-config-cli.js",
|
|
"silo:bootstrap": "node dist/deployment/bootstrap-silo-cli.js",
|
|
"silo:restore-preflight": "node dist/deployment/restore-preflight.js",
|
|
"deploy": "bash deploy/deploy_platform.sh",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"admin:dev": "npm run dev --prefix admin-web",
|
|
"admin:build": "npm run build --prefix admin-web"
|
|
}
|
|
}
|