Files
game_voice_recorder/app/package.json
EJClaw 6a03c67b54 앱 v1.2.1: 겜녹이 봇 토큰을 앱에 보내지 않고 사이트 서버가 봇을 대신 연결
- 사이트 서버: discord.js 로 디스코드 게이트웨이에 한 번 붙고(discord-source.ts), 로그인한 앱에 WS /app/bot/ws 로 중계(bot-broker.ts)
  · 앱이 보낸 op 4 는 지켜보는 서버의 음성채널 참여 · 나가기만 허용하고 필드를 다시 만들어 보낸다
  · 디스코드가 준 일회용 음성 접속 정보(VOICE_STATE/SERVER_UPDATE)는 음성을 가진 앱에만 넘긴다. 음성은 앱 ↔ 디스코드로 바로
  · 한 서버의 봇 음성은 마지막으로 요청한 앱이 가져가고 이전 앱은 taken. 이전 앱의 늦은 나가기 무시, 음성 가진 앱이 끊기면 봇을 뺀다
  · 슬래시 명령은 서버가 받아 defer 후 그 서버를 지켜보는 앱으로 보낸다
  · 등록 해제 · 로그아웃하면 그 유저의 중계 연결을 바로 끊는다 (4401), 30초마다 다시 확인
- /app/me 에서 botToken 제거. 앱은 v1.2.0 이 저장해 둔 봇 토큰을 시작할 때 지운다
- 앱: BotGateway 로 디스코드 연결을 분리 (RemoteGateway = 겜녹이 봇 서버 중계, LocalGateway = 다른 봇 토큰 직접 연결)
  Bot 은 discord.js 객체 대신 이 인터페이스만 쓴다. 중계가 로그인 만료를 알리면 바로 다시 확인해서 잠근다
- 로그인 확인: 잠그라는 응답(401 · 403)은 겹친 확인 때문에 늦게 와도 같은 토큰이면 따른다
  (겹친 두 번째 확인이 401 을 받아 "등록되지 않은 아이디" 대신 "로그인 만료"로 잠기던 문제). 미등록 화면은 다시 확인해도 유지
- 테스트: 봇 중계 4건(토큰 미노출 · 음성 정보 전달 · 다른 PC 인계 · 명령 라우팅 · 해제 시 끊김), 겹친 확인 1건
  실제 디스코드: voice-e2e GVR_E2E_RELAY=1 (서버 중계로 따라 들어가 녹음 · STT · 녹음 제외), login-e2e 19/19

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 10:30:14 +09:00

106 lines
2.6 KiB
JSON

{
"name": "gvr-app",
"productName": "겜녹이",
"version": "1.2.1",
"description": "겜녹이 (Game Voice Recorder) - 게임 연동 디스코드 음성 기록",
"private": true,
"main": "dist/main.cjs",
"author": "tkrmagid",
"license": "UNLICENSED",
"scripts": {
"build": "node build.mjs",
"typecheck": "tsc --noEmit -p .",
"test": "node --import tsx --test test/*.test.ts",
"core": "node --import tsx src/core/cli.ts",
"start": "npm run build && electron .",
"dist:win": "npm run build && electron-builder --win --x64 --publish never",
"dist:dir": "npm run build && electron-builder --dir --publish never"
},
"dependencies": {
"@discordjs/voice": "^0.19.2",
"better-sqlite3": "^12.11.1",
"discord.js": "^14.27.0",
"fastify": "^5.6.1",
"msedge-tts": "^2.0.3",
"prism-media": "^1.3.5",
"ws": "^8.18.3"
},
"devDependencies": {
"@types/better-sqlite3": "^7.6.13",
"@types/node": "^22.18.0",
"@types/react": "^19.3.0",
"@types/react-dom": "^19.3.0",
"@types/ws": "^8.18.1",
"electron": "^38.8.6",
"electron-builder": "^26.0.12",
"esbuild": "^0.25.10",
"react": "^19.3.0",
"react-dom": "^19.3.0",
"tsx": "^4.20.6",
"typescript": "^5.9.3"
},
"build": {
"appId": "kr.tkrmagid.gvr",
"productName": "겜녹이",
"executableName": "GameVoiceRecorder",
"copyright": "tkrmagid",
"directories": {
"output": "release",
"buildResources": "build-res"
},
"files": [
"dist/**/*",
"!dist/**/*.map",
"package.json"
],
"asar": true,
"asarUnpack": [
"node_modules/better-sqlite3/**",
"node_modules/@snazzah/**",
"node_modules/bindings/**",
"node_modules/file-uri-to-path/**"
],
"extraResources": [
{
"from": "resources",
"to": "gvr"
},
{
"from": "../worker/dist/gvr-worker",
"to": "worker"
},
{
"from": "../assets/app",
"to": "brand",
"filter": [
"*.png",
"*.ico"
]
}
],
"npmRebuild": true,
"win": {
"target": [
{
"target": "zip",
"arch": [
"x64"
]
},
{
"target": "portable",
"arch": [
"x64"
]
}
],
"icon": "../assets/app/icon.ico",
"artifactName": "GameVoiceRecorder-${version}-win-x64.${ext}",
"signAndEditExecutable": true
},
"portable": {
"artifactName": "GameVoiceRecorder-${version}-portable.exe",
"unpackDirName": "GameVoiceRecorder"
}
}
}