- 新增 providers/models 数据库表、迁移和数据访问层 - 新增 15 个后端 API 路由(供应商/模型 CRUD + 连通性测试) - 新增 AI 服务层(registry.ts: buildProviderRegistry + testProviderConnection) - 新增前端模型管理页面(Tabs: 供应商/模型,含表格、表单、工具栏) - 新增前端 hooks(use-providers, use-models) - 新增共享类型和 MODEL_CAPABILITIES 常量 - 新增 10 个测试文件(66 个测试用例,4 个因 bun test ESM 兼容问题待修复) - 更新开发文档(architecture, backend, frontend) - 附带 apply-review 修复:统一错误响应、提取共享常量、清理重复测试 注意:registry.test.ts 中 4 个测试因 bun test 无法解析 createProviderRegistry ESM 导出而失败,详情见 context.md
75 lines
2.4 KiB
JSON
75 lines
2.4 KiB
JSON
{
|
|
"name": "alfred",
|
|
"version": "0.1.0",
|
|
"type": "module",
|
|
"private": true,
|
|
"scripts": {
|
|
"dev": "bun run scripts/dev.ts",
|
|
"dev:server": "bun --watch src/server/dev.ts",
|
|
"dev:web": "bunx --bun vite --host",
|
|
"build": "bun run scripts/build.ts",
|
|
"lint": "eslint .",
|
|
"format": "prettier . --write",
|
|
"check": "bun run schema:check && bun run typecheck && bun run lint && bun test",
|
|
"schema": "bun run scripts/generate-config-schema.ts",
|
|
"schema:check": "bun run scripts/generate-config-schema.ts -- --check",
|
|
"verify": "bun run check && bun run build",
|
|
"test": "bun test",
|
|
"clean": "bun run scripts/clean.ts",
|
|
"typecheck": "tsc --noEmit",
|
|
"prepare": "husky",
|
|
"version:patch": "bun run scripts/bump-version.ts patch",
|
|
"version:minor": "bun run scripts/bump-version.ts minor",
|
|
"version:major": "bun run scripts/bump-version.ts major",
|
|
"version:set": "bun run scripts/bump-version.ts set"
|
|
},
|
|
"devDependencies": {
|
|
"@commitlint/cli": "^21.0.1",
|
|
"@commitlint/config-conventional": "^21.0.1",
|
|
"@eslint/js": "^10.0.1",
|
|
"@tanstack/react-query-devtools": "^5.100.14",
|
|
"@testing-library/react": "^16.3.2",
|
|
"@types/bun": "^1.3.14",
|
|
"@types/jsdom": "^28.0.3",
|
|
"@types/react": "^19.2.15",
|
|
"@types/react-dom": "^19.2.3",
|
|
"@vitejs/plugin-react": "^6.0.2",
|
|
"drizzle-kit": "^0.31.10",
|
|
"eslint": "^10.4.0",
|
|
"eslint-config-prettier": "^10.1.8",
|
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
"eslint-plugin-import": "^2.32.0",
|
|
"eslint-plugin-perfectionist": "^5.9.0",
|
|
"eslint-plugin-prettier": "^5.5.5",
|
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
"eslint-plugin-react-refresh": "^0.5.2",
|
|
"husky": "^9.1.7",
|
|
"jsdom": "^29.1.1",
|
|
"lint-staged": "^17.0.5",
|
|
"prettier": "^3.8.3",
|
|
"typescript": "^6.0.3",
|
|
"typescript-eslint": "^8.60.0",
|
|
"vite": "^8.0.14"
|
|
},
|
|
"dependencies": {
|
|
"@ai-sdk/anthropic": "^3.0.81",
|
|
"@ai-sdk/openai": "^3.0.66",
|
|
"@ai-sdk/openai-compatible": "^2.0.48",
|
|
"@ant-design/icons": "^6.2.3",
|
|
"@sinclair/typebox": "^0.34.49",
|
|
"@tanstack/react-query": "^5.100.14",
|
|
"ai": "^6.0.193",
|
|
"ajv": "^8.20.0",
|
|
"antd": "^6.4.3",
|
|
"drizzle-orm": "^0.45.2",
|
|
"es-toolkit": "^1.47.0",
|
|
"pino": "^10.3.1",
|
|
"pino-pretty": "^13.1.3",
|
|
"pino-roll": "^4.0.0",
|
|
"react": "^19.2.6",
|
|
"react-dom": "^19.2.6",
|
|
"react-router": "^7.15.1",
|
|
"recharts": "^3.8.1"
|
|
}
|
|
}
|