
syntaxsmith/rosetta
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
Auth ホルダークロームページと Node API 間で翻訳することで、ChatGPT (Pro を含む) へのプログラマティックなアクセス。 CDPフェッチインターセプション+ WebSocket秒レッグストリーミング.
概要
ノードからプログラム的なアクセス, auth-holder Chrome ページときれいな API 間で翻訳することにより. Rosetta Stone: 片面にある Pro の Web プロトコル、もう一方の規則的な Node API です。 - : runConversation({モデル: "gpt-6-pro", ... }) は stream handoff イベントをフォローし、WebSocket の 2 番目の足を開き、ライブの CoT を message stream complete まで集計します。 同じ UX は chatgpt.com UI と同じですが、Node から返すことができます。 - : 非Pro slugs (gpt-5-6 デフォルト; gpt-5-5 は web UI の 速度 レーン) は同じパスで秒単位で返します。 - : 会話を渡すId + parentMessageId (または、永続のためにrecall: "thread"を使用してください)。 - : 各呼び出しは、独自のタブをスポーンします。多くの呼び出しは、並行してストリーミングできます。 - : オプションのonChunk(delta)コールバックは、CoTが到着すると流れます。 - : WSがハートビートを送る限り、長い考え(15分以上)が止まります。真のサイレンスだけがコールを殺します。 --remote-debugging-port と Chrome が必要です。 プロファイルは、実行中に再利用されます。 一度にサインイン; プロフィールは主張します.
概要(AI 翻訳)
ノードから**ChatGPT(Proを含む)**へのプログラマティックアクセス、auth-holder ChromeページときれいなAPI間での翻訳。
ロゼッタストーンのように:片側にプロWebプロトコル、もう1つのノードAPI。
それが何をするか
-Proサポート:[runConversation({ model: "gpt-6-pro", ... })はstream_handoff]]イベントをフォローし、WebSocket第2の脚を開き、ライブCoTを[message_stream_completeまで集計します。 - chatgpt.com UIと同じUXですが、Nodeから返すことができます。
-Instantモデルも:non-Pro slugs ([gpt-5-6]) デフォルト; [[gpt-5-5] は、同じパスを介して秒単位で返されます。
-マルチターン:[conversationId+[parentMessageId]をパスします(または[recall: "thread"])。
-Concurrency:各呼び出しは、独自のタブを発しました。多くの呼び出しは、並行してストリーミングすることができます。
- ライブトークンデルタ:オプション[[
onChunk(delta)]])コールバックは、CoTが到着すると流れます。 - アイドルタイムアウト watchdog: 長い思考 (15 min +) WSがハートビートを送る限り継続します。真の沈黙はコールを殺します。
インストール
ノード≥22が必要です。
##セットアップ:Chromeを起動
[--remote-debugging-portでChromeが必要で、**一度に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 thestream_handoffevent, opens the WebSocket second leg, and aggregates the live CoT untilmessage_stream_complete— same UX as the chatgpt.com UI but returnable from Node. - Instant models too: non-Pro slugs (
gpt-5-6default;gpt-5-5is the web UI’s 极速 lane) return in seconds via the same path. - Multi-turn: pass
conversationId+parentMessageId(or userecall: "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."
インストール
npx -y -p @syntaxsmith/rosetta rosetta-mcp設定
{
"mcpServers": {
"rosetta": {
"command": "npx",
"args": ["-y", "-p", "@syntaxsmith/rosetta", "rosetta-mcp"],
"env": {
"ROSETTA_CDP_PORT": "9222"
}
}
}
}