- Go gateway (stdlib only): /v1/messages non-stream + SSE, /v1/messages/count_tokens, management API /api/* (providers CRUD, apply/restore, settings, backups, logs) - Protocol conversion: Anthropic Messages <-> Chat Completions with a streaming state machine keyed by content block index (text, tool_use, parallel calls) - ~/.claude/settings.json guarded read/write: timestamped backups, managed env keys only, one-click restore - Tauri 2 shell: spawns the gateway sidecar, parses the random port from stdout, stdin pipe watchdog prevents orphans, kills the child on exit - React frontend: Dashboard/Providers/Settings, zh-CN + en-US, TanStack Query - Tests: Go table-driven + httptest integration (all green), vitest + RTL
37 lines
858 B
JSON
37 lines
858 B
JSON
{
|
|
"$schema": "https://schema.tauri.app/config/2",
|
|
"productName": "CrossRelay",
|
|
"version": "0.1.0",
|
|
"identifier": "cn.rutua.crossrelay",
|
|
"build": {
|
|
"frontendDist": "../dist",
|
|
"devUrl": "http://localhost:1420",
|
|
"beforeDevCommand": "npm run dev",
|
|
"beforeBuildCommand": "npm run build"
|
|
},
|
|
"app": {
|
|
"windows": [
|
|
{
|
|
"title": "CrossRelay",
|
|
"width": 1120,
|
|
"height": 760,
|
|
"minWidth": 960,
|
|
"minHeight": 640
|
|
}
|
|
],
|
|
"security": {
|
|
"csp": "default-src 'self'; img-src 'self' data:; style-src 'self' 'unsafe-inline'; connect-src 'self' http://127.0.0.1:* http://localhost:*"
|
|
}
|
|
},
|
|
"bundle": {
|
|
"active": true,
|
|
"targets": ["nsis"],
|
|
"icon": [
|
|
"icons/32x32.png",
|
|
"icons/128x128.png",
|
|
"icons/128x128@2x.png",
|
|
"icons/icon.ico"
|
|
]
|
|
}
|
|
}
|