Files
cursor2api/package.json
小海 3dceac115c fix: 修复长响应误判为拒绝 + 减少 tolerantParse 日志噪音 (v2.5.5)
- 工具模式下长文本(8654 chars)正文碰巧含拒绝关键词被误判,导致 Claude Code 死循环
- 截断响应(max_tokens)跳过拒绝检测;长响应仅检查前300字符
- tolerantParse 对非工具调用的 JSON 代码块降为 warn 级别日志
2026-03-12 10:05:31 +08:00

34 lines
1.0 KiB
JSON

{
"name": "cursor2api",
"version": "2.5.5",
"description": "Proxy Cursor docs AI to Anthropic Messages API for Claude Code",
"type": "module",
"scripts": {
"dev": "tsx watch src/index.ts",
"build": "tsc",
"start": "node dist/index.js",
"test:unit": "node test/unit-tolerant-parse.mjs",
"test:tool-fixer": "node test/unit-tool-fixer.mjs",
"test:openai-compat": "node test/unit-openai-compat.mjs",
"test:all": "node test/unit-tolerant-parse.mjs && node test/unit-tool-fixer.mjs && node test/unit-openai-compat.mjs && node test/unit-proxy-agent.mjs",
"test:e2e": "node test/e2e-chat.mjs",
"test:agentic": "node test/e2e-agentic.mjs"
},
"dependencies": {
"dotenv": "^16.5.0",
"eventsource-parser": "^3.0.1",
"express": "^5.1.0",
"tesseract.js": "^7.0.0",
"undici": "^7.22.0",
"uuid": "^11.1.0",
"yaml": "^2.7.1"
},
"devDependencies": {
"@types/express": "^5.0.2",
"@types/node": "^22.15.0",
"@types/uuid": "^10.0.0",
"tsx": "^4.19.0",
"typescript": "^5.8.0"
}
}