SR

syntaxsmith/rosetta

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

37 stars 6 forks 품질 87 트렌드 32MIT

Auth-holder Chrome 페이지와 Node API 사이에 번역하여 ChatGPT(incl. Pro)에 대한 프로그래밍 접근. CDP Fetch 연동 + WebSocket 두 번째 다리 스트리밍.

개요

Node에 대한 프로그래밍 접근, auth-holder Chrome 페이지와 깨끗한 API 사이에 번역. Rosetta Stone 처럼: 한쪽에 프로 웹 프로토콜, 다른 쪽의 일반 노드 API. - : runConversation({ model: "gpt-6-pro", ... })은 stream handoff 이벤트를 따르며, WebSocket 두번째 다리를 열고, message stream complete — same UX as the chatgpt.com UI but returnable from Node. - : Non-Pro slugs (gpt-5-6 과태; gpt-5-5는 동일한 경로를 통해 초에 웹 UI의 la lane) 반환입니다. - : pass 회화Id + parentMessageId (또는 recall: "thread" for persistence). - : 각 호출은 자체 탭을 스팸; 많은 통화는 평행으로 스트림 할 수 있습니다. - : 옵션 onChunk (delta) 콜백은 CoT를 도착합니다. - : 긴 생각 (15 분 +) WS가 심장부를 보내만큼 계속; 단지 진실한 침묵은 전화를 죽는다. --remote-debugging-port가 열립니다. 프로파일은 실행 중에 재사용됩니다. 한 번에 로그인; 프로필 persists.

개요(AI 번역)

Programmatic access to **ChatGPT (incl. Pro) ** 노드에서, auth-holder Chrome 페이지와 깨끗한 API 사이에 번역.

Rosetta Stone처럼 : 한쪽에 Pro 웹 프로토콜, 다른 쪽의 일반 Node API.

무엇 그것

-Pro support: runConversation({ model: "gpt-6-pro", ... })]은 stream_handoff 이벤트를 따르며, WebSocket 두번째 다리를 열고, message_stream_complete] - chatgpt.com UI와 같은 UX를 구성하고 Node에서 반환할 수 있습니다.

  • ** 즉시 모델도 **: 비 프로 슬러그 ([gpt-5-6] 기본; gpt-5-5은 웹 UI의 la lane) 같은 경로를 통해 초에 반환.
  • **멀턴 **: 패스 conversationId + parentMessageId] (또는 사용 recall: "thread"] persistence).
  • ** 통화 ** : 각 통화는 자체 탭을 스팸; 많은 통화는 평행으로 스트림 할 수 있습니다.
  • Live Token deltas : 옵션 onChunk(delta)] 콜백은 CoT를 도착합니다.
  • Idle-timeout watchdog: 긴 생각 (15 min+) WS가 심베트를 보내는만큼 계속; 단지 진실한 침묵은 전화를 죽는다.

설치

필요 노드 ≥ 22.

설정: Chrome 출시

--remote-debugging-port] 오픈 및 ** 한 번에 chatgpt.com에 로그인해야합니다.**.

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

rosetta

Programmatic access to ChatGPT (incl. Pro) from Node, by translating between an auth-holder Chrome page and a clean API.

Like the Rosetta Stone: the Pro web protocol on one side, a regular Node API on the other.

What it does

  • Pro support: runConversation({ model: "gpt-6-pro", ... }) follows the stream_handoff event, opens the WebSocket second leg, and aggregates the live CoT until message_stream_complete — same UX as the chatgpt.com UI but returnable from Node.
  • Instant models too: non-Pro slugs (gpt-5-6 default; gpt-5-5 is the web UI’s 极速 lane) return in seconds via the same path.
  • Multi-turn: pass conversationId + parentMessageId (or use recall: "thread" for persistence).
  • Concurrency: each call spawns its own tab; many calls can stream in parallel.
  • Live token deltas: optional onChunk(delta) callback streams the CoT as it arrives.
  • Idle-timeout watchdog: long thinks (15 min+) keep going as long as the WS sends heartbeats; only true silence kills the call.

Install

pnpm add @syntaxsmith/rosetta
# or
npm i @syntaxsmith/rosetta

Requires Node ≥ 22.

Setup: launch Chrome

You need a Chrome with --remote-debugging-port open and logged in to chatgpt.com once. Profile is reused across runs.

Linux

chromium \
  --remote-debugging-port=9222 \
  --user-data-dir=$HOME/.rosetta/profile \
  --no-first-run --no-default-browser-check \
  https://chatgpt.com/

macOS

"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \
  --remote-debugging-port=9222 \
  --user-data-dir=$HOME/.rosetta/profile \
  --no-first-run --no-default-browser-check \
  https://chatgpt.com/

Windows (PowerShell)

& "C:\Program Files\Google\Chrome\Application\chrome.exe" `
  --remote-debugging-port=9222 `
  --user-data-dir=$env:USERPROFILE\.rosetta\profile `
  --no-first-run --no-default-browser-check `
  https://chatgpt.com/

Sign in once; the profile persists. Subsequent runs reuse the cookies.

CLI

# default = Pro (gpt-6-pro, GPT-6)
rosetta run "Explain idempotent matrices in three sentences."

# cheaper tier via explicit slug
rosetta run -m gpt-5-6 "Reply with the single word: pong"

# stream live tokens
rosetta run --stream "Sketch a 3-paragraph plan for X"

# threaded recall — successive calls build on the same conversation
rosetta run --recall research "what's the prior on Y?"
rosetta run --recall research "given that, what would change?"

# inspect / clear persisted threads
rosetta threads
rosetta forget research

# list models the account exposes
rosetta probe

# attach a local file (repeatable) — image, PDF, CSV, code, ...
rosetta run --attach photo.png "What's in this image?"
rosetta run --attach report.pdf "Quote the third paragraph verbatim."
GitHub에서 전체 README 보기

설치

npx -y -p @syntaxsmith/rosetta rosetta-mcp
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "rosetta": { "command": "npx", "args": ["-y", "-p", "@syntaxsmith/rosetta", "rosetta-mcp"], "env": { "ROSETTA_CDP_PORT": "9222" } } } }