forked from EduCraft/curriculum-project-hub
4bd5b03bb1
用 @anthropic-ai/claude-agent-sdk 的 query() 替换 Vercel AI SDK 的 streamText。SDK 自带 Read/Write/Bash/Glob/Grep 工具——read_file/ write_file/list_files/cph_check/cph_build 全部不需要了,Bash 跑 cph 直接。 UX 同时改成 workbuddy 风格: - 收到 @bot → 表情回复(👍)确认收到,不发'已开始处理' - agent 回复作为文本流式发送(text-as-card patch,markdown 渲染) - 超长自动续发新消息,不截断 - 完成/出错不再额外发状态消息 - 去掉卡片(model选择器/取消按钮) ADR-0017 更新:放弃 provider-agnostic,Claude Code SDK 是 Anthropic 专有。换来:compaction、工具审批、partial message 流式、成熟 agent loop。 tsc rc=0。旧文件(workspace.ts/cph.ts/provider.ts/tools.ts)暂留, 下个 commit 清理。
40 lines
1.4 KiB
JSON
40 lines
1.4 KiB
JSON
{
|
|
"name": "@paradigm/hub",
|
|
"version": "0.0.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"engines": {
|
|
"node": ">=20"
|
|
},
|
|
"dependencies": {
|
|
"@ai-sdk/openai-compatible": "^3.0.5",
|
|
"@anthropic-ai/claude-agent-sdk": "^0.3.202",
|
|
"@fastify/cookie": "^11.0.2",
|
|
"@larksuiteoapi/node-sdk": "^1.66.1",
|
|
"@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"
|
|
},
|
|
"description": "Curriculum Project Hub — Feishu-group collaboration + provider-agnostic agent runtime. Aligns to spec/System (ADR-0001..0004, 0017).",
|
|
"scripts": {
|
|
"dev": "tsx watch src/server.ts",
|
|
"build": "tsc -p tsconfig.json",
|
|
"start": "node dist/server.js",
|
|
"check": "tsc -p tsconfig.json --noEmit",
|
|
"prisma:generate": "prisma generate --schema prisma/schema.prisma",
|
|
"prisma:validate": "DATABASE_URL=${DATABASE_URL:-postgresql://stub:stub@127.0.0.1:5432/stub} prisma validate --schema prisma/schema.prisma",
|
|
"prisma:migrate": "DATABASE_URL=${DATABASE_URL:-postgresql://paradigm:paradigm@127.0.0.1:5432/paradigm} prisma migrate deploy --schema prisma/schema.prisma",
|
|
"deploy": "bash deploy/deploy_platform.sh",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest"
|
|
}
|
|
}
|