mirror of
https://github.com/7836246/cursor2api.git
synced 2026-05-08 06:38:20 +08:00
- 截断时跳过工具解析,防止损坏的工具调用(写入半截文件) - maxAutoContinue 默认 0,交由 Claude Code 原生续写 - 系统提示词身份声明清除(防 prompt injection 拒绝) - 流式热身窗口 96→300 chars(拒绝检测前不释放文本) - 日志查看器「提示词对比」视图:原始 vs Cursor 转换后 - 转换摘要面板:工具数/消息数/上下文大小一目了然 - 标题提取增强:通用 XML 标签清除 + 更多引导语过滤
40 lines
1.7 KiB
JSON
40 lines
1.7 KiB
JSON
{
|
|
"name": "cursor2api",
|
|
"version": "2.7.4",
|
|
"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:handler-truncation": "node test/unit-handler-truncation.mjs",
|
|
"test:openai-stream-truncation": "node test/unit-openai-stream-truncation.mjs",
|
|
"test:image-paths": "node test/unit-image-paths.mjs",
|
|
"test:openai-image-file": "node test/unit-openai-image-file.mjs",
|
|
"test:openai-chat-input": "node test/unit-openai-chat-input.mjs",
|
|
"test:vision": "node test/unit-vision.mjs",
|
|
"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 && node test/unit-image-paths.mjs && node test/unit-vision.mjs && node test/unit-openai-chat-input.mjs && node test/unit-openai-image-file.mjs && node test/unit-handler-truncation.mjs && node test/unit-openai-stream-truncation.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"
|
|
}
|
|
}
|