forked from bai/curriculum-project-hub
313e890b6c
群消息事件 → 创建 AgentRun → 获锁 → 调 runAgent → 释放锁 + 状态回写: - feishu/client.ts: lark WSClient 长连接接收 im.message.receive_v1; sendText 经 client.im.v1 发送(SDK 运行时动态 API,类型弱化务实收口) - feishu/trigger.ts: @bot 识别(chat 绑定解析 ADR-0001)→ 创建 run+ session(provider-bound ADR-0017)→ acquireLock(ADR-0002,竞态回退 busy)→ runAgent(fire-and-forget)→ finally releaseLock;非项目群/无 @bot/非文本 全部忽略 - lock.ts: ADR-0002 WellFormed 落代码——currentLockRunId 读锁时校验 持锁 run 非终止,终止 run 持锁即 release-path bug(抛而非静默) - models.ts: resolve 提到 ModelRegistry 接口(之前漏在实现上) - server.ts: Fastify + lark ws 启动,/api/healthz prompt 提取 smoke 通过(@bot+prompt→prompt;纯@bot→null;无mention→null; 非文本→null)。修了 mention 正则 bug(/@_\w+_/ 的回溯错误)。tsc rc=0。
33 lines
1.1 KiB
JSON
33 lines
1.1 KiB
JSON
{
|
|
"name": "@paradigm/hub",
|
|
"version": "0.0.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"engines": {
|
|
"node": ">=20"
|
|
},
|
|
"dependencies": {
|
|
"@fastify/cookie": "^11.0.2",
|
|
"@larksuiteoapi/node-sdk": "^1.66.1",
|
|
"@prisma/client": "^6.19.3",
|
|
"dotenv": "^17.4.2",
|
|
"fastify": "^5.8.5",
|
|
"openai": "^4.77.0"
|
|
},
|
|
"devDependencies": {
|
|
"prisma": "^6.19.3",
|
|
"tsx": "^4.19.0",
|
|
"typescript": "^5.7.0"
|
|
},
|
|
"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"
|
|
}
|
|
}
|